generated-configure.sh revision 669:653ff6bcf0b1
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604JOBS
605MEMORY_SIZE
606NUM_CORES
607ENABLE_INTREE_EC
608SALIB_NAME
609HOTSPOT_MAKE_ARGS
610FIXPATH
611LIBCXX
612LLVM_LIBS
613LLVM_LDFLAGS
614LLVM_CFLAGS
615LLVM_CONFIG
616LIBFFI_LIBS
617LIBFFI_CFLAGS
618STATIC_CXX_SETTING
619LIBDL
620LIBM
621LIBZIP_CAN_USE_MMAP
622USE_EXTERNAL_LIBZ
623USE_EXTERNAL_LIBGIF
624USE_EXTERNAL_LIBJPEG
625ALSA_LIBS
626ALSA_CFLAGS
627FREETYPE2_LIB_PATH
628USING_SYSTEM_FT_LIB
629FREETYPE2_LIBS
630FREETYPE2_CFLAGS
631CUPS_CFLAGS
632OPENWIN_HOME
633X_EXTRA_LIBS
634X_LIBS
635X_PRE_LIBS
636X_CFLAGS
637XMKMF
638CXXFLAGS_DEBUG_SYMBOLS
639CFLAGS_DEBUG_SYMBOLS
640ZIP_DEBUGINFO_FILES
641ENABLE_DEBUG_SYMBOLS
642LDFLAGS_CXX_JDK
643LDFLAGS_JDKEXE_SUFFIX
644LDFLAGS_JDKLIB_SUFFIX
645LDFLAGS_JDKEXE
646LDFLAGS_JDKLIB
647CXXFLAGS_JDKEXE
648CXXFLAGS_JDKLIB
649CFLAGS_JDKEXE
650CFLAGS_JDKLIB
651MACOSX_VERSION_MIN
652PACKAGE_PATH
653LEGACY_EXTRA_LDFLAGS
654LEGACY_EXTRA_CXXFLAGS
655LEGACY_EXTRA_CFLAGS
656CXX_FLAG_DEPS
657C_FLAG_DEPS
658CXX_O_FLAG_NONE
659CXX_O_FLAG_NORM
660CXX_O_FLAG_HI
661CXX_O_FLAG_HIGHEST
662C_O_FLAG_NONE
663C_O_FLAG_NORM
664C_O_FLAG_HI
665C_O_FLAG_HIGHEST
666POST_MCS_CMD
667POST_STRIP_CMD
668SET_EXECUTABLE_ORIGIN
669SET_SHARED_LIBRARY_ORIGIN
670CXX_FLAG_REORDER
671C_FLAG_REORDER
672SET_SHARED_LIBRARY_MAPFILE
673SET_SHARED_LIBRARY_NAME
674SHARED_LIBRARY_FLAGS
675EXE_SUFFIX
676STATIC_LIBRARY_SUFFIX
677SHARED_LIBRARY_SUFFIX
678LIBRARY_PREFIX
679STATIC_LIBRARY
680SHARED_LIBRARY
681OBJ_SUFFIX
682LIPO
683ac_ct_OBJDUMP
684OBJDUMP
685ac_ct_OBJCOPY
686OBJCOPY
687MCS
688STRIP
689NM
690AS
691CXXCPP
692CPP
693COMPILER_TYPE
694RC_FLAGS
695DUMPBIN
696WINAR
697HOTSPOT_RC
698HOTSPOT_MT
699RC
700MT
701WINLD
702HOTSPOT_LD
703HOTSPOT_CXX
704ARFLAGS
705AR
706LDEXECXX
707LDCXX
708LDEXE
709LD
710ac_ct_OBJC
711OBJCFLAGS
712OBJC
713ac_ct_CXX
714CXXFLAGS
715CXX
716ac_ct_PROPER_COMPILER_CXX
717PROPER_COMPILER_CXX
718POTENTIAL_CXX
719TOOLS_DIR_CXX
720OBJEXT
721EXEEXT
722ac_ct_CC
723CPPFLAGS
724LDFLAGS
725CFLAGS
726CC
727ac_ct_PROPER_COMPILER_CC
728PROPER_COMPILER_CC
729POTENTIAL_CC
730TOOLS_DIR_CC
731BUILD_LD
732BUILD_CXX
733BUILD_CC
734MSVCR_DLL
735DXSDK_INCLUDE_PATH
736DXSDK_LIB_PATH
737VS_PATH
738VS_LIB
739VS_INCLUDE
740CYGWIN_LINK
741AR_OUT_OPTION
742LD_OUT_OPTION
743EXE_OUT_OPTION
744CC_OUT_OPTION
745BUILD_HOTSPOT
746HOTSPOT_DIST
747BUILD_OUTPUT
748OVERRIDE_SRC_ROOT
749ADD_SRC_ROOT
750JDK_TOPDIR
751NASHORN_TOPDIR
752HOTSPOT_TOPDIR
753JAXWS_TOPDIR
754JAXP_TOPDIR
755CORBA_TOPDIR
756LANGTOOLS_TOPDIR
757BOOT_JDK_JVMARGS
758JAVAC_FLAGS
759BOOT_JDK_SOURCETARGET
760BOOT_JDK
761BOOT_TOOLSJAR
762BOOT_RTJAR
763JAVA_CHECK
764JAVAC_CHECK
765COOKED_BUILD_NUMBER
766JDK_VERSION
767COPYRIGHT_YEAR
768MACOSX_BUNDLE_ID_BASE
769MACOSX_BUNDLE_NAME_BASE
770COMPANY_NAME
771JDK_RC_PLATFORM_NAME
772PRODUCT_SUFFIX
773PRODUCT_NAME
774LAUNCHER_NAME
775MILESTONE
776JDK_BUILD_NUMBER
777JDK_UPDATE_VERSION
778JDK_MICRO_VERSION
779JDK_MINOR_VERSION
780JDK_MAJOR_VERSION
781USER_RELEASE_SUFFIX
782COMPRESS_JARS
783UNLIMITED_CRYPTO
784CACERTS_FILE
785TEST_IN_BUILD
786BUILD_HEADLESS
787SUPPORT_HEADFUL
788SUPPORT_HEADLESS
789BDEPS_FTP
790BDEPS_UNZIP
791OS_VERSION_MICRO
792OS_VERSION_MINOR
793OS_VERSION_MAJOR
794PKG_CONFIG
795XATTR
796TIME
797STAT
798HG
799READELF
800OTOOL
801LDD
802ZIP
803UNZIP
804FIND_DELETE
805MAKE
806CHECK_TOOLSDIR_MAKE
807CHECK_TOOLSDIR_GMAKE
808CHECK_MAKE
809CHECK_GMAKE
810PKGHANDLER
811OUTPUT_ROOT
812CONF_NAME
813SPEC
814BUILD_VARIANT_RELEASE
815DEBUG_CLASSFILES
816FASTDEBUG
817VARIANT
818DEBUG_LEVEL
819MACOSX_UNIVERSAL
820INCLUDE_SA
821JVM_VARIANT_ZEROSHARK
822JVM_VARIANT_ZERO
823JVM_VARIANT_KERNEL
824JVM_VARIANT_MINIMAL1
825JVM_VARIANT_CLIENT
826JVM_VARIANT_SERVER
827JVM_VARIANTS
828JDK_VARIANT
829SET_OPENJDK
830BUILD_LOG_WRAPPER
831BUILD_LOG_PREVIOUS
832BUILD_LOG
833SYS_ROOT
834PATH_SEP
835SRC_ROOT
836ZERO_ARCHDEF
837ZERO_ARCHFLAG
838DEFINE_CROSS_COMPILE_ARCH
839LP64
840OPENJDK_TARGET_OS_API_DIR
841OPENJDK_TARGET_CPU_JLI_CFLAGS
842OPENJDK_TARGET_CPU_OSARCH
843OPENJDK_TARGET_CPU_ISADIR
844OPENJDK_TARGET_CPU_LIBDIR
845OPENJDK_TARGET_CPU_LEGACY_LIB
846OPENJDK_TARGET_CPU_LEGACY
847REQUIRED_OS_VERSION
848REQUIRED_OS_NAME
849COMPILE_TYPE
850OPENJDK_TARGET_CPU_ENDIAN
851OPENJDK_TARGET_CPU_BITS
852OPENJDK_TARGET_CPU_ARCH
853OPENJDK_TARGET_CPU
854OPENJDK_TARGET_OS_API
855OPENJDK_TARGET_OS
856OPENJDK_BUILD_CPU_ENDIAN
857OPENJDK_BUILD_CPU_BITS
858OPENJDK_BUILD_CPU_ARCH
859OPENJDK_BUILD_CPU
860OPENJDK_BUILD_OS_API
861OPENJDK_BUILD_OS
862OPENJDK_BUILD_AUTOCONF_NAME
863OPENJDK_TARGET_AUTOCONF_NAME
864target_os
865target_vendor
866target_cpu
867target
868host_os
869host_vendor
870host_cpu
871host
872build_os
873build_vendor
874build_cpu
875build
876SETFILE
877DF
878READLINK
879CYGPATH
880NAWK
881SED
882FGREP
883EGREP
884GREP
885AWK
886XARGS
887WHICH
888WC
889UNIQ
890UNAME
891TR
892TOUCH
893TEE
894TAR
895TAIL
896SORT
897SH
898RM
899THEPWDCMD
900PRINTF
901MV
902MKTEMP
903MKDIR
904LS
905LN
906HEAD
907FIND
908FILE
909EXPR
910ECHO
911DIRNAME
912DIFF
913DATE
914CUT
915CPIO
916CP
917COMM
918CMP
919CHMOD
920CAT
921BASH
922BASENAME
923DATE_WHEN_CONFIGURED
924CONFIGURE_COMMAND_LINE
925CUSTOM_MAKE_DIR
926target_alias
927host_alias
928build_alias
929LIBS
930ECHO_T
931ECHO_N
932ECHO_C
933DEFS
934mandir
935localedir
936libdir
937psdir
938pdfdir
939dvidir
940htmldir
941infodir
942docdir
943oldincludedir
944includedir
945localstatedir
946sharedstatedir
947sysconfdir
948datadir
949datarootdir
950libexecdir
951sbindir
952bindir
953program_transform_name
954prefix
955exec_prefix
956PACKAGE_URL
957PACKAGE_BUGREPORT
958PACKAGE_STRING
959PACKAGE_VERSION
960PACKAGE_TARNAME
961PACKAGE_NAME
962PATH_SEPARATOR
963SHELL'
964ac_subst_files=''
965ac_user_opts='
966enable_option_checking
967with_custom_make_dir
968with_target_bits
969with_sys_root
970with_tools_dir
971with_devkit
972enable_openjdk_only
973with_jdk_variant
974with_jvm_variants
975enable_debug
976with_debug_level
977with_conf_name
978with_builddeps_conf
979with_builddeps_server
980with_builddeps_dir
981with_builddeps_group
982enable_headful
983enable_hotspot_test_in_build
984with_cacerts_file
985enable_unlimited_crypto
986with_milestone
987with_build_number
988with_user_release_suffix
989with_boot_jdk
990with_boot_jdk_jvmargs
991with_add_source_root
992with_override_source_root
993with_adds_and_overrides
994with_override_langtools
995with_override_corba
996with_override_jaxp
997with_override_jaxws
998with_override_hotspot
999with_override_jdk
1000with_import_hotspot
1001with_msvcr_dll
1002with_dxsdk
1003with_dxsdk_lib
1004with_dxsdk_include
1005with_extra_cflags
1006with_extra_cxxflags
1007with_extra_ldflags
1008enable_debug_symbols
1009enable_zip_debug_info
1010enable_macosx_runtime_support
1011with_x
1012with_cups
1013with_cups_include
1014with_freetype
1015with_alsa
1016with_alsa_include
1017with_alsa_lib
1018with_giflib
1019with_zlib
1020with_stdc__lib
1021with_num_cores
1022with_memory_size
1023with_jobs
1024with_sjavac_server_java
1025with_sjavac_server_cores
1026enable_sjavac
1027enable_precompiled_headers
1028enable_ccache
1029with_ccache_dir
1030'
1031      ac_precious_vars='build_alias
1032host_alias
1033target_alias
1034PKG_CONFIG
1035CC
1036CFLAGS
1037LDFLAGS
1038LIBS
1039CPPFLAGS
1040CXX
1041CXXFLAGS
1042CCC
1043OBJC
1044OBJCFLAGS
1045CPP
1046CXXCPP
1047XMKMF
1048FREETYPE2_CFLAGS
1049FREETYPE2_LIBS
1050ALSA_CFLAGS
1051ALSA_LIBS
1052LIBFFI_CFLAGS
1053LIBFFI_LIBS'
1054
1055
1056# Initialize some variables set by options.
1057ac_init_help=
1058ac_init_version=false
1059ac_unrecognized_opts=
1060ac_unrecognized_sep=
1061# The variables have the same names as the options, with
1062# dashes changed to underlines.
1063cache_file=/dev/null
1064exec_prefix=NONE
1065no_create=
1066no_recursion=
1067prefix=NONE
1068program_prefix=NONE
1069program_suffix=NONE
1070program_transform_name=s,x,x,
1071silent=
1072site=
1073srcdir=
1074verbose=
1075x_includes=NONE
1076x_libraries=NONE
1077
1078# Installation directory options.
1079# These are left unexpanded so users can "make install exec_prefix=/foo"
1080# and all the variables that are supposed to be based on exec_prefix
1081# by default will actually change.
1082# Use braces instead of parens because sh, perl, etc. also accept them.
1083# (The list follows the same order as the GNU Coding Standards.)
1084bindir='${exec_prefix}/bin'
1085sbindir='${exec_prefix}/sbin'
1086libexecdir='${exec_prefix}/libexec'
1087datarootdir='${prefix}/share'
1088datadir='${datarootdir}'
1089sysconfdir='${prefix}/etc'
1090sharedstatedir='${prefix}/com'
1091localstatedir='${prefix}/var'
1092includedir='${prefix}/include'
1093oldincludedir='/usr/include'
1094docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1095infodir='${datarootdir}/info'
1096htmldir='${docdir}'
1097dvidir='${docdir}'
1098pdfdir='${docdir}'
1099psdir='${docdir}'
1100libdir='${exec_prefix}/lib'
1101localedir='${datarootdir}/locale'
1102mandir='${datarootdir}/man'
1103
1104ac_prev=
1105ac_dashdash=
1106for ac_option
1107do
1108  # If the previous option needs an argument, assign it.
1109  if test -n "$ac_prev"; then
1110    eval $ac_prev=\$ac_option
1111    ac_prev=
1112    continue
1113  fi
1114
1115  case $ac_option in
1116  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1117  *=)   ac_optarg= ;;
1118  *)    ac_optarg=yes ;;
1119  esac
1120
1121  # Accept the important Cygnus configure options, so we can diagnose typos.
1122
1123  case $ac_dashdash$ac_option in
1124  --)
1125    ac_dashdash=yes ;;
1126
1127  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1128    ac_prev=bindir ;;
1129  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1130    bindir=$ac_optarg ;;
1131
1132  -build | --build | --buil | --bui | --bu)
1133    ac_prev=build_alias ;;
1134  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1135    build_alias=$ac_optarg ;;
1136
1137  -cache-file | --cache-file | --cache-fil | --cache-fi \
1138  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1139    ac_prev=cache_file ;;
1140  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1141  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1142    cache_file=$ac_optarg ;;
1143
1144  --config-cache | -C)
1145    cache_file=config.cache ;;
1146
1147  -datadir | --datadir | --datadi | --datad)
1148    ac_prev=datadir ;;
1149  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1150    datadir=$ac_optarg ;;
1151
1152  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1153  | --dataroo | --dataro | --datar)
1154    ac_prev=datarootdir ;;
1155  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1156  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1157    datarootdir=$ac_optarg ;;
1158
1159  -disable-* | --disable-*)
1160    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1161    # Reject names that are not valid shell variable names.
1162    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1163      as_fn_error $? "invalid feature name: $ac_useropt"
1164    ac_useropt_orig=$ac_useropt
1165    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1166    case $ac_user_opts in
1167      *"
1168"enable_$ac_useropt"
1169"*) ;;
1170      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1171	 ac_unrecognized_sep=', ';;
1172    esac
1173    eval enable_$ac_useropt=no ;;
1174
1175  -docdir | --docdir | --docdi | --doc | --do)
1176    ac_prev=docdir ;;
1177  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1178    docdir=$ac_optarg ;;
1179
1180  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1181    ac_prev=dvidir ;;
1182  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1183    dvidir=$ac_optarg ;;
1184
1185  -enable-* | --enable-*)
1186    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1187    # Reject names that are not valid shell variable names.
1188    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1189      as_fn_error $? "invalid feature name: $ac_useropt"
1190    ac_useropt_orig=$ac_useropt
1191    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192    case $ac_user_opts in
1193      *"
1194"enable_$ac_useropt"
1195"*) ;;
1196      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1197	 ac_unrecognized_sep=', ';;
1198    esac
1199    eval enable_$ac_useropt=\$ac_optarg ;;
1200
1201  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1202  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1203  | --exec | --exe | --ex)
1204    ac_prev=exec_prefix ;;
1205  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1206  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1207  | --exec=* | --exe=* | --ex=*)
1208    exec_prefix=$ac_optarg ;;
1209
1210  -gas | --gas | --ga | --g)
1211    # Obsolete; use --with-gas.
1212    with_gas=yes ;;
1213
1214  -help | --help | --hel | --he | -h)
1215    ac_init_help=long ;;
1216  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1217    ac_init_help=recursive ;;
1218  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1219    ac_init_help=short ;;
1220
1221  -host | --host | --hos | --ho)
1222    ac_prev=host_alias ;;
1223  -host=* | --host=* | --hos=* | --ho=*)
1224    host_alias=$ac_optarg ;;
1225
1226  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1227    ac_prev=htmldir ;;
1228  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1229  | --ht=*)
1230    htmldir=$ac_optarg ;;
1231
1232  -includedir | --includedir | --includedi | --included | --include \
1233  | --includ | --inclu | --incl | --inc)
1234    ac_prev=includedir ;;
1235  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1236  | --includ=* | --inclu=* | --incl=* | --inc=*)
1237    includedir=$ac_optarg ;;
1238
1239  -infodir | --infodir | --infodi | --infod | --info | --inf)
1240    ac_prev=infodir ;;
1241  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1242    infodir=$ac_optarg ;;
1243
1244  -libdir | --libdir | --libdi | --libd)
1245    ac_prev=libdir ;;
1246  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1247    libdir=$ac_optarg ;;
1248
1249  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1250  | --libexe | --libex | --libe)
1251    ac_prev=libexecdir ;;
1252  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1253  | --libexe=* | --libex=* | --libe=*)
1254    libexecdir=$ac_optarg ;;
1255
1256  -localedir | --localedir | --localedi | --localed | --locale)
1257    ac_prev=localedir ;;
1258  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1259    localedir=$ac_optarg ;;
1260
1261  -localstatedir | --localstatedir | --localstatedi | --localstated \
1262  | --localstate | --localstat | --localsta | --localst | --locals)
1263    ac_prev=localstatedir ;;
1264  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1265  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1266    localstatedir=$ac_optarg ;;
1267
1268  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1269    ac_prev=mandir ;;
1270  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1271    mandir=$ac_optarg ;;
1272
1273  -nfp | --nfp | --nf)
1274    # Obsolete; use --without-fp.
1275    with_fp=no ;;
1276
1277  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1278  | --no-cr | --no-c | -n)
1279    no_create=yes ;;
1280
1281  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1282  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1283    no_recursion=yes ;;
1284
1285  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1286  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1287  | --oldin | --oldi | --old | --ol | --o)
1288    ac_prev=oldincludedir ;;
1289  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1290  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1291  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1292    oldincludedir=$ac_optarg ;;
1293
1294  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1295    ac_prev=prefix ;;
1296  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1297    prefix=$ac_optarg ;;
1298
1299  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1300  | --program-pre | --program-pr | --program-p)
1301    ac_prev=program_prefix ;;
1302  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1303  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1304    program_prefix=$ac_optarg ;;
1305
1306  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1307  | --program-suf | --program-su | --program-s)
1308    ac_prev=program_suffix ;;
1309  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1310  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1311    program_suffix=$ac_optarg ;;
1312
1313  -program-transform-name | --program-transform-name \
1314  | --program-transform-nam | --program-transform-na \
1315  | --program-transform-n | --program-transform- \
1316  | --program-transform | --program-transfor \
1317  | --program-transfo | --program-transf \
1318  | --program-trans | --program-tran \
1319  | --progr-tra | --program-tr | --program-t)
1320    ac_prev=program_transform_name ;;
1321  -program-transform-name=* | --program-transform-name=* \
1322  | --program-transform-nam=* | --program-transform-na=* \
1323  | --program-transform-n=* | --program-transform-=* \
1324  | --program-transform=* | --program-transfor=* \
1325  | --program-transfo=* | --program-transf=* \
1326  | --program-trans=* | --program-tran=* \
1327  | --progr-tra=* | --program-tr=* | --program-t=*)
1328    program_transform_name=$ac_optarg ;;
1329
1330  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1331    ac_prev=pdfdir ;;
1332  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1333    pdfdir=$ac_optarg ;;
1334
1335  -psdir | --psdir | --psdi | --psd | --ps)
1336    ac_prev=psdir ;;
1337  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1338    psdir=$ac_optarg ;;
1339
1340  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1341  | -silent | --silent | --silen | --sile | --sil)
1342    silent=yes ;;
1343
1344  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1345    ac_prev=sbindir ;;
1346  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1347  | --sbi=* | --sb=*)
1348    sbindir=$ac_optarg ;;
1349
1350  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1351  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1352  | --sharedst | --shareds | --shared | --share | --shar \
1353  | --sha | --sh)
1354    ac_prev=sharedstatedir ;;
1355  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1356  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1357  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1358  | --sha=* | --sh=*)
1359    sharedstatedir=$ac_optarg ;;
1360
1361  -site | --site | --sit)
1362    ac_prev=site ;;
1363  -site=* | --site=* | --sit=*)
1364    site=$ac_optarg ;;
1365
1366  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1367    ac_prev=srcdir ;;
1368  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1369    srcdir=$ac_optarg ;;
1370
1371  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1372  | --syscon | --sysco | --sysc | --sys | --sy)
1373    ac_prev=sysconfdir ;;
1374  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1375  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1376    sysconfdir=$ac_optarg ;;
1377
1378  -target | --target | --targe | --targ | --tar | --ta | --t)
1379    ac_prev=target_alias ;;
1380  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1381    target_alias=$ac_optarg ;;
1382
1383  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1384    verbose=yes ;;
1385
1386  -version | --version | --versio | --versi | --vers | -V)
1387    ac_init_version=: ;;
1388
1389  -with-* | --with-*)
1390    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1391    # Reject names that are not valid shell variable names.
1392    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1393      as_fn_error $? "invalid package name: $ac_useropt"
1394    ac_useropt_orig=$ac_useropt
1395    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1396    case $ac_user_opts in
1397      *"
1398"with_$ac_useropt"
1399"*) ;;
1400      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1401	 ac_unrecognized_sep=', ';;
1402    esac
1403    eval with_$ac_useropt=\$ac_optarg ;;
1404
1405  -without-* | --without-*)
1406    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1407    # Reject names that are not valid shell variable names.
1408    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1409      as_fn_error $? "invalid package name: $ac_useropt"
1410    ac_useropt_orig=$ac_useropt
1411    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1412    case $ac_user_opts in
1413      *"
1414"with_$ac_useropt"
1415"*) ;;
1416      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1417	 ac_unrecognized_sep=', ';;
1418    esac
1419    eval with_$ac_useropt=no ;;
1420
1421  --x)
1422    # Obsolete; use --with-x.
1423    with_x=yes ;;
1424
1425  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1426  | --x-incl | --x-inc | --x-in | --x-i)
1427    ac_prev=x_includes ;;
1428  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1429  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1430    x_includes=$ac_optarg ;;
1431
1432  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1433  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1434    ac_prev=x_libraries ;;
1435  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1436  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1437    x_libraries=$ac_optarg ;;
1438
1439  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1440Try \`$0 --help' for more information"
1441    ;;
1442
1443  *=*)
1444    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1445    # Reject names that are not valid shell variable names.
1446    case $ac_envvar in #(
1447      '' | [0-9]* | *[!_$as_cr_alnum]* )
1448      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1449    esac
1450    eval $ac_envvar=\$ac_optarg
1451    export $ac_envvar ;;
1452
1453  *)
1454    # FIXME: should be removed in autoconf 3.0.
1455    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1456    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1457      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1458    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1459    ;;
1460
1461  esac
1462done
1463
1464if test -n "$ac_prev"; then
1465  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1466  as_fn_error $? "missing argument to $ac_option"
1467fi
1468
1469if test -n "$ac_unrecognized_opts"; then
1470  case $enable_option_checking in
1471    no) ;;
1472    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1473    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1474  esac
1475fi
1476
1477# Check all directory arguments for consistency.
1478for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1479		datadir sysconfdir sharedstatedir localstatedir includedir \
1480		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1481		libdir localedir mandir
1482do
1483  eval ac_val=\$$ac_var
1484  # Remove trailing slashes.
1485  case $ac_val in
1486    */ )
1487      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1488      eval $ac_var=\$ac_val;;
1489  esac
1490  # Be sure to have absolute directory names.
1491  case $ac_val in
1492    [\\/$]* | ?:[\\/]* )  continue;;
1493    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1494  esac
1495  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1496done
1497
1498# There might be people who depend on the old broken behavior: `$host'
1499# used to hold the argument of --host etc.
1500# FIXME: To remove some day.
1501build=$build_alias
1502host=$host_alias
1503target=$target_alias
1504
1505# FIXME: To remove some day.
1506if test "x$host_alias" != x; then
1507  if test "x$build_alias" = x; then
1508    cross_compiling=maybe
1509    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1510    If a cross compiler is detected then cross compile mode will be used" >&2
1511  elif test "x$build_alias" != "x$host_alias"; then
1512    cross_compiling=yes
1513  fi
1514fi
1515
1516ac_tool_prefix=
1517test -n "$host_alias" && ac_tool_prefix=$host_alias-
1518
1519test "$silent" = yes && exec 6>/dev/null
1520
1521
1522ac_pwd=`pwd` && test -n "$ac_pwd" &&
1523ac_ls_di=`ls -di .` &&
1524ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1525  as_fn_error $? "working directory cannot be determined"
1526test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1527  as_fn_error $? "pwd does not report name of working directory"
1528
1529
1530# Find the source files, if location was not specified.
1531if test -z "$srcdir"; then
1532  ac_srcdir_defaulted=yes
1533  # Try the directory containing this script, then the parent directory.
1534  ac_confdir=`$as_dirname -- "$as_myself" ||
1535$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1536	 X"$as_myself" : 'X\(//\)[^/]' \| \
1537	 X"$as_myself" : 'X\(//\)$' \| \
1538	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1539$as_echo X"$as_myself" |
1540    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1541	    s//\1/
1542	    q
1543	  }
1544	  /^X\(\/\/\)[^/].*/{
1545	    s//\1/
1546	    q
1547	  }
1548	  /^X\(\/\/\)$/{
1549	    s//\1/
1550	    q
1551	  }
1552	  /^X\(\/\).*/{
1553	    s//\1/
1554	    q
1555	  }
1556	  s/.*/./; q'`
1557  srcdir=$ac_confdir
1558  if test ! -r "$srcdir/$ac_unique_file"; then
1559    srcdir=..
1560  fi
1561else
1562  ac_srcdir_defaulted=no
1563fi
1564if test ! -r "$srcdir/$ac_unique_file"; then
1565  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1566  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1567fi
1568ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1569ac_abs_confdir=`(
1570	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1571	pwd)`
1572# When building in place, set srcdir=.
1573if test "$ac_abs_confdir" = "$ac_pwd"; then
1574  srcdir=.
1575fi
1576# Remove unnecessary trailing slashes from srcdir.
1577# Double slashes in file names in object file debugging info
1578# mess up M-x gdb in Emacs.
1579case $srcdir in
1580*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1581esac
1582for ac_var in $ac_precious_vars; do
1583  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1584  eval ac_env_${ac_var}_value=\$${ac_var}
1585  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1586  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1587done
1588
1589#
1590# Report the --help message.
1591#
1592if test "$ac_init_help" = "long"; then
1593  # Omit some internal or obsolete options to make the list less imposing.
1594  # This message is too long to be a string in the A/UX 3.1 sh.
1595  cat <<_ACEOF
1596\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1597
1598Usage: $0 [OPTION]... [VAR=VALUE]...
1599
1600To assign environment variables (e.g., CC, CFLAGS...), specify them as
1601VAR=VALUE.  See below for descriptions of some of the useful variables.
1602
1603Defaults for the options are specified in brackets.
1604
1605Configuration:
1606  -h, --help              display this help and exit
1607      --help=short        display options specific to this package
1608      --help=recursive    display the short help of all the included packages
1609  -V, --version           display version information and exit
1610  -q, --quiet, --silent   do not print \`checking ...' messages
1611      --cache-file=FILE   cache test results in FILE [disabled]
1612  -C, --config-cache      alias for \`--cache-file=config.cache'
1613  -n, --no-create         do not create output files
1614      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1615
1616Installation directories:
1617  --prefix=PREFIX         install architecture-independent files in PREFIX
1618                          [$ac_default_prefix]
1619  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1620                          [PREFIX]
1621
1622By default, \`make install' will install all the files in
1623\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1624an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1625for instance \`--prefix=\$HOME'.
1626
1627For better control, use the options below.
1628
1629Fine tuning of the installation directories:
1630  --bindir=DIR            user executables [EPREFIX/bin]
1631  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1632  --libexecdir=DIR        program executables [EPREFIX/libexec]
1633  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1634  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1635  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1636  --libdir=DIR            object code libraries [EPREFIX/lib]
1637  --includedir=DIR        C header files [PREFIX/include]
1638  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1639  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1640  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1641  --infodir=DIR           info documentation [DATAROOTDIR/info]
1642  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1643  --mandir=DIR            man documentation [DATAROOTDIR/man]
1644  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1645  --htmldir=DIR           html documentation [DOCDIR]
1646  --dvidir=DIR            dvi documentation [DOCDIR]
1647  --pdfdir=DIR            pdf documentation [DOCDIR]
1648  --psdir=DIR             ps documentation [DOCDIR]
1649_ACEOF
1650
1651  cat <<\_ACEOF
1652
1653X features:
1654  --x-includes=DIR    X include files are in DIR
1655  --x-libraries=DIR   X library files are in DIR
1656
1657System types:
1658  --build=BUILD     configure for building on BUILD [guessed]
1659  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1660  --target=TARGET   configure for building compilers for TARGET [HOST]
1661_ACEOF
1662fi
1663
1664if test -n "$ac_init_help"; then
1665  case $ac_init_help in
1666     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1667   esac
1668  cat <<\_ACEOF
1669
1670Optional Features:
1671  --disable-option-checking  ignore unrecognized --enable/--with options
1672  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1673  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1674  --enable-openjdk-only   suppress building custom source even if present
1675                          [disabled]
1676  --enable-debug          set the debug level to fastdebug (shorthand for
1677                          --with-debug-level=fastdebug) [disabled]
1678  --disable-headful       disable building headful support (graphical UI
1679                          support) [enabled]
1680  --enable-hotspot-test-in-build
1681                          run the Queens test after Hotspot build [disabled]
1682  --enable-unlimited-crypto
1683                          Enable unlimited crypto policy [disabled]
1684  --disable-debug-symbols disable generation of debug symbols [enabled]
1685  --disable-zip-debug-info
1686                          disable zipping of debug-info files [enabled]
1687  --disable-macosx-runtime-support
1688                          disable the use of MacOSX Java runtime support
1689                          framework [enabled]
1690  --enable-sjavac         use sjavac to do fast incremental compiles
1691                          [disabled]
1692  --disable-precompiled-headers
1693                          disable using precompiled headers when compiling C++
1694                          [enabled]
1695  --disable-ccache        disable using ccache to speed up recompilations
1696                          [enabled]
1697
1698Optional Packages:
1699  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1700  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1701  --with-custom-make-dir  use this directory for custom build/make files
1702  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1703                          support it), e.g. --with-target-bits=32 [guessed]
1704  --with-sys-root         pass this sys-root to the compilers and tools (for
1705                          cross-compiling)
1706  --with-tools-dir        search this directory for compilers and tools (for
1707                          cross-compiling)
1708  --with-devkit           use this directory as base for tools-dir and
1709                          sys-root (for cross-compiling)
1710  --with-jdk-variant      JDK variant to build (normal) [normal]
1711  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1712                          client, minimal1, kernel, zero, zeroshark) [server]
1713  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1714                          [release]
1715  --with-conf-name        use this as the name of the configuration [generated
1716                          from important configuration options]
1717  --with-builddeps-conf   use this configuration file for the builddeps
1718  --with-builddeps-server download and use build dependencies from this server
1719                          url
1720  --with-builddeps-dir    store downloaded build dependencies here
1721                          [/localhome/builddeps]
1722  --with-builddeps-group  chgrp the downloaded build dependencies to this
1723                          group
1724  --with-cacerts-file     specify alternative cacerts file
1725  --with-milestone        Set milestone value for build [internal]
1726  --with-build-number     Set build number value for build [b00]
1727  --with-user-release-suffix
1728                          Add a custom string to the version string if build
1729                          number isn't set.[username_builddateb00]
1730  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1731  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1732                          invocations of the Boot JDK, overriding the default
1733                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1734                          -enableassertions"
1735  --with-add-source-root  for each and every source directory, look in this
1736                          additional source root for the same directory; if it
1737                          exists and have files in it, include it in the build
1738  --with-override-source-root
1739                          for each and every source directory, look in this
1740                          override source root for the same directory; if it
1741                          exists, use that directory instead and ignore the
1742                          directory in the original source root
1743  --with-adds-and-overrides
1744                          use the subdirs 'adds' and 'overrides' in the
1745                          specified directory as add-source-root and
1746                          override-source-root
1747  --with-override-langtools
1748                          use this langtools dir for the build
1749  --with-override-corba   use this corba dir for the build
1750  --with-override-jaxp    use this jaxp dir for the build
1751  --with-override-jaxws   use this jaxws dir for the build
1752  --with-override-hotspot use this hotspot dir for the build
1753  --with-override-jdk     use this jdk dir for the build
1754  --with-import-hotspot   import hotspot binaries from this jdk image or
1755                          hotspot build dist dir instead of building from
1756                          source
1757  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1758                          only) [probed]
1759  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1760  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1761                          [probed]
1762  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1763                          [probed]
1764  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1765  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1766  --with-extra-ldflags    extra flags to be used when linking jdk
1767  --with-x                use the X Window System
1768  --with-cups             specify prefix directory for the cups package
1769                          (expecting the headers under PATH/include)
1770  --with-cups-include     specify directory for the cups include files
1771  --with-freetype         specify prefix directory for the freetype2 package
1772                          (expecting the libraries under PATH/lib and the
1773                          headers under PATH/include)
1774  --with-alsa             specify prefix directory for the alsa package
1775                          (expecting the libraries under PATH/lib and the
1776                          headers under PATH/include)
1777  --with-alsa-include     specify directory for the alsa include files
1778  --with-alsa-lib         specify directory for the alsa library
1779  --with-giflib           use giflib from build system or OpenJDK source
1780                          (system, bundled) [bundled]
1781  --with-zlib             use zlib from build system or OpenJDK source
1782                          (system, bundled) [bundled]
1783  --with-stdc++lib=<static>,<dynamic>,<default>
1784                          force linking of the C++ runtime on Linux to either
1785                          static or dynamic, default is static with dynamic as
1786                          fallback
1787  --with-num-cores        number of cores in the build system, e.g.
1788                          --with-num-cores=8 [probed]
1789  --with-memory-size      memory (in MB) available in the build system, e.g.
1790                          --with-memory-size=1024 [probed]
1791  --with-jobs             number of parallel jobs to let make run [calculated
1792                          based on cores and memory]
1793  --with-sjavac-server-java
1794                          use this java binary for running the sjavac
1795                          background server [Boot JDK java]
1796  --with-sjavac-server-cores
1797                          use at most this number of concurrent threads on the
1798                          sjavac server [probed]
1799  --with-ccache-dir       where to store ccache files [~/.ccache]
1800
1801Some influential environment variables:
1802  PKG_CONFIG  path to pkg-config utility
1803  CC          C compiler command
1804  CFLAGS      C compiler flags
1805  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1806              nonstandard directory <lib dir>
1807  LIBS        libraries to pass to the linker, e.g. -l<library>
1808  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1809              you have headers in a nonstandard directory <include dir>
1810  CXX         C++ compiler command
1811  CXXFLAGS    C++ compiler flags
1812  OBJC        Objective C compiler command
1813  OBJCFLAGS   Objective C compiler flags
1814  CPP         C preprocessor
1815  CXXCPP      C++ preprocessor
1816  XMKMF       Path to xmkmf, Makefile generator for X Window System
1817  FREETYPE2_CFLAGS
1818              C compiler flags for FREETYPE2, overriding pkg-config
1819  FREETYPE2_LIBS
1820              linker flags for FREETYPE2, overriding pkg-config
1821  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1822  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1823  LIBFFI_CFLAGS
1824              C compiler flags for LIBFFI, overriding pkg-config
1825  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1826
1827Use these variables to override the choices made by `configure' or to help
1828it to find libraries and programs with nonstandard names/locations.
1829
1830Report bugs to <build-dev@openjdk.java.net>.
1831OpenJDK home page: <http://openjdk.java.net>.
1832_ACEOF
1833ac_status=$?
1834fi
1835
1836if test "$ac_init_help" = "recursive"; then
1837  # If there are subdirs, report their specific --help.
1838  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1839    test -d "$ac_dir" ||
1840      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1841      continue
1842    ac_builddir=.
1843
1844case "$ac_dir" in
1845.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1846*)
1847  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1848  # A ".." for each directory in $ac_dir_suffix.
1849  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1850  case $ac_top_builddir_sub in
1851  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1852  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1853  esac ;;
1854esac
1855ac_abs_top_builddir=$ac_pwd
1856ac_abs_builddir=$ac_pwd$ac_dir_suffix
1857# for backward compatibility:
1858ac_top_builddir=$ac_top_build_prefix
1859
1860case $srcdir in
1861  .)  # We are building in place.
1862    ac_srcdir=.
1863    ac_top_srcdir=$ac_top_builddir_sub
1864    ac_abs_top_srcdir=$ac_pwd ;;
1865  [\\/]* | ?:[\\/]* )  # Absolute name.
1866    ac_srcdir=$srcdir$ac_dir_suffix;
1867    ac_top_srcdir=$srcdir
1868    ac_abs_top_srcdir=$srcdir ;;
1869  *) # Relative name.
1870    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1871    ac_top_srcdir=$ac_top_build_prefix$srcdir
1872    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1873esac
1874ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1875
1876    cd "$ac_dir" || { ac_status=$?; continue; }
1877    # Check for guested configure.
1878    if test -f "$ac_srcdir/configure.gnu"; then
1879      echo &&
1880      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1881    elif test -f "$ac_srcdir/configure"; then
1882      echo &&
1883      $SHELL "$ac_srcdir/configure" --help=recursive
1884    else
1885      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1886    fi || ac_status=$?
1887    cd "$ac_pwd" || { ac_status=$?; break; }
1888  done
1889fi
1890
1891test -n "$ac_init_help" && exit $ac_status
1892if $ac_init_version; then
1893  cat <<\_ACEOF
1894OpenJDK configure jdk8
1895generated by GNU Autoconf 2.67
1896
1897Copyright (C) 2010 Free Software Foundation, Inc.
1898This configure script is free software; the Free Software Foundation
1899gives unlimited permission to copy, distribute and modify it.
1900_ACEOF
1901  exit
1902fi
1903
1904## ------------------------ ##
1905## Autoconf initialization. ##
1906## ------------------------ ##
1907
1908# ac_fn_c_try_compile LINENO
1909# --------------------------
1910# Try to compile conftest.$ac_ext, and return whether this succeeded.
1911ac_fn_c_try_compile ()
1912{
1913  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914  rm -f conftest.$ac_objext
1915  if { { ac_try="$ac_compile"
1916case "(($ac_try" in
1917  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1918  *) ac_try_echo=$ac_try;;
1919esac
1920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1921$as_echo "$ac_try_echo"; } >&5
1922  (eval "$ac_compile") 2>conftest.err
1923  ac_status=$?
1924  if test -s conftest.err; then
1925    grep -v '^ *+' conftest.err >conftest.er1
1926    cat conftest.er1 >&5
1927    mv -f conftest.er1 conftest.err
1928  fi
1929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1930  test $ac_status = 0; } && {
1931	 test -z "$ac_c_werror_flag" ||
1932	 test ! -s conftest.err
1933       } && test -s conftest.$ac_objext; then :
1934  ac_retval=0
1935else
1936  $as_echo "$as_me: failed program was:" >&5
1937sed 's/^/| /' conftest.$ac_ext >&5
1938
1939	ac_retval=1
1940fi
1941  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1942  as_fn_set_status $ac_retval
1943
1944} # ac_fn_c_try_compile
1945
1946# ac_fn_cxx_try_compile LINENO
1947# ----------------------------
1948# Try to compile conftest.$ac_ext, and return whether this succeeded.
1949ac_fn_cxx_try_compile ()
1950{
1951  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952  rm -f conftest.$ac_objext
1953  if { { ac_try="$ac_compile"
1954case "(($ac_try" in
1955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956  *) ac_try_echo=$ac_try;;
1957esac
1958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959$as_echo "$ac_try_echo"; } >&5
1960  (eval "$ac_compile") 2>conftest.err
1961  ac_status=$?
1962  if test -s conftest.err; then
1963    grep -v '^ *+' conftest.err >conftest.er1
1964    cat conftest.er1 >&5
1965    mv -f conftest.er1 conftest.err
1966  fi
1967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968  test $ac_status = 0; } && {
1969	 test -z "$ac_cxx_werror_flag" ||
1970	 test ! -s conftest.err
1971       } && test -s conftest.$ac_objext; then :
1972  ac_retval=0
1973else
1974  $as_echo "$as_me: failed program was:" >&5
1975sed 's/^/| /' conftest.$ac_ext >&5
1976
1977	ac_retval=1
1978fi
1979  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1980  as_fn_set_status $ac_retval
1981
1982} # ac_fn_cxx_try_compile
1983
1984# ac_fn_objc_try_compile LINENO
1985# -----------------------------
1986# Try to compile conftest.$ac_ext, and return whether this succeeded.
1987ac_fn_objc_try_compile ()
1988{
1989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990  rm -f conftest.$ac_objext
1991  if { { ac_try="$ac_compile"
1992case "(($ac_try" in
1993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1994  *) ac_try_echo=$ac_try;;
1995esac
1996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1997$as_echo "$ac_try_echo"; } >&5
1998  (eval "$ac_compile") 2>conftest.err
1999  ac_status=$?
2000  if test -s conftest.err; then
2001    grep -v '^ *+' conftest.err >conftest.er1
2002    cat conftest.er1 >&5
2003    mv -f conftest.er1 conftest.err
2004  fi
2005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2006  test $ac_status = 0; } && {
2007	 test -z "$ac_objc_werror_flag" ||
2008	 test ! -s conftest.err
2009       } && test -s conftest.$ac_objext; then :
2010  ac_retval=0
2011else
2012  $as_echo "$as_me: failed program was:" >&5
2013sed 's/^/| /' conftest.$ac_ext >&5
2014
2015	ac_retval=1
2016fi
2017  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2018  as_fn_set_status $ac_retval
2019
2020} # ac_fn_objc_try_compile
2021
2022# ac_fn_c_try_cpp LINENO
2023# ----------------------
2024# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2025ac_fn_c_try_cpp ()
2026{
2027  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028  if { { ac_try="$ac_cpp conftest.$ac_ext"
2029case "(($ac_try" in
2030  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2031  *) ac_try_echo=$ac_try;;
2032esac
2033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2034$as_echo "$ac_try_echo"; } >&5
2035  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2036  ac_status=$?
2037  if test -s conftest.err; then
2038    grep -v '^ *+' conftest.err >conftest.er1
2039    cat conftest.er1 >&5
2040    mv -f conftest.er1 conftest.err
2041  fi
2042  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2043  test $ac_status = 0; } > conftest.i && {
2044	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2045	 test ! -s conftest.err
2046       }; then :
2047  ac_retval=0
2048else
2049  $as_echo "$as_me: failed program was:" >&5
2050sed 's/^/| /' conftest.$ac_ext >&5
2051
2052    ac_retval=1
2053fi
2054  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2055  as_fn_set_status $ac_retval
2056
2057} # ac_fn_c_try_cpp
2058
2059# ac_fn_cxx_try_cpp LINENO
2060# ------------------------
2061# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2062ac_fn_cxx_try_cpp ()
2063{
2064  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065  if { { ac_try="$ac_cpp conftest.$ac_ext"
2066case "(($ac_try" in
2067  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2068  *) ac_try_echo=$ac_try;;
2069esac
2070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2071$as_echo "$ac_try_echo"; } >&5
2072  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2073  ac_status=$?
2074  if test -s conftest.err; then
2075    grep -v '^ *+' conftest.err >conftest.er1
2076    cat conftest.er1 >&5
2077    mv -f conftest.er1 conftest.err
2078  fi
2079  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2080  test $ac_status = 0; } > conftest.i && {
2081	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2082	 test ! -s conftest.err
2083       }; then :
2084  ac_retval=0
2085else
2086  $as_echo "$as_me: failed program was:" >&5
2087sed 's/^/| /' conftest.$ac_ext >&5
2088
2089    ac_retval=1
2090fi
2091  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2092  as_fn_set_status $ac_retval
2093
2094} # ac_fn_cxx_try_cpp
2095
2096# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2097# ---------------------------------------------------------
2098# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2099# the include files in INCLUDES and setting the cache variable VAR
2100# accordingly.
2101ac_fn_cxx_check_header_mongrel ()
2102{
2103  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104  if eval "test \"\${$3+set}\"" = set; then :
2105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2106$as_echo_n "checking for $2... " >&6; }
2107if eval "test \"\${$3+set}\"" = set; then :
2108  $as_echo_n "(cached) " >&6
2109fi
2110eval ac_res=\$$3
2111	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2112$as_echo "$ac_res" >&6; }
2113else
2114  # Is the header compilable?
2115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2116$as_echo_n "checking $2 usability... " >&6; }
2117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h.  */
2119$4
2120#include <$2>
2121_ACEOF
2122if ac_fn_cxx_try_compile "$LINENO"; then :
2123  ac_header_compiler=yes
2124else
2125  ac_header_compiler=no
2126fi
2127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2129$as_echo "$ac_header_compiler" >&6; }
2130
2131# Is the header present?
2132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2133$as_echo_n "checking $2 presence... " >&6; }
2134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h.  */
2136#include <$2>
2137_ACEOF
2138if ac_fn_cxx_try_cpp "$LINENO"; then :
2139  ac_header_preproc=yes
2140else
2141  ac_header_preproc=no
2142fi
2143rm -f conftest.err conftest.i conftest.$ac_ext
2144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2145$as_echo "$ac_header_preproc" >&6; }
2146
2147# So?  What about this header?
2148case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2149  yes:no: )
2150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2151$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2153$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2154    ;;
2155  no:yes:* )
2156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2157$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2159$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2161$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2163$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2165$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2166( $as_echo "## ----------------------------------------- ##
2167## Report this to build-dev@openjdk.java.net ##
2168## ----------------------------------------- ##"
2169     ) | sed "s/^/$as_me: WARNING:     /" >&2
2170    ;;
2171esac
2172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
2174if eval "test \"\${$3+set}\"" = set; then :
2175  $as_echo_n "(cached) " >&6
2176else
2177  eval "$3=\$ac_header_compiler"
2178fi
2179eval ac_res=\$$3
2180	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181$as_echo "$ac_res" >&6; }
2182fi
2183  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2184
2185} # ac_fn_cxx_check_header_mongrel
2186
2187# ac_fn_cxx_try_run LINENO
2188# ------------------------
2189# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2190# that executables *can* be run.
2191ac_fn_cxx_try_run ()
2192{
2193  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2194  if { { ac_try="$ac_link"
2195case "(($ac_try" in
2196  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2197  *) ac_try_echo=$ac_try;;
2198esac
2199eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2200$as_echo "$ac_try_echo"; } >&5
2201  (eval "$ac_link") 2>&5
2202  ac_status=$?
2203  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2204  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2205  { { case "(($ac_try" in
2206  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2207  *) ac_try_echo=$ac_try;;
2208esac
2209eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2210$as_echo "$ac_try_echo"; } >&5
2211  (eval "$ac_try") 2>&5
2212  ac_status=$?
2213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2214  test $ac_status = 0; }; }; then :
2215  ac_retval=0
2216else
2217  $as_echo "$as_me: program exited with status $ac_status" >&5
2218       $as_echo "$as_me: failed program was:" >&5
2219sed 's/^/| /' conftest.$ac_ext >&5
2220
2221       ac_retval=$ac_status
2222fi
2223  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2224  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2225  as_fn_set_status $ac_retval
2226
2227} # ac_fn_cxx_try_run
2228
2229# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2230# ---------------------------------------------------------
2231# Tests whether HEADER exists and can be compiled using the include files in
2232# INCLUDES, setting the cache variable VAR accordingly.
2233ac_fn_cxx_check_header_compile ()
2234{
2235  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2237$as_echo_n "checking for $2... " >&6; }
2238if eval "test \"\${$3+set}\"" = set; then :
2239  $as_echo_n "(cached) " >&6
2240else
2241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h.  */
2243$4
2244#include <$2>
2245_ACEOF
2246if ac_fn_cxx_try_compile "$LINENO"; then :
2247  eval "$3=yes"
2248else
2249  eval "$3=no"
2250fi
2251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2252fi
2253eval ac_res=\$$3
2254	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2255$as_echo "$ac_res" >&6; }
2256  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2257
2258} # ac_fn_cxx_check_header_compile
2259
2260# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2261# ----------------------------------------------
2262# Tries to find the compile-time value of EXPR in a program that includes
2263# INCLUDES, setting VAR accordingly. Returns whether the value could be
2264# computed
2265ac_fn_cxx_compute_int ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  if test "$cross_compiling" = yes; then
2269    # Depending upon the size, compute the lo and hi bounds.
2270cat 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_lo=0 ac_mid=0
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_hi=$ac_mid; break
2301else
2302  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2303			if test $ac_lo -le $ac_mid; then
2304			  ac_lo= ac_hi=
2305			  break
2306			fi
2307			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2308fi
2309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310  done
2311else
2312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h.  */
2314$4
2315int
2316main ()
2317{
2318static int test_array [1 - 2 * !(($2) < 0)];
2319test_array [0] = 0
2320
2321  ;
2322  return 0;
2323}
2324_ACEOF
2325if ac_fn_cxx_try_compile "$LINENO"; then :
2326  ac_hi=-1 ac_mid=-1
2327  while :; do
2328    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h.  */
2330$4
2331int
2332main ()
2333{
2334static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2335test_array [0] = 0
2336
2337  ;
2338  return 0;
2339}
2340_ACEOF
2341if ac_fn_cxx_try_compile "$LINENO"; then :
2342  ac_lo=$ac_mid; break
2343else
2344  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2345			if test $ac_mid -le $ac_hi; then
2346			  ac_lo= ac_hi=
2347			  break
2348			fi
2349			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2350fi
2351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2352  done
2353else
2354  ac_lo= ac_hi=
2355fi
2356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359# Binary search between lo and hi bounds.
2360while test "x$ac_lo" != "x$ac_hi"; do
2361  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363/* end confdefs.h.  */
2364$4
2365int
2366main ()
2367{
2368static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2369test_array [0] = 0
2370
2371  ;
2372  return 0;
2373}
2374_ACEOF
2375if ac_fn_cxx_try_compile "$LINENO"; then :
2376  ac_hi=$ac_mid
2377else
2378  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2379fi
2380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2381done
2382case $ac_lo in #((
2383?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2384'') ac_retval=1 ;;
2385esac
2386  else
2387    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388/* end confdefs.h.  */
2389$4
2390static long int longval () { return $2; }
2391static unsigned long int ulongval () { return $2; }
2392#include <stdio.h>
2393#include <stdlib.h>
2394int
2395main ()
2396{
2397
2398  FILE *f = fopen ("conftest.val", "w");
2399  if (! f)
2400    return 1;
2401  if (($2) < 0)
2402    {
2403      long int i = longval ();
2404      if (i != ($2))
2405	return 1;
2406      fprintf (f, "%ld", i);
2407    }
2408  else
2409    {
2410      unsigned long int i = ulongval ();
2411      if (i != ($2))
2412	return 1;
2413      fprintf (f, "%lu", i);
2414    }
2415  /* Do not output a trailing newline, as this causes \r\n confusion
2416     on some platforms.  */
2417  return ferror (f) || fclose (f) != 0;
2418
2419  ;
2420  return 0;
2421}
2422_ACEOF
2423if ac_fn_cxx_try_run "$LINENO"; then :
2424  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2425else
2426  ac_retval=1
2427fi
2428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2429  conftest.$ac_objext conftest.beam conftest.$ac_ext
2430rm -f conftest.val
2431
2432  fi
2433  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2434  as_fn_set_status $ac_retval
2435
2436} # ac_fn_cxx_compute_int
2437
2438# ac_fn_cxx_try_link LINENO
2439# -------------------------
2440# Try to link conftest.$ac_ext, and return whether this succeeded.
2441ac_fn_cxx_try_link ()
2442{
2443  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2444  rm -f conftest.$ac_objext conftest$ac_exeext
2445  if { { ac_try="$ac_link"
2446case "(($ac_try" in
2447  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2448  *) ac_try_echo=$ac_try;;
2449esac
2450eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2451$as_echo "$ac_try_echo"; } >&5
2452  (eval "$ac_link") 2>conftest.err
2453  ac_status=$?
2454  if test -s conftest.err; then
2455    grep -v '^ *+' conftest.err >conftest.er1
2456    cat conftest.er1 >&5
2457    mv -f conftest.er1 conftest.err
2458  fi
2459  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2460  test $ac_status = 0; } && {
2461	 test -z "$ac_cxx_werror_flag" ||
2462	 test ! -s conftest.err
2463       } && test -s conftest$ac_exeext && {
2464	 test "$cross_compiling" = yes ||
2465	 $as_test_x conftest$ac_exeext
2466       }; then :
2467  ac_retval=0
2468else
2469  $as_echo "$as_me: failed program was:" >&5
2470sed 's/^/| /' conftest.$ac_ext >&5
2471
2472	ac_retval=1
2473fi
2474  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2475  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2476  # interfere with the next link command; also delete a directory that is
2477  # left behind by Apple's compiler.  We do this before executing the actions.
2478  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2479  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2480  as_fn_set_status $ac_retval
2481
2482} # ac_fn_cxx_try_link
2483
2484# ac_fn_cxx_check_func LINENO FUNC VAR
2485# ------------------------------------
2486# Tests whether FUNC exists, setting the cache variable VAR accordingly
2487ac_fn_cxx_check_func ()
2488{
2489  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2491$as_echo_n "checking for $2... " >&6; }
2492if eval "test \"\${$3+set}\"" = set; then :
2493  $as_echo_n "(cached) " >&6
2494else
2495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2496/* end confdefs.h.  */
2497/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2498   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2499#define $2 innocuous_$2
2500
2501/* System header to define __stub macros and hopefully few prototypes,
2502    which can conflict with char $2 (); below.
2503    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2504    <limits.h> exists even on freestanding compilers.  */
2505
2506#ifdef __STDC__
2507# include <limits.h>
2508#else
2509# include <assert.h>
2510#endif
2511
2512#undef $2
2513
2514/* Override any GCC internal prototype to avoid an error.
2515   Use char because int might match the return type of a GCC
2516   builtin and then its argument prototype would still apply.  */
2517#ifdef __cplusplus
2518extern "C"
2519#endif
2520char $2 ();
2521/* The GNU C library defines this for functions which it implements
2522    to always fail with ENOSYS.  Some functions are actually named
2523    something starting with __ and the normal name is an alias.  */
2524#if defined __stub_$2 || defined __stub___$2
2525choke me
2526#endif
2527
2528int
2529main ()
2530{
2531return $2 ();
2532  ;
2533  return 0;
2534}
2535_ACEOF
2536if ac_fn_cxx_try_link "$LINENO"; then :
2537  eval "$3=yes"
2538else
2539  eval "$3=no"
2540fi
2541rm -f core conftest.err conftest.$ac_objext \
2542    conftest$ac_exeext conftest.$ac_ext
2543fi
2544eval ac_res=\$$3
2545	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2546$as_echo "$ac_res" >&6; }
2547  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2548
2549} # ac_fn_cxx_check_func
2550
2551# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2552# -------------------------------------------------------
2553# Tests whether HEADER exists and can be compiled using the include files in
2554# INCLUDES, setting the cache variable VAR accordingly.
2555ac_fn_c_check_header_compile ()
2556{
2557  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2559$as_echo_n "checking for $2... " >&6; }
2560if eval "test \"\${$3+set}\"" = set; then :
2561  $as_echo_n "(cached) " >&6
2562else
2563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564/* end confdefs.h.  */
2565$4
2566#include <$2>
2567_ACEOF
2568if ac_fn_c_try_compile "$LINENO"; then :
2569  eval "$3=yes"
2570else
2571  eval "$3=no"
2572fi
2573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2574fi
2575eval ac_res=\$$3
2576	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2577$as_echo "$ac_res" >&6; }
2578  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2579
2580} # ac_fn_c_check_header_compile
2581cat >config.log <<_ACEOF
2582This file contains any messages produced by compilers while
2583running configure, to aid debugging if configure makes a mistake.
2584
2585It was created by OpenJDK $as_me jdk8, which was
2586generated by GNU Autoconf 2.67.  Invocation command line was
2587
2588  $ $0 $@
2589
2590_ACEOF
2591exec 5>>config.log
2592{
2593cat <<_ASUNAME
2594## --------- ##
2595## Platform. ##
2596## --------- ##
2597
2598hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2599uname -m = `(uname -m) 2>/dev/null || echo unknown`
2600uname -r = `(uname -r) 2>/dev/null || echo unknown`
2601uname -s = `(uname -s) 2>/dev/null || echo unknown`
2602uname -v = `(uname -v) 2>/dev/null || echo unknown`
2603
2604/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2605/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2606
2607/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2608/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2609/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2610/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2611/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2612/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2613/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2614
2615_ASUNAME
2616
2617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2618for as_dir in $PATH
2619do
2620  IFS=$as_save_IFS
2621  test -z "$as_dir" && as_dir=.
2622    $as_echo "PATH: $as_dir"
2623  done
2624IFS=$as_save_IFS
2625
2626} >&5
2627
2628cat >&5 <<_ACEOF
2629
2630
2631## ----------- ##
2632## Core tests. ##
2633## ----------- ##
2634
2635_ACEOF
2636
2637
2638# Keep a trace of the command line.
2639# Strip out --no-create and --no-recursion so they do not pile up.
2640# Strip out --silent because we don't want to record it for future runs.
2641# Also quote any args containing shell meta-characters.
2642# Make two passes to allow for proper duplicate-argument suppression.
2643ac_configure_args=
2644ac_configure_args0=
2645ac_configure_args1=
2646ac_must_keep_next=false
2647for ac_pass in 1 2
2648do
2649  for ac_arg
2650  do
2651    case $ac_arg in
2652    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2653    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2654    | -silent | --silent | --silen | --sile | --sil)
2655      continue ;;
2656    *\'*)
2657      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2658    esac
2659    case $ac_pass in
2660    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2661    2)
2662      as_fn_append ac_configure_args1 " '$ac_arg'"
2663      if test $ac_must_keep_next = true; then
2664	ac_must_keep_next=false # Got value, back to normal.
2665      else
2666	case $ac_arg in
2667	  *=* | --config-cache | -C | -disable-* | --disable-* \
2668	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2669	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2670	  | -with-* | --with-* | -without-* | --without-* | --x)
2671	    case "$ac_configure_args0 " in
2672	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2673	    esac
2674	    ;;
2675	  -* ) ac_must_keep_next=true ;;
2676	esac
2677      fi
2678      as_fn_append ac_configure_args " '$ac_arg'"
2679      ;;
2680    esac
2681  done
2682done
2683{ ac_configure_args0=; unset ac_configure_args0;}
2684{ ac_configure_args1=; unset ac_configure_args1;}
2685
2686# When interrupted or exit'd, cleanup temporary files, and complete
2687# config.log.  We remove comments because anyway the quotes in there
2688# would cause problems or look ugly.
2689# WARNING: Use '\'' to represent an apostrophe within the trap.
2690# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2691trap 'exit_status=$?
2692  # Save into config.log some information that might help in debugging.
2693  {
2694    echo
2695
2696    $as_echo "## ---------------- ##
2697## Cache variables. ##
2698## ---------------- ##"
2699    echo
2700    # The following way of writing the cache mishandles newlines in values,
2701(
2702  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2703    eval ac_val=\$$ac_var
2704    case $ac_val in #(
2705    *${as_nl}*)
2706      case $ac_var in #(
2707      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2708$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2709      esac
2710      case $ac_var in #(
2711      _ | IFS | as_nl) ;; #(
2712      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2713      *) { eval $ac_var=; unset $ac_var;} ;;
2714      esac ;;
2715    esac
2716  done
2717  (set) 2>&1 |
2718    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2719    *${as_nl}ac_space=\ *)
2720      sed -n \
2721	"s/'\''/'\''\\\\'\'''\''/g;
2722	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2723      ;; #(
2724    *)
2725      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2726      ;;
2727    esac |
2728    sort
2729)
2730    echo
2731
2732    $as_echo "## ----------------- ##
2733## Output variables. ##
2734## ----------------- ##"
2735    echo
2736    for ac_var in $ac_subst_vars
2737    do
2738      eval ac_val=\$$ac_var
2739      case $ac_val in
2740      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2741      esac
2742      $as_echo "$ac_var='\''$ac_val'\''"
2743    done | sort
2744    echo
2745
2746    if test -n "$ac_subst_files"; then
2747      $as_echo "## ------------------- ##
2748## File substitutions. ##
2749## ------------------- ##"
2750      echo
2751      for ac_var in $ac_subst_files
2752      do
2753	eval ac_val=\$$ac_var
2754	case $ac_val in
2755	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2756	esac
2757	$as_echo "$ac_var='\''$ac_val'\''"
2758      done | sort
2759      echo
2760    fi
2761
2762    if test -s confdefs.h; then
2763      $as_echo "## ----------- ##
2764## confdefs.h. ##
2765## ----------- ##"
2766      echo
2767      cat confdefs.h
2768      echo
2769    fi
2770    test "$ac_signal" != 0 &&
2771      $as_echo "$as_me: caught signal $ac_signal"
2772    $as_echo "$as_me: exit $exit_status"
2773  } >&5
2774  rm -f core *.core core.conftest.* &&
2775    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2776    exit $exit_status
2777' 0
2778for ac_signal in 1 2 13 15; do
2779  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2780done
2781ac_signal=0
2782
2783# confdefs.h avoids OS command line length limits that DEFS can exceed.
2784rm -f -r conftest* confdefs.h
2785
2786$as_echo "/* confdefs.h */" > confdefs.h
2787
2788# Predefined preprocessor variables.
2789
2790cat >>confdefs.h <<_ACEOF
2791#define PACKAGE_NAME "$PACKAGE_NAME"
2792_ACEOF
2793
2794cat >>confdefs.h <<_ACEOF
2795#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2796_ACEOF
2797
2798cat >>confdefs.h <<_ACEOF
2799#define PACKAGE_VERSION "$PACKAGE_VERSION"
2800_ACEOF
2801
2802cat >>confdefs.h <<_ACEOF
2803#define PACKAGE_STRING "$PACKAGE_STRING"
2804_ACEOF
2805
2806cat >>confdefs.h <<_ACEOF
2807#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2808_ACEOF
2809
2810cat >>confdefs.h <<_ACEOF
2811#define PACKAGE_URL "$PACKAGE_URL"
2812_ACEOF
2813
2814
2815# Let the site file select an alternate cache file if it wants to.
2816# Prefer an explicitly selected file to automatically selected ones.
2817ac_site_file1=NONE
2818ac_site_file2=NONE
2819if test -n "$CONFIG_SITE"; then
2820  # We do not want a PATH search for config.site.
2821  case $CONFIG_SITE in #((
2822    -*)  ac_site_file1=./$CONFIG_SITE;;
2823    */*) ac_site_file1=$CONFIG_SITE;;
2824    *)   ac_site_file1=./$CONFIG_SITE;;
2825  esac
2826elif test "x$prefix" != xNONE; then
2827  ac_site_file1=$prefix/share/config.site
2828  ac_site_file2=$prefix/etc/config.site
2829else
2830  ac_site_file1=$ac_default_prefix/share/config.site
2831  ac_site_file2=$ac_default_prefix/etc/config.site
2832fi
2833for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2834do
2835  test "x$ac_site_file" = xNONE && continue
2836  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2837    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2838$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2839    sed 's/^/| /' "$ac_site_file" >&5
2840    . "$ac_site_file" \
2841      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2843as_fn_error $? "failed to load site script $ac_site_file
2844See \`config.log' for more details" "$LINENO" 5 ; }
2845  fi
2846done
2847
2848if test -r "$cache_file"; then
2849  # Some versions of bash will fail to source /dev/null (special files
2850  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2851  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2852    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2853$as_echo "$as_me: loading cache $cache_file" >&6;}
2854    case $cache_file in
2855      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2856      *)                      . "./$cache_file";;
2857    esac
2858  fi
2859else
2860  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2861$as_echo "$as_me: creating cache $cache_file" >&6;}
2862  >$cache_file
2863fi
2864
2865# Check that the precious variables saved in the cache have kept the same
2866# value.
2867ac_cache_corrupted=false
2868for ac_var in $ac_precious_vars; do
2869  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2870  eval ac_new_set=\$ac_env_${ac_var}_set
2871  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2872  eval ac_new_val=\$ac_env_${ac_var}_value
2873  case $ac_old_set,$ac_new_set in
2874    set,)
2875      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2876$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2877      ac_cache_corrupted=: ;;
2878    ,set)
2879      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2880$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2881      ac_cache_corrupted=: ;;
2882    ,);;
2883    *)
2884      if test "x$ac_old_val" != "x$ac_new_val"; then
2885	# differences in whitespace do not lead to failure.
2886	ac_old_val_w=`echo x $ac_old_val`
2887	ac_new_val_w=`echo x $ac_new_val`
2888	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2889	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2890$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2891	  ac_cache_corrupted=:
2892	else
2893	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2894$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2895	  eval $ac_var=\$ac_old_val
2896	fi
2897	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2898$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2899	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2900$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2901      fi;;
2902  esac
2903  # Pass precious variables to config.status.
2904  if test "$ac_new_set" = set; then
2905    case $ac_new_val in
2906    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2907    *) ac_arg=$ac_var=$ac_new_val ;;
2908    esac
2909    case " $ac_configure_args " in
2910      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2911      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2912    esac
2913  fi
2914done
2915if $ac_cache_corrupted; then
2916  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2918  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2919$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2920  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2921fi
2922## -------------------- ##
2923## Main body of script. ##
2924## -------------------- ##
2925
2926ac_ext=c
2927ac_cpp='$CPP $CPPFLAGS'
2928ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2929ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2930ac_compiler_gnu=$ac_cv_c_compiler_gnu
2931
2932
2933
2934ac_aux_dir=
2935for ac_dir in build-aux "$srcdir"/build-aux; do
2936  if test -f "$ac_dir/install-sh"; then
2937    ac_aux_dir=$ac_dir
2938    ac_install_sh="$ac_aux_dir/install-sh -c"
2939    break
2940  elif test -f "$ac_dir/install.sh"; then
2941    ac_aux_dir=$ac_dir
2942    ac_install_sh="$ac_aux_dir/install.sh -c"
2943    break
2944  elif test -f "$ac_dir/shtool"; then
2945    ac_aux_dir=$ac_dir
2946    ac_install_sh="$ac_aux_dir/shtool install -c"
2947    break
2948  fi
2949done
2950if test -z "$ac_aux_dir"; then
2951  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2952fi
2953
2954# These three variables are undocumented and unsupported,
2955# and are intended to be withdrawn in a future Autoconf release.
2956# They can cause serious problems if a builder's source tree is in a directory
2957# whose full name contains unusual characters.
2958ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2959ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2960ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2961
2962
2963# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2964
2965#
2966# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2967# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2968#
2969# This code is free software; you can redistribute it and/or modify it
2970# under the terms of the GNU General Public License version 2 only, as
2971# published by the Free Software Foundation.  Oracle designates this
2972# particular file as subject to the "Classpath" exception as provided
2973# by Oracle in the LICENSE file that accompanied this code.
2974#
2975# This code is distributed in the hope that it will be useful, but WITHOUT
2976# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2977# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2978# version 2 for more details (a copy is included in the LICENSE file that
2979# accompanied this code).
2980#
2981# You should have received a copy of the GNU General Public License version
2982# 2 along with this work; if not, write to the Free Software Foundation,
2983# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2984#
2985# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2986# or visit www.oracle.com if you need additional information or have any
2987# questions.
2988#
2989
2990#
2991# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2992#
2993# This program is free software; you can redistribute it and/or modify
2994# it under the terms of the GNU General Public License as published by
2995# the Free Software Foundation; either version 2 of the License, or
2996# (at your option) any later version.
2997#
2998# This program is distributed in the hope that it will be useful, but
2999# WITHOUT ANY WARRANTY; without even the implied warranty of
3000# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3001# General Public License for more details.
3002#
3003# You should have received a copy of the GNU General Public License
3004# along with this program; if not, write to the Free Software
3005# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3006#
3007# As a special exception to the GNU General Public License, if you
3008# distribute this file as part of a program that contains a
3009# configuration script generated by Autoconf, you may include it under
3010# the same distribution terms that you use for the rest of that program.
3011
3012# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3013# ----------------------------------
3014# PKG_PROG_PKG_CONFIG
3015
3016# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3017#
3018# Check to see whether a particular set of modules exists.  Similar
3019# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3020#
3021#
3022# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3023# this or PKG_CHECK_MODULES is called, or make sure to call
3024# PKG_CHECK_EXISTS manually
3025# --------------------------------------------------------------
3026
3027
3028
3029# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3030# ---------------------------------------------
3031# _PKG_CONFIG
3032
3033# _PKG_SHORT_ERRORS_SUPPORTED
3034# -----------------------------
3035# _PKG_SHORT_ERRORS_SUPPORTED
3036
3037
3038# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3039# [ACTION-IF-NOT-FOUND])
3040#
3041#
3042# Note that if there is a possibility the first call to
3043# PKG_CHECK_MODULES might not happen, you should be sure to include an
3044# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3045#
3046#
3047# --------------------------------------------------------------
3048# PKG_CHECK_MODULES
3049
3050
3051# Include these first...
3052#
3053# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3054# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3055#
3056# This code is free software; you can redistribute it and/or modify it
3057# under the terms of the GNU General Public License version 2 only, as
3058# published by the Free Software Foundation.  Oracle designates this
3059# particular file as subject to the "Classpath" exception as provided
3060# by Oracle in the LICENSE file that accompanied this code.
3061#
3062# This code is distributed in the hope that it will be useful, but WITHOUT
3063# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3064# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3065# version 2 for more details (a copy is included in the LICENSE file that
3066# accompanied this code).
3067#
3068# You should have received a copy of the GNU General Public License version
3069# 2 along with this work; if not, write to the Free Software Foundation,
3070# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3071#
3072# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3073# or visit www.oracle.com if you need additional information or have any
3074# questions.
3075#
3076
3077
3078
3079# This will make sure the given variable points to a full and proper
3080# path. This means:
3081# 1) There will be no spaces in the path. On posix platforms,
3082#    spaces in the path will result in an error. On Windows,
3083#    the path will be rewritten using short-style to be space-free.
3084# 2) The path will be absolute, and it will be in unix-style (on
3085#     cygwin).
3086# $1: The name of the variable to fix
3087
3088
3089# This will make sure the given variable points to a executable
3090# with a full and proper path. This means:
3091# 1) There will be no spaces in the path. On posix platforms,
3092#    spaces in the path will result in an error. On Windows,
3093#    the path will be rewritten using short-style to be space-free.
3094# 2) The path will be absolute, and it will be in unix-style (on
3095#     cygwin).
3096# Any arguments given to the executable is preserved.
3097# If the input variable does not have a directory specification, then
3098# it need to be in the PATH.
3099# $1: The name of the variable to fix
3100
3101
3102
3103
3104
3105
3106# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3107# $1: variable to check
3108# $2: executable name to print in warning (optional)
3109
3110
3111# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3112# Arguments as AC_PATH_PROG:
3113# $1: variable to set
3114# $2: executable name to look for
3115
3116
3117# Setup the most fundamental tools that relies on not much else to set up,
3118# but is used by much of the early bootstrap code.
3119
3120
3121# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3122
3123
3124
3125
3126
3127
3128
3129#%%% Simple tools %%%
3130
3131# Check if we have found a usable version of make
3132# $1: the path to a potential make binary (or empty)
3133# $2: the description on how we found this
3134
3135
3136# Goes looking for a usable version of GNU make.
3137
3138
3139
3140
3141
3142
3143# Check if build directory is on local disk. If not possible to determine,
3144# we prefer to claim it's local.
3145# Argument 1: directory to test
3146# Argument 2: what to do if it is on local disk
3147# Argument 3: what to do otherwise (remote disk or failure)
3148
3149
3150# Check that source files have basic read permissions set. This might
3151# not be the case in cygwin in certain conditions.
3152
3153
3154
3155
3156#
3157# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3158# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3159#
3160# This code is free software; you can redistribute it and/or modify it
3161# under the terms of the GNU General Public License version 2 only, as
3162# published by the Free Software Foundation.  Oracle designates this
3163# particular file as subject to the "Classpath" exception as provided
3164# by Oracle in the LICENSE file that accompanied this code.
3165#
3166# This code is distributed in the hope that it will be useful, but WITHOUT
3167# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3168# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3169# version 2 for more details (a copy is included in the LICENSE file that
3170# accompanied this code).
3171#
3172# You should have received a copy of the GNU General Public License version
3173# 2 along with this work; if not, write to the Free Software Foundation,
3174# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3175#
3176# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3177# or visit www.oracle.com if you need additional information or have any
3178# questions.
3179#
3180
3181
3182
3183
3184
3185# Helper function which possibly converts a path using DOS-style short mode.
3186# If so, the updated path is stored in $new_path.
3187# $1: The path to check
3188
3189
3190# Helper function which possibly converts a path using DOS-style short mode.
3191# If so, the updated path is stored in $new_path.
3192# $1: The path to check
3193
3194
3195# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3196# and could probably be heavily simplified. However, all changes in this
3197# area tend to need lot of testing in different scenarios, and in lack of
3198# proper unit testing, cleaning this up has not been deemed worth the effort
3199# at the moment.
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3210
3211
3212
3213
3214#
3215# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3216# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3217#
3218# This code is free software; you can redistribute it and/or modify it
3219# under the terms of the GNU General Public License version 2 only, as
3220# published by the Free Software Foundation.  Oracle designates this
3221# particular file as subject to the "Classpath" exception as provided
3222# by Oracle in the LICENSE file that accompanied this code.
3223#
3224# This code is distributed in the hope that it will be useful, but WITHOUT
3225# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3226# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3227# version 2 for more details (a copy is included in the LICENSE file that
3228# accompanied this code).
3229#
3230# You should have received a copy of the GNU General Public License version
3231# 2 along with this work; if not, write to the Free Software Foundation,
3232# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3233#
3234# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3235# or visit www.oracle.com if you need additional information or have any
3236# questions.
3237#
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249# ... then the rest
3250#
3251# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3252# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3253#
3254# This code is free software; you can redistribute it and/or modify it
3255# under the terms of the GNU General Public License version 2 only, as
3256# published by the Free Software Foundation.  Oracle designates this
3257# particular file as subject to the "Classpath" exception as provided
3258# by Oracle in the LICENSE file that accompanied this code.
3259#
3260# This code is distributed in the hope that it will be useful, but WITHOUT
3261# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3262# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3263# version 2 for more details (a copy is included in the LICENSE file that
3264# accompanied this code).
3265#
3266# You should have received a copy of the GNU General Public License version
3267# 2 along with this work; if not, write to the Free Software Foundation,
3268# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3269#
3270# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3271# or visit www.oracle.com if you need additional information or have any
3272# questions.
3273#
3274
3275# Execute the check given as argument, and verify the result
3276# If the Boot JDK was previously found, do nothing
3277# $1 A command line (typically autoconf macro) to execute
3278
3279
3280# Test: Is bootjdk explicitely set by command line arguments?
3281
3282
3283# Test: Is bootjdk available from builddeps?
3284
3285
3286# Test: Is $JAVA_HOME set?
3287
3288
3289# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3290
3291
3292# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3293
3294
3295# Look for a jdk in the given path. If there are multiple, try to select the newest.
3296# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3297# $1 = Path to directory containing jdk installations.
3298# $2 = String to append to the found JDK directory to get the proper JDK home
3299
3300
3301# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3302# environmental variable as base for where to look.
3303# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3304
3305
3306# Test: Is there a JDK installed in default, well-known locations?
3307
3308
3309# Check that a command-line tool in the Boot JDK is correct
3310# $1 = name of variable to assign
3311# $2 = name of binary
3312
3313
3314###############################################################################
3315#
3316# We need a Boot JDK to bootstrap the build.
3317#
3318
3319
3320
3321
3322
3323#
3324# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3325# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3326#
3327# This code is free software; you can redistribute it and/or modify it
3328# under the terms of the GNU General Public License version 2 only, as
3329# published by the Free Software Foundation.  Oracle designates this
3330# particular file as subject to the "Classpath" exception as provided
3331# by Oracle in the LICENSE file that accompanied this code.
3332#
3333# This code is distributed in the hope that it will be useful, but WITHOUT
3334# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3335# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3336# version 2 for more details (a copy is included in the LICENSE file that
3337# accompanied this code).
3338#
3339# You should have received a copy of the GNU General Public License version
3340# 2 along with this work; if not, write to the Free Software Foundation,
3341# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3342#
3343# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3344# or visit www.oracle.com if you need additional information or have any
3345# questions.
3346#
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367#
3368# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3369# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3370#
3371# This code is free software; you can redistribute it and/or modify it
3372# under the terms of the GNU General Public License version 2 only, as
3373# published by the Free Software Foundation.  Oracle designates this
3374# particular file as subject to the "Classpath" exception as provided
3375# by Oracle in the LICENSE file that accompanied this code.
3376#
3377# This code is distributed in the hope that it will be useful, but WITHOUT
3378# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3379# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3380# version 2 for more details (a copy is included in the LICENSE file that
3381# accompanied this code).
3382#
3383# You should have received a copy of the GNU General Public License version
3384# 2 along with this work; if not, write to the Free Software Foundation,
3385# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3386#
3387# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3388# or visit www.oracle.com if you need additional information or have any
3389# questions.
3390#
3391
3392
3393
3394
3395
3396cygwin_help() {
3397    case $1 in
3398    unzip)
3399        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3400    zip)
3401        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3402    make)
3403        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3404    * )
3405       break ;;
3406    esac
3407}
3408
3409apt_help() {
3410    case $1 in
3411    devkit)
3412        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3413    openjdk)
3414        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3415    alsa)
3416        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3417    cups)
3418        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3419    freetype2)
3420        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3421    pulse)
3422        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3423    x11)
3424        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3425    ccache)
3426        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3427    * )
3428       break ;;
3429    esac
3430}
3431
3432yum_help() {
3433    case $1 in
3434    devkit)
3435        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3436    openjdk)
3437        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3438    alsa)
3439        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3440    cups)
3441        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3442    freetype2)
3443        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3444    pulse)
3445        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3446    x11)
3447        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3448    ccache)
3449        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3450    * )
3451       break ;;
3452    esac
3453}
3454
3455port_help() {
3456    PKGHANDLER_COMMAND=""
3457}
3458
3459pkgutil_help() {
3460    PKGHANDLER_COMMAND=""
3461}
3462
3463pkgadd_help() {
3464    PKGHANDLER_COMMAND=""
3465}
3466
3467
3468
3469#
3470# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3472#
3473# This code is free software; you can redistribute it and/or modify it
3474# under the terms of the GNU General Public License version 2 only, as
3475# published by the Free Software Foundation.  Oracle designates this
3476# particular file as subject to the "Classpath" exception as provided
3477# by Oracle in the LICENSE file that accompanied this code.
3478#
3479# This code is distributed in the hope that it will be useful, but WITHOUT
3480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3482# version 2 for more details (a copy is included in the LICENSE file that
3483# accompanied this code).
3484#
3485# You should have received a copy of the GNU General Public License version
3486# 2 along with this work; if not, write to the Free Software Foundation,
3487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3488#
3489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3490# or visit www.oracle.com if you need additional information or have any
3491# questions.
3492#
3493
3494
3495
3496
3497
3498
3499
3500
3501###############################################################################
3502#
3503# Should we build only OpenJDK even if closed sources are present?
3504#
3505
3506
3507
3508
3509###############################################################################
3510#
3511# Setup version numbers
3512#
3513
3514
3515
3516
3517
3518
3519# Support for customization of the build process. Some build files
3520# will include counterparts from this location, if they exist. This allows
3521# for a degree of customization of the build targets and the rules/recipes
3522# to create them
3523
3524# Check whether --with-custom-make-dir was given.
3525if test "${with_custom_make_dir+set}" = set; then :
3526  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3527fi
3528
3529
3530
3531#
3532# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3533# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3534#
3535# This code is free software; you can redistribute it and/or modify it
3536# under the terms of the GNU General Public License version 2 only, as
3537# published by the Free Software Foundation.  Oracle designates this
3538# particular file as subject to the "Classpath" exception as provided
3539# by Oracle in the LICENSE file that accompanied this code.
3540#
3541# This code is distributed in the hope that it will be useful, but WITHOUT
3542# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3543# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3544# version 2 for more details (a copy is included in the LICENSE file that
3545# accompanied this code).
3546#
3547# You should have received a copy of the GNU General Public License version
3548# 2 along with this work; if not, write to the Free Software Foundation,
3549# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3550#
3551# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3552# or visit www.oracle.com if you need additional information or have any
3553# questions.
3554#
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570#
3571# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3572# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3573#
3574# This code is free software; you can redistribute it and/or modify it
3575# under the terms of the GNU General Public License version 2 only, as
3576# published by the Free Software Foundation.  Oracle designates this
3577# particular file as subject to the "Classpath" exception as provided
3578# by Oracle in the LICENSE file that accompanied this code.
3579#
3580# This code is distributed in the hope that it will be useful, but WITHOUT
3581# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3582# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3583# version 2 for more details (a copy is included in the LICENSE file that
3584# accompanied this code).
3585#
3586# You should have received a copy of the GNU General Public License version
3587# 2 along with this work; if not, write to the Free Software Foundation,
3588# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3589#
3590# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3591# or visit www.oracle.com if you need additional information or have any
3592# questions.
3593#
3594
3595# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3596# Converts autoconf style CPU name to OpenJDK style, into
3597# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3598
3599
3600# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3601# Converts autoconf style OS name to OpenJDK style, into
3602# VAR_OS and VAR_OS_API.
3603
3604
3605# Expects $host_os $host_cpu $build_os and $build_cpu
3606# and $with_target_bits to have been setup!
3607#
3608# Translate the standard triplet(quadruplet) definition
3609# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3610# OPENJDK_BUILD_OS, etc.
3611
3612
3613# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3614# accordingly. Must be done after setting up build and target system, but before
3615# doing anything else with these values.
3616
3617
3618    # Setup the legacy variables, for controlling the old makefiles.
3619    #
3620
3621
3622
3623
3624#%%% Build and target systems %%%
3625
3626
3627
3628
3629# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3630# Add -mX to various FLAGS variables.
3631
3632
3633
3634
3635
3636
3637#
3638# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3639# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3640#
3641# This code is free software; you can redistribute it and/or modify it
3642# under the terms of the GNU General Public License version 2 only, as
3643# published by the Free Software Foundation.  Oracle designates this
3644# particular file as subject to the "Classpath" exception as provided
3645# by Oracle in the LICENSE file that accompanied this code.
3646#
3647# This code is distributed in the hope that it will be useful, but WITHOUT
3648# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3649# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3650# version 2 for more details (a copy is included in the LICENSE file that
3651# accompanied this code).
3652#
3653# You should have received a copy of the GNU General Public License version
3654# 2 along with this work; if not, write to the Free Software Foundation,
3655# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3656#
3657# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3658# or visit www.oracle.com if you need additional information or have any
3659# questions.
3660#
3661
3662
3663
3664
3665
3666
3667
3668
3669#
3670# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3671# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3672#
3673# This code is free software; you can redistribute it and/or modify it
3674# under the terms of the GNU General Public License version 2 only, as
3675# published by the Free Software Foundation.  Oracle designates this
3676# particular file as subject to the "Classpath" exception as provided
3677# by Oracle in the LICENSE file that accompanied this code.
3678#
3679# This code is distributed in the hope that it will be useful, but WITHOUT
3680# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3681# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3682# version 2 for more details (a copy is included in the LICENSE file that
3683# accompanied this code).
3684#
3685# You should have received a copy of the GNU General Public License version
3686# 2 along with this work; if not, write to the Free Software Foundation,
3687# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3688#
3689# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3690# or visit www.oracle.com if you need additional information or have any
3691# questions.
3692#
3693
3694# $1 = compiler to test (CC or CXX)
3695# $2 = human readable name of compiler (C or C++)
3696
3697
3698
3699
3700
3701# $1 = compiler to test (CC or CXX)
3702# $2 = human readable name of compiler (C or C++)
3703# $3 = list of compiler names to search for
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716#
3717# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3718# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3719#
3720# This code is free software; you can redistribute it and/or modify it
3721# under the terms of the GNU General Public License version 2 only, as
3722# published by the Free Software Foundation.  Oracle designates this
3723# particular file as subject to the "Classpath" exception as provided
3724# by Oracle in the LICENSE file that accompanied this code.
3725#
3726# This code is distributed in the hope that it will be useful, but WITHOUT
3727# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3728# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3729# version 2 for more details (a copy is included in the LICENSE file that
3730# accompanied this code).
3731#
3732# You should have received a copy of the GNU General Public License version
3733# 2 along with this work; if not, write to the Free Software Foundation,
3734# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3735#
3736# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3737# or visit www.oracle.com if you need additional information or have any
3738# questions.
3739#
3740
3741
3742
3743
3744
3745
3746
3747# Check if the VS env variables were setup prior to running configure.
3748# If not, then find vcvarsall.bat and run it automatically, and integrate
3749# the set env variables into the spec file.
3750
3751
3752
3753# Setup the DXSDK paths
3754
3755
3756
3757
3758
3759
3760# This line needs to be here, verbatim, after all includes and the dummy hook
3761# definitions. It is replaced with custom functionality when building
3762# custom sources.
3763#CUSTOM_AUTOCONF_INCLUDE
3764
3765# Do not change or remove the following line, it is needed for consistency checks:
3766DATE_WHEN_GENERATED=1365147397
3767
3768###############################################################################
3769#
3770# Initialization / Boot-strapping
3771#
3772# The bootstrapping process needs to solve the "chicken or the egg" problem,
3773# thus it jumps back and forth, each time gaining something needed later on.
3774#
3775###############################################################################
3776
3777# Basic initialization that must happen first of all
3778
3779# Save the original command line. This is passed to us by the wrapper configure script.
3780
3781DATE_WHEN_CONFIGURED=`LANG=C date`
3782
3783{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3784$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3785{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3786$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3787
3788
3789
3790# Start with tools that do not need have cross compilation support
3791# and can be expected to be found in the default PATH. These tools are
3792# used by configure. Nor are these tools expected to be found in the
3793# devkit from the builddeps server either, since they are
3794# needed to download the devkit.
3795
3796# First are all the simple required tools.
3797
3798    for ac_prog in basename
3799do
3800  # Extract the first word of "$ac_prog", so it can be a program name with args.
3801set dummy $ac_prog; ac_word=$2
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3803$as_echo_n "checking for $ac_word... " >&6; }
3804if test "${ac_cv_path_BASENAME+set}" = set; then :
3805  $as_echo_n "(cached) " >&6
3806else
3807  case $BASENAME in
3808  [\\/]* | ?:[\\/]*)
3809  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3810  ;;
3811  *)
3812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3813for as_dir in $PATH
3814do
3815  IFS=$as_save_IFS
3816  test -z "$as_dir" && as_dir=.
3817    for ac_exec_ext in '' $ac_executable_extensions; do
3818  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3819    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3821    break 2
3822  fi
3823done
3824  done
3825IFS=$as_save_IFS
3826
3827  ;;
3828esac
3829fi
3830BASENAME=$ac_cv_path_BASENAME
3831if test -n "$BASENAME"; then
3832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3833$as_echo "$BASENAME" >&6; }
3834else
3835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3836$as_echo "no" >&6; }
3837fi
3838
3839
3840  test -n "$BASENAME" && break
3841done
3842
3843
3844    if test "x$BASENAME" = x; then
3845        if test "xbasename" = x; then
3846          PROG_NAME=basename
3847        else
3848          PROG_NAME=basename
3849        fi
3850        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3851$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3852        as_fn_error $? "Cannot continue" "$LINENO" 5
3853    fi
3854
3855
3856
3857    for ac_prog in bash
3858do
3859  # Extract the first word of "$ac_prog", so it can be a program name with args.
3860set dummy $ac_prog; ac_word=$2
3861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
3863if test "${ac_cv_path_BASH+set}" = set; then :
3864  $as_echo_n "(cached) " >&6
3865else
3866  case $BASH in
3867  [\\/]* | ?:[\\/]*)
3868  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3869  ;;
3870  *)
3871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872for as_dir in $PATH
3873do
3874  IFS=$as_save_IFS
3875  test -z "$as_dir" && as_dir=.
3876    for ac_exec_ext in '' $ac_executable_extensions; do
3877  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3878    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3880    break 2
3881  fi
3882done
3883  done
3884IFS=$as_save_IFS
3885
3886  ;;
3887esac
3888fi
3889BASH=$ac_cv_path_BASH
3890if test -n "$BASH"; then
3891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3892$as_echo "$BASH" >&6; }
3893else
3894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3895$as_echo "no" >&6; }
3896fi
3897
3898
3899  test -n "$BASH" && break
3900done
3901
3902
3903    if test "x$BASH" = x; then
3904        if test "xbash" = x; then
3905          PROG_NAME=bash
3906        else
3907          PROG_NAME=bash
3908        fi
3909        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3910$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3911        as_fn_error $? "Cannot continue" "$LINENO" 5
3912    fi
3913
3914
3915
3916    for ac_prog in cat
3917do
3918  # Extract the first word of "$ac_prog", so it can be a program name with args.
3919set dummy $ac_prog; ac_word=$2
3920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3921$as_echo_n "checking for $ac_word... " >&6; }
3922if test "${ac_cv_path_CAT+set}" = set; then :
3923  $as_echo_n "(cached) " >&6
3924else
3925  case $CAT in
3926  [\\/]* | ?:[\\/]*)
3927  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3928  ;;
3929  *)
3930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3931for as_dir in $PATH
3932do
3933  IFS=$as_save_IFS
3934  test -z "$as_dir" && as_dir=.
3935    for ac_exec_ext in '' $ac_executable_extensions; do
3936  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3937    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3939    break 2
3940  fi
3941done
3942  done
3943IFS=$as_save_IFS
3944
3945  ;;
3946esac
3947fi
3948CAT=$ac_cv_path_CAT
3949if test -n "$CAT"; then
3950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3951$as_echo "$CAT" >&6; }
3952else
3953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3954$as_echo "no" >&6; }
3955fi
3956
3957
3958  test -n "$CAT" && break
3959done
3960
3961
3962    if test "x$CAT" = x; then
3963        if test "xcat" = x; then
3964          PROG_NAME=cat
3965        else
3966          PROG_NAME=cat
3967        fi
3968        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3969$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3970        as_fn_error $? "Cannot continue" "$LINENO" 5
3971    fi
3972
3973
3974
3975    for ac_prog in chmod
3976do
3977  # Extract the first word of "$ac_prog", so it can be a program name with args.
3978set dummy $ac_prog; ac_word=$2
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3980$as_echo_n "checking for $ac_word... " >&6; }
3981if test "${ac_cv_path_CHMOD+set}" = set; then :
3982  $as_echo_n "(cached) " >&6
3983else
3984  case $CHMOD in
3985  [\\/]* | ?:[\\/]*)
3986  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3987  ;;
3988  *)
3989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990for as_dir in $PATH
3991do
3992  IFS=$as_save_IFS
3993  test -z "$as_dir" && as_dir=.
3994    for ac_exec_ext in '' $ac_executable_extensions; do
3995  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3996    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3998    break 2
3999  fi
4000done
4001  done
4002IFS=$as_save_IFS
4003
4004  ;;
4005esac
4006fi
4007CHMOD=$ac_cv_path_CHMOD
4008if test -n "$CHMOD"; then
4009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4010$as_echo "$CHMOD" >&6; }
4011else
4012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4013$as_echo "no" >&6; }
4014fi
4015
4016
4017  test -n "$CHMOD" && break
4018done
4019
4020
4021    if test "x$CHMOD" = x; then
4022        if test "xchmod" = x; then
4023          PROG_NAME=chmod
4024        else
4025          PROG_NAME=chmod
4026        fi
4027        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4028$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4029        as_fn_error $? "Cannot continue" "$LINENO" 5
4030    fi
4031
4032
4033
4034    for ac_prog in cmp
4035do
4036  # Extract the first word of "$ac_prog", so it can be a program name with args.
4037set dummy $ac_prog; ac_word=$2
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4039$as_echo_n "checking for $ac_word... " >&6; }
4040if test "${ac_cv_path_CMP+set}" = set; then :
4041  $as_echo_n "(cached) " >&6
4042else
4043  case $CMP in
4044  [\\/]* | ?:[\\/]*)
4045  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4046  ;;
4047  *)
4048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4049for as_dir in $PATH
4050do
4051  IFS=$as_save_IFS
4052  test -z "$as_dir" && as_dir=.
4053    for ac_exec_ext in '' $ac_executable_extensions; do
4054  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4055    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4057    break 2
4058  fi
4059done
4060  done
4061IFS=$as_save_IFS
4062
4063  ;;
4064esac
4065fi
4066CMP=$ac_cv_path_CMP
4067if test -n "$CMP"; then
4068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4069$as_echo "$CMP" >&6; }
4070else
4071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4072$as_echo "no" >&6; }
4073fi
4074
4075
4076  test -n "$CMP" && break
4077done
4078
4079
4080    if test "x$CMP" = x; then
4081        if test "xcmp" = x; then
4082          PROG_NAME=cmp
4083        else
4084          PROG_NAME=cmp
4085        fi
4086        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4087$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4088        as_fn_error $? "Cannot continue" "$LINENO" 5
4089    fi
4090
4091
4092
4093    for ac_prog in comm
4094do
4095  # Extract the first word of "$ac_prog", so it can be a program name with args.
4096set dummy $ac_prog; ac_word=$2
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4098$as_echo_n "checking for $ac_word... " >&6; }
4099if test "${ac_cv_path_COMM+set}" = set; then :
4100  $as_echo_n "(cached) " >&6
4101else
4102  case $COMM in
4103  [\\/]* | ?:[\\/]*)
4104  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4105  ;;
4106  *)
4107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4108for as_dir in $PATH
4109do
4110  IFS=$as_save_IFS
4111  test -z "$as_dir" && as_dir=.
4112    for ac_exec_ext in '' $ac_executable_extensions; do
4113  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4114    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4116    break 2
4117  fi
4118done
4119  done
4120IFS=$as_save_IFS
4121
4122  ;;
4123esac
4124fi
4125COMM=$ac_cv_path_COMM
4126if test -n "$COMM"; then
4127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4128$as_echo "$COMM" >&6; }
4129else
4130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4131$as_echo "no" >&6; }
4132fi
4133
4134
4135  test -n "$COMM" && break
4136done
4137
4138
4139    if test "x$COMM" = x; then
4140        if test "xcomm" = x; then
4141          PROG_NAME=comm
4142        else
4143          PROG_NAME=comm
4144        fi
4145        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4146$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4147        as_fn_error $? "Cannot continue" "$LINENO" 5
4148    fi
4149
4150
4151
4152    for ac_prog in cp
4153do
4154  # Extract the first word of "$ac_prog", so it can be a program name with args.
4155set dummy $ac_prog; ac_word=$2
4156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4157$as_echo_n "checking for $ac_word... " >&6; }
4158if test "${ac_cv_path_CP+set}" = set; then :
4159  $as_echo_n "(cached) " >&6
4160else
4161  case $CP in
4162  [\\/]* | ?:[\\/]*)
4163  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4164  ;;
4165  *)
4166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167for as_dir in $PATH
4168do
4169  IFS=$as_save_IFS
4170  test -z "$as_dir" && as_dir=.
4171    for ac_exec_ext in '' $ac_executable_extensions; do
4172  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4173    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4175    break 2
4176  fi
4177done
4178  done
4179IFS=$as_save_IFS
4180
4181  ;;
4182esac
4183fi
4184CP=$ac_cv_path_CP
4185if test -n "$CP"; then
4186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4187$as_echo "$CP" >&6; }
4188else
4189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4190$as_echo "no" >&6; }
4191fi
4192
4193
4194  test -n "$CP" && break
4195done
4196
4197
4198    if test "x$CP" = x; then
4199        if test "xcp" = x; then
4200          PROG_NAME=cp
4201        else
4202          PROG_NAME=cp
4203        fi
4204        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4205$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4206        as_fn_error $? "Cannot continue" "$LINENO" 5
4207    fi
4208
4209
4210
4211    for ac_prog in cpio
4212do
4213  # Extract the first word of "$ac_prog", so it can be a program name with args.
4214set dummy $ac_prog; ac_word=$2
4215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4216$as_echo_n "checking for $ac_word... " >&6; }
4217if test "${ac_cv_path_CPIO+set}" = set; then :
4218  $as_echo_n "(cached) " >&6
4219else
4220  case $CPIO in
4221  [\\/]* | ?:[\\/]*)
4222  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4223  ;;
4224  *)
4225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226for as_dir in $PATH
4227do
4228  IFS=$as_save_IFS
4229  test -z "$as_dir" && as_dir=.
4230    for ac_exec_ext in '' $ac_executable_extensions; do
4231  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4232    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234    break 2
4235  fi
4236done
4237  done
4238IFS=$as_save_IFS
4239
4240  ;;
4241esac
4242fi
4243CPIO=$ac_cv_path_CPIO
4244if test -n "$CPIO"; then
4245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4246$as_echo "$CPIO" >&6; }
4247else
4248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4249$as_echo "no" >&6; }
4250fi
4251
4252
4253  test -n "$CPIO" && break
4254done
4255
4256
4257    if test "x$CPIO" = x; then
4258        if test "xcpio" = x; then
4259          PROG_NAME=cpio
4260        else
4261          PROG_NAME=cpio
4262        fi
4263        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4264$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4265        as_fn_error $? "Cannot continue" "$LINENO" 5
4266    fi
4267
4268
4269
4270    for ac_prog in cut
4271do
4272  # Extract the first word of "$ac_prog", so it can be a program name with args.
4273set dummy $ac_prog; ac_word=$2
4274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4275$as_echo_n "checking for $ac_word... " >&6; }
4276if test "${ac_cv_path_CUT+set}" = set; then :
4277  $as_echo_n "(cached) " >&6
4278else
4279  case $CUT in
4280  [\\/]* | ?:[\\/]*)
4281  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4282  ;;
4283  *)
4284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4285for as_dir in $PATH
4286do
4287  IFS=$as_save_IFS
4288  test -z "$as_dir" && as_dir=.
4289    for ac_exec_ext in '' $ac_executable_extensions; do
4290  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4291    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4293    break 2
4294  fi
4295done
4296  done
4297IFS=$as_save_IFS
4298
4299  ;;
4300esac
4301fi
4302CUT=$ac_cv_path_CUT
4303if test -n "$CUT"; then
4304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4305$as_echo "$CUT" >&6; }
4306else
4307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4308$as_echo "no" >&6; }
4309fi
4310
4311
4312  test -n "$CUT" && break
4313done
4314
4315
4316    if test "x$CUT" = x; then
4317        if test "xcut" = x; then
4318          PROG_NAME=cut
4319        else
4320          PROG_NAME=cut
4321        fi
4322        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4323$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4324        as_fn_error $? "Cannot continue" "$LINENO" 5
4325    fi
4326
4327
4328
4329    for ac_prog in date
4330do
4331  # Extract the first word of "$ac_prog", so it can be a program name with args.
4332set dummy $ac_prog; ac_word=$2
4333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4334$as_echo_n "checking for $ac_word... " >&6; }
4335if test "${ac_cv_path_DATE+set}" = set; then :
4336  $as_echo_n "(cached) " >&6
4337else
4338  case $DATE in
4339  [\\/]* | ?:[\\/]*)
4340  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4341  ;;
4342  *)
4343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4344for as_dir in $PATH
4345do
4346  IFS=$as_save_IFS
4347  test -z "$as_dir" && as_dir=.
4348    for ac_exec_ext in '' $ac_executable_extensions; do
4349  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4350    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4352    break 2
4353  fi
4354done
4355  done
4356IFS=$as_save_IFS
4357
4358  ;;
4359esac
4360fi
4361DATE=$ac_cv_path_DATE
4362if test -n "$DATE"; then
4363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4364$as_echo "$DATE" >&6; }
4365else
4366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4367$as_echo "no" >&6; }
4368fi
4369
4370
4371  test -n "$DATE" && break
4372done
4373
4374
4375    if test "x$DATE" = x; then
4376        if test "xdate" = x; then
4377          PROG_NAME=date
4378        else
4379          PROG_NAME=date
4380        fi
4381        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4382$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4383        as_fn_error $? "Cannot continue" "$LINENO" 5
4384    fi
4385
4386
4387
4388    for ac_prog in gdiff diff
4389do
4390  # Extract the first word of "$ac_prog", so it can be a program name with args.
4391set dummy $ac_prog; ac_word=$2
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4393$as_echo_n "checking for $ac_word... " >&6; }
4394if test "${ac_cv_path_DIFF+set}" = set; then :
4395  $as_echo_n "(cached) " >&6
4396else
4397  case $DIFF in
4398  [\\/]* | ?:[\\/]*)
4399  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4400  ;;
4401  *)
4402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4403for as_dir in $PATH
4404do
4405  IFS=$as_save_IFS
4406  test -z "$as_dir" && as_dir=.
4407    for ac_exec_ext in '' $ac_executable_extensions; do
4408  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4409    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4411    break 2
4412  fi
4413done
4414  done
4415IFS=$as_save_IFS
4416
4417  ;;
4418esac
4419fi
4420DIFF=$ac_cv_path_DIFF
4421if test -n "$DIFF"; then
4422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4423$as_echo "$DIFF" >&6; }
4424else
4425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426$as_echo "no" >&6; }
4427fi
4428
4429
4430  test -n "$DIFF" && break
4431done
4432
4433
4434    if test "x$DIFF" = x; then
4435        if test "xgdiff diff" = x; then
4436          PROG_NAME=diff
4437        else
4438          PROG_NAME=gdiff diff
4439        fi
4440        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4441$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4442        as_fn_error $? "Cannot continue" "$LINENO" 5
4443    fi
4444
4445
4446
4447    for ac_prog in dirname
4448do
4449  # Extract the first word of "$ac_prog", so it can be a program name with args.
4450set dummy $ac_prog; ac_word=$2
4451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4452$as_echo_n "checking for $ac_word... " >&6; }
4453if test "${ac_cv_path_DIRNAME+set}" = set; then :
4454  $as_echo_n "(cached) " >&6
4455else
4456  case $DIRNAME in
4457  [\\/]* | ?:[\\/]*)
4458  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4459  ;;
4460  *)
4461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4462for as_dir in $PATH
4463do
4464  IFS=$as_save_IFS
4465  test -z "$as_dir" && as_dir=.
4466    for ac_exec_ext in '' $ac_executable_extensions; do
4467  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4468    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4470    break 2
4471  fi
4472done
4473  done
4474IFS=$as_save_IFS
4475
4476  ;;
4477esac
4478fi
4479DIRNAME=$ac_cv_path_DIRNAME
4480if test -n "$DIRNAME"; then
4481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4482$as_echo "$DIRNAME" >&6; }
4483else
4484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4485$as_echo "no" >&6; }
4486fi
4487
4488
4489  test -n "$DIRNAME" && break
4490done
4491
4492
4493    if test "x$DIRNAME" = x; then
4494        if test "xdirname" = x; then
4495          PROG_NAME=dirname
4496        else
4497          PROG_NAME=dirname
4498        fi
4499        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4500$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4501        as_fn_error $? "Cannot continue" "$LINENO" 5
4502    fi
4503
4504
4505
4506    for ac_prog in echo
4507do
4508  # Extract the first word of "$ac_prog", so it can be a program name with args.
4509set dummy $ac_prog; ac_word=$2
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4511$as_echo_n "checking for $ac_word... " >&6; }
4512if test "${ac_cv_path_ECHO+set}" = set; then :
4513  $as_echo_n "(cached) " >&6
4514else
4515  case $ECHO in
4516  [\\/]* | ?:[\\/]*)
4517  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4518  ;;
4519  *)
4520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4521for as_dir in $PATH
4522do
4523  IFS=$as_save_IFS
4524  test -z "$as_dir" && as_dir=.
4525    for ac_exec_ext in '' $ac_executable_extensions; do
4526  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4527    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4529    break 2
4530  fi
4531done
4532  done
4533IFS=$as_save_IFS
4534
4535  ;;
4536esac
4537fi
4538ECHO=$ac_cv_path_ECHO
4539if test -n "$ECHO"; then
4540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4541$as_echo "$ECHO" >&6; }
4542else
4543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4544$as_echo "no" >&6; }
4545fi
4546
4547
4548  test -n "$ECHO" && break
4549done
4550
4551
4552    if test "x$ECHO" = x; then
4553        if test "xecho" = x; then
4554          PROG_NAME=echo
4555        else
4556          PROG_NAME=echo
4557        fi
4558        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4559$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4560        as_fn_error $? "Cannot continue" "$LINENO" 5
4561    fi
4562
4563
4564
4565    for ac_prog in expr
4566do
4567  # Extract the first word of "$ac_prog", so it can be a program name with args.
4568set dummy $ac_prog; ac_word=$2
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570$as_echo_n "checking for $ac_word... " >&6; }
4571if test "${ac_cv_path_EXPR+set}" = set; then :
4572  $as_echo_n "(cached) " >&6
4573else
4574  case $EXPR in
4575  [\\/]* | ?:[\\/]*)
4576  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4577  ;;
4578  *)
4579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580for as_dir in $PATH
4581do
4582  IFS=$as_save_IFS
4583  test -z "$as_dir" && as_dir=.
4584    for ac_exec_ext in '' $ac_executable_extensions; do
4585  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4586    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4588    break 2
4589  fi
4590done
4591  done
4592IFS=$as_save_IFS
4593
4594  ;;
4595esac
4596fi
4597EXPR=$ac_cv_path_EXPR
4598if test -n "$EXPR"; then
4599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4600$as_echo "$EXPR" >&6; }
4601else
4602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603$as_echo "no" >&6; }
4604fi
4605
4606
4607  test -n "$EXPR" && break
4608done
4609
4610
4611    if test "x$EXPR" = x; then
4612        if test "xexpr" = x; then
4613          PROG_NAME=expr
4614        else
4615          PROG_NAME=expr
4616        fi
4617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4618$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4619        as_fn_error $? "Cannot continue" "$LINENO" 5
4620    fi
4621
4622
4623
4624    for ac_prog in file
4625do
4626  # Extract the first word of "$ac_prog", so it can be a program name with args.
4627set dummy $ac_prog; ac_word=$2
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4629$as_echo_n "checking for $ac_word... " >&6; }
4630if test "${ac_cv_path_FILE+set}" = set; then :
4631  $as_echo_n "(cached) " >&6
4632else
4633  case $FILE in
4634  [\\/]* | ?:[\\/]*)
4635  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4636  ;;
4637  *)
4638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in $PATH
4640do
4641  IFS=$as_save_IFS
4642  test -z "$as_dir" && as_dir=.
4643    for ac_exec_ext in '' $ac_executable_extensions; do
4644  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4645    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4647    break 2
4648  fi
4649done
4650  done
4651IFS=$as_save_IFS
4652
4653  ;;
4654esac
4655fi
4656FILE=$ac_cv_path_FILE
4657if test -n "$FILE"; then
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4659$as_echo "$FILE" >&6; }
4660else
4661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662$as_echo "no" >&6; }
4663fi
4664
4665
4666  test -n "$FILE" && break
4667done
4668
4669
4670    if test "x$FILE" = x; then
4671        if test "xfile" = x; then
4672          PROG_NAME=file
4673        else
4674          PROG_NAME=file
4675        fi
4676        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4677$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4678        as_fn_error $? "Cannot continue" "$LINENO" 5
4679    fi
4680
4681
4682
4683    for ac_prog in find
4684do
4685  # Extract the first word of "$ac_prog", so it can be a program name with args.
4686set dummy $ac_prog; ac_word=$2
4687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4688$as_echo_n "checking for $ac_word... " >&6; }
4689if test "${ac_cv_path_FIND+set}" = set; then :
4690  $as_echo_n "(cached) " >&6
4691else
4692  case $FIND in
4693  [\\/]* | ?:[\\/]*)
4694  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4695  ;;
4696  *)
4697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in $PATH
4699do
4700  IFS=$as_save_IFS
4701  test -z "$as_dir" && as_dir=.
4702    for ac_exec_ext in '' $ac_executable_extensions; do
4703  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4704    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706    break 2
4707  fi
4708done
4709  done
4710IFS=$as_save_IFS
4711
4712  ;;
4713esac
4714fi
4715FIND=$ac_cv_path_FIND
4716if test -n "$FIND"; then
4717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4718$as_echo "$FIND" >&6; }
4719else
4720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4721$as_echo "no" >&6; }
4722fi
4723
4724
4725  test -n "$FIND" && break
4726done
4727
4728
4729    if test "x$FIND" = x; then
4730        if test "xfind" = x; then
4731          PROG_NAME=find
4732        else
4733          PROG_NAME=find
4734        fi
4735        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4736$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4737        as_fn_error $? "Cannot continue" "$LINENO" 5
4738    fi
4739
4740
4741
4742    for ac_prog in head
4743do
4744  # Extract the first word of "$ac_prog", so it can be a program name with args.
4745set dummy $ac_prog; ac_word=$2
4746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4747$as_echo_n "checking for $ac_word... " >&6; }
4748if test "${ac_cv_path_HEAD+set}" = set; then :
4749  $as_echo_n "(cached) " >&6
4750else
4751  case $HEAD in
4752  [\\/]* | ?:[\\/]*)
4753  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4754  ;;
4755  *)
4756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4757for as_dir in $PATH
4758do
4759  IFS=$as_save_IFS
4760  test -z "$as_dir" && as_dir=.
4761    for ac_exec_ext in '' $ac_executable_extensions; do
4762  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4763    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4765    break 2
4766  fi
4767done
4768  done
4769IFS=$as_save_IFS
4770
4771  ;;
4772esac
4773fi
4774HEAD=$ac_cv_path_HEAD
4775if test -n "$HEAD"; then
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4777$as_echo "$HEAD" >&6; }
4778else
4779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780$as_echo "no" >&6; }
4781fi
4782
4783
4784  test -n "$HEAD" && break
4785done
4786
4787
4788    if test "x$HEAD" = x; then
4789        if test "xhead" = x; then
4790          PROG_NAME=head
4791        else
4792          PROG_NAME=head
4793        fi
4794        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4795$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4796        as_fn_error $? "Cannot continue" "$LINENO" 5
4797    fi
4798
4799
4800
4801    for ac_prog in ln
4802do
4803  # Extract the first word of "$ac_prog", so it can be a program name with args.
4804set dummy $ac_prog; ac_word=$2
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4806$as_echo_n "checking for $ac_word... " >&6; }
4807if test "${ac_cv_path_LN+set}" = set; then :
4808  $as_echo_n "(cached) " >&6
4809else
4810  case $LN in
4811  [\\/]* | ?:[\\/]*)
4812  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4813  ;;
4814  *)
4815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4816for as_dir in $PATH
4817do
4818  IFS=$as_save_IFS
4819  test -z "$as_dir" && as_dir=.
4820    for ac_exec_ext in '' $ac_executable_extensions; do
4821  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4822    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4824    break 2
4825  fi
4826done
4827  done
4828IFS=$as_save_IFS
4829
4830  ;;
4831esac
4832fi
4833LN=$ac_cv_path_LN
4834if test -n "$LN"; then
4835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4836$as_echo "$LN" >&6; }
4837else
4838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839$as_echo "no" >&6; }
4840fi
4841
4842
4843  test -n "$LN" && break
4844done
4845
4846
4847    if test "x$LN" = x; then
4848        if test "xln" = x; then
4849          PROG_NAME=ln
4850        else
4851          PROG_NAME=ln
4852        fi
4853        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4854$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4855        as_fn_error $? "Cannot continue" "$LINENO" 5
4856    fi
4857
4858
4859
4860    for ac_prog in ls
4861do
4862  # Extract the first word of "$ac_prog", so it can be a program name with args.
4863set dummy $ac_prog; ac_word=$2
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if test "${ac_cv_path_LS+set}" = set; then :
4867  $as_echo_n "(cached) " >&6
4868else
4869  case $LS in
4870  [\\/]* | ?:[\\/]*)
4871  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4872  ;;
4873  *)
4874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in $PATH
4876do
4877  IFS=$as_save_IFS
4878  test -z "$as_dir" && as_dir=.
4879    for ac_exec_ext in '' $ac_executable_extensions; do
4880  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4881    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883    break 2
4884  fi
4885done
4886  done
4887IFS=$as_save_IFS
4888
4889  ;;
4890esac
4891fi
4892LS=$ac_cv_path_LS
4893if test -n "$LS"; then
4894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4895$as_echo "$LS" >&6; }
4896else
4897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
4899fi
4900
4901
4902  test -n "$LS" && break
4903done
4904
4905
4906    if test "x$LS" = x; then
4907        if test "xls" = x; then
4908          PROG_NAME=ls
4909        else
4910          PROG_NAME=ls
4911        fi
4912        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4913$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4914        as_fn_error $? "Cannot continue" "$LINENO" 5
4915    fi
4916
4917
4918
4919    for ac_prog in mkdir
4920do
4921  # Extract the first word of "$ac_prog", so it can be a program name with args.
4922set dummy $ac_prog; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if test "${ac_cv_path_MKDIR+set}" = set; then :
4926  $as_echo_n "(cached) " >&6
4927else
4928  case $MKDIR in
4929  [\\/]* | ?:[\\/]*)
4930  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4931  ;;
4932  *)
4933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in $PATH
4935do
4936  IFS=$as_save_IFS
4937  test -z "$as_dir" && as_dir=.
4938    for ac_exec_ext in '' $ac_executable_extensions; do
4939  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4940    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942    break 2
4943  fi
4944done
4945  done
4946IFS=$as_save_IFS
4947
4948  ;;
4949esac
4950fi
4951MKDIR=$ac_cv_path_MKDIR
4952if test -n "$MKDIR"; then
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4954$as_echo "$MKDIR" >&6; }
4955else
4956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960
4961  test -n "$MKDIR" && break
4962done
4963
4964
4965    if test "x$MKDIR" = x; then
4966        if test "xmkdir" = x; then
4967          PROG_NAME=mkdir
4968        else
4969          PROG_NAME=mkdir
4970        fi
4971        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4972$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4973        as_fn_error $? "Cannot continue" "$LINENO" 5
4974    fi
4975
4976
4977
4978    for ac_prog in mktemp
4979do
4980  # Extract the first word of "$ac_prog", so it can be a program name with args.
4981set dummy $ac_prog; ac_word=$2
4982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4983$as_echo_n "checking for $ac_word... " >&6; }
4984if test "${ac_cv_path_MKTEMP+set}" = set; then :
4985  $as_echo_n "(cached) " >&6
4986else
4987  case $MKTEMP in
4988  [\\/]* | ?:[\\/]*)
4989  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4990  ;;
4991  *)
4992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4993for as_dir in $PATH
4994do
4995  IFS=$as_save_IFS
4996  test -z "$as_dir" && as_dir=.
4997    for ac_exec_ext in '' $ac_executable_extensions; do
4998  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4999    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5001    break 2
5002  fi
5003done
5004  done
5005IFS=$as_save_IFS
5006
5007  ;;
5008esac
5009fi
5010MKTEMP=$ac_cv_path_MKTEMP
5011if test -n "$MKTEMP"; then
5012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5013$as_echo "$MKTEMP" >&6; }
5014else
5015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
5017fi
5018
5019
5020  test -n "$MKTEMP" && break
5021done
5022
5023
5024    if test "x$MKTEMP" = x; then
5025        if test "xmktemp" = x; then
5026          PROG_NAME=mktemp
5027        else
5028          PROG_NAME=mktemp
5029        fi
5030        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5031$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5032        as_fn_error $? "Cannot continue" "$LINENO" 5
5033    fi
5034
5035
5036
5037    for ac_prog in mv
5038do
5039  # Extract the first word of "$ac_prog", so it can be a program name with args.
5040set dummy $ac_prog; ac_word=$2
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5042$as_echo_n "checking for $ac_word... " >&6; }
5043if test "${ac_cv_path_MV+set}" = set; then :
5044  $as_echo_n "(cached) " >&6
5045else
5046  case $MV in
5047  [\\/]* | ?:[\\/]*)
5048  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5049  ;;
5050  *)
5051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052for as_dir in $PATH
5053do
5054  IFS=$as_save_IFS
5055  test -z "$as_dir" && as_dir=.
5056    for ac_exec_ext in '' $ac_executable_extensions; do
5057  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5058    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5060    break 2
5061  fi
5062done
5063  done
5064IFS=$as_save_IFS
5065
5066  ;;
5067esac
5068fi
5069MV=$ac_cv_path_MV
5070if test -n "$MV"; then
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5072$as_echo "$MV" >&6; }
5073else
5074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5075$as_echo "no" >&6; }
5076fi
5077
5078
5079  test -n "$MV" && break
5080done
5081
5082
5083    if test "x$MV" = x; then
5084        if test "xmv" = x; then
5085          PROG_NAME=mv
5086        else
5087          PROG_NAME=mv
5088        fi
5089        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5090$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5091        as_fn_error $? "Cannot continue" "$LINENO" 5
5092    fi
5093
5094
5095
5096    for ac_prog in printf
5097do
5098  # Extract the first word of "$ac_prog", so it can be a program name with args.
5099set dummy $ac_prog; ac_word=$2
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
5102if test "${ac_cv_path_PRINTF+set}" = set; then :
5103  $as_echo_n "(cached) " >&6
5104else
5105  case $PRINTF in
5106  [\\/]* | ?:[\\/]*)
5107  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5108  ;;
5109  *)
5110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113  IFS=$as_save_IFS
5114  test -z "$as_dir" && as_dir=.
5115    for ac_exec_ext in '' $ac_executable_extensions; do
5116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5117    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119    break 2
5120  fi
5121done
5122  done
5123IFS=$as_save_IFS
5124
5125  ;;
5126esac
5127fi
5128PRINTF=$ac_cv_path_PRINTF
5129if test -n "$PRINTF"; then
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5131$as_echo "$PRINTF" >&6; }
5132else
5133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
5135fi
5136
5137
5138  test -n "$PRINTF" && break
5139done
5140
5141
5142    if test "x$PRINTF" = x; then
5143        if test "xprintf" = x; then
5144          PROG_NAME=printf
5145        else
5146          PROG_NAME=printf
5147        fi
5148        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5149$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5150        as_fn_error $? "Cannot continue" "$LINENO" 5
5151    fi
5152
5153
5154
5155    for ac_prog in pwd
5156do
5157  # Extract the first word of "$ac_prog", so it can be a program name with args.
5158set dummy $ac_prog; ac_word=$2
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5160$as_echo_n "checking for $ac_word... " >&6; }
5161if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5162  $as_echo_n "(cached) " >&6
5163else
5164  case $THEPWDCMD in
5165  [\\/]* | ?:[\\/]*)
5166  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5167  ;;
5168  *)
5169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5170for as_dir in $PATH
5171do
5172  IFS=$as_save_IFS
5173  test -z "$as_dir" && as_dir=.
5174    for ac_exec_ext in '' $ac_executable_extensions; do
5175  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5176    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5178    break 2
5179  fi
5180done
5181  done
5182IFS=$as_save_IFS
5183
5184  ;;
5185esac
5186fi
5187THEPWDCMD=$ac_cv_path_THEPWDCMD
5188if test -n "$THEPWDCMD"; then
5189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5190$as_echo "$THEPWDCMD" >&6; }
5191else
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5193$as_echo "no" >&6; }
5194fi
5195
5196
5197  test -n "$THEPWDCMD" && break
5198done
5199
5200
5201    if test "x$THEPWDCMD" = x; then
5202        if test "xpwd" = x; then
5203          PROG_NAME=thepwdcmd
5204        else
5205          PROG_NAME=pwd
5206        fi
5207        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5208$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5209        as_fn_error $? "Cannot continue" "$LINENO" 5
5210    fi
5211
5212
5213
5214    for ac_prog in rm
5215do
5216  # Extract the first word of "$ac_prog", so it can be a program name with args.
5217set dummy $ac_prog; ac_word=$2
5218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5219$as_echo_n "checking for $ac_word... " >&6; }
5220if test "${ac_cv_path_RM+set}" = set; then :
5221  $as_echo_n "(cached) " >&6
5222else
5223  case $RM in
5224  [\\/]* | ?:[\\/]*)
5225  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5226  ;;
5227  *)
5228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229for as_dir in $PATH
5230do
5231  IFS=$as_save_IFS
5232  test -z "$as_dir" && as_dir=.
5233    for ac_exec_ext in '' $ac_executable_extensions; do
5234  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5235    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5237    break 2
5238  fi
5239done
5240  done
5241IFS=$as_save_IFS
5242
5243  ;;
5244esac
5245fi
5246RM=$ac_cv_path_RM
5247if test -n "$RM"; then
5248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5249$as_echo "$RM" >&6; }
5250else
5251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5252$as_echo "no" >&6; }
5253fi
5254
5255
5256  test -n "$RM" && break
5257done
5258
5259
5260    if test "x$RM" = x; then
5261        if test "xrm" = x; then
5262          PROG_NAME=rm
5263        else
5264          PROG_NAME=rm
5265        fi
5266        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5267$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5268        as_fn_error $? "Cannot continue" "$LINENO" 5
5269    fi
5270
5271
5272
5273    for ac_prog in sh
5274do
5275  # Extract the first word of "$ac_prog", so it can be a program name with args.
5276set dummy $ac_prog; ac_word=$2
5277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5278$as_echo_n "checking for $ac_word... " >&6; }
5279if test "${ac_cv_path_SH+set}" = set; then :
5280  $as_echo_n "(cached) " >&6
5281else
5282  case $SH in
5283  [\\/]* | ?:[\\/]*)
5284  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5285  ;;
5286  *)
5287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288for as_dir in $PATH
5289do
5290  IFS=$as_save_IFS
5291  test -z "$as_dir" && as_dir=.
5292    for ac_exec_ext in '' $ac_executable_extensions; do
5293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5294    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5296    break 2
5297  fi
5298done
5299  done
5300IFS=$as_save_IFS
5301
5302  ;;
5303esac
5304fi
5305SH=$ac_cv_path_SH
5306if test -n "$SH"; then
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5308$as_echo "$SH" >&6; }
5309else
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5311$as_echo "no" >&6; }
5312fi
5313
5314
5315  test -n "$SH" && break
5316done
5317
5318
5319    if test "x$SH" = x; then
5320        if test "xsh" = x; then
5321          PROG_NAME=sh
5322        else
5323          PROG_NAME=sh
5324        fi
5325        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5326$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5327        as_fn_error $? "Cannot continue" "$LINENO" 5
5328    fi
5329
5330
5331
5332    for ac_prog in sort
5333do
5334  # Extract the first word of "$ac_prog", so it can be a program name with args.
5335set dummy $ac_prog; ac_word=$2
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337$as_echo_n "checking for $ac_word... " >&6; }
5338if test "${ac_cv_path_SORT+set}" = set; then :
5339  $as_echo_n "(cached) " >&6
5340else
5341  case $SORT in
5342  [\\/]* | ?:[\\/]*)
5343  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5344  ;;
5345  *)
5346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5347for as_dir in $PATH
5348do
5349  IFS=$as_save_IFS
5350  test -z "$as_dir" && as_dir=.
5351    for ac_exec_ext in '' $ac_executable_extensions; do
5352  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5353    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5355    break 2
5356  fi
5357done
5358  done
5359IFS=$as_save_IFS
5360
5361  ;;
5362esac
5363fi
5364SORT=$ac_cv_path_SORT
5365if test -n "$SORT"; then
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5367$as_echo "$SORT" >&6; }
5368else
5369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370$as_echo "no" >&6; }
5371fi
5372
5373
5374  test -n "$SORT" && break
5375done
5376
5377
5378    if test "x$SORT" = x; then
5379        if test "xsort" = x; then
5380          PROG_NAME=sort
5381        else
5382          PROG_NAME=sort
5383        fi
5384        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5385$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5386        as_fn_error $? "Cannot continue" "$LINENO" 5
5387    fi
5388
5389
5390
5391    for ac_prog in tail
5392do
5393  # Extract the first word of "$ac_prog", so it can be a program name with args.
5394set dummy $ac_prog; ac_word=$2
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5396$as_echo_n "checking for $ac_word... " >&6; }
5397if test "${ac_cv_path_TAIL+set}" = set; then :
5398  $as_echo_n "(cached) " >&6
5399else
5400  case $TAIL in
5401  [\\/]* | ?:[\\/]*)
5402  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5403  ;;
5404  *)
5405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406for as_dir in $PATH
5407do
5408  IFS=$as_save_IFS
5409  test -z "$as_dir" && as_dir=.
5410    for ac_exec_ext in '' $ac_executable_extensions; do
5411  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5412    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414    break 2
5415  fi
5416done
5417  done
5418IFS=$as_save_IFS
5419
5420  ;;
5421esac
5422fi
5423TAIL=$ac_cv_path_TAIL
5424if test -n "$TAIL"; then
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5426$as_echo "$TAIL" >&6; }
5427else
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429$as_echo "no" >&6; }
5430fi
5431
5432
5433  test -n "$TAIL" && break
5434done
5435
5436
5437    if test "x$TAIL" = x; then
5438        if test "xtail" = x; then
5439          PROG_NAME=tail
5440        else
5441          PROG_NAME=tail
5442        fi
5443        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5444$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5445        as_fn_error $? "Cannot continue" "$LINENO" 5
5446    fi
5447
5448
5449
5450    for ac_prog in tar
5451do
5452  # Extract the first word of "$ac_prog", so it can be a program name with args.
5453set dummy $ac_prog; ac_word=$2
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5455$as_echo_n "checking for $ac_word... " >&6; }
5456if test "${ac_cv_path_TAR+set}" = set; then :
5457  $as_echo_n "(cached) " >&6
5458else
5459  case $TAR in
5460  [\\/]* | ?:[\\/]*)
5461  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5462  ;;
5463  *)
5464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5465for as_dir in $PATH
5466do
5467  IFS=$as_save_IFS
5468  test -z "$as_dir" && as_dir=.
5469    for ac_exec_ext in '' $ac_executable_extensions; do
5470  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5471    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5473    break 2
5474  fi
5475done
5476  done
5477IFS=$as_save_IFS
5478
5479  ;;
5480esac
5481fi
5482TAR=$ac_cv_path_TAR
5483if test -n "$TAR"; then
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5485$as_echo "$TAR" >&6; }
5486else
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5488$as_echo "no" >&6; }
5489fi
5490
5491
5492  test -n "$TAR" && break
5493done
5494
5495
5496    if test "x$TAR" = x; then
5497        if test "xtar" = x; then
5498          PROG_NAME=tar
5499        else
5500          PROG_NAME=tar
5501        fi
5502        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5503$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5504        as_fn_error $? "Cannot continue" "$LINENO" 5
5505    fi
5506
5507
5508
5509    for ac_prog in tee
5510do
5511  # Extract the first word of "$ac_prog", so it can be a program name with args.
5512set dummy $ac_prog; ac_word=$2
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5514$as_echo_n "checking for $ac_word... " >&6; }
5515if test "${ac_cv_path_TEE+set}" = set; then :
5516  $as_echo_n "(cached) " >&6
5517else
5518  case $TEE in
5519  [\\/]* | ?:[\\/]*)
5520  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5521  ;;
5522  *)
5523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5524for as_dir in $PATH
5525do
5526  IFS=$as_save_IFS
5527  test -z "$as_dir" && as_dir=.
5528    for ac_exec_ext in '' $ac_executable_extensions; do
5529  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5530    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5532    break 2
5533  fi
5534done
5535  done
5536IFS=$as_save_IFS
5537
5538  ;;
5539esac
5540fi
5541TEE=$ac_cv_path_TEE
5542if test -n "$TEE"; then
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5544$as_echo "$TEE" >&6; }
5545else
5546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5547$as_echo "no" >&6; }
5548fi
5549
5550
5551  test -n "$TEE" && break
5552done
5553
5554
5555    if test "x$TEE" = x; then
5556        if test "xtee" = x; then
5557          PROG_NAME=tee
5558        else
5559          PROG_NAME=tee
5560        fi
5561        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5562$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5563        as_fn_error $? "Cannot continue" "$LINENO" 5
5564    fi
5565
5566
5567
5568    for ac_prog in touch
5569do
5570  # Extract the first word of "$ac_prog", so it can be a program name with args.
5571set dummy $ac_prog; ac_word=$2
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573$as_echo_n "checking for $ac_word... " >&6; }
5574if test "${ac_cv_path_TOUCH+set}" = set; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577  case $TOUCH in
5578  [\\/]* | ?:[\\/]*)
5579  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5580  ;;
5581  *)
5582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585  IFS=$as_save_IFS
5586  test -z "$as_dir" && as_dir=.
5587    for ac_exec_ext in '' $ac_executable_extensions; do
5588  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5589    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591    break 2
5592  fi
5593done
5594  done
5595IFS=$as_save_IFS
5596
5597  ;;
5598esac
5599fi
5600TOUCH=$ac_cv_path_TOUCH
5601if test -n "$TOUCH"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5603$as_echo "$TOUCH" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610  test -n "$TOUCH" && break
5611done
5612
5613
5614    if test "x$TOUCH" = x; then
5615        if test "xtouch" = x; then
5616          PROG_NAME=touch
5617        else
5618          PROG_NAME=touch
5619        fi
5620        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5621$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5622        as_fn_error $? "Cannot continue" "$LINENO" 5
5623    fi
5624
5625
5626
5627    for ac_prog in tr
5628do
5629  # Extract the first word of "$ac_prog", so it can be a program name with args.
5630set dummy $ac_prog; ac_word=$2
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5632$as_echo_n "checking for $ac_word... " >&6; }
5633if test "${ac_cv_path_TR+set}" = set; then :
5634  $as_echo_n "(cached) " >&6
5635else
5636  case $TR in
5637  [\\/]* | ?:[\\/]*)
5638  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5639  ;;
5640  *)
5641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5642for as_dir in $PATH
5643do
5644  IFS=$as_save_IFS
5645  test -z "$as_dir" && as_dir=.
5646    for ac_exec_ext in '' $ac_executable_extensions; do
5647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5648    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5650    break 2
5651  fi
5652done
5653  done
5654IFS=$as_save_IFS
5655
5656  ;;
5657esac
5658fi
5659TR=$ac_cv_path_TR
5660if test -n "$TR"; then
5661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5662$as_echo "$TR" >&6; }
5663else
5664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5665$as_echo "no" >&6; }
5666fi
5667
5668
5669  test -n "$TR" && break
5670done
5671
5672
5673    if test "x$TR" = x; then
5674        if test "xtr" = x; then
5675          PROG_NAME=tr
5676        else
5677          PROG_NAME=tr
5678        fi
5679        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5680$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5681        as_fn_error $? "Cannot continue" "$LINENO" 5
5682    fi
5683
5684
5685
5686    for ac_prog in uname
5687do
5688  # Extract the first word of "$ac_prog", so it can be a program name with args.
5689set dummy $ac_prog; ac_word=$2
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5691$as_echo_n "checking for $ac_word... " >&6; }
5692if test "${ac_cv_path_UNAME+set}" = set; then :
5693  $as_echo_n "(cached) " >&6
5694else
5695  case $UNAME in
5696  [\\/]* | ?:[\\/]*)
5697  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5698  ;;
5699  *)
5700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701for as_dir in $PATH
5702do
5703  IFS=$as_save_IFS
5704  test -z "$as_dir" && as_dir=.
5705    for ac_exec_ext in '' $ac_executable_extensions; do
5706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5707    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709    break 2
5710  fi
5711done
5712  done
5713IFS=$as_save_IFS
5714
5715  ;;
5716esac
5717fi
5718UNAME=$ac_cv_path_UNAME
5719if test -n "$UNAME"; then
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5721$as_echo "$UNAME" >&6; }
5722else
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725fi
5726
5727
5728  test -n "$UNAME" && break
5729done
5730
5731
5732    if test "x$UNAME" = x; then
5733        if test "xuname" = x; then
5734          PROG_NAME=uname
5735        else
5736          PROG_NAME=uname
5737        fi
5738        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5739$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5740        as_fn_error $? "Cannot continue" "$LINENO" 5
5741    fi
5742
5743
5744
5745    for ac_prog in uniq
5746do
5747  # Extract the first word of "$ac_prog", so it can be a program name with args.
5748set dummy $ac_prog; ac_word=$2
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5750$as_echo_n "checking for $ac_word... " >&6; }
5751if test "${ac_cv_path_UNIQ+set}" = set; then :
5752  $as_echo_n "(cached) " >&6
5753else
5754  case $UNIQ in
5755  [\\/]* | ?:[\\/]*)
5756  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5757  ;;
5758  *)
5759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5760for as_dir in $PATH
5761do
5762  IFS=$as_save_IFS
5763  test -z "$as_dir" && as_dir=.
5764    for ac_exec_ext in '' $ac_executable_extensions; do
5765  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5766    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5768    break 2
5769  fi
5770done
5771  done
5772IFS=$as_save_IFS
5773
5774  ;;
5775esac
5776fi
5777UNIQ=$ac_cv_path_UNIQ
5778if test -n "$UNIQ"; then
5779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5780$as_echo "$UNIQ" >&6; }
5781else
5782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783$as_echo "no" >&6; }
5784fi
5785
5786
5787  test -n "$UNIQ" && break
5788done
5789
5790
5791    if test "x$UNIQ" = x; then
5792        if test "xuniq" = x; then
5793          PROG_NAME=uniq
5794        else
5795          PROG_NAME=uniq
5796        fi
5797        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5798$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5799        as_fn_error $? "Cannot continue" "$LINENO" 5
5800    fi
5801
5802
5803
5804    for ac_prog in wc
5805do
5806  # Extract the first word of "$ac_prog", so it can be a program name with args.
5807set dummy $ac_prog; ac_word=$2
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5809$as_echo_n "checking for $ac_word... " >&6; }
5810if test "${ac_cv_path_WC+set}" = set; then :
5811  $as_echo_n "(cached) " >&6
5812else
5813  case $WC in
5814  [\\/]* | ?:[\\/]*)
5815  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5816  ;;
5817  *)
5818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5819for as_dir in $PATH
5820do
5821  IFS=$as_save_IFS
5822  test -z "$as_dir" && as_dir=.
5823    for ac_exec_ext in '' $ac_executable_extensions; do
5824  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5825    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5827    break 2
5828  fi
5829done
5830  done
5831IFS=$as_save_IFS
5832
5833  ;;
5834esac
5835fi
5836WC=$ac_cv_path_WC
5837if test -n "$WC"; then
5838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5839$as_echo "$WC" >&6; }
5840else
5841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5842$as_echo "no" >&6; }
5843fi
5844
5845
5846  test -n "$WC" && break
5847done
5848
5849
5850    if test "x$WC" = x; then
5851        if test "xwc" = x; then
5852          PROG_NAME=wc
5853        else
5854          PROG_NAME=wc
5855        fi
5856        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5857$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5858        as_fn_error $? "Cannot continue" "$LINENO" 5
5859    fi
5860
5861
5862
5863    for ac_prog in which
5864do
5865  # Extract the first word of "$ac_prog", so it can be a program name with args.
5866set dummy $ac_prog; ac_word=$2
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5868$as_echo_n "checking for $ac_word... " >&6; }
5869if test "${ac_cv_path_WHICH+set}" = set; then :
5870  $as_echo_n "(cached) " >&6
5871else
5872  case $WHICH in
5873  [\\/]* | ?:[\\/]*)
5874  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5875  ;;
5876  *)
5877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878for as_dir in $PATH
5879do
5880  IFS=$as_save_IFS
5881  test -z "$as_dir" && as_dir=.
5882    for ac_exec_ext in '' $ac_executable_extensions; do
5883  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5884    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886    break 2
5887  fi
5888done
5889  done
5890IFS=$as_save_IFS
5891
5892  ;;
5893esac
5894fi
5895WHICH=$ac_cv_path_WHICH
5896if test -n "$WHICH"; then
5897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5898$as_echo "$WHICH" >&6; }
5899else
5900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901$as_echo "no" >&6; }
5902fi
5903
5904
5905  test -n "$WHICH" && break
5906done
5907
5908
5909    if test "x$WHICH" = x; then
5910        if test "xwhich" = x; then
5911          PROG_NAME=which
5912        else
5913          PROG_NAME=which
5914        fi
5915        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5916$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5917        as_fn_error $? "Cannot continue" "$LINENO" 5
5918    fi
5919
5920
5921
5922    for ac_prog in xargs
5923do
5924  # Extract the first word of "$ac_prog", so it can be a program name with args.
5925set dummy $ac_prog; ac_word=$2
5926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5927$as_echo_n "checking for $ac_word... " >&6; }
5928if test "${ac_cv_path_XARGS+set}" = set; then :
5929  $as_echo_n "(cached) " >&6
5930else
5931  case $XARGS in
5932  [\\/]* | ?:[\\/]*)
5933  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5934  ;;
5935  *)
5936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5937for as_dir in $PATH
5938do
5939  IFS=$as_save_IFS
5940  test -z "$as_dir" && as_dir=.
5941    for ac_exec_ext in '' $ac_executable_extensions; do
5942  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5943    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5945    break 2
5946  fi
5947done
5948  done
5949IFS=$as_save_IFS
5950
5951  ;;
5952esac
5953fi
5954XARGS=$ac_cv_path_XARGS
5955if test -n "$XARGS"; then
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5957$as_echo "$XARGS" >&6; }
5958else
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
5961fi
5962
5963
5964  test -n "$XARGS" && break
5965done
5966
5967
5968    if test "x$XARGS" = x; then
5969        if test "xxargs" = x; then
5970          PROG_NAME=xargs
5971        else
5972          PROG_NAME=xargs
5973        fi
5974        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5975$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5976        as_fn_error $? "Cannot continue" "$LINENO" 5
5977    fi
5978
5979
5980
5981# Then required tools that require some special treatment.
5982for ac_prog in gawk mawk nawk awk
5983do
5984  # Extract the first word of "$ac_prog", so it can be a program name with args.
5985set dummy $ac_prog; ac_word=$2
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
5988if test "${ac_cv_prog_AWK+set}" = set; then :
5989  $as_echo_n "(cached) " >&6
5990else
5991  if test -n "$AWK"; then
5992  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5993else
5994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_exec_ext in '' $ac_executable_extensions; do
6000  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6001    ac_cv_prog_AWK="$ac_prog"
6002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003    break 2
6004  fi
6005done
6006  done
6007IFS=$as_save_IFS
6008
6009fi
6010fi
6011AWK=$ac_cv_prog_AWK
6012if test -n "$AWK"; then
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6014$as_echo "$AWK" >&6; }
6015else
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
6018fi
6019
6020
6021  test -n "$AWK" && break
6022done
6023
6024
6025    if test "x$AWK" = x; then
6026        if test "x" = x; then
6027          PROG_NAME=awk
6028        else
6029          PROG_NAME=
6030        fi
6031        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6032$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6033        as_fn_error $? "Cannot continue" "$LINENO" 5
6034    fi
6035
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6037$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6038if test "${ac_cv_path_GREP+set}" = set; then :
6039  $as_echo_n "(cached) " >&6
6040else
6041  if test -z "$GREP"; then
6042  ac_path_GREP_found=false
6043  # Loop through the user's path and test for each of PROGNAME-LIST
6044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6046do
6047  IFS=$as_save_IFS
6048  test -z "$as_dir" && as_dir=.
6049    for ac_prog in grep ggrep; do
6050    for ac_exec_ext in '' $ac_executable_extensions; do
6051      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6052      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6053# Check for GNU ac_path_GREP and select it if it is found.
6054  # Check for GNU $ac_path_GREP
6055case `"$ac_path_GREP" --version 2>&1` in
6056*GNU*)
6057  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6058*)
6059  ac_count=0
6060  $as_echo_n 0123456789 >"conftest.in"
6061  while :
6062  do
6063    cat "conftest.in" "conftest.in" >"conftest.tmp"
6064    mv "conftest.tmp" "conftest.in"
6065    cp "conftest.in" "conftest.nl"
6066    $as_echo 'GREP' >> "conftest.nl"
6067    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6068    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6069    as_fn_arith $ac_count + 1 && ac_count=$as_val
6070    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6071      # Best one so far, save it but keep looking for a better one
6072      ac_cv_path_GREP="$ac_path_GREP"
6073      ac_path_GREP_max=$ac_count
6074    fi
6075    # 10*(2^10) chars as input seems more than enough
6076    test $ac_count -gt 10 && break
6077  done
6078  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6079esac
6080
6081      $ac_path_GREP_found && break 3
6082    done
6083  done
6084  done
6085IFS=$as_save_IFS
6086  if test -z "$ac_cv_path_GREP"; then
6087    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6088  fi
6089else
6090  ac_cv_path_GREP=$GREP
6091fi
6092
6093fi
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6095$as_echo "$ac_cv_path_GREP" >&6; }
6096 GREP="$ac_cv_path_GREP"
6097
6098
6099
6100    if test "x$GREP" = x; then
6101        if test "x" = x; then
6102          PROG_NAME=grep
6103        else
6104          PROG_NAME=
6105        fi
6106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6108        as_fn_error $? "Cannot continue" "$LINENO" 5
6109    fi
6110
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6112$as_echo_n "checking for egrep... " >&6; }
6113if test "${ac_cv_path_EGREP+set}" = set; then :
6114  $as_echo_n "(cached) " >&6
6115else
6116  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6117   then ac_cv_path_EGREP="$GREP -E"
6118   else
6119     if test -z "$EGREP"; then
6120  ac_path_EGREP_found=false
6121  # Loop through the user's path and test for each of PROGNAME-LIST
6122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6123for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6124do
6125  IFS=$as_save_IFS
6126  test -z "$as_dir" && as_dir=.
6127    for ac_prog in egrep; do
6128    for ac_exec_ext in '' $ac_executable_extensions; do
6129      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6130      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6131# Check for GNU ac_path_EGREP and select it if it is found.
6132  # Check for GNU $ac_path_EGREP
6133case `"$ac_path_EGREP" --version 2>&1` in
6134*GNU*)
6135  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6136*)
6137  ac_count=0
6138  $as_echo_n 0123456789 >"conftest.in"
6139  while :
6140  do
6141    cat "conftest.in" "conftest.in" >"conftest.tmp"
6142    mv "conftest.tmp" "conftest.in"
6143    cp "conftest.in" "conftest.nl"
6144    $as_echo 'EGREP' >> "conftest.nl"
6145    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6146    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6147    as_fn_arith $ac_count + 1 && ac_count=$as_val
6148    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6149      # Best one so far, save it but keep looking for a better one
6150      ac_cv_path_EGREP="$ac_path_EGREP"
6151      ac_path_EGREP_max=$ac_count
6152    fi
6153    # 10*(2^10) chars as input seems more than enough
6154    test $ac_count -gt 10 && break
6155  done
6156  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6157esac
6158
6159      $ac_path_EGREP_found && break 3
6160    done
6161  done
6162  done
6163IFS=$as_save_IFS
6164  if test -z "$ac_cv_path_EGREP"; then
6165    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6166  fi
6167else
6168  ac_cv_path_EGREP=$EGREP
6169fi
6170
6171   fi
6172fi
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6174$as_echo "$ac_cv_path_EGREP" >&6; }
6175 EGREP="$ac_cv_path_EGREP"
6176
6177
6178
6179    if test "x$EGREP" = x; then
6180        if test "x" = x; then
6181          PROG_NAME=egrep
6182        else
6183          PROG_NAME=
6184        fi
6185        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6186$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6187        as_fn_error $? "Cannot continue" "$LINENO" 5
6188    fi
6189
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6191$as_echo_n "checking for fgrep... " >&6; }
6192if test "${ac_cv_path_FGREP+set}" = set; then :
6193  $as_echo_n "(cached) " >&6
6194else
6195  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6196   then ac_cv_path_FGREP="$GREP -F"
6197   else
6198     if test -z "$FGREP"; then
6199  ac_path_FGREP_found=false
6200  # Loop through the user's path and test for each of PROGNAME-LIST
6201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6203do
6204  IFS=$as_save_IFS
6205  test -z "$as_dir" && as_dir=.
6206    for ac_prog in fgrep; do
6207    for ac_exec_ext in '' $ac_executable_extensions; do
6208      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6209      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6210# Check for GNU ac_path_FGREP and select it if it is found.
6211  # Check for GNU $ac_path_FGREP
6212case `"$ac_path_FGREP" --version 2>&1` in
6213*GNU*)
6214  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6215*)
6216  ac_count=0
6217  $as_echo_n 0123456789 >"conftest.in"
6218  while :
6219  do
6220    cat "conftest.in" "conftest.in" >"conftest.tmp"
6221    mv "conftest.tmp" "conftest.in"
6222    cp "conftest.in" "conftest.nl"
6223    $as_echo 'FGREP' >> "conftest.nl"
6224    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6225    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6226    as_fn_arith $ac_count + 1 && ac_count=$as_val
6227    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6228      # Best one so far, save it but keep looking for a better one
6229      ac_cv_path_FGREP="$ac_path_FGREP"
6230      ac_path_FGREP_max=$ac_count
6231    fi
6232    # 10*(2^10) chars as input seems more than enough
6233    test $ac_count -gt 10 && break
6234  done
6235  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6236esac
6237
6238      $ac_path_FGREP_found && break 3
6239    done
6240  done
6241  done
6242IFS=$as_save_IFS
6243  if test -z "$ac_cv_path_FGREP"; then
6244    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6245  fi
6246else
6247  ac_cv_path_FGREP=$FGREP
6248fi
6249
6250   fi
6251fi
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6253$as_echo "$ac_cv_path_FGREP" >&6; }
6254 FGREP="$ac_cv_path_FGREP"
6255
6256
6257
6258    if test "x$FGREP" = x; then
6259        if test "x" = x; then
6260          PROG_NAME=fgrep
6261        else
6262          PROG_NAME=
6263        fi
6264        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6265$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6266        as_fn_error $? "Cannot continue" "$LINENO" 5
6267    fi
6268
6269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6270$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6271if test "${ac_cv_path_SED+set}" = set; then :
6272  $as_echo_n "(cached) " >&6
6273else
6274            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6275     for ac_i in 1 2 3 4 5 6 7; do
6276       ac_script="$ac_script$as_nl$ac_script"
6277     done
6278     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6279     { ac_script=; unset ac_script;}
6280     if test -z "$SED"; then
6281  ac_path_SED_found=false
6282  # Loop through the user's path and test for each of PROGNAME-LIST
6283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284for as_dir in $PATH
6285do
6286  IFS=$as_save_IFS
6287  test -z "$as_dir" && as_dir=.
6288    for ac_prog in sed gsed; do
6289    for ac_exec_ext in '' $ac_executable_extensions; do
6290      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6291      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6292# Check for GNU ac_path_SED and select it if it is found.
6293  # Check for GNU $ac_path_SED
6294case `"$ac_path_SED" --version 2>&1` in
6295*GNU*)
6296  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6297*)
6298  ac_count=0
6299  $as_echo_n 0123456789 >"conftest.in"
6300  while :
6301  do
6302    cat "conftest.in" "conftest.in" >"conftest.tmp"
6303    mv "conftest.tmp" "conftest.in"
6304    cp "conftest.in" "conftest.nl"
6305    $as_echo '' >> "conftest.nl"
6306    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6307    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6308    as_fn_arith $ac_count + 1 && ac_count=$as_val
6309    if test $ac_count -gt ${ac_path_SED_max-0}; then
6310      # Best one so far, save it but keep looking for a better one
6311      ac_cv_path_SED="$ac_path_SED"
6312      ac_path_SED_max=$ac_count
6313    fi
6314    # 10*(2^10) chars as input seems more than enough
6315    test $ac_count -gt 10 && break
6316  done
6317  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6318esac
6319
6320      $ac_path_SED_found && break 3
6321    done
6322  done
6323  done
6324IFS=$as_save_IFS
6325  if test -z "$ac_cv_path_SED"; then
6326    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6327  fi
6328else
6329  ac_cv_path_SED=$SED
6330fi
6331
6332fi
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6334$as_echo "$ac_cv_path_SED" >&6; }
6335 SED="$ac_cv_path_SED"
6336  rm -f conftest.sed
6337
6338
6339    if test "x$SED" = x; then
6340        if test "x" = x; then
6341          PROG_NAME=sed
6342        else
6343          PROG_NAME=
6344        fi
6345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6347        as_fn_error $? "Cannot continue" "$LINENO" 5
6348    fi
6349
6350
6351for ac_prog in nawk gawk awk
6352do
6353  # Extract the first word of "$ac_prog", so it can be a program name with args.
6354set dummy $ac_prog; ac_word=$2
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6356$as_echo_n "checking for $ac_word... " >&6; }
6357if test "${ac_cv_path_NAWK+set}" = set; then :
6358  $as_echo_n "(cached) " >&6
6359else
6360  case $NAWK in
6361  [\\/]* | ?:[\\/]*)
6362  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6363  ;;
6364  *)
6365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH
6367do
6368  IFS=$as_save_IFS
6369  test -z "$as_dir" && as_dir=.
6370    for ac_exec_ext in '' $ac_executable_extensions; do
6371  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6372    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6374    break 2
6375  fi
6376done
6377  done
6378IFS=$as_save_IFS
6379
6380  ;;
6381esac
6382fi
6383NAWK=$ac_cv_path_NAWK
6384if test -n "$NAWK"; then
6385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6386$as_echo "$NAWK" >&6; }
6387else
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; }
6390fi
6391
6392
6393  test -n "$NAWK" && break
6394done
6395
6396
6397    if test "x$NAWK" = x; then
6398        if test "x" = x; then
6399          PROG_NAME=nawk
6400        else
6401          PROG_NAME=
6402        fi
6403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6404$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6405        as_fn_error $? "Cannot continue" "$LINENO" 5
6406    fi
6407
6408
6409# Always force rm.
6410RM="$RM -f"
6411
6412# These are not required on all platforms
6413# Extract the first word of "cygpath", so it can be a program name with args.
6414set dummy cygpath; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if test "${ac_cv_path_CYGPATH+set}" = set; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $CYGPATH in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6432    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443CYGPATH=$ac_cv_path_CYGPATH
6444if test -n "$CYGPATH"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6446$as_echo "$CYGPATH" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453# Extract the first word of "readlink", so it can be a program name with args.
6454set dummy readlink; ac_word=$2
6455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6456$as_echo_n "checking for $ac_word... " >&6; }
6457if test "${ac_cv_path_READLINK+set}" = set; then :
6458  $as_echo_n "(cached) " >&6
6459else
6460  case $READLINK in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6466for as_dir in $PATH
6467do
6468  IFS=$as_save_IFS
6469  test -z "$as_dir" && as_dir=.
6470    for ac_exec_ext in '' $ac_executable_extensions; do
6471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6472    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6474    break 2
6475  fi
6476done
6477  done
6478IFS=$as_save_IFS
6479
6480  ;;
6481esac
6482fi
6483READLINK=$ac_cv_path_READLINK
6484if test -n "$READLINK"; then
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6486$as_echo "$READLINK" >&6; }
6487else
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6489$as_echo "no" >&6; }
6490fi
6491
6492
6493# Extract the first word of "df", so it can be a program name with args.
6494set dummy df; ac_word=$2
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6496$as_echo_n "checking for $ac_word... " >&6; }
6497if test "${ac_cv_path_DF+set}" = set; then :
6498  $as_echo_n "(cached) " >&6
6499else
6500  case $DF in
6501  [\\/]* | ?:[\\/]*)
6502  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6503  ;;
6504  *)
6505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6506for as_dir in $PATH
6507do
6508  IFS=$as_save_IFS
6509  test -z "$as_dir" && as_dir=.
6510    for ac_exec_ext in '' $ac_executable_extensions; do
6511  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6512    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6514    break 2
6515  fi
6516done
6517  done
6518IFS=$as_save_IFS
6519
6520  ;;
6521esac
6522fi
6523DF=$ac_cv_path_DF
6524if test -n "$DF"; then
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6526$as_echo "$DF" >&6; }
6527else
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531
6532
6533# Extract the first word of "SetFile", so it can be a program name with args.
6534set dummy SetFile; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if test "${ac_cv_path_SETFILE+set}" = set; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $SETFILE in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6552    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563SETFILE=$ac_cv_path_SETFILE
6564if test -n "$SETFILE"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6566$as_echo "$SETFILE" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573
6574
6575# Now we can determine OpenJDK build and target platforms. This is required to
6576# have early on.
6577# Make sure we can run config.sub.
6578$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6579  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6580
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6582$as_echo_n "checking build system type... " >&6; }
6583if test "${ac_cv_build+set}" = set; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  ac_build_alias=$build_alias
6587test "x$ac_build_alias" = x &&
6588  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6589test "x$ac_build_alias" = x &&
6590  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6591ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6592  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6596$as_echo "$ac_cv_build" >&6; }
6597case $ac_cv_build in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6600esac
6601build=$ac_cv_build
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_build
6604shift
6605build_cpu=$1
6606build_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610build_os=$*
6611IFS=$ac_save_IFS
6612case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6613
6614
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6616$as_echo_n "checking host system type... " >&6; }
6617if test "${ac_cv_host+set}" = set; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  if test "x$host_alias" = x; then
6621  ac_cv_host=$ac_cv_build
6622else
6623  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6624    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6625fi
6626
6627fi
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6629$as_echo "$ac_cv_host" >&6; }
6630case $ac_cv_host in
6631*-*-*) ;;
6632*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6633esac
6634host=$ac_cv_host
6635ac_save_IFS=$IFS; IFS='-'
6636set x $ac_cv_host
6637shift
6638host_cpu=$1
6639host_vendor=$2
6640shift; shift
6641# Remember, the first character of IFS is used to create $*,
6642# except with old shells:
6643host_os=$*
6644IFS=$ac_save_IFS
6645case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6646
6647
6648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6649$as_echo_n "checking target system type... " >&6; }
6650if test "${ac_cv_target+set}" = set; then :
6651  $as_echo_n "(cached) " >&6
6652else
6653  if test "x$target_alias" = x; then
6654  ac_cv_target=$ac_cv_host
6655else
6656  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6657    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6658fi
6659
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6662$as_echo "$ac_cv_target" >&6; }
6663case $ac_cv_target in
6664*-*-*) ;;
6665*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6666esac
6667target=$ac_cv_target
6668ac_save_IFS=$IFS; IFS='-'
6669set x $ac_cv_target
6670shift
6671target_cpu=$1
6672target_vendor=$2
6673shift; shift
6674# Remember, the first character of IFS is used to create $*,
6675# except with old shells:
6676target_os=$*
6677IFS=$ac_save_IFS
6678case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6679
6680
6681# The aliases save the names the user supplied, while $host etc.
6682# will get canonicalized.
6683test -n "$target_alias" &&
6684  test "$program_prefix$program_suffix$program_transform_name" = \
6685    NONENONEs,x,x, &&
6686  program_prefix=${target_alias}-
6687
6688# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6689# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6690# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6691# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6692# to use the configure naming style.
6693
6694
6695
6696
6697
6698    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6699    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6700    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6701    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6702    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6703    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6704
6705
6706
6707    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6708
6709  case "$build_os" in
6710    *linux*)
6711      VAR_OS=linux
6712      VAR_OS_API=posix
6713      VAR_OS_ENV=linux
6714      ;;
6715    *solaris*)
6716      VAR_OS=solaris
6717      VAR_OS_API=posix
6718      VAR_OS_ENV=solaris
6719      ;;
6720    *darwin*)
6721      VAR_OS=macosx
6722      VAR_OS_API=posix
6723      VAR_OS_ENV=macosx
6724      ;;
6725    *bsd*)
6726      VAR_OS=bsd
6727      VAR_OS_API=posix
6728      VAR_OS_ENV=bsd
6729      ;;
6730    *cygwin*)
6731      VAR_OS=windows
6732      VAR_OS_API=winapi
6733      VAR_OS_ENV=windows.cygwin
6734      ;;
6735    *mingw*)
6736      VAR_OS=windows
6737      VAR_OS_API=winapi
6738      VAR_OS_ENV=windows.msys
6739      ;;
6740    *)
6741      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6742      ;;
6743  esac
6744
6745
6746  # First argument is the cpu name from the trip/quad
6747  case "$build_cpu" in
6748    x86_64)
6749      VAR_CPU=x86_64
6750      VAR_CPU_ARCH=x86
6751      VAR_CPU_BITS=64
6752      VAR_CPU_ENDIAN=little
6753      ;;
6754    i?86)
6755      VAR_CPU=x86
6756      VAR_CPU_ARCH=x86
6757      VAR_CPU_BITS=32
6758      VAR_CPU_ENDIAN=little
6759      ;;
6760    arm*)
6761      VAR_CPU=arm
6762      VAR_CPU_ARCH=arm
6763      VAR_CPU_BITS=32
6764      VAR_CPU_ENDIAN=little
6765      ;;
6766    powerpc)
6767      VAR_CPU=ppc
6768      VAR_CPU_ARCH=ppc
6769      VAR_CPU_BITS=32
6770      VAR_CPU_ENDIAN=big
6771       ;;
6772    powerpc64)
6773      VAR_CPU=ppc64
6774      VAR_CPU_ARCH=ppc
6775      VAR_CPU_BITS=64
6776      VAR_CPU_ENDIAN=big
6777       ;;
6778    sparc)
6779      VAR_CPU=sparc
6780      VAR_CPU_ARCH=sparc
6781      VAR_CPU_BITS=32
6782      VAR_CPU_ENDIAN=big
6783       ;;
6784    sparcv9)
6785      VAR_CPU=sparcv9
6786      VAR_CPU_ARCH=sparc
6787      VAR_CPU_BITS=64
6788      VAR_CPU_ENDIAN=big
6789       ;;
6790    *)
6791      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6792      ;;
6793  esac
6794
6795    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6796    OPENJDK_BUILD_OS="$VAR_OS"
6797    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6798    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6799    OPENJDK_BUILD_CPU="$VAR_CPU"
6800    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6801    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6802    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6803
6804
6805
6806
6807
6808
6809
6810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6811$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6813$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6814
6815    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6816
6817  case "$host_os" in
6818    *linux*)
6819      VAR_OS=linux
6820      VAR_OS_API=posix
6821      VAR_OS_ENV=linux
6822      ;;
6823    *solaris*)
6824      VAR_OS=solaris
6825      VAR_OS_API=posix
6826      VAR_OS_ENV=solaris
6827      ;;
6828    *darwin*)
6829      VAR_OS=macosx
6830      VAR_OS_API=posix
6831      VAR_OS_ENV=macosx
6832      ;;
6833    *bsd*)
6834      VAR_OS=bsd
6835      VAR_OS_API=posix
6836      VAR_OS_ENV=bsd
6837      ;;
6838    *cygwin*)
6839      VAR_OS=windows
6840      VAR_OS_API=winapi
6841      VAR_OS_ENV=windows.cygwin
6842      ;;
6843    *mingw*)
6844      VAR_OS=windows
6845      VAR_OS_API=winapi
6846      VAR_OS_ENV=windows.msys
6847      ;;
6848    *)
6849      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6850      ;;
6851  esac
6852
6853
6854  # First argument is the cpu name from the trip/quad
6855  case "$host_cpu" in
6856    x86_64)
6857      VAR_CPU=x86_64
6858      VAR_CPU_ARCH=x86
6859      VAR_CPU_BITS=64
6860      VAR_CPU_ENDIAN=little
6861      ;;
6862    i?86)
6863      VAR_CPU=x86
6864      VAR_CPU_ARCH=x86
6865      VAR_CPU_BITS=32
6866      VAR_CPU_ENDIAN=little
6867      ;;
6868    arm*)
6869      VAR_CPU=arm
6870      VAR_CPU_ARCH=arm
6871      VAR_CPU_BITS=32
6872      VAR_CPU_ENDIAN=little
6873      ;;
6874    powerpc)
6875      VAR_CPU=ppc
6876      VAR_CPU_ARCH=ppc
6877      VAR_CPU_BITS=32
6878      VAR_CPU_ENDIAN=big
6879       ;;
6880    powerpc64)
6881      VAR_CPU=ppc64
6882      VAR_CPU_ARCH=ppc
6883      VAR_CPU_BITS=64
6884      VAR_CPU_ENDIAN=big
6885       ;;
6886    sparc)
6887      VAR_CPU=sparc
6888      VAR_CPU_ARCH=sparc
6889      VAR_CPU_BITS=32
6890      VAR_CPU_ENDIAN=big
6891       ;;
6892    sparcv9)
6893      VAR_CPU=sparcv9
6894      VAR_CPU_ARCH=sparc
6895      VAR_CPU_BITS=64
6896      VAR_CPU_ENDIAN=big
6897       ;;
6898    *)
6899      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6900      ;;
6901  esac
6902
6903    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6904    OPENJDK_TARGET_OS="$VAR_OS"
6905    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6906    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6907    OPENJDK_TARGET_CPU="$VAR_CPU"
6908    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6909    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6910    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6911
6912
6913
6914
6915
6916
6917
6918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6919$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6921$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6922
6923
6924
6925# Check whether --with-target-bits was given.
6926if test "${with_target_bits+set}" = set; then :
6927  withval=$with_target_bits;
6928fi
6929
6930
6931  # We have three types of compiles:
6932  # native  == normal compilation, target system == build system
6933  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6934  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6935  #
6936  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6937    # We're doing a proper cross-compilation
6938    COMPILE_TYPE="cross"
6939  else
6940    COMPILE_TYPE="native"
6941  fi
6942
6943  if test "x$with_target_bits" != x; then
6944    if test "x$COMPILE_TYPE" = "xcross"; then
6945      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6946    fi
6947
6948    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6949      # A reduced build is requested
6950      COMPILE_TYPE="reduced"
6951      OPENJDK_TARGET_CPU_BITS=32
6952      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6953        OPENJDK_TARGET_CPU=x86
6954      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6955        OPENJDK_TARGET_CPU=sparc
6956      else
6957        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6958      fi
6959    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6960      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
6961    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6962      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6963$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6964    else
6965      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6966    fi
6967  fi
6968
6969
6970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6971$as_echo_n "checking compilation type... " >&6; }
6972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6973$as_echo "$COMPILE_TYPE" >&6; }
6974
6975
6976    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6977       REQUIRED_OS_NAME=SunOS
6978       REQUIRED_OS_VERSION=5.10
6979    fi
6980    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6981       REQUIRED_OS_NAME=Linux
6982       REQUIRED_OS_VERSION=2.6
6983    fi
6984    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6985        REQUIRED_OS_NAME=Windows
6986        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6987            REQUIRED_OS_VERSION=5.2
6988        else
6989            REQUIRED_OS_VERSION=5.1
6990        fi
6991    fi
6992    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6993        REQUIRED_OS_NAME=Darwin
6994        REQUIRED_OS_VERSION=11.2
6995    fi
6996
6997
6998
6999
7000
7001    # Also store the legacy naming of the cpu.
7002    # Ie i586 and amd64 instead of x86 and x86_64
7003    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7004    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7005      OPENJDK_TARGET_CPU_LEGACY="i586"
7006    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7007      # On all platforms except MacOSX replace x86_64 with amd64.
7008      OPENJDK_TARGET_CPU_LEGACY="amd64"
7009    fi
7010
7011
7012    # And the second legacy naming of the cpu.
7013    # Ie i386 and amd64 instead of x86 and x86_64.
7014    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7015    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7016      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7017    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7018      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7019    fi
7020
7021
7022    # This is the name of the cpu (but using i386 and amd64 instead of
7023    # x86 and x86_64, respectively), preceeded by a /, to be used when
7024    # locating libraries. On macosx, it's empty, though.
7025    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7026    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7027        OPENJDK_TARGET_CPU_LIBDIR=""
7028    fi
7029
7030
7031    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7032    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7033    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7034    OPENJDK_TARGET_CPU_ISADIR=""
7035    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7036      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7037          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7038      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7039          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7040      fi
7041    fi
7042
7043
7044    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7045    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7046    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7047      # On linux only, we replace x86 with i386.
7048      OPENJDK_TARGET_CPU_OSARCH="i386"
7049    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7050      # On all platforms except macosx, we replace x86_64 with amd64.
7051      OPENJDK_TARGET_CPU_OSARCH="amd64"
7052    fi
7053
7054
7055    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7056    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7057      OPENJDK_TARGET_CPU_JLI="i386"
7058    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7059      # On all platforms except macosx, we replace x86_64 with amd64.
7060      OPENJDK_TARGET_CPU_JLI="amd64"
7061    fi
7062    # Now setup the -D flags for building libjli.
7063    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7064    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7065      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7066        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7067      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7068        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7069      fi
7070    fi
7071
7072
7073    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7074    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7075        OPENJDK_TARGET_OS_API_DIR="solaris"
7076    fi
7077    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7078        OPENJDK_TARGET_OS_API_DIR="windows"
7079    fi
7080
7081
7082    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7083        A_LP64="LP64:="
7084        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7085        # unpack200.exe
7086        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7087            ADD_LP64="-D_LP64=1"
7088        fi
7089    fi
7090    LP64=$A_LP64
7091
7092
7093    if test "x$COMPILE_TYPE" = "xcross"; then
7094      # FIXME: ... or should this include reduced builds..?
7095      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7096    else
7097      DEFINE_CROSS_COMPILE_ARCH=""
7098    fi
7099
7100
7101    # Some Zero and Shark settings.
7102    # ZERO_ARCHFLAG tells the compiler which mode to build for
7103    case "${OPENJDK_TARGET_CPU}" in
7104      s390)
7105        ZERO_ARCHFLAG="-m31"
7106        ;;
7107      *)
7108        ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
7109    esac
7110
7111
7112    # ZERO_ARCHDEF is used to enable architecture-specific code
7113    case "${OPENJDK_TARGET_CPU}" in
7114      ppc*)    ZERO_ARCHDEF=PPC   ;;
7115      s390*)   ZERO_ARCHDEF=S390  ;;
7116      sparc*)  ZERO_ARCHDEF=SPARC ;;
7117      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7118      x86)     ZERO_ARCHDEF=IA32  ;;
7119      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7120    esac
7121
7122
7123
7124
7125
7126# Continue setting up basic stuff. Most remaining code require fundamental tools.
7127
7128# Locate the directory of this script.
7129SCRIPT="$0"
7130
7131    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7132        # Follow a chain of symbolic links. Use readlink
7133        # where it exists, else fall back to horribly
7134        # complicated shell code.
7135        if test "x$READLINK_TESTED" != yes; then
7136            # On MacOSX there is a readlink tool with a different
7137            # purpose than the GNU readlink tool. Check the found readlink.
7138            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7139            if test "x$ISGNU" = x; then
7140                 # A readlink that we do not know how to use.
7141                 # Are there other non-GNU readlinks out there?
7142                 READLINK_TESTED=yes
7143                 READLINK=
7144            fi
7145        fi
7146
7147        if test "x$READLINK" != x; then
7148            SCRIPT=`$READLINK -f $SCRIPT`
7149        else
7150            # Save the current directory for restoring afterwards
7151            STARTDIR=$PWD
7152            COUNTER=0
7153            sym_link_dir=`$DIRNAME $SCRIPT`
7154            sym_link_file=`$BASENAME $SCRIPT`
7155            # Use the system pwd and not the shell builtin to resolve directory symlinks
7156            cd $sym_link_dir
7157            cd `$THEPWDCMD`
7158            sym_link_dir=`$THEPWDCMD`
7159            # Resolve file symlinks
7160            while test $COUNTER -lt 20; do
7161                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7162                if test "x$ISLINK" == x; then
7163                    # This is not a symbolic link! We are done!
7164                    break
7165                fi
7166                # Again resolve directory symlinks since the target of the just found
7167                # link could be in a different directory
7168                cd `$DIRNAME $ISLINK`
7169                sym_link_dir=`$THEPWDCMD`
7170                sym_link_file=`$BASENAME $ISLINK`
7171                let COUNTER=COUNTER+1
7172            done
7173            cd $STARTDIR
7174            SCRIPT=$sym_link_dir/$sym_link_file
7175        fi
7176    fi
7177
7178AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7179
7180# Where is the source? It is located two levels above the configure script.
7181CURDIR="$PWD"
7182cd "$AUTOCONF_DIR/../.."
7183SRC_ROOT="`$THEPWDCMD`"
7184
7185if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7186  PATH_SEP=";"
7187
7188  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7189  if test $SRC_ROOT_LENGTH -gt 100; then
7190      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7191  fi
7192
7193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7195$as_echo_n "checking cygwin release... " >&6; }
7196    CYGWIN_VERSION=`$UNAME -r`
7197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7198$as_echo "$CYGWIN_VERSION" >&6; }
7199    WINDOWS_ENV_VENDOR='cygwin'
7200    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7201
7202    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7203    if test "x$CYGWIN_VERSION_OK" = x; then
7204      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
7205$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
7206      as_fn_error $? "Cannot continue" "$LINENO" 5
7207    fi
7208    if test "x$CYGPATH" = x; then
7209        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7210    fi
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7212$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7213    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7214    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7215    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7216    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7218$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7219    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7220    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7221    if test "x$test_cygdrive_prefix" = x; then
7222        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7223    fi
7224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7226$as_echo_n "checking msys release... " >&6; }
7227    MSYS_VERSION=`$UNAME -r`
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7229$as_echo "$MSYS_VERSION" >&6; }
7230
7231    WINDOWS_ENV_VENDOR='msys'
7232    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7233
7234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7235$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7236    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7237    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7238
7239  windows_path="$MSYS_ROOT_PATH"
7240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7241    unix_path=`$CYGPATH -u "$windows_path"`
7242    MSYS_ROOT_PATH="$unix_path"
7243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7245    MSYS_ROOT_PATH="$unix_path"
7246  fi
7247
7248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7249$as_echo "$MSYS_ROOT_PATH" >&6; }
7250    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7251  else
7252    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7253  fi
7254
7255  # Test if windows or unix (cygwin/msys) find is first in path.
7256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7257$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7258  FIND_BINARY_OUTPUT=`find --version 2>&1`
7259  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7260    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7261$as_echo "unix style" >&6; }
7262  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7264$as_echo "Windows" >&6; }
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7266$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7267    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
7268$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7269    as_fn_error $? "Cannot continue" "$LINENO" 5
7270  else
7271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7272$as_echo "unknown" >&6; }
7273    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7274$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7275  fi
7276
7277else
7278  PATH_SEP=":"
7279fi
7280
7281
7282
7283cd "$CURDIR"
7284
7285
7286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7287
7288  # Input might be given as Windows format, start by converting to
7289  # unix format.
7290  path="$SRC_ROOT"
7291  new_path=`$CYGPATH -u "$path"`
7292
7293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7296  # "foo.exe" is OK but "foo" is an error.
7297  #
7298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7299  # It is also a way to make sure we got the proper file name for the real test later on.
7300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7301  if test "x$test_shortpath" = x; then
7302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7303$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7304    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7305  fi
7306
7307  # Call helper function which possibly converts this using DOS-style short mode.
7308  # If so, the updated path is stored in $new_path.
7309
7310  input_path="$new_path"
7311  # Check if we need to convert this using DOS-style short mode. If the path
7312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7313  # take no chances and rewrite it.
7314  # Note: m4 eats our [], so we need to use [ and ] instead.
7315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7316  if test "x$has_forbidden_chars" != x; then
7317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7321      # Going to short mode and back again did indeed matter. Since short mode is
7322      # case insensitive, let's make it lowercase to improve readability.
7323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7324      # Now convert it back to Unix-stile (cygpath)
7325      input_path=`$CYGPATH -u "$shortmode_path"`
7326      new_path="$input_path"
7327    fi
7328  fi
7329
7330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7331  if test "x$test_cygdrive_prefix" = x; then
7332    # As a simple fix, exclude /usr/bin since it's not a real path.
7333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7335      # a path prefixed by /cygdrive for fixpath to work.
7336      new_path="$CYGWIN_ROOT_PATH$input_path"
7337    fi
7338  fi
7339
7340
7341  if test "x$path" != "x$new_path"; then
7342    SRC_ROOT="$new_path"
7343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7344$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7345  fi
7346
7347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7348
7349  path="$SRC_ROOT"
7350  has_colon=`$ECHO $path | $GREP ^.:`
7351  new_path="$path"
7352  if test "x$has_colon" = x; then
7353    # Not in mixed or Windows style, start by that.
7354    new_path=`cmd //c echo $path`
7355  fi
7356
7357
7358  input_path="$new_path"
7359  # Check if we need to convert this using DOS-style short mode. If the path
7360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7361  # take no chances and rewrite it.
7362  # Note: m4 eats our [], so we need to use [ and ] instead.
7363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7364  if test "x$has_forbidden_chars" != x; then
7365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7367  fi
7368
7369
7370  windows_path="$new_path"
7371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7372    unix_path=`$CYGPATH -u "$windows_path"`
7373    new_path="$unix_path"
7374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7376    new_path="$unix_path"
7377  fi
7378
7379  if test "x$path" != "x$new_path"; then
7380    SRC_ROOT="$new_path"
7381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7382$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7383  fi
7384
7385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7387
7388  else
7389    # We're on a posix platform. Hooray! :)
7390    path="$SRC_ROOT"
7391
7392    if test ! -f "$path" && test ! -d "$path"; then
7393      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7394    fi
7395
7396    has_space=`$ECHO "$path" | $GREP " "`
7397    if test "x$has_space" != x; then
7398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7399$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7400      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7401    fi
7402  fi
7403
7404
7405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7406
7407  # Input might be given as Windows format, start by converting to
7408  # unix format.
7409  path="$CURDIR"
7410  new_path=`$CYGPATH -u "$path"`
7411
7412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7415  # "foo.exe" is OK but "foo" is an error.
7416  #
7417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7418  # It is also a way to make sure we got the proper file name for the real test later on.
7419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7420  if test "x$test_shortpath" = x; then
7421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7422$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7423    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7424  fi
7425
7426  # Call helper function which possibly converts this using DOS-style short mode.
7427  # If so, the updated path is stored in $new_path.
7428
7429  input_path="$new_path"
7430  # Check if we need to convert this using DOS-style short mode. If the path
7431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7432  # take no chances and rewrite it.
7433  # Note: m4 eats our [], so we need to use [ and ] instead.
7434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7435  if test "x$has_forbidden_chars" != x; then
7436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7440      # Going to short mode and back again did indeed matter. Since short mode is
7441      # case insensitive, let's make it lowercase to improve readability.
7442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7443      # Now convert it back to Unix-stile (cygpath)
7444      input_path=`$CYGPATH -u "$shortmode_path"`
7445      new_path="$input_path"
7446    fi
7447  fi
7448
7449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7450  if test "x$test_cygdrive_prefix" = x; then
7451    # As a simple fix, exclude /usr/bin since it's not a real path.
7452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7454      # a path prefixed by /cygdrive for fixpath to work.
7455      new_path="$CYGWIN_ROOT_PATH$input_path"
7456    fi
7457  fi
7458
7459
7460  if test "x$path" != "x$new_path"; then
7461    CURDIR="$new_path"
7462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7463$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7464  fi
7465
7466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7467
7468  path="$CURDIR"
7469  has_colon=`$ECHO $path | $GREP ^.:`
7470  new_path="$path"
7471  if test "x$has_colon" = x; then
7472    # Not in mixed or Windows style, start by that.
7473    new_path=`cmd //c echo $path`
7474  fi
7475
7476
7477  input_path="$new_path"
7478  # Check if we need to convert this using DOS-style short mode. If the path
7479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7480  # take no chances and rewrite it.
7481  # Note: m4 eats our [], so we need to use [ and ] instead.
7482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7483  if test "x$has_forbidden_chars" != x; then
7484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7486  fi
7487
7488
7489  windows_path="$new_path"
7490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7491    unix_path=`$CYGPATH -u "$windows_path"`
7492    new_path="$unix_path"
7493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7495    new_path="$unix_path"
7496  fi
7497
7498  if test "x$path" != "x$new_path"; then
7499    CURDIR="$new_path"
7500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7501$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7502  fi
7503
7504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7506
7507  else
7508    # We're on a posix platform. Hooray! :)
7509    path="$CURDIR"
7510
7511    if test ! -f "$path" && test ! -d "$path"; then
7512      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7513    fi
7514
7515    has_space=`$ECHO "$path" | $GREP " "`
7516    if test "x$has_space" != x; then
7517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7518$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7519      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7520    fi
7521  fi
7522
7523
7524if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7525    # Add extra search paths on solaris for utilities like ar and as etc...
7526    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7527fi
7528
7529# You can force the sys-root if the sys-root encoded into the cross compiler tools
7530# is not correct.
7531
7532# Check whether --with-sys-root was given.
7533if test "${with_sys_root+set}" = set; then :
7534  withval=$with_sys_root;
7535fi
7536
7537
7538if test "x$with_sys_root" != x; then
7539  SYS_ROOT=$with_sys_root
7540else
7541  SYS_ROOT=/
7542fi
7543
7544
7545
7546# Check whether --with-tools-dir was given.
7547if test "${with_tools_dir+set}" = set; then :
7548  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7549fi
7550
7551
7552
7553# Check whether --with-devkit was given.
7554if test "${with_devkit+set}" = set; then :
7555  withval=$with_devkit;
7556    if test "x$with_sys_root" != x; then
7557      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7558    fi
7559    if test "x$with_tools_dir" != x; then
7560      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7561    fi
7562    TOOLS_DIR=$with_devkit/bin
7563    SYS_ROOT=$with_devkit/$host_alias/libc
7564
7565fi
7566
7567
7568
7569
7570# Setup default logging of stdout and stderr to build.log in the output root.
7571BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7572BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7573BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7574
7575
7576
7577
7578
7579# Check if it's a pure open build or if custom sources are to be used.
7580
7581  # Check whether --enable-openjdk-only was given.
7582if test "${enable_openjdk_only+set}" = set; then :
7583  enableval=$enable_openjdk_only;
7584else
7585  enable_openjdk_only="no"
7586fi
7587
7588
7589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7590$as_echo_n "checking for presence of closed sources... " >&6; }
7591  if test -d "$SRC_ROOT/jdk/src/closed"; then
7592    CLOSED_SOURCE_PRESENT=yes
7593  else
7594    CLOSED_SOURCE_PRESENT=no
7595  fi
7596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7597$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7598
7599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7600$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7601  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7603$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7604
7605  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7606    OPENJDK=true
7607    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7608      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7609$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7610    fi
7611  else
7612    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7613      OPENJDK=true
7614    else
7615      OPENJDK=false
7616    fi
7617  fi
7618
7619  if test "x$OPENJDK" = "xtrue"; then
7620    SET_OPENJDK="OPENJDK=true"
7621  fi
7622
7623
7624
7625
7626# These are needed to be able to create a configuration name (and thus the output directory)
7627
7628###############################################################################
7629#
7630# Check which variant of the JDK that we want to build.
7631# Currently we have:
7632#    normal:   standard edition
7633# but the custom make system may add other variants
7634#
7635# Effectively the JDK variant gives a name to a specific set of
7636# modules to compile into the JDK. In the future, these modules
7637# might even be Jigsaw modules.
7638#
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7640$as_echo_n "checking which variant of the JDK to build... " >&6; }
7641
7642# Check whether --with-jdk-variant was given.
7643if test "${with_jdk_variant+set}" = set; then :
7644  withval=$with_jdk_variant;
7645fi
7646
7647
7648if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7649    JDK_VARIANT="normal"
7650else
7651    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7652fi
7653
7654
7655
7656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7657$as_echo "$JDK_VARIANT" >&6; }
7658
7659
7660
7661###############################################################################
7662#
7663# Check which variants of the JVM that we want to build.
7664# Currently we have:
7665#    server: normal interpreter and a tiered C1/C2 compiler
7666#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7667#    minimal1: reduced form of client with optional VM services and features stripped out
7668#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7669#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7670#    zero: no machine code interpreter, no compiler
7671#    zeroshark: zero interpreter and shark/llvm compiler backend
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7673$as_echo_n "checking which variants of the JVM to build... " >&6; }
7674
7675# Check whether --with-jvm-variants was given.
7676if test "${with_jvm_variants+set}" = set; then :
7677  withval=$with_jvm_variants;
7678fi
7679
7680
7681if test "x$with_jvm_variants" = x; then
7682     with_jvm_variants="server"
7683fi
7684
7685JVM_VARIANTS=",$with_jvm_variants,"
7686TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7687
7688if test "x$TEST_VARIANTS" != "x,"; then
7689   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7690fi
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7692$as_echo "$with_jvm_variants" >&6; }
7693
7694JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7695JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7696JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7697JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7698JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7699JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7700
7701if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7702    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7703        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7704    fi
7705fi
7706if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7707    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7708        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7709    fi
7710fi
7711if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7712    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7713        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7714    fi
7715fi
7716
7717# Replace the commas with AND for use in the build directory name.
7718ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7719COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7720if test "x$COUNT_VARIANTS" != "x,1"; then
7721    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7722else
7723    BUILDING_MULTIPLE_JVM_VARIANTS=no
7724fi
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734INCLUDE_SA=true
7735if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7736    INCLUDE_SA=false
7737fi
7738if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7739    INCLUDE_SA=false
7740fi
7741
7742
7743if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7744   MACOSX_UNIVERSAL="true"
7745fi
7746
7747
7748
7749
7750
7751###############################################################################
7752#
7753# Set the debug level
7754#    release: no debug information, all optimizations, no asserts.
7755#    fastdebug: debug information (-g), all optimizations, all asserts
7756#    slowdebug: debug information (-g), no optimizations, all asserts
7757#
7758DEBUG_LEVEL="release"
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7760$as_echo_n "checking which debug level to use... " >&6; }
7761# Check whether --enable-debug was given.
7762if test "${enable_debug+set}" = set; then :
7763  enableval=$enable_debug;
7764        ENABLE_DEBUG="${enableval}"
7765        DEBUG_LEVEL="fastdebug"
7766
7767else
7768  ENABLE_DEBUG="no"
7769fi
7770
7771
7772
7773# Check whether --with-debug-level was given.
7774if test "${with_debug_level+set}" = set; then :
7775  withval=$with_debug_level;
7776        DEBUG_LEVEL="${withval}"
7777        if test "x$ENABLE_DEBUG" = xyes; then
7778			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7779        fi
7780
7781fi
7782
7783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7784$as_echo "$DEBUG_LEVEL" >&6; }
7785
7786if test "x$DEBUG_LEVEL" != xrelease && \
7787   test "x$DEBUG_LEVEL" != xfastdebug && \
7788   test "x$DEBUG_LEVEL" != xslowdebug; then
7789   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7790fi
7791
7792
7793###############################################################################
7794#
7795# Setup legacy vars/targets and new vars to deal with different debug levels.
7796#
7797
7798case $DEBUG_LEVEL in
7799      release )
7800          VARIANT="OPT"
7801          FASTDEBUG="false"
7802          DEBUG_CLASSFILES="false"
7803          BUILD_VARIANT_RELEASE=""
7804          HOTSPOT_DEBUG_LEVEL="product"
7805          HOTSPOT_EXPORT="product"
7806           ;;
7807      fastdebug )
7808          VARIANT="DBG"
7809          FASTDEBUG="true"
7810          DEBUG_CLASSFILES="true"
7811          BUILD_VARIANT_RELEASE="-fastdebug"
7812          HOTSPOT_DEBUG_LEVEL="fastdebug"
7813          HOTSPOT_EXPORT="fastdebug"
7814           ;;
7815      slowdebug )
7816          VARIANT="DBG"
7817          FASTDEBUG="false"
7818          DEBUG_CLASSFILES="true"
7819          BUILD_VARIANT_RELEASE="-debug"
7820          HOTSPOT_DEBUG_LEVEL="jvmg"
7821          HOTSPOT_EXPORT="debug"
7822           ;;
7823esac
7824
7825#####
7826# Generate the legacy makefile targets for hotspot.
7827# The hotspot api for selecting the build artifacts, really, needs to be improved.
7828# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7829# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7830# But until then ...
7831HOTSPOT_TARGET=""
7832
7833if test "x$JVM_VARIANT_SERVER" = xtrue; then
7834    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7835fi
7836
7837if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7838    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7839fi
7840
7841if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7842    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7843fi
7844
7845if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7846    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7847fi
7848
7849if test "x$JVM_VARIANT_ZERO" = xtrue; then
7850    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7851fi
7852
7853if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7854    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7855fi
7856
7857HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7858
7859# On Macosx universal binaries are produced, but they only contain
7860# 64 bit intel. This invalidates control of which jvms are built
7861# from configure, but only server is valid anyway. Fix this
7862# when hotspot makefiles are rewritten.
7863if test "x$MACOSX_UNIVERSAL" = xtrue; then
7864    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7865fi
7866
7867#####
7868
7869
7870
7871
7872
7873
7874
7875
7876# With basic setup done, call the custom early hook.
7877
7878
7879# To properly create a configuration name, we need to have the OpenJDK target
7880# and options (variants and debug level) parsed.
7881
7882
7883
7884# Check whether --with-conf-name was given.
7885if test "${with_conf_name+set}" = set; then :
7886  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7887fi
7888
7889
7890# Test from where we are running configure, in or outside of src root.
7891# To enable comparison of directories, CURDIR needs to be symlink free
7892# just like SRC_ROOT already is
7893NOSYM_CURDIR="$CURDIR"
7894
7895    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7896        # Follow a chain of symbolic links. Use readlink
7897        # where it exists, else fall back to horribly
7898        # complicated shell code.
7899        if test "x$READLINK_TESTED" != yes; then
7900            # On MacOSX there is a readlink tool with a different
7901            # purpose than the GNU readlink tool. Check the found readlink.
7902            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7903            if test "x$ISGNU" = x; then
7904                 # A readlink that we do not know how to use.
7905                 # Are there other non-GNU readlinks out there?
7906                 READLINK_TESTED=yes
7907                 READLINK=
7908            fi
7909        fi
7910
7911        if test "x$READLINK" != x; then
7912            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7913        else
7914            # Save the current directory for restoring afterwards
7915            STARTDIR=$PWD
7916            COUNTER=0
7917            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7918            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7919            # Use the system pwd and not the shell builtin to resolve directory symlinks
7920            cd $sym_link_dir
7921            cd `$THEPWDCMD`
7922            sym_link_dir=`$THEPWDCMD`
7923            # Resolve file symlinks
7924            while test $COUNTER -lt 20; do
7925                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7926                if test "x$ISLINK" == x; then
7927                    # This is not a symbolic link! We are done!
7928                    break
7929                fi
7930                # Again resolve directory symlinks since the target of the just found
7931                # link could be in a different directory
7932                cd `$DIRNAME $ISLINK`
7933                sym_link_dir=`$THEPWDCMD`
7934                sym_link_file=`$BASENAME $ISLINK`
7935                let COUNTER=COUNTER+1
7936            done
7937            cd $STARTDIR
7938            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7939        fi
7940    fi
7941
7942if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7943        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7944        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7945    # We are running configure from the src root.
7946    # Create a default ./build/target-variant-debuglevel output root.
7947    if test "x${CONF_NAME}" = x; then
7948        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7949    fi
7950    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7951    $MKDIR -p "$OUTPUT_ROOT"
7952    if test ! -d "$OUTPUT_ROOT"; then
7953        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7954    fi
7955else
7956    # We are running configure from outside of the src dir.
7957    # Then use the current directory as output dir!
7958    # If configuration is situated in normal build directory, just use the build
7959    # directory name as configuration name, otherwise use the complete path.
7960    if test "x${CONF_NAME}" = x; then
7961        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7962    fi
7963    OUTPUT_ROOT="$CURDIR"
7964
7965    # WARNING: This might be a bad thing to do. You need to be sure you want to
7966    # have a configuration in this directory. Do some sanity checks!
7967
7968    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7969      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7970      # other files
7971      files_present=`$LS $OUTPUT_ROOT`
7972      # Configure has already touched config.log and confdefs.h in the current dir when this check
7973      # is performed.
7974      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7975                                             | $TR -d '\n'`
7976      if test "x$filtered_files" != x; then
7977        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7978$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7979        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7980$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7981        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7982$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7983        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7984$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7985        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7986$as_echo "$as_me: seriously mess up just about everything." >&6;}
7987        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7988$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7990$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7991        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7992      fi
7993    fi
7994fi
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7996$as_echo_n "checking what configuration name to use... " >&6; }
7997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7998$as_echo "$CONF_NAME" >&6; }
7999
8000
8001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8002
8003  # Input might be given as Windows format, start by converting to
8004  # unix format.
8005  path="$OUTPUT_ROOT"
8006  new_path=`$CYGPATH -u "$path"`
8007
8008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8011  # "foo.exe" is OK but "foo" is an error.
8012  #
8013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8014  # It is also a way to make sure we got the proper file name for the real test later on.
8015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8016  if test "x$test_shortpath" = x; then
8017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8018$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8019    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8020  fi
8021
8022  # Call helper function which possibly converts this using DOS-style short mode.
8023  # If so, the updated path is stored in $new_path.
8024
8025  input_path="$new_path"
8026  # Check if we need to convert this using DOS-style short mode. If the path
8027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8028  # take no chances and rewrite it.
8029  # Note: m4 eats our [], so we need to use [ and ] instead.
8030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8031  if test "x$has_forbidden_chars" != x; then
8032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8036      # Going to short mode and back again did indeed matter. Since short mode is
8037      # case insensitive, let's make it lowercase to improve readability.
8038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8039      # Now convert it back to Unix-stile (cygpath)
8040      input_path=`$CYGPATH -u "$shortmode_path"`
8041      new_path="$input_path"
8042    fi
8043  fi
8044
8045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8046  if test "x$test_cygdrive_prefix" = x; then
8047    # As a simple fix, exclude /usr/bin since it's not a real path.
8048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8050      # a path prefixed by /cygdrive for fixpath to work.
8051      new_path="$CYGWIN_ROOT_PATH$input_path"
8052    fi
8053  fi
8054
8055
8056  if test "x$path" != "x$new_path"; then
8057    OUTPUT_ROOT="$new_path"
8058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8059$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8060  fi
8061
8062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8063
8064  path="$OUTPUT_ROOT"
8065  has_colon=`$ECHO $path | $GREP ^.:`
8066  new_path="$path"
8067  if test "x$has_colon" = x; then
8068    # Not in mixed or Windows style, start by that.
8069    new_path=`cmd //c echo $path`
8070  fi
8071
8072
8073  input_path="$new_path"
8074  # Check if we need to convert this using DOS-style short mode. If the path
8075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8076  # take no chances and rewrite it.
8077  # Note: m4 eats our [], so we need to use [ and ] instead.
8078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8079  if test "x$has_forbidden_chars" != x; then
8080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8082  fi
8083
8084
8085  windows_path="$new_path"
8086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8087    unix_path=`$CYGPATH -u "$windows_path"`
8088    new_path="$unix_path"
8089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8091    new_path="$unix_path"
8092  fi
8093
8094  if test "x$path" != "x$new_path"; then
8095    OUTPUT_ROOT="$new_path"
8096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8097$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8098  fi
8099
8100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8102
8103  else
8104    # We're on a posix platform. Hooray! :)
8105    path="$OUTPUT_ROOT"
8106
8107    if test ! -f "$path" && test ! -d "$path"; then
8108      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8109    fi
8110
8111    has_space=`$ECHO "$path" | $GREP " "`
8112    if test "x$has_space" != x; then
8113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8114$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8115      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8116    fi
8117  fi
8118
8119
8120SPEC=$OUTPUT_ROOT/spec.gmk
8121
8122CONF_NAME=$CONF_NAME
8123
8124OUTPUT_ROOT=$OUTPUT_ROOT
8125
8126
8127# Most of the probed defines are put into config.h
8128ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8129
8130# The spec.gmk file contains all variables for the make system.
8131ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8132
8133# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8134ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8135
8136# The bootcycle-spec.gmk file contains support for boot cycle builds.
8137ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8138
8139# The compare.sh is used to compare the build output to other builds.
8140ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8141
8142# Spec.sh is currently used by compare-objects.sh
8143ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8144
8145# The generated Makefile knows where the spec.gmk is and where the source is.
8146# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8147# which will look for generated configurations
8148ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8149
8150
8151# Save the arguments given to us
8152echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8153
8154
8155# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8156
8157    for ac_prog in apt-get yum port pkgutil pkgadd
8158do
8159  # Extract the first word of "$ac_prog", so it can be a program name with args.
8160set dummy $ac_prog; ac_word=$2
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8162$as_echo_n "checking for $ac_word... " >&6; }
8163if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8164  $as_echo_n "(cached) " >&6
8165else
8166  if test -n "$PKGHANDLER"; then
8167  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8168else
8169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170for as_dir in $PATH
8171do
8172  IFS=$as_save_IFS
8173  test -z "$as_dir" && as_dir=.
8174    for ac_exec_ext in '' $ac_executable_extensions; do
8175  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8176    ac_cv_prog_PKGHANDLER="$ac_prog"
8177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178    break 2
8179  fi
8180done
8181  done
8182IFS=$as_save_IFS
8183
8184fi
8185fi
8186PKGHANDLER=$ac_cv_prog_PKGHANDLER
8187if test -n "$PKGHANDLER"; then
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8189$as_echo "$PKGHANDLER" >&6; }
8190else
8191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8192$as_echo "no" >&6; }
8193fi
8194
8195
8196  test -n "$PKGHANDLER" && break
8197done
8198
8199
8200
8201# Setup tools that requires more complex handling, or that is not needed by the configure script.
8202
8203
8204  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8205  if test "x$MAKE" != x; then
8206    # User has supplied a make, test it.
8207    if test ! -f "$MAKE"; then
8208      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8209    fi
8210
8211  MAKE_CANDIDATE=""$MAKE""
8212  DESCRIPTION="user supplied MAKE=$MAKE"
8213  if test "x$MAKE_CANDIDATE" != x; then
8214    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8215$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8216    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8217    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8218    if test "x$IS_GNU_MAKE" = x; then
8219      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8220$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8221    else
8222      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8223      if test "x$IS_MODERN_MAKE" = x; then
8224        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8225$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8226      else
8227        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8228          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8229            MAKE_EXPECTED_ENV='cygwin'
8230          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8231            MAKE_EXPECTED_ENV='msys'
8232          else
8233            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8234          fi
8235          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8236          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8237        else
8238          # Not relevant for non-Windows
8239          IS_MAKE_CORRECT_ENV=true
8240        fi
8241        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8242          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8243$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8244        else
8245          FOUND_MAKE=$MAKE_CANDIDATE
8246
8247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8248
8249  # First separate the path from the arguments. This will split at the first
8250  # space.
8251  complete="$FOUND_MAKE"
8252  path="${complete%% *}"
8253  tmp="$complete EOL"
8254  arguments="${tmp#* }"
8255
8256  # Input might be given as Windows format, start by converting to
8257  # unix format.
8258  new_path=`$CYGPATH -u "$path"`
8259
8260  # Now try to locate executable using which
8261  new_path=`$WHICH "$new_path" 2> /dev/null`
8262  # bat and cmd files are not always considered executable in cygwin causing which
8263  # to not find them
8264  if test "x$new_path" = x \
8265           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8266           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8267    new_path=`$CYGPATH -u "$path"`
8268  fi
8269  if test "x$new_path" = x; then
8270    # Oops. Which didn't find the executable.
8271    # The splitting of arguments from the executable at a space might have been incorrect,
8272    # since paths with space are more likely in Windows. Give it another try with the whole
8273    # argument.
8274    path="$complete"
8275    arguments="EOL"
8276    new_path=`$CYGPATH -u "$path"`
8277    new_path=`$WHICH "$new_path" 2> /dev/null`
8278    # bat and cmd files are not always considered executable in cygwin causing which
8279    # to not find them
8280    if test "x$new_path" = x \
8281             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8282             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8283      new_path=`$CYGPATH -u "$path"`
8284    fi
8285    if test "x$new_path" = x; then
8286      # It's still not found. Now this is an unrecoverable error.
8287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8288$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8289      has_space=`$ECHO "$complete" | $GREP " "`
8290      if test "x$has_space" != x; then
8291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8293      fi
8294      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8295    fi
8296  fi
8297
8298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8301  # "foo.exe" is OK but "foo" is an error.
8302  #
8303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8304  # It is also a way to make sure we got the proper file name for the real test later on.
8305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8306  if test "x$test_shortpath" = x; then
8307    # Short path failed, file does not exist as specified.
8308    # Try adding .exe or .cmd
8309    if test -f "${new_path}.exe"; then
8310       input_to_shortpath="${new_path}.exe"
8311    elif test -f "${new_path}.cmd"; then
8312       input_to_shortpath="${new_path}.cmd"
8313    else
8314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8315$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8318      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8319    fi
8320  else
8321    input_to_shortpath="$new_path"
8322  fi
8323
8324  # Call helper function which possibly converts this using DOS-style short mode.
8325  # If so, the updated path is stored in $new_path.
8326  new_path="$input_to_shortpath"
8327
8328  input_path="$input_to_shortpath"
8329  # Check if we need to convert this using DOS-style short mode. If the path
8330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8331  # take no chances and rewrite it.
8332  # Note: m4 eats our [], so we need to use [ and ] instead.
8333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8334  if test "x$has_forbidden_chars" != x; then
8335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8339      # Going to short mode and back again did indeed matter. Since short mode is
8340      # case insensitive, let's make it lowercase to improve readability.
8341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8342      # Now convert it back to Unix-stile (cygpath)
8343      input_path=`$CYGPATH -u "$shortmode_path"`
8344      new_path="$input_path"
8345    fi
8346  fi
8347
8348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8349  if test "x$test_cygdrive_prefix" = x; then
8350    # As a simple fix, exclude /usr/bin since it's not a real path.
8351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8353      # a path prefixed by /cygdrive for fixpath to work.
8354      new_path="$CYGWIN_ROOT_PATH$input_path"
8355    fi
8356  fi
8357
8358  # remove trailing .exe if any
8359  new_path="${new_path/%.exe/}"
8360
8361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8362
8363  # First separate the path from the arguments. This will split at the first
8364  # space.
8365  complete="$FOUND_MAKE"
8366  path="${complete%% *}"
8367  tmp="$complete EOL"
8368  arguments="${tmp#* }"
8369
8370  # Input might be given as Windows format, start by converting to
8371  # unix format.
8372  new_path="$path"
8373
8374  windows_path="$new_path"
8375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8376    unix_path=`$CYGPATH -u "$windows_path"`
8377    new_path="$unix_path"
8378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8380    new_path="$unix_path"
8381  fi
8382
8383
8384  # Now try to locate executable using which
8385  new_path=`$WHICH "$new_path" 2> /dev/null`
8386
8387  if test "x$new_path" = x; then
8388    # Oops. Which didn't find the executable.
8389    # The splitting of arguments from the executable at a space might have been incorrect,
8390    # since paths with space are more likely in Windows. Give it another try with the whole
8391    # argument.
8392    path="$complete"
8393    arguments="EOL"
8394    new_path="$path"
8395
8396  windows_path="$new_path"
8397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8398    unix_path=`$CYGPATH -u "$windows_path"`
8399    new_path="$unix_path"
8400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8402    new_path="$unix_path"
8403  fi
8404
8405
8406    new_path=`$WHICH "$new_path" 2> /dev/null`
8407
8408    if test "x$new_path" = x; then
8409      # It's still not found. Now this is an unrecoverable error.
8410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8412      has_space=`$ECHO "$complete" | $GREP " "`
8413      if test "x$has_space" != x; then
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8416      fi
8417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8418    fi
8419  fi
8420
8421  # Now new_path has a complete unix path to the binary
8422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8423    # Keep paths in /bin as-is, but remove trailing .exe if any
8424    new_path="${new_path/%.exe/}"
8425    # Do not save /bin paths to all_fixpath_prefixes!
8426  else
8427    # Not in mixed or Windows style, start by that.
8428    new_path=`cmd //c echo $new_path`
8429
8430  input_path="$new_path"
8431  # Check if we need to convert this using DOS-style short mode. If the path
8432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8433  # take no chances and rewrite it.
8434  # Note: m4 eats our [], so we need to use [ and ] instead.
8435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8436  if test "x$has_forbidden_chars" != x; then
8437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8439  fi
8440
8441    # Output is in $new_path
8442
8443  windows_path="$new_path"
8444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8445    unix_path=`$CYGPATH -u "$windows_path"`
8446    new_path="$unix_path"
8447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8449    new_path="$unix_path"
8450  fi
8451
8452    # remove trailing .exe if any
8453    new_path="${new_path/%.exe/}"
8454
8455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8457  fi
8458
8459  else
8460    # We're on a posix platform. Hooray! :)
8461    # First separate the path from the arguments. This will split at the first
8462    # space.
8463    complete="$FOUND_MAKE"
8464    path="${complete%% *}"
8465    tmp="$complete EOL"
8466    arguments="${tmp#* }"
8467
8468    # Cannot rely on the command "which" here since it doesn't always work.
8469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8470    if test -z "$is_absolute_path"; then
8471      # Path to executable is not absolute. Find it.
8472      IFS_save="$IFS"
8473      IFS=:
8474      for p in $PATH; do
8475        if test -f "$p/$path" && test -x "$p/$path"; then
8476          new_path="$p/$path"
8477          break
8478        fi
8479      done
8480      IFS="$IFS_save"
8481    else
8482      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8483$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8484      new_path="$path"
8485    fi
8486
8487    if test "x$new_path" = x; then
8488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8490        has_space=`$ECHO "$complete" | $GREP " "`
8491        if test "x$has_space" != x; then
8492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8494        fi
8495        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8496      fi
8497  fi
8498
8499      # Now join together the path and the arguments once again
8500      if test "x$arguments" != xEOL; then
8501        new_complete="$new_path ${arguments% *}"
8502      else
8503        new_complete="$new_path"
8504      fi
8505
8506  if test "x$complete" != "x$new_complete"; then
8507      FOUND_MAKE="$new_complete"
8508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8509$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8510    fi
8511
8512        fi
8513      fi
8514    fi
8515  fi
8516
8517    if test "x$FOUND_MAKE" = x; then
8518      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8519    fi
8520  else
8521    # Try our hardest to locate a correct version of GNU make
8522    for ac_prog in gmake
8523do
8524  # Extract the first word of "$ac_prog", so it can be a program name with args.
8525set dummy $ac_prog; ac_word=$2
8526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8527$as_echo_n "checking for $ac_word... " >&6; }
8528if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8529  $as_echo_n "(cached) " >&6
8530else
8531  case $CHECK_GMAKE in
8532  [\\/]* | ?:[\\/]*)
8533  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8534  ;;
8535  *)
8536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8537for as_dir in $PATH
8538do
8539  IFS=$as_save_IFS
8540  test -z "$as_dir" && as_dir=.
8541    for ac_exec_ext in '' $ac_executable_extensions; do
8542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8543    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8545    break 2
8546  fi
8547done
8548  done
8549IFS=$as_save_IFS
8550
8551  ;;
8552esac
8553fi
8554CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8555if test -n "$CHECK_GMAKE"; then
8556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8557$as_echo "$CHECK_GMAKE" >&6; }
8558else
8559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8560$as_echo "no" >&6; }
8561fi
8562
8563
8564  test -n "$CHECK_GMAKE" && break
8565done
8566
8567
8568  MAKE_CANDIDATE=""$CHECK_GMAKE""
8569  DESCRIPTION="gmake in PATH"
8570  if test "x$MAKE_CANDIDATE" != x; then
8571    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8572$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8573    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8574    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8575    if test "x$IS_GNU_MAKE" = x; then
8576      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8577$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8578    else
8579      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8580      if test "x$IS_MODERN_MAKE" = x; then
8581        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8582$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8583      else
8584        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8585          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8586            MAKE_EXPECTED_ENV='cygwin'
8587          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8588            MAKE_EXPECTED_ENV='msys'
8589          else
8590            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8591          fi
8592          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8593          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8594        else
8595          # Not relevant for non-Windows
8596          IS_MAKE_CORRECT_ENV=true
8597        fi
8598        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8599          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8600$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8601        else
8602          FOUND_MAKE=$MAKE_CANDIDATE
8603
8604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8605
8606  # First separate the path from the arguments. This will split at the first
8607  # space.
8608  complete="$FOUND_MAKE"
8609  path="${complete%% *}"
8610  tmp="$complete EOL"
8611  arguments="${tmp#* }"
8612
8613  # Input might be given as Windows format, start by converting to
8614  # unix format.
8615  new_path=`$CYGPATH -u "$path"`
8616
8617  # Now try to locate executable using which
8618  new_path=`$WHICH "$new_path" 2> /dev/null`
8619  # bat and cmd files are not always considered executable in cygwin causing which
8620  # to not find them
8621  if test "x$new_path" = x \
8622           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8623           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8624    new_path=`$CYGPATH -u "$path"`
8625  fi
8626  if test "x$new_path" = x; then
8627    # Oops. Which didn't find the executable.
8628    # The splitting of arguments from the executable at a space might have been incorrect,
8629    # since paths with space are more likely in Windows. Give it another try with the whole
8630    # argument.
8631    path="$complete"
8632    arguments="EOL"
8633    new_path=`$CYGPATH -u "$path"`
8634    new_path=`$WHICH "$new_path" 2> /dev/null`
8635    # bat and cmd files are not always considered executable in cygwin causing which
8636    # to not find them
8637    if test "x$new_path" = x \
8638             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8639             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8640      new_path=`$CYGPATH -u "$path"`
8641    fi
8642    if test "x$new_path" = x; then
8643      # It's still not found. Now this is an unrecoverable error.
8644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8646      has_space=`$ECHO "$complete" | $GREP " "`
8647      if test "x$has_space" != x; then
8648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8650      fi
8651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8652    fi
8653  fi
8654
8655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8658  # "foo.exe" is OK but "foo" is an error.
8659  #
8660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8661  # It is also a way to make sure we got the proper file name for the real test later on.
8662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8663  if test "x$test_shortpath" = x; then
8664    # Short path failed, file does not exist as specified.
8665    # Try adding .exe or .cmd
8666    if test -f "${new_path}.exe"; then
8667       input_to_shortpath="${new_path}.exe"
8668    elif test -f "${new_path}.cmd"; then
8669       input_to_shortpath="${new_path}.cmd"
8670    else
8671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8672$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8673      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8674$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8676    fi
8677  else
8678    input_to_shortpath="$new_path"
8679  fi
8680
8681  # Call helper function which possibly converts this using DOS-style short mode.
8682  # If so, the updated path is stored in $new_path.
8683  new_path="$input_to_shortpath"
8684
8685  input_path="$input_to_shortpath"
8686  # Check if we need to convert this using DOS-style short mode. If the path
8687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8688  # take no chances and rewrite it.
8689  # Note: m4 eats our [], so we need to use [ and ] instead.
8690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8691  if test "x$has_forbidden_chars" != x; then
8692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8696      # Going to short mode and back again did indeed matter. Since short mode is
8697      # case insensitive, let's make it lowercase to improve readability.
8698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8699      # Now convert it back to Unix-stile (cygpath)
8700      input_path=`$CYGPATH -u "$shortmode_path"`
8701      new_path="$input_path"
8702    fi
8703  fi
8704
8705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8706  if test "x$test_cygdrive_prefix" = x; then
8707    # As a simple fix, exclude /usr/bin since it's not a real path.
8708    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8710      # a path prefixed by /cygdrive for fixpath to work.
8711      new_path="$CYGWIN_ROOT_PATH$input_path"
8712    fi
8713  fi
8714
8715  # remove trailing .exe if any
8716  new_path="${new_path/%.exe/}"
8717
8718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8719
8720  # First separate the path from the arguments. This will split at the first
8721  # space.
8722  complete="$FOUND_MAKE"
8723  path="${complete%% *}"
8724  tmp="$complete EOL"
8725  arguments="${tmp#* }"
8726
8727  # Input might be given as Windows format, start by converting to
8728  # unix format.
8729  new_path="$path"
8730
8731  windows_path="$new_path"
8732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8733    unix_path=`$CYGPATH -u "$windows_path"`
8734    new_path="$unix_path"
8735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8737    new_path="$unix_path"
8738  fi
8739
8740
8741  # Now try to locate executable using which
8742  new_path=`$WHICH "$new_path" 2> /dev/null`
8743
8744  if test "x$new_path" = x; then
8745    # Oops. Which didn't find the executable.
8746    # The splitting of arguments from the executable at a space might have been incorrect,
8747    # since paths with space are more likely in Windows. Give it another try with the whole
8748    # argument.
8749    path="$complete"
8750    arguments="EOL"
8751    new_path="$path"
8752
8753  windows_path="$new_path"
8754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8755    unix_path=`$CYGPATH -u "$windows_path"`
8756    new_path="$unix_path"
8757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8759    new_path="$unix_path"
8760  fi
8761
8762
8763    new_path=`$WHICH "$new_path" 2> /dev/null`
8764
8765    if test "x$new_path" = x; then
8766      # It's still not found. Now this is an unrecoverable error.
8767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8769      has_space=`$ECHO "$complete" | $GREP " "`
8770      if test "x$has_space" != x; then
8771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8773      fi
8774      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8775    fi
8776  fi
8777
8778  # Now new_path has a complete unix path to the binary
8779  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8780    # Keep paths in /bin as-is, but remove trailing .exe if any
8781    new_path="${new_path/%.exe/}"
8782    # Do not save /bin paths to all_fixpath_prefixes!
8783  else
8784    # Not in mixed or Windows style, start by that.
8785    new_path=`cmd //c echo $new_path`
8786
8787  input_path="$new_path"
8788  # Check if we need to convert this using DOS-style short mode. If the path
8789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8790  # take no chances and rewrite it.
8791  # Note: m4 eats our [], so we need to use [ and ] instead.
8792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8793  if test "x$has_forbidden_chars" != x; then
8794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8796  fi
8797
8798    # Output is in $new_path
8799
8800  windows_path="$new_path"
8801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8802    unix_path=`$CYGPATH -u "$windows_path"`
8803    new_path="$unix_path"
8804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8806    new_path="$unix_path"
8807  fi
8808
8809    # remove trailing .exe if any
8810    new_path="${new_path/%.exe/}"
8811
8812    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8813    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8814  fi
8815
8816  else
8817    # We're on a posix platform. Hooray! :)
8818    # First separate the path from the arguments. This will split at the first
8819    # space.
8820    complete="$FOUND_MAKE"
8821    path="${complete%% *}"
8822    tmp="$complete EOL"
8823    arguments="${tmp#* }"
8824
8825    # Cannot rely on the command "which" here since it doesn't always work.
8826    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8827    if test -z "$is_absolute_path"; then
8828      # Path to executable is not absolute. Find it.
8829      IFS_save="$IFS"
8830      IFS=:
8831      for p in $PATH; do
8832        if test -f "$p/$path" && test -x "$p/$path"; then
8833          new_path="$p/$path"
8834          break
8835        fi
8836      done
8837      IFS="$IFS_save"
8838    else
8839      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8840$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8841      new_path="$path"
8842    fi
8843
8844    if test "x$new_path" = x; then
8845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8846$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8847        has_space=`$ECHO "$complete" | $GREP " "`
8848        if test "x$has_space" != x; then
8849          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8851        fi
8852        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8853      fi
8854  fi
8855
8856      # Now join together the path and the arguments once again
8857      if test "x$arguments" != xEOL; then
8858        new_complete="$new_path ${arguments% *}"
8859      else
8860        new_complete="$new_path"
8861      fi
8862
8863  if test "x$complete" != "x$new_complete"; then
8864      FOUND_MAKE="$new_complete"
8865      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8866$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8867    fi
8868
8869        fi
8870      fi
8871    fi
8872  fi
8873
8874
8875    if test "x$FOUND_MAKE" = x; then
8876      for ac_prog in make
8877do
8878  # Extract the first word of "$ac_prog", so it can be a program name with args.
8879set dummy $ac_prog; ac_word=$2
8880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8881$as_echo_n "checking for $ac_word... " >&6; }
8882if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8883  $as_echo_n "(cached) " >&6
8884else
8885  case $CHECK_MAKE in
8886  [\\/]* | ?:[\\/]*)
8887  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8888  ;;
8889  *)
8890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8891for as_dir in $PATH
8892do
8893  IFS=$as_save_IFS
8894  test -z "$as_dir" && as_dir=.
8895    for ac_exec_ext in '' $ac_executable_extensions; do
8896  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8897    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8899    break 2
8900  fi
8901done
8902  done
8903IFS=$as_save_IFS
8904
8905  ;;
8906esac
8907fi
8908CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8909if test -n "$CHECK_MAKE"; then
8910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8911$as_echo "$CHECK_MAKE" >&6; }
8912else
8913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8914$as_echo "no" >&6; }
8915fi
8916
8917
8918  test -n "$CHECK_MAKE" && break
8919done
8920
8921
8922  MAKE_CANDIDATE=""$CHECK_MAKE""
8923  DESCRIPTION="make in PATH"
8924  if test "x$MAKE_CANDIDATE" != x; then
8925    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8926$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8927    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8928    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8929    if test "x$IS_GNU_MAKE" = x; then
8930      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8931$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8932    else
8933      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8934      if test "x$IS_MODERN_MAKE" = x; then
8935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8936$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8937      else
8938        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8939          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8940            MAKE_EXPECTED_ENV='cygwin'
8941          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8942            MAKE_EXPECTED_ENV='msys'
8943          else
8944            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8945          fi
8946          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8947          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8948        else
8949          # Not relevant for non-Windows
8950          IS_MAKE_CORRECT_ENV=true
8951        fi
8952        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8953          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
8954$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
8955        else
8956          FOUND_MAKE=$MAKE_CANDIDATE
8957
8958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8959
8960  # First separate the path from the arguments. This will split at the first
8961  # space.
8962  complete="$FOUND_MAKE"
8963  path="${complete%% *}"
8964  tmp="$complete EOL"
8965  arguments="${tmp#* }"
8966
8967  # Input might be given as Windows format, start by converting to
8968  # unix format.
8969  new_path=`$CYGPATH -u "$path"`
8970
8971  # Now try to locate executable using which
8972  new_path=`$WHICH "$new_path" 2> /dev/null`
8973  # bat and cmd files are not always considered executable in cygwin causing which
8974  # to not find them
8975  if test "x$new_path" = x \
8976           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8977           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8978    new_path=`$CYGPATH -u "$path"`
8979  fi
8980  if test "x$new_path" = x; then
8981    # Oops. Which didn't find the executable.
8982    # The splitting of arguments from the executable at a space might have been incorrect,
8983    # since paths with space are more likely in Windows. Give it another try with the whole
8984    # argument.
8985    path="$complete"
8986    arguments="EOL"
8987    new_path=`$CYGPATH -u "$path"`
8988    new_path=`$WHICH "$new_path" 2> /dev/null`
8989    # bat and cmd files are not always considered executable in cygwin causing which
8990    # to not find them
8991    if test "x$new_path" = x \
8992             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8993             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8994      new_path=`$CYGPATH -u "$path"`
8995    fi
8996    if test "x$new_path" = x; then
8997      # It's still not found. Now this is an unrecoverable error.
8998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9000      has_space=`$ECHO "$complete" | $GREP " "`
9001      if test "x$has_space" != x; then
9002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9004      fi
9005      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9006    fi
9007  fi
9008
9009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9012  # "foo.exe" is OK but "foo" is an error.
9013  #
9014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9015  # It is also a way to make sure we got the proper file name for the real test later on.
9016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9017  if test "x$test_shortpath" = x; then
9018    # Short path failed, file does not exist as specified.
9019    # Try adding .exe or .cmd
9020    if test -f "${new_path}.exe"; then
9021       input_to_shortpath="${new_path}.exe"
9022    elif test -f "${new_path}.cmd"; then
9023       input_to_shortpath="${new_path}.cmd"
9024    else
9025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9026$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9030    fi
9031  else
9032    input_to_shortpath="$new_path"
9033  fi
9034
9035  # Call helper function which possibly converts this using DOS-style short mode.
9036  # If so, the updated path is stored in $new_path.
9037  new_path="$input_to_shortpath"
9038
9039  input_path="$input_to_shortpath"
9040  # Check if we need to convert this using DOS-style short mode. If the path
9041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9042  # take no chances and rewrite it.
9043  # Note: m4 eats our [], so we need to use [ and ] instead.
9044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9045  if test "x$has_forbidden_chars" != x; then
9046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9050      # Going to short mode and back again did indeed matter. Since short mode is
9051      # case insensitive, let's make it lowercase to improve readability.
9052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9053      # Now convert it back to Unix-stile (cygpath)
9054      input_path=`$CYGPATH -u "$shortmode_path"`
9055      new_path="$input_path"
9056    fi
9057  fi
9058
9059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9060  if test "x$test_cygdrive_prefix" = x; then
9061    # As a simple fix, exclude /usr/bin since it's not a real path.
9062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9064      # a path prefixed by /cygdrive for fixpath to work.
9065      new_path="$CYGWIN_ROOT_PATH$input_path"
9066    fi
9067  fi
9068
9069  # remove trailing .exe if any
9070  new_path="${new_path/%.exe/}"
9071
9072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9073
9074  # First separate the path from the arguments. This will split at the first
9075  # space.
9076  complete="$FOUND_MAKE"
9077  path="${complete%% *}"
9078  tmp="$complete EOL"
9079  arguments="${tmp#* }"
9080
9081  # Input might be given as Windows format, start by converting to
9082  # unix format.
9083  new_path="$path"
9084
9085  windows_path="$new_path"
9086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9087    unix_path=`$CYGPATH -u "$windows_path"`
9088    new_path="$unix_path"
9089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9091    new_path="$unix_path"
9092  fi
9093
9094
9095  # Now try to locate executable using which
9096  new_path=`$WHICH "$new_path" 2> /dev/null`
9097
9098  if test "x$new_path" = x; then
9099    # Oops. Which didn't find the executable.
9100    # The splitting of arguments from the executable at a space might have been incorrect,
9101    # since paths with space are more likely in Windows. Give it another try with the whole
9102    # argument.
9103    path="$complete"
9104    arguments="EOL"
9105    new_path="$path"
9106
9107  windows_path="$new_path"
9108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9109    unix_path=`$CYGPATH -u "$windows_path"`
9110    new_path="$unix_path"
9111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9113    new_path="$unix_path"
9114  fi
9115
9116
9117    new_path=`$WHICH "$new_path" 2> /dev/null`
9118
9119    if test "x$new_path" = x; then
9120      # It's still not found. Now this is an unrecoverable error.
9121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9122$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9123      has_space=`$ECHO "$complete" | $GREP " "`
9124      if test "x$has_space" != x; then
9125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9127      fi
9128      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9129    fi
9130  fi
9131
9132  # Now new_path has a complete unix path to the binary
9133  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9134    # Keep paths in /bin as-is, but remove trailing .exe if any
9135    new_path="${new_path/%.exe/}"
9136    # Do not save /bin paths to all_fixpath_prefixes!
9137  else
9138    # Not in mixed or Windows style, start by that.
9139    new_path=`cmd //c echo $new_path`
9140
9141  input_path="$new_path"
9142  # Check if we need to convert this using DOS-style short mode. If the path
9143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9144  # take no chances and rewrite it.
9145  # Note: m4 eats our [], so we need to use [ and ] instead.
9146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9147  if test "x$has_forbidden_chars" != x; then
9148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9150  fi
9151
9152    # Output is in $new_path
9153
9154  windows_path="$new_path"
9155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9156    unix_path=`$CYGPATH -u "$windows_path"`
9157    new_path="$unix_path"
9158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9160    new_path="$unix_path"
9161  fi
9162
9163    # remove trailing .exe if any
9164    new_path="${new_path/%.exe/}"
9165
9166    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9167    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9168  fi
9169
9170  else
9171    # We're on a posix platform. Hooray! :)
9172    # First separate the path from the arguments. This will split at the first
9173    # space.
9174    complete="$FOUND_MAKE"
9175    path="${complete%% *}"
9176    tmp="$complete EOL"
9177    arguments="${tmp#* }"
9178
9179    # Cannot rely on the command "which" here since it doesn't always work.
9180    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9181    if test -z "$is_absolute_path"; then
9182      # Path to executable is not absolute. Find it.
9183      IFS_save="$IFS"
9184      IFS=:
9185      for p in $PATH; do
9186        if test -f "$p/$path" && test -x "$p/$path"; then
9187          new_path="$p/$path"
9188          break
9189        fi
9190      done
9191      IFS="$IFS_save"
9192    else
9193      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9194$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9195      new_path="$path"
9196    fi
9197
9198    if test "x$new_path" = x; then
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9201        has_space=`$ECHO "$complete" | $GREP " "`
9202        if test "x$has_space" != x; then
9203          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9204$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9205        fi
9206        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9207      fi
9208  fi
9209
9210      # Now join together the path and the arguments once again
9211      if test "x$arguments" != xEOL; then
9212        new_complete="$new_path ${arguments% *}"
9213      else
9214        new_complete="$new_path"
9215      fi
9216
9217  if test "x$complete" != "x$new_complete"; then
9218      FOUND_MAKE="$new_complete"
9219      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9220$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9221    fi
9222
9223        fi
9224      fi
9225    fi
9226  fi
9227
9228    fi
9229
9230    if test "x$FOUND_MAKE" = x; then
9231      if test "x$TOOLS_DIR" != x; then
9232        # We have a tools-dir, check that as well before giving up.
9233        OLD_PATH=$PATH
9234        PATH=$TOOLS_DIR:$PATH
9235        for ac_prog in gmake
9236do
9237  # Extract the first word of "$ac_prog", so it can be a program name with args.
9238set dummy $ac_prog; ac_word=$2
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9240$as_echo_n "checking for $ac_word... " >&6; }
9241if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9242  $as_echo_n "(cached) " >&6
9243else
9244  case $CHECK_TOOLSDIR_GMAKE in
9245  [\\/]* | ?:[\\/]*)
9246  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9247  ;;
9248  *)
9249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9250for as_dir in $PATH
9251do
9252  IFS=$as_save_IFS
9253  test -z "$as_dir" && as_dir=.
9254    for ac_exec_ext in '' $ac_executable_extensions; do
9255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9256    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9258    break 2
9259  fi
9260done
9261  done
9262IFS=$as_save_IFS
9263
9264  ;;
9265esac
9266fi
9267CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9268if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9270$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9271else
9272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
9274fi
9275
9276
9277  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9278done
9279
9280
9281  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9282  DESCRIPTION="gmake in tools-dir"
9283  if test "x$MAKE_CANDIDATE" != x; then
9284    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9285$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9286    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9287    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9288    if test "x$IS_GNU_MAKE" = x; then
9289      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9290$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9291    else
9292      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9293      if test "x$IS_MODERN_MAKE" = x; then
9294        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9295$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9296      else
9297        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9298          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9299            MAKE_EXPECTED_ENV='cygwin'
9300          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9301            MAKE_EXPECTED_ENV='msys'
9302          else
9303            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9304          fi
9305          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9306          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9307        else
9308          # Not relevant for non-Windows
9309          IS_MAKE_CORRECT_ENV=true
9310        fi
9311        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9312          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9313$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9314        else
9315          FOUND_MAKE=$MAKE_CANDIDATE
9316
9317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9318
9319  # First separate the path from the arguments. This will split at the first
9320  # space.
9321  complete="$FOUND_MAKE"
9322  path="${complete%% *}"
9323  tmp="$complete EOL"
9324  arguments="${tmp#* }"
9325
9326  # Input might be given as Windows format, start by converting to
9327  # unix format.
9328  new_path=`$CYGPATH -u "$path"`
9329
9330  # Now try to locate executable using which
9331  new_path=`$WHICH "$new_path" 2> /dev/null`
9332  # bat and cmd files are not always considered executable in cygwin causing which
9333  # to not find them
9334  if test "x$new_path" = x \
9335           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9336           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9337    new_path=`$CYGPATH -u "$path"`
9338  fi
9339  if test "x$new_path" = x; then
9340    # Oops. Which didn't find the executable.
9341    # The splitting of arguments from the executable at a space might have been incorrect,
9342    # since paths with space are more likely in Windows. Give it another try with the whole
9343    # argument.
9344    path="$complete"
9345    arguments="EOL"
9346    new_path=`$CYGPATH -u "$path"`
9347    new_path=`$WHICH "$new_path" 2> /dev/null`
9348    # bat and cmd files are not always considered executable in cygwin causing which
9349    # to not find them
9350    if test "x$new_path" = x \
9351             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9352             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9353      new_path=`$CYGPATH -u "$path"`
9354    fi
9355    if test "x$new_path" = x; then
9356      # It's still not found. Now this is an unrecoverable error.
9357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9358$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9359      has_space=`$ECHO "$complete" | $GREP " "`
9360      if test "x$has_space" != x; then
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9363      fi
9364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9365    fi
9366  fi
9367
9368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9371  # "foo.exe" is OK but "foo" is an error.
9372  #
9373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9374  # It is also a way to make sure we got the proper file name for the real test later on.
9375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9376  if test "x$test_shortpath" = x; then
9377    # Short path failed, file does not exist as specified.
9378    # Try adding .exe or .cmd
9379    if test -f "${new_path}.exe"; then
9380       input_to_shortpath="${new_path}.exe"
9381    elif test -f "${new_path}.cmd"; then
9382       input_to_shortpath="${new_path}.cmd"
9383    else
9384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9388      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9389    fi
9390  else
9391    input_to_shortpath="$new_path"
9392  fi
9393
9394  # Call helper function which possibly converts this using DOS-style short mode.
9395  # If so, the updated path is stored in $new_path.
9396  new_path="$input_to_shortpath"
9397
9398  input_path="$input_to_shortpath"
9399  # Check if we need to convert this using DOS-style short mode. If the path
9400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9401  # take no chances and rewrite it.
9402  # Note: m4 eats our [], so we need to use [ and ] instead.
9403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9404  if test "x$has_forbidden_chars" != x; then
9405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9409      # Going to short mode and back again did indeed matter. Since short mode is
9410      # case insensitive, let's make it lowercase to improve readability.
9411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9412      # Now convert it back to Unix-stile (cygpath)
9413      input_path=`$CYGPATH -u "$shortmode_path"`
9414      new_path="$input_path"
9415    fi
9416  fi
9417
9418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9419  if test "x$test_cygdrive_prefix" = x; then
9420    # As a simple fix, exclude /usr/bin since it's not a real path.
9421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9423      # a path prefixed by /cygdrive for fixpath to work.
9424      new_path="$CYGWIN_ROOT_PATH$input_path"
9425    fi
9426  fi
9427
9428  # remove trailing .exe if any
9429  new_path="${new_path/%.exe/}"
9430
9431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9432
9433  # First separate the path from the arguments. This will split at the first
9434  # space.
9435  complete="$FOUND_MAKE"
9436  path="${complete%% *}"
9437  tmp="$complete EOL"
9438  arguments="${tmp#* }"
9439
9440  # Input might be given as Windows format, start by converting to
9441  # unix format.
9442  new_path="$path"
9443
9444  windows_path="$new_path"
9445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9446    unix_path=`$CYGPATH -u "$windows_path"`
9447    new_path="$unix_path"
9448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9450    new_path="$unix_path"
9451  fi
9452
9453
9454  # Now try to locate executable using which
9455  new_path=`$WHICH "$new_path" 2> /dev/null`
9456
9457  if test "x$new_path" = x; then
9458    # Oops. Which didn't find the executable.
9459    # The splitting of arguments from the executable at a space might have been incorrect,
9460    # since paths with space are more likely in Windows. Give it another try with the whole
9461    # argument.
9462    path="$complete"
9463    arguments="EOL"
9464    new_path="$path"
9465
9466  windows_path="$new_path"
9467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9468    unix_path=`$CYGPATH -u "$windows_path"`
9469    new_path="$unix_path"
9470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9472    new_path="$unix_path"
9473  fi
9474
9475
9476    new_path=`$WHICH "$new_path" 2> /dev/null`
9477
9478    if test "x$new_path" = x; then
9479      # It's still not found. Now this is an unrecoverable error.
9480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9481$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9482      has_space=`$ECHO "$complete" | $GREP " "`
9483      if test "x$has_space" != x; then
9484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9486      fi
9487      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9488    fi
9489  fi
9490
9491  # Now new_path has a complete unix path to the binary
9492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9493    # Keep paths in /bin as-is, but remove trailing .exe if any
9494    new_path="${new_path/%.exe/}"
9495    # Do not save /bin paths to all_fixpath_prefixes!
9496  else
9497    # Not in mixed or Windows style, start by that.
9498    new_path=`cmd //c echo $new_path`
9499
9500  input_path="$new_path"
9501  # Check if we need to convert this using DOS-style short mode. If the path
9502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9503  # take no chances and rewrite it.
9504  # Note: m4 eats our [], so we need to use [ and ] instead.
9505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9506  if test "x$has_forbidden_chars" != x; then
9507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9509  fi
9510
9511    # Output is in $new_path
9512
9513  windows_path="$new_path"
9514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9515    unix_path=`$CYGPATH -u "$windows_path"`
9516    new_path="$unix_path"
9517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9519    new_path="$unix_path"
9520  fi
9521
9522    # remove trailing .exe if any
9523    new_path="${new_path/%.exe/}"
9524
9525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9527  fi
9528
9529  else
9530    # We're on a posix platform. Hooray! :)
9531    # First separate the path from the arguments. This will split at the first
9532    # space.
9533    complete="$FOUND_MAKE"
9534    path="${complete%% *}"
9535    tmp="$complete EOL"
9536    arguments="${tmp#* }"
9537
9538    # Cannot rely on the command "which" here since it doesn't always work.
9539    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9540    if test -z "$is_absolute_path"; then
9541      # Path to executable is not absolute. Find it.
9542      IFS_save="$IFS"
9543      IFS=:
9544      for p in $PATH; do
9545        if test -f "$p/$path" && test -x "$p/$path"; then
9546          new_path="$p/$path"
9547          break
9548        fi
9549      done
9550      IFS="$IFS_save"
9551    else
9552      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9553$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9554      new_path="$path"
9555    fi
9556
9557    if test "x$new_path" = x; then
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9559$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9560        has_space=`$ECHO "$complete" | $GREP " "`
9561        if test "x$has_space" != x; then
9562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9564        fi
9565        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9566      fi
9567  fi
9568
9569      # Now join together the path and the arguments once again
9570      if test "x$arguments" != xEOL; then
9571        new_complete="$new_path ${arguments% *}"
9572      else
9573        new_complete="$new_path"
9574      fi
9575
9576  if test "x$complete" != "x$new_complete"; then
9577      FOUND_MAKE="$new_complete"
9578      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9579$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9580    fi
9581
9582        fi
9583      fi
9584    fi
9585  fi
9586
9587        if test "x$FOUND_MAKE" = x; then
9588          for ac_prog in make
9589do
9590  # Extract the first word of "$ac_prog", so it can be a program name with args.
9591set dummy $ac_prog; ac_word=$2
9592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9593$as_echo_n "checking for $ac_word... " >&6; }
9594if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9595  $as_echo_n "(cached) " >&6
9596else
9597  case $CHECK_TOOLSDIR_MAKE in
9598  [\\/]* | ?:[\\/]*)
9599  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9600  ;;
9601  *)
9602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9603for as_dir in $PATH
9604do
9605  IFS=$as_save_IFS
9606  test -z "$as_dir" && as_dir=.
9607    for ac_exec_ext in '' $ac_executable_extensions; do
9608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9609    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9611    break 2
9612  fi
9613done
9614  done
9615IFS=$as_save_IFS
9616
9617  ;;
9618esac
9619fi
9620CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9621if test -n "$CHECK_TOOLSDIR_MAKE"; then
9622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9623$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9624else
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9626$as_echo "no" >&6; }
9627fi
9628
9629
9630  test -n "$CHECK_TOOLSDIR_MAKE" && break
9631done
9632
9633
9634  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9635  DESCRIPTION="make in tools-dir"
9636  if test "x$MAKE_CANDIDATE" != x; then
9637    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9638$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9639    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9640    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9641    if test "x$IS_GNU_MAKE" = x; then
9642      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9643$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9644    else
9645      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9646      if test "x$IS_MODERN_MAKE" = x; then
9647        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9648$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9649      else
9650        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9651          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9652            MAKE_EXPECTED_ENV='cygwin'
9653          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9654            MAKE_EXPECTED_ENV='msys'
9655          else
9656            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9657          fi
9658          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9659          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9660        else
9661          # Not relevant for non-Windows
9662          IS_MAKE_CORRECT_ENV=true
9663        fi
9664        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9665          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
9666$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
9667        else
9668          FOUND_MAKE=$MAKE_CANDIDATE
9669
9670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9671
9672  # First separate the path from the arguments. This will split at the first
9673  # space.
9674  complete="$FOUND_MAKE"
9675  path="${complete%% *}"
9676  tmp="$complete EOL"
9677  arguments="${tmp#* }"
9678
9679  # Input might be given as Windows format, start by converting to
9680  # unix format.
9681  new_path=`$CYGPATH -u "$path"`
9682
9683  # Now try to locate executable using which
9684  new_path=`$WHICH "$new_path" 2> /dev/null`
9685  # bat and cmd files are not always considered executable in cygwin causing which
9686  # to not find them
9687  if test "x$new_path" = x \
9688           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9689           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9690    new_path=`$CYGPATH -u "$path"`
9691  fi
9692  if test "x$new_path" = x; then
9693    # Oops. Which didn't find the executable.
9694    # The splitting of arguments from the executable at a space might have been incorrect,
9695    # since paths with space are more likely in Windows. Give it another try with the whole
9696    # argument.
9697    path="$complete"
9698    arguments="EOL"
9699    new_path=`$CYGPATH -u "$path"`
9700    new_path=`$WHICH "$new_path" 2> /dev/null`
9701    # bat and cmd files are not always considered executable in cygwin causing which
9702    # to not find them
9703    if test "x$new_path" = x \
9704             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9705             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9706      new_path=`$CYGPATH -u "$path"`
9707    fi
9708    if test "x$new_path" = x; then
9709      # It's still not found. Now this is an unrecoverable error.
9710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9711$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9712      has_space=`$ECHO "$complete" | $GREP " "`
9713      if test "x$has_space" != x; then
9714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9716      fi
9717      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9718    fi
9719  fi
9720
9721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9724  # "foo.exe" is OK but "foo" is an error.
9725  #
9726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9727  # It is also a way to make sure we got the proper file name for the real test later on.
9728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9729  if test "x$test_shortpath" = x; then
9730    # Short path failed, file does not exist as specified.
9731    # Try adding .exe or .cmd
9732    if test -f "${new_path}.exe"; then
9733       input_to_shortpath="${new_path}.exe"
9734    elif test -f "${new_path}.cmd"; then
9735       input_to_shortpath="${new_path}.cmd"
9736    else
9737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9738$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9739      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9740$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9741      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9742    fi
9743  else
9744    input_to_shortpath="$new_path"
9745  fi
9746
9747  # Call helper function which possibly converts this using DOS-style short mode.
9748  # If so, the updated path is stored in $new_path.
9749  new_path="$input_to_shortpath"
9750
9751  input_path="$input_to_shortpath"
9752  # Check if we need to convert this using DOS-style short mode. If the path
9753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9754  # take no chances and rewrite it.
9755  # Note: m4 eats our [], so we need to use [ and ] instead.
9756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9757  if test "x$has_forbidden_chars" != x; then
9758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9762      # Going to short mode and back again did indeed matter. Since short mode is
9763      # case insensitive, let's make it lowercase to improve readability.
9764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9765      # Now convert it back to Unix-stile (cygpath)
9766      input_path=`$CYGPATH -u "$shortmode_path"`
9767      new_path="$input_path"
9768    fi
9769  fi
9770
9771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9772  if test "x$test_cygdrive_prefix" = x; then
9773    # As a simple fix, exclude /usr/bin since it's not a real path.
9774    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9776      # a path prefixed by /cygdrive for fixpath to work.
9777      new_path="$CYGWIN_ROOT_PATH$input_path"
9778    fi
9779  fi
9780
9781  # remove trailing .exe if any
9782  new_path="${new_path/%.exe/}"
9783
9784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9785
9786  # First separate the path from the arguments. This will split at the first
9787  # space.
9788  complete="$FOUND_MAKE"
9789  path="${complete%% *}"
9790  tmp="$complete EOL"
9791  arguments="${tmp#* }"
9792
9793  # Input might be given as Windows format, start by converting to
9794  # unix format.
9795  new_path="$path"
9796
9797  windows_path="$new_path"
9798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9799    unix_path=`$CYGPATH -u "$windows_path"`
9800    new_path="$unix_path"
9801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9803    new_path="$unix_path"
9804  fi
9805
9806
9807  # Now try to locate executable using which
9808  new_path=`$WHICH "$new_path" 2> /dev/null`
9809
9810  if test "x$new_path" = x; then
9811    # Oops. Which didn't find the executable.
9812    # The splitting of arguments from the executable at a space might have been incorrect,
9813    # since paths with space are more likely in Windows. Give it another try with the whole
9814    # argument.
9815    path="$complete"
9816    arguments="EOL"
9817    new_path="$path"
9818
9819  windows_path="$new_path"
9820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9821    unix_path=`$CYGPATH -u "$windows_path"`
9822    new_path="$unix_path"
9823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9825    new_path="$unix_path"
9826  fi
9827
9828
9829    new_path=`$WHICH "$new_path" 2> /dev/null`
9830
9831    if test "x$new_path" = x; then
9832      # It's still not found. Now this is an unrecoverable error.
9833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9834$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9835      has_space=`$ECHO "$complete" | $GREP " "`
9836      if test "x$has_space" != x; then
9837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9839      fi
9840      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9841    fi
9842  fi
9843
9844  # Now new_path has a complete unix path to the binary
9845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9846    # Keep paths in /bin as-is, but remove trailing .exe if any
9847    new_path="${new_path/%.exe/}"
9848    # Do not save /bin paths to all_fixpath_prefixes!
9849  else
9850    # Not in mixed or Windows style, start by that.
9851    new_path=`cmd //c echo $new_path`
9852
9853  input_path="$new_path"
9854  # Check if we need to convert this using DOS-style short mode. If the path
9855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9856  # take no chances and rewrite it.
9857  # Note: m4 eats our [], so we need to use [ and ] instead.
9858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9859  if test "x$has_forbidden_chars" != x; then
9860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9862  fi
9863
9864    # Output is in $new_path
9865
9866  windows_path="$new_path"
9867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9868    unix_path=`$CYGPATH -u "$windows_path"`
9869    new_path="$unix_path"
9870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9872    new_path="$unix_path"
9873  fi
9874
9875    # remove trailing .exe if any
9876    new_path="${new_path/%.exe/}"
9877
9878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9880  fi
9881
9882  else
9883    # We're on a posix platform. Hooray! :)
9884    # First separate the path from the arguments. This will split at the first
9885    # space.
9886    complete="$FOUND_MAKE"
9887    path="${complete%% *}"
9888    tmp="$complete EOL"
9889    arguments="${tmp#* }"
9890
9891    # Cannot rely on the command "which" here since it doesn't always work.
9892    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9893    if test -z "$is_absolute_path"; then
9894      # Path to executable is not absolute. Find it.
9895      IFS_save="$IFS"
9896      IFS=:
9897      for p in $PATH; do
9898        if test -f "$p/$path" && test -x "$p/$path"; then
9899          new_path="$p/$path"
9900          break
9901        fi
9902      done
9903      IFS="$IFS_save"
9904    else
9905      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9906$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9907      new_path="$path"
9908    fi
9909
9910    if test "x$new_path" = x; then
9911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9912$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9913        has_space=`$ECHO "$complete" | $GREP " "`
9914        if test "x$has_space" != x; then
9915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9917        fi
9918        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9919      fi
9920  fi
9921
9922      # Now join together the path and the arguments once again
9923      if test "x$arguments" != xEOL; then
9924        new_complete="$new_path ${arguments% *}"
9925      else
9926        new_complete="$new_path"
9927      fi
9928
9929  if test "x$complete" != "x$new_complete"; then
9930      FOUND_MAKE="$new_complete"
9931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9932$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9933    fi
9934
9935        fi
9936      fi
9937    fi
9938  fi
9939
9940        fi
9941        PATH=$OLD_PATH
9942      fi
9943    fi
9944
9945    if test "x$FOUND_MAKE" = x; then
9946      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
9947    fi
9948  fi
9949
9950  MAKE=$FOUND_MAKE
9951
9952  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9953$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9954
9955
9956
9957    # Test if find supports -delete
9958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9959$as_echo_n "checking if find supports -delete... " >&6; }
9960    FIND_DELETE="-delete"
9961
9962    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9963
9964    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9965
9966    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9967    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9968        # No, it does not.
9969        rm $DELETEDIR/TestIfFindSupportsDelete
9970        FIND_DELETE="-exec rm \{\} \+"
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973    else
9974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9975$as_echo "yes" >&6; }
9976    fi
9977    rmdir $DELETEDIR
9978
9979
9980
9981# These tools might not be installed by default,
9982# need hint on how to install them.
9983
9984    for ac_prog in unzip
9985do
9986  # Extract the first word of "$ac_prog", so it can be a program name with args.
9987set dummy $ac_prog; ac_word=$2
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9989$as_echo_n "checking for $ac_word... " >&6; }
9990if test "${ac_cv_path_UNZIP+set}" = set; then :
9991  $as_echo_n "(cached) " >&6
9992else
9993  case $UNZIP in
9994  [\\/]* | ?:[\\/]*)
9995  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9996  ;;
9997  *)
9998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9999for as_dir in $PATH
10000do
10001  IFS=$as_save_IFS
10002  test -z "$as_dir" && as_dir=.
10003    for ac_exec_ext in '' $ac_executable_extensions; do
10004  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10005    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10007    break 2
10008  fi
10009done
10010  done
10011IFS=$as_save_IFS
10012
10013  ;;
10014esac
10015fi
10016UNZIP=$ac_cv_path_UNZIP
10017if test -n "$UNZIP"; then
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10019$as_echo "$UNZIP" >&6; }
10020else
10021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10022$as_echo "no" >&6; }
10023fi
10024
10025
10026  test -n "$UNZIP" && break
10027done
10028
10029
10030    if test "x$UNZIP" = x; then
10031        if test "xunzip" = x; then
10032          PROG_NAME=unzip
10033        else
10034          PROG_NAME=unzip
10035        fi
10036        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10037$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10038        as_fn_error $? "Cannot continue" "$LINENO" 5
10039    fi
10040
10041
10042
10043    for ac_prog in zip
10044do
10045  # Extract the first word of "$ac_prog", so it can be a program name with args.
10046set dummy $ac_prog; ac_word=$2
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048$as_echo_n "checking for $ac_word... " >&6; }
10049if test "${ac_cv_path_ZIP+set}" = set; then :
10050  $as_echo_n "(cached) " >&6
10051else
10052  case $ZIP in
10053  [\\/]* | ?:[\\/]*)
10054  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10055  ;;
10056  *)
10057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058for as_dir in $PATH
10059do
10060  IFS=$as_save_IFS
10061  test -z "$as_dir" && as_dir=.
10062    for ac_exec_ext in '' $ac_executable_extensions; do
10063  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10064    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066    break 2
10067  fi
10068done
10069  done
10070IFS=$as_save_IFS
10071
10072  ;;
10073esac
10074fi
10075ZIP=$ac_cv_path_ZIP
10076if test -n "$ZIP"; then
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10078$as_echo "$ZIP" >&6; }
10079else
10080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085  test -n "$ZIP" && break
10086done
10087
10088
10089    if test "x$ZIP" = x; then
10090        if test "xzip" = x; then
10091          PROG_NAME=zip
10092        else
10093          PROG_NAME=zip
10094        fi
10095        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10096$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10097        as_fn_error $? "Cannot continue" "$LINENO" 5
10098    fi
10099
10100
10101
10102# Non-required basic tools
10103
10104# Extract the first word of "ldd", so it can be a program name with args.
10105set dummy ldd; ac_word=$2
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10107$as_echo_n "checking for $ac_word... " >&6; }
10108if test "${ac_cv_path_LDD+set}" = set; then :
10109  $as_echo_n "(cached) " >&6
10110else
10111  case $LDD in
10112  [\\/]* | ?:[\\/]*)
10113  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10114  ;;
10115  *)
10116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10117for as_dir in $PATH
10118do
10119  IFS=$as_save_IFS
10120  test -z "$as_dir" && as_dir=.
10121    for ac_exec_ext in '' $ac_executable_extensions; do
10122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10123    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10125    break 2
10126  fi
10127done
10128  done
10129IFS=$as_save_IFS
10130
10131  ;;
10132esac
10133fi
10134LDD=$ac_cv_path_LDD
10135if test -n "$LDD"; then
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10137$as_echo "$LDD" >&6; }
10138else
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141fi
10142
10143
10144if test "x$LDD" = "x"; then
10145    # List shared lib dependencies is used for
10146    # debug output and checking for forbidden dependencies.
10147    # We can build without it.
10148    LDD="true"
10149fi
10150# Extract the first word of "otool", so it can be a program name with args.
10151set dummy otool; ac_word=$2
10152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10153$as_echo_n "checking for $ac_word... " >&6; }
10154if test "${ac_cv_path_OTOOL+set}" = set; then :
10155  $as_echo_n "(cached) " >&6
10156else
10157  case $OTOOL in
10158  [\\/]* | ?:[\\/]*)
10159  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10160  ;;
10161  *)
10162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10163for as_dir in $PATH
10164do
10165  IFS=$as_save_IFS
10166  test -z "$as_dir" && as_dir=.
10167    for ac_exec_ext in '' $ac_executable_extensions; do
10168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10169    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10171    break 2
10172  fi
10173done
10174  done
10175IFS=$as_save_IFS
10176
10177  ;;
10178esac
10179fi
10180OTOOL=$ac_cv_path_OTOOL
10181if test -n "$OTOOL"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10183$as_echo "$OTOOL" >&6; }
10184else
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190if test "x$OTOOL" = "x"; then
10191   OTOOL="true"
10192fi
10193for ac_prog in readelf greadelf
10194do
10195  # Extract the first word of "$ac_prog", so it can be a program name with args.
10196set dummy $ac_prog; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if test "${ac_cv_path_READELF+set}" = set; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $READELF in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10214    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225READELF=$ac_cv_path_READELF
10226if test -n "$READELF"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10228$as_echo "$READELF" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235  test -n "$READELF" && break
10236done
10237
10238# Extract the first word of "hg", so it can be a program name with args.
10239set dummy hg; ac_word=$2
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241$as_echo_n "checking for $ac_word... " >&6; }
10242if test "${ac_cv_path_HG+set}" = set; then :
10243  $as_echo_n "(cached) " >&6
10244else
10245  case $HG in
10246  [\\/]* | ?:[\\/]*)
10247  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10248  ;;
10249  *)
10250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251for as_dir in $PATH
10252do
10253  IFS=$as_save_IFS
10254  test -z "$as_dir" && as_dir=.
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10257    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259    break 2
10260  fi
10261done
10262  done
10263IFS=$as_save_IFS
10264
10265  ;;
10266esac
10267fi
10268HG=$ac_cv_path_HG
10269if test -n "$HG"; then
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10271$as_echo "$HG" >&6; }
10272else
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
10275fi
10276
10277
10278# Extract the first word of "stat", so it can be a program name with args.
10279set dummy stat; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if test "${ac_cv_path_STAT+set}" = set; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  case $STAT in
10286  [\\/]* | ?:[\\/]*)
10287  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10288  ;;
10289  *)
10290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291for as_dir in $PATH
10292do
10293  IFS=$as_save_IFS
10294  test -z "$as_dir" && as_dir=.
10295    for ac_exec_ext in '' $ac_executable_extensions; do
10296  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10297    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299    break 2
10300  fi
10301done
10302  done
10303IFS=$as_save_IFS
10304
10305  ;;
10306esac
10307fi
10308STAT=$ac_cv_path_STAT
10309if test -n "$STAT"; then
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10311$as_echo "$STAT" >&6; }
10312else
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315fi
10316
10317
10318# Extract the first word of "time", so it can be a program name with args.
10319set dummy time; ac_word=$2
10320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10321$as_echo_n "checking for $ac_word... " >&6; }
10322if test "${ac_cv_path_TIME+set}" = set; then :
10323  $as_echo_n "(cached) " >&6
10324else
10325  case $TIME in
10326  [\\/]* | ?:[\\/]*)
10327  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10328  ;;
10329  *)
10330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10331for as_dir in $PATH
10332do
10333  IFS=$as_save_IFS
10334  test -z "$as_dir" && as_dir=.
10335    for ac_exec_ext in '' $ac_executable_extensions; do
10336  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10337    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10339    break 2
10340  fi
10341done
10342  done
10343IFS=$as_save_IFS
10344
10345  ;;
10346esac
10347fi
10348TIME=$ac_cv_path_TIME
10349if test -n "$TIME"; then
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10351$as_echo "$TIME" >&6; }
10352else
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
10355fi
10356
10357
10358
10359if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10360
10361    for ac_prog in comm
10362do
10363  # Extract the first word of "$ac_prog", so it can be a program name with args.
10364set dummy $ac_prog; ac_word=$2
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10366$as_echo_n "checking for $ac_word... " >&6; }
10367if test "${ac_cv_path_COMM+set}" = set; then :
10368  $as_echo_n "(cached) " >&6
10369else
10370  case $COMM in
10371  [\\/]* | ?:[\\/]*)
10372  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10373  ;;
10374  *)
10375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10382    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390  ;;
10391esac
10392fi
10393COMM=$ac_cv_path_COMM
10394if test -n "$COMM"; then
10395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10396$as_echo "$COMM" >&6; }
10397else
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399$as_echo "no" >&6; }
10400fi
10401
10402
10403  test -n "$COMM" && break
10404done
10405
10406
10407    if test "x$COMM" = x; then
10408        if test "xcomm" = x; then
10409          PROG_NAME=comm
10410        else
10411          PROG_NAME=comm
10412        fi
10413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10414$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10415        as_fn_error $? "Cannot continue" "$LINENO" 5
10416    fi
10417
10418
10419fi
10420
10421if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10422
10423    for ac_prog in xattr
10424do
10425  # Extract the first word of "$ac_prog", so it can be a program name with args.
10426set dummy $ac_prog; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
10429if test "${ac_cv_path_XATTR+set}" = set; then :
10430  $as_echo_n "(cached) " >&6
10431else
10432  case $XATTR in
10433  [\\/]* | ?:[\\/]*)
10434  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10435  ;;
10436  *)
10437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440  IFS=$as_save_IFS
10441  test -z "$as_dir" && as_dir=.
10442    for ac_exec_ext in '' $ac_executable_extensions; do
10443  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10444    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446    break 2
10447  fi
10448done
10449  done
10450IFS=$as_save_IFS
10451
10452  ;;
10453esac
10454fi
10455XATTR=$ac_cv_path_XATTR
10456if test -n "$XATTR"; then
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10458$as_echo "$XATTR" >&6; }
10459else
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
10462fi
10463
10464
10465  test -n "$XATTR" && break
10466done
10467
10468
10469    if test "x$XATTR" = x; then
10470        if test "xxattr" = x; then
10471          PROG_NAME=xattr
10472        else
10473          PROG_NAME=xattr
10474        fi
10475        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10476$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10477        as_fn_error $? "Cannot continue" "$LINENO" 5
10478    fi
10479
10480
10481fi
10482
10483
10484# Check if pkg-config is available.
10485
10486
10487if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10488	if test -n "$ac_tool_prefix"; then
10489  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10490set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $PKG_CONFIG in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10508    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10520if test -n "$PKG_CONFIG"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10522$as_echo "$PKG_CONFIG" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529fi
10530if test -z "$ac_cv_path_PKG_CONFIG"; then
10531  ac_pt_PKG_CONFIG=$PKG_CONFIG
10532  # Extract the first word of "pkg-config", so it can be a program name with args.
10533set dummy pkg-config; ac_word=$2
10534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10535$as_echo_n "checking for $ac_word... " >&6; }
10536if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10537  $as_echo_n "(cached) " >&6
10538else
10539  case $ac_pt_PKG_CONFIG in
10540  [\\/]* | ?:[\\/]*)
10541  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10542  ;;
10543  *)
10544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10545for as_dir in $PATH
10546do
10547  IFS=$as_save_IFS
10548  test -z "$as_dir" && as_dir=.
10549    for ac_exec_ext in '' $ac_executable_extensions; do
10550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10551    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10553    break 2
10554  fi
10555done
10556  done
10557IFS=$as_save_IFS
10558
10559  ;;
10560esac
10561fi
10562ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10563if test -n "$ac_pt_PKG_CONFIG"; then
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10565$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10566else
10567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10568$as_echo "no" >&6; }
10569fi
10570
10571  if test "x$ac_pt_PKG_CONFIG" = x; then
10572    PKG_CONFIG=""
10573  else
10574    case $cross_compiling:$ac_tool_warned in
10575yes:)
10576{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10577$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10578ac_tool_warned=yes ;;
10579esac
10580    PKG_CONFIG=$ac_pt_PKG_CONFIG
10581  fi
10582else
10583  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10584fi
10585
10586fi
10587if test -n "$PKG_CONFIG"; then
10588	_pkg_min_version=0.9.0
10589	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10590$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10591	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10592		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10593$as_echo "yes" >&6; }
10594	else
10595		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
10597		PKG_CONFIG=""
10598	fi
10599
10600fi
10601
10602# After basic tools have been setup, we can check build os specific details.
10603
10604###############################################################################
10605
10606# Note that this is the build platform OS version!
10607
10608OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10609OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10610OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10611OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10612
10613
10614
10615
10616
10617# Setup builddeps, for automatic downloading of tools we need.
10618# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10619# boot-jdk setup, but we need to have basic tools setup first.
10620
10621
10622# Check whether --with-builddeps-conf was given.
10623if test "${with_builddeps_conf+set}" = set; then :
10624  withval=$with_builddeps_conf;
10625fi
10626
10627
10628
10629# Check whether --with-builddeps-server was given.
10630if test "${with_builddeps_server+set}" = set; then :
10631  withval=$with_builddeps_server;
10632fi
10633
10634
10635
10636# Check whether --with-builddeps-dir was given.
10637if test "${with_builddeps_dir+set}" = set; then :
10638  withval=$with_builddeps_dir;
10639else
10640  with_builddeps_dir=/localhome/builddeps
10641fi
10642
10643
10644
10645# Check whether --with-builddeps-group was given.
10646if test "${with_builddeps_group+set}" = set; then :
10647  withval=$with_builddeps_group;
10648fi
10649
10650
10651
10652
10653    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10654        if test "x$with_builddeps_conf" != x; then
10655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10656$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10657            builddepsfile=$with_builddeps_conf
10658            if test -s $builddepsfile; then
10659                . $builddepsfile
10660                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10661$as_echo "loaded!" >&6; }
10662            else
10663               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10664           fi
10665        else
10666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10667$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10668            builddepsfile=`mktemp`
10669            touch $builddepsfile
10670            # Put all found confs into a single file.
10671            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10672            # Source the file to acquire the variables
10673            if test -s $builddepsfile; then
10674                . $builddepsfile
10675                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10676$as_echo "found at least one!" >&6; }
10677            else
10678               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10679           fi
10680        fi
10681        # Create build and target names that use _ instead of "-" and ".".
10682        # This is necessary to use them in variable names.
10683        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10684        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10685        # Extract rewrite information for build and target
10686        eval rewritten_build=\${REWRITE_${build_var}}
10687        if test "x$rewritten_build" = x; then
10688            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10689            echo Build stays the same $rewritten_build
10690        else
10691            echo Rewriting build for builddeps into $rewritten_build
10692        fi
10693        eval rewritten_target=\${REWRITE_${target_var}}
10694        if test "x$rewritten_target" = x; then
10695            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10696            echo Target stays the same $rewritten_target
10697        else
10698            echo Rewriting target for builddeps into $rewritten_target
10699        fi
10700        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10701        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10702    fi
10703    for ac_prog in 7z unzip
10704do
10705  # Extract the first word of "$ac_prog", so it can be a program name with args.
10706set dummy $ac_prog; ac_word=$2
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10708$as_echo_n "checking for $ac_word... " >&6; }
10709if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10710  $as_echo_n "(cached) " >&6
10711else
10712  if test -n "$BDEPS_UNZIP"; then
10713  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10714else
10715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10716for as_dir in $PATH
10717do
10718  IFS=$as_save_IFS
10719  test -z "$as_dir" && as_dir=.
10720    for ac_exec_ext in '' $ac_executable_extensions; do
10721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10722    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10724    break 2
10725  fi
10726done
10727  done
10728IFS=$as_save_IFS
10729
10730fi
10731fi
10732BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10733if test -n "$BDEPS_UNZIP"; then
10734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10735$as_echo "$BDEPS_UNZIP" >&6; }
10736else
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
10739fi
10740
10741
10742  test -n "$BDEPS_UNZIP" && break
10743done
10744
10745    if test "x$BDEPS_UNZIP" = x7z; then
10746        BDEPS_UNZIP="7z x"
10747    fi
10748
10749    for ac_prog in wget lftp ftp
10750do
10751  # Extract the first word of "$ac_prog", so it can be a program name with args.
10752set dummy $ac_prog; ac_word=$2
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10754$as_echo_n "checking for $ac_word... " >&6; }
10755if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10756  $as_echo_n "(cached) " >&6
10757else
10758  if test -n "$BDEPS_FTP"; then
10759  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10760else
10761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10768    ac_cv_prog_BDEPS_FTP="$ac_prog"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776fi
10777fi
10778BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10779if test -n "$BDEPS_FTP"; then
10780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10781$as_echo "$BDEPS_FTP" >&6; }
10782else
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10784$as_echo "no" >&6; }
10785fi
10786
10787
10788  test -n "$BDEPS_FTP" && break
10789done
10790
10791
10792
10793###############################################################################
10794#
10795# Determine OpenJDK variants, options and version numbers.
10796#
10797###############################################################################
10798
10799# We need build & target for this.
10800
10801
10802###############################################################################
10803#
10804# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10805# We always build headless support.
10806#
10807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10808$as_echo_n "checking headful support... " >&6; }
10809# Check whether --enable-headful was given.
10810if test "${enable_headful+set}" = set; then :
10811  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10812else
10813  SUPPORT_HEADFUL=yes
10814fi
10815
10816
10817SUPPORT_HEADLESS=yes
10818BUILD_HEADLESS="BUILD_HEADLESS:=true"
10819
10820if test "x$SUPPORT_HEADFUL" = xyes; then
10821    # We are building both headful and headless.
10822    headful_msg="inlude support for both headful and headless"
10823fi
10824
10825if test "x$SUPPORT_HEADFUL" = xno; then
10826    # Thus we are building headless only.
10827    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10828    headful_msg="headless only"
10829fi
10830
10831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10832$as_echo "$headful_msg" >&6; }
10833
10834
10835
10836
10837
10838# Control wether Hotspot runs Queens test after build.
10839# Check whether --enable-hotspot-test-in-build was given.
10840if test "${enable_hotspot_test_in_build+set}" = set; then :
10841  enableval=$enable_hotspot_test_in_build;
10842else
10843  enable_hotspot_test_in_build=no
10844fi
10845
10846if test "x$enable_hotspot_test_in_build" = "xyes"; then
10847    TEST_IN_BUILD=true
10848else
10849    TEST_IN_BUILD=false
10850fi
10851
10852
10853###############################################################################
10854#
10855# Choose cacerts source file
10856#
10857
10858# Check whether --with-cacerts-file was given.
10859if test "${with_cacerts_file+set}" = set; then :
10860  withval=$with_cacerts_file;
10861fi
10862
10863if test "x$with_cacerts_file" != x; then
10864    CACERTS_FILE=$with_cacerts_file
10865else
10866    if test "x$OPENJDK" = "xtrue"; then
10867        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10868    else
10869        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10870    fi
10871fi
10872
10873
10874###############################################################################
10875#
10876# Enable or disable unlimited crypto
10877#
10878# Check whether --enable-unlimited-crypto was given.
10879if test "${enable_unlimited_crypto+set}" = set; then :
10880  enableval=$enable_unlimited_crypto;
10881else
10882  enable_unlimited_crypto=no
10883fi
10884
10885if test "x$enable_unlimited_crypto" = "xyes"; then
10886    UNLIMITED_CRYPTO=true
10887else
10888    UNLIMITED_CRYPTO=false
10889fi
10890
10891
10892###############################################################################
10893#
10894# Enable or disable the elliptic curve crypto implementation
10895#
10896
10897
10898###############################################################################
10899#
10900# Compress jars
10901#
10902COMPRESS_JARS=false
10903
10904
10905
10906
10907# Source the version numbers
10908. $AUTOCONF_DIR/version-numbers
10909
10910# Get the settings from parameters
10911
10912# Check whether --with-milestone was given.
10913if test "${with_milestone+set}" = set; then :
10914  withval=$with_milestone;
10915fi
10916
10917if test "x$with_milestone" = xyes; then
10918  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10919elif test "x$with_milestone" != x; then
10920    MILESTONE="$with_milestone"
10921fi
10922if test "x$MILESTONE" = x; then
10923  MILESTONE=internal
10924fi
10925
10926
10927# Check whether --with-build-number was given.
10928if test "${with_build_number+set}" = set; then :
10929  withval=$with_build_number;
10930fi
10931
10932if test "x$with_build_number" = xyes; then
10933  as_fn_error $? "Build number must have a value" "$LINENO" 5
10934elif test "x$with_build_number" != x; then
10935  JDK_BUILD_NUMBER="$with_build_number"
10936fi
10937if test "x$JDK_BUILD_NUMBER" = x; then
10938  JDK_BUILD_NUMBER=b00
10939fi
10940
10941
10942# Check whether --with-user-release-suffix was given.
10943if test "${with_user_release_suffix+set}" = set; then :
10944  withval=$with_user_release_suffix;
10945fi
10946
10947if test "x$with_user_release_suffix" = xyes; then
10948  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10949elif test "x$with_user_release_suffix" != x; then
10950  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10951else
10952  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10953  # Avoid [:alnum:] since it depends on the locale.
10954  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10955  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10956fi
10957
10958
10959# Now set the JDK version, milestone, build number etc.
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974COPYRIGHT_YEAR=`date +'%Y'`
10975
10976
10977if test "x$JDK_UPDATE_VERSION" != x; then
10978  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10979else
10980  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10981fi
10982
10983
10984COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10985
10986
10987
10988###############################################################################
10989#
10990# Setup BootJDK, used to bootstrap the build.
10991#
10992###############################################################################
10993
10994
10995BOOT_JDK_FOUND=no
10996
10997# Check whether --with-boot-jdk was given.
10998if test "${with_boot_jdk+set}" = set; then :
10999  withval=$with_boot_jdk;
11000fi
11001
11002
11003# We look for the Boot JDK through various means, going from more certain to
11004# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11005# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11006# must check if this is indeed valid; otherwise we'll continue looking.
11007
11008# Test: Is bootjdk explicitely set by command line arguments?
11009
11010  if test "x$BOOT_JDK_FOUND" = xno; then
11011    # Now execute the test
11012
11013if test "x$with_boot_jdk" != x; then
11014    BOOT_JDK=$with_boot_jdk
11015    BOOT_JDK_FOUND=maybe
11016    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11017$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11018fi
11019
11020
11021    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11022    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11023      # Do we have a bin/java?
11024      if test ! -x "$BOOT_JDK/bin/java"; then
11025        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11027        BOOT_JDK_FOUND=no
11028      else
11029        # Do we have a bin/javac?
11030        if test ! -x "$BOOT_JDK/bin/javac"; then
11031          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11033          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11034$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11035          BOOT_JDK_FOUND=no
11036        else
11037          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11038          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11039            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11041            BOOT_JDK_FOUND=no
11042          else
11043            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11044            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11045
11046            # Extra M4 quote needed to protect [] in grep expression.
11047            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11048            if test "x$FOUND_VERSION_78" = x; then
11049              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11051              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11052$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11053              BOOT_JDK_FOUND=no
11054            else
11055              # We're done! :-)
11056              BOOT_JDK_FOUND=yes
11057
11058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11059
11060  # Input might be given as Windows format, start by converting to
11061  # unix format.
11062  path="$BOOT_JDK"
11063  new_path=`$CYGPATH -u "$path"`
11064
11065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11068  # "foo.exe" is OK but "foo" is an error.
11069  #
11070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11071  # It is also a way to make sure we got the proper file name for the real test later on.
11072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11073  if test "x$test_shortpath" = x; then
11074    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11076    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11077  fi
11078
11079  # Call helper function which possibly converts this using DOS-style short mode.
11080  # If so, the updated path is stored in $new_path.
11081
11082  input_path="$new_path"
11083  # Check if we need to convert this using DOS-style short mode. If the path
11084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11085  # take no chances and rewrite it.
11086  # Note: m4 eats our [], so we need to use [ and ] instead.
11087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11088  if test "x$has_forbidden_chars" != x; then
11089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11093      # Going to short mode and back again did indeed matter. Since short mode is
11094      # case insensitive, let's make it lowercase to improve readability.
11095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11096      # Now convert it back to Unix-stile (cygpath)
11097      input_path=`$CYGPATH -u "$shortmode_path"`
11098      new_path="$input_path"
11099    fi
11100  fi
11101
11102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11103  if test "x$test_cygdrive_prefix" = x; then
11104    # As a simple fix, exclude /usr/bin since it's not a real path.
11105    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11107      # a path prefixed by /cygdrive for fixpath to work.
11108      new_path="$CYGWIN_ROOT_PATH$input_path"
11109    fi
11110  fi
11111
11112
11113  if test "x$path" != "x$new_path"; then
11114    BOOT_JDK="$new_path"
11115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11117  fi
11118
11119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11120
11121  path="$BOOT_JDK"
11122  has_colon=`$ECHO $path | $GREP ^.:`
11123  new_path="$path"
11124  if test "x$has_colon" = x; then
11125    # Not in mixed or Windows style, start by that.
11126    new_path=`cmd //c echo $path`
11127  fi
11128
11129
11130  input_path="$new_path"
11131  # Check if we need to convert this using DOS-style short mode. If the path
11132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11133  # take no chances and rewrite it.
11134  # Note: m4 eats our [], so we need to use [ and ] instead.
11135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11136  if test "x$has_forbidden_chars" != x; then
11137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11139  fi
11140
11141
11142  windows_path="$new_path"
11143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11144    unix_path=`$CYGPATH -u "$windows_path"`
11145    new_path="$unix_path"
11146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11148    new_path="$unix_path"
11149  fi
11150
11151  if test "x$path" != "x$new_path"; then
11152    BOOT_JDK="$new_path"
11153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11155  fi
11156
11157  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11158  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11159
11160  else
11161    # We're on a posix platform. Hooray! :)
11162    path="$BOOT_JDK"
11163
11164    if test ! -f "$path" && test ! -d "$path"; then
11165      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11166    fi
11167
11168    has_space=`$ECHO "$path" | $GREP " "`
11169    if test "x$has_space" != x; then
11170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11171$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11172      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11173    fi
11174  fi
11175
11176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11177$as_echo_n "checking for Boot JDK... " >&6; }
11178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11179$as_echo "$BOOT_JDK" >&6; }
11180              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11181$as_echo_n "checking Boot JDK version... " >&6; }
11182              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11184$as_echo "$BOOT_JDK_VERSION" >&6; }
11185            fi # end check jdk version
11186          fi # end check rt.jar
11187        fi # end check javac
11188      fi # end check java
11189    fi # end check boot jdk found
11190  fi
11191
11192if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11193  # Having specified an argument which is incorrect will produce an instant failure;
11194  # we should not go on looking
11195  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11196fi
11197
11198# Test: Is bootjdk available from builddeps?
11199
11200  if test "x$BOOT_JDK_FOUND" = xno; then
11201    # Now execute the test
11202
11203
11204
11205    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11206        # Source the builddeps file again, to make sure it uses the latest variables!
11207        . $builddepsfile
11208        # Look for a target and build machine specific resource!
11209        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11210        if test "x$resource" = x; then
11211            # Ok, lets instead look for a target specific resource
11212            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11213        fi
11214        if test "x$resource" = x; then
11215            # Ok, lets instead look for a build specific resource
11216            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11217        fi
11218        if test "x$resource" = x; then
11219            # Ok, lets instead look for a generic resource
11220            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11221            resource=${builddep_bootjdk}
11222        fi
11223        if test "x$resource" != x; then
11224            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11225$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11226	    # If the resource in the builddeps.conf file is an existing directory,
11227	    # for example /java/linux/cups
11228	    if test -d ${resource}; then
11229	       depdir=${resource}
11230	    else
11231
11232# bootjdk is for example mymodule
11233# $resource is for example libs/general/libmymod_1_2_3.zip
11234# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11235# $with_builddeps_dir is for example /localhome/builddeps
11236# depdir is the name of the variable into which we store the depdir, eg MYMOD
11237# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11238# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11239    filename=`basename $resource`
11240    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11241    filebase=${filename%%.*}
11242    extension=${filename#*.}
11243    installdir=$with_builddeps_dir/$filebase
11244    if test ! -f $installdir/$filename.unpacked; then
11245        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11246$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11247        if test ! -d $installdir; then
11248            mkdir -p $installdir
11249        fi
11250        if test ! -d $installdir; then
11251            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11252        fi
11253        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11254        touch $tmpfile
11255        if test ! -f $tmpfile; then
11256            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11257        fi
11258
11259    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11260    # $tmpfile is the local file name for the downloaded file.
11261    VALID_TOOL=no
11262    if test "x$BDEPS_FTP" = xwget; then
11263       VALID_TOOL=yes
11264       wget -O $tmpfile $with_builddeps_server/$resource
11265    fi
11266    if test "x$BDEPS_FTP" = xlftp; then
11267       VALID_TOOL=yes
11268       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11269    fi
11270    if test "x$BDEPS_FTP" = xftp; then
11271        VALID_TOOL=yes
11272        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11273        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11274        FTPUSERPWD=${FTPSERVER%%@*}
11275        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11276            FTPUSER=${userpwd%%:*}
11277            FTPPWD=${userpwd#*@}
11278            FTPSERVER=${FTPSERVER#*@}
11279        else
11280            FTPUSER=ftp
11281            FTPPWD=ftp
11282        fi
11283        # the "pass" command does not work on some
11284        # ftp clients (read ftp.exe) but if it works,
11285        # passive mode is better!
11286        (\
11287            echo "user $FTPUSER $FTPPWD"        ;\
11288            echo "pass"                         ;\
11289            echo "bin"                          ;\
11290            echo "get $FTPPATH $tmpfile"              ;\
11291        ) | ftp -in $FTPSERVER
11292    fi
11293    if test "x$VALID_TOOL" != xyes; then
11294       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11295    fi
11296
11297        mv $tmpfile $installdir/$filename
11298        if test ! -s $installdir/$filename; then
11299            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11300        fi
11301        case "$extension" in
11302            zip)  echo "Unzipping $installdir/$filename..."
11303               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11304            ;;
11305            tar.gz) echo "Untaring $installdir/$filename..."
11306               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11307            ;;
11308            tgz) echo "Untaring $installdir/$filename..."
11309               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11310            ;;
11311            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11312            ;;
11313        esac
11314    fi
11315    if test -f $installdir/$filename.unpacked; then
11316        depdir=$installdir
11317    fi
11318
11319	    fi
11320            # Source the builddeps file again, because in the previous command, the depdir
11321            # was updated to point at the current build dependency install directory.
11322            . $builddepsfile
11323            # Now extract variables from the builddeps.conf files.
11324            theroot=${builddep_bootjdk_ROOT}
11325            thecflags=${builddep_bootjdk_CFLAGS}
11326            thelibs=${builddep_bootjdk_LIBS}
11327            if test "x$depdir" = x; then
11328                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11329            fi
11330            BOOT_JDK=$depdir
11331            if test "x$theroot" != x; then
11332               BOOT_JDK="$theroot"
11333            fi
11334            if test "x$thecflags" != x; then
11335               BOOT_JDK_CFLAGS="$thecflags"
11336            fi
11337            if test "x$thelibs" != x; then
11338               BOOT_JDK_LIBS="$thelibs"
11339            fi
11340            BOOT_JDK_FOUND=maybe
11341            else BOOT_JDK_FOUND=no
11342
11343        fi
11344        else BOOT_JDK_FOUND=no
11345
11346    fi
11347
11348
11349
11350    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11351    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11352      # Do we have a bin/java?
11353      if test ! -x "$BOOT_JDK/bin/java"; then
11354        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11356        BOOT_JDK_FOUND=no
11357      else
11358        # Do we have a bin/javac?
11359        if test ! -x "$BOOT_JDK/bin/javac"; then
11360          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11362          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11363$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11364          BOOT_JDK_FOUND=no
11365        else
11366          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11367          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11368            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11370            BOOT_JDK_FOUND=no
11371          else
11372            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11373            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11374
11375            # Extra M4 quote needed to protect [] in grep expression.
11376            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11377            if test "x$FOUND_VERSION_78" = x; then
11378              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11380              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11381$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11382              BOOT_JDK_FOUND=no
11383            else
11384              # We're done! :-)
11385              BOOT_JDK_FOUND=yes
11386
11387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11388
11389  # Input might be given as Windows format, start by converting to
11390  # unix format.
11391  path="$BOOT_JDK"
11392  new_path=`$CYGPATH -u "$path"`
11393
11394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11397  # "foo.exe" is OK but "foo" is an error.
11398  #
11399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11400  # It is also a way to make sure we got the proper file name for the real test later on.
11401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11402  if test "x$test_shortpath" = x; then
11403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11405    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11406  fi
11407
11408  # Call helper function which possibly converts this using DOS-style short mode.
11409  # If so, the updated path is stored in $new_path.
11410
11411  input_path="$new_path"
11412  # Check if we need to convert this using DOS-style short mode. If the path
11413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11414  # take no chances and rewrite it.
11415  # Note: m4 eats our [], so we need to use [ and ] instead.
11416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11417  if test "x$has_forbidden_chars" != x; then
11418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11422      # Going to short mode and back again did indeed matter. Since short mode is
11423      # case insensitive, let's make it lowercase to improve readability.
11424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11425      # Now convert it back to Unix-stile (cygpath)
11426      input_path=`$CYGPATH -u "$shortmode_path"`
11427      new_path="$input_path"
11428    fi
11429  fi
11430
11431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11432  if test "x$test_cygdrive_prefix" = x; then
11433    # As a simple fix, exclude /usr/bin since it's not a real path.
11434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11436      # a path prefixed by /cygdrive for fixpath to work.
11437      new_path="$CYGWIN_ROOT_PATH$input_path"
11438    fi
11439  fi
11440
11441
11442  if test "x$path" != "x$new_path"; then
11443    BOOT_JDK="$new_path"
11444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11446  fi
11447
11448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11449
11450  path="$BOOT_JDK"
11451  has_colon=`$ECHO $path | $GREP ^.:`
11452  new_path="$path"
11453  if test "x$has_colon" = x; then
11454    # Not in mixed or Windows style, start by that.
11455    new_path=`cmd //c echo $path`
11456  fi
11457
11458
11459  input_path="$new_path"
11460  # Check if we need to convert this using DOS-style short mode. If the path
11461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11462  # take no chances and rewrite it.
11463  # Note: m4 eats our [], so we need to use [ and ] instead.
11464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11465  if test "x$has_forbidden_chars" != x; then
11466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11468  fi
11469
11470
11471  windows_path="$new_path"
11472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11473    unix_path=`$CYGPATH -u "$windows_path"`
11474    new_path="$unix_path"
11475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11477    new_path="$unix_path"
11478  fi
11479
11480  if test "x$path" != "x$new_path"; then
11481    BOOT_JDK="$new_path"
11482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11484  fi
11485
11486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11488
11489  else
11490    # We're on a posix platform. Hooray! :)
11491    path="$BOOT_JDK"
11492
11493    if test ! -f "$path" && test ! -d "$path"; then
11494      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11495    fi
11496
11497    has_space=`$ECHO "$path" | $GREP " "`
11498    if test "x$has_space" != x; then
11499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11501      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11502    fi
11503  fi
11504
11505              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11506$as_echo_n "checking for Boot JDK... " >&6; }
11507              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11508$as_echo "$BOOT_JDK" >&6; }
11509              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11510$as_echo_n "checking Boot JDK version... " >&6; }
11511              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11512              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11513$as_echo "$BOOT_JDK_VERSION" >&6; }
11514            fi # end check jdk version
11515          fi # end check rt.jar
11516        fi # end check javac
11517      fi # end check java
11518    fi # end check boot jdk found
11519  fi
11520
11521
11522# Test: Is $JAVA_HOME set?
11523
11524  if test "x$BOOT_JDK_FOUND" = xno; then
11525    # Now execute the test
11526
11527    if test "x$JAVA_HOME" != x; then
11528        JAVA_HOME_PROCESSED="$JAVA_HOME"
11529
11530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11531
11532  # Input might be given as Windows format, start by converting to
11533  # unix format.
11534  path="$JAVA_HOME_PROCESSED"
11535  new_path=`$CYGPATH -u "$path"`
11536
11537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11540  # "foo.exe" is OK but "foo" is an error.
11541  #
11542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11543  # It is also a way to make sure we got the proper file name for the real test later on.
11544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11545  if test "x$test_shortpath" = x; then
11546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11547$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11548    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11549  fi
11550
11551  # Call helper function which possibly converts this using DOS-style short mode.
11552  # If so, the updated path is stored in $new_path.
11553
11554  input_path="$new_path"
11555  # Check if we need to convert this using DOS-style short mode. If the path
11556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11557  # take no chances and rewrite it.
11558  # Note: m4 eats our [], so we need to use [ and ] instead.
11559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11560  if test "x$has_forbidden_chars" != x; then
11561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11565      # Going to short mode and back again did indeed matter. Since short mode is
11566      # case insensitive, let's make it lowercase to improve readability.
11567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11568      # Now convert it back to Unix-stile (cygpath)
11569      input_path=`$CYGPATH -u "$shortmode_path"`
11570      new_path="$input_path"
11571    fi
11572  fi
11573
11574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11575  if test "x$test_cygdrive_prefix" = x; then
11576    # As a simple fix, exclude /usr/bin since it's not a real path.
11577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11579      # a path prefixed by /cygdrive for fixpath to work.
11580      new_path="$CYGWIN_ROOT_PATH$input_path"
11581    fi
11582  fi
11583
11584
11585  if test "x$path" != "x$new_path"; then
11586    JAVA_HOME_PROCESSED="$new_path"
11587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11588$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11589  fi
11590
11591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11592
11593  path="$JAVA_HOME_PROCESSED"
11594  has_colon=`$ECHO $path | $GREP ^.:`
11595  new_path="$path"
11596  if test "x$has_colon" = x; then
11597    # Not in mixed or Windows style, start by that.
11598    new_path=`cmd //c echo $path`
11599  fi
11600
11601
11602  input_path="$new_path"
11603  # Check if we need to convert this using DOS-style short mode. If the path
11604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11605  # take no chances and rewrite it.
11606  # Note: m4 eats our [], so we need to use [ and ] instead.
11607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11608  if test "x$has_forbidden_chars" != x; then
11609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11611  fi
11612
11613
11614  windows_path="$new_path"
11615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11616    unix_path=`$CYGPATH -u "$windows_path"`
11617    new_path="$unix_path"
11618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11620    new_path="$unix_path"
11621  fi
11622
11623  if test "x$path" != "x$new_path"; then
11624    JAVA_HOME_PROCESSED="$new_path"
11625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11626$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11627  fi
11628
11629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11631
11632  else
11633    # We're on a posix platform. Hooray! :)
11634    path="$JAVA_HOME_PROCESSED"
11635
11636    if test ! -f "$path" && test ! -d "$path"; then
11637      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11638    fi
11639
11640    has_space=`$ECHO "$path" | $GREP " "`
11641    if test "x$has_space" != x; then
11642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11643$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11644      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11645    fi
11646  fi
11647
11648        if test ! -d "$JAVA_HOME_PROCESSED"; then
11649            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11650$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11651        else
11652          # Aha, the user has set a JAVA_HOME
11653          # let us use that as the Boot JDK.
11654          BOOT_JDK="$JAVA_HOME_PROCESSED"
11655          BOOT_JDK_FOUND=maybe
11656          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11657$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11658        fi
11659    fi
11660
11661
11662    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11663    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11664      # Do we have a bin/java?
11665      if test ! -x "$BOOT_JDK/bin/java"; then
11666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11668        BOOT_JDK_FOUND=no
11669      else
11670        # Do we have a bin/javac?
11671        if test ! -x "$BOOT_JDK/bin/javac"; then
11672          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11674          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11675$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11676          BOOT_JDK_FOUND=no
11677        else
11678          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11679          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11680            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11682            BOOT_JDK_FOUND=no
11683          else
11684            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11686
11687            # Extra M4 quote needed to protect [] in grep expression.
11688            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11689            if test "x$FOUND_VERSION_78" = x; then
11690              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11692              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11693$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11694              BOOT_JDK_FOUND=no
11695            else
11696              # We're done! :-)
11697              BOOT_JDK_FOUND=yes
11698
11699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11700
11701  # Input might be given as Windows format, start by converting to
11702  # unix format.
11703  path="$BOOT_JDK"
11704  new_path=`$CYGPATH -u "$path"`
11705
11706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11709  # "foo.exe" is OK but "foo" is an error.
11710  #
11711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11712  # It is also a way to make sure we got the proper file name for the real test later on.
11713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11714  if test "x$test_shortpath" = x; then
11715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11717    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11718  fi
11719
11720  # Call helper function which possibly converts this using DOS-style short mode.
11721  # If so, the updated path is stored in $new_path.
11722
11723  input_path="$new_path"
11724  # Check if we need to convert this using DOS-style short mode. If the path
11725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11726  # take no chances and rewrite it.
11727  # Note: m4 eats our [], so we need to use [ and ] instead.
11728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11729  if test "x$has_forbidden_chars" != x; then
11730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11734      # Going to short mode and back again did indeed matter. Since short mode is
11735      # case insensitive, let's make it lowercase to improve readability.
11736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11737      # Now convert it back to Unix-stile (cygpath)
11738      input_path=`$CYGPATH -u "$shortmode_path"`
11739      new_path="$input_path"
11740    fi
11741  fi
11742
11743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11744  if test "x$test_cygdrive_prefix" = x; then
11745    # As a simple fix, exclude /usr/bin since it's not a real path.
11746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11748      # a path prefixed by /cygdrive for fixpath to work.
11749      new_path="$CYGWIN_ROOT_PATH$input_path"
11750    fi
11751  fi
11752
11753
11754  if test "x$path" != "x$new_path"; then
11755    BOOT_JDK="$new_path"
11756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11757$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11758  fi
11759
11760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11761
11762  path="$BOOT_JDK"
11763  has_colon=`$ECHO $path | $GREP ^.:`
11764  new_path="$path"
11765  if test "x$has_colon" = x; then
11766    # Not in mixed or Windows style, start by that.
11767    new_path=`cmd //c echo $path`
11768  fi
11769
11770
11771  input_path="$new_path"
11772  # Check if we need to convert this using DOS-style short mode. If the path
11773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11774  # take no chances and rewrite it.
11775  # Note: m4 eats our [], so we need to use [ and ] instead.
11776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11777  if test "x$has_forbidden_chars" != x; then
11778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11780  fi
11781
11782
11783  windows_path="$new_path"
11784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11785    unix_path=`$CYGPATH -u "$windows_path"`
11786    new_path="$unix_path"
11787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11789    new_path="$unix_path"
11790  fi
11791
11792  if test "x$path" != "x$new_path"; then
11793    BOOT_JDK="$new_path"
11794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11795$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11796  fi
11797
11798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11800
11801  else
11802    # We're on a posix platform. Hooray! :)
11803    path="$BOOT_JDK"
11804
11805    if test ! -f "$path" && test ! -d "$path"; then
11806      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11807    fi
11808
11809    has_space=`$ECHO "$path" | $GREP " "`
11810    if test "x$has_space" != x; then
11811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11813      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11814    fi
11815  fi
11816
11817              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11818$as_echo_n "checking for Boot JDK... " >&6; }
11819              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11820$as_echo "$BOOT_JDK" >&6; }
11821              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11822$as_echo_n "checking Boot JDK version... " >&6; }
11823              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11824              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11825$as_echo "$BOOT_JDK_VERSION" >&6; }
11826            fi # end check jdk version
11827          fi # end check rt.jar
11828        fi # end check javac
11829      fi # end check java
11830    fi # end check boot jdk found
11831  fi
11832
11833
11834# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11835
11836  if test "x$BOOT_JDK_FOUND" = xno; then
11837    # Now execute the test
11838
11839    if test -x /usr/libexec/java_home; then
11840        BOOT_JDK=`/usr/libexec/java_home`
11841        BOOT_JDK_FOUND=maybe
11842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11843$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11844    fi
11845
11846
11847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11849      # Do we have a bin/java?
11850      if test ! -x "$BOOT_JDK/bin/java"; then
11851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11853        BOOT_JDK_FOUND=no
11854      else
11855        # Do we have a bin/javac?
11856        if test ! -x "$BOOT_JDK/bin/javac"; then
11857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11861          BOOT_JDK_FOUND=no
11862        else
11863          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11864          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11867            BOOT_JDK_FOUND=no
11868          else
11869            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11870            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11871
11872            # Extra M4 quote needed to protect [] in grep expression.
11873            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11874            if test "x$FOUND_VERSION_78" = x; then
11875              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11876$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11877              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11878$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11879              BOOT_JDK_FOUND=no
11880            else
11881              # We're done! :-)
11882              BOOT_JDK_FOUND=yes
11883
11884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11885
11886  # Input might be given as Windows format, start by converting to
11887  # unix format.
11888  path="$BOOT_JDK"
11889  new_path=`$CYGPATH -u "$path"`
11890
11891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11894  # "foo.exe" is OK but "foo" is an error.
11895  #
11896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11897  # It is also a way to make sure we got the proper file name for the real test later on.
11898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11899  if test "x$test_shortpath" = x; then
11900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11901$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11902    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11903  fi
11904
11905  # Call helper function which possibly converts this using DOS-style short mode.
11906  # If so, the updated path is stored in $new_path.
11907
11908  input_path="$new_path"
11909  # Check if we need to convert this using DOS-style short mode. If the path
11910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11911  # take no chances and rewrite it.
11912  # Note: m4 eats our [], so we need to use [ and ] instead.
11913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11914  if test "x$has_forbidden_chars" != x; then
11915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11919      # Going to short mode and back again did indeed matter. Since short mode is
11920      # case insensitive, let's make it lowercase to improve readability.
11921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11922      # Now convert it back to Unix-stile (cygpath)
11923      input_path=`$CYGPATH -u "$shortmode_path"`
11924      new_path="$input_path"
11925    fi
11926  fi
11927
11928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11929  if test "x$test_cygdrive_prefix" = x; then
11930    # As a simple fix, exclude /usr/bin since it's not a real path.
11931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11933      # a path prefixed by /cygdrive for fixpath to work.
11934      new_path="$CYGWIN_ROOT_PATH$input_path"
11935    fi
11936  fi
11937
11938
11939  if test "x$path" != "x$new_path"; then
11940    BOOT_JDK="$new_path"
11941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11943  fi
11944
11945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11946
11947  path="$BOOT_JDK"
11948  has_colon=`$ECHO $path | $GREP ^.:`
11949  new_path="$path"
11950  if test "x$has_colon" = x; then
11951    # Not in mixed or Windows style, start by that.
11952    new_path=`cmd //c echo $path`
11953  fi
11954
11955
11956  input_path="$new_path"
11957  # Check if we need to convert this using DOS-style short mode. If the path
11958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11959  # take no chances and rewrite it.
11960  # Note: m4 eats our [], so we need to use [ and ] instead.
11961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11962  if test "x$has_forbidden_chars" != x; then
11963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11965  fi
11966
11967
11968  windows_path="$new_path"
11969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11970    unix_path=`$CYGPATH -u "$windows_path"`
11971    new_path="$unix_path"
11972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11974    new_path="$unix_path"
11975  fi
11976
11977  if test "x$path" != "x$new_path"; then
11978    BOOT_JDK="$new_path"
11979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11981  fi
11982
11983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11985
11986  else
11987    # We're on a posix platform. Hooray! :)
11988    path="$BOOT_JDK"
11989
11990    if test ! -f "$path" && test ! -d "$path"; then
11991      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11992    fi
11993
11994    has_space=`$ECHO "$path" | $GREP " "`
11995    if test "x$has_space" != x; then
11996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11998      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11999    fi
12000  fi
12001
12002              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12003$as_echo_n "checking for Boot JDK... " >&6; }
12004              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12005$as_echo "$BOOT_JDK" >&6; }
12006              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12007$as_echo_n "checking Boot JDK version... " >&6; }
12008              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12009              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12010$as_echo "$BOOT_JDK_VERSION" >&6; }
12011            fi # end check jdk version
12012          fi # end check rt.jar
12013        fi # end check javac
12014      fi # end check java
12015    fi # end check boot jdk found
12016  fi
12017
12018
12019# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12020
12021  if test "x$BOOT_JDK_FOUND" = xno; then
12022    # Now execute the test
12023
12024    # Extract the first word of "javac", so it can be a program name with args.
12025set dummy javac; ac_word=$2
12026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12027$as_echo_n "checking for $ac_word... " >&6; }
12028if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12029  $as_echo_n "(cached) " >&6
12030else
12031  case $JAVAC_CHECK in
12032  [\\/]* | ?:[\\/]*)
12033  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12034  ;;
12035  *)
12036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12037for as_dir in $PATH
12038do
12039  IFS=$as_save_IFS
12040  test -z "$as_dir" && as_dir=.
12041    for ac_exec_ext in '' $ac_executable_extensions; do
12042  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12043    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12045    break 2
12046  fi
12047done
12048  done
12049IFS=$as_save_IFS
12050
12051  ;;
12052esac
12053fi
12054JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12055if test -n "$JAVAC_CHECK"; then
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12057$as_echo "$JAVAC_CHECK" >&6; }
12058else
12059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12060$as_echo "no" >&6; }
12061fi
12062
12063
12064    # Extract the first word of "java", so it can be a program name with args.
12065set dummy java; ac_word=$2
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12067$as_echo_n "checking for $ac_word... " >&6; }
12068if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12069  $as_echo_n "(cached) " >&6
12070else
12071  case $JAVA_CHECK in
12072  [\\/]* | ?:[\\/]*)
12073  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12074  ;;
12075  *)
12076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12077for as_dir in $PATH
12078do
12079  IFS=$as_save_IFS
12080  test -z "$as_dir" && as_dir=.
12081    for ac_exec_ext in '' $ac_executable_extensions; do
12082  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12083    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12085    break 2
12086  fi
12087done
12088  done
12089IFS=$as_save_IFS
12090
12091  ;;
12092esac
12093fi
12094JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12095if test -n "$JAVA_CHECK"; then
12096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12097$as_echo "$JAVA_CHECK" >&6; }
12098else
12099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12100$as_echo "no" >&6; }
12101fi
12102
12103
12104    BINARY="$JAVAC_CHECK"
12105    if test "x$JAVAC_CHECK" = x; then
12106        BINARY="$JAVA_CHECK"
12107    fi
12108    if test "x$BINARY" != x; then
12109        # So there is a java(c) binary, it might be part of a JDK.
12110        # Lets find the JDK/JRE directory by following symbolic links.
12111        # Linux/GNU systems often have links from /usr/bin/java to
12112        # /etc/alternatives/java to the real JDK binary.
12113
12114    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12115        # Follow a chain of symbolic links. Use readlink
12116        # where it exists, else fall back to horribly
12117        # complicated shell code.
12118        if test "x$READLINK_TESTED" != yes; then
12119            # On MacOSX there is a readlink tool with a different
12120            # purpose than the GNU readlink tool. Check the found readlink.
12121            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12122            if test "x$ISGNU" = x; then
12123                 # A readlink that we do not know how to use.
12124                 # Are there other non-GNU readlinks out there?
12125                 READLINK_TESTED=yes
12126                 READLINK=
12127            fi
12128        fi
12129
12130        if test "x$READLINK" != x; then
12131            BINARY=`$READLINK -f $BINARY`
12132        else
12133            # Save the current directory for restoring afterwards
12134            STARTDIR=$PWD
12135            COUNTER=0
12136            sym_link_dir=`$DIRNAME $BINARY`
12137            sym_link_file=`$BASENAME $BINARY`
12138            # Use the system pwd and not the shell builtin to resolve directory symlinks
12139            cd $sym_link_dir
12140            cd `$THEPWDCMD`
12141            sym_link_dir=`$THEPWDCMD`
12142            # Resolve file symlinks
12143            while test $COUNTER -lt 20; do
12144                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12145                if test "x$ISLINK" == x; then
12146                    # This is not a symbolic link! We are done!
12147                    break
12148                fi
12149                # Again resolve directory symlinks since the target of the just found
12150                # link could be in a different directory
12151                cd `$DIRNAME $ISLINK`
12152                sym_link_dir=`$THEPWDCMD`
12153                sym_link_file=`$BASENAME $ISLINK`
12154                let COUNTER=COUNTER+1
12155            done
12156            cd $STARTDIR
12157            BINARY=$sym_link_dir/$sym_link_file
12158        fi
12159    fi
12160
12161        BOOT_JDK=`dirname "$BINARY"`
12162        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12163        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12164            # Looks like we found ourselves an JDK
12165            BOOT_JDK_FOUND=maybe
12166            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12167$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12168        fi
12169    fi
12170
12171
12172    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12173    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12174      # Do we have a bin/java?
12175      if test ! -x "$BOOT_JDK/bin/java"; then
12176        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12178        BOOT_JDK_FOUND=no
12179      else
12180        # Do we have a bin/javac?
12181        if test ! -x "$BOOT_JDK/bin/javac"; then
12182          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12184          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12185$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12186          BOOT_JDK_FOUND=no
12187        else
12188          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12189          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12192            BOOT_JDK_FOUND=no
12193          else
12194            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12195            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12196
12197            # Extra M4 quote needed to protect [] in grep expression.
12198            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12199            if test "x$FOUND_VERSION_78" = x; then
12200              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12202              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12203$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12204              BOOT_JDK_FOUND=no
12205            else
12206              # We're done! :-)
12207              BOOT_JDK_FOUND=yes
12208
12209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12210
12211  # Input might be given as Windows format, start by converting to
12212  # unix format.
12213  path="$BOOT_JDK"
12214  new_path=`$CYGPATH -u "$path"`
12215
12216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12219  # "foo.exe" is OK but "foo" is an error.
12220  #
12221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12222  # It is also a way to make sure we got the proper file name for the real test later on.
12223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12224  if test "x$test_shortpath" = x; then
12225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12227    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12228  fi
12229
12230  # Call helper function which possibly converts this using DOS-style short mode.
12231  # If so, the updated path is stored in $new_path.
12232
12233  input_path="$new_path"
12234  # Check if we need to convert this using DOS-style short mode. If the path
12235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12236  # take no chances and rewrite it.
12237  # Note: m4 eats our [], so we need to use [ and ] instead.
12238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12239  if test "x$has_forbidden_chars" != x; then
12240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12244      # Going to short mode and back again did indeed matter. Since short mode is
12245      # case insensitive, let's make it lowercase to improve readability.
12246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12247      # Now convert it back to Unix-stile (cygpath)
12248      input_path=`$CYGPATH -u "$shortmode_path"`
12249      new_path="$input_path"
12250    fi
12251  fi
12252
12253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12254  if test "x$test_cygdrive_prefix" = x; then
12255    # As a simple fix, exclude /usr/bin since it's not a real path.
12256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12258      # a path prefixed by /cygdrive for fixpath to work.
12259      new_path="$CYGWIN_ROOT_PATH$input_path"
12260    fi
12261  fi
12262
12263
12264  if test "x$path" != "x$new_path"; then
12265    BOOT_JDK="$new_path"
12266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12268  fi
12269
12270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12271
12272  path="$BOOT_JDK"
12273  has_colon=`$ECHO $path | $GREP ^.:`
12274  new_path="$path"
12275  if test "x$has_colon" = x; then
12276    # Not in mixed or Windows style, start by that.
12277    new_path=`cmd //c echo $path`
12278  fi
12279
12280
12281  input_path="$new_path"
12282  # Check if we need to convert this using DOS-style short mode. If the path
12283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12284  # take no chances and rewrite it.
12285  # Note: m4 eats our [], so we need to use [ and ] instead.
12286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12287  if test "x$has_forbidden_chars" != x; then
12288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12290  fi
12291
12292
12293  windows_path="$new_path"
12294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12295    unix_path=`$CYGPATH -u "$windows_path"`
12296    new_path="$unix_path"
12297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12299    new_path="$unix_path"
12300  fi
12301
12302  if test "x$path" != "x$new_path"; then
12303    BOOT_JDK="$new_path"
12304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12306  fi
12307
12308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12310
12311  else
12312    # We're on a posix platform. Hooray! :)
12313    path="$BOOT_JDK"
12314
12315    if test ! -f "$path" && test ! -d "$path"; then
12316      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12317    fi
12318
12319    has_space=`$ECHO "$path" | $GREP " "`
12320    if test "x$has_space" != x; then
12321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12324    fi
12325  fi
12326
12327              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12328$as_echo_n "checking for Boot JDK... " >&6; }
12329              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12330$as_echo "$BOOT_JDK" >&6; }
12331              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12332$as_echo_n "checking Boot JDK version... " >&6; }
12333              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12334              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12335$as_echo "$BOOT_JDK_VERSION" >&6; }
12336            fi # end check jdk version
12337          fi # end check rt.jar
12338        fi # end check javac
12339      fi # end check java
12340    fi # end check boot jdk found
12341  fi
12342
12343
12344# Test: Is there a JDK installed in default, well-known locations?
12345
12346  if test "x$BOOT_JDK_FOUND" = xno; then
12347    # Now execute the test
12348
12349  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12350
12351  if test "x$BOOT_JDK_FOUND" = xno; then
12352    # Now execute the test
12353
12354  if test "x$ProgramW6432" != x; then
12355    VIRTUAL_DIR="$ProgramW6432/Java"
12356
12357  windows_path="$VIRTUAL_DIR"
12358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12359    unix_path=`$CYGPATH -u "$windows_path"`
12360    VIRTUAL_DIR="$unix_path"
12361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12363    VIRTUAL_DIR="$unix_path"
12364  fi
12365
12366
12367  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12368  BOOT_JDK_SUFFIX=""
12369  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12370  if test "x$ALL_JDKS_FOUND" != x; then
12371    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12372
12373  if test "x$BOOT_JDK_FOUND" = xno; then
12374    # Now execute the test
12375
12376        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12377        if test -d "$BOOT_JDK"; then
12378          BOOT_JDK_FOUND=maybe
12379          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12380$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12381        fi
12382
12383
12384    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12385    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12386      # Do we have a bin/java?
12387      if test ! -x "$BOOT_JDK/bin/java"; then
12388        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12390        BOOT_JDK_FOUND=no
12391      else
12392        # Do we have a bin/javac?
12393        if test ! -x "$BOOT_JDK/bin/javac"; then
12394          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12396          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12397$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12398          BOOT_JDK_FOUND=no
12399        else
12400          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12401          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12402            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12404            BOOT_JDK_FOUND=no
12405          else
12406            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12407            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12408
12409            # Extra M4 quote needed to protect [] in grep expression.
12410            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12411            if test "x$FOUND_VERSION_78" = x; then
12412              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12414              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12415$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12416              BOOT_JDK_FOUND=no
12417            else
12418              # We're done! :-)
12419              BOOT_JDK_FOUND=yes
12420
12421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12422
12423  # Input might be given as Windows format, start by converting to
12424  # unix format.
12425  path="$BOOT_JDK"
12426  new_path=`$CYGPATH -u "$path"`
12427
12428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12431  # "foo.exe" is OK but "foo" is an error.
12432  #
12433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12434  # It is also a way to make sure we got the proper file name for the real test later on.
12435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12436  if test "x$test_shortpath" = x; then
12437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12439    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12440  fi
12441
12442  # Call helper function which possibly converts this using DOS-style short mode.
12443  # If so, the updated path is stored in $new_path.
12444
12445  input_path="$new_path"
12446  # Check if we need to convert this using DOS-style short mode. If the path
12447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12448  # take no chances and rewrite it.
12449  # Note: m4 eats our [], so we need to use [ and ] instead.
12450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12451  if test "x$has_forbidden_chars" != x; then
12452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12456      # Going to short mode and back again did indeed matter. Since short mode is
12457      # case insensitive, let's make it lowercase to improve readability.
12458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12459      # Now convert it back to Unix-stile (cygpath)
12460      input_path=`$CYGPATH -u "$shortmode_path"`
12461      new_path="$input_path"
12462    fi
12463  fi
12464
12465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12466  if test "x$test_cygdrive_prefix" = x; then
12467    # As a simple fix, exclude /usr/bin since it's not a real path.
12468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12470      # a path prefixed by /cygdrive for fixpath to work.
12471      new_path="$CYGWIN_ROOT_PATH$input_path"
12472    fi
12473  fi
12474
12475
12476  if test "x$path" != "x$new_path"; then
12477    BOOT_JDK="$new_path"
12478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12480  fi
12481
12482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12483
12484  path="$BOOT_JDK"
12485  has_colon=`$ECHO $path | $GREP ^.:`
12486  new_path="$path"
12487  if test "x$has_colon" = x; then
12488    # Not in mixed or Windows style, start by that.
12489    new_path=`cmd //c echo $path`
12490  fi
12491
12492
12493  input_path="$new_path"
12494  # Check if we need to convert this using DOS-style short mode. If the path
12495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12496  # take no chances and rewrite it.
12497  # Note: m4 eats our [], so we need to use [ and ] instead.
12498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12499  if test "x$has_forbidden_chars" != x; then
12500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12502  fi
12503
12504
12505  windows_path="$new_path"
12506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12507    unix_path=`$CYGPATH -u "$windows_path"`
12508    new_path="$unix_path"
12509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12511    new_path="$unix_path"
12512  fi
12513
12514  if test "x$path" != "x$new_path"; then
12515    BOOT_JDK="$new_path"
12516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12518  fi
12519
12520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12522
12523  else
12524    # We're on a posix platform. Hooray! :)
12525    path="$BOOT_JDK"
12526
12527    if test ! -f "$path" && test ! -d "$path"; then
12528      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12529    fi
12530
12531    has_space=`$ECHO "$path" | $GREP " "`
12532    if test "x$has_space" != x; then
12533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12536    fi
12537  fi
12538
12539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12540$as_echo_n "checking for Boot JDK... " >&6; }
12541              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12542$as_echo "$BOOT_JDK" >&6; }
12543              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12544$as_echo_n "checking Boot JDK version... " >&6; }
12545              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12546              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12547$as_echo "$BOOT_JDK_VERSION" >&6; }
12548            fi # end check jdk version
12549          fi # end check rt.jar
12550        fi # end check javac
12551      fi # end check java
12552    fi # end check boot jdk found
12553  fi
12554
12555    done
12556  fi
12557
12558  fi
12559
12560
12561    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12562    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12563      # Do we have a bin/java?
12564      if test ! -x "$BOOT_JDK/bin/java"; then
12565        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12567        BOOT_JDK_FOUND=no
12568      else
12569        # Do we have a bin/javac?
12570        if test ! -x "$BOOT_JDK/bin/javac"; then
12571          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12573          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12574$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12575          BOOT_JDK_FOUND=no
12576        else
12577          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12578          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12581            BOOT_JDK_FOUND=no
12582          else
12583            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12584            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12585
12586            # Extra M4 quote needed to protect [] in grep expression.
12587            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12588            if test "x$FOUND_VERSION_78" = x; then
12589              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12591              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12592$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12593              BOOT_JDK_FOUND=no
12594            else
12595              # We're done! :-)
12596              BOOT_JDK_FOUND=yes
12597
12598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12599
12600  # Input might be given as Windows format, start by converting to
12601  # unix format.
12602  path="$BOOT_JDK"
12603  new_path=`$CYGPATH -u "$path"`
12604
12605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12608  # "foo.exe" is OK but "foo" is an error.
12609  #
12610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12611  # It is also a way to make sure we got the proper file name for the real test later on.
12612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12613  if test "x$test_shortpath" = x; then
12614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12615$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12616    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12617  fi
12618
12619  # Call helper function which possibly converts this using DOS-style short mode.
12620  # If so, the updated path is stored in $new_path.
12621
12622  input_path="$new_path"
12623  # Check if we need to convert this using DOS-style short mode. If the path
12624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12625  # take no chances and rewrite it.
12626  # Note: m4 eats our [], so we need to use [ and ] instead.
12627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12628  if test "x$has_forbidden_chars" != x; then
12629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12633      # Going to short mode and back again did indeed matter. Since short mode is
12634      # case insensitive, let's make it lowercase to improve readability.
12635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12636      # Now convert it back to Unix-stile (cygpath)
12637      input_path=`$CYGPATH -u "$shortmode_path"`
12638      new_path="$input_path"
12639    fi
12640  fi
12641
12642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12643  if test "x$test_cygdrive_prefix" = x; then
12644    # As a simple fix, exclude /usr/bin since it's not a real path.
12645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12647      # a path prefixed by /cygdrive for fixpath to work.
12648      new_path="$CYGWIN_ROOT_PATH$input_path"
12649    fi
12650  fi
12651
12652
12653  if test "x$path" != "x$new_path"; then
12654    BOOT_JDK="$new_path"
12655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12657  fi
12658
12659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12660
12661  path="$BOOT_JDK"
12662  has_colon=`$ECHO $path | $GREP ^.:`
12663  new_path="$path"
12664  if test "x$has_colon" = x; then
12665    # Not in mixed or Windows style, start by that.
12666    new_path=`cmd //c echo $path`
12667  fi
12668
12669
12670  input_path="$new_path"
12671  # Check if we need to convert this using DOS-style short mode. If the path
12672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12673  # take no chances and rewrite it.
12674  # Note: m4 eats our [], so we need to use [ and ] instead.
12675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12676  if test "x$has_forbidden_chars" != x; then
12677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12679  fi
12680
12681
12682  windows_path="$new_path"
12683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12684    unix_path=`$CYGPATH -u "$windows_path"`
12685    new_path="$unix_path"
12686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12688    new_path="$unix_path"
12689  fi
12690
12691  if test "x$path" != "x$new_path"; then
12692    BOOT_JDK="$new_path"
12693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12695  fi
12696
12697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12699
12700  else
12701    # We're on a posix platform. Hooray! :)
12702    path="$BOOT_JDK"
12703
12704    if test ! -f "$path" && test ! -d "$path"; then
12705      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12706    fi
12707
12708    has_space=`$ECHO "$path" | $GREP " "`
12709    if test "x$has_space" != x; then
12710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12712      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12713    fi
12714  fi
12715
12716              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12717$as_echo_n "checking for Boot JDK... " >&6; }
12718              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12719$as_echo "$BOOT_JDK" >&6; }
12720              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12721$as_echo_n "checking Boot JDK version... " >&6; }
12722              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12723              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12724$as_echo "$BOOT_JDK_VERSION" >&6; }
12725            fi # end check jdk version
12726          fi # end check rt.jar
12727        fi # end check javac
12728      fi # end check java
12729    fi # end check boot jdk found
12730  fi
12731
12732
12733  if test "x$BOOT_JDK_FOUND" = xno; then
12734    # Now execute the test
12735
12736  if test "x$PROGRAMW6432" != x; then
12737    VIRTUAL_DIR="$PROGRAMW6432/Java"
12738
12739  windows_path="$VIRTUAL_DIR"
12740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12741    unix_path=`$CYGPATH -u "$windows_path"`
12742    VIRTUAL_DIR="$unix_path"
12743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12745    VIRTUAL_DIR="$unix_path"
12746  fi
12747
12748
12749  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12750  BOOT_JDK_SUFFIX=""
12751  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12752  if test "x$ALL_JDKS_FOUND" != x; then
12753    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12754
12755  if test "x$BOOT_JDK_FOUND" = xno; then
12756    # Now execute the test
12757
12758        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12759        if test -d "$BOOT_JDK"; then
12760          BOOT_JDK_FOUND=maybe
12761          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12762$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12763        fi
12764
12765
12766    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12767    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12768      # Do we have a bin/java?
12769      if test ! -x "$BOOT_JDK/bin/java"; then
12770        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12772        BOOT_JDK_FOUND=no
12773      else
12774        # Do we have a bin/javac?
12775        if test ! -x "$BOOT_JDK/bin/javac"; then
12776          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12778          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12779$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12780          BOOT_JDK_FOUND=no
12781        else
12782          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12783          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12784            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12786            BOOT_JDK_FOUND=no
12787          else
12788            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12789            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12790
12791            # Extra M4 quote needed to protect [] in grep expression.
12792            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12793            if test "x$FOUND_VERSION_78" = x; then
12794              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12796              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12797$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12798              BOOT_JDK_FOUND=no
12799            else
12800              # We're done! :-)
12801              BOOT_JDK_FOUND=yes
12802
12803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12804
12805  # Input might be given as Windows format, start by converting to
12806  # unix format.
12807  path="$BOOT_JDK"
12808  new_path=`$CYGPATH -u "$path"`
12809
12810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12813  # "foo.exe" is OK but "foo" is an error.
12814  #
12815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12816  # It is also a way to make sure we got the proper file name for the real test later on.
12817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12818  if test "x$test_shortpath" = x; then
12819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12821    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12822  fi
12823
12824  # Call helper function which possibly converts this using DOS-style short mode.
12825  # If so, the updated path is stored in $new_path.
12826
12827  input_path="$new_path"
12828  # Check if we need to convert this using DOS-style short mode. If the path
12829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12830  # take no chances and rewrite it.
12831  # Note: m4 eats our [], so we need to use [ and ] instead.
12832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12833  if test "x$has_forbidden_chars" != x; then
12834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12838      # Going to short mode and back again did indeed matter. Since short mode is
12839      # case insensitive, let's make it lowercase to improve readability.
12840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12841      # Now convert it back to Unix-stile (cygpath)
12842      input_path=`$CYGPATH -u "$shortmode_path"`
12843      new_path="$input_path"
12844    fi
12845  fi
12846
12847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12848  if test "x$test_cygdrive_prefix" = x; then
12849    # As a simple fix, exclude /usr/bin since it's not a real path.
12850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12852      # a path prefixed by /cygdrive for fixpath to work.
12853      new_path="$CYGWIN_ROOT_PATH$input_path"
12854    fi
12855  fi
12856
12857
12858  if test "x$path" != "x$new_path"; then
12859    BOOT_JDK="$new_path"
12860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12862  fi
12863
12864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12865
12866  path="$BOOT_JDK"
12867  has_colon=`$ECHO $path | $GREP ^.:`
12868  new_path="$path"
12869  if test "x$has_colon" = x; then
12870    # Not in mixed or Windows style, start by that.
12871    new_path=`cmd //c echo $path`
12872  fi
12873
12874
12875  input_path="$new_path"
12876  # Check if we need to convert this using DOS-style short mode. If the path
12877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12878  # take no chances and rewrite it.
12879  # Note: m4 eats our [], so we need to use [ and ] instead.
12880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12881  if test "x$has_forbidden_chars" != x; then
12882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12884  fi
12885
12886
12887  windows_path="$new_path"
12888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12889    unix_path=`$CYGPATH -u "$windows_path"`
12890    new_path="$unix_path"
12891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12893    new_path="$unix_path"
12894  fi
12895
12896  if test "x$path" != "x$new_path"; then
12897    BOOT_JDK="$new_path"
12898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12900  fi
12901
12902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12904
12905  else
12906    # We're on a posix platform. Hooray! :)
12907    path="$BOOT_JDK"
12908
12909    if test ! -f "$path" && test ! -d "$path"; then
12910      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12911    fi
12912
12913    has_space=`$ECHO "$path" | $GREP " "`
12914    if test "x$has_space" != x; then
12915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12917      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12918    fi
12919  fi
12920
12921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12922$as_echo_n "checking for Boot JDK... " >&6; }
12923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12924$as_echo "$BOOT_JDK" >&6; }
12925              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12926$as_echo_n "checking Boot JDK version... " >&6; }
12927              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12929$as_echo "$BOOT_JDK_VERSION" >&6; }
12930            fi # end check jdk version
12931          fi # end check rt.jar
12932        fi # end check javac
12933      fi # end check java
12934    fi # end check boot jdk found
12935  fi
12936
12937    done
12938  fi
12939
12940  fi
12941
12942
12943    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12944    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12945      # Do we have a bin/java?
12946      if test ! -x "$BOOT_JDK/bin/java"; then
12947        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12949        BOOT_JDK_FOUND=no
12950      else
12951        # Do we have a bin/javac?
12952        if test ! -x "$BOOT_JDK/bin/javac"; then
12953          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12955          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12956$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12957          BOOT_JDK_FOUND=no
12958        else
12959          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12960          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12963            BOOT_JDK_FOUND=no
12964          else
12965            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12967
12968            # Extra M4 quote needed to protect [] in grep expression.
12969            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12970            if test "x$FOUND_VERSION_78" = x; then
12971              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12973              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12974$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12975              BOOT_JDK_FOUND=no
12976            else
12977              # We're done! :-)
12978              BOOT_JDK_FOUND=yes
12979
12980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12981
12982  # Input might be given as Windows format, start by converting to
12983  # unix format.
12984  path="$BOOT_JDK"
12985  new_path=`$CYGPATH -u "$path"`
12986
12987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12990  # "foo.exe" is OK but "foo" is an error.
12991  #
12992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12993  # It is also a way to make sure we got the proper file name for the real test later on.
12994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12995  if test "x$test_shortpath" = x; then
12996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12997$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12998    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12999  fi
13000
13001  # Call helper function which possibly converts this using DOS-style short mode.
13002  # If so, the updated path is stored in $new_path.
13003
13004  input_path="$new_path"
13005  # Check if we need to convert this using DOS-style short mode. If the path
13006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13007  # take no chances and rewrite it.
13008  # Note: m4 eats our [], so we need to use [ and ] instead.
13009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13010  if test "x$has_forbidden_chars" != x; then
13011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13015      # Going to short mode and back again did indeed matter. Since short mode is
13016      # case insensitive, let's make it lowercase to improve readability.
13017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13018      # Now convert it back to Unix-stile (cygpath)
13019      input_path=`$CYGPATH -u "$shortmode_path"`
13020      new_path="$input_path"
13021    fi
13022  fi
13023
13024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13025  if test "x$test_cygdrive_prefix" = x; then
13026    # As a simple fix, exclude /usr/bin since it's not a real path.
13027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13029      # a path prefixed by /cygdrive for fixpath to work.
13030      new_path="$CYGWIN_ROOT_PATH$input_path"
13031    fi
13032  fi
13033
13034
13035  if test "x$path" != "x$new_path"; then
13036    BOOT_JDK="$new_path"
13037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13039  fi
13040
13041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13042
13043  path="$BOOT_JDK"
13044  has_colon=`$ECHO $path | $GREP ^.:`
13045  new_path="$path"
13046  if test "x$has_colon" = x; then
13047    # Not in mixed or Windows style, start by that.
13048    new_path=`cmd //c echo $path`
13049  fi
13050
13051
13052  input_path="$new_path"
13053  # Check if we need to convert this using DOS-style short mode. If the path
13054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13055  # take no chances and rewrite it.
13056  # Note: m4 eats our [], so we need to use [ and ] instead.
13057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13058  if test "x$has_forbidden_chars" != x; then
13059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13061  fi
13062
13063
13064  windows_path="$new_path"
13065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13066    unix_path=`$CYGPATH -u "$windows_path"`
13067    new_path="$unix_path"
13068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13070    new_path="$unix_path"
13071  fi
13072
13073  if test "x$path" != "x$new_path"; then
13074    BOOT_JDK="$new_path"
13075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13077  fi
13078
13079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13081
13082  else
13083    # We're on a posix platform. Hooray! :)
13084    path="$BOOT_JDK"
13085
13086    if test ! -f "$path" && test ! -d "$path"; then
13087      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13088    fi
13089
13090    has_space=`$ECHO "$path" | $GREP " "`
13091    if test "x$has_space" != x; then
13092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13094      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13095    fi
13096  fi
13097
13098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13099$as_echo_n "checking for Boot JDK... " >&6; }
13100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13101$as_echo "$BOOT_JDK" >&6; }
13102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13103$as_echo_n "checking Boot JDK version... " >&6; }
13104              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13105              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13106$as_echo "$BOOT_JDK_VERSION" >&6; }
13107            fi # end check jdk version
13108          fi # end check rt.jar
13109        fi # end check javac
13110      fi # end check java
13111    fi # end check boot jdk found
13112  fi
13113
13114
13115  if test "x$BOOT_JDK_FOUND" = xno; then
13116    # Now execute the test
13117
13118  if test "x$PROGRAMFILES" != x; then
13119    VIRTUAL_DIR="$PROGRAMFILES/Java"
13120
13121  windows_path="$VIRTUAL_DIR"
13122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13123    unix_path=`$CYGPATH -u "$windows_path"`
13124    VIRTUAL_DIR="$unix_path"
13125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13127    VIRTUAL_DIR="$unix_path"
13128  fi
13129
13130
13131  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13132  BOOT_JDK_SUFFIX=""
13133  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13134  if test "x$ALL_JDKS_FOUND" != x; then
13135    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13136
13137  if test "x$BOOT_JDK_FOUND" = xno; then
13138    # Now execute the test
13139
13140        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13141        if test -d "$BOOT_JDK"; then
13142          BOOT_JDK_FOUND=maybe
13143          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13144$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13145        fi
13146
13147
13148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13150      # Do we have a bin/java?
13151      if test ! -x "$BOOT_JDK/bin/java"; then
13152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13154        BOOT_JDK_FOUND=no
13155      else
13156        # Do we have a bin/javac?
13157        if test ! -x "$BOOT_JDK/bin/javac"; then
13158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13162          BOOT_JDK_FOUND=no
13163        else
13164          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13165          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13168            BOOT_JDK_FOUND=no
13169          else
13170            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13171            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13172
13173            # Extra M4 quote needed to protect [] in grep expression.
13174            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13175            if test "x$FOUND_VERSION_78" = x; then
13176              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13178              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13179$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13180              BOOT_JDK_FOUND=no
13181            else
13182              # We're done! :-)
13183              BOOT_JDK_FOUND=yes
13184
13185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13186
13187  # Input might be given as Windows format, start by converting to
13188  # unix format.
13189  path="$BOOT_JDK"
13190  new_path=`$CYGPATH -u "$path"`
13191
13192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13195  # "foo.exe" is OK but "foo" is an error.
13196  #
13197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13198  # It is also a way to make sure we got the proper file name for the real test later on.
13199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13200  if test "x$test_shortpath" = x; then
13201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13203    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13204  fi
13205
13206  # Call helper function which possibly converts this using DOS-style short mode.
13207  # If so, the updated path is stored in $new_path.
13208
13209  input_path="$new_path"
13210  # Check if we need to convert this using DOS-style short mode. If the path
13211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13212  # take no chances and rewrite it.
13213  # Note: m4 eats our [], so we need to use [ and ] instead.
13214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13215  if test "x$has_forbidden_chars" != x; then
13216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13220      # Going to short mode and back again did indeed matter. Since short mode is
13221      # case insensitive, let's make it lowercase to improve readability.
13222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13223      # Now convert it back to Unix-stile (cygpath)
13224      input_path=`$CYGPATH -u "$shortmode_path"`
13225      new_path="$input_path"
13226    fi
13227  fi
13228
13229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13230  if test "x$test_cygdrive_prefix" = x; then
13231    # As a simple fix, exclude /usr/bin since it's not a real path.
13232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13234      # a path prefixed by /cygdrive for fixpath to work.
13235      new_path="$CYGWIN_ROOT_PATH$input_path"
13236    fi
13237  fi
13238
13239
13240  if test "x$path" != "x$new_path"; then
13241    BOOT_JDK="$new_path"
13242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13244  fi
13245
13246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13247
13248  path="$BOOT_JDK"
13249  has_colon=`$ECHO $path | $GREP ^.:`
13250  new_path="$path"
13251  if test "x$has_colon" = x; then
13252    # Not in mixed or Windows style, start by that.
13253    new_path=`cmd //c echo $path`
13254  fi
13255
13256
13257  input_path="$new_path"
13258  # Check if we need to convert this using DOS-style short mode. If the path
13259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13260  # take no chances and rewrite it.
13261  # Note: m4 eats our [], so we need to use [ and ] instead.
13262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13263  if test "x$has_forbidden_chars" != x; then
13264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13266  fi
13267
13268
13269  windows_path="$new_path"
13270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13271    unix_path=`$CYGPATH -u "$windows_path"`
13272    new_path="$unix_path"
13273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13275    new_path="$unix_path"
13276  fi
13277
13278  if test "x$path" != "x$new_path"; then
13279    BOOT_JDK="$new_path"
13280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13282  fi
13283
13284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13286
13287  else
13288    # We're on a posix platform. Hooray! :)
13289    path="$BOOT_JDK"
13290
13291    if test ! -f "$path" && test ! -d "$path"; then
13292      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13293    fi
13294
13295    has_space=`$ECHO "$path" | $GREP " "`
13296    if test "x$has_space" != x; then
13297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13299      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13300    fi
13301  fi
13302
13303              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13304$as_echo_n "checking for Boot JDK... " >&6; }
13305              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13306$as_echo "$BOOT_JDK" >&6; }
13307              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13308$as_echo_n "checking Boot JDK version... " >&6; }
13309              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13310              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13311$as_echo "$BOOT_JDK_VERSION" >&6; }
13312            fi # end check jdk version
13313          fi # end check rt.jar
13314        fi # end check javac
13315      fi # end check java
13316    fi # end check boot jdk found
13317  fi
13318
13319    done
13320  fi
13321
13322  fi
13323
13324
13325    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13326    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13327      # Do we have a bin/java?
13328      if test ! -x "$BOOT_JDK/bin/java"; then
13329        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13331        BOOT_JDK_FOUND=no
13332      else
13333        # Do we have a bin/javac?
13334        if test ! -x "$BOOT_JDK/bin/javac"; then
13335          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13337          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13338$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13339          BOOT_JDK_FOUND=no
13340        else
13341          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13342          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13343            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13345            BOOT_JDK_FOUND=no
13346          else
13347            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13349
13350            # Extra M4 quote needed to protect [] in grep expression.
13351            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13352            if test "x$FOUND_VERSION_78" = x; then
13353              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13355              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13356$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13357              BOOT_JDK_FOUND=no
13358            else
13359              # We're done! :-)
13360              BOOT_JDK_FOUND=yes
13361
13362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13363
13364  # Input might be given as Windows format, start by converting to
13365  # unix format.
13366  path="$BOOT_JDK"
13367  new_path=`$CYGPATH -u "$path"`
13368
13369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13372  # "foo.exe" is OK but "foo" is an error.
13373  #
13374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13375  # It is also a way to make sure we got the proper file name for the real test later on.
13376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13377  if test "x$test_shortpath" = x; then
13378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13381  fi
13382
13383  # Call helper function which possibly converts this using DOS-style short mode.
13384  # If so, the updated path is stored in $new_path.
13385
13386  input_path="$new_path"
13387  # Check if we need to convert this using DOS-style short mode. If the path
13388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13389  # take no chances and rewrite it.
13390  # Note: m4 eats our [], so we need to use [ and ] instead.
13391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13392  if test "x$has_forbidden_chars" != x; then
13393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13397      # Going to short mode and back again did indeed matter. Since short mode is
13398      # case insensitive, let's make it lowercase to improve readability.
13399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13400      # Now convert it back to Unix-stile (cygpath)
13401      input_path=`$CYGPATH -u "$shortmode_path"`
13402      new_path="$input_path"
13403    fi
13404  fi
13405
13406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13407  if test "x$test_cygdrive_prefix" = x; then
13408    # As a simple fix, exclude /usr/bin since it's not a real path.
13409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13411      # a path prefixed by /cygdrive for fixpath to work.
13412      new_path="$CYGWIN_ROOT_PATH$input_path"
13413    fi
13414  fi
13415
13416
13417  if test "x$path" != "x$new_path"; then
13418    BOOT_JDK="$new_path"
13419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13421  fi
13422
13423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13424
13425  path="$BOOT_JDK"
13426  has_colon=`$ECHO $path | $GREP ^.:`
13427  new_path="$path"
13428  if test "x$has_colon" = x; then
13429    # Not in mixed or Windows style, start by that.
13430    new_path=`cmd //c echo $path`
13431  fi
13432
13433
13434  input_path="$new_path"
13435  # Check if we need to convert this using DOS-style short mode. If the path
13436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13437  # take no chances and rewrite it.
13438  # Note: m4 eats our [], so we need to use [ and ] instead.
13439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13440  if test "x$has_forbidden_chars" != x; then
13441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13443  fi
13444
13445
13446  windows_path="$new_path"
13447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13448    unix_path=`$CYGPATH -u "$windows_path"`
13449    new_path="$unix_path"
13450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13452    new_path="$unix_path"
13453  fi
13454
13455  if test "x$path" != "x$new_path"; then
13456    BOOT_JDK="$new_path"
13457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13459  fi
13460
13461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13463
13464  else
13465    # We're on a posix platform. Hooray! :)
13466    path="$BOOT_JDK"
13467
13468    if test ! -f "$path" && test ! -d "$path"; then
13469      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13470    fi
13471
13472    has_space=`$ECHO "$path" | $GREP " "`
13473    if test "x$has_space" != x; then
13474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13477    fi
13478  fi
13479
13480              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13481$as_echo_n "checking for Boot JDK... " >&6; }
13482              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13483$as_echo "$BOOT_JDK" >&6; }
13484              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13485$as_echo_n "checking Boot JDK version... " >&6; }
13486              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13488$as_echo "$BOOT_JDK_VERSION" >&6; }
13489            fi # end check jdk version
13490          fi # end check rt.jar
13491        fi # end check javac
13492      fi # end check java
13493    fi # end check boot jdk found
13494  fi
13495
13496
13497  if test "x$BOOT_JDK_FOUND" = xno; then
13498    # Now execute the test
13499
13500  if test "x$ProgramFiles" != x; then
13501    VIRTUAL_DIR="$ProgramFiles/Java"
13502
13503  windows_path="$VIRTUAL_DIR"
13504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13505    unix_path=`$CYGPATH -u "$windows_path"`
13506    VIRTUAL_DIR="$unix_path"
13507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13509    VIRTUAL_DIR="$unix_path"
13510  fi
13511
13512
13513  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13514  BOOT_JDK_SUFFIX=""
13515  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13516  if test "x$ALL_JDKS_FOUND" != x; then
13517    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13518
13519  if test "x$BOOT_JDK_FOUND" = xno; then
13520    # Now execute the test
13521
13522        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13523        if test -d "$BOOT_JDK"; then
13524          BOOT_JDK_FOUND=maybe
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13526$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13527        fi
13528
13529
13530    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13531    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13532      # Do we have a bin/java?
13533      if test ! -x "$BOOT_JDK/bin/java"; then
13534        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13536        BOOT_JDK_FOUND=no
13537      else
13538        # Do we have a bin/javac?
13539        if test ! -x "$BOOT_JDK/bin/javac"; then
13540          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13542          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13543$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13544          BOOT_JDK_FOUND=no
13545        else
13546          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13547          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13548            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13550            BOOT_JDK_FOUND=no
13551          else
13552            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13554
13555            # Extra M4 quote needed to protect [] in grep expression.
13556            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13557            if test "x$FOUND_VERSION_78" = x; then
13558              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13560              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13561$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13562              BOOT_JDK_FOUND=no
13563            else
13564              # We're done! :-)
13565              BOOT_JDK_FOUND=yes
13566
13567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13568
13569  # Input might be given as Windows format, start by converting to
13570  # unix format.
13571  path="$BOOT_JDK"
13572  new_path=`$CYGPATH -u "$path"`
13573
13574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13577  # "foo.exe" is OK but "foo" is an error.
13578  #
13579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13580  # It is also a way to make sure we got the proper file name for the real test later on.
13581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13582  if test "x$test_shortpath" = x; then
13583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13585    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13586  fi
13587
13588  # Call helper function which possibly converts this using DOS-style short mode.
13589  # If so, the updated path is stored in $new_path.
13590
13591  input_path="$new_path"
13592  # Check if we need to convert this using DOS-style short mode. If the path
13593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13594  # take no chances and rewrite it.
13595  # Note: m4 eats our [], so we need to use [ and ] instead.
13596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13597  if test "x$has_forbidden_chars" != x; then
13598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13602      # Going to short mode and back again did indeed matter. Since short mode is
13603      # case insensitive, let's make it lowercase to improve readability.
13604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13605      # Now convert it back to Unix-stile (cygpath)
13606      input_path=`$CYGPATH -u "$shortmode_path"`
13607      new_path="$input_path"
13608    fi
13609  fi
13610
13611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13612  if test "x$test_cygdrive_prefix" = x; then
13613    # As a simple fix, exclude /usr/bin since it's not a real path.
13614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13616      # a path prefixed by /cygdrive for fixpath to work.
13617      new_path="$CYGWIN_ROOT_PATH$input_path"
13618    fi
13619  fi
13620
13621
13622  if test "x$path" != "x$new_path"; then
13623    BOOT_JDK="$new_path"
13624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13625$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13626  fi
13627
13628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13629
13630  path="$BOOT_JDK"
13631  has_colon=`$ECHO $path | $GREP ^.:`
13632  new_path="$path"
13633  if test "x$has_colon" = x; then
13634    # Not in mixed or Windows style, start by that.
13635    new_path=`cmd //c echo $path`
13636  fi
13637
13638
13639  input_path="$new_path"
13640  # Check if we need to convert this using DOS-style short mode. If the path
13641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13642  # take no chances and rewrite it.
13643  # Note: m4 eats our [], so we need to use [ and ] instead.
13644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13645  if test "x$has_forbidden_chars" != x; then
13646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13648  fi
13649
13650
13651  windows_path="$new_path"
13652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13653    unix_path=`$CYGPATH -u "$windows_path"`
13654    new_path="$unix_path"
13655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13657    new_path="$unix_path"
13658  fi
13659
13660  if test "x$path" != "x$new_path"; then
13661    BOOT_JDK="$new_path"
13662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13664  fi
13665
13666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13668
13669  else
13670    # We're on a posix platform. Hooray! :)
13671    path="$BOOT_JDK"
13672
13673    if test ! -f "$path" && test ! -d "$path"; then
13674      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13675    fi
13676
13677    has_space=`$ECHO "$path" | $GREP " "`
13678    if test "x$has_space" != x; then
13679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13681      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13682    fi
13683  fi
13684
13685              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13686$as_echo_n "checking for Boot JDK... " >&6; }
13687              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13688$as_echo "$BOOT_JDK" >&6; }
13689              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13690$as_echo_n "checking Boot JDK version... " >&6; }
13691              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13692              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13693$as_echo "$BOOT_JDK_VERSION" >&6; }
13694            fi # end check jdk version
13695          fi # end check rt.jar
13696        fi # end check javac
13697      fi # end check java
13698    fi # end check boot jdk found
13699  fi
13700
13701    done
13702  fi
13703
13704  fi
13705
13706
13707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13709      # Do we have a bin/java?
13710      if test ! -x "$BOOT_JDK/bin/java"; then
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13713        BOOT_JDK_FOUND=no
13714      else
13715        # Do we have a bin/javac?
13716        if test ! -x "$BOOT_JDK/bin/javac"; then
13717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13721          BOOT_JDK_FOUND=no
13722        else
13723          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13724          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13725            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13727            BOOT_JDK_FOUND=no
13728          else
13729            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13731
13732            # Extra M4 quote needed to protect [] in grep expression.
13733            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13734            if test "x$FOUND_VERSION_78" = x; then
13735              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13737              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13738$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13739              BOOT_JDK_FOUND=no
13740            else
13741              # We're done! :-)
13742              BOOT_JDK_FOUND=yes
13743
13744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13745
13746  # Input might be given as Windows format, start by converting to
13747  # unix format.
13748  path="$BOOT_JDK"
13749  new_path=`$CYGPATH -u "$path"`
13750
13751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13754  # "foo.exe" is OK but "foo" is an error.
13755  #
13756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13757  # It is also a way to make sure we got the proper file name for the real test later on.
13758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13759  if test "x$test_shortpath" = x; then
13760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13762    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13763  fi
13764
13765  # Call helper function which possibly converts this using DOS-style short mode.
13766  # If so, the updated path is stored in $new_path.
13767
13768  input_path="$new_path"
13769  # Check if we need to convert this using DOS-style short mode. If the path
13770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13771  # take no chances and rewrite it.
13772  # Note: m4 eats our [], so we need to use [ and ] instead.
13773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13774  if test "x$has_forbidden_chars" != x; then
13775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13779      # Going to short mode and back again did indeed matter. Since short mode is
13780      # case insensitive, let's make it lowercase to improve readability.
13781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13782      # Now convert it back to Unix-stile (cygpath)
13783      input_path=`$CYGPATH -u "$shortmode_path"`
13784      new_path="$input_path"
13785    fi
13786  fi
13787
13788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13789  if test "x$test_cygdrive_prefix" = x; then
13790    # As a simple fix, exclude /usr/bin since it's not a real path.
13791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13793      # a path prefixed by /cygdrive for fixpath to work.
13794      new_path="$CYGWIN_ROOT_PATH$input_path"
13795    fi
13796  fi
13797
13798
13799  if test "x$path" != "x$new_path"; then
13800    BOOT_JDK="$new_path"
13801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13803  fi
13804
13805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13806
13807  path="$BOOT_JDK"
13808  has_colon=`$ECHO $path | $GREP ^.:`
13809  new_path="$path"
13810  if test "x$has_colon" = x; then
13811    # Not in mixed or Windows style, start by that.
13812    new_path=`cmd //c echo $path`
13813  fi
13814
13815
13816  input_path="$new_path"
13817  # Check if we need to convert this using DOS-style short mode. If the path
13818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13819  # take no chances and rewrite it.
13820  # Note: m4 eats our [], so we need to use [ and ] instead.
13821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13822  if test "x$has_forbidden_chars" != x; then
13823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13825  fi
13826
13827
13828  windows_path="$new_path"
13829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13830    unix_path=`$CYGPATH -u "$windows_path"`
13831    new_path="$unix_path"
13832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13834    new_path="$unix_path"
13835  fi
13836
13837  if test "x$path" != "x$new_path"; then
13838    BOOT_JDK="$new_path"
13839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13841  fi
13842
13843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13845
13846  else
13847    # We're on a posix platform. Hooray! :)
13848    path="$BOOT_JDK"
13849
13850    if test ! -f "$path" && test ! -d "$path"; then
13851      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13852    fi
13853
13854    has_space=`$ECHO "$path" | $GREP " "`
13855    if test "x$has_space" != x; then
13856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13857$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13858      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13859    fi
13860  fi
13861
13862              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13863$as_echo_n "checking for Boot JDK... " >&6; }
13864              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13865$as_echo "$BOOT_JDK" >&6; }
13866              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13867$as_echo_n "checking Boot JDK version... " >&6; }
13868              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13870$as_echo "$BOOT_JDK_VERSION" >&6; }
13871            fi # end check jdk version
13872          fi # end check rt.jar
13873        fi # end check javac
13874      fi # end check java
13875    fi # end check boot jdk found
13876  fi
13877
13878
13879  if test "x$BOOT_JDK_FOUND" = xno; then
13880    # Now execute the test
13881
13882  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13883  BOOT_JDK_SUFFIX=""
13884  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13885  if test "x$ALL_JDKS_FOUND" != x; then
13886    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13887
13888  if test "x$BOOT_JDK_FOUND" = xno; then
13889    # Now execute the test
13890
13891        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13892        if test -d "$BOOT_JDK"; then
13893          BOOT_JDK_FOUND=maybe
13894          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13895$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13896        fi
13897
13898
13899    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13900    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13901      # Do we have a bin/java?
13902      if test ! -x "$BOOT_JDK/bin/java"; then
13903        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13905        BOOT_JDK_FOUND=no
13906      else
13907        # Do we have a bin/javac?
13908        if test ! -x "$BOOT_JDK/bin/javac"; then
13909          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13911          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13912$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13913          BOOT_JDK_FOUND=no
13914        else
13915          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13916          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13919            BOOT_JDK_FOUND=no
13920          else
13921            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13923
13924            # Extra M4 quote needed to protect [] in grep expression.
13925            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13926            if test "x$FOUND_VERSION_78" = x; then
13927              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13929              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13930$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13931              BOOT_JDK_FOUND=no
13932            else
13933              # We're done! :-)
13934              BOOT_JDK_FOUND=yes
13935
13936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13937
13938  # Input might be given as Windows format, start by converting to
13939  # unix format.
13940  path="$BOOT_JDK"
13941  new_path=`$CYGPATH -u "$path"`
13942
13943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13946  # "foo.exe" is OK but "foo" is an error.
13947  #
13948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13949  # It is also a way to make sure we got the proper file name for the real test later on.
13950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13951  if test "x$test_shortpath" = x; then
13952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13955  fi
13956
13957  # Call helper function which possibly converts this using DOS-style short mode.
13958  # If so, the updated path is stored in $new_path.
13959
13960  input_path="$new_path"
13961  # Check if we need to convert this using DOS-style short mode. If the path
13962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13963  # take no chances and rewrite it.
13964  # Note: m4 eats our [], so we need to use [ and ] instead.
13965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13966  if test "x$has_forbidden_chars" != x; then
13967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13971      # Going to short mode and back again did indeed matter. Since short mode is
13972      # case insensitive, let's make it lowercase to improve readability.
13973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13974      # Now convert it back to Unix-stile (cygpath)
13975      input_path=`$CYGPATH -u "$shortmode_path"`
13976      new_path="$input_path"
13977    fi
13978  fi
13979
13980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13981  if test "x$test_cygdrive_prefix" = x; then
13982    # As a simple fix, exclude /usr/bin since it's not a real path.
13983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13985      # a path prefixed by /cygdrive for fixpath to work.
13986      new_path="$CYGWIN_ROOT_PATH$input_path"
13987    fi
13988  fi
13989
13990
13991  if test "x$path" != "x$new_path"; then
13992    BOOT_JDK="$new_path"
13993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13995  fi
13996
13997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13998
13999  path="$BOOT_JDK"
14000  has_colon=`$ECHO $path | $GREP ^.:`
14001  new_path="$path"
14002  if test "x$has_colon" = x; then
14003    # Not in mixed or Windows style, start by that.
14004    new_path=`cmd //c echo $path`
14005  fi
14006
14007
14008  input_path="$new_path"
14009  # Check if we need to convert this using DOS-style short mode. If the path
14010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14011  # take no chances and rewrite it.
14012  # Note: m4 eats our [], so we need to use [ and ] instead.
14013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14014  if test "x$has_forbidden_chars" != x; then
14015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14017  fi
14018
14019
14020  windows_path="$new_path"
14021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14022    unix_path=`$CYGPATH -u "$windows_path"`
14023    new_path="$unix_path"
14024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14026    new_path="$unix_path"
14027  fi
14028
14029  if test "x$path" != "x$new_path"; then
14030    BOOT_JDK="$new_path"
14031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14033  fi
14034
14035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14037
14038  else
14039    # We're on a posix platform. Hooray! :)
14040    path="$BOOT_JDK"
14041
14042    if test ! -f "$path" && test ! -d "$path"; then
14043      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14044    fi
14045
14046    has_space=`$ECHO "$path" | $GREP " "`
14047    if test "x$has_space" != x; then
14048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14050      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14051    fi
14052  fi
14053
14054              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14055$as_echo_n "checking for Boot JDK... " >&6; }
14056              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14057$as_echo "$BOOT_JDK" >&6; }
14058              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14059$as_echo_n "checking Boot JDK version... " >&6; }
14060              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14061              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14062$as_echo "$BOOT_JDK_VERSION" >&6; }
14063            fi # end check jdk version
14064          fi # end check rt.jar
14065        fi # end check javac
14066      fi # end check java
14067    fi # end check boot jdk found
14068  fi
14069
14070    done
14071  fi
14072
14073
14074    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14075    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14076      # Do we have a bin/java?
14077      if test ! -x "$BOOT_JDK/bin/java"; then
14078        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14080        BOOT_JDK_FOUND=no
14081      else
14082        # Do we have a bin/javac?
14083        if test ! -x "$BOOT_JDK/bin/javac"; then
14084          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14086          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14087$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14088          BOOT_JDK_FOUND=no
14089        else
14090          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14091          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14092            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14094            BOOT_JDK_FOUND=no
14095          else
14096            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14097            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14098
14099            # Extra M4 quote needed to protect [] in grep expression.
14100            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14101            if test "x$FOUND_VERSION_78" = x; then
14102              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14104              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14105$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14106              BOOT_JDK_FOUND=no
14107            else
14108              # We're done! :-)
14109              BOOT_JDK_FOUND=yes
14110
14111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14112
14113  # Input might be given as Windows format, start by converting to
14114  # unix format.
14115  path="$BOOT_JDK"
14116  new_path=`$CYGPATH -u "$path"`
14117
14118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14121  # "foo.exe" is OK but "foo" is an error.
14122  #
14123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14124  # It is also a way to make sure we got the proper file name for the real test later on.
14125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14126  if test "x$test_shortpath" = x; then
14127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14129    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14130  fi
14131
14132  # Call helper function which possibly converts this using DOS-style short mode.
14133  # If so, the updated path is stored in $new_path.
14134
14135  input_path="$new_path"
14136  # Check if we need to convert this using DOS-style short mode. If the path
14137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14138  # take no chances and rewrite it.
14139  # Note: m4 eats our [], so we need to use [ and ] instead.
14140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14141  if test "x$has_forbidden_chars" != x; then
14142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14146      # Going to short mode and back again did indeed matter. Since short mode is
14147      # case insensitive, let's make it lowercase to improve readability.
14148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14149      # Now convert it back to Unix-stile (cygpath)
14150      input_path=`$CYGPATH -u "$shortmode_path"`
14151      new_path="$input_path"
14152    fi
14153  fi
14154
14155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14156  if test "x$test_cygdrive_prefix" = x; then
14157    # As a simple fix, exclude /usr/bin since it's not a real path.
14158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14160      # a path prefixed by /cygdrive for fixpath to work.
14161      new_path="$CYGWIN_ROOT_PATH$input_path"
14162    fi
14163  fi
14164
14165
14166  if test "x$path" != "x$new_path"; then
14167    BOOT_JDK="$new_path"
14168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14170  fi
14171
14172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14173
14174  path="$BOOT_JDK"
14175  has_colon=`$ECHO $path | $GREP ^.:`
14176  new_path="$path"
14177  if test "x$has_colon" = x; then
14178    # Not in mixed or Windows style, start by that.
14179    new_path=`cmd //c echo $path`
14180  fi
14181
14182
14183  input_path="$new_path"
14184  # Check if we need to convert this using DOS-style short mode. If the path
14185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14186  # take no chances and rewrite it.
14187  # Note: m4 eats our [], so we need to use [ and ] instead.
14188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14189  if test "x$has_forbidden_chars" != x; then
14190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14192  fi
14193
14194
14195  windows_path="$new_path"
14196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14197    unix_path=`$CYGPATH -u "$windows_path"`
14198    new_path="$unix_path"
14199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14201    new_path="$unix_path"
14202  fi
14203
14204  if test "x$path" != "x$new_path"; then
14205    BOOT_JDK="$new_path"
14206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14208  fi
14209
14210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14212
14213  else
14214    # We're on a posix platform. Hooray! :)
14215    path="$BOOT_JDK"
14216
14217    if test ! -f "$path" && test ! -d "$path"; then
14218      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14219    fi
14220
14221    has_space=`$ECHO "$path" | $GREP " "`
14222    if test "x$has_space" != x; then
14223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14225      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14226    fi
14227  fi
14228
14229              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14230$as_echo_n "checking for Boot JDK... " >&6; }
14231              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14232$as_echo "$BOOT_JDK" >&6; }
14233              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14234$as_echo_n "checking Boot JDK version... " >&6; }
14235              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14236              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14237$as_echo "$BOOT_JDK_VERSION" >&6; }
14238            fi # end check jdk version
14239          fi # end check rt.jar
14240        fi # end check javac
14241      fi # end check java
14242    fi # end check boot jdk found
14243  fi
14244
14245  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14246
14247  if test "x$BOOT_JDK_FOUND" = xno; then
14248    # Now execute the test
14249
14250  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14251  BOOT_JDK_SUFFIX="/Contents/Home"
14252  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14253  if test "x$ALL_JDKS_FOUND" != x; then
14254    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14255
14256  if test "x$BOOT_JDK_FOUND" = xno; then
14257    # Now execute the test
14258
14259        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14260        if test -d "$BOOT_JDK"; then
14261          BOOT_JDK_FOUND=maybe
14262          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14263$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14264        fi
14265
14266
14267    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14268    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14269      # Do we have a bin/java?
14270      if test ! -x "$BOOT_JDK/bin/java"; then
14271        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14273        BOOT_JDK_FOUND=no
14274      else
14275        # Do we have a bin/javac?
14276        if test ! -x "$BOOT_JDK/bin/javac"; then
14277          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14279          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14280$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14281          BOOT_JDK_FOUND=no
14282        else
14283          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14284          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14285            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14287            BOOT_JDK_FOUND=no
14288          else
14289            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14290            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14291
14292            # Extra M4 quote needed to protect [] in grep expression.
14293            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14294            if test "x$FOUND_VERSION_78" = x; then
14295              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14297              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14298$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14299              BOOT_JDK_FOUND=no
14300            else
14301              # We're done! :-)
14302              BOOT_JDK_FOUND=yes
14303
14304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14305
14306  # Input might be given as Windows format, start by converting to
14307  # unix format.
14308  path="$BOOT_JDK"
14309  new_path=`$CYGPATH -u "$path"`
14310
14311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14314  # "foo.exe" is OK but "foo" is an error.
14315  #
14316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14317  # It is also a way to make sure we got the proper file name for the real test later on.
14318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14319  if test "x$test_shortpath" = x; then
14320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14322    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14323  fi
14324
14325  # Call helper function which possibly converts this using DOS-style short mode.
14326  # If so, the updated path is stored in $new_path.
14327
14328  input_path="$new_path"
14329  # Check if we need to convert this using DOS-style short mode. If the path
14330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14331  # take no chances and rewrite it.
14332  # Note: m4 eats our [], so we need to use [ and ] instead.
14333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14334  if test "x$has_forbidden_chars" != x; then
14335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14339      # Going to short mode and back again did indeed matter. Since short mode is
14340      # case insensitive, let's make it lowercase to improve readability.
14341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14342      # Now convert it back to Unix-stile (cygpath)
14343      input_path=`$CYGPATH -u "$shortmode_path"`
14344      new_path="$input_path"
14345    fi
14346  fi
14347
14348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14349  if test "x$test_cygdrive_prefix" = x; then
14350    # As a simple fix, exclude /usr/bin since it's not a real path.
14351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14353      # a path prefixed by /cygdrive for fixpath to work.
14354      new_path="$CYGWIN_ROOT_PATH$input_path"
14355    fi
14356  fi
14357
14358
14359  if test "x$path" != "x$new_path"; then
14360    BOOT_JDK="$new_path"
14361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14363  fi
14364
14365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14366
14367  path="$BOOT_JDK"
14368  has_colon=`$ECHO $path | $GREP ^.:`
14369  new_path="$path"
14370  if test "x$has_colon" = x; then
14371    # Not in mixed or Windows style, start by that.
14372    new_path=`cmd //c echo $path`
14373  fi
14374
14375
14376  input_path="$new_path"
14377  # Check if we need to convert this using DOS-style short mode. If the path
14378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14379  # take no chances and rewrite it.
14380  # Note: m4 eats our [], so we need to use [ and ] instead.
14381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14382  if test "x$has_forbidden_chars" != x; then
14383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14385  fi
14386
14387
14388  windows_path="$new_path"
14389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14390    unix_path=`$CYGPATH -u "$windows_path"`
14391    new_path="$unix_path"
14392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14394    new_path="$unix_path"
14395  fi
14396
14397  if test "x$path" != "x$new_path"; then
14398    BOOT_JDK="$new_path"
14399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14401  fi
14402
14403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14405
14406  else
14407    # We're on a posix platform. Hooray! :)
14408    path="$BOOT_JDK"
14409
14410    if test ! -f "$path" && test ! -d "$path"; then
14411      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14412    fi
14413
14414    has_space=`$ECHO "$path" | $GREP " "`
14415    if test "x$has_space" != x; then
14416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14418      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14419    fi
14420  fi
14421
14422              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14423$as_echo_n "checking for Boot JDK... " >&6; }
14424              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14425$as_echo "$BOOT_JDK" >&6; }
14426              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14427$as_echo_n "checking Boot JDK version... " >&6; }
14428              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14429              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14430$as_echo "$BOOT_JDK_VERSION" >&6; }
14431            fi # end check jdk version
14432          fi # end check rt.jar
14433        fi # end check javac
14434      fi # end check java
14435    fi # end check boot jdk found
14436  fi
14437
14438    done
14439  fi
14440
14441
14442    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14443    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14444      # Do we have a bin/java?
14445      if test ! -x "$BOOT_JDK/bin/java"; then
14446        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14448        BOOT_JDK_FOUND=no
14449      else
14450        # Do we have a bin/javac?
14451        if test ! -x "$BOOT_JDK/bin/javac"; then
14452          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14454          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14455$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14456          BOOT_JDK_FOUND=no
14457        else
14458          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14459          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14460            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14462            BOOT_JDK_FOUND=no
14463          else
14464            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14465            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14466
14467            # Extra M4 quote needed to protect [] in grep expression.
14468            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14469            if test "x$FOUND_VERSION_78" = x; then
14470              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14472              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14473$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14474              BOOT_JDK_FOUND=no
14475            else
14476              # We're done! :-)
14477              BOOT_JDK_FOUND=yes
14478
14479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14480
14481  # Input might be given as Windows format, start by converting to
14482  # unix format.
14483  path="$BOOT_JDK"
14484  new_path=`$CYGPATH -u "$path"`
14485
14486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14489  # "foo.exe" is OK but "foo" is an error.
14490  #
14491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14492  # It is also a way to make sure we got the proper file name for the real test later on.
14493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14494  if test "x$test_shortpath" = x; then
14495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14497    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14498  fi
14499
14500  # Call helper function which possibly converts this using DOS-style short mode.
14501  # If so, the updated path is stored in $new_path.
14502
14503  input_path="$new_path"
14504  # Check if we need to convert this using DOS-style short mode. If the path
14505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14506  # take no chances and rewrite it.
14507  # Note: m4 eats our [], so we need to use [ and ] instead.
14508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14509  if test "x$has_forbidden_chars" != x; then
14510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14514      # Going to short mode and back again did indeed matter. Since short mode is
14515      # case insensitive, let's make it lowercase to improve readability.
14516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14517      # Now convert it back to Unix-stile (cygpath)
14518      input_path=`$CYGPATH -u "$shortmode_path"`
14519      new_path="$input_path"
14520    fi
14521  fi
14522
14523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14524  if test "x$test_cygdrive_prefix" = x; then
14525    # As a simple fix, exclude /usr/bin since it's not a real path.
14526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14528      # a path prefixed by /cygdrive for fixpath to work.
14529      new_path="$CYGWIN_ROOT_PATH$input_path"
14530    fi
14531  fi
14532
14533
14534  if test "x$path" != "x$new_path"; then
14535    BOOT_JDK="$new_path"
14536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14538  fi
14539
14540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14541
14542  path="$BOOT_JDK"
14543  has_colon=`$ECHO $path | $GREP ^.:`
14544  new_path="$path"
14545  if test "x$has_colon" = x; then
14546    # Not in mixed or Windows style, start by that.
14547    new_path=`cmd //c echo $path`
14548  fi
14549
14550
14551  input_path="$new_path"
14552  # Check if we need to convert this using DOS-style short mode. If the path
14553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14554  # take no chances and rewrite it.
14555  # Note: m4 eats our [], so we need to use [ and ] instead.
14556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14557  if test "x$has_forbidden_chars" != x; then
14558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14560  fi
14561
14562
14563  windows_path="$new_path"
14564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14565    unix_path=`$CYGPATH -u "$windows_path"`
14566    new_path="$unix_path"
14567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14569    new_path="$unix_path"
14570  fi
14571
14572  if test "x$path" != "x$new_path"; then
14573    BOOT_JDK="$new_path"
14574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14575$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14576  fi
14577
14578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14580
14581  else
14582    # We're on a posix platform. Hooray! :)
14583    path="$BOOT_JDK"
14584
14585    if test ! -f "$path" && test ! -d "$path"; then
14586      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14587    fi
14588
14589    has_space=`$ECHO "$path" | $GREP " "`
14590    if test "x$has_space" != x; then
14591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14593      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14594    fi
14595  fi
14596
14597              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14598$as_echo_n "checking for Boot JDK... " >&6; }
14599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14600$as_echo "$BOOT_JDK" >&6; }
14601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14602$as_echo_n "checking Boot JDK version... " >&6; }
14603              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14605$as_echo "$BOOT_JDK_VERSION" >&6; }
14606            fi # end check jdk version
14607          fi # end check rt.jar
14608        fi # end check javac
14609      fi # end check java
14610    fi # end check boot jdk found
14611  fi
14612
14613
14614  if test "x$BOOT_JDK_FOUND" = xno; then
14615    # Now execute the test
14616
14617  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14618  BOOT_JDK_SUFFIX="/Contents/Home"
14619  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14620  if test "x$ALL_JDKS_FOUND" != x; then
14621    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14622
14623  if test "x$BOOT_JDK_FOUND" = xno; then
14624    # Now execute the test
14625
14626        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14627        if test -d "$BOOT_JDK"; then
14628          BOOT_JDK_FOUND=maybe
14629          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14630$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14631        fi
14632
14633
14634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14636      # Do we have a bin/java?
14637      if test ! -x "$BOOT_JDK/bin/java"; then
14638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14640        BOOT_JDK_FOUND=no
14641      else
14642        # Do we have a bin/javac?
14643        if test ! -x "$BOOT_JDK/bin/javac"; then
14644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14648          BOOT_JDK_FOUND=no
14649        else
14650          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14651          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14654            BOOT_JDK_FOUND=no
14655          else
14656            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14658
14659            # Extra M4 quote needed to protect [] in grep expression.
14660            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14661            if test "x$FOUND_VERSION_78" = x; then
14662              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14664              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14665$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14666              BOOT_JDK_FOUND=no
14667            else
14668              # We're done! :-)
14669              BOOT_JDK_FOUND=yes
14670
14671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14672
14673  # Input might be given as Windows format, start by converting to
14674  # unix format.
14675  path="$BOOT_JDK"
14676  new_path=`$CYGPATH -u "$path"`
14677
14678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14681  # "foo.exe" is OK but "foo" is an error.
14682  #
14683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14684  # It is also a way to make sure we got the proper file name for the real test later on.
14685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14686  if test "x$test_shortpath" = x; then
14687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14690  fi
14691
14692  # Call helper function which possibly converts this using DOS-style short mode.
14693  # If so, the updated path is stored in $new_path.
14694
14695  input_path="$new_path"
14696  # Check if we need to convert this using DOS-style short mode. If the path
14697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14698  # take no chances and rewrite it.
14699  # Note: m4 eats our [], so we need to use [ and ] instead.
14700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14701  if test "x$has_forbidden_chars" != x; then
14702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14706      # Going to short mode and back again did indeed matter. Since short mode is
14707      # case insensitive, let's make it lowercase to improve readability.
14708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14709      # Now convert it back to Unix-stile (cygpath)
14710      input_path=`$CYGPATH -u "$shortmode_path"`
14711      new_path="$input_path"
14712    fi
14713  fi
14714
14715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14716  if test "x$test_cygdrive_prefix" = x; then
14717    # As a simple fix, exclude /usr/bin since it's not a real path.
14718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14720      # a path prefixed by /cygdrive for fixpath to work.
14721      new_path="$CYGWIN_ROOT_PATH$input_path"
14722    fi
14723  fi
14724
14725
14726  if test "x$path" != "x$new_path"; then
14727    BOOT_JDK="$new_path"
14728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14730  fi
14731
14732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14733
14734  path="$BOOT_JDK"
14735  has_colon=`$ECHO $path | $GREP ^.:`
14736  new_path="$path"
14737  if test "x$has_colon" = x; then
14738    # Not in mixed or Windows style, start by that.
14739    new_path=`cmd //c echo $path`
14740  fi
14741
14742
14743  input_path="$new_path"
14744  # Check if we need to convert this using DOS-style short mode. If the path
14745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14746  # take no chances and rewrite it.
14747  # Note: m4 eats our [], so we need to use [ and ] instead.
14748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14749  if test "x$has_forbidden_chars" != x; then
14750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14752  fi
14753
14754
14755  windows_path="$new_path"
14756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14757    unix_path=`$CYGPATH -u "$windows_path"`
14758    new_path="$unix_path"
14759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14761    new_path="$unix_path"
14762  fi
14763
14764  if test "x$path" != "x$new_path"; then
14765    BOOT_JDK="$new_path"
14766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14768  fi
14769
14770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14772
14773  else
14774    # We're on a posix platform. Hooray! :)
14775    path="$BOOT_JDK"
14776
14777    if test ! -f "$path" && test ! -d "$path"; then
14778      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14779    fi
14780
14781    has_space=`$ECHO "$path" | $GREP " "`
14782    if test "x$has_space" != x; then
14783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14786    fi
14787  fi
14788
14789              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14790$as_echo_n "checking for Boot JDK... " >&6; }
14791              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14792$as_echo "$BOOT_JDK" >&6; }
14793              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14794$as_echo_n "checking Boot JDK version... " >&6; }
14795              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14796              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14797$as_echo "$BOOT_JDK_VERSION" >&6; }
14798            fi # end check jdk version
14799          fi # end check rt.jar
14800        fi # end check javac
14801      fi # end check java
14802    fi # end check boot jdk found
14803  fi
14804
14805    done
14806  fi
14807
14808
14809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14811      # Do we have a bin/java?
14812      if test ! -x "$BOOT_JDK/bin/java"; then
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14815        BOOT_JDK_FOUND=no
14816      else
14817        # Do we have a bin/javac?
14818        if test ! -x "$BOOT_JDK/bin/javac"; then
14819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14823          BOOT_JDK_FOUND=no
14824        else
14825          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14826          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14829            BOOT_JDK_FOUND=no
14830          else
14831            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14833
14834            # Extra M4 quote needed to protect [] in grep expression.
14835            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14836            if test "x$FOUND_VERSION_78" = x; then
14837              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14839              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14840$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14841              BOOT_JDK_FOUND=no
14842            else
14843              # We're done! :-)
14844              BOOT_JDK_FOUND=yes
14845
14846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14847
14848  # Input might be given as Windows format, start by converting to
14849  # unix format.
14850  path="$BOOT_JDK"
14851  new_path=`$CYGPATH -u "$path"`
14852
14853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14856  # "foo.exe" is OK but "foo" is an error.
14857  #
14858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14859  # It is also a way to make sure we got the proper file name for the real test later on.
14860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14861  if test "x$test_shortpath" = x; then
14862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14865  fi
14866
14867  # Call helper function which possibly converts this using DOS-style short mode.
14868  # If so, the updated path is stored in $new_path.
14869
14870  input_path="$new_path"
14871  # Check if we need to convert this using DOS-style short mode. If the path
14872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14873  # take no chances and rewrite it.
14874  # Note: m4 eats our [], so we need to use [ and ] instead.
14875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14876  if test "x$has_forbidden_chars" != x; then
14877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14881      # Going to short mode and back again did indeed matter. Since short mode is
14882      # case insensitive, let's make it lowercase to improve readability.
14883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14884      # Now convert it back to Unix-stile (cygpath)
14885      input_path=`$CYGPATH -u "$shortmode_path"`
14886      new_path="$input_path"
14887    fi
14888  fi
14889
14890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14891  if test "x$test_cygdrive_prefix" = x; then
14892    # As a simple fix, exclude /usr/bin since it's not a real path.
14893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14895      # a path prefixed by /cygdrive for fixpath to work.
14896      new_path="$CYGWIN_ROOT_PATH$input_path"
14897    fi
14898  fi
14899
14900
14901  if test "x$path" != "x$new_path"; then
14902    BOOT_JDK="$new_path"
14903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14905  fi
14906
14907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14908
14909  path="$BOOT_JDK"
14910  has_colon=`$ECHO $path | $GREP ^.:`
14911  new_path="$path"
14912  if test "x$has_colon" = x; then
14913    # Not in mixed or Windows style, start by that.
14914    new_path=`cmd //c echo $path`
14915  fi
14916
14917
14918  input_path="$new_path"
14919  # Check if we need to convert this using DOS-style short mode. If the path
14920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14921  # take no chances and rewrite it.
14922  # Note: m4 eats our [], so we need to use [ and ] instead.
14923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14924  if test "x$has_forbidden_chars" != x; then
14925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14927  fi
14928
14929
14930  windows_path="$new_path"
14931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14932    unix_path=`$CYGPATH -u "$windows_path"`
14933    new_path="$unix_path"
14934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14936    new_path="$unix_path"
14937  fi
14938
14939  if test "x$path" != "x$new_path"; then
14940    BOOT_JDK="$new_path"
14941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14943  fi
14944
14945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14947
14948  else
14949    # We're on a posix platform. Hooray! :)
14950    path="$BOOT_JDK"
14951
14952    if test ! -f "$path" && test ! -d "$path"; then
14953      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14954    fi
14955
14956    has_space=`$ECHO "$path" | $GREP " "`
14957    if test "x$has_space" != x; then
14958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14961    fi
14962  fi
14963
14964              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14965$as_echo_n "checking for Boot JDK... " >&6; }
14966              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14967$as_echo "$BOOT_JDK" >&6; }
14968              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14969$as_echo_n "checking Boot JDK version... " >&6; }
14970              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14971              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14972$as_echo "$BOOT_JDK_VERSION" >&6; }
14973            fi # end check jdk version
14974          fi # end check rt.jar
14975        fi # end check javac
14976      fi # end check java
14977    fi # end check boot jdk found
14978  fi
14979
14980  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14981
14982  if test "x$BOOT_JDK_FOUND" = xno; then
14983    # Now execute the test
14984
14985  BOOT_JDK_PREFIX="/usr/lib/jvm"
14986  BOOT_JDK_SUFFIX=""
14987  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14988  if test "x$ALL_JDKS_FOUND" != x; then
14989    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14990
14991  if test "x$BOOT_JDK_FOUND" = xno; then
14992    # Now execute the test
14993
14994        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14995        if test -d "$BOOT_JDK"; then
14996          BOOT_JDK_FOUND=maybe
14997          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14998$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14999        fi
15000
15001
15002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15004      # Do we have a bin/java?
15005      if test ! -x "$BOOT_JDK/bin/java"; then
15006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15008        BOOT_JDK_FOUND=no
15009      else
15010        # Do we have a bin/javac?
15011        if test ! -x "$BOOT_JDK/bin/javac"; then
15012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15016          BOOT_JDK_FOUND=no
15017        else
15018          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15019          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15022            BOOT_JDK_FOUND=no
15023          else
15024            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15026
15027            # Extra M4 quote needed to protect [] in grep expression.
15028            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15029            if test "x$FOUND_VERSION_78" = x; then
15030              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15032              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15033$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15034              BOOT_JDK_FOUND=no
15035            else
15036              # We're done! :-)
15037              BOOT_JDK_FOUND=yes
15038
15039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15040
15041  # Input might be given as Windows format, start by converting to
15042  # unix format.
15043  path="$BOOT_JDK"
15044  new_path=`$CYGPATH -u "$path"`
15045
15046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15049  # "foo.exe" is OK but "foo" is an error.
15050  #
15051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15052  # It is also a way to make sure we got the proper file name for the real test later on.
15053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15054  if test "x$test_shortpath" = x; then
15055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15056$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15057    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15058  fi
15059
15060  # Call helper function which possibly converts this using DOS-style short mode.
15061  # If so, the updated path is stored in $new_path.
15062
15063  input_path="$new_path"
15064  # Check if we need to convert this using DOS-style short mode. If the path
15065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15066  # take no chances and rewrite it.
15067  # Note: m4 eats our [], so we need to use [ and ] instead.
15068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15069  if test "x$has_forbidden_chars" != x; then
15070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15074      # Going to short mode and back again did indeed matter. Since short mode is
15075      # case insensitive, let's make it lowercase to improve readability.
15076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15077      # Now convert it back to Unix-stile (cygpath)
15078      input_path=`$CYGPATH -u "$shortmode_path"`
15079      new_path="$input_path"
15080    fi
15081  fi
15082
15083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15084  if test "x$test_cygdrive_prefix" = x; then
15085    # As a simple fix, exclude /usr/bin since it's not a real path.
15086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15088      # a path prefixed by /cygdrive for fixpath to work.
15089      new_path="$CYGWIN_ROOT_PATH$input_path"
15090    fi
15091  fi
15092
15093
15094  if test "x$path" != "x$new_path"; then
15095    BOOT_JDK="$new_path"
15096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15098  fi
15099
15100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15101
15102  path="$BOOT_JDK"
15103  has_colon=`$ECHO $path | $GREP ^.:`
15104  new_path="$path"
15105  if test "x$has_colon" = x; then
15106    # Not in mixed or Windows style, start by that.
15107    new_path=`cmd //c echo $path`
15108  fi
15109
15110
15111  input_path="$new_path"
15112  # Check if we need to convert this using DOS-style short mode. If the path
15113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15114  # take no chances and rewrite it.
15115  # Note: m4 eats our [], so we need to use [ and ] instead.
15116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15117  if test "x$has_forbidden_chars" != x; then
15118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15120  fi
15121
15122
15123  windows_path="$new_path"
15124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15125    unix_path=`$CYGPATH -u "$windows_path"`
15126    new_path="$unix_path"
15127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15129    new_path="$unix_path"
15130  fi
15131
15132  if test "x$path" != "x$new_path"; then
15133    BOOT_JDK="$new_path"
15134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15136  fi
15137
15138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15140
15141  else
15142    # We're on a posix platform. Hooray! :)
15143    path="$BOOT_JDK"
15144
15145    if test ! -f "$path" && test ! -d "$path"; then
15146      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15147    fi
15148
15149    has_space=`$ECHO "$path" | $GREP " "`
15150    if test "x$has_space" != x; then
15151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15154    fi
15155  fi
15156
15157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15158$as_echo_n "checking for Boot JDK... " >&6; }
15159              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15160$as_echo "$BOOT_JDK" >&6; }
15161              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15162$as_echo_n "checking Boot JDK version... " >&6; }
15163              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15164              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15165$as_echo "$BOOT_JDK_VERSION" >&6; }
15166            fi # end check jdk version
15167          fi # end check rt.jar
15168        fi # end check javac
15169      fi # end check java
15170    fi # end check boot jdk found
15171  fi
15172
15173    done
15174  fi
15175
15176
15177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15179      # Do we have a bin/java?
15180      if test ! -x "$BOOT_JDK/bin/java"; then
15181        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15183        BOOT_JDK_FOUND=no
15184      else
15185        # Do we have a bin/javac?
15186        if test ! -x "$BOOT_JDK/bin/javac"; then
15187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15189          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15191          BOOT_JDK_FOUND=no
15192        else
15193          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15194          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15195            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15197            BOOT_JDK_FOUND=no
15198          else
15199            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15200            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15201
15202            # Extra M4 quote needed to protect [] in grep expression.
15203            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15204            if test "x$FOUND_VERSION_78" = x; then
15205              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15207              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15208$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15209              BOOT_JDK_FOUND=no
15210            else
15211              # We're done! :-)
15212              BOOT_JDK_FOUND=yes
15213
15214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15215
15216  # Input might be given as Windows format, start by converting to
15217  # unix format.
15218  path="$BOOT_JDK"
15219  new_path=`$CYGPATH -u "$path"`
15220
15221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15224  # "foo.exe" is OK but "foo" is an error.
15225  #
15226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15227  # It is also a way to make sure we got the proper file name for the real test later on.
15228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15229  if test "x$test_shortpath" = x; then
15230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15233  fi
15234
15235  # Call helper function which possibly converts this using DOS-style short mode.
15236  # If so, the updated path is stored in $new_path.
15237
15238  input_path="$new_path"
15239  # Check if we need to convert this using DOS-style short mode. If the path
15240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15241  # take no chances and rewrite it.
15242  # Note: m4 eats our [], so we need to use [ and ] instead.
15243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15244  if test "x$has_forbidden_chars" != x; then
15245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15249      # Going to short mode and back again did indeed matter. Since short mode is
15250      # case insensitive, let's make it lowercase to improve readability.
15251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15252      # Now convert it back to Unix-stile (cygpath)
15253      input_path=`$CYGPATH -u "$shortmode_path"`
15254      new_path="$input_path"
15255    fi
15256  fi
15257
15258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15259  if test "x$test_cygdrive_prefix" = x; then
15260    # As a simple fix, exclude /usr/bin since it's not a real path.
15261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15263      # a path prefixed by /cygdrive for fixpath to work.
15264      new_path="$CYGWIN_ROOT_PATH$input_path"
15265    fi
15266  fi
15267
15268
15269  if test "x$path" != "x$new_path"; then
15270    BOOT_JDK="$new_path"
15271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15273  fi
15274
15275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15276
15277  path="$BOOT_JDK"
15278  has_colon=`$ECHO $path | $GREP ^.:`
15279  new_path="$path"
15280  if test "x$has_colon" = x; then
15281    # Not in mixed or Windows style, start by that.
15282    new_path=`cmd //c echo $path`
15283  fi
15284
15285
15286  input_path="$new_path"
15287  # Check if we need to convert this using DOS-style short mode. If the path
15288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15289  # take no chances and rewrite it.
15290  # Note: m4 eats our [], so we need to use [ and ] instead.
15291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15292  if test "x$has_forbidden_chars" != x; then
15293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15295  fi
15296
15297
15298  windows_path="$new_path"
15299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15300    unix_path=`$CYGPATH -u "$windows_path"`
15301    new_path="$unix_path"
15302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15304    new_path="$unix_path"
15305  fi
15306
15307  if test "x$path" != "x$new_path"; then
15308    BOOT_JDK="$new_path"
15309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15311  fi
15312
15313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15315
15316  else
15317    # We're on a posix platform. Hooray! :)
15318    path="$BOOT_JDK"
15319
15320    if test ! -f "$path" && test ! -d "$path"; then
15321      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15322    fi
15323
15324    has_space=`$ECHO "$path" | $GREP " "`
15325    if test "x$has_space" != x; then
15326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15328      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15329    fi
15330  fi
15331
15332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15333$as_echo_n "checking for Boot JDK... " >&6; }
15334              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15335$as_echo "$BOOT_JDK" >&6; }
15336              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15337$as_echo_n "checking Boot JDK version... " >&6; }
15338              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15339              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15340$as_echo "$BOOT_JDK_VERSION" >&6; }
15341            fi # end check jdk version
15342          fi # end check rt.jar
15343        fi # end check javac
15344      fi # end check java
15345    fi # end check boot jdk found
15346  fi
15347
15348  fi
15349
15350
15351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15353      # Do we have a bin/java?
15354      if test ! -x "$BOOT_JDK/bin/java"; then
15355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15357        BOOT_JDK_FOUND=no
15358      else
15359        # Do we have a bin/javac?
15360        if test ! -x "$BOOT_JDK/bin/javac"; then
15361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15365          BOOT_JDK_FOUND=no
15366        else
15367          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15368          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15369            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15371            BOOT_JDK_FOUND=no
15372          else
15373            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15374            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15375
15376            # Extra M4 quote needed to protect [] in grep expression.
15377            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15378            if test "x$FOUND_VERSION_78" = x; then
15379              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15381              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15382$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15383              BOOT_JDK_FOUND=no
15384            else
15385              # We're done! :-)
15386              BOOT_JDK_FOUND=yes
15387
15388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15389
15390  # Input might be given as Windows format, start by converting to
15391  # unix format.
15392  path="$BOOT_JDK"
15393  new_path=`$CYGPATH -u "$path"`
15394
15395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15398  # "foo.exe" is OK but "foo" is an error.
15399  #
15400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15401  # It is also a way to make sure we got the proper file name for the real test later on.
15402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15403  if test "x$test_shortpath" = x; then
15404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15407  fi
15408
15409  # Call helper function which possibly converts this using DOS-style short mode.
15410  # If so, the updated path is stored in $new_path.
15411
15412  input_path="$new_path"
15413  # Check if we need to convert this using DOS-style short mode. If the path
15414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15415  # take no chances and rewrite it.
15416  # Note: m4 eats our [], so we need to use [ and ] instead.
15417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15418  if test "x$has_forbidden_chars" != x; then
15419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15423      # Going to short mode and back again did indeed matter. Since short mode is
15424      # case insensitive, let's make it lowercase to improve readability.
15425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15426      # Now convert it back to Unix-stile (cygpath)
15427      input_path=`$CYGPATH -u "$shortmode_path"`
15428      new_path="$input_path"
15429    fi
15430  fi
15431
15432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15433  if test "x$test_cygdrive_prefix" = x; then
15434    # As a simple fix, exclude /usr/bin since it's not a real path.
15435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15437      # a path prefixed by /cygdrive for fixpath to work.
15438      new_path="$CYGWIN_ROOT_PATH$input_path"
15439    fi
15440  fi
15441
15442
15443  if test "x$path" != "x$new_path"; then
15444    BOOT_JDK="$new_path"
15445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15447  fi
15448
15449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15450
15451  path="$BOOT_JDK"
15452  has_colon=`$ECHO $path | $GREP ^.:`
15453  new_path="$path"
15454  if test "x$has_colon" = x; then
15455    # Not in mixed or Windows style, start by that.
15456    new_path=`cmd //c echo $path`
15457  fi
15458
15459
15460  input_path="$new_path"
15461  # Check if we need to convert this using DOS-style short mode. If the path
15462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15463  # take no chances and rewrite it.
15464  # Note: m4 eats our [], so we need to use [ and ] instead.
15465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15466  if test "x$has_forbidden_chars" != x; then
15467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15469  fi
15470
15471
15472  windows_path="$new_path"
15473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15474    unix_path=`$CYGPATH -u "$windows_path"`
15475    new_path="$unix_path"
15476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15478    new_path="$unix_path"
15479  fi
15480
15481  if test "x$path" != "x$new_path"; then
15482    BOOT_JDK="$new_path"
15483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15485  fi
15486
15487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15489
15490  else
15491    # We're on a posix platform. Hooray! :)
15492    path="$BOOT_JDK"
15493
15494    if test ! -f "$path" && test ! -d "$path"; then
15495      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15496    fi
15497
15498    has_space=`$ECHO "$path" | $GREP " "`
15499    if test "x$has_space" != x; then
15500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15502      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15503    fi
15504  fi
15505
15506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15507$as_echo_n "checking for Boot JDK... " >&6; }
15508              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15509$as_echo "$BOOT_JDK" >&6; }
15510              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15511$as_echo_n "checking Boot JDK version... " >&6; }
15512              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15514$as_echo "$BOOT_JDK_VERSION" >&6; }
15515            fi # end check jdk version
15516          fi # end check rt.jar
15517        fi # end check javac
15518      fi # end check java
15519    fi # end check boot jdk found
15520  fi
15521
15522
15523# If we haven't found anything yet, we've truly lost. Give up.
15524if test "x$BOOT_JDK_FOUND" = xno; then
15525
15526    # Print a helpful message on how to acquire the necessary build dependency.
15527    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15528    MISSING_DEPENDENCY=openjdk
15529    PKGHANDLER_COMMAND=
15530
15531    case $PKGHANDLER in
15532	apt-get)
15533                apt_help     $MISSING_DEPENDENCY ;;
15534    yum)
15535                yum_help     $MISSING_DEPENDENCY ;;
15536	port)
15537                port_help    $MISSING_DEPENDENCY ;;
15538	pkgutil)
15539                pkgutil_help $MISSING_DEPENDENCY ;;
15540	pkgadd)
15541                pkgadd_help  $MISSING_DEPENDENCY ;;
15542    * )
15543      break ;;
15544    esac
15545
15546    if test "x$PKGHANDLER_COMMAND" != x; then
15547        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15548    fi
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15551$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15553$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15554  as_fn_error $? "Cannot continue" "$LINENO" 5
15555fi
15556
15557# Setup proper paths for what we found
15558BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15559if test ! -f "$BOOT_RTJAR"; then
15560    # On MacOSX it is called classes.jar
15561    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15562    if test -f "$BOOT_RTJAR"; then
15563      # Remove the ..
15564      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15565    fi
15566fi
15567BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15568BOOT_JDK="$BOOT_JDK"
15569
15570
15571
15572
15573# Setup tools from the Boot JDK.
15574
15575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15576$as_echo_n "checking for java in Boot JDK... " >&6; }
15577  JAVA=$BOOT_JDK/bin/java
15578  if test ! -x $JAVA; then
15579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15580$as_echo "not found" >&6; }
15581      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15582$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15583      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15584  fi
15585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15586$as_echo "ok" >&6; }
15587
15588
15589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15590$as_echo_n "checking for javac in Boot JDK... " >&6; }
15591  JAVAC=$BOOT_JDK/bin/javac
15592  if test ! -x $JAVAC; then
15593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15594$as_echo "not found" >&6; }
15595      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15596$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15597      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15598  fi
15599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15600$as_echo "ok" >&6; }
15601
15602
15603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15604$as_echo_n "checking for javah in Boot JDK... " >&6; }
15605  JAVAH=$BOOT_JDK/bin/javah
15606  if test ! -x $JAVAH; then
15607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15608$as_echo "not found" >&6; }
15609      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15610$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15611      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15612  fi
15613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15614$as_echo "ok" >&6; }
15615
15616
15617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15618$as_echo_n "checking for javap in Boot JDK... " >&6; }
15619  JAVAP=$BOOT_JDK/bin/javap
15620  if test ! -x $JAVAP; then
15621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15622$as_echo "not found" >&6; }
15623      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15624$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15625      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15626  fi
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15628$as_echo "ok" >&6; }
15629
15630
15631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15632$as_echo_n "checking for jar in Boot JDK... " >&6; }
15633  JAR=$BOOT_JDK/bin/jar
15634  if test ! -x $JAR; then
15635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15636$as_echo "not found" >&6; }
15637      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15638$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15639      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15640  fi
15641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15642$as_echo "ok" >&6; }
15643
15644
15645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15646$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15647  RMIC=$BOOT_JDK/bin/rmic
15648  if test ! -x $RMIC; then
15649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15650$as_echo "not found" >&6; }
15651      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15652$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15653      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15654  fi
15655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15656$as_echo "ok" >&6; }
15657
15658
15659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15660$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15661  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15662  if test ! -x $NATIVE2ASCII; then
15663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664$as_echo "not found" >&6; }
15665      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15668  fi
15669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670$as_echo "ok" >&6; }
15671
15672
15673# Finally, set some other options...
15674
15675# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15676BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15677
15678
15679
15680
15681##############################################################################
15682#
15683# Specify options for anything that is run with the Boot JDK.
15684#
15685
15686# Check whether --with-boot-jdk-jvmargs was given.
15687if test "${with_boot_jdk_jvmargs+set}" = set; then :
15688  withval=$with_boot_jdk_jvmargs;
15689fi
15690
15691
15692if test "x$with_boot_jdk_jvmargs" = x; then
15693    # Not all JVM:s accept the same arguments on the command line.
15694    # OpenJDK specific increase in thread stack for JDK build,
15695    # well more specifically, when running javac.
15696    if test "x$BUILD_NUM_BITS" = x32; then
15697       STACK_SIZE=768
15698    else
15699       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15700       # since 64-bit pointers are pushed on the stach. Apparently, we need
15701       # to increase the stack space when javacing the JDK....
15702       STACK_SIZE=1536
15703    fi
15704
15705    # Minimum amount of heap memory.
15706
15707    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15708    # If so, then append -Xms64M to boot_jdk_jvmargs
15709    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15710    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15711    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15712        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15713    fi
15714
15715    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15716        # Why does macosx need more heap? Its the huge JDK batch.
15717
15718    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15719    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15720    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15721    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15722    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15723        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15724    fi
15725
15726    else
15727
15728    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15729    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15730    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15731    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15732    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15733        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15734    fi
15735
15736    fi
15737    # When is adding -client something that speeds up the JVM?
15738    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15739
15740    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15741    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15742    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15743    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15744    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15745        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15746    fi
15747
15748
15749    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15750    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15751    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15752    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15753    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15754        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15755    fi
15756
15757
15758    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15759    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15760    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15761    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15762    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15763        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15764    fi
15765
15766    # Disable special log output when a debug build is used as Boot JDK...
15767
15768    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15769    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15770    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15771    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15772    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15773        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15774    fi
15775
15776fi
15777
15778BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15779
15780
15781
15782###############################################################################
15783#
15784# Configure the sources to use. We can add or override individual directories.
15785#
15786###############################################################################
15787
15788
15789
15790# Where are the sources. Any of these can be overridden
15791# using --with-override-corba and the likes.
15792LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15793CORBA_TOPDIR="$SRC_ROOT/corba"
15794JAXP_TOPDIR="$SRC_ROOT/jaxp"
15795JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15796HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15797NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15798JDK_TOPDIR="$SRC_ROOT/jdk"
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809###############################################################################
15810#
15811# Pickup additional source for a component from outside of the source root
15812# or override source for a component.
15813#
15814
15815# Check whether --with-add-source-root was given.
15816if test "${with_add_source_root+set}" = set; then :
15817  withval=$with_add_source_root;
15818fi
15819
15820
15821
15822# Check whether --with-override-source-root was given.
15823if test "${with_override_source_root+set}" = set; then :
15824  withval=$with_override_source_root;
15825fi
15826
15827
15828
15829# Check whether --with-adds-and-overrides was given.
15830if test "${with_adds_and_overrides+set}" = set; then :
15831  withval=$with_adds_and_overrides;
15832fi
15833
15834
15835if test "x$with_adds_and_overrides" != x; then
15836    with_add_source_root="$with_adds_and_overrides/adds"
15837    with_override_source_root="$with_adds_and_overrides/overrides"
15838fi
15839
15840if test "x$with_add_source_root" != x; then
15841    if ! test -d $with_add_source_root; then
15842       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15843    fi
15844    CURDIR="$PWD"
15845    cd "$with_add_source_root"
15846    ADD_SRC_ROOT="`pwd`"
15847    cd "$CURDIR"
15848    # Verify that the addon source root does not have any root makefiles.
15849    # If it does, then it is usually an error, prevent this.
15850    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15851       test -f $with_add_source_root/langtools/make/Makefile; then
15852        as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
15853    fi
15854    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15855       test -f $with_add_source_root/corba/make/Makefile; then
15856        as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
15857    fi
15858    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15859       test -f $with_add_source_root/jaxp/make/Makefile; then
15860        as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
15861    fi
15862    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15863       test -f $with_add_source_root/jaxws/make/Makefile; then
15864        as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
15865    fi
15866    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15867       test -f $with_add_source_root/hotspot/make/Makefile; then
15868        as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
15869    fi
15870    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15871       test -f $with_add_source_root/jdk/make/Makefile; then
15872        as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
15873    fi
15874fi
15875
15876
15877if test "x$with_override_source_root" != x; then
15878    if ! test -d $with_override_source_root; then
15879       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15880    fi
15881    CURDIR="$PWD"
15882    cd "$with_override_source_root"
15883    OVERRIDE_SRC_ROOT="`pwd`"
15884    cd "$CURDIR"
15885    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15886       test -f $with_override_source_root/langtools/make/Makefile; then
15887        as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
15888    fi
15889    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15890       test -f $with_override_source_root/corba/make/Makefile; then
15891        as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
15892    fi
15893    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15894       test -f $with_override_source_root/jaxp/make/Makefile; then
15895        as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
15896    fi
15897    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15898       test -f $with_override_source_root/jaxws/make/Makefile; then
15899        as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
15900    fi
15901    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15902       test -f $with_override_source_root/hotspot/make/Makefile; then
15903        as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
15904    fi
15905    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15906       test -f $with_override_source_root/jdk/make/Makefile; then
15907        as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
15908    fi
15909fi
15910
15911
15912###############################################################################
15913#
15914# Override a repo completely, this is used for example when you have 3 small
15915# development sandboxes of the langtools sources and want to avoid having 3 full
15916# OpenJDK sources checked out on disk.
15917#
15918# Assuming that the 3 langtools sandboxes are located here:
15919# /home/fredrik/sandbox1/langtools
15920# /home/fredrik/sandbox2/langtools
15921# /home/fredrik/sandbox3/langtools
15922#
15923# From the source root you create build subdirs manually:
15924#     mkdir -p build1 build2 build3
15925# in each build directory run:
15926#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15927#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15928#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15929#
15930
15931
15932# Check whether --with-override-langtools was given.
15933if test "${with_override_langtools+set}" = set; then :
15934  withval=$with_override_langtools;
15935fi
15936
15937
15938
15939# Check whether --with-override-corba was given.
15940if test "${with_override_corba+set}" = set; then :
15941  withval=$with_override_corba;
15942fi
15943
15944
15945
15946# Check whether --with-override-jaxp was given.
15947if test "${with_override_jaxp+set}" = set; then :
15948  withval=$with_override_jaxp;
15949fi
15950
15951
15952
15953# Check whether --with-override-jaxws was given.
15954if test "${with_override_jaxws+set}" = set; then :
15955  withval=$with_override_jaxws;
15956fi
15957
15958
15959
15960# Check whether --with-override-hotspot was given.
15961if test "${with_override_hotspot+set}" = set; then :
15962  withval=$with_override_hotspot;
15963fi
15964
15965
15966
15967# Check whether --with-override-jdk was given.
15968if test "${with_override_jdk+set}" = set; then :
15969  withval=$with_override_jdk;
15970fi
15971
15972
15973if test "x$with_override_langtools" != x; then
15974    CURDIR="$PWD"
15975    cd "$with_override_langtools"
15976    LANGTOOLS_TOPDIR="`pwd`"
15977    cd "$CURDIR"
15978    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15979        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15980    fi
15981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15982$as_echo_n "checking if langtools should be overridden... " >&6; }
15983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15984$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15985fi
15986if test "x$with_override_corba" != x; then
15987    CURDIR="$PWD"
15988    cd "$with_override_corba"
15989    CORBA_TOPDIR="`pwd`"
15990    cd "$CURDIR"
15991    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15992        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15993    fi
15994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15995$as_echo_n "checking if corba should be overridden... " >&6; }
15996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15997$as_echo "yes with $CORBA_TOPDIR" >&6; }
15998fi
15999if test "x$with_override_jaxp" != x; then
16000    CURDIR="$PWD"
16001    cd "$with_override_jaxp"
16002    JAXP_TOPDIR="`pwd`"
16003    cd "$CURDIR"
16004    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16005        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16006    fi
16007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16008$as_echo_n "checking if jaxp should be overridden... " >&6; }
16009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16010$as_echo "yes with $JAXP_TOPDIR" >&6; }
16011fi
16012if test "x$with_override_jaxws" != x; then
16013    CURDIR="$PWD"
16014    cd "$with_override_jaxws"
16015    JAXWS_TOPDIR="`pwd`"
16016    cd "$CURDIR"
16017    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16018        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16019    fi
16020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16021$as_echo_n "checking if jaxws should be overridden... " >&6; }
16022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16023$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16024fi
16025if test "x$with_override_hotspot" != x; then
16026    CURDIR="$PWD"
16027    cd "$with_override_hotspot"
16028    HOTSPOT_TOPDIR="`pwd`"
16029    cd "$CURDIR"
16030    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16031       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16032        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16033    fi
16034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16035$as_echo_n "checking if hotspot should be overridden... " >&6; }
16036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16037$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16038fi
16039if test "x$with_override_nashorn" != x; then
16040    CURDIR="$PWD"
16041    cd "$with_override_nashorn"
16042    NASHORN_TOPDIR="`pwd`"
16043    cd "$CURDIR"
16044    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16045        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16046    fi
16047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16048$as_echo_n "checking if nashorn should be overridden... " >&6; }
16049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16050$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16051fi
16052if test "x$with_override_jdk" != x; then
16053    CURDIR="$PWD"
16054    cd "$with_override_jdk"
16055    JDK_TOPDIR="`pwd`"
16056    cd "$CURDIR"
16057    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16058        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16059    fi
16060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16061$as_echo_n "checking if JDK should be overridden... " >&6; }
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16063$as_echo "yes with $JDK_TOPDIR" >&6; }
16064fi
16065
16066
16067
16068BUILD_OUTPUT="$OUTPUT_ROOT"
16069
16070
16071HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16072BUILD_HOTSPOT=true
16073
16074
16075
16076# Check whether --with-import-hotspot was given.
16077if test "${with_import_hotspot+set}" = set; then :
16078  withval=$with_import_hotspot;
16079fi
16080
16081if test "x$with_import_hotspot" != x; then
16082    CURDIR="$PWD"
16083    cd "$with_import_hotspot"
16084    HOTSPOT_DIST="`pwd`"
16085    cd "$CURDIR"
16086    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16087        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16088    fi
16089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16090$as_echo_n "checking if hotspot should be imported... " >&6; }
16091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16092$as_echo "yes from $HOTSPOT_DIST" >&6; }
16093    BUILD_HOTSPOT=false
16094fi
16095
16096JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16097
16098
16099###############################################################################
16100#
16101# Setup the toolchain (compilers etc), i.e. the tools that need to be
16102# cross-compilation aware.
16103#
16104###############################################################################
16105
16106
16107###############################################################################
16108#
16109# Configure the development tool paths and potential sysroot.
16110#
16111ac_ext=cpp
16112ac_cpp='$CXXCPP $CPPFLAGS'
16113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16116
16117
16118# The option used to specify the target .o,.a or .so file.
16119# When compiling, how to specify the to be created object file.
16120CC_OUT_OPTION='-o$(SPACE)'
16121# When linking, how to specify the to be created executable.
16122EXE_OUT_OPTION='-o$(SPACE)'
16123# When linking, how to specify the to be created dynamically linkable library.
16124LD_OUT_OPTION='-o$(SPACE)'
16125# When archiving, how to specify the to be create static archive for object files.
16126AR_OUT_OPTION='rcs$(SPACE)'
16127
16128
16129
16130
16131
16132# Locate the actual tools
16133
16134if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16135
16136  # Store path to cygwin link.exe to help excluding it when searching for
16137  # VS linker. This must be done before changing the PATH when looking for VS.
16138  # Extract the first word of "link", so it can be a program name with args.
16139set dummy link; ac_word=$2
16140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16141$as_echo_n "checking for $ac_word... " >&6; }
16142if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16143  $as_echo_n "(cached) " >&6
16144else
16145  case $CYGWIN_LINK in
16146  [\\/]* | ?:[\\/]*)
16147  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16148  ;;
16149  *)
16150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16151for as_dir in $PATH
16152do
16153  IFS=$as_save_IFS
16154  test -z "$as_dir" && as_dir=.
16155    for ac_exec_ext in '' $ac_executable_extensions; do
16156  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16157    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16159    break 2
16160  fi
16161done
16162  done
16163IFS=$as_save_IFS
16164
16165  ;;
16166esac
16167fi
16168CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16169if test -n "$CYGWIN_LINK"; then
16170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16171$as_echo "$CYGWIN_LINK" >&6; }
16172else
16173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16174$as_echo "no" >&6; }
16175fi
16176
16177
16178  if test "x$CYGWIN_LINK" != x; then
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16180$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16181    "$CYGWIN_LINK" --version > /dev/null
16182    if test $? -eq 0 ; then
16183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16184$as_echo "yes" >&6; }
16185    else
16186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16187$as_echo "no" >&6; }
16188      # This might be the VS linker. Don't exclude it later on.
16189      CYGWIN_LINK=""
16190    fi
16191  fi
16192
16193  # First-hand choice is to locate and run the vsvars bat file.
16194
16195  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16196    VCVARSFILE="vc/bin/vcvars32.bat"
16197  else
16198    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16199  fi
16200
16201  VS_ENV_CMD=""
16202  VS_ENV_ARGS=""
16203  if test "x$with_toolsdir" != x; then
16204
16205  if test "x$VS_ENV_CMD" = x; then
16206    VS100BASE="$with_toolsdir/../.."
16207    METHOD="--with-tools-dir"
16208
16209  windows_path="$VS100BASE"
16210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16211    unix_path=`$CYGPATH -u "$windows_path"`
16212    VS100BASE="$unix_path"
16213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16215    VS100BASE="$unix_path"
16216  fi
16217
16218    if test -d "$VS100BASE"; then
16219      if test -f "$VS100BASE/$VCVARSFILE"; then
16220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16221$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16222        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16223      else
16224        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16225$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16226        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16227$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16228      fi
16229    fi
16230  fi
16231
16232  fi
16233
16234  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16235    # Having specified an argument which is incorrect will produce an instant failure;
16236    # we should not go on looking
16237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16238$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16239    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16240$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16241    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16242  fi
16243
16244  if test "x$ProgramW6432" != x; then
16245
16246  if test "x$VS_ENV_CMD" = x; then
16247    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16248    METHOD="well-known name"
16249
16250  windows_path="$WIN_SDK_BASE"
16251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16252    unix_path=`$CYGPATH -u "$windows_path"`
16253    WIN_SDK_BASE="$unix_path"
16254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16256    WIN_SDK_BASE="$unix_path"
16257  fi
16258
16259    if test -d "$WIN_SDK_BASE"; then
16260      # There have been cases of partial or broken SDK installations. A missing
16261      # lib dir is not going to work.
16262      if test ! -d "$WIN_SDK_BASE/../lib"; then
16263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16265        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16266$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16267      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16268        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16269$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16270        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16271        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16272          VS_ENV_ARGS="/x86"
16273        else
16274          VS_ENV_ARGS="/x64"
16275        fi
16276      else
16277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16278$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16279        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16280$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16281      fi
16282    fi
16283  fi
16284
16285  fi
16286  if test "x$PROGRAMW6432" != x; then
16287
16288  if test "x$VS_ENV_CMD" = x; then
16289    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16290    METHOD="well-known name"
16291
16292  windows_path="$WIN_SDK_BASE"
16293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16294    unix_path=`$CYGPATH -u "$windows_path"`
16295    WIN_SDK_BASE="$unix_path"
16296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16298    WIN_SDK_BASE="$unix_path"
16299  fi
16300
16301    if test -d "$WIN_SDK_BASE"; then
16302      # There have been cases of partial or broken SDK installations. A missing
16303      # lib dir is not going to work.
16304      if test ! -d "$WIN_SDK_BASE/../lib"; then
16305        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16306$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16307        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16308$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16309      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16310        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16311$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16312        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16313        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16314          VS_ENV_ARGS="/x86"
16315        else
16316          VS_ENV_ARGS="/x64"
16317        fi
16318      else
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16320$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16321        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16322$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16323      fi
16324    fi
16325  fi
16326
16327  fi
16328  if test "x$PROGRAMFILES" != x; then
16329
16330  if test "x$VS_ENV_CMD" = x; then
16331    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16332    METHOD="well-known name"
16333
16334  windows_path="$WIN_SDK_BASE"
16335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16336    unix_path=`$CYGPATH -u "$windows_path"`
16337    WIN_SDK_BASE="$unix_path"
16338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16340    WIN_SDK_BASE="$unix_path"
16341  fi
16342
16343    if test -d "$WIN_SDK_BASE"; then
16344      # There have been cases of partial or broken SDK installations. A missing
16345      # lib dir is not going to work.
16346      if test ! -d "$WIN_SDK_BASE/../lib"; then
16347        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16348$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16349        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16350$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16351      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16352        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16353$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16354        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16355        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16356          VS_ENV_ARGS="/x86"
16357        else
16358          VS_ENV_ARGS="/x64"
16359        fi
16360      else
16361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16362$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16364$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16365      fi
16366    fi
16367  fi
16368
16369  fi
16370
16371  if test "x$VS_ENV_CMD" = x; then
16372    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16373    METHOD="well-known name"
16374
16375  windows_path="$WIN_SDK_BASE"
16376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377    unix_path=`$CYGPATH -u "$windows_path"`
16378    WIN_SDK_BASE="$unix_path"
16379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16381    WIN_SDK_BASE="$unix_path"
16382  fi
16383
16384    if test -d "$WIN_SDK_BASE"; then
16385      # There have been cases of partial or broken SDK installations. A missing
16386      # lib dir is not going to work.
16387      if test ! -d "$WIN_SDK_BASE/../lib"; then
16388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16389$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16390        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16391$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16392      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16394$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16395        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16396        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16397          VS_ENV_ARGS="/x86"
16398        else
16399          VS_ENV_ARGS="/x64"
16400        fi
16401      else
16402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16403$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16404        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16405$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16406      fi
16407    fi
16408  fi
16409
16410
16411  if test "x$VS_ENV_CMD" = x; then
16412    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16413    METHOD="well-known name"
16414
16415  windows_path="$WIN_SDK_BASE"
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417    unix_path=`$CYGPATH -u "$windows_path"`
16418    WIN_SDK_BASE="$unix_path"
16419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421    WIN_SDK_BASE="$unix_path"
16422  fi
16423
16424    if test -d "$WIN_SDK_BASE"; then
16425      # There have been cases of partial or broken SDK installations. A missing
16426      # lib dir is not going to work.
16427      if test ! -d "$WIN_SDK_BASE/../lib"; then
16428        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16429$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16430        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16431$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16432      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16433        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16434$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16435        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16436        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16437          VS_ENV_ARGS="/x86"
16438        else
16439          VS_ENV_ARGS="/x64"
16440        fi
16441      else
16442        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16443$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16444        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16445$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16446      fi
16447    fi
16448  fi
16449
16450
16451  if test "x$VS100COMNTOOLS" != x; then
16452
16453  if test "x$VS_ENV_CMD" = x; then
16454    VS100BASE="$VS100COMNTOOLS/../.."
16455    METHOD="VS100COMNTOOLS variable"
16456
16457  windows_path="$VS100BASE"
16458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16459    unix_path=`$CYGPATH -u "$windows_path"`
16460    VS100BASE="$unix_path"
16461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16463    VS100BASE="$unix_path"
16464  fi
16465
16466    if test -d "$VS100BASE"; then
16467      if test -f "$VS100BASE/$VCVARSFILE"; then
16468        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16469$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16470        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16471      else
16472        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16473$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16474        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16475$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16476      fi
16477    fi
16478  fi
16479
16480  fi
16481  if test "x$PROGRAMFILES" != x; then
16482
16483  if test "x$VS_ENV_CMD" = x; then
16484    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16485    METHOD="well-known name"
16486
16487  windows_path="$VS100BASE"
16488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16489    unix_path=`$CYGPATH -u "$windows_path"`
16490    VS100BASE="$unix_path"
16491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16493    VS100BASE="$unix_path"
16494  fi
16495
16496    if test -d "$VS100BASE"; then
16497      if test -f "$VS100BASE/$VCVARSFILE"; then
16498        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16499$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16500        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16501      else
16502        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16503$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16504        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16505$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16506      fi
16507    fi
16508  fi
16509
16510  fi
16511
16512  if test "x$VS_ENV_CMD" = x; then
16513    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16514    METHOD="well-known name"
16515
16516  windows_path="$VS100BASE"
16517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16518    unix_path=`$CYGPATH -u "$windows_path"`
16519    VS100BASE="$unix_path"
16520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16522    VS100BASE="$unix_path"
16523  fi
16524
16525    if test -d "$VS100BASE"; then
16526      if test -f "$VS100BASE/$VCVARSFILE"; then
16527        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16528$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16529        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16530      else
16531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16532$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16533        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16534$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16535      fi
16536    fi
16537  fi
16538
16539
16540  if test "x$VS_ENV_CMD" = x; then
16541    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16542    METHOD="well-known name"
16543
16544  windows_path="$VS100BASE"
16545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16546    unix_path=`$CYGPATH -u "$windows_path"`
16547    VS100BASE="$unix_path"
16548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16550    VS100BASE="$unix_path"
16551  fi
16552
16553    if test -d "$VS100BASE"; then
16554      if test -f "$VS100BASE/$VCVARSFILE"; then
16555        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16556$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16557        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16558      else
16559        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16560$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16561        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16562$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16563      fi
16564    fi
16565  fi
16566
16567
16568  if test "x$VS_ENV_CMD" != x; then
16569    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16570
16571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16572
16573  # First separate the path from the arguments. This will split at the first
16574  # space.
16575  complete="$VS_ENV_CMD"
16576  path="${complete%% *}"
16577  tmp="$complete EOL"
16578  arguments="${tmp#* }"
16579
16580  # Input might be given as Windows format, start by converting to
16581  # unix format.
16582  new_path=`$CYGPATH -u "$path"`
16583
16584  # Now try to locate executable using which
16585  new_path=`$WHICH "$new_path" 2> /dev/null`
16586  # bat and cmd files are not always considered executable in cygwin causing which
16587  # to not find them
16588  if test "x$new_path" = x \
16589           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16590           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16591    new_path=`$CYGPATH -u "$path"`
16592  fi
16593  if test "x$new_path" = x; then
16594    # Oops. Which didn't find the executable.
16595    # The splitting of arguments from the executable at a space might have been incorrect,
16596    # since paths with space are more likely in Windows. Give it another try with the whole
16597    # argument.
16598    path="$complete"
16599    arguments="EOL"
16600    new_path=`$CYGPATH -u "$path"`
16601    new_path=`$WHICH "$new_path" 2> /dev/null`
16602    # bat and cmd files are not always considered executable in cygwin causing which
16603    # to not find them
16604    if test "x$new_path" = x \
16605             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16606             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16607      new_path=`$CYGPATH -u "$path"`
16608    fi
16609    if test "x$new_path" = x; then
16610      # It's still not found. Now this is an unrecoverable error.
16611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16612$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16613      has_space=`$ECHO "$complete" | $GREP " "`
16614      if test "x$has_space" != x; then
16615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16617      fi
16618      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16619    fi
16620  fi
16621
16622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16625  # "foo.exe" is OK but "foo" is an error.
16626  #
16627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16628  # It is also a way to make sure we got the proper file name for the real test later on.
16629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16630  if test "x$test_shortpath" = x; then
16631    # Short path failed, file does not exist as specified.
16632    # Try adding .exe or .cmd
16633    if test -f "${new_path}.exe"; then
16634       input_to_shortpath="${new_path}.exe"
16635    elif test -f "${new_path}.cmd"; then
16636       input_to_shortpath="${new_path}.cmd"
16637    else
16638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16639$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16640      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16641$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16642      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16643    fi
16644  else
16645    input_to_shortpath="$new_path"
16646  fi
16647
16648  # Call helper function which possibly converts this using DOS-style short mode.
16649  # If so, the updated path is stored in $new_path.
16650  new_path="$input_to_shortpath"
16651
16652  input_path="$input_to_shortpath"
16653  # Check if we need to convert this using DOS-style short mode. If the path
16654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16655  # take no chances and rewrite it.
16656  # Note: m4 eats our [], so we need to use [ and ] instead.
16657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16658  if test "x$has_forbidden_chars" != x; then
16659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16663      # Going to short mode and back again did indeed matter. Since short mode is
16664      # case insensitive, let's make it lowercase to improve readability.
16665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16666      # Now convert it back to Unix-stile (cygpath)
16667      input_path=`$CYGPATH -u "$shortmode_path"`
16668      new_path="$input_path"
16669    fi
16670  fi
16671
16672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16673  if test "x$test_cygdrive_prefix" = x; then
16674    # As a simple fix, exclude /usr/bin since it's not a real path.
16675    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16677      # a path prefixed by /cygdrive for fixpath to work.
16678      new_path="$CYGWIN_ROOT_PATH$input_path"
16679    fi
16680  fi
16681
16682  # remove trailing .exe if any
16683  new_path="${new_path/%.exe/}"
16684
16685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16686
16687  # First separate the path from the arguments. This will split at the first
16688  # space.
16689  complete="$VS_ENV_CMD"
16690  path="${complete%% *}"
16691  tmp="$complete EOL"
16692  arguments="${tmp#* }"
16693
16694  # Input might be given as Windows format, start by converting to
16695  # unix format.
16696  new_path="$path"
16697
16698  windows_path="$new_path"
16699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16700    unix_path=`$CYGPATH -u "$windows_path"`
16701    new_path="$unix_path"
16702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16704    new_path="$unix_path"
16705  fi
16706
16707
16708  # Now try to locate executable using which
16709  new_path=`$WHICH "$new_path" 2> /dev/null`
16710
16711  if test "x$new_path" = x; then
16712    # Oops. Which didn't find the executable.
16713    # The splitting of arguments from the executable at a space might have been incorrect,
16714    # since paths with space are more likely in Windows. Give it another try with the whole
16715    # argument.
16716    path="$complete"
16717    arguments="EOL"
16718    new_path="$path"
16719
16720  windows_path="$new_path"
16721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16722    unix_path=`$CYGPATH -u "$windows_path"`
16723    new_path="$unix_path"
16724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16726    new_path="$unix_path"
16727  fi
16728
16729
16730    new_path=`$WHICH "$new_path" 2> /dev/null`
16731
16732    if test "x$new_path" = x; then
16733      # It's still not found. Now this is an unrecoverable error.
16734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16735$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16736      has_space=`$ECHO "$complete" | $GREP " "`
16737      if test "x$has_space" != x; then
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16740      fi
16741      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16742    fi
16743  fi
16744
16745  # Now new_path has a complete unix path to the binary
16746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16747    # Keep paths in /bin as-is, but remove trailing .exe if any
16748    new_path="${new_path/%.exe/}"
16749    # Do not save /bin paths to all_fixpath_prefixes!
16750  else
16751    # Not in mixed or Windows style, start by that.
16752    new_path=`cmd //c echo $new_path`
16753
16754  input_path="$new_path"
16755  # Check if we need to convert this using DOS-style short mode. If the path
16756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16757  # take no chances and rewrite it.
16758  # Note: m4 eats our [], so we need to use [ and ] instead.
16759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16760  if test "x$has_forbidden_chars" != x; then
16761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16763  fi
16764
16765    # Output is in $new_path
16766
16767  windows_path="$new_path"
16768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16769    unix_path=`$CYGPATH -u "$windows_path"`
16770    new_path="$unix_path"
16771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16773    new_path="$unix_path"
16774  fi
16775
16776    # remove trailing .exe if any
16777    new_path="${new_path/%.exe/}"
16778
16779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16781  fi
16782
16783  else
16784    # We're on a posix platform. Hooray! :)
16785    # First separate the path from the arguments. This will split at the first
16786    # space.
16787    complete="$VS_ENV_CMD"
16788    path="${complete%% *}"
16789    tmp="$complete EOL"
16790    arguments="${tmp#* }"
16791
16792    # Cannot rely on the command "which" here since it doesn't always work.
16793    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16794    if test -z "$is_absolute_path"; then
16795      # Path to executable is not absolute. Find it.
16796      IFS_save="$IFS"
16797      IFS=:
16798      for p in $PATH; do
16799        if test -f "$p/$path" && test -x "$p/$path"; then
16800          new_path="$p/$path"
16801          break
16802        fi
16803      done
16804      IFS="$IFS_save"
16805    else
16806      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16807$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16808      new_path="$path"
16809    fi
16810
16811    if test "x$new_path" = x; then
16812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16813$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16814        has_space=`$ECHO "$complete" | $GREP " "`
16815        if test "x$has_space" != x; then
16816          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16817$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16818        fi
16819        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16820      fi
16821  fi
16822
16823      # Now join together the path and the arguments once again
16824      if test "x$arguments" != xEOL; then
16825        new_complete="$new_path ${arguments% *}"
16826      else
16827        new_complete="$new_path"
16828      fi
16829
16830  if test "x$complete" != "x$new_complete"; then
16831      VS_ENV_CMD="$new_complete"
16832      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16833$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16834    fi
16835
16836
16837    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16838    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16839$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16840    cd $OUTPUT_ROOT
16841    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16842    # to autoconf standards.
16843
16844    #----
16845
16846    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16847    # but calculate the difference in Cygwin environment before/after running it and then
16848    # apply the diff.
16849
16850    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16851      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16852      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16853      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16854    else
16855      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16856      _dosbash=`cmd //c echo \`which bash\``
16857    fi
16858
16859    # generate the set of exported vars before/after the vs10 setup
16860    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16861    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16862    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16863    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16864
16865    # Now execute the newly created bat file.
16866    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16867    cmd /c localdevenvtmp.bat | cat
16868
16869    # apply the diff (less some non-vs10 vars named by "!")
16870    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16871    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16872    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16873
16874    # cleanup
16875    $RM localdevenvtmp*
16876    #----
16877    cd $CURDIR
16878    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16880$as_echo "no" >&6; }
16881      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16882$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16883      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16884$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16885      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16886$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16887      as_fn_error $? "Cannot continue" "$LINENO" 5
16888    fi
16889
16890    # Now set all paths and other env variables. This will allow the rest of
16891    # the configure script to find and run the compiler in the proper way.
16892    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16893$as_echo "$as_me: Setting extracted environment variables" >&6;}
16894    . $OUTPUT_ROOT/localdevenv.sh
16895  else
16896    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16897    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16898$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16899  fi
16900
16901  # At this point, we should have corrent variables in the environment, or we can't continue.
16902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16903$as_echo_n "checking for Visual Studio variables... " >&6; }
16904
16905  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16906    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16908$as_echo "present but broken" >&6; }
16909      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16910    else
16911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16912$as_echo "ok" >&6; }
16913      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16914      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16915      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16916      VS_PATH="$PATH"
16917
16918
16919
16920    fi
16921  else
16922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16923$as_echo "not found" >&6; }
16924
16925    if test "x$VS_ENV_CMD" = x; then
16926      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16927$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16928      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16929$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16930    else
16931      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16932$as_echo "$as_me: Running the extraction script failed." >&6;}
16933    fi
16934    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16935$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16936    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16937$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16938    as_fn_error $? "Cannot continue" "$LINENO" 5
16939  fi
16940
16941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16942$as_echo_n "checking for msvcr100.dll... " >&6; }
16943
16944# Check whether --with-msvcr-dll was given.
16945if test "${with_msvcr_dll+set}" = set; then :
16946  withval=$with_msvcr_dll;
16947fi
16948
16949  if test "x$with_msvcr_dll" != x; then
16950    MSVCR_DLL="$with_msvcr_dll"
16951  else
16952    if test "x$VCINSTALLDIR" != x; then
16953      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16954        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16955      else
16956        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16957        if test "x$MSVCR_DLL" = x; then
16958          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16959        fi
16960      fi
16961      if test "x$MSVCR_DLL" != x; then
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16963$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16964      else
16965        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16966$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16967      fi
16968    fi
16969    if test "x$MSVCR_DLL" = x; then
16970      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16972$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16973        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16974      fi
16975    fi
16976  fi
16977  if test "x$MSVCR_DLL" = x; then
16978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16979$as_echo "no" >&6; }
16980    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16981  fi
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16983$as_echo "$MSVCR_DLL" >&6; }
16984
16985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16986
16987  # Input might be given as Windows format, start by converting to
16988  # unix format.
16989  path="$MSVCR_DLL"
16990  new_path=`$CYGPATH -u "$path"`
16991
16992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16995  # "foo.exe" is OK but "foo" is an error.
16996  #
16997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16998  # It is also a way to make sure we got the proper file name for the real test later on.
16999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17000  if test "x$test_shortpath" = x; then
17001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17002$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17003    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17004  fi
17005
17006  # Call helper function which possibly converts this using DOS-style short mode.
17007  # If so, the updated path is stored in $new_path.
17008
17009  input_path="$new_path"
17010  # Check if we need to convert this using DOS-style short mode. If the path
17011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17012  # take no chances and rewrite it.
17013  # Note: m4 eats our [], so we need to use [ and ] instead.
17014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17015  if test "x$has_forbidden_chars" != x; then
17016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17020      # Going to short mode and back again did indeed matter. Since short mode is
17021      # case insensitive, let's make it lowercase to improve readability.
17022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17023      # Now convert it back to Unix-stile (cygpath)
17024      input_path=`$CYGPATH -u "$shortmode_path"`
17025      new_path="$input_path"
17026    fi
17027  fi
17028
17029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17030  if test "x$test_cygdrive_prefix" = x; then
17031    # As a simple fix, exclude /usr/bin since it's not a real path.
17032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17034      # a path prefixed by /cygdrive for fixpath to work.
17035      new_path="$CYGWIN_ROOT_PATH$input_path"
17036    fi
17037  fi
17038
17039
17040  if test "x$path" != "x$new_path"; then
17041    MSVCR_DLL="$new_path"
17042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17043$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17044  fi
17045
17046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17047
17048  path="$MSVCR_DLL"
17049  has_colon=`$ECHO $path | $GREP ^.:`
17050  new_path="$path"
17051  if test "x$has_colon" = x; then
17052    # Not in mixed or Windows style, start by that.
17053    new_path=`cmd //c echo $path`
17054  fi
17055
17056
17057  input_path="$new_path"
17058  # Check if we need to convert this using DOS-style short mode. If the path
17059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17060  # take no chances and rewrite it.
17061  # Note: m4 eats our [], so we need to use [ and ] instead.
17062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17063  if test "x$has_forbidden_chars" != x; then
17064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17066  fi
17067
17068
17069  windows_path="$new_path"
17070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17071    unix_path=`$CYGPATH -u "$windows_path"`
17072    new_path="$unix_path"
17073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17075    new_path="$unix_path"
17076  fi
17077
17078  if test "x$path" != "x$new_path"; then
17079    MSVCR_DLL="$new_path"
17080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17081$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17082  fi
17083
17084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17086
17087  else
17088    # We're on a posix platform. Hooray! :)
17089    path="$MSVCR_DLL"
17090
17091    if test ! -f "$path" && test ! -d "$path"; then
17092      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17093    fi
17094
17095    has_space=`$ECHO "$path" | $GREP " "`
17096    if test "x$has_space" != x; then
17097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17098$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17099      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17100    fi
17101  fi
17102
17103
17104
17105
17106# Check whether --with-dxsdk was given.
17107if test "${with_dxsdk+set}" = set; then :
17108  withval=$with_dxsdk;
17109fi
17110
17111
17112# Check whether --with-dxsdk-lib was given.
17113if test "${with_dxsdk_lib+set}" = set; then :
17114  withval=$with_dxsdk_lib;
17115fi
17116
17117
17118# Check whether --with-dxsdk-include was given.
17119if test "${with_dxsdk_include+set}" = set; then :
17120  withval=$with_dxsdk_include;
17121fi
17122
17123
17124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17125$as_echo_n "checking for DirectX SDK... " >&6; }
17126
17127  if test "x$with_dxsdk" != x; then
17128    dxsdk_path="$with_dxsdk"
17129  elif test "x$DXSDK_DIR" != x; then
17130    dxsdk_path="$DXSDK_DIR"
17131  elif test -d "C:/DXSDK"; then
17132    dxsdk_path="C:/DXSDK"
17133  else
17134    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17135  fi
17136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17137$as_echo "$dxsdk_path" >&6; }
17138
17139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17140
17141  # Input might be given as Windows format, start by converting to
17142  # unix format.
17143  path="$dxsdk_path"
17144  new_path=`$CYGPATH -u "$path"`
17145
17146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17149  # "foo.exe" is OK but "foo" is an error.
17150  #
17151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17152  # It is also a way to make sure we got the proper file name for the real test later on.
17153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17154  if test "x$test_shortpath" = x; then
17155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17156$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17157    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17158  fi
17159
17160  # Call helper function which possibly converts this using DOS-style short mode.
17161  # If so, the updated path is stored in $new_path.
17162
17163  input_path="$new_path"
17164  # Check if we need to convert this using DOS-style short mode. If the path
17165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17166  # take no chances and rewrite it.
17167  # Note: m4 eats our [], so we need to use [ and ] instead.
17168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17169  if test "x$has_forbidden_chars" != x; then
17170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17174      # Going to short mode and back again did indeed matter. Since short mode is
17175      # case insensitive, let's make it lowercase to improve readability.
17176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17177      # Now convert it back to Unix-stile (cygpath)
17178      input_path=`$CYGPATH -u "$shortmode_path"`
17179      new_path="$input_path"
17180    fi
17181  fi
17182
17183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17184  if test "x$test_cygdrive_prefix" = x; then
17185    # As a simple fix, exclude /usr/bin since it's not a real path.
17186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17188      # a path prefixed by /cygdrive for fixpath to work.
17189      new_path="$CYGWIN_ROOT_PATH$input_path"
17190    fi
17191  fi
17192
17193
17194  if test "x$path" != "x$new_path"; then
17195    dxsdk_path="$new_path"
17196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17197$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17198  fi
17199
17200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17201
17202  path="$dxsdk_path"
17203  has_colon=`$ECHO $path | $GREP ^.:`
17204  new_path="$path"
17205  if test "x$has_colon" = x; then
17206    # Not in mixed or Windows style, start by that.
17207    new_path=`cmd //c echo $path`
17208  fi
17209
17210
17211  input_path="$new_path"
17212  # Check if we need to convert this using DOS-style short mode. If the path
17213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17214  # take no chances and rewrite it.
17215  # Note: m4 eats our [], so we need to use [ and ] instead.
17216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17217  if test "x$has_forbidden_chars" != x; then
17218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17220  fi
17221
17222
17223  windows_path="$new_path"
17224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17225    unix_path=`$CYGPATH -u "$windows_path"`
17226    new_path="$unix_path"
17227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17229    new_path="$unix_path"
17230  fi
17231
17232  if test "x$path" != "x$new_path"; then
17233    dxsdk_path="$new_path"
17234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17235$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17236  fi
17237
17238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17240
17241  else
17242    # We're on a posix platform. Hooray! :)
17243    path="$dxsdk_path"
17244
17245    if test ! -f "$path" && test ! -d "$path"; then
17246      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17247    fi
17248
17249    has_space=`$ECHO "$path" | $GREP " "`
17250    if test "x$has_space" != x; then
17251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17252$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17254    fi
17255  fi
17256
17257
17258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17259$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17260  if test "x$with_dxsdk_lib" != x; then
17261    DXSDK_LIB_PATH="$with_dxsdk_lib"
17262  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17263    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17264  else
17265    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17266  fi
17267  # dsound.lib is linked to in jsoundds
17268  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17269    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17270  fi
17271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17272$as_echo "$DXSDK_LIB_PATH" >&6; }
17273
17274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17275
17276  # Input might be given as Windows format, start by converting to
17277  # unix format.
17278  path="$DXSDK_LIB_PATH"
17279  new_path=`$CYGPATH -u "$path"`
17280
17281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17284  # "foo.exe" is OK but "foo" is an error.
17285  #
17286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17287  # It is also a way to make sure we got the proper file name for the real test later on.
17288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17289  if test "x$test_shortpath" = x; then
17290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17291$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17292    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17293  fi
17294
17295  # Call helper function which possibly converts this using DOS-style short mode.
17296  # If so, the updated path is stored in $new_path.
17297
17298  input_path="$new_path"
17299  # Check if we need to convert this using DOS-style short mode. If the path
17300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17301  # take no chances and rewrite it.
17302  # Note: m4 eats our [], so we need to use [ and ] instead.
17303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17304  if test "x$has_forbidden_chars" != x; then
17305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17309      # Going to short mode and back again did indeed matter. Since short mode is
17310      # case insensitive, let's make it lowercase to improve readability.
17311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17312      # Now convert it back to Unix-stile (cygpath)
17313      input_path=`$CYGPATH -u "$shortmode_path"`
17314      new_path="$input_path"
17315    fi
17316  fi
17317
17318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17319  if test "x$test_cygdrive_prefix" = x; then
17320    # As a simple fix, exclude /usr/bin since it's not a real path.
17321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17323      # a path prefixed by /cygdrive for fixpath to work.
17324      new_path="$CYGWIN_ROOT_PATH$input_path"
17325    fi
17326  fi
17327
17328
17329  if test "x$path" != "x$new_path"; then
17330    DXSDK_LIB_PATH="$new_path"
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17332$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17333  fi
17334
17335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17336
17337  path="$DXSDK_LIB_PATH"
17338  has_colon=`$ECHO $path | $GREP ^.:`
17339  new_path="$path"
17340  if test "x$has_colon" = x; then
17341    # Not in mixed or Windows style, start by that.
17342    new_path=`cmd //c echo $path`
17343  fi
17344
17345
17346  input_path="$new_path"
17347  # Check if we need to convert this using DOS-style short mode. If the path
17348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17349  # take no chances and rewrite it.
17350  # Note: m4 eats our [], so we need to use [ and ] instead.
17351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17352  if test "x$has_forbidden_chars" != x; then
17353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17355  fi
17356
17357
17358  windows_path="$new_path"
17359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17360    unix_path=`$CYGPATH -u "$windows_path"`
17361    new_path="$unix_path"
17362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17364    new_path="$unix_path"
17365  fi
17366
17367  if test "x$path" != "x$new_path"; then
17368    DXSDK_LIB_PATH="$new_path"
17369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17370$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17371  fi
17372
17373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17375
17376  else
17377    # We're on a posix platform. Hooray! :)
17378    path="$DXSDK_LIB_PATH"
17379
17380    if test ! -f "$path" && test ! -d "$path"; then
17381      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17382    fi
17383
17384    has_space=`$ECHO "$path" | $GREP " "`
17385    if test "x$has_space" != x; then
17386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17387$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17388      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17389    fi
17390  fi
17391
17392
17393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17394$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17395  if test "x$with_dxsdk_include" != x; then
17396    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17397  else
17398    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17399  fi
17400  # dsound.h is included in jsoundds
17401  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17402    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17403  fi
17404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17405$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17406
17407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17408
17409  # Input might be given as Windows format, start by converting to
17410  # unix format.
17411  path="$DXSDK_INCLUDE_PATH"
17412  new_path=`$CYGPATH -u "$path"`
17413
17414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17417  # "foo.exe" is OK but "foo" is an error.
17418  #
17419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17420  # It is also a way to make sure we got the proper file name for the real test later on.
17421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17422  if test "x$test_shortpath" = x; then
17423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17424$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17425    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17426  fi
17427
17428  # Call helper function which possibly converts this using DOS-style short mode.
17429  # If so, the updated path is stored in $new_path.
17430
17431  input_path="$new_path"
17432  # Check if we need to convert this using DOS-style short mode. If the path
17433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17434  # take no chances and rewrite it.
17435  # Note: m4 eats our [], so we need to use [ and ] instead.
17436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17437  if test "x$has_forbidden_chars" != x; then
17438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17442      # Going to short mode and back again did indeed matter. Since short mode is
17443      # case insensitive, let's make it lowercase to improve readability.
17444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17445      # Now convert it back to Unix-stile (cygpath)
17446      input_path=`$CYGPATH -u "$shortmode_path"`
17447      new_path="$input_path"
17448    fi
17449  fi
17450
17451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17452  if test "x$test_cygdrive_prefix" = x; then
17453    # As a simple fix, exclude /usr/bin since it's not a real path.
17454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17456      # a path prefixed by /cygdrive for fixpath to work.
17457      new_path="$CYGWIN_ROOT_PATH$input_path"
17458    fi
17459  fi
17460
17461
17462  if test "x$path" != "x$new_path"; then
17463    DXSDK_INCLUDE_PATH="$new_path"
17464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17465$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17466  fi
17467
17468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17469
17470  path="$DXSDK_INCLUDE_PATH"
17471  has_colon=`$ECHO $path | $GREP ^.:`
17472  new_path="$path"
17473  if test "x$has_colon" = x; then
17474    # Not in mixed or Windows style, start by that.
17475    new_path=`cmd //c echo $path`
17476  fi
17477
17478
17479  input_path="$new_path"
17480  # Check if we need to convert this using DOS-style short mode. If the path
17481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17482  # take no chances and rewrite it.
17483  # Note: m4 eats our [], so we need to use [ and ] instead.
17484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17485  if test "x$has_forbidden_chars" != x; then
17486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17488  fi
17489
17490
17491  windows_path="$new_path"
17492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17493    unix_path=`$CYGPATH -u "$windows_path"`
17494    new_path="$unix_path"
17495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17497    new_path="$unix_path"
17498  fi
17499
17500  if test "x$path" != "x$new_path"; then
17501    DXSDK_INCLUDE_PATH="$new_path"
17502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17503$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17504  fi
17505
17506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17508
17509  else
17510    # We're on a posix platform. Hooray! :)
17511    path="$DXSDK_INCLUDE_PATH"
17512
17513    if test ! -f "$path" && test ! -d "$path"; then
17514      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17515    fi
17516
17517    has_space=`$ECHO "$path" | $GREP " "`
17518    if test "x$has_space" != x; then
17519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17520$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17521      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17522    fi
17523  fi
17524
17525
17526
17527
17528  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17529
17530fi
17531
17532
17533
17534# If --build AND --host is set, then the configure script will find any
17535# cross compilation tools in the PATH. Cross compilation tools
17536# follows the cross compilation standard where they are prefixed with ${host}.
17537# For example the binary i686-sun-solaris2.10-gcc
17538# will cross compile for i686-sun-solaris2.10
17539# If neither of build and host is not set, then build=host and the
17540# default compiler found in the path will be used.
17541# Setting only --host, does not seem to be really supported.
17542# Please set both --build and --host if you want to cross compile.
17543
17544if test "x$COMPILE_TYPE" = "xcross"; then
17545    # Now we to find a C/C++ compiler that can build executables for the build
17546    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17547    # once. Also, we need to do this before adding a tools dir to the path,
17548    # otherwise we might pick up cross-compilers which don't use standard naming.
17549    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17550    # to wait until they are properly discovered.
17551    for ac_prog in cl cc gcc
17552do
17553  # Extract the first word of "$ac_prog", so it can be a program name with args.
17554set dummy $ac_prog; ac_word=$2
17555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17556$as_echo_n "checking for $ac_word... " >&6; }
17557if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17558  $as_echo_n "(cached) " >&6
17559else
17560  case $BUILD_CC in
17561  [\\/]* | ?:[\\/]*)
17562  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17563  ;;
17564  *)
17565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17566for as_dir in $PATH
17567do
17568  IFS=$as_save_IFS
17569  test -z "$as_dir" && as_dir=.
17570    for ac_exec_ext in '' $ac_executable_extensions; do
17571  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17572    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17574    break 2
17575  fi
17576done
17577  done
17578IFS=$as_save_IFS
17579
17580  ;;
17581esac
17582fi
17583BUILD_CC=$ac_cv_path_BUILD_CC
17584if test -n "$BUILD_CC"; then
17585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17586$as_echo "$BUILD_CC" >&6; }
17587else
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17589$as_echo "no" >&6; }
17590fi
17591
17592
17593  test -n "$BUILD_CC" && break
17594done
17595
17596
17597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17598
17599  # First separate the path from the arguments. This will split at the first
17600  # space.
17601  complete="$BUILD_CC"
17602  path="${complete%% *}"
17603  tmp="$complete EOL"
17604  arguments="${tmp#* }"
17605
17606  # Input might be given as Windows format, start by converting to
17607  # unix format.
17608  new_path=`$CYGPATH -u "$path"`
17609
17610  # Now try to locate executable using which
17611  new_path=`$WHICH "$new_path" 2> /dev/null`
17612  # bat and cmd files are not always considered executable in cygwin causing which
17613  # to not find them
17614  if test "x$new_path" = x \
17615           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17616           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17617    new_path=`$CYGPATH -u "$path"`
17618  fi
17619  if test "x$new_path" = x; then
17620    # Oops. Which didn't find the executable.
17621    # The splitting of arguments from the executable at a space might have been incorrect,
17622    # since paths with space are more likely in Windows. Give it another try with the whole
17623    # argument.
17624    path="$complete"
17625    arguments="EOL"
17626    new_path=`$CYGPATH -u "$path"`
17627    new_path=`$WHICH "$new_path" 2> /dev/null`
17628    # bat and cmd files are not always considered executable in cygwin causing which
17629    # to not find them
17630    if test "x$new_path" = x \
17631             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17632             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17633      new_path=`$CYGPATH -u "$path"`
17634    fi
17635    if test "x$new_path" = x; then
17636      # It's still not found. Now this is an unrecoverable error.
17637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17638$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17639      has_space=`$ECHO "$complete" | $GREP " "`
17640      if test "x$has_space" != x; then
17641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17643      fi
17644      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17645    fi
17646  fi
17647
17648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17651  # "foo.exe" is OK but "foo" is an error.
17652  #
17653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17654  # It is also a way to make sure we got the proper file name for the real test later on.
17655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17656  if test "x$test_shortpath" = x; then
17657    # Short path failed, file does not exist as specified.
17658    # Try adding .exe or .cmd
17659    if test -f "${new_path}.exe"; then
17660       input_to_shortpath="${new_path}.exe"
17661    elif test -f "${new_path}.cmd"; then
17662       input_to_shortpath="${new_path}.cmd"
17663    else
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17665$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17667$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17668      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17669    fi
17670  else
17671    input_to_shortpath="$new_path"
17672  fi
17673
17674  # Call helper function which possibly converts this using DOS-style short mode.
17675  # If so, the updated path is stored in $new_path.
17676  new_path="$input_to_shortpath"
17677
17678  input_path="$input_to_shortpath"
17679  # Check if we need to convert this using DOS-style short mode. If the path
17680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17681  # take no chances and rewrite it.
17682  # Note: m4 eats our [], so we need to use [ and ] instead.
17683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17684  if test "x$has_forbidden_chars" != x; then
17685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17689      # Going to short mode and back again did indeed matter. Since short mode is
17690      # case insensitive, let's make it lowercase to improve readability.
17691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17692      # Now convert it back to Unix-stile (cygpath)
17693      input_path=`$CYGPATH -u "$shortmode_path"`
17694      new_path="$input_path"
17695    fi
17696  fi
17697
17698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17699  if test "x$test_cygdrive_prefix" = x; then
17700    # As a simple fix, exclude /usr/bin since it's not a real path.
17701    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17703      # a path prefixed by /cygdrive for fixpath to work.
17704      new_path="$CYGWIN_ROOT_PATH$input_path"
17705    fi
17706  fi
17707
17708  # remove trailing .exe if any
17709  new_path="${new_path/%.exe/}"
17710
17711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17712
17713  # First separate the path from the arguments. This will split at the first
17714  # space.
17715  complete="$BUILD_CC"
17716  path="${complete%% *}"
17717  tmp="$complete EOL"
17718  arguments="${tmp#* }"
17719
17720  # Input might be given as Windows format, start by converting to
17721  # unix format.
17722  new_path="$path"
17723
17724  windows_path="$new_path"
17725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17726    unix_path=`$CYGPATH -u "$windows_path"`
17727    new_path="$unix_path"
17728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17730    new_path="$unix_path"
17731  fi
17732
17733
17734  # Now try to locate executable using which
17735  new_path=`$WHICH "$new_path" 2> /dev/null`
17736
17737  if test "x$new_path" = x; then
17738    # Oops. Which didn't find the executable.
17739    # The splitting of arguments from the executable at a space might have been incorrect,
17740    # since paths with space are more likely in Windows. Give it another try with the whole
17741    # argument.
17742    path="$complete"
17743    arguments="EOL"
17744    new_path="$path"
17745
17746  windows_path="$new_path"
17747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17748    unix_path=`$CYGPATH -u "$windows_path"`
17749    new_path="$unix_path"
17750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17752    new_path="$unix_path"
17753  fi
17754
17755
17756    new_path=`$WHICH "$new_path" 2> /dev/null`
17757
17758    if test "x$new_path" = x; then
17759      # It's still not found. Now this is an unrecoverable error.
17760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17761$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17762      has_space=`$ECHO "$complete" | $GREP " "`
17763      if test "x$has_space" != x; then
17764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17766      fi
17767      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17768    fi
17769  fi
17770
17771  # Now new_path has a complete unix path to the binary
17772  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17773    # Keep paths in /bin as-is, but remove trailing .exe if any
17774    new_path="${new_path/%.exe/}"
17775    # Do not save /bin paths to all_fixpath_prefixes!
17776  else
17777    # Not in mixed or Windows style, start by that.
17778    new_path=`cmd //c echo $new_path`
17779
17780  input_path="$new_path"
17781  # Check if we need to convert this using DOS-style short mode. If the path
17782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17783  # take no chances and rewrite it.
17784  # Note: m4 eats our [], so we need to use [ and ] instead.
17785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17786  if test "x$has_forbidden_chars" != x; then
17787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17789  fi
17790
17791    # Output is in $new_path
17792
17793  windows_path="$new_path"
17794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795    unix_path=`$CYGPATH -u "$windows_path"`
17796    new_path="$unix_path"
17797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799    new_path="$unix_path"
17800  fi
17801
17802    # remove trailing .exe if any
17803    new_path="${new_path/%.exe/}"
17804
17805    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17806    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17807  fi
17808
17809  else
17810    # We're on a posix platform. Hooray! :)
17811    # First separate the path from the arguments. This will split at the first
17812    # space.
17813    complete="$BUILD_CC"
17814    path="${complete%% *}"
17815    tmp="$complete EOL"
17816    arguments="${tmp#* }"
17817
17818    # Cannot rely on the command "which" here since it doesn't always work.
17819    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17820    if test -z "$is_absolute_path"; then
17821      # Path to executable is not absolute. Find it.
17822      IFS_save="$IFS"
17823      IFS=:
17824      for p in $PATH; do
17825        if test -f "$p/$path" && test -x "$p/$path"; then
17826          new_path="$p/$path"
17827          break
17828        fi
17829      done
17830      IFS="$IFS_save"
17831    else
17832      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17833$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17834      new_path="$path"
17835    fi
17836
17837    if test "x$new_path" = x; then
17838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17839$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17840        has_space=`$ECHO "$complete" | $GREP " "`
17841        if test "x$has_space" != x; then
17842          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17844        fi
17845        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17846      fi
17847  fi
17848
17849      # Now join together the path and the arguments once again
17850      if test "x$arguments" != xEOL; then
17851        new_complete="$new_path ${arguments% *}"
17852      else
17853        new_complete="$new_path"
17854      fi
17855
17856  if test "x$complete" != "x$new_complete"; then
17857      BUILD_CC="$new_complete"
17858      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17859$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17860    fi
17861
17862    for ac_prog in cl CC g++
17863do
17864  # Extract the first word of "$ac_prog", so it can be a program name with args.
17865set dummy $ac_prog; ac_word=$2
17866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17867$as_echo_n "checking for $ac_word... " >&6; }
17868if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17869  $as_echo_n "(cached) " >&6
17870else
17871  case $BUILD_CXX in
17872  [\\/]* | ?:[\\/]*)
17873  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17874  ;;
17875  *)
17876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17877for as_dir in $PATH
17878do
17879  IFS=$as_save_IFS
17880  test -z "$as_dir" && as_dir=.
17881    for ac_exec_ext in '' $ac_executable_extensions; do
17882  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17883    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17885    break 2
17886  fi
17887done
17888  done
17889IFS=$as_save_IFS
17890
17891  ;;
17892esac
17893fi
17894BUILD_CXX=$ac_cv_path_BUILD_CXX
17895if test -n "$BUILD_CXX"; then
17896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17897$as_echo "$BUILD_CXX" >&6; }
17898else
17899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17900$as_echo "no" >&6; }
17901fi
17902
17903
17904  test -n "$BUILD_CXX" && break
17905done
17906
17907
17908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17909
17910  # First separate the path from the arguments. This will split at the first
17911  # space.
17912  complete="$BUILD_CXX"
17913  path="${complete%% *}"
17914  tmp="$complete EOL"
17915  arguments="${tmp#* }"
17916
17917  # Input might be given as Windows format, start by converting to
17918  # unix format.
17919  new_path=`$CYGPATH -u "$path"`
17920
17921  # Now try to locate executable using which
17922  new_path=`$WHICH "$new_path" 2> /dev/null`
17923  # bat and cmd files are not always considered executable in cygwin causing which
17924  # to not find them
17925  if test "x$new_path" = x \
17926           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17927           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17928    new_path=`$CYGPATH -u "$path"`
17929  fi
17930  if test "x$new_path" = x; then
17931    # Oops. Which didn't find the executable.
17932    # The splitting of arguments from the executable at a space might have been incorrect,
17933    # since paths with space are more likely in Windows. Give it another try with the whole
17934    # argument.
17935    path="$complete"
17936    arguments="EOL"
17937    new_path=`$CYGPATH -u "$path"`
17938    new_path=`$WHICH "$new_path" 2> /dev/null`
17939    # bat and cmd files are not always considered executable in cygwin causing which
17940    # to not find them
17941    if test "x$new_path" = x \
17942             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17943             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17944      new_path=`$CYGPATH -u "$path"`
17945    fi
17946    if test "x$new_path" = x; then
17947      # It's still not found. Now this is an unrecoverable error.
17948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17949$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17950      has_space=`$ECHO "$complete" | $GREP " "`
17951      if test "x$has_space" != x; then
17952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17954      fi
17955      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17956    fi
17957  fi
17958
17959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17962  # "foo.exe" is OK but "foo" is an error.
17963  #
17964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17965  # It is also a way to make sure we got the proper file name for the real test later on.
17966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17967  if test "x$test_shortpath" = x; then
17968    # Short path failed, file does not exist as specified.
17969    # Try adding .exe or .cmd
17970    if test -f "${new_path}.exe"; then
17971       input_to_shortpath="${new_path}.exe"
17972    elif test -f "${new_path}.cmd"; then
17973       input_to_shortpath="${new_path}.cmd"
17974    else
17975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17976$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17979      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17980    fi
17981  else
17982    input_to_shortpath="$new_path"
17983  fi
17984
17985  # Call helper function which possibly converts this using DOS-style short mode.
17986  # If so, the updated path is stored in $new_path.
17987  new_path="$input_to_shortpath"
17988
17989  input_path="$input_to_shortpath"
17990  # Check if we need to convert this using DOS-style short mode. If the path
17991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17992  # take no chances and rewrite it.
17993  # Note: m4 eats our [], so we need to use [ and ] instead.
17994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17995  if test "x$has_forbidden_chars" != x; then
17996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18000      # Going to short mode and back again did indeed matter. Since short mode is
18001      # case insensitive, let's make it lowercase to improve readability.
18002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18003      # Now convert it back to Unix-stile (cygpath)
18004      input_path=`$CYGPATH -u "$shortmode_path"`
18005      new_path="$input_path"
18006    fi
18007  fi
18008
18009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18010  if test "x$test_cygdrive_prefix" = x; then
18011    # As a simple fix, exclude /usr/bin since it's not a real path.
18012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18014      # a path prefixed by /cygdrive for fixpath to work.
18015      new_path="$CYGWIN_ROOT_PATH$input_path"
18016    fi
18017  fi
18018
18019  # remove trailing .exe if any
18020  new_path="${new_path/%.exe/}"
18021
18022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18023
18024  # First separate the path from the arguments. This will split at the first
18025  # space.
18026  complete="$BUILD_CXX"
18027  path="${complete%% *}"
18028  tmp="$complete EOL"
18029  arguments="${tmp#* }"
18030
18031  # Input might be given as Windows format, start by converting to
18032  # unix format.
18033  new_path="$path"
18034
18035  windows_path="$new_path"
18036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037    unix_path=`$CYGPATH -u "$windows_path"`
18038    new_path="$unix_path"
18039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18041    new_path="$unix_path"
18042  fi
18043
18044
18045  # Now try to locate executable using which
18046  new_path=`$WHICH "$new_path" 2> /dev/null`
18047
18048  if test "x$new_path" = x; then
18049    # Oops. Which didn't find the executable.
18050    # The splitting of arguments from the executable at a space might have been incorrect,
18051    # since paths with space are more likely in Windows. Give it another try with the whole
18052    # argument.
18053    path="$complete"
18054    arguments="EOL"
18055    new_path="$path"
18056
18057  windows_path="$new_path"
18058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18059    unix_path=`$CYGPATH -u "$windows_path"`
18060    new_path="$unix_path"
18061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18063    new_path="$unix_path"
18064  fi
18065
18066
18067    new_path=`$WHICH "$new_path" 2> /dev/null`
18068
18069    if test "x$new_path" = x; then
18070      # It's still not found. Now this is an unrecoverable error.
18071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18072$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18073      has_space=`$ECHO "$complete" | $GREP " "`
18074      if test "x$has_space" != x; then
18075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18077      fi
18078      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18079    fi
18080  fi
18081
18082  # Now new_path has a complete unix path to the binary
18083  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18084    # Keep paths in /bin as-is, but remove trailing .exe if any
18085    new_path="${new_path/%.exe/}"
18086    # Do not save /bin paths to all_fixpath_prefixes!
18087  else
18088    # Not in mixed or Windows style, start by that.
18089    new_path=`cmd //c echo $new_path`
18090
18091  input_path="$new_path"
18092  # Check if we need to convert this using DOS-style short mode. If the path
18093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18094  # take no chances and rewrite it.
18095  # Note: m4 eats our [], so we need to use [ and ] instead.
18096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18097  if test "x$has_forbidden_chars" != x; then
18098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18100  fi
18101
18102    # Output is in $new_path
18103
18104  windows_path="$new_path"
18105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18106    unix_path=`$CYGPATH -u "$windows_path"`
18107    new_path="$unix_path"
18108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18110    new_path="$unix_path"
18111  fi
18112
18113    # remove trailing .exe if any
18114    new_path="${new_path/%.exe/}"
18115
18116    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18117    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18118  fi
18119
18120  else
18121    # We're on a posix platform. Hooray! :)
18122    # First separate the path from the arguments. This will split at the first
18123    # space.
18124    complete="$BUILD_CXX"
18125    path="${complete%% *}"
18126    tmp="$complete EOL"
18127    arguments="${tmp#* }"
18128
18129    # Cannot rely on the command "which" here since it doesn't always work.
18130    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18131    if test -z "$is_absolute_path"; then
18132      # Path to executable is not absolute. Find it.
18133      IFS_save="$IFS"
18134      IFS=:
18135      for p in $PATH; do
18136        if test -f "$p/$path" && test -x "$p/$path"; then
18137          new_path="$p/$path"
18138          break
18139        fi
18140      done
18141      IFS="$IFS_save"
18142    else
18143      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18144$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18145      new_path="$path"
18146    fi
18147
18148    if test "x$new_path" = x; then
18149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18150$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18151        has_space=`$ECHO "$complete" | $GREP " "`
18152        if test "x$has_space" != x; then
18153          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18154$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18155        fi
18156        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18157      fi
18158  fi
18159
18160      # Now join together the path and the arguments once again
18161      if test "x$arguments" != xEOL; then
18162        new_complete="$new_path ${arguments% *}"
18163      else
18164        new_complete="$new_path"
18165      fi
18166
18167  if test "x$complete" != "x$new_complete"; then
18168      BUILD_CXX="$new_complete"
18169      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18170$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18171    fi
18172
18173    # Extract the first word of "ld", so it can be a program name with args.
18174set dummy ld; ac_word=$2
18175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18176$as_echo_n "checking for $ac_word... " >&6; }
18177if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18178  $as_echo_n "(cached) " >&6
18179else
18180  case $BUILD_LD in
18181  [\\/]* | ?:[\\/]*)
18182  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18183  ;;
18184  *)
18185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18186for as_dir in $PATH
18187do
18188  IFS=$as_save_IFS
18189  test -z "$as_dir" && as_dir=.
18190    for ac_exec_ext in '' $ac_executable_extensions; do
18191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18192    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18194    break 2
18195  fi
18196done
18197  done
18198IFS=$as_save_IFS
18199
18200  ;;
18201esac
18202fi
18203BUILD_LD=$ac_cv_path_BUILD_LD
18204if test -n "$BUILD_LD"; then
18205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18206$as_echo "$BUILD_LD" >&6; }
18207else
18208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18209$as_echo "no" >&6; }
18210fi
18211
18212
18213
18214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18215
18216  # First separate the path from the arguments. This will split at the first
18217  # space.
18218  complete="$BUILD_LD"
18219  path="${complete%% *}"
18220  tmp="$complete EOL"
18221  arguments="${tmp#* }"
18222
18223  # Input might be given as Windows format, start by converting to
18224  # unix format.
18225  new_path=`$CYGPATH -u "$path"`
18226
18227  # Now try to locate executable using which
18228  new_path=`$WHICH "$new_path" 2> /dev/null`
18229  # bat and cmd files are not always considered executable in cygwin causing which
18230  # to not find them
18231  if test "x$new_path" = x \
18232           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18233           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18234    new_path=`$CYGPATH -u "$path"`
18235  fi
18236  if test "x$new_path" = x; then
18237    # Oops. Which didn't find the executable.
18238    # The splitting of arguments from the executable at a space might have been incorrect,
18239    # since paths with space are more likely in Windows. Give it another try with the whole
18240    # argument.
18241    path="$complete"
18242    arguments="EOL"
18243    new_path=`$CYGPATH -u "$path"`
18244    new_path=`$WHICH "$new_path" 2> /dev/null`
18245    # bat and cmd files are not always considered executable in cygwin causing which
18246    # to not find them
18247    if test "x$new_path" = x \
18248             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18249             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18250      new_path=`$CYGPATH -u "$path"`
18251    fi
18252    if test "x$new_path" = x; then
18253      # It's still not found. Now this is an unrecoverable error.
18254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18255$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18256      has_space=`$ECHO "$complete" | $GREP " "`
18257      if test "x$has_space" != x; then
18258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18260      fi
18261      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18262    fi
18263  fi
18264
18265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18268  # "foo.exe" is OK but "foo" is an error.
18269  #
18270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18271  # It is also a way to make sure we got the proper file name for the real test later on.
18272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18273  if test "x$test_shortpath" = x; then
18274    # Short path failed, file does not exist as specified.
18275    # Try adding .exe or .cmd
18276    if test -f "${new_path}.exe"; then
18277       input_to_shortpath="${new_path}.exe"
18278    elif test -f "${new_path}.cmd"; then
18279       input_to_shortpath="${new_path}.cmd"
18280    else
18281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18282$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18285      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18286    fi
18287  else
18288    input_to_shortpath="$new_path"
18289  fi
18290
18291  # Call helper function which possibly converts this using DOS-style short mode.
18292  # If so, the updated path is stored in $new_path.
18293  new_path="$input_to_shortpath"
18294
18295  input_path="$input_to_shortpath"
18296  # Check if we need to convert this using DOS-style short mode. If the path
18297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18298  # take no chances and rewrite it.
18299  # Note: m4 eats our [], so we need to use [ and ] instead.
18300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18301  if test "x$has_forbidden_chars" != x; then
18302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18306      # Going to short mode and back again did indeed matter. Since short mode is
18307      # case insensitive, let's make it lowercase to improve readability.
18308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18309      # Now convert it back to Unix-stile (cygpath)
18310      input_path=`$CYGPATH -u "$shortmode_path"`
18311      new_path="$input_path"
18312    fi
18313  fi
18314
18315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18316  if test "x$test_cygdrive_prefix" = x; then
18317    # As a simple fix, exclude /usr/bin since it's not a real path.
18318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18320      # a path prefixed by /cygdrive for fixpath to work.
18321      new_path="$CYGWIN_ROOT_PATH$input_path"
18322    fi
18323  fi
18324
18325  # remove trailing .exe if any
18326  new_path="${new_path/%.exe/}"
18327
18328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18329
18330  # First separate the path from the arguments. This will split at the first
18331  # space.
18332  complete="$BUILD_LD"
18333  path="${complete%% *}"
18334  tmp="$complete EOL"
18335  arguments="${tmp#* }"
18336
18337  # Input might be given as Windows format, start by converting to
18338  # unix format.
18339  new_path="$path"
18340
18341  windows_path="$new_path"
18342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18343    unix_path=`$CYGPATH -u "$windows_path"`
18344    new_path="$unix_path"
18345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18347    new_path="$unix_path"
18348  fi
18349
18350
18351  # Now try to locate executable using which
18352  new_path=`$WHICH "$new_path" 2> /dev/null`
18353
18354  if test "x$new_path" = x; then
18355    # Oops. Which didn't find the executable.
18356    # The splitting of arguments from the executable at a space might have been incorrect,
18357    # since paths with space are more likely in Windows. Give it another try with the whole
18358    # argument.
18359    path="$complete"
18360    arguments="EOL"
18361    new_path="$path"
18362
18363  windows_path="$new_path"
18364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365    unix_path=`$CYGPATH -u "$windows_path"`
18366    new_path="$unix_path"
18367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18369    new_path="$unix_path"
18370  fi
18371
18372
18373    new_path=`$WHICH "$new_path" 2> /dev/null`
18374
18375    if test "x$new_path" = x; then
18376      # It's still not found. Now this is an unrecoverable error.
18377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18378$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18379      has_space=`$ECHO "$complete" | $GREP " "`
18380      if test "x$has_space" != x; then
18381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18383      fi
18384      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18385    fi
18386  fi
18387
18388  # Now new_path has a complete unix path to the binary
18389  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18390    # Keep paths in /bin as-is, but remove trailing .exe if any
18391    new_path="${new_path/%.exe/}"
18392    # Do not save /bin paths to all_fixpath_prefixes!
18393  else
18394    # Not in mixed or Windows style, start by that.
18395    new_path=`cmd //c echo $new_path`
18396
18397  input_path="$new_path"
18398  # Check if we need to convert this using DOS-style short mode. If the path
18399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18400  # take no chances and rewrite it.
18401  # Note: m4 eats our [], so we need to use [ and ] instead.
18402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18403  if test "x$has_forbidden_chars" != x; then
18404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18406  fi
18407
18408    # Output is in $new_path
18409
18410  windows_path="$new_path"
18411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18412    unix_path=`$CYGPATH -u "$windows_path"`
18413    new_path="$unix_path"
18414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18416    new_path="$unix_path"
18417  fi
18418
18419    # remove trailing .exe if any
18420    new_path="${new_path/%.exe/}"
18421
18422    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18423    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18424  fi
18425
18426  else
18427    # We're on a posix platform. Hooray! :)
18428    # First separate the path from the arguments. This will split at the first
18429    # space.
18430    complete="$BUILD_LD"
18431    path="${complete%% *}"
18432    tmp="$complete EOL"
18433    arguments="${tmp#* }"
18434
18435    # Cannot rely on the command "which" here since it doesn't always work.
18436    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18437    if test -z "$is_absolute_path"; then
18438      # Path to executable is not absolute. Find it.
18439      IFS_save="$IFS"
18440      IFS=:
18441      for p in $PATH; do
18442        if test -f "$p/$path" && test -x "$p/$path"; then
18443          new_path="$p/$path"
18444          break
18445        fi
18446      done
18447      IFS="$IFS_save"
18448    else
18449      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18450$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18451      new_path="$path"
18452    fi
18453
18454    if test "x$new_path" = x; then
18455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18456$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18457        has_space=`$ECHO "$complete" | $GREP " "`
18458        if test "x$has_space" != x; then
18459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18461        fi
18462        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18463      fi
18464  fi
18465
18466      # Now join together the path and the arguments once again
18467      if test "x$arguments" != xEOL; then
18468        new_complete="$new_path ${arguments% *}"
18469      else
18470        new_complete="$new_path"
18471      fi
18472
18473  if test "x$complete" != "x$new_complete"; then
18474      BUILD_LD="$new_complete"
18475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18476$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18477    fi
18478
18479fi
18480
18481
18482
18483
18484# If a devkit is found on the builddeps server, then prepend its path to the
18485# PATH variable. If there are cross compilers available in the devkit, these
18486# will be found by AC_PROG_CC et al.
18487DEVKIT=
18488
18489
18490    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18491        # Source the builddeps file again, to make sure it uses the latest variables!
18492        . $builddepsfile
18493        # Look for a target and build machine specific resource!
18494        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18495        if test "x$resource" = x; then
18496            # Ok, lets instead look for a target specific resource
18497            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18498        fi
18499        if test "x$resource" = x; then
18500            # Ok, lets instead look for a build specific resource
18501            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18502        fi
18503        if test "x$resource" = x; then
18504            # Ok, lets instead look for a generic resource
18505            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18506            resource=${builddep_devkit}
18507        fi
18508        if test "x$resource" != x; then
18509            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18510$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18511	    # If the resource in the builddeps.conf file is an existing directory,
18512	    # for example /java/linux/cups
18513	    if test -d ${resource}; then
18514	       depdir=${resource}
18515	    else
18516
18517# devkit is for example mymodule
18518# $resource is for example libs/general/libmymod_1_2_3.zip
18519# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18520# $with_builddeps_dir is for example /localhome/builddeps
18521# depdir is the name of the variable into which we store the depdir, eg MYMOD
18522# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18523# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18524    filename=`basename $resource`
18525    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18526    filebase=${filename%%.*}
18527    extension=${filename#*.}
18528    installdir=$with_builddeps_dir/$filebase
18529    if test ! -f $installdir/$filename.unpacked; then
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18531$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18532        if test ! -d $installdir; then
18533            mkdir -p $installdir
18534        fi
18535        if test ! -d $installdir; then
18536            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18537        fi
18538        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18539        touch $tmpfile
18540        if test ! -f $tmpfile; then
18541            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18542        fi
18543
18544    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18545    # $tmpfile is the local file name for the downloaded file.
18546    VALID_TOOL=no
18547    if test "x$BDEPS_FTP" = xwget; then
18548       VALID_TOOL=yes
18549       wget -O $tmpfile $with_builddeps_server/$resource
18550    fi
18551    if test "x$BDEPS_FTP" = xlftp; then
18552       VALID_TOOL=yes
18553       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18554    fi
18555    if test "x$BDEPS_FTP" = xftp; then
18556        VALID_TOOL=yes
18557        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18558        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18559        FTPUSERPWD=${FTPSERVER%%@*}
18560        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18561            FTPUSER=${userpwd%%:*}
18562            FTPPWD=${userpwd#*@}
18563            FTPSERVER=${FTPSERVER#*@}
18564        else
18565            FTPUSER=ftp
18566            FTPPWD=ftp
18567        fi
18568        # the "pass" command does not work on some
18569        # ftp clients (read ftp.exe) but if it works,
18570        # passive mode is better!
18571        (\
18572            echo "user $FTPUSER $FTPPWD"        ;\
18573            echo "pass"                         ;\
18574            echo "bin"                          ;\
18575            echo "get $FTPPATH $tmpfile"              ;\
18576        ) | ftp -in $FTPSERVER
18577    fi
18578    if test "x$VALID_TOOL" != xyes; then
18579       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18580    fi
18581
18582        mv $tmpfile $installdir/$filename
18583        if test ! -s $installdir/$filename; then
18584            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18585        fi
18586        case "$extension" in
18587            zip)  echo "Unzipping $installdir/$filename..."
18588               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18589            ;;
18590            tar.gz) echo "Untaring $installdir/$filename..."
18591               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18592            ;;
18593            tgz) echo "Untaring $installdir/$filename..."
18594               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18595            ;;
18596            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18597            ;;
18598        esac
18599    fi
18600    if test -f $installdir/$filename.unpacked; then
18601        depdir=$installdir
18602    fi
18603
18604	    fi
18605            # Source the builddeps file again, because in the previous command, the depdir
18606            # was updated to point at the current build dependency install directory.
18607            . $builddepsfile
18608            # Now extract variables from the builddeps.conf files.
18609            theroot=${builddep_devkit_ROOT}
18610            thecflags=${builddep_devkit_CFLAGS}
18611            thelibs=${builddep_devkit_LIBS}
18612            if test "x$depdir" = x; then
18613                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18614            fi
18615            DEVKIT=$depdir
18616            if test "x$theroot" != x; then
18617               DEVKIT="$theroot"
18618            fi
18619            if test "x$thecflags" != x; then
18620               DEVKIT_CFLAGS="$thecflags"
18621            fi
18622            if test "x$thelibs" != x; then
18623               DEVKIT_LIBS="$thelibs"
18624            fi
18625            # Found devkit
18626                     PATH="$DEVKIT/bin:$PATH"
18627                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18628                     if test "x$x_includes" = "xNONE"; then
18629                         x_includes="$SYS_ROOT/usr/include/X11"
18630                     fi
18631                     if test "x$x_libraries" = "xNONE"; then
18632                         x_libraries="$SYS_ROOT/usr/lib"
18633                     fi
18634
18635
18636        fi
18637
18638    fi
18639
18640
18641if test "x$SYS_ROOT" != "x/" ; then
18642    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18643    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18644    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18645    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18646    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18647    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18648fi
18649
18650# Store the CFLAGS etal passed to the configure script.
18651ORG_CFLAGS="$CFLAGS"
18652ORG_CXXFLAGS="$CXXFLAGS"
18653ORG_OBJCFLAGS="$OBJCFLAGS"
18654
18655# autoconf magic only relies on PATH, so update it if tools dir is specified
18656OLD_PATH="$PATH"
18657if test "x$TOOLS_DIR" != x; then
18658  PATH=$TOOLS_DIR:$PATH
18659fi
18660
18661
18662### Locate C compiler (CC)
18663
18664# On windows, only cl.exe is supported.
18665# On Solaris, cc is preferred to gcc.
18666# Elsewhere, gcc is preferred to cc.
18667
18668if test "x$CC" != x; then
18669  COMPILER_CHECK_LIST="$CC"
18670elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18671  COMPILER_CHECK_LIST="cl"
18672elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18673  COMPILER_CHECK_LIST="cc gcc"
18674else
18675  COMPILER_CHECK_LIST="gcc cc"
18676fi
18677
18678
18679  COMPILER_NAME=C
18680
18681  CC=
18682  # If TOOLS_DIR is set, check for all compiler names in there first
18683  # before checking the rest of the PATH.
18684  if test -n "$TOOLS_DIR"; then
18685    PATH_save="$PATH"
18686    PATH="$TOOLS_DIR"
18687    for ac_prog in $COMPILER_CHECK_LIST
18688do
18689  # Extract the first word of "$ac_prog", so it can be a program name with args.
18690set dummy $ac_prog; ac_word=$2
18691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18692$as_echo_n "checking for $ac_word... " >&6; }
18693if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18694  $as_echo_n "(cached) " >&6
18695else
18696  case $TOOLS_DIR_CC in
18697  [\\/]* | ?:[\\/]*)
18698  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18699  ;;
18700  *)
18701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18702for as_dir in $PATH
18703do
18704  IFS=$as_save_IFS
18705  test -z "$as_dir" && as_dir=.
18706    for ac_exec_ext in '' $ac_executable_extensions; do
18707  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18708    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710    break 2
18711  fi
18712done
18713  done
18714IFS=$as_save_IFS
18715
18716  ;;
18717esac
18718fi
18719TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18720if test -n "$TOOLS_DIR_CC"; then
18721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18722$as_echo "$TOOLS_DIR_CC" >&6; }
18723else
18724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18725$as_echo "no" >&6; }
18726fi
18727
18728
18729  test -n "$TOOLS_DIR_CC" && break
18730done
18731
18732    CC=$TOOLS_DIR_CC
18733    PATH="$PATH_save"
18734  fi
18735
18736  # AC_PATH_PROGS can't be run multiple times with the same variable,
18737  # so create a new name for this run.
18738  if test "x$CC" = x; then
18739    for ac_prog in $COMPILER_CHECK_LIST
18740do
18741  # Extract the first word of "$ac_prog", so it can be a program name with args.
18742set dummy $ac_prog; ac_word=$2
18743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18744$as_echo_n "checking for $ac_word... " >&6; }
18745if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18746  $as_echo_n "(cached) " >&6
18747else
18748  case $POTENTIAL_CC in
18749  [\\/]* | ?:[\\/]*)
18750  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18751  ;;
18752  *)
18753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18754for as_dir in $PATH
18755do
18756  IFS=$as_save_IFS
18757  test -z "$as_dir" && as_dir=.
18758    for ac_exec_ext in '' $ac_executable_extensions; do
18759  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18760    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18762    break 2
18763  fi
18764done
18765  done
18766IFS=$as_save_IFS
18767
18768  ;;
18769esac
18770fi
18771POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18772if test -n "$POTENTIAL_CC"; then
18773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18774$as_echo "$POTENTIAL_CC" >&6; }
18775else
18776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18777$as_echo "no" >&6; }
18778fi
18779
18780
18781  test -n "$POTENTIAL_CC" && break
18782done
18783
18784    CC=$POTENTIAL_CC
18785  fi
18786
18787  if test "x$CC" = x; then
18788
18789    # Print a helpful message on how to acquire the necessary build dependency.
18790    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18791    MISSING_DEPENDENCY=devkit
18792    PKGHANDLER_COMMAND=
18793
18794    case $PKGHANDLER in
18795	apt-get)
18796                apt_help     $MISSING_DEPENDENCY ;;
18797    yum)
18798                yum_help     $MISSING_DEPENDENCY ;;
18799	port)
18800                port_help    $MISSING_DEPENDENCY ;;
18801	pkgutil)
18802                pkgutil_help $MISSING_DEPENDENCY ;;
18803	pkgadd)
18804                pkgadd_help  $MISSING_DEPENDENCY ;;
18805    * )
18806      break ;;
18807    esac
18808
18809    if test "x$PKGHANDLER_COMMAND" != x; then
18810        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18811    fi
18812
18813      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18814  fi
18815
18816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18817
18818  # First separate the path from the arguments. This will split at the first
18819  # space.
18820  complete="$CC"
18821  path="${complete%% *}"
18822  tmp="$complete EOL"
18823  arguments="${tmp#* }"
18824
18825  # Input might be given as Windows format, start by converting to
18826  # unix format.
18827  new_path=`$CYGPATH -u "$path"`
18828
18829  # Now try to locate executable using which
18830  new_path=`$WHICH "$new_path" 2> /dev/null`
18831  # bat and cmd files are not always considered executable in cygwin causing which
18832  # to not find them
18833  if test "x$new_path" = x \
18834           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18835           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18836    new_path=`$CYGPATH -u "$path"`
18837  fi
18838  if test "x$new_path" = x; then
18839    # Oops. Which didn't find the executable.
18840    # The splitting of arguments from the executable at a space might have been incorrect,
18841    # since paths with space are more likely in Windows. Give it another try with the whole
18842    # argument.
18843    path="$complete"
18844    arguments="EOL"
18845    new_path=`$CYGPATH -u "$path"`
18846    new_path=`$WHICH "$new_path" 2> /dev/null`
18847    # bat and cmd files are not always considered executable in cygwin causing which
18848    # to not find them
18849    if test "x$new_path" = x \
18850             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18851             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18852      new_path=`$CYGPATH -u "$path"`
18853    fi
18854    if test "x$new_path" = x; then
18855      # It's still not found. Now this is an unrecoverable error.
18856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18857$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18858      has_space=`$ECHO "$complete" | $GREP " "`
18859      if test "x$has_space" != x; then
18860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18862      fi
18863      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18864    fi
18865  fi
18866
18867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18870  # "foo.exe" is OK but "foo" is an error.
18871  #
18872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18873  # It is also a way to make sure we got the proper file name for the real test later on.
18874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18875  if test "x$test_shortpath" = x; then
18876    # Short path failed, file does not exist as specified.
18877    # Try adding .exe or .cmd
18878    if test -f "${new_path}.exe"; then
18879       input_to_shortpath="${new_path}.exe"
18880    elif test -f "${new_path}.cmd"; then
18881       input_to_shortpath="${new_path}.cmd"
18882    else
18883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18884$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18887      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18888    fi
18889  else
18890    input_to_shortpath="$new_path"
18891  fi
18892
18893  # Call helper function which possibly converts this using DOS-style short mode.
18894  # If so, the updated path is stored in $new_path.
18895  new_path="$input_to_shortpath"
18896
18897  input_path="$input_to_shortpath"
18898  # Check if we need to convert this using DOS-style short mode. If the path
18899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18900  # take no chances and rewrite it.
18901  # Note: m4 eats our [], so we need to use [ and ] instead.
18902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18903  if test "x$has_forbidden_chars" != x; then
18904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18908      # Going to short mode and back again did indeed matter. Since short mode is
18909      # case insensitive, let's make it lowercase to improve readability.
18910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18911      # Now convert it back to Unix-stile (cygpath)
18912      input_path=`$CYGPATH -u "$shortmode_path"`
18913      new_path="$input_path"
18914    fi
18915  fi
18916
18917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18918  if test "x$test_cygdrive_prefix" = x; then
18919    # As a simple fix, exclude /usr/bin since it's not a real path.
18920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18922      # a path prefixed by /cygdrive for fixpath to work.
18923      new_path="$CYGWIN_ROOT_PATH$input_path"
18924    fi
18925  fi
18926
18927  # remove trailing .exe if any
18928  new_path="${new_path/%.exe/}"
18929
18930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18931
18932  # First separate the path from the arguments. This will split at the first
18933  # space.
18934  complete="$CC"
18935  path="${complete%% *}"
18936  tmp="$complete EOL"
18937  arguments="${tmp#* }"
18938
18939  # Input might be given as Windows format, start by converting to
18940  # unix format.
18941  new_path="$path"
18942
18943  windows_path="$new_path"
18944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18945    unix_path=`$CYGPATH -u "$windows_path"`
18946    new_path="$unix_path"
18947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18949    new_path="$unix_path"
18950  fi
18951
18952
18953  # Now try to locate executable using which
18954  new_path=`$WHICH "$new_path" 2> /dev/null`
18955
18956  if test "x$new_path" = x; then
18957    # Oops. Which didn't find the executable.
18958    # The splitting of arguments from the executable at a space might have been incorrect,
18959    # since paths with space are more likely in Windows. Give it another try with the whole
18960    # argument.
18961    path="$complete"
18962    arguments="EOL"
18963    new_path="$path"
18964
18965  windows_path="$new_path"
18966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18967    unix_path=`$CYGPATH -u "$windows_path"`
18968    new_path="$unix_path"
18969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18971    new_path="$unix_path"
18972  fi
18973
18974
18975    new_path=`$WHICH "$new_path" 2> /dev/null`
18976
18977    if test "x$new_path" = x; then
18978      # It's still not found. Now this is an unrecoverable error.
18979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18980$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18981      has_space=`$ECHO "$complete" | $GREP " "`
18982      if test "x$has_space" != x; then
18983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18985      fi
18986      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18987    fi
18988  fi
18989
18990  # Now new_path has a complete unix path to the binary
18991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18992    # Keep paths in /bin as-is, but remove trailing .exe if any
18993    new_path="${new_path/%.exe/}"
18994    # Do not save /bin paths to all_fixpath_prefixes!
18995  else
18996    # Not in mixed or Windows style, start by that.
18997    new_path=`cmd //c echo $new_path`
18998
18999  input_path="$new_path"
19000  # Check if we need to convert this using DOS-style short mode. If the path
19001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19002  # take no chances and rewrite it.
19003  # Note: m4 eats our [], so we need to use [ and ] instead.
19004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19005  if test "x$has_forbidden_chars" != x; then
19006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19008  fi
19009
19010    # Output is in $new_path
19011
19012  windows_path="$new_path"
19013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19014    unix_path=`$CYGPATH -u "$windows_path"`
19015    new_path="$unix_path"
19016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19018    new_path="$unix_path"
19019  fi
19020
19021    # remove trailing .exe if any
19022    new_path="${new_path/%.exe/}"
19023
19024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19026  fi
19027
19028  else
19029    # We're on a posix platform. Hooray! :)
19030    # First separate the path from the arguments. This will split at the first
19031    # space.
19032    complete="$CC"
19033    path="${complete%% *}"
19034    tmp="$complete EOL"
19035    arguments="${tmp#* }"
19036
19037    # Cannot rely on the command "which" here since it doesn't always work.
19038    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19039    if test -z "$is_absolute_path"; then
19040      # Path to executable is not absolute. Find it.
19041      IFS_save="$IFS"
19042      IFS=:
19043      for p in $PATH; do
19044        if test -f "$p/$path" && test -x "$p/$path"; then
19045          new_path="$p/$path"
19046          break
19047        fi
19048      done
19049      IFS="$IFS_save"
19050    else
19051      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19052$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19053      new_path="$path"
19054    fi
19055
19056    if test "x$new_path" = x; then
19057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19058$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19059        has_space=`$ECHO "$complete" | $GREP " "`
19060        if test "x$has_space" != x; then
19061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19063        fi
19064        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19065      fi
19066  fi
19067
19068      # Now join together the path and the arguments once again
19069      if test "x$arguments" != xEOL; then
19070        new_complete="$new_path ${arguments% *}"
19071      else
19072        new_complete="$new_path"
19073      fi
19074
19075  if test "x$complete" != "x$new_complete"; then
19076      CC="$new_complete"
19077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19078$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19079    fi
19080
19081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19082$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19083  TEST_COMPILER="$CC"
19084
19085    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19086        # Follow a chain of symbolic links. Use readlink
19087        # where it exists, else fall back to horribly
19088        # complicated shell code.
19089        if test "x$READLINK_TESTED" != yes; then
19090            # On MacOSX there is a readlink tool with a different
19091            # purpose than the GNU readlink tool. Check the found readlink.
19092            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19093            if test "x$ISGNU" = x; then
19094                 # A readlink that we do not know how to use.
19095                 # Are there other non-GNU readlinks out there?
19096                 READLINK_TESTED=yes
19097                 READLINK=
19098            fi
19099        fi
19100
19101        if test "x$READLINK" != x; then
19102            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19103        else
19104            # Save the current directory for restoring afterwards
19105            STARTDIR=$PWD
19106            COUNTER=0
19107            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19108            sym_link_file=`$BASENAME $TEST_COMPILER`
19109            # Use the system pwd and not the shell builtin to resolve directory symlinks
19110            cd $sym_link_dir
19111            cd `$THEPWDCMD`
19112            sym_link_dir=`$THEPWDCMD`
19113            # Resolve file symlinks
19114            while test $COUNTER -lt 20; do
19115                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19116                if test "x$ISLINK" == x; then
19117                    # This is not a symbolic link! We are done!
19118                    break
19119                fi
19120                # Again resolve directory symlinks since the target of the just found
19121                # link could be in a different directory
19122                cd `$DIRNAME $ISLINK`
19123                sym_link_dir=`$THEPWDCMD`
19124                sym_link_file=`$BASENAME $ISLINK`
19125                let COUNTER=COUNTER+1
19126            done
19127            cd $STARTDIR
19128            TEST_COMPILER=$sym_link_dir/$sym_link_file
19129        fi
19130    fi
19131
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19133$as_echo "$TEST_COMPILER" >&6; }
19134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19135$as_echo_n "checking if CC is disguised ccache... " >&6; }
19136
19137  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19138  if test "x$COMPILER_BASENAME" = "xccache"; then
19139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19140$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19141    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19142    # We want to control ccache invocation ourselves, so ignore this cc and try
19143    # searching again.
19144
19145    # Remove the path to the fake ccache cc from the PATH
19146    RETRY_COMPILER_SAVED_PATH="$PATH"
19147    COMPILER_DIRNAME=`$DIRNAME $CC`
19148    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19149
19150    # Try again looking for our compiler
19151    if test -n "$ac_tool_prefix"; then
19152  for ac_prog in $COMPILER_CHECK_LIST
19153  do
19154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19157$as_echo_n "checking for $ac_word... " >&6; }
19158if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19159  $as_echo_n "(cached) " >&6
19160else
19161  if test -n "$PROPER_COMPILER_CC"; then
19162  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19163else
19164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19165for as_dir in $PATH
19166do
19167  IFS=$as_save_IFS
19168  test -z "$as_dir" && as_dir=.
19169    for ac_exec_ext in '' $ac_executable_extensions; do
19170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19171    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19173    break 2
19174  fi
19175done
19176  done
19177IFS=$as_save_IFS
19178
19179fi
19180fi
19181PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19182if test -n "$PROPER_COMPILER_CC"; then
19183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19184$as_echo "$PROPER_COMPILER_CC" >&6; }
19185else
19186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19187$as_echo "no" >&6; }
19188fi
19189
19190
19191    test -n "$PROPER_COMPILER_CC" && break
19192  done
19193fi
19194if test -z "$PROPER_COMPILER_CC"; then
19195  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19196  for ac_prog in $COMPILER_CHECK_LIST
19197do
19198  # Extract the first word of "$ac_prog", so it can be a program name with args.
19199set dummy $ac_prog; ac_word=$2
19200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19201$as_echo_n "checking for $ac_word... " >&6; }
19202if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19203  $as_echo_n "(cached) " >&6
19204else
19205  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19206  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19207else
19208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19209for as_dir in $PATH
19210do
19211  IFS=$as_save_IFS
19212  test -z "$as_dir" && as_dir=.
19213    for ac_exec_ext in '' $ac_executable_extensions; do
19214  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19215    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19217    break 2
19218  fi
19219done
19220  done
19221IFS=$as_save_IFS
19222
19223fi
19224fi
19225ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19226if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19228$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19229else
19230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19231$as_echo "no" >&6; }
19232fi
19233
19234
19235  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19236done
19237
19238  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19239    PROPER_COMPILER_CC=""
19240  else
19241    case $cross_compiling:$ac_tool_warned in
19242yes:)
19243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19245ac_tool_warned=yes ;;
19246esac
19247    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19248  fi
19249fi
19250
19251
19252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19253
19254  # First separate the path from the arguments. This will split at the first
19255  # space.
19256  complete="$PROPER_COMPILER_CC"
19257  path="${complete%% *}"
19258  tmp="$complete EOL"
19259  arguments="${tmp#* }"
19260
19261  # Input might be given as Windows format, start by converting to
19262  # unix format.
19263  new_path=`$CYGPATH -u "$path"`
19264
19265  # Now try to locate executable using which
19266  new_path=`$WHICH "$new_path" 2> /dev/null`
19267  # bat and cmd files are not always considered executable in cygwin causing which
19268  # to not find them
19269  if test "x$new_path" = x \
19270           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19271           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19272    new_path=`$CYGPATH -u "$path"`
19273  fi
19274  if test "x$new_path" = x; then
19275    # Oops. Which didn't find the executable.
19276    # The splitting of arguments from the executable at a space might have been incorrect,
19277    # since paths with space are more likely in Windows. Give it another try with the whole
19278    # argument.
19279    path="$complete"
19280    arguments="EOL"
19281    new_path=`$CYGPATH -u "$path"`
19282    new_path=`$WHICH "$new_path" 2> /dev/null`
19283    # bat and cmd files are not always considered executable in cygwin causing which
19284    # to not find them
19285    if test "x$new_path" = x \
19286             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19287             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19288      new_path=`$CYGPATH -u "$path"`
19289    fi
19290    if test "x$new_path" = x; then
19291      # It's still not found. Now this is an unrecoverable error.
19292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19293$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19294      has_space=`$ECHO "$complete" | $GREP " "`
19295      if test "x$has_space" != x; then
19296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19298      fi
19299      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19300    fi
19301  fi
19302
19303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19306  # "foo.exe" is OK but "foo" is an error.
19307  #
19308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19309  # It is also a way to make sure we got the proper file name for the real test later on.
19310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19311  if test "x$test_shortpath" = x; then
19312    # Short path failed, file does not exist as specified.
19313    # Try adding .exe or .cmd
19314    if test -f "${new_path}.exe"; then
19315       input_to_shortpath="${new_path}.exe"
19316    elif test -f "${new_path}.cmd"; then
19317       input_to_shortpath="${new_path}.cmd"
19318    else
19319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19320$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19323      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19324    fi
19325  else
19326    input_to_shortpath="$new_path"
19327  fi
19328
19329  # Call helper function which possibly converts this using DOS-style short mode.
19330  # If so, the updated path is stored in $new_path.
19331  new_path="$input_to_shortpath"
19332
19333  input_path="$input_to_shortpath"
19334  # Check if we need to convert this using DOS-style short mode. If the path
19335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19336  # take no chances and rewrite it.
19337  # Note: m4 eats our [], so we need to use [ and ] instead.
19338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19339  if test "x$has_forbidden_chars" != x; then
19340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19344      # Going to short mode and back again did indeed matter. Since short mode is
19345      # case insensitive, let's make it lowercase to improve readability.
19346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19347      # Now convert it back to Unix-stile (cygpath)
19348      input_path=`$CYGPATH -u "$shortmode_path"`
19349      new_path="$input_path"
19350    fi
19351  fi
19352
19353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19354  if test "x$test_cygdrive_prefix" = x; then
19355    # As a simple fix, exclude /usr/bin since it's not a real path.
19356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19358      # a path prefixed by /cygdrive for fixpath to work.
19359      new_path="$CYGWIN_ROOT_PATH$input_path"
19360    fi
19361  fi
19362
19363  # remove trailing .exe if any
19364  new_path="${new_path/%.exe/}"
19365
19366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19367
19368  # First separate the path from the arguments. This will split at the first
19369  # space.
19370  complete="$PROPER_COMPILER_CC"
19371  path="${complete%% *}"
19372  tmp="$complete EOL"
19373  arguments="${tmp#* }"
19374
19375  # Input might be given as Windows format, start by converting to
19376  # unix format.
19377  new_path="$path"
19378
19379  windows_path="$new_path"
19380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19381    unix_path=`$CYGPATH -u "$windows_path"`
19382    new_path="$unix_path"
19383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19385    new_path="$unix_path"
19386  fi
19387
19388
19389  # Now try to locate executable using which
19390  new_path=`$WHICH "$new_path" 2> /dev/null`
19391
19392  if test "x$new_path" = x; then
19393    # Oops. Which didn't find the executable.
19394    # The splitting of arguments from the executable at a space might have been incorrect,
19395    # since paths with space are more likely in Windows. Give it another try with the whole
19396    # argument.
19397    path="$complete"
19398    arguments="EOL"
19399    new_path="$path"
19400
19401  windows_path="$new_path"
19402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19403    unix_path=`$CYGPATH -u "$windows_path"`
19404    new_path="$unix_path"
19405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19407    new_path="$unix_path"
19408  fi
19409
19410
19411    new_path=`$WHICH "$new_path" 2> /dev/null`
19412
19413    if test "x$new_path" = x; then
19414      # It's still not found. Now this is an unrecoverable error.
19415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19416$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19417      has_space=`$ECHO "$complete" | $GREP " "`
19418      if test "x$has_space" != x; then
19419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19421      fi
19422      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19423    fi
19424  fi
19425
19426  # Now new_path has a complete unix path to the binary
19427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19428    # Keep paths in /bin as-is, but remove trailing .exe if any
19429    new_path="${new_path/%.exe/}"
19430    # Do not save /bin paths to all_fixpath_prefixes!
19431  else
19432    # Not in mixed or Windows style, start by that.
19433    new_path=`cmd //c echo $new_path`
19434
19435  input_path="$new_path"
19436  # Check if we need to convert this using DOS-style short mode. If the path
19437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19438  # take no chances and rewrite it.
19439  # Note: m4 eats our [], so we need to use [ and ] instead.
19440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19441  if test "x$has_forbidden_chars" != x; then
19442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19444  fi
19445
19446    # Output is in $new_path
19447
19448  windows_path="$new_path"
19449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19450    unix_path=`$CYGPATH -u "$windows_path"`
19451    new_path="$unix_path"
19452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19454    new_path="$unix_path"
19455  fi
19456
19457    # remove trailing .exe if any
19458    new_path="${new_path/%.exe/}"
19459
19460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19462  fi
19463
19464  else
19465    # We're on a posix platform. Hooray! :)
19466    # First separate the path from the arguments. This will split at the first
19467    # space.
19468    complete="$PROPER_COMPILER_CC"
19469    path="${complete%% *}"
19470    tmp="$complete EOL"
19471    arguments="${tmp#* }"
19472
19473    # Cannot rely on the command "which" here since it doesn't always work.
19474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19475    if test -z "$is_absolute_path"; then
19476      # Path to executable is not absolute. Find it.
19477      IFS_save="$IFS"
19478      IFS=:
19479      for p in $PATH; do
19480        if test -f "$p/$path" && test -x "$p/$path"; then
19481          new_path="$p/$path"
19482          break
19483        fi
19484      done
19485      IFS="$IFS_save"
19486    else
19487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19488$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19489      new_path="$path"
19490    fi
19491
19492    if test "x$new_path" = x; then
19493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19494$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19495        has_space=`$ECHO "$complete" | $GREP " "`
19496        if test "x$has_space" != x; then
19497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19499        fi
19500        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19501      fi
19502  fi
19503
19504      # Now join together the path and the arguments once again
19505      if test "x$arguments" != xEOL; then
19506        new_complete="$new_path ${arguments% *}"
19507      else
19508        new_complete="$new_path"
19509      fi
19510
19511  if test "x$complete" != "x$new_complete"; then
19512      PROPER_COMPILER_CC="$new_complete"
19513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19514$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19515    fi
19516
19517    PATH="$RETRY_COMPILER_SAVED_PATH"
19518
19519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19520$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19521
19522    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19523        # Follow a chain of symbolic links. Use readlink
19524        # where it exists, else fall back to horribly
19525        # complicated shell code.
19526        if test "x$READLINK_TESTED" != yes; then
19527            # On MacOSX there is a readlink tool with a different
19528            # purpose than the GNU readlink tool. Check the found readlink.
19529            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19530            if test "x$ISGNU" = x; then
19531                 # A readlink that we do not know how to use.
19532                 # Are there other non-GNU readlinks out there?
19533                 READLINK_TESTED=yes
19534                 READLINK=
19535            fi
19536        fi
19537
19538        if test "x$READLINK" != x; then
19539            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19540        else
19541            # Save the current directory for restoring afterwards
19542            STARTDIR=$PWD
19543            COUNTER=0
19544            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19545            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19546            # Use the system pwd and not the shell builtin to resolve directory symlinks
19547            cd $sym_link_dir
19548            cd `$THEPWDCMD`
19549            sym_link_dir=`$THEPWDCMD`
19550            # Resolve file symlinks
19551            while test $COUNTER -lt 20; do
19552                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19553                if test "x$ISLINK" == x; then
19554                    # This is not a symbolic link! We are done!
19555                    break
19556                fi
19557                # Again resolve directory symlinks since the target of the just found
19558                # link could be in a different directory
19559                cd `$DIRNAME $ISLINK`
19560                sym_link_dir=`$THEPWDCMD`
19561                sym_link_file=`$BASENAME $ISLINK`
19562                let COUNTER=COUNTER+1
19563            done
19564            cd $STARTDIR
19565            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19566        fi
19567    fi
19568
19569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19570$as_echo "$PROPER_COMPILER_CC" >&6; }
19571    CC="$PROPER_COMPILER_CC"
19572  else
19573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19574$as_echo "no, keeping CC" >&6; }
19575    CC="$TEST_COMPILER"
19576  fi
19577
19578  COMPILER=$CC
19579  COMPILER_NAME=$COMPILER_NAME
19580
19581  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19582    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19583    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19584    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19585    if test $? -ne 0; then
19586      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19587
19588      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
19589$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19590      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19591$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19592      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19593    else
19594      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19595      COMPILER_VENDOR="Sun Studio"
19596    fi
19597  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19598    # First line typically looks something like:
19599    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19600    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19601    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19602    COMPILER_VENDOR="Microsoft CL.EXE"
19603    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19604    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19605      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19606        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19607      fi
19608    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19609      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19610        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19611      fi
19612    fi
19613  else
19614    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19615    # Check that this is likely to be GCC.
19616    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19617    if test $? -ne 0; then
19618      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19619$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19620      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19621$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19622      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19623    fi
19624
19625    # First line typically looks something like:
19626    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19627    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19628    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19629  fi
19630  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19631  CC_VERSION="$COMPILER_VERSION"
19632  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19633  CC_VENDOR="$COMPILER_VENDOR"
19634
19635  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19636$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19637
19638
19639# Now that we have resolved CC ourself, let autoconf have its go at it
19640ac_ext=c
19641ac_cpp='$CPP $CPPFLAGS'
19642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19644ac_compiler_gnu=$ac_cv_c_compiler_gnu
19645if test -n "$ac_tool_prefix"; then
19646  for ac_prog in $CC
19647  do
19648    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19649set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19651$as_echo_n "checking for $ac_word... " >&6; }
19652if test "${ac_cv_prog_CC+set}" = set; then :
19653  $as_echo_n "(cached) " >&6
19654else
19655  if test -n "$CC"; then
19656  ac_cv_prog_CC="$CC" # Let the user override the test.
19657else
19658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19659for as_dir in $PATH
19660do
19661  IFS=$as_save_IFS
19662  test -z "$as_dir" && as_dir=.
19663    for ac_exec_ext in '' $ac_executable_extensions; do
19664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19665    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19667    break 2
19668  fi
19669done
19670  done
19671IFS=$as_save_IFS
19672
19673fi
19674fi
19675CC=$ac_cv_prog_CC
19676if test -n "$CC"; then
19677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19678$as_echo "$CC" >&6; }
19679else
19680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19681$as_echo "no" >&6; }
19682fi
19683
19684
19685    test -n "$CC" && break
19686  done
19687fi
19688if test -z "$CC"; then
19689  ac_ct_CC=$CC
19690  for ac_prog in $CC
19691do
19692  # Extract the first word of "$ac_prog", so it can be a program name with args.
19693set dummy $ac_prog; ac_word=$2
19694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19695$as_echo_n "checking for $ac_word... " >&6; }
19696if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19697  $as_echo_n "(cached) " >&6
19698else
19699  if test -n "$ac_ct_CC"; then
19700  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19701else
19702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19703for as_dir in $PATH
19704do
19705  IFS=$as_save_IFS
19706  test -z "$as_dir" && as_dir=.
19707    for ac_exec_ext in '' $ac_executable_extensions; do
19708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19709    ac_cv_prog_ac_ct_CC="$ac_prog"
19710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19711    break 2
19712  fi
19713done
19714  done
19715IFS=$as_save_IFS
19716
19717fi
19718fi
19719ac_ct_CC=$ac_cv_prog_ac_ct_CC
19720if test -n "$ac_ct_CC"; then
19721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19722$as_echo "$ac_ct_CC" >&6; }
19723else
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19725$as_echo "no" >&6; }
19726fi
19727
19728
19729  test -n "$ac_ct_CC" && break
19730done
19731
19732  if test "x$ac_ct_CC" = x; then
19733    CC=""
19734  else
19735    case $cross_compiling:$ac_tool_warned in
19736yes:)
19737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19739ac_tool_warned=yes ;;
19740esac
19741    CC=$ac_ct_CC
19742  fi
19743fi
19744
19745
19746test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19748as_fn_error $? "no acceptable C compiler found in \$PATH
19749See \`config.log' for more details" "$LINENO" 5 ; }
19750
19751# Provide some information about the compiler.
19752$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19753set X $ac_compile
19754ac_compiler=$2
19755for ac_option in --version -v -V -qversion; do
19756  { { ac_try="$ac_compiler $ac_option >&5"
19757case "(($ac_try" in
19758  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19759  *) ac_try_echo=$ac_try;;
19760esac
19761eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19762$as_echo "$ac_try_echo"; } >&5
19763  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19764  ac_status=$?
19765  if test -s conftest.err; then
19766    sed '10a\
19767... rest of stderr output deleted ...
19768         10q' conftest.err >conftest.er1
19769    cat conftest.er1 >&5
19770  fi
19771  rm -f conftest.er1 conftest.err
19772  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19773  test $ac_status = 0; }
19774done
19775
19776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19777/* end confdefs.h.  */
19778
19779int
19780main ()
19781{
19782
19783  ;
19784  return 0;
19785}
19786_ACEOF
19787ac_clean_files_save=$ac_clean_files
19788ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19789# Try to create an executable without -o first, disregard a.out.
19790# It will help us diagnose broken compilers, and finding out an intuition
19791# of exeext.
19792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19793$as_echo_n "checking whether the C compiler works... " >&6; }
19794ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19795
19796# The possible output files:
19797ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19798
19799ac_rmfiles=
19800for ac_file in $ac_files
19801do
19802  case $ac_file in
19803    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19804    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19805  esac
19806done
19807rm -f $ac_rmfiles
19808
19809if { { ac_try="$ac_link_default"
19810case "(($ac_try" in
19811  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19812  *) ac_try_echo=$ac_try;;
19813esac
19814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19815$as_echo "$ac_try_echo"; } >&5
19816  (eval "$ac_link_default") 2>&5
19817  ac_status=$?
19818  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19819  test $ac_status = 0; }; then :
19820  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19821# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19822# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19823# so that the user can short-circuit this test for compilers unknown to
19824# Autoconf.
19825for ac_file in $ac_files ''
19826do
19827  test -f "$ac_file" || continue
19828  case $ac_file in
19829    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19830	;;
19831    [ab].out )
19832	# We found the default executable, but exeext='' is most
19833	# certainly right.
19834	break;;
19835    *.* )
19836	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19837	then :; else
19838	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19839	fi
19840	# We set ac_cv_exeext here because the later test for it is not
19841	# safe: cross compilers may not add the suffix if given an `-o'
19842	# argument, so we may need to know it at that point already.
19843	# Even if this section looks crufty: it has the advantage of
19844	# actually working.
19845	break;;
19846    * )
19847	break;;
19848  esac
19849done
19850test "$ac_cv_exeext" = no && ac_cv_exeext=
19851
19852else
19853  ac_file=''
19854fi
19855if test -z "$ac_file"; then :
19856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19857$as_echo "no" >&6; }
19858$as_echo "$as_me: failed program was:" >&5
19859sed 's/^/| /' conftest.$ac_ext >&5
19860
19861{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19863as_fn_error 77 "C compiler cannot create executables
19864See \`config.log' for more details" "$LINENO" 5 ; }
19865else
19866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19867$as_echo "yes" >&6; }
19868fi
19869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19870$as_echo_n "checking for C compiler default output file name... " >&6; }
19871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19872$as_echo "$ac_file" >&6; }
19873ac_exeext=$ac_cv_exeext
19874
19875rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19876ac_clean_files=$ac_clean_files_save
19877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19878$as_echo_n "checking for suffix of executables... " >&6; }
19879if { { ac_try="$ac_link"
19880case "(($ac_try" in
19881  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19882  *) ac_try_echo=$ac_try;;
19883esac
19884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19885$as_echo "$ac_try_echo"; } >&5
19886  (eval "$ac_link") 2>&5
19887  ac_status=$?
19888  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19889  test $ac_status = 0; }; then :
19890  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19891# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19892# work properly (i.e., refer to `conftest.exe'), while it won't with
19893# `rm'.
19894for ac_file in conftest.exe conftest conftest.*; do
19895  test -f "$ac_file" || continue
19896  case $ac_file in
19897    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19898    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19899	  break;;
19900    * ) break;;
19901  esac
19902done
19903else
19904  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19906as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19907See \`config.log' for more details" "$LINENO" 5 ; }
19908fi
19909rm -f conftest conftest$ac_cv_exeext
19910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19911$as_echo "$ac_cv_exeext" >&6; }
19912
19913rm -f conftest.$ac_ext
19914EXEEXT=$ac_cv_exeext
19915ac_exeext=$EXEEXT
19916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19917/* end confdefs.h.  */
19918#include <stdio.h>
19919int
19920main ()
19921{
19922FILE *f = fopen ("conftest.out", "w");
19923 return ferror (f) || fclose (f) != 0;
19924
19925  ;
19926  return 0;
19927}
19928_ACEOF
19929ac_clean_files="$ac_clean_files conftest.out"
19930# Check that the compiler produces executables we can run.  If not, either
19931# the compiler is broken, or we cross compile.
19932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19933$as_echo_n "checking whether we are cross compiling... " >&6; }
19934if test "$cross_compiling" != yes; then
19935  { { ac_try="$ac_link"
19936case "(($ac_try" in
19937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19938  *) ac_try_echo=$ac_try;;
19939esac
19940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19941$as_echo "$ac_try_echo"; } >&5
19942  (eval "$ac_link") 2>&5
19943  ac_status=$?
19944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19945  test $ac_status = 0; }
19946  if { ac_try='./conftest$ac_cv_exeext'
19947  { { case "(($ac_try" in
19948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19949  *) ac_try_echo=$ac_try;;
19950esac
19951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19952$as_echo "$ac_try_echo"; } >&5
19953  (eval "$ac_try") 2>&5
19954  ac_status=$?
19955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19956  test $ac_status = 0; }; }; then
19957    cross_compiling=no
19958  else
19959    if test "$cross_compiling" = maybe; then
19960	cross_compiling=yes
19961    else
19962	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19964as_fn_error $? "cannot run C compiled programs.
19965If you meant to cross compile, use \`--host'.
19966See \`config.log' for more details" "$LINENO" 5 ; }
19967    fi
19968  fi
19969fi
19970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19971$as_echo "$cross_compiling" >&6; }
19972
19973rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19974ac_clean_files=$ac_clean_files_save
19975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19976$as_echo_n "checking for suffix of object files... " >&6; }
19977if test "${ac_cv_objext+set}" = set; then :
19978  $as_echo_n "(cached) " >&6
19979else
19980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19981/* end confdefs.h.  */
19982
19983int
19984main ()
19985{
19986
19987  ;
19988  return 0;
19989}
19990_ACEOF
19991rm -f conftest.o conftest.obj
19992if { { ac_try="$ac_compile"
19993case "(($ac_try" in
19994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19995  *) ac_try_echo=$ac_try;;
19996esac
19997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19998$as_echo "$ac_try_echo"; } >&5
19999  (eval "$ac_compile") 2>&5
20000  ac_status=$?
20001  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20002  test $ac_status = 0; }; then :
20003  for ac_file in conftest.o conftest.obj conftest.*; do
20004  test -f "$ac_file" || continue;
20005  case $ac_file in
20006    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20007    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20008       break;;
20009  esac
20010done
20011else
20012  $as_echo "$as_me: failed program was:" >&5
20013sed 's/^/| /' conftest.$ac_ext >&5
20014
20015{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20017as_fn_error $? "cannot compute suffix of object files: cannot compile
20018See \`config.log' for more details" "$LINENO" 5 ; }
20019fi
20020rm -f conftest.$ac_cv_objext conftest.$ac_ext
20021fi
20022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20023$as_echo "$ac_cv_objext" >&6; }
20024OBJEXT=$ac_cv_objext
20025ac_objext=$OBJEXT
20026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20027$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20028if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20029  $as_echo_n "(cached) " >&6
20030else
20031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20032/* end confdefs.h.  */
20033
20034int
20035main ()
20036{
20037#ifndef __GNUC__
20038       choke me
20039#endif
20040
20041  ;
20042  return 0;
20043}
20044_ACEOF
20045if ac_fn_c_try_compile "$LINENO"; then :
20046  ac_compiler_gnu=yes
20047else
20048  ac_compiler_gnu=no
20049fi
20050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20051ac_cv_c_compiler_gnu=$ac_compiler_gnu
20052
20053fi
20054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20055$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20056if test $ac_compiler_gnu = yes; then
20057  GCC=yes
20058else
20059  GCC=
20060fi
20061ac_test_CFLAGS=${CFLAGS+set}
20062ac_save_CFLAGS=$CFLAGS
20063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20064$as_echo_n "checking whether $CC accepts -g... " >&6; }
20065if test "${ac_cv_prog_cc_g+set}" = set; then :
20066  $as_echo_n "(cached) " >&6
20067else
20068  ac_save_c_werror_flag=$ac_c_werror_flag
20069   ac_c_werror_flag=yes
20070   ac_cv_prog_cc_g=no
20071   CFLAGS="-g"
20072   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20073/* end confdefs.h.  */
20074
20075int
20076main ()
20077{
20078
20079  ;
20080  return 0;
20081}
20082_ACEOF
20083if ac_fn_c_try_compile "$LINENO"; then :
20084  ac_cv_prog_cc_g=yes
20085else
20086  CFLAGS=""
20087      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20088/* end confdefs.h.  */
20089
20090int
20091main ()
20092{
20093
20094  ;
20095  return 0;
20096}
20097_ACEOF
20098if ac_fn_c_try_compile "$LINENO"; then :
20099
20100else
20101  ac_c_werror_flag=$ac_save_c_werror_flag
20102	 CFLAGS="-g"
20103	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20104/* end confdefs.h.  */
20105
20106int
20107main ()
20108{
20109
20110  ;
20111  return 0;
20112}
20113_ACEOF
20114if ac_fn_c_try_compile "$LINENO"; then :
20115  ac_cv_prog_cc_g=yes
20116fi
20117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20118fi
20119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20120fi
20121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20122   ac_c_werror_flag=$ac_save_c_werror_flag
20123fi
20124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20125$as_echo "$ac_cv_prog_cc_g" >&6; }
20126if test "$ac_test_CFLAGS" = set; then
20127  CFLAGS=$ac_save_CFLAGS
20128elif test $ac_cv_prog_cc_g = yes; then
20129  if test "$GCC" = yes; then
20130    CFLAGS="-g -O2"
20131  else
20132    CFLAGS="-g"
20133  fi
20134else
20135  if test "$GCC" = yes; then
20136    CFLAGS="-O2"
20137  else
20138    CFLAGS=
20139  fi
20140fi
20141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20142$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20143if test "${ac_cv_prog_cc_c89+set}" = set; then :
20144  $as_echo_n "(cached) " >&6
20145else
20146  ac_cv_prog_cc_c89=no
20147ac_save_CC=$CC
20148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20149/* end confdefs.h.  */
20150#include <stdarg.h>
20151#include <stdio.h>
20152#include <sys/types.h>
20153#include <sys/stat.h>
20154/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20155struct buf { int x; };
20156FILE * (*rcsopen) (struct buf *, struct stat *, int);
20157static char *e (p, i)
20158     char **p;
20159     int i;
20160{
20161  return p[i];
20162}
20163static char *f (char * (*g) (char **, int), char **p, ...)
20164{
20165  char *s;
20166  va_list v;
20167  va_start (v,p);
20168  s = g (p, va_arg (v,int));
20169  va_end (v);
20170  return s;
20171}
20172
20173/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20174   function prototypes and stuff, but not '\xHH' hex character constants.
20175   These don't provoke an error unfortunately, instead are silently treated
20176   as 'x'.  The following induces an error, until -std is added to get
20177   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20178   array size at least.  It's necessary to write '\x00'==0 to get something
20179   that's true only with -std.  */
20180int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20181
20182/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20183   inside strings and character constants.  */
20184#define FOO(x) 'x'
20185int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20186
20187int test (int i, double x);
20188struct s1 {int (*f) (int a);};
20189struct s2 {int (*f) (double a);};
20190int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20191int argc;
20192char **argv;
20193int
20194main ()
20195{
20196return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20197  ;
20198  return 0;
20199}
20200_ACEOF
20201for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20202	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20203do
20204  CC="$ac_save_CC $ac_arg"
20205  if ac_fn_c_try_compile "$LINENO"; then :
20206  ac_cv_prog_cc_c89=$ac_arg
20207fi
20208rm -f core conftest.err conftest.$ac_objext
20209  test "x$ac_cv_prog_cc_c89" != "xno" && break
20210done
20211rm -f conftest.$ac_ext
20212CC=$ac_save_CC
20213
20214fi
20215# AC_CACHE_VAL
20216case "x$ac_cv_prog_cc_c89" in
20217  x)
20218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20219$as_echo "none needed" >&6; } ;;
20220  xno)
20221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20222$as_echo "unsupported" >&6; } ;;
20223  *)
20224    CC="$CC $ac_cv_prog_cc_c89"
20225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20226$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20227esac
20228if test "x$ac_cv_prog_cc_c89" != xno; then :
20229
20230fi
20231
20232ac_ext=cpp
20233ac_cpp='$CXXCPP $CPPFLAGS'
20234ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20235ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20236ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20237
20238
20239### Locate C++ compiler (CXX)
20240
20241if test "x$CXX" != x; then
20242  COMPILER_CHECK_LIST="$CXX"
20243elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20244  COMPILER_CHECK_LIST="cl"
20245elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20246  COMPILER_CHECK_LIST="CC g++"
20247else
20248  COMPILER_CHECK_LIST="g++ CC"
20249fi
20250
20251
20252  COMPILER_NAME=C++
20253
20254  CXX=
20255  # If TOOLS_DIR is set, check for all compiler names in there first
20256  # before checking the rest of the PATH.
20257  if test -n "$TOOLS_DIR"; then
20258    PATH_save="$PATH"
20259    PATH="$TOOLS_DIR"
20260    for ac_prog in $COMPILER_CHECK_LIST
20261do
20262  # Extract the first word of "$ac_prog", so it can be a program name with args.
20263set dummy $ac_prog; ac_word=$2
20264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20265$as_echo_n "checking for $ac_word... " >&6; }
20266if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20267  $as_echo_n "(cached) " >&6
20268else
20269  case $TOOLS_DIR_CXX in
20270  [\\/]* | ?:[\\/]*)
20271  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20272  ;;
20273  *)
20274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20275for as_dir in $PATH
20276do
20277  IFS=$as_save_IFS
20278  test -z "$as_dir" && as_dir=.
20279    for ac_exec_ext in '' $ac_executable_extensions; do
20280  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20281    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20283    break 2
20284  fi
20285done
20286  done
20287IFS=$as_save_IFS
20288
20289  ;;
20290esac
20291fi
20292TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20293if test -n "$TOOLS_DIR_CXX"; then
20294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20295$as_echo "$TOOLS_DIR_CXX" >&6; }
20296else
20297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20298$as_echo "no" >&6; }
20299fi
20300
20301
20302  test -n "$TOOLS_DIR_CXX" && break
20303done
20304
20305    CXX=$TOOLS_DIR_CXX
20306    PATH="$PATH_save"
20307  fi
20308
20309  # AC_PATH_PROGS can't be run multiple times with the same variable,
20310  # so create a new name for this run.
20311  if test "x$CXX" = x; then
20312    for ac_prog in $COMPILER_CHECK_LIST
20313do
20314  # Extract the first word of "$ac_prog", so it can be a program name with args.
20315set dummy $ac_prog; ac_word=$2
20316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20317$as_echo_n "checking for $ac_word... " >&6; }
20318if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20319  $as_echo_n "(cached) " >&6
20320else
20321  case $POTENTIAL_CXX in
20322  [\\/]* | ?:[\\/]*)
20323  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20324  ;;
20325  *)
20326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20327for as_dir in $PATH
20328do
20329  IFS=$as_save_IFS
20330  test -z "$as_dir" && as_dir=.
20331    for ac_exec_ext in '' $ac_executable_extensions; do
20332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20333    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20335    break 2
20336  fi
20337done
20338  done
20339IFS=$as_save_IFS
20340
20341  ;;
20342esac
20343fi
20344POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20345if test -n "$POTENTIAL_CXX"; then
20346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20347$as_echo "$POTENTIAL_CXX" >&6; }
20348else
20349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20350$as_echo "no" >&6; }
20351fi
20352
20353
20354  test -n "$POTENTIAL_CXX" && break
20355done
20356
20357    CXX=$POTENTIAL_CXX
20358  fi
20359
20360  if test "x$CXX" = x; then
20361
20362    # Print a helpful message on how to acquire the necessary build dependency.
20363    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20364    MISSING_DEPENDENCY=devkit
20365    PKGHANDLER_COMMAND=
20366
20367    case $PKGHANDLER in
20368	apt-get)
20369                apt_help     $MISSING_DEPENDENCY ;;
20370    yum)
20371                yum_help     $MISSING_DEPENDENCY ;;
20372	port)
20373                port_help    $MISSING_DEPENDENCY ;;
20374	pkgutil)
20375                pkgutil_help $MISSING_DEPENDENCY ;;
20376	pkgadd)
20377                pkgadd_help  $MISSING_DEPENDENCY ;;
20378    * )
20379      break ;;
20380    esac
20381
20382    if test "x$PKGHANDLER_COMMAND" != x; then
20383        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20384    fi
20385
20386      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20387  fi
20388
20389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20390
20391  # First separate the path from the arguments. This will split at the first
20392  # space.
20393  complete="$CXX"
20394  path="${complete%% *}"
20395  tmp="$complete EOL"
20396  arguments="${tmp#* }"
20397
20398  # Input might be given as Windows format, start by converting to
20399  # unix format.
20400  new_path=`$CYGPATH -u "$path"`
20401
20402  # Now try to locate executable using which
20403  new_path=`$WHICH "$new_path" 2> /dev/null`
20404  # bat and cmd files are not always considered executable in cygwin causing which
20405  # to not find them
20406  if test "x$new_path" = x \
20407           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20408           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20409    new_path=`$CYGPATH -u "$path"`
20410  fi
20411  if test "x$new_path" = x; then
20412    # Oops. Which didn't find the executable.
20413    # The splitting of arguments from the executable at a space might have been incorrect,
20414    # since paths with space are more likely in Windows. Give it another try with the whole
20415    # argument.
20416    path="$complete"
20417    arguments="EOL"
20418    new_path=`$CYGPATH -u "$path"`
20419    new_path=`$WHICH "$new_path" 2> /dev/null`
20420    # bat and cmd files are not always considered executable in cygwin causing which
20421    # to not find them
20422    if test "x$new_path" = x \
20423             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20424             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20425      new_path=`$CYGPATH -u "$path"`
20426    fi
20427    if test "x$new_path" = x; then
20428      # It's still not found. Now this is an unrecoverable error.
20429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20430$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20431      has_space=`$ECHO "$complete" | $GREP " "`
20432      if test "x$has_space" != x; then
20433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20435      fi
20436      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20437    fi
20438  fi
20439
20440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20443  # "foo.exe" is OK but "foo" is an error.
20444  #
20445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20446  # It is also a way to make sure we got the proper file name for the real test later on.
20447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20448  if test "x$test_shortpath" = x; then
20449    # Short path failed, file does not exist as specified.
20450    # Try adding .exe or .cmd
20451    if test -f "${new_path}.exe"; then
20452       input_to_shortpath="${new_path}.exe"
20453    elif test -f "${new_path}.cmd"; then
20454       input_to_shortpath="${new_path}.cmd"
20455    else
20456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20457$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20460      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20461    fi
20462  else
20463    input_to_shortpath="$new_path"
20464  fi
20465
20466  # Call helper function which possibly converts this using DOS-style short mode.
20467  # If so, the updated path is stored in $new_path.
20468  new_path="$input_to_shortpath"
20469
20470  input_path="$input_to_shortpath"
20471  # Check if we need to convert this using DOS-style short mode. If the path
20472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20473  # take no chances and rewrite it.
20474  # Note: m4 eats our [], so we need to use [ and ] instead.
20475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20476  if test "x$has_forbidden_chars" != x; then
20477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20481      # Going to short mode and back again did indeed matter. Since short mode is
20482      # case insensitive, let's make it lowercase to improve readability.
20483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20484      # Now convert it back to Unix-stile (cygpath)
20485      input_path=`$CYGPATH -u "$shortmode_path"`
20486      new_path="$input_path"
20487    fi
20488  fi
20489
20490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20491  if test "x$test_cygdrive_prefix" = x; then
20492    # As a simple fix, exclude /usr/bin since it's not a real path.
20493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20495      # a path prefixed by /cygdrive for fixpath to work.
20496      new_path="$CYGWIN_ROOT_PATH$input_path"
20497    fi
20498  fi
20499
20500  # remove trailing .exe if any
20501  new_path="${new_path/%.exe/}"
20502
20503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20504
20505  # First separate the path from the arguments. This will split at the first
20506  # space.
20507  complete="$CXX"
20508  path="${complete%% *}"
20509  tmp="$complete EOL"
20510  arguments="${tmp#* }"
20511
20512  # Input might be given as Windows format, start by converting to
20513  # unix format.
20514  new_path="$path"
20515
20516  windows_path="$new_path"
20517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20518    unix_path=`$CYGPATH -u "$windows_path"`
20519    new_path="$unix_path"
20520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20522    new_path="$unix_path"
20523  fi
20524
20525
20526  # Now try to locate executable using which
20527  new_path=`$WHICH "$new_path" 2> /dev/null`
20528
20529  if test "x$new_path" = x; then
20530    # Oops. Which didn't find the executable.
20531    # The splitting of arguments from the executable at a space might have been incorrect,
20532    # since paths with space are more likely in Windows. Give it another try with the whole
20533    # argument.
20534    path="$complete"
20535    arguments="EOL"
20536    new_path="$path"
20537
20538  windows_path="$new_path"
20539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20540    unix_path=`$CYGPATH -u "$windows_path"`
20541    new_path="$unix_path"
20542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20544    new_path="$unix_path"
20545  fi
20546
20547
20548    new_path=`$WHICH "$new_path" 2> /dev/null`
20549
20550    if test "x$new_path" = x; then
20551      # It's still not found. Now this is an unrecoverable error.
20552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20553$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20554      has_space=`$ECHO "$complete" | $GREP " "`
20555      if test "x$has_space" != x; then
20556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20558      fi
20559      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20560    fi
20561  fi
20562
20563  # Now new_path has a complete unix path to the binary
20564  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20565    # Keep paths in /bin as-is, but remove trailing .exe if any
20566    new_path="${new_path/%.exe/}"
20567    # Do not save /bin paths to all_fixpath_prefixes!
20568  else
20569    # Not in mixed or Windows style, start by that.
20570    new_path=`cmd //c echo $new_path`
20571
20572  input_path="$new_path"
20573  # Check if we need to convert this using DOS-style short mode. If the path
20574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20575  # take no chances and rewrite it.
20576  # Note: m4 eats our [], so we need to use [ and ] instead.
20577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20578  if test "x$has_forbidden_chars" != x; then
20579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20581  fi
20582
20583    # Output is in $new_path
20584
20585  windows_path="$new_path"
20586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20587    unix_path=`$CYGPATH -u "$windows_path"`
20588    new_path="$unix_path"
20589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20591    new_path="$unix_path"
20592  fi
20593
20594    # remove trailing .exe if any
20595    new_path="${new_path/%.exe/}"
20596
20597    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20598    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20599  fi
20600
20601  else
20602    # We're on a posix platform. Hooray! :)
20603    # First separate the path from the arguments. This will split at the first
20604    # space.
20605    complete="$CXX"
20606    path="${complete%% *}"
20607    tmp="$complete EOL"
20608    arguments="${tmp#* }"
20609
20610    # Cannot rely on the command "which" here since it doesn't always work.
20611    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20612    if test -z "$is_absolute_path"; then
20613      # Path to executable is not absolute. Find it.
20614      IFS_save="$IFS"
20615      IFS=:
20616      for p in $PATH; do
20617        if test -f "$p/$path" && test -x "$p/$path"; then
20618          new_path="$p/$path"
20619          break
20620        fi
20621      done
20622      IFS="$IFS_save"
20623    else
20624      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20625$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20626      new_path="$path"
20627    fi
20628
20629    if test "x$new_path" = x; then
20630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20631$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20632        has_space=`$ECHO "$complete" | $GREP " "`
20633        if test "x$has_space" != x; then
20634          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20635$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20636        fi
20637        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20638      fi
20639  fi
20640
20641      # Now join together the path and the arguments once again
20642      if test "x$arguments" != xEOL; then
20643        new_complete="$new_path ${arguments% *}"
20644      else
20645        new_complete="$new_path"
20646      fi
20647
20648  if test "x$complete" != "x$new_complete"; then
20649      CXX="$new_complete"
20650      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20651$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20652    fi
20653
20654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20655$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20656  TEST_COMPILER="$CXX"
20657
20658    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20659        # Follow a chain of symbolic links. Use readlink
20660        # where it exists, else fall back to horribly
20661        # complicated shell code.
20662        if test "x$READLINK_TESTED" != yes; then
20663            # On MacOSX there is a readlink tool with a different
20664            # purpose than the GNU readlink tool. Check the found readlink.
20665            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20666            if test "x$ISGNU" = x; then
20667                 # A readlink that we do not know how to use.
20668                 # Are there other non-GNU readlinks out there?
20669                 READLINK_TESTED=yes
20670                 READLINK=
20671            fi
20672        fi
20673
20674        if test "x$READLINK" != x; then
20675            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20676        else
20677            # Save the current directory for restoring afterwards
20678            STARTDIR=$PWD
20679            COUNTER=0
20680            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20681            sym_link_file=`$BASENAME $TEST_COMPILER`
20682            # Use the system pwd and not the shell builtin to resolve directory symlinks
20683            cd $sym_link_dir
20684            cd `$THEPWDCMD`
20685            sym_link_dir=`$THEPWDCMD`
20686            # Resolve file symlinks
20687            while test $COUNTER -lt 20; do
20688                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20689                if test "x$ISLINK" == x; then
20690                    # This is not a symbolic link! We are done!
20691                    break
20692                fi
20693                # Again resolve directory symlinks since the target of the just found
20694                # link could be in a different directory
20695                cd `$DIRNAME $ISLINK`
20696                sym_link_dir=`$THEPWDCMD`
20697                sym_link_file=`$BASENAME $ISLINK`
20698                let COUNTER=COUNTER+1
20699            done
20700            cd $STARTDIR
20701            TEST_COMPILER=$sym_link_dir/$sym_link_file
20702        fi
20703    fi
20704
20705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20706$as_echo "$TEST_COMPILER" >&6; }
20707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20708$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20709
20710  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20711  if test "x$COMPILER_BASENAME" = "xccache"; then
20712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20713$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20714    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20715    # We want to control ccache invocation ourselves, so ignore this cc and try
20716    # searching again.
20717
20718    # Remove the path to the fake ccache cc from the PATH
20719    RETRY_COMPILER_SAVED_PATH="$PATH"
20720    COMPILER_DIRNAME=`$DIRNAME $CXX`
20721    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20722
20723    # Try again looking for our compiler
20724    if test -n "$ac_tool_prefix"; then
20725  for ac_prog in $COMPILER_CHECK_LIST
20726  do
20727    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20728set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20730$as_echo_n "checking for $ac_word... " >&6; }
20731if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20732  $as_echo_n "(cached) " >&6
20733else
20734  if test -n "$PROPER_COMPILER_CXX"; then
20735  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20736else
20737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20738for as_dir in $PATH
20739do
20740  IFS=$as_save_IFS
20741  test -z "$as_dir" && as_dir=.
20742    for ac_exec_ext in '' $ac_executable_extensions; do
20743  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20744    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20746    break 2
20747  fi
20748done
20749  done
20750IFS=$as_save_IFS
20751
20752fi
20753fi
20754PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20755if test -n "$PROPER_COMPILER_CXX"; then
20756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20757$as_echo "$PROPER_COMPILER_CXX" >&6; }
20758else
20759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20760$as_echo "no" >&6; }
20761fi
20762
20763
20764    test -n "$PROPER_COMPILER_CXX" && break
20765  done
20766fi
20767if test -z "$PROPER_COMPILER_CXX"; then
20768  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20769  for ac_prog in $COMPILER_CHECK_LIST
20770do
20771  # Extract the first word of "$ac_prog", so it can be a program name with args.
20772set dummy $ac_prog; ac_word=$2
20773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20774$as_echo_n "checking for $ac_word... " >&6; }
20775if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20776  $as_echo_n "(cached) " >&6
20777else
20778  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20779  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20780else
20781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20782for as_dir in $PATH
20783do
20784  IFS=$as_save_IFS
20785  test -z "$as_dir" && as_dir=.
20786    for ac_exec_ext in '' $ac_executable_extensions; do
20787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20788    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20790    break 2
20791  fi
20792done
20793  done
20794IFS=$as_save_IFS
20795
20796fi
20797fi
20798ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20799if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20801$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20802else
20803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20804$as_echo "no" >&6; }
20805fi
20806
20807
20808  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20809done
20810
20811  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20812    PROPER_COMPILER_CXX=""
20813  else
20814    case $cross_compiling:$ac_tool_warned in
20815yes:)
20816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20818ac_tool_warned=yes ;;
20819esac
20820    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20821  fi
20822fi
20823
20824
20825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20826
20827  # First separate the path from the arguments. This will split at the first
20828  # space.
20829  complete="$PROPER_COMPILER_CXX"
20830  path="${complete%% *}"
20831  tmp="$complete EOL"
20832  arguments="${tmp#* }"
20833
20834  # Input might be given as Windows format, start by converting to
20835  # unix format.
20836  new_path=`$CYGPATH -u "$path"`
20837
20838  # Now try to locate executable using which
20839  new_path=`$WHICH "$new_path" 2> /dev/null`
20840  # bat and cmd files are not always considered executable in cygwin causing which
20841  # to not find them
20842  if test "x$new_path" = x \
20843           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20844           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20845    new_path=`$CYGPATH -u "$path"`
20846  fi
20847  if test "x$new_path" = x; then
20848    # Oops. Which didn't find the executable.
20849    # The splitting of arguments from the executable at a space might have been incorrect,
20850    # since paths with space are more likely in Windows. Give it another try with the whole
20851    # argument.
20852    path="$complete"
20853    arguments="EOL"
20854    new_path=`$CYGPATH -u "$path"`
20855    new_path=`$WHICH "$new_path" 2> /dev/null`
20856    # bat and cmd files are not always considered executable in cygwin causing which
20857    # to not find them
20858    if test "x$new_path" = x \
20859             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20860             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20861      new_path=`$CYGPATH -u "$path"`
20862    fi
20863    if test "x$new_path" = x; then
20864      # It's still not found. Now this is an unrecoverable error.
20865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20866$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20867      has_space=`$ECHO "$complete" | $GREP " "`
20868      if test "x$has_space" != x; then
20869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20871      fi
20872      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20873    fi
20874  fi
20875
20876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20879  # "foo.exe" is OK but "foo" is an error.
20880  #
20881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20882  # It is also a way to make sure we got the proper file name for the real test later on.
20883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20884  if test "x$test_shortpath" = x; then
20885    # Short path failed, file does not exist as specified.
20886    # Try adding .exe or .cmd
20887    if test -f "${new_path}.exe"; then
20888       input_to_shortpath="${new_path}.exe"
20889    elif test -f "${new_path}.cmd"; then
20890       input_to_shortpath="${new_path}.cmd"
20891    else
20892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20893$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20896      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20897    fi
20898  else
20899    input_to_shortpath="$new_path"
20900  fi
20901
20902  # Call helper function which possibly converts this using DOS-style short mode.
20903  # If so, the updated path is stored in $new_path.
20904  new_path="$input_to_shortpath"
20905
20906  input_path="$input_to_shortpath"
20907  # Check if we need to convert this using DOS-style short mode. If the path
20908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20909  # take no chances and rewrite it.
20910  # Note: m4 eats our [], so we need to use [ and ] instead.
20911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20912  if test "x$has_forbidden_chars" != x; then
20913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20917      # Going to short mode and back again did indeed matter. Since short mode is
20918      # case insensitive, let's make it lowercase to improve readability.
20919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20920      # Now convert it back to Unix-stile (cygpath)
20921      input_path=`$CYGPATH -u "$shortmode_path"`
20922      new_path="$input_path"
20923    fi
20924  fi
20925
20926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20927  if test "x$test_cygdrive_prefix" = x; then
20928    # As a simple fix, exclude /usr/bin since it's not a real path.
20929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20931      # a path prefixed by /cygdrive for fixpath to work.
20932      new_path="$CYGWIN_ROOT_PATH$input_path"
20933    fi
20934  fi
20935
20936  # remove trailing .exe if any
20937  new_path="${new_path/%.exe/}"
20938
20939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20940
20941  # First separate the path from the arguments. This will split at the first
20942  # space.
20943  complete="$PROPER_COMPILER_CXX"
20944  path="${complete%% *}"
20945  tmp="$complete EOL"
20946  arguments="${tmp#* }"
20947
20948  # Input might be given as Windows format, start by converting to
20949  # unix format.
20950  new_path="$path"
20951
20952  windows_path="$new_path"
20953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20954    unix_path=`$CYGPATH -u "$windows_path"`
20955    new_path="$unix_path"
20956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20958    new_path="$unix_path"
20959  fi
20960
20961
20962  # Now try to locate executable using which
20963  new_path=`$WHICH "$new_path" 2> /dev/null`
20964
20965  if test "x$new_path" = x; then
20966    # Oops. Which didn't find the executable.
20967    # The splitting of arguments from the executable at a space might have been incorrect,
20968    # since paths with space are more likely in Windows. Give it another try with the whole
20969    # argument.
20970    path="$complete"
20971    arguments="EOL"
20972    new_path="$path"
20973
20974  windows_path="$new_path"
20975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20976    unix_path=`$CYGPATH -u "$windows_path"`
20977    new_path="$unix_path"
20978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20980    new_path="$unix_path"
20981  fi
20982
20983
20984    new_path=`$WHICH "$new_path" 2> /dev/null`
20985
20986    if test "x$new_path" = x; then
20987      # It's still not found. Now this is an unrecoverable error.
20988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20989$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20990      has_space=`$ECHO "$complete" | $GREP " "`
20991      if test "x$has_space" != x; then
20992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20994      fi
20995      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20996    fi
20997  fi
20998
20999  # Now new_path has a complete unix path to the binary
21000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21001    # Keep paths in /bin as-is, but remove trailing .exe if any
21002    new_path="${new_path/%.exe/}"
21003    # Do not save /bin paths to all_fixpath_prefixes!
21004  else
21005    # Not in mixed or Windows style, start by that.
21006    new_path=`cmd //c echo $new_path`
21007
21008  input_path="$new_path"
21009  # Check if we need to convert this using DOS-style short mode. If the path
21010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21011  # take no chances and rewrite it.
21012  # Note: m4 eats our [], so we need to use [ and ] instead.
21013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21014  if test "x$has_forbidden_chars" != x; then
21015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21017  fi
21018
21019    # Output is in $new_path
21020
21021  windows_path="$new_path"
21022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21023    unix_path=`$CYGPATH -u "$windows_path"`
21024    new_path="$unix_path"
21025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21027    new_path="$unix_path"
21028  fi
21029
21030    # remove trailing .exe if any
21031    new_path="${new_path/%.exe/}"
21032
21033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21035  fi
21036
21037  else
21038    # We're on a posix platform. Hooray! :)
21039    # First separate the path from the arguments. This will split at the first
21040    # space.
21041    complete="$PROPER_COMPILER_CXX"
21042    path="${complete%% *}"
21043    tmp="$complete EOL"
21044    arguments="${tmp#* }"
21045
21046    # Cannot rely on the command "which" here since it doesn't always work.
21047    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21048    if test -z "$is_absolute_path"; then
21049      # Path to executable is not absolute. Find it.
21050      IFS_save="$IFS"
21051      IFS=:
21052      for p in $PATH; do
21053        if test -f "$p/$path" && test -x "$p/$path"; then
21054          new_path="$p/$path"
21055          break
21056        fi
21057      done
21058      IFS="$IFS_save"
21059    else
21060      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21061$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21062      new_path="$path"
21063    fi
21064
21065    if test "x$new_path" = x; then
21066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21067$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21068        has_space=`$ECHO "$complete" | $GREP " "`
21069        if test "x$has_space" != x; then
21070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21072        fi
21073        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21074      fi
21075  fi
21076
21077      # Now join together the path and the arguments once again
21078      if test "x$arguments" != xEOL; then
21079        new_complete="$new_path ${arguments% *}"
21080      else
21081        new_complete="$new_path"
21082      fi
21083
21084  if test "x$complete" != "x$new_complete"; then
21085      PROPER_COMPILER_CXX="$new_complete"
21086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21087$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21088    fi
21089
21090    PATH="$RETRY_COMPILER_SAVED_PATH"
21091
21092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21093$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21094
21095    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21096        # Follow a chain of symbolic links. Use readlink
21097        # where it exists, else fall back to horribly
21098        # complicated shell code.
21099        if test "x$READLINK_TESTED" != yes; then
21100            # On MacOSX there is a readlink tool with a different
21101            # purpose than the GNU readlink tool. Check the found readlink.
21102            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21103            if test "x$ISGNU" = x; then
21104                 # A readlink that we do not know how to use.
21105                 # Are there other non-GNU readlinks out there?
21106                 READLINK_TESTED=yes
21107                 READLINK=
21108            fi
21109        fi
21110
21111        if test "x$READLINK" != x; then
21112            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21113        else
21114            # Save the current directory for restoring afterwards
21115            STARTDIR=$PWD
21116            COUNTER=0
21117            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21118            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21119            # Use the system pwd and not the shell builtin to resolve directory symlinks
21120            cd $sym_link_dir
21121            cd `$THEPWDCMD`
21122            sym_link_dir=`$THEPWDCMD`
21123            # Resolve file symlinks
21124            while test $COUNTER -lt 20; do
21125                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21126                if test "x$ISLINK" == x; then
21127                    # This is not a symbolic link! We are done!
21128                    break
21129                fi
21130                # Again resolve directory symlinks since the target of the just found
21131                # link could be in a different directory
21132                cd `$DIRNAME $ISLINK`
21133                sym_link_dir=`$THEPWDCMD`
21134                sym_link_file=`$BASENAME $ISLINK`
21135                let COUNTER=COUNTER+1
21136            done
21137            cd $STARTDIR
21138            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21139        fi
21140    fi
21141
21142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21143$as_echo "$PROPER_COMPILER_CXX" >&6; }
21144    CXX="$PROPER_COMPILER_CXX"
21145  else
21146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21147$as_echo "no, keeping CXX" >&6; }
21148    CXX="$TEST_COMPILER"
21149  fi
21150
21151  COMPILER=$CXX
21152  COMPILER_NAME=$COMPILER_NAME
21153
21154  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21155    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21156    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21157    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21158    if test $? -ne 0; then
21159      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21160
21161      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
21162$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21163      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21164$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21165      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21166    else
21167      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21168      COMPILER_VENDOR="Sun Studio"
21169    fi
21170  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21171    # First line typically looks something like:
21172    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21173    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21174    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21175    COMPILER_VENDOR="Microsoft CL.EXE"
21176    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21177    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21178      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21179        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21180      fi
21181    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21182      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21183        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21184      fi
21185    fi
21186  else
21187    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21188    # Check that this is likely to be GCC.
21189    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21190    if test $? -ne 0; then
21191      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21194$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21195      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21196    fi
21197
21198    # First line typically looks something like:
21199    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21200    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21201    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21202  fi
21203  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21204  CXX_VERSION="$COMPILER_VERSION"
21205  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21206  CXX_VENDOR="$COMPILER_VENDOR"
21207
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21209$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21210
21211
21212# Now that we have resolved CXX ourself, let autoconf have its go at it
21213ac_ext=cpp
21214ac_cpp='$CXXCPP $CPPFLAGS'
21215ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21216ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21217ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21218if test -z "$CXX"; then
21219  if test -n "$CCC"; then
21220    CXX=$CCC
21221  else
21222    if test -n "$ac_tool_prefix"; then
21223  for ac_prog in $CXX
21224  do
21225    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21226set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21228$as_echo_n "checking for $ac_word... " >&6; }
21229if test "${ac_cv_prog_CXX+set}" = set; then :
21230  $as_echo_n "(cached) " >&6
21231else
21232  if test -n "$CXX"; then
21233  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21234else
21235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21236for as_dir in $PATH
21237do
21238  IFS=$as_save_IFS
21239  test -z "$as_dir" && as_dir=.
21240    for ac_exec_ext in '' $ac_executable_extensions; do
21241  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21242    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21244    break 2
21245  fi
21246done
21247  done
21248IFS=$as_save_IFS
21249
21250fi
21251fi
21252CXX=$ac_cv_prog_CXX
21253if test -n "$CXX"; then
21254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21255$as_echo "$CXX" >&6; }
21256else
21257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21258$as_echo "no" >&6; }
21259fi
21260
21261
21262    test -n "$CXX" && break
21263  done
21264fi
21265if test -z "$CXX"; then
21266  ac_ct_CXX=$CXX
21267  for ac_prog in $CXX
21268do
21269  # Extract the first word of "$ac_prog", so it can be a program name with args.
21270set dummy $ac_prog; ac_word=$2
21271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21272$as_echo_n "checking for $ac_word... " >&6; }
21273if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21274  $as_echo_n "(cached) " >&6
21275else
21276  if test -n "$ac_ct_CXX"; then
21277  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21278else
21279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21280for as_dir in $PATH
21281do
21282  IFS=$as_save_IFS
21283  test -z "$as_dir" && as_dir=.
21284    for ac_exec_ext in '' $ac_executable_extensions; do
21285  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21286    ac_cv_prog_ac_ct_CXX="$ac_prog"
21287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21288    break 2
21289  fi
21290done
21291  done
21292IFS=$as_save_IFS
21293
21294fi
21295fi
21296ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21297if test -n "$ac_ct_CXX"; then
21298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21299$as_echo "$ac_ct_CXX" >&6; }
21300else
21301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21302$as_echo "no" >&6; }
21303fi
21304
21305
21306  test -n "$ac_ct_CXX" && break
21307done
21308
21309  if test "x$ac_ct_CXX" = x; then
21310    CXX="g++"
21311  else
21312    case $cross_compiling:$ac_tool_warned in
21313yes:)
21314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21316ac_tool_warned=yes ;;
21317esac
21318    CXX=$ac_ct_CXX
21319  fi
21320fi
21321
21322  fi
21323fi
21324# Provide some information about the compiler.
21325$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21326set X $ac_compile
21327ac_compiler=$2
21328for ac_option in --version -v -V -qversion; do
21329  { { ac_try="$ac_compiler $ac_option >&5"
21330case "(($ac_try" in
21331  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21332  *) ac_try_echo=$ac_try;;
21333esac
21334eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21335$as_echo "$ac_try_echo"; } >&5
21336  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21337  ac_status=$?
21338  if test -s conftest.err; then
21339    sed '10a\
21340... rest of stderr output deleted ...
21341         10q' conftest.err >conftest.er1
21342    cat conftest.er1 >&5
21343  fi
21344  rm -f conftest.er1 conftest.err
21345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21346  test $ac_status = 0; }
21347done
21348
21349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21350$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21351if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21352  $as_echo_n "(cached) " >&6
21353else
21354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21355/* end confdefs.h.  */
21356
21357int
21358main ()
21359{
21360#ifndef __GNUC__
21361       choke me
21362#endif
21363
21364  ;
21365  return 0;
21366}
21367_ACEOF
21368if ac_fn_cxx_try_compile "$LINENO"; then :
21369  ac_compiler_gnu=yes
21370else
21371  ac_compiler_gnu=no
21372fi
21373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21374ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21375
21376fi
21377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21378$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21379if test $ac_compiler_gnu = yes; then
21380  GXX=yes
21381else
21382  GXX=
21383fi
21384ac_test_CXXFLAGS=${CXXFLAGS+set}
21385ac_save_CXXFLAGS=$CXXFLAGS
21386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21387$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21388if test "${ac_cv_prog_cxx_g+set}" = set; then :
21389  $as_echo_n "(cached) " >&6
21390else
21391  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21392   ac_cxx_werror_flag=yes
21393   ac_cv_prog_cxx_g=no
21394   CXXFLAGS="-g"
21395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21396/* end confdefs.h.  */
21397
21398int
21399main ()
21400{
21401
21402  ;
21403  return 0;
21404}
21405_ACEOF
21406if ac_fn_cxx_try_compile "$LINENO"; then :
21407  ac_cv_prog_cxx_g=yes
21408else
21409  CXXFLAGS=""
21410      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21411/* end confdefs.h.  */
21412
21413int
21414main ()
21415{
21416
21417  ;
21418  return 0;
21419}
21420_ACEOF
21421if ac_fn_cxx_try_compile "$LINENO"; then :
21422
21423else
21424  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21425	 CXXFLAGS="-g"
21426	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21427/* end confdefs.h.  */
21428
21429int
21430main ()
21431{
21432
21433  ;
21434  return 0;
21435}
21436_ACEOF
21437if ac_fn_cxx_try_compile "$LINENO"; then :
21438  ac_cv_prog_cxx_g=yes
21439fi
21440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21441fi
21442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21443fi
21444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21445   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21446fi
21447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21448$as_echo "$ac_cv_prog_cxx_g" >&6; }
21449if test "$ac_test_CXXFLAGS" = set; then
21450  CXXFLAGS=$ac_save_CXXFLAGS
21451elif test $ac_cv_prog_cxx_g = yes; then
21452  if test "$GXX" = yes; then
21453    CXXFLAGS="-g -O2"
21454  else
21455    CXXFLAGS="-g"
21456  fi
21457else
21458  if test "$GXX" = yes; then
21459    CXXFLAGS="-O2"
21460  else
21461    CXXFLAGS=
21462  fi
21463fi
21464ac_ext=cpp
21465ac_cpp='$CXXCPP $CPPFLAGS'
21466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21469
21470
21471### Locate other tools
21472
21473if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21474    ac_ext=m
21475ac_cpp='$OBJCPP $CPPFLAGS'
21476ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21477ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21478ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21479if test -n "$ac_tool_prefix"; then
21480  for ac_prog in gcc objcc objc cc CC
21481  do
21482    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21483set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21485$as_echo_n "checking for $ac_word... " >&6; }
21486if test "${ac_cv_prog_OBJC+set}" = set; then :
21487  $as_echo_n "(cached) " >&6
21488else
21489  if test -n "$OBJC"; then
21490  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21491else
21492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21493for as_dir in $PATH
21494do
21495  IFS=$as_save_IFS
21496  test -z "$as_dir" && as_dir=.
21497    for ac_exec_ext in '' $ac_executable_extensions; do
21498  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21499    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21501    break 2
21502  fi
21503done
21504  done
21505IFS=$as_save_IFS
21506
21507fi
21508fi
21509OBJC=$ac_cv_prog_OBJC
21510if test -n "$OBJC"; then
21511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21512$as_echo "$OBJC" >&6; }
21513else
21514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21515$as_echo "no" >&6; }
21516fi
21517
21518
21519    test -n "$OBJC" && break
21520  done
21521fi
21522if test -z "$OBJC"; then
21523  ac_ct_OBJC=$OBJC
21524  for ac_prog in gcc objcc objc cc CC
21525do
21526  # Extract the first word of "$ac_prog", so it can be a program name with args.
21527set dummy $ac_prog; ac_word=$2
21528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21529$as_echo_n "checking for $ac_word... " >&6; }
21530if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21531  $as_echo_n "(cached) " >&6
21532else
21533  if test -n "$ac_ct_OBJC"; then
21534  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21535else
21536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21537for as_dir in $PATH
21538do
21539  IFS=$as_save_IFS
21540  test -z "$as_dir" && as_dir=.
21541    for ac_exec_ext in '' $ac_executable_extensions; do
21542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21543    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21545    break 2
21546  fi
21547done
21548  done
21549IFS=$as_save_IFS
21550
21551fi
21552fi
21553ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21554if test -n "$ac_ct_OBJC"; then
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21556$as_echo "$ac_ct_OBJC" >&6; }
21557else
21558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21559$as_echo "no" >&6; }
21560fi
21561
21562
21563  test -n "$ac_ct_OBJC" && break
21564done
21565
21566  if test "x$ac_ct_OBJC" = x; then
21567    OBJC="gcc"
21568  else
21569    case $cross_compiling:$ac_tool_warned in
21570yes:)
21571{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21572$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21573ac_tool_warned=yes ;;
21574esac
21575    OBJC=$ac_ct_OBJC
21576  fi
21577fi
21578
21579# Provide some information about the compiler.
21580$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21581set X $ac_compile
21582ac_compiler=$2
21583for ac_option in --version -v -V -qversion; do
21584  { { ac_try="$ac_compiler $ac_option >&5"
21585case "(($ac_try" in
21586  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21587  *) ac_try_echo=$ac_try;;
21588esac
21589eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21590$as_echo "$ac_try_echo"; } >&5
21591  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21592  ac_status=$?
21593  if test -s conftest.err; then
21594    sed '10a\
21595... rest of stderr output deleted ...
21596         10q' conftest.err >conftest.er1
21597    cat conftest.er1 >&5
21598  fi
21599  rm -f conftest.er1 conftest.err
21600  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21601  test $ac_status = 0; }
21602done
21603
21604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21605$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21606if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21607  $as_echo_n "(cached) " >&6
21608else
21609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21610/* end confdefs.h.  */
21611
21612int
21613main ()
21614{
21615#ifndef __GNUC__
21616       choke me
21617#endif
21618
21619  ;
21620  return 0;
21621}
21622_ACEOF
21623if ac_fn_objc_try_compile "$LINENO"; then :
21624  ac_compiler_gnu=yes
21625else
21626  ac_compiler_gnu=no
21627fi
21628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21629ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21630
21631fi
21632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21633$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21634if test $ac_compiler_gnu = yes; then
21635  GOBJC=yes
21636else
21637  GOBJC=
21638fi
21639ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21640ac_save_OBJCFLAGS=$OBJCFLAGS
21641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21642$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21643if test "${ac_cv_prog_objc_g+set}" = set; then :
21644  $as_echo_n "(cached) " >&6
21645else
21646  ac_save_objc_werror_flag=$ac_objc_werror_flag
21647   ac_objc_werror_flag=yes
21648   ac_cv_prog_objc_g=no
21649   OBJCFLAGS="-g"
21650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651/* end confdefs.h.  */
21652
21653int
21654main ()
21655{
21656
21657  ;
21658  return 0;
21659}
21660_ACEOF
21661if ac_fn_objc_try_compile "$LINENO"; then :
21662  ac_cv_prog_objc_g=yes
21663else
21664  OBJCFLAGS=""
21665      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21666/* end confdefs.h.  */
21667
21668int
21669main ()
21670{
21671
21672  ;
21673  return 0;
21674}
21675_ACEOF
21676if ac_fn_objc_try_compile "$LINENO"; then :
21677
21678else
21679  ac_objc_werror_flag=$ac_save_objc_werror_flag
21680	 OBJCFLAGS="-g"
21681	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21682/* end confdefs.h.  */
21683
21684int
21685main ()
21686{
21687
21688  ;
21689  return 0;
21690}
21691_ACEOF
21692if ac_fn_objc_try_compile "$LINENO"; then :
21693  ac_cv_prog_objc_g=yes
21694fi
21695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21696fi
21697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21698fi
21699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21700   ac_objc_werror_flag=$ac_save_objc_werror_flag
21701fi
21702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21703$as_echo "$ac_cv_prog_objc_g" >&6; }
21704if test "$ac_test_OBJCFLAGS" = set; then
21705  OBJCFLAGS=$ac_save_OBJCFLAGS
21706elif test $ac_cv_prog_objc_g = yes; then
21707  if test "$GOBJC" = yes; then
21708    OBJCFLAGS="-g -O2"
21709  else
21710    OBJCFLAGS="-g"
21711  fi
21712else
21713  if test "$GOBJC" = yes; then
21714    OBJCFLAGS="-O2"
21715  else
21716    OBJCFLAGS=
21717  fi
21718fi
21719ac_ext=cpp
21720ac_cpp='$CXXCPP $CPPFLAGS'
21721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21724
21725
21726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21727
21728  # First separate the path from the arguments. This will split at the first
21729  # space.
21730  complete="$OBJC"
21731  path="${complete%% *}"
21732  tmp="$complete EOL"
21733  arguments="${tmp#* }"
21734
21735  # Input might be given as Windows format, start by converting to
21736  # unix format.
21737  new_path=`$CYGPATH -u "$path"`
21738
21739  # Now try to locate executable using which
21740  new_path=`$WHICH "$new_path" 2> /dev/null`
21741  # bat and cmd files are not always considered executable in cygwin causing which
21742  # to not find them
21743  if test "x$new_path" = x \
21744           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21745           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21746    new_path=`$CYGPATH -u "$path"`
21747  fi
21748  if test "x$new_path" = x; then
21749    # Oops. Which didn't find the executable.
21750    # The splitting of arguments from the executable at a space might have been incorrect,
21751    # since paths with space are more likely in Windows. Give it another try with the whole
21752    # argument.
21753    path="$complete"
21754    arguments="EOL"
21755    new_path=`$CYGPATH -u "$path"`
21756    new_path=`$WHICH "$new_path" 2> /dev/null`
21757    # bat and cmd files are not always considered executable in cygwin causing which
21758    # to not find them
21759    if test "x$new_path" = x \
21760             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21761             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21762      new_path=`$CYGPATH -u "$path"`
21763    fi
21764    if test "x$new_path" = x; then
21765      # It's still not found. Now this is an unrecoverable error.
21766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21767$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21768      has_space=`$ECHO "$complete" | $GREP " "`
21769      if test "x$has_space" != x; then
21770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21772      fi
21773      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21774    fi
21775  fi
21776
21777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21780  # "foo.exe" is OK but "foo" is an error.
21781  #
21782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21783  # It is also a way to make sure we got the proper file name for the real test later on.
21784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21785  if test "x$test_shortpath" = x; then
21786    # Short path failed, file does not exist as specified.
21787    # Try adding .exe or .cmd
21788    if test -f "${new_path}.exe"; then
21789       input_to_shortpath="${new_path}.exe"
21790    elif test -f "${new_path}.cmd"; then
21791       input_to_shortpath="${new_path}.cmd"
21792    else
21793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21794$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21797      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21798    fi
21799  else
21800    input_to_shortpath="$new_path"
21801  fi
21802
21803  # Call helper function which possibly converts this using DOS-style short mode.
21804  # If so, the updated path is stored in $new_path.
21805  new_path="$input_to_shortpath"
21806
21807  input_path="$input_to_shortpath"
21808  # Check if we need to convert this using DOS-style short mode. If the path
21809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21810  # take no chances and rewrite it.
21811  # Note: m4 eats our [], so we need to use [ and ] instead.
21812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21813  if test "x$has_forbidden_chars" != x; then
21814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21818      # Going to short mode and back again did indeed matter. Since short mode is
21819      # case insensitive, let's make it lowercase to improve readability.
21820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21821      # Now convert it back to Unix-stile (cygpath)
21822      input_path=`$CYGPATH -u "$shortmode_path"`
21823      new_path="$input_path"
21824    fi
21825  fi
21826
21827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21828  if test "x$test_cygdrive_prefix" = x; then
21829    # As a simple fix, exclude /usr/bin since it's not a real path.
21830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21832      # a path prefixed by /cygdrive for fixpath to work.
21833      new_path="$CYGWIN_ROOT_PATH$input_path"
21834    fi
21835  fi
21836
21837  # remove trailing .exe if any
21838  new_path="${new_path/%.exe/}"
21839
21840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21841
21842  # First separate the path from the arguments. This will split at the first
21843  # space.
21844  complete="$OBJC"
21845  path="${complete%% *}"
21846  tmp="$complete EOL"
21847  arguments="${tmp#* }"
21848
21849  # Input might be given as Windows format, start by converting to
21850  # unix format.
21851  new_path="$path"
21852
21853  windows_path="$new_path"
21854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21855    unix_path=`$CYGPATH -u "$windows_path"`
21856    new_path="$unix_path"
21857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21859    new_path="$unix_path"
21860  fi
21861
21862
21863  # Now try to locate executable using which
21864  new_path=`$WHICH "$new_path" 2> /dev/null`
21865
21866  if test "x$new_path" = x; then
21867    # Oops. Which didn't find the executable.
21868    # The splitting of arguments from the executable at a space might have been incorrect,
21869    # since paths with space are more likely in Windows. Give it another try with the whole
21870    # argument.
21871    path="$complete"
21872    arguments="EOL"
21873    new_path="$path"
21874
21875  windows_path="$new_path"
21876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21877    unix_path=`$CYGPATH -u "$windows_path"`
21878    new_path="$unix_path"
21879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21881    new_path="$unix_path"
21882  fi
21883
21884
21885    new_path=`$WHICH "$new_path" 2> /dev/null`
21886
21887    if test "x$new_path" = x; then
21888      # It's still not found. Now this is an unrecoverable error.
21889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21890$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21891      has_space=`$ECHO "$complete" | $GREP " "`
21892      if test "x$has_space" != x; then
21893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21895      fi
21896      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21897    fi
21898  fi
21899
21900  # Now new_path has a complete unix path to the binary
21901  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21902    # Keep paths in /bin as-is, but remove trailing .exe if any
21903    new_path="${new_path/%.exe/}"
21904    # Do not save /bin paths to all_fixpath_prefixes!
21905  else
21906    # Not in mixed or Windows style, start by that.
21907    new_path=`cmd //c echo $new_path`
21908
21909  input_path="$new_path"
21910  # Check if we need to convert this using DOS-style short mode. If the path
21911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21912  # take no chances and rewrite it.
21913  # Note: m4 eats our [], so we need to use [ and ] instead.
21914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21915  if test "x$has_forbidden_chars" != x; then
21916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21918  fi
21919
21920    # Output is in $new_path
21921
21922  windows_path="$new_path"
21923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21924    unix_path=`$CYGPATH -u "$windows_path"`
21925    new_path="$unix_path"
21926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21928    new_path="$unix_path"
21929  fi
21930
21931    # remove trailing .exe if any
21932    new_path="${new_path/%.exe/}"
21933
21934    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21935    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21936  fi
21937
21938  else
21939    # We're on a posix platform. Hooray! :)
21940    # First separate the path from the arguments. This will split at the first
21941    # space.
21942    complete="$OBJC"
21943    path="${complete%% *}"
21944    tmp="$complete EOL"
21945    arguments="${tmp#* }"
21946
21947    # Cannot rely on the command "which" here since it doesn't always work.
21948    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21949    if test -z "$is_absolute_path"; then
21950      # Path to executable is not absolute. Find it.
21951      IFS_save="$IFS"
21952      IFS=:
21953      for p in $PATH; do
21954        if test -f "$p/$path" && test -x "$p/$path"; then
21955          new_path="$p/$path"
21956          break
21957        fi
21958      done
21959      IFS="$IFS_save"
21960    else
21961      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21962$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21963      new_path="$path"
21964    fi
21965
21966    if test "x$new_path" = x; then
21967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21968$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21969        has_space=`$ECHO "$complete" | $GREP " "`
21970        if test "x$has_space" != x; then
21971          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21973        fi
21974        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21975      fi
21976  fi
21977
21978      # Now join together the path and the arguments once again
21979      if test "x$arguments" != xEOL; then
21980        new_complete="$new_path ${arguments% *}"
21981      else
21982        new_complete="$new_path"
21983      fi
21984
21985  if test "x$complete" != "x$new_complete"; then
21986      OBJC="$new_complete"
21987      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21988$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21989    fi
21990
21991else
21992    OBJC=
21993fi
21994
21995# Restore the flags to the user specified values.
21996# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21997CFLAGS="$ORG_CFLAGS"
21998CXXFLAGS="$ORG_CXXFLAGS"
21999OBJCFLAGS="$ORG_OBJCFLAGS"
22000
22001LD="$CC"
22002LDEXE="$CC"
22003LDCXX="$CXX"
22004LDEXECXX="$CXX"
22005
22006# LDEXE is the linker to use, when creating executables.
22007
22008# Linking C++ libraries.
22009
22010# Linking C++ executables.
22011
22012
22013if test "x$OPENJDK_TARGET_OS" != xwindows; then
22014    if test -n "$ac_tool_prefix"; then
22015  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22016set dummy ${ac_tool_prefix}ar; ac_word=$2
22017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22018$as_echo_n "checking for $ac_word... " >&6; }
22019if test "${ac_cv_prog_AR+set}" = set; then :
22020  $as_echo_n "(cached) " >&6
22021else
22022  if test -n "$AR"; then
22023  ac_cv_prog_AR="$AR" # Let the user override the test.
22024else
22025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22026for as_dir in $PATH
22027do
22028  IFS=$as_save_IFS
22029  test -z "$as_dir" && as_dir=.
22030    for ac_exec_ext in '' $ac_executable_extensions; do
22031  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22032    ac_cv_prog_AR="${ac_tool_prefix}ar"
22033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22034    break 2
22035  fi
22036done
22037  done
22038IFS=$as_save_IFS
22039
22040fi
22041fi
22042AR=$ac_cv_prog_AR
22043if test -n "$AR"; then
22044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22045$as_echo "$AR" >&6; }
22046else
22047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22048$as_echo "no" >&6; }
22049fi
22050
22051
22052fi
22053if test -z "$ac_cv_prog_AR"; then
22054  ac_ct_AR=$AR
22055  # Extract the first word of "ar", so it can be a program name with args.
22056set dummy ar; ac_word=$2
22057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22058$as_echo_n "checking for $ac_word... " >&6; }
22059if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22060  $as_echo_n "(cached) " >&6
22061else
22062  if test -n "$ac_ct_AR"; then
22063  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22064else
22065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22066for as_dir in $PATH
22067do
22068  IFS=$as_save_IFS
22069  test -z "$as_dir" && as_dir=.
22070    for ac_exec_ext in '' $ac_executable_extensions; do
22071  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22072    ac_cv_prog_ac_ct_AR="ar"
22073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22074    break 2
22075  fi
22076done
22077  done
22078IFS=$as_save_IFS
22079
22080fi
22081fi
22082ac_ct_AR=$ac_cv_prog_ac_ct_AR
22083if test -n "$ac_ct_AR"; then
22084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22085$as_echo "$ac_ct_AR" >&6; }
22086else
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22088$as_echo "no" >&6; }
22089fi
22090
22091  if test "x$ac_ct_AR" = x; then
22092    AR=""
22093  else
22094    case $cross_compiling:$ac_tool_warned in
22095yes:)
22096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22098ac_tool_warned=yes ;;
22099esac
22100    AR=$ac_ct_AR
22101  fi
22102else
22103  AR="$ac_cv_prog_AR"
22104fi
22105
22106
22107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22108
22109  # First separate the path from the arguments. This will split at the first
22110  # space.
22111  complete="$AR"
22112  path="${complete%% *}"
22113  tmp="$complete EOL"
22114  arguments="${tmp#* }"
22115
22116  # Input might be given as Windows format, start by converting to
22117  # unix format.
22118  new_path=`$CYGPATH -u "$path"`
22119
22120  # Now try to locate executable using which
22121  new_path=`$WHICH "$new_path" 2> /dev/null`
22122  # bat and cmd files are not always considered executable in cygwin causing which
22123  # to not find them
22124  if test "x$new_path" = x \
22125           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22126           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22127    new_path=`$CYGPATH -u "$path"`
22128  fi
22129  if test "x$new_path" = x; then
22130    # Oops. Which didn't find the executable.
22131    # The splitting of arguments from the executable at a space might have been incorrect,
22132    # since paths with space are more likely in Windows. Give it another try with the whole
22133    # argument.
22134    path="$complete"
22135    arguments="EOL"
22136    new_path=`$CYGPATH -u "$path"`
22137    new_path=`$WHICH "$new_path" 2> /dev/null`
22138    # bat and cmd files are not always considered executable in cygwin causing which
22139    # to not find them
22140    if test "x$new_path" = x \
22141             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22142             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22143      new_path=`$CYGPATH -u "$path"`
22144    fi
22145    if test "x$new_path" = x; then
22146      # It's still not found. Now this is an unrecoverable error.
22147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22148$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22149      has_space=`$ECHO "$complete" | $GREP " "`
22150      if test "x$has_space" != x; then
22151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22153      fi
22154      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22155    fi
22156  fi
22157
22158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22161  # "foo.exe" is OK but "foo" is an error.
22162  #
22163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22164  # It is also a way to make sure we got the proper file name for the real test later on.
22165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22166  if test "x$test_shortpath" = x; then
22167    # Short path failed, file does not exist as specified.
22168    # Try adding .exe or .cmd
22169    if test -f "${new_path}.exe"; then
22170       input_to_shortpath="${new_path}.exe"
22171    elif test -f "${new_path}.cmd"; then
22172       input_to_shortpath="${new_path}.cmd"
22173    else
22174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22175$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22176      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22177$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22178      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22179    fi
22180  else
22181    input_to_shortpath="$new_path"
22182  fi
22183
22184  # Call helper function which possibly converts this using DOS-style short mode.
22185  # If so, the updated path is stored in $new_path.
22186  new_path="$input_to_shortpath"
22187
22188  input_path="$input_to_shortpath"
22189  # Check if we need to convert this using DOS-style short mode. If the path
22190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22191  # take no chances and rewrite it.
22192  # Note: m4 eats our [], so we need to use [ and ] instead.
22193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22194  if test "x$has_forbidden_chars" != x; then
22195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22199      # Going to short mode and back again did indeed matter. Since short mode is
22200      # case insensitive, let's make it lowercase to improve readability.
22201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22202      # Now convert it back to Unix-stile (cygpath)
22203      input_path=`$CYGPATH -u "$shortmode_path"`
22204      new_path="$input_path"
22205    fi
22206  fi
22207
22208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22209  if test "x$test_cygdrive_prefix" = x; then
22210    # As a simple fix, exclude /usr/bin since it's not a real path.
22211    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22213      # a path prefixed by /cygdrive for fixpath to work.
22214      new_path="$CYGWIN_ROOT_PATH$input_path"
22215    fi
22216  fi
22217
22218  # remove trailing .exe if any
22219  new_path="${new_path/%.exe/}"
22220
22221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22222
22223  # First separate the path from the arguments. This will split at the first
22224  # space.
22225  complete="$AR"
22226  path="${complete%% *}"
22227  tmp="$complete EOL"
22228  arguments="${tmp#* }"
22229
22230  # Input might be given as Windows format, start by converting to
22231  # unix format.
22232  new_path="$path"
22233
22234  windows_path="$new_path"
22235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22236    unix_path=`$CYGPATH -u "$windows_path"`
22237    new_path="$unix_path"
22238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22240    new_path="$unix_path"
22241  fi
22242
22243
22244  # Now try to locate executable using which
22245  new_path=`$WHICH "$new_path" 2> /dev/null`
22246
22247  if test "x$new_path" = x; then
22248    # Oops. Which didn't find the executable.
22249    # The splitting of arguments from the executable at a space might have been incorrect,
22250    # since paths with space are more likely in Windows. Give it another try with the whole
22251    # argument.
22252    path="$complete"
22253    arguments="EOL"
22254    new_path="$path"
22255
22256  windows_path="$new_path"
22257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22258    unix_path=`$CYGPATH -u "$windows_path"`
22259    new_path="$unix_path"
22260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22262    new_path="$unix_path"
22263  fi
22264
22265
22266    new_path=`$WHICH "$new_path" 2> /dev/null`
22267
22268    if test "x$new_path" = x; then
22269      # It's still not found. Now this is an unrecoverable error.
22270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22271$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22272      has_space=`$ECHO "$complete" | $GREP " "`
22273      if test "x$has_space" != x; then
22274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22276      fi
22277      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22278    fi
22279  fi
22280
22281  # Now new_path has a complete unix path to the binary
22282  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22283    # Keep paths in /bin as-is, but remove trailing .exe if any
22284    new_path="${new_path/%.exe/}"
22285    # Do not save /bin paths to all_fixpath_prefixes!
22286  else
22287    # Not in mixed or Windows style, start by that.
22288    new_path=`cmd //c echo $new_path`
22289
22290  input_path="$new_path"
22291  # Check if we need to convert this using DOS-style short mode. If the path
22292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22293  # take no chances and rewrite it.
22294  # Note: m4 eats our [], so we need to use [ and ] instead.
22295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22296  if test "x$has_forbidden_chars" != x; then
22297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22299  fi
22300
22301    # Output is in $new_path
22302
22303  windows_path="$new_path"
22304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22305    unix_path=`$CYGPATH -u "$windows_path"`
22306    new_path="$unix_path"
22307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22309    new_path="$unix_path"
22310  fi
22311
22312    # remove trailing .exe if any
22313    new_path="${new_path/%.exe/}"
22314
22315    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22316    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22317  fi
22318
22319  else
22320    # We're on a posix platform. Hooray! :)
22321    # First separate the path from the arguments. This will split at the first
22322    # space.
22323    complete="$AR"
22324    path="${complete%% *}"
22325    tmp="$complete EOL"
22326    arguments="${tmp#* }"
22327
22328    # Cannot rely on the command "which" here since it doesn't always work.
22329    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22330    if test -z "$is_absolute_path"; then
22331      # Path to executable is not absolute. Find it.
22332      IFS_save="$IFS"
22333      IFS=:
22334      for p in $PATH; do
22335        if test -f "$p/$path" && test -x "$p/$path"; then
22336          new_path="$p/$path"
22337          break
22338        fi
22339      done
22340      IFS="$IFS_save"
22341    else
22342      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22343$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22344      new_path="$path"
22345    fi
22346
22347    if test "x$new_path" = x; then
22348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22349$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22350        has_space=`$ECHO "$complete" | $GREP " "`
22351        if test "x$has_space" != x; then
22352          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22353$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22354        fi
22355        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22356      fi
22357  fi
22358
22359      # Now join together the path and the arguments once again
22360      if test "x$arguments" != xEOL; then
22361        new_complete="$new_path ${arguments% *}"
22362      else
22363        new_complete="$new_path"
22364      fi
22365
22366  if test "x$complete" != "x$new_complete"; then
22367      AR="$new_complete"
22368      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22369$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22370    fi
22371
22372fi
22373if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22374    ARFLAGS="-r"
22375else
22376    ARFLAGS=""
22377fi
22378
22379
22380# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22381HOTSPOT_CXX="$CXX"
22382HOTSPOT_LD="$LD"
22383
22384
22385
22386COMPILER_NAME=gcc
22387COMPILER_TYPE=CC
22388if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22389
22390    # For now, assume that we are always compiling using cl.exe.
22391    CC_OUT_OPTION=-Fo
22392    EXE_OUT_OPTION=-out:
22393    LD_OUT_OPTION=-out:
22394    AR_OUT_OPTION=-out:
22395    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22396    # program for something completely different.
22397    # Extract the first word of "link", so it can be a program name with args.
22398set dummy link; ac_word=$2
22399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22400$as_echo_n "checking for $ac_word... " >&6; }
22401if test "${ac_cv_prog_WINLD+set}" = set; then :
22402  $as_echo_n "(cached) " >&6
22403else
22404  if test -n "$WINLD"; then
22405  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22406else
22407  ac_prog_rejected=no
22408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22409for as_dir in $PATH
22410do
22411  IFS=$as_save_IFS
22412  test -z "$as_dir" && as_dir=.
22413    for ac_exec_ext in '' $ac_executable_extensions; do
22414  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22415    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22416       ac_prog_rejected=yes
22417       continue
22418     fi
22419    ac_cv_prog_WINLD="link"
22420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22421    break 2
22422  fi
22423done
22424  done
22425IFS=$as_save_IFS
22426
22427if test $ac_prog_rejected = yes; then
22428  # We found a bogon in the path, so make sure we never use it.
22429  set dummy $ac_cv_prog_WINLD
22430  shift
22431  if test $# != 0; then
22432    # We chose a different compiler from the bogus one.
22433    # However, it has the same basename, so the bogon will be chosen
22434    # first if we set WINLD to just the basename; use the full file name.
22435    shift
22436    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22437  fi
22438fi
22439fi
22440fi
22441WINLD=$ac_cv_prog_WINLD
22442if test -n "$WINLD"; then
22443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22444$as_echo "$WINLD" >&6; }
22445else
22446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22447$as_echo "no" >&6; }
22448fi
22449
22450
22451    # Since we must ignore the first found link, WINLD will contain
22452    # the full path to the link.exe program.
22453
22454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22455
22456  # First separate the path from the arguments. This will split at the first
22457  # space.
22458  complete="$WINLD"
22459  path="${complete%% *}"
22460  tmp="$complete EOL"
22461  arguments="${tmp#* }"
22462
22463  # Input might be given as Windows format, start by converting to
22464  # unix format.
22465  new_path=`$CYGPATH -u "$path"`
22466
22467  # Now try to locate executable using which
22468  new_path=`$WHICH "$new_path" 2> /dev/null`
22469  # bat and cmd files are not always considered executable in cygwin causing which
22470  # to not find them
22471  if test "x$new_path" = x \
22472           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22473           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22474    new_path=`$CYGPATH -u "$path"`
22475  fi
22476  if test "x$new_path" = x; then
22477    # Oops. Which didn't find the executable.
22478    # The splitting of arguments from the executable at a space might have been incorrect,
22479    # since paths with space are more likely in Windows. Give it another try with the whole
22480    # argument.
22481    path="$complete"
22482    arguments="EOL"
22483    new_path=`$CYGPATH -u "$path"`
22484    new_path=`$WHICH "$new_path" 2> /dev/null`
22485    # bat and cmd files are not always considered executable in cygwin causing which
22486    # to not find them
22487    if test "x$new_path" = x \
22488             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22489             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22490      new_path=`$CYGPATH -u "$path"`
22491    fi
22492    if test "x$new_path" = x; then
22493      # It's still not found. Now this is an unrecoverable error.
22494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22495$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22496      has_space=`$ECHO "$complete" | $GREP " "`
22497      if test "x$has_space" != x; then
22498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22500      fi
22501      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22502    fi
22503  fi
22504
22505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22508  # "foo.exe" is OK but "foo" is an error.
22509  #
22510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22511  # It is also a way to make sure we got the proper file name for the real test later on.
22512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22513  if test "x$test_shortpath" = x; then
22514    # Short path failed, file does not exist as specified.
22515    # Try adding .exe or .cmd
22516    if test -f "${new_path}.exe"; then
22517       input_to_shortpath="${new_path}.exe"
22518    elif test -f "${new_path}.cmd"; then
22519       input_to_shortpath="${new_path}.cmd"
22520    else
22521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22522$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22525      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22526    fi
22527  else
22528    input_to_shortpath="$new_path"
22529  fi
22530
22531  # Call helper function which possibly converts this using DOS-style short mode.
22532  # If so, the updated path is stored in $new_path.
22533  new_path="$input_to_shortpath"
22534
22535  input_path="$input_to_shortpath"
22536  # Check if we need to convert this using DOS-style short mode. If the path
22537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22538  # take no chances and rewrite it.
22539  # Note: m4 eats our [], so we need to use [ and ] instead.
22540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22541  if test "x$has_forbidden_chars" != x; then
22542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22546      # Going to short mode and back again did indeed matter. Since short mode is
22547      # case insensitive, let's make it lowercase to improve readability.
22548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22549      # Now convert it back to Unix-stile (cygpath)
22550      input_path=`$CYGPATH -u "$shortmode_path"`
22551      new_path="$input_path"
22552    fi
22553  fi
22554
22555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22556  if test "x$test_cygdrive_prefix" = x; then
22557    # As a simple fix, exclude /usr/bin since it's not a real path.
22558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22560      # a path prefixed by /cygdrive for fixpath to work.
22561      new_path="$CYGWIN_ROOT_PATH$input_path"
22562    fi
22563  fi
22564
22565  # remove trailing .exe if any
22566  new_path="${new_path/%.exe/}"
22567
22568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22569
22570  # First separate the path from the arguments. This will split at the first
22571  # space.
22572  complete="$WINLD"
22573  path="${complete%% *}"
22574  tmp="$complete EOL"
22575  arguments="${tmp#* }"
22576
22577  # Input might be given as Windows format, start by converting to
22578  # unix format.
22579  new_path="$path"
22580
22581  windows_path="$new_path"
22582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22583    unix_path=`$CYGPATH -u "$windows_path"`
22584    new_path="$unix_path"
22585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22587    new_path="$unix_path"
22588  fi
22589
22590
22591  # Now try to locate executable using which
22592  new_path=`$WHICH "$new_path" 2> /dev/null`
22593
22594  if test "x$new_path" = x; then
22595    # Oops. Which didn't find the executable.
22596    # The splitting of arguments from the executable at a space might have been incorrect,
22597    # since paths with space are more likely in Windows. Give it another try with the whole
22598    # argument.
22599    path="$complete"
22600    arguments="EOL"
22601    new_path="$path"
22602
22603  windows_path="$new_path"
22604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22605    unix_path=`$CYGPATH -u "$windows_path"`
22606    new_path="$unix_path"
22607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22609    new_path="$unix_path"
22610  fi
22611
22612
22613    new_path=`$WHICH "$new_path" 2> /dev/null`
22614
22615    if test "x$new_path" = x; then
22616      # It's still not found. Now this is an unrecoverable error.
22617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22618$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22619      has_space=`$ECHO "$complete" | $GREP " "`
22620      if test "x$has_space" != x; then
22621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22623      fi
22624      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22625    fi
22626  fi
22627
22628  # Now new_path has a complete unix path to the binary
22629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22630    # Keep paths in /bin as-is, but remove trailing .exe if any
22631    new_path="${new_path/%.exe/}"
22632    # Do not save /bin paths to all_fixpath_prefixes!
22633  else
22634    # Not in mixed or Windows style, start by that.
22635    new_path=`cmd //c echo $new_path`
22636
22637  input_path="$new_path"
22638  # Check if we need to convert this using DOS-style short mode. If the path
22639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22640  # take no chances and rewrite it.
22641  # Note: m4 eats our [], so we need to use [ and ] instead.
22642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22643  if test "x$has_forbidden_chars" != x; then
22644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22646  fi
22647
22648    # Output is in $new_path
22649
22650  windows_path="$new_path"
22651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22652    unix_path=`$CYGPATH -u "$windows_path"`
22653    new_path="$unix_path"
22654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22656    new_path="$unix_path"
22657  fi
22658
22659    # remove trailing .exe if any
22660    new_path="${new_path/%.exe/}"
22661
22662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22664  fi
22665
22666  else
22667    # We're on a posix platform. Hooray! :)
22668    # First separate the path from the arguments. This will split at the first
22669    # space.
22670    complete="$WINLD"
22671    path="${complete%% *}"
22672    tmp="$complete EOL"
22673    arguments="${tmp#* }"
22674
22675    # Cannot rely on the command "which" here since it doesn't always work.
22676    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22677    if test -z "$is_absolute_path"; then
22678      # Path to executable is not absolute. Find it.
22679      IFS_save="$IFS"
22680      IFS=:
22681      for p in $PATH; do
22682        if test -f "$p/$path" && test -x "$p/$path"; then
22683          new_path="$p/$path"
22684          break
22685        fi
22686      done
22687      IFS="$IFS_save"
22688    else
22689      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22690$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22691      new_path="$path"
22692    fi
22693
22694    if test "x$new_path" = x; then
22695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22696$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22697        has_space=`$ECHO "$complete" | $GREP " "`
22698        if test "x$has_space" != x; then
22699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22701        fi
22702        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22703      fi
22704  fi
22705
22706      # Now join together the path and the arguments once again
22707      if test "x$arguments" != xEOL; then
22708        new_complete="$new_path ${arguments% *}"
22709      else
22710        new_complete="$new_path"
22711      fi
22712
22713  if test "x$complete" != "x$new_complete"; then
22714      WINLD="$new_complete"
22715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22716$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22717    fi
22718
22719    printf "Windows linker was found at $WINLD\n"
22720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22721$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22722    "$WINLD" --version > /dev/null
22723    if test $? -eq 0 ; then
22724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22725$as_echo "no" >&6; }
22726      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22727    else
22728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22729$as_echo "yes" >&6; }
22730    fi
22731    LD="$WINLD"
22732    LDEXE="$WINLD"
22733    LDCXX="$WINLD"
22734    LDEXECXX="$WINLD"
22735
22736    # Extract the first word of "mt", so it can be a program name with args.
22737set dummy mt; ac_word=$2
22738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22739$as_echo_n "checking for $ac_word... " >&6; }
22740if test "${ac_cv_prog_MT+set}" = set; then :
22741  $as_echo_n "(cached) " >&6
22742else
22743  if test -n "$MT"; then
22744  ac_cv_prog_MT="$MT" # Let the user override the test.
22745else
22746  ac_prog_rejected=no
22747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22748for as_dir in $PATH
22749do
22750  IFS=$as_save_IFS
22751  test -z "$as_dir" && as_dir=.
22752    for ac_exec_ext in '' $ac_executable_extensions; do
22753  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22754    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22755       ac_prog_rejected=yes
22756       continue
22757     fi
22758    ac_cv_prog_MT="mt"
22759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22760    break 2
22761  fi
22762done
22763  done
22764IFS=$as_save_IFS
22765
22766if test $ac_prog_rejected = yes; then
22767  # We found a bogon in the path, so make sure we never use it.
22768  set dummy $ac_cv_prog_MT
22769  shift
22770  if test $# != 0; then
22771    # We chose a different compiler from the bogus one.
22772    # However, it has the same basename, so the bogon will be chosen
22773    # first if we set MT to just the basename; use the full file name.
22774    shift
22775    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22776  fi
22777fi
22778fi
22779fi
22780MT=$ac_cv_prog_MT
22781if test -n "$MT"; then
22782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22783$as_echo "$MT" >&6; }
22784else
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22786$as_echo "no" >&6; }
22787fi
22788
22789
22790
22791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22792
22793  # First separate the path from the arguments. This will split at the first
22794  # space.
22795  complete="$MT"
22796  path="${complete%% *}"
22797  tmp="$complete EOL"
22798  arguments="${tmp#* }"
22799
22800  # Input might be given as Windows format, start by converting to
22801  # unix format.
22802  new_path=`$CYGPATH -u "$path"`
22803
22804  # Now try to locate executable using which
22805  new_path=`$WHICH "$new_path" 2> /dev/null`
22806  # bat and cmd files are not always considered executable in cygwin causing which
22807  # to not find them
22808  if test "x$new_path" = x \
22809           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22810           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22811    new_path=`$CYGPATH -u "$path"`
22812  fi
22813  if test "x$new_path" = x; then
22814    # Oops. Which didn't find the executable.
22815    # The splitting of arguments from the executable at a space might have been incorrect,
22816    # since paths with space are more likely in Windows. Give it another try with the whole
22817    # argument.
22818    path="$complete"
22819    arguments="EOL"
22820    new_path=`$CYGPATH -u "$path"`
22821    new_path=`$WHICH "$new_path" 2> /dev/null`
22822    # bat and cmd files are not always considered executable in cygwin causing which
22823    # to not find them
22824    if test "x$new_path" = x \
22825             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22826             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22827      new_path=`$CYGPATH -u "$path"`
22828    fi
22829    if test "x$new_path" = x; then
22830      # It's still not found. Now this is an unrecoverable error.
22831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22832$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22833      has_space=`$ECHO "$complete" | $GREP " "`
22834      if test "x$has_space" != x; then
22835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22837      fi
22838      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22839    fi
22840  fi
22841
22842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22845  # "foo.exe" is OK but "foo" is an error.
22846  #
22847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22848  # It is also a way to make sure we got the proper file name for the real test later on.
22849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22850  if test "x$test_shortpath" = x; then
22851    # Short path failed, file does not exist as specified.
22852    # Try adding .exe or .cmd
22853    if test -f "${new_path}.exe"; then
22854       input_to_shortpath="${new_path}.exe"
22855    elif test -f "${new_path}.cmd"; then
22856       input_to_shortpath="${new_path}.cmd"
22857    else
22858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22859$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22862      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22863    fi
22864  else
22865    input_to_shortpath="$new_path"
22866  fi
22867
22868  # Call helper function which possibly converts this using DOS-style short mode.
22869  # If so, the updated path is stored in $new_path.
22870  new_path="$input_to_shortpath"
22871
22872  input_path="$input_to_shortpath"
22873  # Check if we need to convert this using DOS-style short mode. If the path
22874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22875  # take no chances and rewrite it.
22876  # Note: m4 eats our [], so we need to use [ and ] instead.
22877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22878  if test "x$has_forbidden_chars" != x; then
22879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22883      # Going to short mode and back again did indeed matter. Since short mode is
22884      # case insensitive, let's make it lowercase to improve readability.
22885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22886      # Now convert it back to Unix-stile (cygpath)
22887      input_path=`$CYGPATH -u "$shortmode_path"`
22888      new_path="$input_path"
22889    fi
22890  fi
22891
22892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22893  if test "x$test_cygdrive_prefix" = x; then
22894    # As a simple fix, exclude /usr/bin since it's not a real path.
22895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22897      # a path prefixed by /cygdrive for fixpath to work.
22898      new_path="$CYGWIN_ROOT_PATH$input_path"
22899    fi
22900  fi
22901
22902  # remove trailing .exe if any
22903  new_path="${new_path/%.exe/}"
22904
22905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22906
22907  # First separate the path from the arguments. This will split at the first
22908  # space.
22909  complete="$MT"
22910  path="${complete%% *}"
22911  tmp="$complete EOL"
22912  arguments="${tmp#* }"
22913
22914  # Input might be given as Windows format, start by converting to
22915  # unix format.
22916  new_path="$path"
22917
22918  windows_path="$new_path"
22919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22920    unix_path=`$CYGPATH -u "$windows_path"`
22921    new_path="$unix_path"
22922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22924    new_path="$unix_path"
22925  fi
22926
22927
22928  # Now try to locate executable using which
22929  new_path=`$WHICH "$new_path" 2> /dev/null`
22930
22931  if test "x$new_path" = x; then
22932    # Oops. Which didn't find the executable.
22933    # The splitting of arguments from the executable at a space might have been incorrect,
22934    # since paths with space are more likely in Windows. Give it another try with the whole
22935    # argument.
22936    path="$complete"
22937    arguments="EOL"
22938    new_path="$path"
22939
22940  windows_path="$new_path"
22941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22942    unix_path=`$CYGPATH -u "$windows_path"`
22943    new_path="$unix_path"
22944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22946    new_path="$unix_path"
22947  fi
22948
22949
22950    new_path=`$WHICH "$new_path" 2> /dev/null`
22951
22952    if test "x$new_path" = x; then
22953      # It's still not found. Now this is an unrecoverable error.
22954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22955$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22956      has_space=`$ECHO "$complete" | $GREP " "`
22957      if test "x$has_space" != x; then
22958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22960      fi
22961      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22962    fi
22963  fi
22964
22965  # Now new_path has a complete unix path to the binary
22966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22967    # Keep paths in /bin as-is, but remove trailing .exe if any
22968    new_path="${new_path/%.exe/}"
22969    # Do not save /bin paths to all_fixpath_prefixes!
22970  else
22971    # Not in mixed or Windows style, start by that.
22972    new_path=`cmd //c echo $new_path`
22973
22974  input_path="$new_path"
22975  # Check if we need to convert this using DOS-style short mode. If the path
22976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22977  # take no chances and rewrite it.
22978  # Note: m4 eats our [], so we need to use [ and ] instead.
22979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22980  if test "x$has_forbidden_chars" != x; then
22981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22983  fi
22984
22985    # Output is in $new_path
22986
22987  windows_path="$new_path"
22988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22989    unix_path=`$CYGPATH -u "$windows_path"`
22990    new_path="$unix_path"
22991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22993    new_path="$unix_path"
22994  fi
22995
22996    # remove trailing .exe if any
22997    new_path="${new_path/%.exe/}"
22998
22999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23001  fi
23002
23003  else
23004    # We're on a posix platform. Hooray! :)
23005    # First separate the path from the arguments. This will split at the first
23006    # space.
23007    complete="$MT"
23008    path="${complete%% *}"
23009    tmp="$complete EOL"
23010    arguments="${tmp#* }"
23011
23012    # Cannot rely on the command "which" here since it doesn't always work.
23013    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23014    if test -z "$is_absolute_path"; then
23015      # Path to executable is not absolute. Find it.
23016      IFS_save="$IFS"
23017      IFS=:
23018      for p in $PATH; do
23019        if test -f "$p/$path" && test -x "$p/$path"; then
23020          new_path="$p/$path"
23021          break
23022        fi
23023      done
23024      IFS="$IFS_save"
23025    else
23026      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23027$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23028      new_path="$path"
23029    fi
23030
23031    if test "x$new_path" = x; then
23032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23033$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23034        has_space=`$ECHO "$complete" | $GREP " "`
23035        if test "x$has_space" != x; then
23036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23038        fi
23039        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23040      fi
23041  fi
23042
23043      # Now join together the path and the arguments once again
23044      if test "x$arguments" != xEOL; then
23045        new_complete="$new_path ${arguments% *}"
23046      else
23047        new_complete="$new_path"
23048      fi
23049
23050  if test "x$complete" != "x$new_complete"; then
23051      MT="$new_complete"
23052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23053$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23054    fi
23055
23056    # The resource compiler
23057    # Extract the first word of "rc", so it can be a program name with args.
23058set dummy rc; ac_word=$2
23059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23060$as_echo_n "checking for $ac_word... " >&6; }
23061if test "${ac_cv_prog_RC+set}" = set; then :
23062  $as_echo_n "(cached) " >&6
23063else
23064  if test -n "$RC"; then
23065  ac_cv_prog_RC="$RC" # Let the user override the test.
23066else
23067  ac_prog_rejected=no
23068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23069for as_dir in $PATH
23070do
23071  IFS=$as_save_IFS
23072  test -z "$as_dir" && as_dir=.
23073    for ac_exec_ext in '' $ac_executable_extensions; do
23074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23075    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23076       ac_prog_rejected=yes
23077       continue
23078     fi
23079    ac_cv_prog_RC="rc"
23080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23081    break 2
23082  fi
23083done
23084  done
23085IFS=$as_save_IFS
23086
23087if test $ac_prog_rejected = yes; then
23088  # We found a bogon in the path, so make sure we never use it.
23089  set dummy $ac_cv_prog_RC
23090  shift
23091  if test $# != 0; then
23092    # We chose a different compiler from the bogus one.
23093    # However, it has the same basename, so the bogon will be chosen
23094    # first if we set RC to just the basename; use the full file name.
23095    shift
23096    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23097  fi
23098fi
23099fi
23100fi
23101RC=$ac_cv_prog_RC
23102if test -n "$RC"; then
23103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23104$as_echo "$RC" >&6; }
23105else
23106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23107$as_echo "no" >&6; }
23108fi
23109
23110
23111
23112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23113
23114  # First separate the path from the arguments. This will split at the first
23115  # space.
23116  complete="$RC"
23117  path="${complete%% *}"
23118  tmp="$complete EOL"
23119  arguments="${tmp#* }"
23120
23121  # Input might be given as Windows format, start by converting to
23122  # unix format.
23123  new_path=`$CYGPATH -u "$path"`
23124
23125  # Now try to locate executable using which
23126  new_path=`$WHICH "$new_path" 2> /dev/null`
23127  # bat and cmd files are not always considered executable in cygwin causing which
23128  # to not find them
23129  if test "x$new_path" = x \
23130           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23131           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23132    new_path=`$CYGPATH -u "$path"`
23133  fi
23134  if test "x$new_path" = x; then
23135    # Oops. Which didn't find the executable.
23136    # The splitting of arguments from the executable at a space might have been incorrect,
23137    # since paths with space are more likely in Windows. Give it another try with the whole
23138    # argument.
23139    path="$complete"
23140    arguments="EOL"
23141    new_path=`$CYGPATH -u "$path"`
23142    new_path=`$WHICH "$new_path" 2> /dev/null`
23143    # bat and cmd files are not always considered executable in cygwin causing which
23144    # to not find them
23145    if test "x$new_path" = x \
23146             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23147             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23148      new_path=`$CYGPATH -u "$path"`
23149    fi
23150    if test "x$new_path" = x; then
23151      # It's still not found. Now this is an unrecoverable error.
23152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23153$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23154      has_space=`$ECHO "$complete" | $GREP " "`
23155      if test "x$has_space" != x; then
23156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23158      fi
23159      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23160    fi
23161  fi
23162
23163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23166  # "foo.exe" is OK but "foo" is an error.
23167  #
23168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23169  # It is also a way to make sure we got the proper file name for the real test later on.
23170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23171  if test "x$test_shortpath" = x; then
23172    # Short path failed, file does not exist as specified.
23173    # Try adding .exe or .cmd
23174    if test -f "${new_path}.exe"; then
23175       input_to_shortpath="${new_path}.exe"
23176    elif test -f "${new_path}.cmd"; then
23177       input_to_shortpath="${new_path}.cmd"
23178    else
23179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23180$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23181      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23182$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23183      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23184    fi
23185  else
23186    input_to_shortpath="$new_path"
23187  fi
23188
23189  # Call helper function which possibly converts this using DOS-style short mode.
23190  # If so, the updated path is stored in $new_path.
23191  new_path="$input_to_shortpath"
23192
23193  input_path="$input_to_shortpath"
23194  # Check if we need to convert this using DOS-style short mode. If the path
23195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23196  # take no chances and rewrite it.
23197  # Note: m4 eats our [], so we need to use [ and ] instead.
23198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23199  if test "x$has_forbidden_chars" != x; then
23200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23204      # Going to short mode and back again did indeed matter. Since short mode is
23205      # case insensitive, let's make it lowercase to improve readability.
23206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23207      # Now convert it back to Unix-stile (cygpath)
23208      input_path=`$CYGPATH -u "$shortmode_path"`
23209      new_path="$input_path"
23210    fi
23211  fi
23212
23213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23214  if test "x$test_cygdrive_prefix" = x; then
23215    # As a simple fix, exclude /usr/bin since it's not a real path.
23216    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23218      # a path prefixed by /cygdrive for fixpath to work.
23219      new_path="$CYGWIN_ROOT_PATH$input_path"
23220    fi
23221  fi
23222
23223  # remove trailing .exe if any
23224  new_path="${new_path/%.exe/}"
23225
23226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23227
23228  # First separate the path from the arguments. This will split at the first
23229  # space.
23230  complete="$RC"
23231  path="${complete%% *}"
23232  tmp="$complete EOL"
23233  arguments="${tmp#* }"
23234
23235  # Input might be given as Windows format, start by converting to
23236  # unix format.
23237  new_path="$path"
23238
23239  windows_path="$new_path"
23240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23241    unix_path=`$CYGPATH -u "$windows_path"`
23242    new_path="$unix_path"
23243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23245    new_path="$unix_path"
23246  fi
23247
23248
23249  # Now try to locate executable using which
23250  new_path=`$WHICH "$new_path" 2> /dev/null`
23251
23252  if test "x$new_path" = x; then
23253    # Oops. Which didn't find the executable.
23254    # The splitting of arguments from the executable at a space might have been incorrect,
23255    # since paths with space are more likely in Windows. Give it another try with the whole
23256    # argument.
23257    path="$complete"
23258    arguments="EOL"
23259    new_path="$path"
23260
23261  windows_path="$new_path"
23262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23263    unix_path=`$CYGPATH -u "$windows_path"`
23264    new_path="$unix_path"
23265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23267    new_path="$unix_path"
23268  fi
23269
23270
23271    new_path=`$WHICH "$new_path" 2> /dev/null`
23272
23273    if test "x$new_path" = x; then
23274      # It's still not found. Now this is an unrecoverable error.
23275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23276$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23277      has_space=`$ECHO "$complete" | $GREP " "`
23278      if test "x$has_space" != x; then
23279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23281      fi
23282      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23283    fi
23284  fi
23285
23286  # Now new_path has a complete unix path to the binary
23287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23288    # Keep paths in /bin as-is, but remove trailing .exe if any
23289    new_path="${new_path/%.exe/}"
23290    # Do not save /bin paths to all_fixpath_prefixes!
23291  else
23292    # Not in mixed or Windows style, start by that.
23293    new_path=`cmd //c echo $new_path`
23294
23295  input_path="$new_path"
23296  # Check if we need to convert this using DOS-style short mode. If the path
23297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23298  # take no chances and rewrite it.
23299  # Note: m4 eats our [], so we need to use [ and ] instead.
23300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23301  if test "x$has_forbidden_chars" != x; then
23302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23304  fi
23305
23306    # Output is in $new_path
23307
23308  windows_path="$new_path"
23309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23310    unix_path=`$CYGPATH -u "$windows_path"`
23311    new_path="$unix_path"
23312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23314    new_path="$unix_path"
23315  fi
23316
23317    # remove trailing .exe if any
23318    new_path="${new_path/%.exe/}"
23319
23320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23322  fi
23323
23324  else
23325    # We're on a posix platform. Hooray! :)
23326    # First separate the path from the arguments. This will split at the first
23327    # space.
23328    complete="$RC"
23329    path="${complete%% *}"
23330    tmp="$complete EOL"
23331    arguments="${tmp#* }"
23332
23333    # Cannot rely on the command "which" here since it doesn't always work.
23334    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23335    if test -z "$is_absolute_path"; then
23336      # Path to executable is not absolute. Find it.
23337      IFS_save="$IFS"
23338      IFS=:
23339      for p in $PATH; do
23340        if test -f "$p/$path" && test -x "$p/$path"; then
23341          new_path="$p/$path"
23342          break
23343        fi
23344      done
23345      IFS="$IFS_save"
23346    else
23347      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23348$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23349      new_path="$path"
23350    fi
23351
23352    if test "x$new_path" = x; then
23353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23354$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23355        has_space=`$ECHO "$complete" | $GREP " "`
23356        if test "x$has_space" != x; then
23357          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23358$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23359        fi
23360        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23361      fi
23362  fi
23363
23364      # Now join together the path and the arguments once again
23365      if test "x$arguments" != xEOL; then
23366        new_complete="$new_path ${arguments% *}"
23367      else
23368        new_complete="$new_path"
23369      fi
23370
23371  if test "x$complete" != "x$new_complete"; then
23372      RC="$new_complete"
23373      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23374$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23375    fi
23376
23377
23378    # For hotspot, we need these in Windows mixed path,
23379    # so rewrite them all. Need added .exe suffix.
23380    HOTSPOT_CXX="$CXX.exe"
23381    HOTSPOT_LD="$LD.exe"
23382    HOTSPOT_MT="$MT.exe"
23383    HOTSPOT_RC="$RC.exe"
23384
23385  unix_path="$HOTSPOT_CXX"
23386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23387    windows_path=`$CYGPATH -m "$unix_path"`
23388    HOTSPOT_CXX="$windows_path"
23389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23390    windows_path=`cmd //c echo $unix_path`
23391    HOTSPOT_CXX="$windows_path"
23392  fi
23393
23394
23395  unix_path="$HOTSPOT_LD"
23396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23397    windows_path=`$CYGPATH -m "$unix_path"`
23398    HOTSPOT_LD="$windows_path"
23399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23400    windows_path=`cmd //c echo $unix_path`
23401    HOTSPOT_LD="$windows_path"
23402  fi
23403
23404
23405  unix_path="$HOTSPOT_MT"
23406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23407    windows_path=`$CYGPATH -m "$unix_path"`
23408    HOTSPOT_MT="$windows_path"
23409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23410    windows_path=`cmd //c echo $unix_path`
23411    HOTSPOT_MT="$windows_path"
23412  fi
23413
23414
23415  unix_path="$HOTSPOT_RC"
23416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23417    windows_path=`$CYGPATH -m "$unix_path"`
23418    HOTSPOT_RC="$windows_path"
23419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23420    windows_path=`cmd //c echo $unix_path`
23421    HOTSPOT_RC="$windows_path"
23422  fi
23423
23424
23425
23426
23427    RC_FLAGS="-nologo -l 0x409 -r"
23428    if test "x$VARIANT" = xOPT; then :
23429
23430        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23431
23432fi
23433    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23434    if test "x$JDK_UPDATE_VERSION" = x; then :
23435
23436        JDK_UPDATE_VERSION_NOTNULL=0
23437
23438fi
23439    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23440    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23441    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23442    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23443    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23444    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23445    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23446
23447    # lib.exe is used to create static libraries.
23448    # Extract the first word of "lib", so it can be a program name with args.
23449set dummy lib; ac_word=$2
23450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23451$as_echo_n "checking for $ac_word... " >&6; }
23452if test "${ac_cv_prog_WINAR+set}" = set; then :
23453  $as_echo_n "(cached) " >&6
23454else
23455  if test -n "$WINAR"; then
23456  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23457else
23458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23459for as_dir in $PATH
23460do
23461  IFS=$as_save_IFS
23462  test -z "$as_dir" && as_dir=.
23463    for ac_exec_ext in '' $ac_executable_extensions; do
23464  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23465    ac_cv_prog_WINAR="lib"
23466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23467    break 2
23468  fi
23469done
23470  done
23471IFS=$as_save_IFS
23472
23473fi
23474fi
23475WINAR=$ac_cv_prog_WINAR
23476if test -n "$WINAR"; then
23477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23478$as_echo "$WINAR" >&6; }
23479else
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23481$as_echo "no" >&6; }
23482fi
23483
23484
23485
23486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23487
23488  # First separate the path from the arguments. This will split at the first
23489  # space.
23490  complete="$WINAR"
23491  path="${complete%% *}"
23492  tmp="$complete EOL"
23493  arguments="${tmp#* }"
23494
23495  # Input might be given as Windows format, start by converting to
23496  # unix format.
23497  new_path=`$CYGPATH -u "$path"`
23498
23499  # Now try to locate executable using which
23500  new_path=`$WHICH "$new_path" 2> /dev/null`
23501  # bat and cmd files are not always considered executable in cygwin causing which
23502  # to not find them
23503  if test "x$new_path" = x \
23504           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23505           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23506    new_path=`$CYGPATH -u "$path"`
23507  fi
23508  if test "x$new_path" = x; then
23509    # Oops. Which didn't find the executable.
23510    # The splitting of arguments from the executable at a space might have been incorrect,
23511    # since paths with space are more likely in Windows. Give it another try with the whole
23512    # argument.
23513    path="$complete"
23514    arguments="EOL"
23515    new_path=`$CYGPATH -u "$path"`
23516    new_path=`$WHICH "$new_path" 2> /dev/null`
23517    # bat and cmd files are not always considered executable in cygwin causing which
23518    # to not find them
23519    if test "x$new_path" = x \
23520             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23521             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23522      new_path=`$CYGPATH -u "$path"`
23523    fi
23524    if test "x$new_path" = x; then
23525      # It's still not found. Now this is an unrecoverable error.
23526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23527$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23528      has_space=`$ECHO "$complete" | $GREP " "`
23529      if test "x$has_space" != x; then
23530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23532      fi
23533      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23534    fi
23535  fi
23536
23537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23540  # "foo.exe" is OK but "foo" is an error.
23541  #
23542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23543  # It is also a way to make sure we got the proper file name for the real test later on.
23544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23545  if test "x$test_shortpath" = x; then
23546    # Short path failed, file does not exist as specified.
23547    # Try adding .exe or .cmd
23548    if test -f "${new_path}.exe"; then
23549       input_to_shortpath="${new_path}.exe"
23550    elif test -f "${new_path}.cmd"; then
23551       input_to_shortpath="${new_path}.cmd"
23552    else
23553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23554$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23557      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23558    fi
23559  else
23560    input_to_shortpath="$new_path"
23561  fi
23562
23563  # Call helper function which possibly converts this using DOS-style short mode.
23564  # If so, the updated path is stored in $new_path.
23565  new_path="$input_to_shortpath"
23566
23567  input_path="$input_to_shortpath"
23568  # Check if we need to convert this using DOS-style short mode. If the path
23569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23570  # take no chances and rewrite it.
23571  # Note: m4 eats our [], so we need to use [ and ] instead.
23572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23573  if test "x$has_forbidden_chars" != x; then
23574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23578      # Going to short mode and back again did indeed matter. Since short mode is
23579      # case insensitive, let's make it lowercase to improve readability.
23580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23581      # Now convert it back to Unix-stile (cygpath)
23582      input_path=`$CYGPATH -u "$shortmode_path"`
23583      new_path="$input_path"
23584    fi
23585  fi
23586
23587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23588  if test "x$test_cygdrive_prefix" = x; then
23589    # As a simple fix, exclude /usr/bin since it's not a real path.
23590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23592      # a path prefixed by /cygdrive for fixpath to work.
23593      new_path="$CYGWIN_ROOT_PATH$input_path"
23594    fi
23595  fi
23596
23597  # remove trailing .exe if any
23598  new_path="${new_path/%.exe/}"
23599
23600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23601
23602  # First separate the path from the arguments. This will split at the first
23603  # space.
23604  complete="$WINAR"
23605  path="${complete%% *}"
23606  tmp="$complete EOL"
23607  arguments="${tmp#* }"
23608
23609  # Input might be given as Windows format, start by converting to
23610  # unix format.
23611  new_path="$path"
23612
23613  windows_path="$new_path"
23614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23615    unix_path=`$CYGPATH -u "$windows_path"`
23616    new_path="$unix_path"
23617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23619    new_path="$unix_path"
23620  fi
23621
23622
23623  # Now try to locate executable using which
23624  new_path=`$WHICH "$new_path" 2> /dev/null`
23625
23626  if test "x$new_path" = x; then
23627    # Oops. Which didn't find the executable.
23628    # The splitting of arguments from the executable at a space might have been incorrect,
23629    # since paths with space are more likely in Windows. Give it another try with the whole
23630    # argument.
23631    path="$complete"
23632    arguments="EOL"
23633    new_path="$path"
23634
23635  windows_path="$new_path"
23636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23637    unix_path=`$CYGPATH -u "$windows_path"`
23638    new_path="$unix_path"
23639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23641    new_path="$unix_path"
23642  fi
23643
23644
23645    new_path=`$WHICH "$new_path" 2> /dev/null`
23646
23647    if test "x$new_path" = x; then
23648      # It's still not found. Now this is an unrecoverable error.
23649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23650$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23651      has_space=`$ECHO "$complete" | $GREP " "`
23652      if test "x$has_space" != x; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23655      fi
23656      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23657    fi
23658  fi
23659
23660  # Now new_path has a complete unix path to the binary
23661  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23662    # Keep paths in /bin as-is, but remove trailing .exe if any
23663    new_path="${new_path/%.exe/}"
23664    # Do not save /bin paths to all_fixpath_prefixes!
23665  else
23666    # Not in mixed or Windows style, start by that.
23667    new_path=`cmd //c echo $new_path`
23668
23669  input_path="$new_path"
23670  # Check if we need to convert this using DOS-style short mode. If the path
23671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23672  # take no chances and rewrite it.
23673  # Note: m4 eats our [], so we need to use [ and ] instead.
23674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23675  if test "x$has_forbidden_chars" != x; then
23676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23678  fi
23679
23680    # Output is in $new_path
23681
23682  windows_path="$new_path"
23683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23684    unix_path=`$CYGPATH -u "$windows_path"`
23685    new_path="$unix_path"
23686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23688    new_path="$unix_path"
23689  fi
23690
23691    # remove trailing .exe if any
23692    new_path="${new_path/%.exe/}"
23693
23694    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23695    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23696  fi
23697
23698  else
23699    # We're on a posix platform. Hooray! :)
23700    # First separate the path from the arguments. This will split at the first
23701    # space.
23702    complete="$WINAR"
23703    path="${complete%% *}"
23704    tmp="$complete EOL"
23705    arguments="${tmp#* }"
23706
23707    # Cannot rely on the command "which" here since it doesn't always work.
23708    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23709    if test -z "$is_absolute_path"; then
23710      # Path to executable is not absolute. Find it.
23711      IFS_save="$IFS"
23712      IFS=:
23713      for p in $PATH; do
23714        if test -f "$p/$path" && test -x "$p/$path"; then
23715          new_path="$p/$path"
23716          break
23717        fi
23718      done
23719      IFS="$IFS_save"
23720    else
23721      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23722$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23723      new_path="$path"
23724    fi
23725
23726    if test "x$new_path" = x; then
23727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23728$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23729        has_space=`$ECHO "$complete" | $GREP " "`
23730        if test "x$has_space" != x; then
23731          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23732$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23733        fi
23734        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23735      fi
23736  fi
23737
23738      # Now join together the path and the arguments once again
23739      if test "x$arguments" != xEOL; then
23740        new_complete="$new_path ${arguments% *}"
23741      else
23742        new_complete="$new_path"
23743      fi
23744
23745  if test "x$complete" != "x$new_complete"; then
23746      WINAR="$new_complete"
23747      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23748$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23749    fi
23750
23751    AR="$WINAR"
23752    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23753
23754    # Extract the first word of "dumpbin", so it can be a program name with args.
23755set dummy dumpbin; ac_word=$2
23756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23757$as_echo_n "checking for $ac_word... " >&6; }
23758if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23759  $as_echo_n "(cached) " >&6
23760else
23761  if test -n "$DUMPBIN"; then
23762  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23763else
23764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23765for as_dir in $PATH
23766do
23767  IFS=$as_save_IFS
23768  test -z "$as_dir" && as_dir=.
23769    for ac_exec_ext in '' $ac_executable_extensions; do
23770  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23771    ac_cv_prog_DUMPBIN="dumpbin"
23772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23773    break 2
23774  fi
23775done
23776  done
23777IFS=$as_save_IFS
23778
23779fi
23780fi
23781DUMPBIN=$ac_cv_prog_DUMPBIN
23782if test -n "$DUMPBIN"; then
23783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23784$as_echo "$DUMPBIN" >&6; }
23785else
23786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23787$as_echo "no" >&6; }
23788fi
23789
23790
23791
23792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23793
23794  # First separate the path from the arguments. This will split at the first
23795  # space.
23796  complete="$DUMPBIN"
23797  path="${complete%% *}"
23798  tmp="$complete EOL"
23799  arguments="${tmp#* }"
23800
23801  # Input might be given as Windows format, start by converting to
23802  # unix format.
23803  new_path=`$CYGPATH -u "$path"`
23804
23805  # Now try to locate executable using which
23806  new_path=`$WHICH "$new_path" 2> /dev/null`
23807  # bat and cmd files are not always considered executable in cygwin causing which
23808  # to not find them
23809  if test "x$new_path" = x \
23810           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23811           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23812    new_path=`$CYGPATH -u "$path"`
23813  fi
23814  if test "x$new_path" = x; then
23815    # Oops. Which didn't find the executable.
23816    # The splitting of arguments from the executable at a space might have been incorrect,
23817    # since paths with space are more likely in Windows. Give it another try with the whole
23818    # argument.
23819    path="$complete"
23820    arguments="EOL"
23821    new_path=`$CYGPATH -u "$path"`
23822    new_path=`$WHICH "$new_path" 2> /dev/null`
23823    # bat and cmd files are not always considered executable in cygwin causing which
23824    # to not find them
23825    if test "x$new_path" = x \
23826             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23827             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23828      new_path=`$CYGPATH -u "$path"`
23829    fi
23830    if test "x$new_path" = x; then
23831      # It's still not found. Now this is an unrecoverable error.
23832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23833$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23834      has_space=`$ECHO "$complete" | $GREP " "`
23835      if test "x$has_space" != x; then
23836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23838      fi
23839      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23840    fi
23841  fi
23842
23843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23846  # "foo.exe" is OK but "foo" is an error.
23847  #
23848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23849  # It is also a way to make sure we got the proper file name for the real test later on.
23850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23851  if test "x$test_shortpath" = x; then
23852    # Short path failed, file does not exist as specified.
23853    # Try adding .exe or .cmd
23854    if test -f "${new_path}.exe"; then
23855       input_to_shortpath="${new_path}.exe"
23856    elif test -f "${new_path}.cmd"; then
23857       input_to_shortpath="${new_path}.cmd"
23858    else
23859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23860$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23863      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23864    fi
23865  else
23866    input_to_shortpath="$new_path"
23867  fi
23868
23869  # Call helper function which possibly converts this using DOS-style short mode.
23870  # If so, the updated path is stored in $new_path.
23871  new_path="$input_to_shortpath"
23872
23873  input_path="$input_to_shortpath"
23874  # Check if we need to convert this using DOS-style short mode. If the path
23875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23876  # take no chances and rewrite it.
23877  # Note: m4 eats our [], so we need to use [ and ] instead.
23878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23879  if test "x$has_forbidden_chars" != x; then
23880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23884      # Going to short mode and back again did indeed matter. Since short mode is
23885      # case insensitive, let's make it lowercase to improve readability.
23886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23887      # Now convert it back to Unix-stile (cygpath)
23888      input_path=`$CYGPATH -u "$shortmode_path"`
23889      new_path="$input_path"
23890    fi
23891  fi
23892
23893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23894  if test "x$test_cygdrive_prefix" = x; then
23895    # As a simple fix, exclude /usr/bin since it's not a real path.
23896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23898      # a path prefixed by /cygdrive for fixpath to work.
23899      new_path="$CYGWIN_ROOT_PATH$input_path"
23900    fi
23901  fi
23902
23903  # remove trailing .exe if any
23904  new_path="${new_path/%.exe/}"
23905
23906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23907
23908  # First separate the path from the arguments. This will split at the first
23909  # space.
23910  complete="$DUMPBIN"
23911  path="${complete%% *}"
23912  tmp="$complete EOL"
23913  arguments="${tmp#* }"
23914
23915  # Input might be given as Windows format, start by converting to
23916  # unix format.
23917  new_path="$path"
23918
23919  windows_path="$new_path"
23920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23921    unix_path=`$CYGPATH -u "$windows_path"`
23922    new_path="$unix_path"
23923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23925    new_path="$unix_path"
23926  fi
23927
23928
23929  # Now try to locate executable using which
23930  new_path=`$WHICH "$new_path" 2> /dev/null`
23931
23932  if test "x$new_path" = x; then
23933    # Oops. Which didn't find the executable.
23934    # The splitting of arguments from the executable at a space might have been incorrect,
23935    # since paths with space are more likely in Windows. Give it another try with the whole
23936    # argument.
23937    path="$complete"
23938    arguments="EOL"
23939    new_path="$path"
23940
23941  windows_path="$new_path"
23942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23943    unix_path=`$CYGPATH -u "$windows_path"`
23944    new_path="$unix_path"
23945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23947    new_path="$unix_path"
23948  fi
23949
23950
23951    new_path=`$WHICH "$new_path" 2> /dev/null`
23952
23953    if test "x$new_path" = x; then
23954      # It's still not found. Now this is an unrecoverable error.
23955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23956$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23957      has_space=`$ECHO "$complete" | $GREP " "`
23958      if test "x$has_space" != x; then
23959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23961      fi
23962      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23963    fi
23964  fi
23965
23966  # Now new_path has a complete unix path to the binary
23967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23968    # Keep paths in /bin as-is, but remove trailing .exe if any
23969    new_path="${new_path/%.exe/}"
23970    # Do not save /bin paths to all_fixpath_prefixes!
23971  else
23972    # Not in mixed or Windows style, start by that.
23973    new_path=`cmd //c echo $new_path`
23974
23975  input_path="$new_path"
23976  # Check if we need to convert this using DOS-style short mode. If the path
23977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23978  # take no chances and rewrite it.
23979  # Note: m4 eats our [], so we need to use [ and ] instead.
23980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23981  if test "x$has_forbidden_chars" != x; then
23982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23984  fi
23985
23986    # Output is in $new_path
23987
23988  windows_path="$new_path"
23989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23990    unix_path=`$CYGPATH -u "$windows_path"`
23991    new_path="$unix_path"
23992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23994    new_path="$unix_path"
23995  fi
23996
23997    # remove trailing .exe if any
23998    new_path="${new_path/%.exe/}"
23999
24000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24002  fi
24003
24004  else
24005    # We're on a posix platform. Hooray! :)
24006    # First separate the path from the arguments. This will split at the first
24007    # space.
24008    complete="$DUMPBIN"
24009    path="${complete%% *}"
24010    tmp="$complete EOL"
24011    arguments="${tmp#* }"
24012
24013    # Cannot rely on the command "which" here since it doesn't always work.
24014    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24015    if test -z "$is_absolute_path"; then
24016      # Path to executable is not absolute. Find it.
24017      IFS_save="$IFS"
24018      IFS=:
24019      for p in $PATH; do
24020        if test -f "$p/$path" && test -x "$p/$path"; then
24021          new_path="$p/$path"
24022          break
24023        fi
24024      done
24025      IFS="$IFS_save"
24026    else
24027      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24028$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24029      new_path="$path"
24030    fi
24031
24032    if test "x$new_path" = x; then
24033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24034$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24035        has_space=`$ECHO "$complete" | $GREP " "`
24036        if test "x$has_space" != x; then
24037          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24038$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24039        fi
24040        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24041      fi
24042  fi
24043
24044      # Now join together the path and the arguments once again
24045      if test "x$arguments" != xEOL; then
24046        new_complete="$new_path ${arguments% *}"
24047      else
24048        new_complete="$new_path"
24049      fi
24050
24051  if test "x$complete" != "x$new_complete"; then
24052      DUMPBIN="$new_complete"
24053      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24054$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24055    fi
24056
24057
24058    COMPILER_TYPE=CL
24059    CCXXFLAGS="$CCXXFLAGS -nologo"
24060
24061fi
24062
24063
24064
24065ac_ext=c
24066ac_cpp='$CPP $CPPFLAGS'
24067ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24068ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24069ac_compiler_gnu=$ac_cv_c_compiler_gnu
24070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24071$as_echo_n "checking how to run the C preprocessor... " >&6; }
24072# On Suns, sometimes $CPP names a directory.
24073if test -n "$CPP" && test -d "$CPP"; then
24074  CPP=
24075fi
24076if test -z "$CPP"; then
24077  if test "${ac_cv_prog_CPP+set}" = set; then :
24078  $as_echo_n "(cached) " >&6
24079else
24080      # Double quotes because CPP needs to be expanded
24081    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24082    do
24083      ac_preproc_ok=false
24084for ac_c_preproc_warn_flag in '' yes
24085do
24086  # Use a header file that comes with gcc, so configuring glibc
24087  # with a fresh cross-compiler works.
24088  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24089  # <limits.h> exists even on freestanding compilers.
24090  # On the NeXT, cc -E runs the code through the compiler's parser,
24091  # not just through cpp. "Syntax error" is here to catch this case.
24092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24093/* end confdefs.h.  */
24094#ifdef __STDC__
24095# include <limits.h>
24096#else
24097# include <assert.h>
24098#endif
24099		     Syntax error
24100_ACEOF
24101if ac_fn_c_try_cpp "$LINENO"; then :
24102
24103else
24104  # Broken: fails on valid input.
24105continue
24106fi
24107rm -f conftest.err conftest.i conftest.$ac_ext
24108
24109  # OK, works on sane cases.  Now check whether nonexistent headers
24110  # can be detected and how.
24111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24112/* end confdefs.h.  */
24113#include <ac_nonexistent.h>
24114_ACEOF
24115if ac_fn_c_try_cpp "$LINENO"; then :
24116  # Broken: success on invalid input.
24117continue
24118else
24119  # Passes both tests.
24120ac_preproc_ok=:
24121break
24122fi
24123rm -f conftest.err conftest.i conftest.$ac_ext
24124
24125done
24126# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24127rm -f conftest.i conftest.err conftest.$ac_ext
24128if $ac_preproc_ok; then :
24129  break
24130fi
24131
24132    done
24133    ac_cv_prog_CPP=$CPP
24134
24135fi
24136  CPP=$ac_cv_prog_CPP
24137else
24138  ac_cv_prog_CPP=$CPP
24139fi
24140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24141$as_echo "$CPP" >&6; }
24142ac_preproc_ok=false
24143for ac_c_preproc_warn_flag in '' yes
24144do
24145  # Use a header file that comes with gcc, so configuring glibc
24146  # with a fresh cross-compiler works.
24147  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24148  # <limits.h> exists even on freestanding compilers.
24149  # On the NeXT, cc -E runs the code through the compiler's parser,
24150  # not just through cpp. "Syntax error" is here to catch this case.
24151  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24152/* end confdefs.h.  */
24153#ifdef __STDC__
24154# include <limits.h>
24155#else
24156# include <assert.h>
24157#endif
24158		     Syntax error
24159_ACEOF
24160if ac_fn_c_try_cpp "$LINENO"; then :
24161
24162else
24163  # Broken: fails on valid input.
24164continue
24165fi
24166rm -f conftest.err conftest.i conftest.$ac_ext
24167
24168  # OK, works on sane cases.  Now check whether nonexistent headers
24169  # can be detected and how.
24170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24171/* end confdefs.h.  */
24172#include <ac_nonexistent.h>
24173_ACEOF
24174if ac_fn_c_try_cpp "$LINENO"; then :
24175  # Broken: success on invalid input.
24176continue
24177else
24178  # Passes both tests.
24179ac_preproc_ok=:
24180break
24181fi
24182rm -f conftest.err conftest.i conftest.$ac_ext
24183
24184done
24185# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24186rm -f conftest.i conftest.err conftest.$ac_ext
24187if $ac_preproc_ok; then :
24188
24189else
24190  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24192as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24193See \`config.log' for more details" "$LINENO" 5 ; }
24194fi
24195
24196ac_ext=cpp
24197ac_cpp='$CXXCPP $CPPFLAGS'
24198ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24199ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24200ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24201
24202
24203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24204
24205  # First separate the path from the arguments. This will split at the first
24206  # space.
24207  complete="$CPP"
24208  path="${complete%% *}"
24209  tmp="$complete EOL"
24210  arguments="${tmp#* }"
24211
24212  # Input might be given as Windows format, start by converting to
24213  # unix format.
24214  new_path=`$CYGPATH -u "$path"`
24215
24216  # Now try to locate executable using which
24217  new_path=`$WHICH "$new_path" 2> /dev/null`
24218  # bat and cmd files are not always considered executable in cygwin causing which
24219  # to not find them
24220  if test "x$new_path" = x \
24221           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24222           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24223    new_path=`$CYGPATH -u "$path"`
24224  fi
24225  if test "x$new_path" = x; then
24226    # Oops. Which didn't find the executable.
24227    # The splitting of arguments from the executable at a space might have been incorrect,
24228    # since paths with space are more likely in Windows. Give it another try with the whole
24229    # argument.
24230    path="$complete"
24231    arguments="EOL"
24232    new_path=`$CYGPATH -u "$path"`
24233    new_path=`$WHICH "$new_path" 2> /dev/null`
24234    # bat and cmd files are not always considered executable in cygwin causing which
24235    # to not find them
24236    if test "x$new_path" = x \
24237             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24238             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24239      new_path=`$CYGPATH -u "$path"`
24240    fi
24241    if test "x$new_path" = x; then
24242      # It's still not found. Now this is an unrecoverable error.
24243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24244$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24245      has_space=`$ECHO "$complete" | $GREP " "`
24246      if test "x$has_space" != x; then
24247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24249      fi
24250      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24251    fi
24252  fi
24253
24254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24257  # "foo.exe" is OK but "foo" is an error.
24258  #
24259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24260  # It is also a way to make sure we got the proper file name for the real test later on.
24261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24262  if test "x$test_shortpath" = x; then
24263    # Short path failed, file does not exist as specified.
24264    # Try adding .exe or .cmd
24265    if test -f "${new_path}.exe"; then
24266       input_to_shortpath="${new_path}.exe"
24267    elif test -f "${new_path}.cmd"; then
24268       input_to_shortpath="${new_path}.cmd"
24269    else
24270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24271$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24274      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24275    fi
24276  else
24277    input_to_shortpath="$new_path"
24278  fi
24279
24280  # Call helper function which possibly converts this using DOS-style short mode.
24281  # If so, the updated path is stored in $new_path.
24282  new_path="$input_to_shortpath"
24283
24284  input_path="$input_to_shortpath"
24285  # Check if we need to convert this using DOS-style short mode. If the path
24286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24287  # take no chances and rewrite it.
24288  # Note: m4 eats our [], so we need to use [ and ] instead.
24289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24290  if test "x$has_forbidden_chars" != x; then
24291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24295      # Going to short mode and back again did indeed matter. Since short mode is
24296      # case insensitive, let's make it lowercase to improve readability.
24297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24298      # Now convert it back to Unix-stile (cygpath)
24299      input_path=`$CYGPATH -u "$shortmode_path"`
24300      new_path="$input_path"
24301    fi
24302  fi
24303
24304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24305  if test "x$test_cygdrive_prefix" = x; then
24306    # As a simple fix, exclude /usr/bin since it's not a real path.
24307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24309      # a path prefixed by /cygdrive for fixpath to work.
24310      new_path="$CYGWIN_ROOT_PATH$input_path"
24311    fi
24312  fi
24313
24314  # remove trailing .exe if any
24315  new_path="${new_path/%.exe/}"
24316
24317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24318
24319  # First separate the path from the arguments. This will split at the first
24320  # space.
24321  complete="$CPP"
24322  path="${complete%% *}"
24323  tmp="$complete EOL"
24324  arguments="${tmp#* }"
24325
24326  # Input might be given as Windows format, start by converting to
24327  # unix format.
24328  new_path="$path"
24329
24330  windows_path="$new_path"
24331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24332    unix_path=`$CYGPATH -u "$windows_path"`
24333    new_path="$unix_path"
24334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24336    new_path="$unix_path"
24337  fi
24338
24339
24340  # Now try to locate executable using which
24341  new_path=`$WHICH "$new_path" 2> /dev/null`
24342
24343  if test "x$new_path" = x; then
24344    # Oops. Which didn't find the executable.
24345    # The splitting of arguments from the executable at a space might have been incorrect,
24346    # since paths with space are more likely in Windows. Give it another try with the whole
24347    # argument.
24348    path="$complete"
24349    arguments="EOL"
24350    new_path="$path"
24351
24352  windows_path="$new_path"
24353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24354    unix_path=`$CYGPATH -u "$windows_path"`
24355    new_path="$unix_path"
24356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24358    new_path="$unix_path"
24359  fi
24360
24361
24362    new_path=`$WHICH "$new_path" 2> /dev/null`
24363
24364    if test "x$new_path" = x; then
24365      # It's still not found. Now this is an unrecoverable error.
24366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24367$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24368      has_space=`$ECHO "$complete" | $GREP " "`
24369      if test "x$has_space" != x; then
24370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24372      fi
24373      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24374    fi
24375  fi
24376
24377  # Now new_path has a complete unix path to the binary
24378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24379    # Keep paths in /bin as-is, but remove trailing .exe if any
24380    new_path="${new_path/%.exe/}"
24381    # Do not save /bin paths to all_fixpath_prefixes!
24382  else
24383    # Not in mixed or Windows style, start by that.
24384    new_path=`cmd //c echo $new_path`
24385
24386  input_path="$new_path"
24387  # Check if we need to convert this using DOS-style short mode. If the path
24388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24389  # take no chances and rewrite it.
24390  # Note: m4 eats our [], so we need to use [ and ] instead.
24391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24392  if test "x$has_forbidden_chars" != x; then
24393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24395  fi
24396
24397    # Output is in $new_path
24398
24399  windows_path="$new_path"
24400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24401    unix_path=`$CYGPATH -u "$windows_path"`
24402    new_path="$unix_path"
24403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24405    new_path="$unix_path"
24406  fi
24407
24408    # remove trailing .exe if any
24409    new_path="${new_path/%.exe/}"
24410
24411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24413  fi
24414
24415  else
24416    # We're on a posix platform. Hooray! :)
24417    # First separate the path from the arguments. This will split at the first
24418    # space.
24419    complete="$CPP"
24420    path="${complete%% *}"
24421    tmp="$complete EOL"
24422    arguments="${tmp#* }"
24423
24424    # Cannot rely on the command "which" here since it doesn't always work.
24425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24426    if test -z "$is_absolute_path"; then
24427      # Path to executable is not absolute. Find it.
24428      IFS_save="$IFS"
24429      IFS=:
24430      for p in $PATH; do
24431        if test -f "$p/$path" && test -x "$p/$path"; then
24432          new_path="$p/$path"
24433          break
24434        fi
24435      done
24436      IFS="$IFS_save"
24437    else
24438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24439$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24440      new_path="$path"
24441    fi
24442
24443    if test "x$new_path" = x; then
24444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24445$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24446        has_space=`$ECHO "$complete" | $GREP " "`
24447        if test "x$has_space" != x; then
24448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24450        fi
24451        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24452      fi
24453  fi
24454
24455      # Now join together the path and the arguments once again
24456      if test "x$arguments" != xEOL; then
24457        new_complete="$new_path ${arguments% *}"
24458      else
24459        new_complete="$new_path"
24460      fi
24461
24462  if test "x$complete" != "x$new_complete"; then
24463      CPP="$new_complete"
24464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24465$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24466    fi
24467
24468
24469ac_ext=cpp
24470ac_cpp='$CXXCPP $CPPFLAGS'
24471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24475$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24476if test -z "$CXXCPP"; then
24477  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24478  $as_echo_n "(cached) " >&6
24479else
24480      # Double quotes because CXXCPP needs to be expanded
24481    for CXXCPP in "$CXX -E" "/lib/cpp"
24482    do
24483      ac_preproc_ok=false
24484for ac_cxx_preproc_warn_flag in '' yes
24485do
24486  # Use a header file that comes with gcc, so configuring glibc
24487  # with a fresh cross-compiler works.
24488  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24489  # <limits.h> exists even on freestanding compilers.
24490  # On the NeXT, cc -E runs the code through the compiler's parser,
24491  # not just through cpp. "Syntax error" is here to catch this case.
24492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24493/* end confdefs.h.  */
24494#ifdef __STDC__
24495# include <limits.h>
24496#else
24497# include <assert.h>
24498#endif
24499		     Syntax error
24500_ACEOF
24501if ac_fn_cxx_try_cpp "$LINENO"; then :
24502
24503else
24504  # Broken: fails on valid input.
24505continue
24506fi
24507rm -f conftest.err conftest.i conftest.$ac_ext
24508
24509  # OK, works on sane cases.  Now check whether nonexistent headers
24510  # can be detected and how.
24511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24512/* end confdefs.h.  */
24513#include <ac_nonexistent.h>
24514_ACEOF
24515if ac_fn_cxx_try_cpp "$LINENO"; then :
24516  # Broken: success on invalid input.
24517continue
24518else
24519  # Passes both tests.
24520ac_preproc_ok=:
24521break
24522fi
24523rm -f conftest.err conftest.i conftest.$ac_ext
24524
24525done
24526# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24527rm -f conftest.i conftest.err conftest.$ac_ext
24528if $ac_preproc_ok; then :
24529  break
24530fi
24531
24532    done
24533    ac_cv_prog_CXXCPP=$CXXCPP
24534
24535fi
24536  CXXCPP=$ac_cv_prog_CXXCPP
24537else
24538  ac_cv_prog_CXXCPP=$CXXCPP
24539fi
24540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24541$as_echo "$CXXCPP" >&6; }
24542ac_preproc_ok=false
24543for ac_cxx_preproc_warn_flag in '' yes
24544do
24545  # Use a header file that comes with gcc, so configuring glibc
24546  # with a fresh cross-compiler works.
24547  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24548  # <limits.h> exists even on freestanding compilers.
24549  # On the NeXT, cc -E runs the code through the compiler's parser,
24550  # not just through cpp. "Syntax error" is here to catch this case.
24551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24552/* end confdefs.h.  */
24553#ifdef __STDC__
24554# include <limits.h>
24555#else
24556# include <assert.h>
24557#endif
24558		     Syntax error
24559_ACEOF
24560if ac_fn_cxx_try_cpp "$LINENO"; then :
24561
24562else
24563  # Broken: fails on valid input.
24564continue
24565fi
24566rm -f conftest.err conftest.i conftest.$ac_ext
24567
24568  # OK, works on sane cases.  Now check whether nonexistent headers
24569  # can be detected and how.
24570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24571/* end confdefs.h.  */
24572#include <ac_nonexistent.h>
24573_ACEOF
24574if ac_fn_cxx_try_cpp "$LINENO"; then :
24575  # Broken: success on invalid input.
24576continue
24577else
24578  # Passes both tests.
24579ac_preproc_ok=:
24580break
24581fi
24582rm -f conftest.err conftest.i conftest.$ac_ext
24583
24584done
24585# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24586rm -f conftest.i conftest.err conftest.$ac_ext
24587if $ac_preproc_ok; then :
24588
24589else
24590  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24592as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24593See \`config.log' for more details" "$LINENO" 5 ; }
24594fi
24595
24596ac_ext=cpp
24597ac_cpp='$CXXCPP $CPPFLAGS'
24598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24601
24602
24603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24604
24605  # First separate the path from the arguments. This will split at the first
24606  # space.
24607  complete="$CXXCPP"
24608  path="${complete%% *}"
24609  tmp="$complete EOL"
24610  arguments="${tmp#* }"
24611
24612  # Input might be given as Windows format, start by converting to
24613  # unix format.
24614  new_path=`$CYGPATH -u "$path"`
24615
24616  # Now try to locate executable using which
24617  new_path=`$WHICH "$new_path" 2> /dev/null`
24618  # bat and cmd files are not always considered executable in cygwin causing which
24619  # to not find them
24620  if test "x$new_path" = x \
24621           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24622           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24623    new_path=`$CYGPATH -u "$path"`
24624  fi
24625  if test "x$new_path" = x; then
24626    # Oops. Which didn't find the executable.
24627    # The splitting of arguments from the executable at a space might have been incorrect,
24628    # since paths with space are more likely in Windows. Give it another try with the whole
24629    # argument.
24630    path="$complete"
24631    arguments="EOL"
24632    new_path=`$CYGPATH -u "$path"`
24633    new_path=`$WHICH "$new_path" 2> /dev/null`
24634    # bat and cmd files are not always considered executable in cygwin causing which
24635    # to not find them
24636    if test "x$new_path" = x \
24637             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24638             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24639      new_path=`$CYGPATH -u "$path"`
24640    fi
24641    if test "x$new_path" = x; then
24642      # It's still not found. Now this is an unrecoverable error.
24643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24644$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24645      has_space=`$ECHO "$complete" | $GREP " "`
24646      if test "x$has_space" != x; then
24647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24649      fi
24650      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24651    fi
24652  fi
24653
24654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24657  # "foo.exe" is OK but "foo" is an error.
24658  #
24659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24660  # It is also a way to make sure we got the proper file name for the real test later on.
24661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24662  if test "x$test_shortpath" = x; then
24663    # Short path failed, file does not exist as specified.
24664    # Try adding .exe or .cmd
24665    if test -f "${new_path}.exe"; then
24666       input_to_shortpath="${new_path}.exe"
24667    elif test -f "${new_path}.cmd"; then
24668       input_to_shortpath="${new_path}.cmd"
24669    else
24670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24671$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24674      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24675    fi
24676  else
24677    input_to_shortpath="$new_path"
24678  fi
24679
24680  # Call helper function which possibly converts this using DOS-style short mode.
24681  # If so, the updated path is stored in $new_path.
24682  new_path="$input_to_shortpath"
24683
24684  input_path="$input_to_shortpath"
24685  # Check if we need to convert this using DOS-style short mode. If the path
24686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24687  # take no chances and rewrite it.
24688  # Note: m4 eats our [], so we need to use [ and ] instead.
24689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24690  if test "x$has_forbidden_chars" != x; then
24691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24695      # Going to short mode and back again did indeed matter. Since short mode is
24696      # case insensitive, let's make it lowercase to improve readability.
24697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24698      # Now convert it back to Unix-stile (cygpath)
24699      input_path=`$CYGPATH -u "$shortmode_path"`
24700      new_path="$input_path"
24701    fi
24702  fi
24703
24704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24705  if test "x$test_cygdrive_prefix" = x; then
24706    # As a simple fix, exclude /usr/bin since it's not a real path.
24707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24709      # a path prefixed by /cygdrive for fixpath to work.
24710      new_path="$CYGWIN_ROOT_PATH$input_path"
24711    fi
24712  fi
24713
24714  # remove trailing .exe if any
24715  new_path="${new_path/%.exe/}"
24716
24717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718
24719  # First separate the path from the arguments. This will split at the first
24720  # space.
24721  complete="$CXXCPP"
24722  path="${complete%% *}"
24723  tmp="$complete EOL"
24724  arguments="${tmp#* }"
24725
24726  # Input might be given as Windows format, start by converting to
24727  # unix format.
24728  new_path="$path"
24729
24730  windows_path="$new_path"
24731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24732    unix_path=`$CYGPATH -u "$windows_path"`
24733    new_path="$unix_path"
24734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24736    new_path="$unix_path"
24737  fi
24738
24739
24740  # Now try to locate executable using which
24741  new_path=`$WHICH "$new_path" 2> /dev/null`
24742
24743  if test "x$new_path" = x; then
24744    # Oops. Which didn't find the executable.
24745    # The splitting of arguments from the executable at a space might have been incorrect,
24746    # since paths with space are more likely in Windows. Give it another try with the whole
24747    # argument.
24748    path="$complete"
24749    arguments="EOL"
24750    new_path="$path"
24751
24752  windows_path="$new_path"
24753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24754    unix_path=`$CYGPATH -u "$windows_path"`
24755    new_path="$unix_path"
24756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24758    new_path="$unix_path"
24759  fi
24760
24761
24762    new_path=`$WHICH "$new_path" 2> /dev/null`
24763
24764    if test "x$new_path" = x; then
24765      # It's still not found. Now this is an unrecoverable error.
24766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24767$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24768      has_space=`$ECHO "$complete" | $GREP " "`
24769      if test "x$has_space" != x; then
24770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24772      fi
24773      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24774    fi
24775  fi
24776
24777  # Now new_path has a complete unix path to the binary
24778  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24779    # Keep paths in /bin as-is, but remove trailing .exe if any
24780    new_path="${new_path/%.exe/}"
24781    # Do not save /bin paths to all_fixpath_prefixes!
24782  else
24783    # Not in mixed or Windows style, start by that.
24784    new_path=`cmd //c echo $new_path`
24785
24786  input_path="$new_path"
24787  # Check if we need to convert this using DOS-style short mode. If the path
24788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24789  # take no chances and rewrite it.
24790  # Note: m4 eats our [], so we need to use [ and ] instead.
24791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24792  if test "x$has_forbidden_chars" != x; then
24793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24795  fi
24796
24797    # Output is in $new_path
24798
24799  windows_path="$new_path"
24800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24801    unix_path=`$CYGPATH -u "$windows_path"`
24802    new_path="$unix_path"
24803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24805    new_path="$unix_path"
24806  fi
24807
24808    # remove trailing .exe if any
24809    new_path="${new_path/%.exe/}"
24810
24811    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24812    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24813  fi
24814
24815  else
24816    # We're on a posix platform. Hooray! :)
24817    # First separate the path from the arguments. This will split at the first
24818    # space.
24819    complete="$CXXCPP"
24820    path="${complete%% *}"
24821    tmp="$complete EOL"
24822    arguments="${tmp#* }"
24823
24824    # Cannot rely on the command "which" here since it doesn't always work.
24825    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24826    if test -z "$is_absolute_path"; then
24827      # Path to executable is not absolute. Find it.
24828      IFS_save="$IFS"
24829      IFS=:
24830      for p in $PATH; do
24831        if test -f "$p/$path" && test -x "$p/$path"; then
24832          new_path="$p/$path"
24833          break
24834        fi
24835      done
24836      IFS="$IFS_save"
24837    else
24838      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24839$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24840      new_path="$path"
24841    fi
24842
24843    if test "x$new_path" = x; then
24844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24845$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24846        has_space=`$ECHO "$complete" | $GREP " "`
24847        if test "x$has_space" != x; then
24848          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24849$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24850        fi
24851        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24852      fi
24853  fi
24854
24855      # Now join together the path and the arguments once again
24856      if test "x$arguments" != xEOL; then
24857        new_complete="$new_path ${arguments% *}"
24858      else
24859        new_complete="$new_path"
24860      fi
24861
24862  if test "x$complete" != "x$new_complete"; then
24863      CXXCPP="$new_complete"
24864      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24865$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24866    fi
24867
24868
24869if test "x$COMPILE_TYPE" != "xcross"; then
24870    # If we are not cross compiling, use the same compilers for
24871    # building the build platform executables. The cross-compilation
24872    # case needed to be done earlier, but this can only be done after
24873    # the native tools have been localized.
24874    BUILD_CC="$CC"
24875    BUILD_CXX="$CXX"
24876    BUILD_LD="$LD"
24877fi
24878
24879# for solaris we really need solaris tools, and not gnu equivalent
24880#   these seems to normally reside in /usr/ccs/bin so add that to path before
24881#   starting to probe
24882#
24883#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24884#         so that it can be overriden --with-tools-dir
24885if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24886    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24887fi
24888
24889# Find the right assembler.
24890if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24891    # Extract the first word of "as", so it can be a program name with args.
24892set dummy as; ac_word=$2
24893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24894$as_echo_n "checking for $ac_word... " >&6; }
24895if test "${ac_cv_path_AS+set}" = set; then :
24896  $as_echo_n "(cached) " >&6
24897else
24898  case $AS in
24899  [\\/]* | ?:[\\/]*)
24900  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24901  ;;
24902  *)
24903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24904for as_dir in $PATH
24905do
24906  IFS=$as_save_IFS
24907  test -z "$as_dir" && as_dir=.
24908    for ac_exec_ext in '' $ac_executable_extensions; do
24909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24910    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24912    break 2
24913  fi
24914done
24915  done
24916IFS=$as_save_IFS
24917
24918  ;;
24919esac
24920fi
24921AS=$ac_cv_path_AS
24922if test -n "$AS"; then
24923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24924$as_echo "$AS" >&6; }
24925else
24926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24927$as_echo "no" >&6; }
24928fi
24929
24930
24931
24932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24933
24934  # First separate the path from the arguments. This will split at the first
24935  # space.
24936  complete="$AS"
24937  path="${complete%% *}"
24938  tmp="$complete EOL"
24939  arguments="${tmp#* }"
24940
24941  # Input might be given as Windows format, start by converting to
24942  # unix format.
24943  new_path=`$CYGPATH -u "$path"`
24944
24945  # Now try to locate executable using which
24946  new_path=`$WHICH "$new_path" 2> /dev/null`
24947  # bat and cmd files are not always considered executable in cygwin causing which
24948  # to not find them
24949  if test "x$new_path" = x \
24950           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24951           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24952    new_path=`$CYGPATH -u "$path"`
24953  fi
24954  if test "x$new_path" = x; then
24955    # Oops. Which didn't find the executable.
24956    # The splitting of arguments from the executable at a space might have been incorrect,
24957    # since paths with space are more likely in Windows. Give it another try with the whole
24958    # argument.
24959    path="$complete"
24960    arguments="EOL"
24961    new_path=`$CYGPATH -u "$path"`
24962    new_path=`$WHICH "$new_path" 2> /dev/null`
24963    # bat and cmd files are not always considered executable in cygwin causing which
24964    # to not find them
24965    if test "x$new_path" = x \
24966             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24967             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24968      new_path=`$CYGPATH -u "$path"`
24969    fi
24970    if test "x$new_path" = x; then
24971      # It's still not found. Now this is an unrecoverable error.
24972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24973$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24974      has_space=`$ECHO "$complete" | $GREP " "`
24975      if test "x$has_space" != x; then
24976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24978      fi
24979      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24980    fi
24981  fi
24982
24983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24986  # "foo.exe" is OK but "foo" is an error.
24987  #
24988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24989  # It is also a way to make sure we got the proper file name for the real test later on.
24990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24991  if test "x$test_shortpath" = x; then
24992    # Short path failed, file does not exist as specified.
24993    # Try adding .exe or .cmd
24994    if test -f "${new_path}.exe"; then
24995       input_to_shortpath="${new_path}.exe"
24996    elif test -f "${new_path}.cmd"; then
24997       input_to_shortpath="${new_path}.cmd"
24998    else
24999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25000$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25003      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25004    fi
25005  else
25006    input_to_shortpath="$new_path"
25007  fi
25008
25009  # Call helper function which possibly converts this using DOS-style short mode.
25010  # If so, the updated path is stored in $new_path.
25011  new_path="$input_to_shortpath"
25012
25013  input_path="$input_to_shortpath"
25014  # Check if we need to convert this using DOS-style short mode. If the path
25015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25016  # take no chances and rewrite it.
25017  # Note: m4 eats our [], so we need to use [ and ] instead.
25018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25019  if test "x$has_forbidden_chars" != x; then
25020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25024      # Going to short mode and back again did indeed matter. Since short mode is
25025      # case insensitive, let's make it lowercase to improve readability.
25026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25027      # Now convert it back to Unix-stile (cygpath)
25028      input_path=`$CYGPATH -u "$shortmode_path"`
25029      new_path="$input_path"
25030    fi
25031  fi
25032
25033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25034  if test "x$test_cygdrive_prefix" = x; then
25035    # As a simple fix, exclude /usr/bin since it's not a real path.
25036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25038      # a path prefixed by /cygdrive for fixpath to work.
25039      new_path="$CYGWIN_ROOT_PATH$input_path"
25040    fi
25041  fi
25042
25043  # remove trailing .exe if any
25044  new_path="${new_path/%.exe/}"
25045
25046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25047
25048  # First separate the path from the arguments. This will split at the first
25049  # space.
25050  complete="$AS"
25051  path="${complete%% *}"
25052  tmp="$complete EOL"
25053  arguments="${tmp#* }"
25054
25055  # Input might be given as Windows format, start by converting to
25056  # unix format.
25057  new_path="$path"
25058
25059  windows_path="$new_path"
25060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25061    unix_path=`$CYGPATH -u "$windows_path"`
25062    new_path="$unix_path"
25063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25065    new_path="$unix_path"
25066  fi
25067
25068
25069  # Now try to locate executable using which
25070  new_path=`$WHICH "$new_path" 2> /dev/null`
25071
25072  if test "x$new_path" = x; then
25073    # Oops. Which didn't find the executable.
25074    # The splitting of arguments from the executable at a space might have been incorrect,
25075    # since paths with space are more likely in Windows. Give it another try with the whole
25076    # argument.
25077    path="$complete"
25078    arguments="EOL"
25079    new_path="$path"
25080
25081  windows_path="$new_path"
25082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25083    unix_path=`$CYGPATH -u "$windows_path"`
25084    new_path="$unix_path"
25085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25087    new_path="$unix_path"
25088  fi
25089
25090
25091    new_path=`$WHICH "$new_path" 2> /dev/null`
25092
25093    if test "x$new_path" = x; then
25094      # It's still not found. Now this is an unrecoverable error.
25095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25096$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25097      has_space=`$ECHO "$complete" | $GREP " "`
25098      if test "x$has_space" != x; then
25099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25101      fi
25102      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25103    fi
25104  fi
25105
25106  # Now new_path has a complete unix path to the binary
25107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25108    # Keep paths in /bin as-is, but remove trailing .exe if any
25109    new_path="${new_path/%.exe/}"
25110    # Do not save /bin paths to all_fixpath_prefixes!
25111  else
25112    # Not in mixed or Windows style, start by that.
25113    new_path=`cmd //c echo $new_path`
25114
25115  input_path="$new_path"
25116  # Check if we need to convert this using DOS-style short mode. If the path
25117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25118  # take no chances and rewrite it.
25119  # Note: m4 eats our [], so we need to use [ and ] instead.
25120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25121  if test "x$has_forbidden_chars" != x; then
25122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25124  fi
25125
25126    # Output is in $new_path
25127
25128  windows_path="$new_path"
25129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25130    unix_path=`$CYGPATH -u "$windows_path"`
25131    new_path="$unix_path"
25132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25134    new_path="$unix_path"
25135  fi
25136
25137    # remove trailing .exe if any
25138    new_path="${new_path/%.exe/}"
25139
25140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25142  fi
25143
25144  else
25145    # We're on a posix platform. Hooray! :)
25146    # First separate the path from the arguments. This will split at the first
25147    # space.
25148    complete="$AS"
25149    path="${complete%% *}"
25150    tmp="$complete EOL"
25151    arguments="${tmp#* }"
25152
25153    # Cannot rely on the command "which" here since it doesn't always work.
25154    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25155    if test -z "$is_absolute_path"; then
25156      # Path to executable is not absolute. Find it.
25157      IFS_save="$IFS"
25158      IFS=:
25159      for p in $PATH; do
25160        if test -f "$p/$path" && test -x "$p/$path"; then
25161          new_path="$p/$path"
25162          break
25163        fi
25164      done
25165      IFS="$IFS_save"
25166    else
25167      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25168$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25169      new_path="$path"
25170    fi
25171
25172    if test "x$new_path" = x; then
25173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25174$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25175        has_space=`$ECHO "$complete" | $GREP " "`
25176        if test "x$has_space" != x; then
25177          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25178$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25179        fi
25180        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25181      fi
25182  fi
25183
25184      # Now join together the path and the arguments once again
25185      if test "x$arguments" != xEOL; then
25186        new_complete="$new_path ${arguments% *}"
25187      else
25188        new_complete="$new_path"
25189      fi
25190
25191  if test "x$complete" != "x$new_complete"; then
25192      AS="$new_complete"
25193      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25194$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25195    fi
25196
25197else
25198    AS="$CC -c"
25199fi
25200
25201
25202if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25203    for ac_prog in gnm nm
25204do
25205  # Extract the first word of "$ac_prog", so it can be a program name with args.
25206set dummy $ac_prog; ac_word=$2
25207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25208$as_echo_n "checking for $ac_word... " >&6; }
25209if test "${ac_cv_path_NM+set}" = set; then :
25210  $as_echo_n "(cached) " >&6
25211else
25212  case $NM in
25213  [\\/]* | ?:[\\/]*)
25214  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25215  ;;
25216  *)
25217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25218for as_dir in $PATH
25219do
25220  IFS=$as_save_IFS
25221  test -z "$as_dir" && as_dir=.
25222    for ac_exec_ext in '' $ac_executable_extensions; do
25223  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25224    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25226    break 2
25227  fi
25228done
25229  done
25230IFS=$as_save_IFS
25231
25232  ;;
25233esac
25234fi
25235NM=$ac_cv_path_NM
25236if test -n "$NM"; then
25237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25238$as_echo "$NM" >&6; }
25239else
25240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25241$as_echo "no" >&6; }
25242fi
25243
25244
25245  test -n "$NM" && break
25246done
25247
25248
25249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25250
25251  # First separate the path from the arguments. This will split at the first
25252  # space.
25253  complete="$NM"
25254  path="${complete%% *}"
25255  tmp="$complete EOL"
25256  arguments="${tmp#* }"
25257
25258  # Input might be given as Windows format, start by converting to
25259  # unix format.
25260  new_path=`$CYGPATH -u "$path"`
25261
25262  # Now try to locate executable using which
25263  new_path=`$WHICH "$new_path" 2> /dev/null`
25264  # bat and cmd files are not always considered executable in cygwin causing which
25265  # to not find them
25266  if test "x$new_path" = x \
25267           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25268           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25269    new_path=`$CYGPATH -u "$path"`
25270  fi
25271  if test "x$new_path" = x; then
25272    # Oops. Which didn't find the executable.
25273    # The splitting of arguments from the executable at a space might have been incorrect,
25274    # since paths with space are more likely in Windows. Give it another try with the whole
25275    # argument.
25276    path="$complete"
25277    arguments="EOL"
25278    new_path=`$CYGPATH -u "$path"`
25279    new_path=`$WHICH "$new_path" 2> /dev/null`
25280    # bat and cmd files are not always considered executable in cygwin causing which
25281    # to not find them
25282    if test "x$new_path" = x \
25283             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25284             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25285      new_path=`$CYGPATH -u "$path"`
25286    fi
25287    if test "x$new_path" = x; then
25288      # It's still not found. Now this is an unrecoverable error.
25289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25290$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25291      has_space=`$ECHO "$complete" | $GREP " "`
25292      if test "x$has_space" != x; then
25293        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25294$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25295      fi
25296      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25297    fi
25298  fi
25299
25300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25303  # "foo.exe" is OK but "foo" is an error.
25304  #
25305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25306  # It is also a way to make sure we got the proper file name for the real test later on.
25307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25308  if test "x$test_shortpath" = x; then
25309    # Short path failed, file does not exist as specified.
25310    # Try adding .exe or .cmd
25311    if test -f "${new_path}.exe"; then
25312       input_to_shortpath="${new_path}.exe"
25313    elif test -f "${new_path}.cmd"; then
25314       input_to_shortpath="${new_path}.cmd"
25315    else
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25317$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25318      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25319$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25320      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25321    fi
25322  else
25323    input_to_shortpath="$new_path"
25324  fi
25325
25326  # Call helper function which possibly converts this using DOS-style short mode.
25327  # If so, the updated path is stored in $new_path.
25328  new_path="$input_to_shortpath"
25329
25330  input_path="$input_to_shortpath"
25331  # Check if we need to convert this using DOS-style short mode. If the path
25332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25333  # take no chances and rewrite it.
25334  # Note: m4 eats our [], so we need to use [ and ] instead.
25335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25336  if test "x$has_forbidden_chars" != x; then
25337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25341      # Going to short mode and back again did indeed matter. Since short mode is
25342      # case insensitive, let's make it lowercase to improve readability.
25343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25344      # Now convert it back to Unix-stile (cygpath)
25345      input_path=`$CYGPATH -u "$shortmode_path"`
25346      new_path="$input_path"
25347    fi
25348  fi
25349
25350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25351  if test "x$test_cygdrive_prefix" = x; then
25352    # As a simple fix, exclude /usr/bin since it's not a real path.
25353    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25355      # a path prefixed by /cygdrive for fixpath to work.
25356      new_path="$CYGWIN_ROOT_PATH$input_path"
25357    fi
25358  fi
25359
25360  # remove trailing .exe if any
25361  new_path="${new_path/%.exe/}"
25362
25363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25364
25365  # First separate the path from the arguments. This will split at the first
25366  # space.
25367  complete="$NM"
25368  path="${complete%% *}"
25369  tmp="$complete EOL"
25370  arguments="${tmp#* }"
25371
25372  # Input might be given as Windows format, start by converting to
25373  # unix format.
25374  new_path="$path"
25375
25376  windows_path="$new_path"
25377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25378    unix_path=`$CYGPATH -u "$windows_path"`
25379    new_path="$unix_path"
25380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25382    new_path="$unix_path"
25383  fi
25384
25385
25386  # Now try to locate executable using which
25387  new_path=`$WHICH "$new_path" 2> /dev/null`
25388
25389  if test "x$new_path" = x; then
25390    # Oops. Which didn't find the executable.
25391    # The splitting of arguments from the executable at a space might have been incorrect,
25392    # since paths with space are more likely in Windows. Give it another try with the whole
25393    # argument.
25394    path="$complete"
25395    arguments="EOL"
25396    new_path="$path"
25397
25398  windows_path="$new_path"
25399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25400    unix_path=`$CYGPATH -u "$windows_path"`
25401    new_path="$unix_path"
25402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25404    new_path="$unix_path"
25405  fi
25406
25407
25408    new_path=`$WHICH "$new_path" 2> /dev/null`
25409
25410    if test "x$new_path" = x; then
25411      # It's still not found. Now this is an unrecoverable error.
25412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25413$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25414      has_space=`$ECHO "$complete" | $GREP " "`
25415      if test "x$has_space" != x; then
25416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25418      fi
25419      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25420    fi
25421  fi
25422
25423  # Now new_path has a complete unix path to the binary
25424  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25425    # Keep paths in /bin as-is, but remove trailing .exe if any
25426    new_path="${new_path/%.exe/}"
25427    # Do not save /bin paths to all_fixpath_prefixes!
25428  else
25429    # Not in mixed or Windows style, start by that.
25430    new_path=`cmd //c echo $new_path`
25431
25432  input_path="$new_path"
25433  # Check if we need to convert this using DOS-style short mode. If the path
25434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25435  # take no chances and rewrite it.
25436  # Note: m4 eats our [], so we need to use [ and ] instead.
25437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25438  if test "x$has_forbidden_chars" != x; then
25439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25441  fi
25442
25443    # Output is in $new_path
25444
25445  windows_path="$new_path"
25446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25447    unix_path=`$CYGPATH -u "$windows_path"`
25448    new_path="$unix_path"
25449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25451    new_path="$unix_path"
25452  fi
25453
25454    # remove trailing .exe if any
25455    new_path="${new_path/%.exe/}"
25456
25457    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25458    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25459  fi
25460
25461  else
25462    # We're on a posix platform. Hooray! :)
25463    # First separate the path from the arguments. This will split at the first
25464    # space.
25465    complete="$NM"
25466    path="${complete%% *}"
25467    tmp="$complete EOL"
25468    arguments="${tmp#* }"
25469
25470    # Cannot rely on the command "which" here since it doesn't always work.
25471    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25472    if test -z "$is_absolute_path"; then
25473      # Path to executable is not absolute. Find it.
25474      IFS_save="$IFS"
25475      IFS=:
25476      for p in $PATH; do
25477        if test -f "$p/$path" && test -x "$p/$path"; then
25478          new_path="$p/$path"
25479          break
25480        fi
25481      done
25482      IFS="$IFS_save"
25483    else
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25485$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25486      new_path="$path"
25487    fi
25488
25489    if test "x$new_path" = x; then
25490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25491$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25492        has_space=`$ECHO "$complete" | $GREP " "`
25493        if test "x$has_space" != x; then
25494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25496        fi
25497        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25498      fi
25499  fi
25500
25501      # Now join together the path and the arguments once again
25502      if test "x$arguments" != xEOL; then
25503        new_complete="$new_path ${arguments% *}"
25504      else
25505        new_complete="$new_path"
25506      fi
25507
25508  if test "x$complete" != "x$new_complete"; then
25509      NM="$new_complete"
25510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25511$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25512    fi
25513
25514    # Extract the first word of "strip", so it can be a program name with args.
25515set dummy strip; ac_word=$2
25516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25517$as_echo_n "checking for $ac_word... " >&6; }
25518if test "${ac_cv_path_STRIP+set}" = set; then :
25519  $as_echo_n "(cached) " >&6
25520else
25521  case $STRIP in
25522  [\\/]* | ?:[\\/]*)
25523  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25524  ;;
25525  *)
25526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25527for as_dir in $PATH
25528do
25529  IFS=$as_save_IFS
25530  test -z "$as_dir" && as_dir=.
25531    for ac_exec_ext in '' $ac_executable_extensions; do
25532  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25533    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25535    break 2
25536  fi
25537done
25538  done
25539IFS=$as_save_IFS
25540
25541  ;;
25542esac
25543fi
25544STRIP=$ac_cv_path_STRIP
25545if test -n "$STRIP"; then
25546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25547$as_echo "$STRIP" >&6; }
25548else
25549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25550$as_echo "no" >&6; }
25551fi
25552
25553
25554
25555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25556
25557  # First separate the path from the arguments. This will split at the first
25558  # space.
25559  complete="$STRIP"
25560  path="${complete%% *}"
25561  tmp="$complete EOL"
25562  arguments="${tmp#* }"
25563
25564  # Input might be given as Windows format, start by converting to
25565  # unix format.
25566  new_path=`$CYGPATH -u "$path"`
25567
25568  # Now try to locate executable using which
25569  new_path=`$WHICH "$new_path" 2> /dev/null`
25570  # bat and cmd files are not always considered executable in cygwin causing which
25571  # to not find them
25572  if test "x$new_path" = x \
25573           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25574           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25575    new_path=`$CYGPATH -u "$path"`
25576  fi
25577  if test "x$new_path" = x; then
25578    # Oops. Which didn't find the executable.
25579    # The splitting of arguments from the executable at a space might have been incorrect,
25580    # since paths with space are more likely in Windows. Give it another try with the whole
25581    # argument.
25582    path="$complete"
25583    arguments="EOL"
25584    new_path=`$CYGPATH -u "$path"`
25585    new_path=`$WHICH "$new_path" 2> /dev/null`
25586    # bat and cmd files are not always considered executable in cygwin causing which
25587    # to not find them
25588    if test "x$new_path" = x \
25589             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25590             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25591      new_path=`$CYGPATH -u "$path"`
25592    fi
25593    if test "x$new_path" = x; then
25594      # It's still not found. Now this is an unrecoverable error.
25595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25596$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25597      has_space=`$ECHO "$complete" | $GREP " "`
25598      if test "x$has_space" != x; then
25599        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25600$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25601      fi
25602      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25603    fi
25604  fi
25605
25606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25609  # "foo.exe" is OK but "foo" is an error.
25610  #
25611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25612  # It is also a way to make sure we got the proper file name for the real test later on.
25613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25614  if test "x$test_shortpath" = x; then
25615    # Short path failed, file does not exist as specified.
25616    # Try adding .exe or .cmd
25617    if test -f "${new_path}.exe"; then
25618       input_to_shortpath="${new_path}.exe"
25619    elif test -f "${new_path}.cmd"; then
25620       input_to_shortpath="${new_path}.cmd"
25621    else
25622      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25623$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25624      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25625$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25626      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25627    fi
25628  else
25629    input_to_shortpath="$new_path"
25630  fi
25631
25632  # Call helper function which possibly converts this using DOS-style short mode.
25633  # If so, the updated path is stored in $new_path.
25634  new_path="$input_to_shortpath"
25635
25636  input_path="$input_to_shortpath"
25637  # Check if we need to convert this using DOS-style short mode. If the path
25638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25639  # take no chances and rewrite it.
25640  # Note: m4 eats our [], so we need to use [ and ] instead.
25641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25642  if test "x$has_forbidden_chars" != x; then
25643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25647      # Going to short mode and back again did indeed matter. Since short mode is
25648      # case insensitive, let's make it lowercase to improve readability.
25649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25650      # Now convert it back to Unix-stile (cygpath)
25651      input_path=`$CYGPATH -u "$shortmode_path"`
25652      new_path="$input_path"
25653    fi
25654  fi
25655
25656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25657  if test "x$test_cygdrive_prefix" = x; then
25658    # As a simple fix, exclude /usr/bin since it's not a real path.
25659    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25661      # a path prefixed by /cygdrive for fixpath to work.
25662      new_path="$CYGWIN_ROOT_PATH$input_path"
25663    fi
25664  fi
25665
25666  # remove trailing .exe if any
25667  new_path="${new_path/%.exe/}"
25668
25669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25670
25671  # First separate the path from the arguments. This will split at the first
25672  # space.
25673  complete="$STRIP"
25674  path="${complete%% *}"
25675  tmp="$complete EOL"
25676  arguments="${tmp#* }"
25677
25678  # Input might be given as Windows format, start by converting to
25679  # unix format.
25680  new_path="$path"
25681
25682  windows_path="$new_path"
25683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25684    unix_path=`$CYGPATH -u "$windows_path"`
25685    new_path="$unix_path"
25686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25688    new_path="$unix_path"
25689  fi
25690
25691
25692  # Now try to locate executable using which
25693  new_path=`$WHICH "$new_path" 2> /dev/null`
25694
25695  if test "x$new_path" = x; then
25696    # Oops. Which didn't find the executable.
25697    # The splitting of arguments from the executable at a space might have been incorrect,
25698    # since paths with space are more likely in Windows. Give it another try with the whole
25699    # argument.
25700    path="$complete"
25701    arguments="EOL"
25702    new_path="$path"
25703
25704  windows_path="$new_path"
25705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25706    unix_path=`$CYGPATH -u "$windows_path"`
25707    new_path="$unix_path"
25708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25710    new_path="$unix_path"
25711  fi
25712
25713
25714    new_path=`$WHICH "$new_path" 2> /dev/null`
25715
25716    if test "x$new_path" = x; then
25717      # It's still not found. Now this is an unrecoverable error.
25718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25719$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25720      has_space=`$ECHO "$complete" | $GREP " "`
25721      if test "x$has_space" != x; then
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25724      fi
25725      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25726    fi
25727  fi
25728
25729  # Now new_path has a complete unix path to the binary
25730  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25731    # Keep paths in /bin as-is, but remove trailing .exe if any
25732    new_path="${new_path/%.exe/}"
25733    # Do not save /bin paths to all_fixpath_prefixes!
25734  else
25735    # Not in mixed or Windows style, start by that.
25736    new_path=`cmd //c echo $new_path`
25737
25738  input_path="$new_path"
25739  # Check if we need to convert this using DOS-style short mode. If the path
25740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25741  # take no chances and rewrite it.
25742  # Note: m4 eats our [], so we need to use [ and ] instead.
25743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25744  if test "x$has_forbidden_chars" != x; then
25745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25747  fi
25748
25749    # Output is in $new_path
25750
25751  windows_path="$new_path"
25752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25753    unix_path=`$CYGPATH -u "$windows_path"`
25754    new_path="$unix_path"
25755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25757    new_path="$unix_path"
25758  fi
25759
25760    # remove trailing .exe if any
25761    new_path="${new_path/%.exe/}"
25762
25763    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25764    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25765  fi
25766
25767  else
25768    # We're on a posix platform. Hooray! :)
25769    # First separate the path from the arguments. This will split at the first
25770    # space.
25771    complete="$STRIP"
25772    path="${complete%% *}"
25773    tmp="$complete EOL"
25774    arguments="${tmp#* }"
25775
25776    # Cannot rely on the command "which" here since it doesn't always work.
25777    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25778    if test -z "$is_absolute_path"; then
25779      # Path to executable is not absolute. Find it.
25780      IFS_save="$IFS"
25781      IFS=:
25782      for p in $PATH; do
25783        if test -f "$p/$path" && test -x "$p/$path"; then
25784          new_path="$p/$path"
25785          break
25786        fi
25787      done
25788      IFS="$IFS_save"
25789    else
25790      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25791$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25792      new_path="$path"
25793    fi
25794
25795    if test "x$new_path" = x; then
25796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25797$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25798        has_space=`$ECHO "$complete" | $GREP " "`
25799        if test "x$has_space" != x; then
25800          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25801$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25802        fi
25803        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25804      fi
25805  fi
25806
25807      # Now join together the path and the arguments once again
25808      if test "x$arguments" != xEOL; then
25809        new_complete="$new_path ${arguments% *}"
25810      else
25811        new_complete="$new_path"
25812      fi
25813
25814  if test "x$complete" != "x$new_complete"; then
25815      STRIP="$new_complete"
25816      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25817$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25818    fi
25819
25820    # Extract the first word of "mcs", so it can be a program name with args.
25821set dummy mcs; ac_word=$2
25822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25823$as_echo_n "checking for $ac_word... " >&6; }
25824if test "${ac_cv_path_MCS+set}" = set; then :
25825  $as_echo_n "(cached) " >&6
25826else
25827  case $MCS in
25828  [\\/]* | ?:[\\/]*)
25829  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25830  ;;
25831  *)
25832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25833for as_dir in $PATH
25834do
25835  IFS=$as_save_IFS
25836  test -z "$as_dir" && as_dir=.
25837    for ac_exec_ext in '' $ac_executable_extensions; do
25838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25839    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25841    break 2
25842  fi
25843done
25844  done
25845IFS=$as_save_IFS
25846
25847  ;;
25848esac
25849fi
25850MCS=$ac_cv_path_MCS
25851if test -n "$MCS"; then
25852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25853$as_echo "$MCS" >&6; }
25854else
25855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25856$as_echo "no" >&6; }
25857fi
25858
25859
25860
25861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25862
25863  # First separate the path from the arguments. This will split at the first
25864  # space.
25865  complete="$MCS"
25866  path="${complete%% *}"
25867  tmp="$complete EOL"
25868  arguments="${tmp#* }"
25869
25870  # Input might be given as Windows format, start by converting to
25871  # unix format.
25872  new_path=`$CYGPATH -u "$path"`
25873
25874  # Now try to locate executable using which
25875  new_path=`$WHICH "$new_path" 2> /dev/null`
25876  # bat and cmd files are not always considered executable in cygwin causing which
25877  # to not find them
25878  if test "x$new_path" = x \
25879           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25880           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25881    new_path=`$CYGPATH -u "$path"`
25882  fi
25883  if test "x$new_path" = x; then
25884    # Oops. Which didn't find the executable.
25885    # The splitting of arguments from the executable at a space might have been incorrect,
25886    # since paths with space are more likely in Windows. Give it another try with the whole
25887    # argument.
25888    path="$complete"
25889    arguments="EOL"
25890    new_path=`$CYGPATH -u "$path"`
25891    new_path=`$WHICH "$new_path" 2> /dev/null`
25892    # bat and cmd files are not always considered executable in cygwin causing which
25893    # to not find them
25894    if test "x$new_path" = x \
25895             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25896             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25897      new_path=`$CYGPATH -u "$path"`
25898    fi
25899    if test "x$new_path" = x; then
25900      # It's still not found. Now this is an unrecoverable error.
25901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25902$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25903      has_space=`$ECHO "$complete" | $GREP " "`
25904      if test "x$has_space" != x; then
25905        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25906$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25907      fi
25908      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25909    fi
25910  fi
25911
25912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25915  # "foo.exe" is OK but "foo" is an error.
25916  #
25917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25918  # It is also a way to make sure we got the proper file name for the real test later on.
25919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25920  if test "x$test_shortpath" = x; then
25921    # Short path failed, file does not exist as specified.
25922    # Try adding .exe or .cmd
25923    if test -f "${new_path}.exe"; then
25924       input_to_shortpath="${new_path}.exe"
25925    elif test -f "${new_path}.cmd"; then
25926       input_to_shortpath="${new_path}.cmd"
25927    else
25928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25929$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25930      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25931$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25932      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25933    fi
25934  else
25935    input_to_shortpath="$new_path"
25936  fi
25937
25938  # Call helper function which possibly converts this using DOS-style short mode.
25939  # If so, the updated path is stored in $new_path.
25940  new_path="$input_to_shortpath"
25941
25942  input_path="$input_to_shortpath"
25943  # Check if we need to convert this using DOS-style short mode. If the path
25944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25945  # take no chances and rewrite it.
25946  # Note: m4 eats our [], so we need to use [ and ] instead.
25947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25948  if test "x$has_forbidden_chars" != x; then
25949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25953      # Going to short mode and back again did indeed matter. Since short mode is
25954      # case insensitive, let's make it lowercase to improve readability.
25955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25956      # Now convert it back to Unix-stile (cygpath)
25957      input_path=`$CYGPATH -u "$shortmode_path"`
25958      new_path="$input_path"
25959    fi
25960  fi
25961
25962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25963  if test "x$test_cygdrive_prefix" = x; then
25964    # As a simple fix, exclude /usr/bin since it's not a real path.
25965    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25967      # a path prefixed by /cygdrive for fixpath to work.
25968      new_path="$CYGWIN_ROOT_PATH$input_path"
25969    fi
25970  fi
25971
25972  # remove trailing .exe if any
25973  new_path="${new_path/%.exe/}"
25974
25975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25976
25977  # First separate the path from the arguments. This will split at the first
25978  # space.
25979  complete="$MCS"
25980  path="${complete%% *}"
25981  tmp="$complete EOL"
25982  arguments="${tmp#* }"
25983
25984  # Input might be given as Windows format, start by converting to
25985  # unix format.
25986  new_path="$path"
25987
25988  windows_path="$new_path"
25989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25990    unix_path=`$CYGPATH -u "$windows_path"`
25991    new_path="$unix_path"
25992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25994    new_path="$unix_path"
25995  fi
25996
25997
25998  # Now try to locate executable using which
25999  new_path=`$WHICH "$new_path" 2> /dev/null`
26000
26001  if test "x$new_path" = x; then
26002    # Oops. Which didn't find the executable.
26003    # The splitting of arguments from the executable at a space might have been incorrect,
26004    # since paths with space are more likely in Windows. Give it another try with the whole
26005    # argument.
26006    path="$complete"
26007    arguments="EOL"
26008    new_path="$path"
26009
26010  windows_path="$new_path"
26011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26012    unix_path=`$CYGPATH -u "$windows_path"`
26013    new_path="$unix_path"
26014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26016    new_path="$unix_path"
26017  fi
26018
26019
26020    new_path=`$WHICH "$new_path" 2> /dev/null`
26021
26022    if test "x$new_path" = x; then
26023      # It's still not found. Now this is an unrecoverable error.
26024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26025$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26026      has_space=`$ECHO "$complete" | $GREP " "`
26027      if test "x$has_space" != x; then
26028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26030      fi
26031      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26032    fi
26033  fi
26034
26035  # Now new_path has a complete unix path to the binary
26036  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26037    # Keep paths in /bin as-is, but remove trailing .exe if any
26038    new_path="${new_path/%.exe/}"
26039    # Do not save /bin paths to all_fixpath_prefixes!
26040  else
26041    # Not in mixed or Windows style, start by that.
26042    new_path=`cmd //c echo $new_path`
26043
26044  input_path="$new_path"
26045  # Check if we need to convert this using DOS-style short mode. If the path
26046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26047  # take no chances and rewrite it.
26048  # Note: m4 eats our [], so we need to use [ and ] instead.
26049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26050  if test "x$has_forbidden_chars" != x; then
26051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26053  fi
26054
26055    # Output is in $new_path
26056
26057  windows_path="$new_path"
26058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26059    unix_path=`$CYGPATH -u "$windows_path"`
26060    new_path="$unix_path"
26061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26063    new_path="$unix_path"
26064  fi
26065
26066    # remove trailing .exe if any
26067    new_path="${new_path/%.exe/}"
26068
26069    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26070    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26071  fi
26072
26073  else
26074    # We're on a posix platform. Hooray! :)
26075    # First separate the path from the arguments. This will split at the first
26076    # space.
26077    complete="$MCS"
26078    path="${complete%% *}"
26079    tmp="$complete EOL"
26080    arguments="${tmp#* }"
26081
26082    # Cannot rely on the command "which" here since it doesn't always work.
26083    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26084    if test -z "$is_absolute_path"; then
26085      # Path to executable is not absolute. Find it.
26086      IFS_save="$IFS"
26087      IFS=:
26088      for p in $PATH; do
26089        if test -f "$p/$path" && test -x "$p/$path"; then
26090          new_path="$p/$path"
26091          break
26092        fi
26093      done
26094      IFS="$IFS_save"
26095    else
26096      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26097$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26098      new_path="$path"
26099    fi
26100
26101    if test "x$new_path" = x; then
26102        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26103$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26104        has_space=`$ECHO "$complete" | $GREP " "`
26105        if test "x$has_space" != x; then
26106          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26107$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26108        fi
26109        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26110      fi
26111  fi
26112
26113      # Now join together the path and the arguments once again
26114      if test "x$arguments" != xEOL; then
26115        new_complete="$new_path ${arguments% *}"
26116      else
26117        new_complete="$new_path"
26118      fi
26119
26120  if test "x$complete" != "x$new_complete"; then
26121      MCS="$new_complete"
26122      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26123$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26124    fi
26125
26126elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26127    if test -n "$ac_tool_prefix"; then
26128  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26129set dummy ${ac_tool_prefix}nm; ac_word=$2
26130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26131$as_echo_n "checking for $ac_word... " >&6; }
26132if test "${ac_cv_prog_NM+set}" = set; then :
26133  $as_echo_n "(cached) " >&6
26134else
26135  if test -n "$NM"; then
26136  ac_cv_prog_NM="$NM" # Let the user override the test.
26137else
26138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26139for as_dir in $PATH
26140do
26141  IFS=$as_save_IFS
26142  test -z "$as_dir" && as_dir=.
26143    for ac_exec_ext in '' $ac_executable_extensions; do
26144  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26145    ac_cv_prog_NM="${ac_tool_prefix}nm"
26146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26147    break 2
26148  fi
26149done
26150  done
26151IFS=$as_save_IFS
26152
26153fi
26154fi
26155NM=$ac_cv_prog_NM
26156if test -n "$NM"; then
26157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26158$as_echo "$NM" >&6; }
26159else
26160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26161$as_echo "no" >&6; }
26162fi
26163
26164
26165fi
26166if test -z "$ac_cv_prog_NM"; then
26167  ac_ct_NM=$NM
26168  # Extract the first word of "nm", so it can be a program name with args.
26169set dummy nm; ac_word=$2
26170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26171$as_echo_n "checking for $ac_word... " >&6; }
26172if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26173  $as_echo_n "(cached) " >&6
26174else
26175  if test -n "$ac_ct_NM"; then
26176  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26177else
26178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26179for as_dir in $PATH
26180do
26181  IFS=$as_save_IFS
26182  test -z "$as_dir" && as_dir=.
26183    for ac_exec_ext in '' $ac_executable_extensions; do
26184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26185    ac_cv_prog_ac_ct_NM="nm"
26186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26187    break 2
26188  fi
26189done
26190  done
26191IFS=$as_save_IFS
26192
26193fi
26194fi
26195ac_ct_NM=$ac_cv_prog_ac_ct_NM
26196if test -n "$ac_ct_NM"; then
26197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26198$as_echo "$ac_ct_NM" >&6; }
26199else
26200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26201$as_echo "no" >&6; }
26202fi
26203
26204  if test "x$ac_ct_NM" = x; then
26205    NM=""
26206  else
26207    case $cross_compiling:$ac_tool_warned in
26208yes:)
26209{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26210$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26211ac_tool_warned=yes ;;
26212esac
26213    NM=$ac_ct_NM
26214  fi
26215else
26216  NM="$ac_cv_prog_NM"
26217fi
26218
26219
26220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26221
26222  # First separate the path from the arguments. This will split at the first
26223  # space.
26224  complete="$NM"
26225  path="${complete%% *}"
26226  tmp="$complete EOL"
26227  arguments="${tmp#* }"
26228
26229  # Input might be given as Windows format, start by converting to
26230  # unix format.
26231  new_path=`$CYGPATH -u "$path"`
26232
26233  # Now try to locate executable using which
26234  new_path=`$WHICH "$new_path" 2> /dev/null`
26235  # bat and cmd files are not always considered executable in cygwin causing which
26236  # to not find them
26237  if test "x$new_path" = x \
26238           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26239           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26240    new_path=`$CYGPATH -u "$path"`
26241  fi
26242  if test "x$new_path" = x; then
26243    # Oops. Which didn't find the executable.
26244    # The splitting of arguments from the executable at a space might have been incorrect,
26245    # since paths with space are more likely in Windows. Give it another try with the whole
26246    # argument.
26247    path="$complete"
26248    arguments="EOL"
26249    new_path=`$CYGPATH -u "$path"`
26250    new_path=`$WHICH "$new_path" 2> /dev/null`
26251    # bat and cmd files are not always considered executable in cygwin causing which
26252    # to not find them
26253    if test "x$new_path" = x \
26254             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26255             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26256      new_path=`$CYGPATH -u "$path"`
26257    fi
26258    if test "x$new_path" = x; then
26259      # It's still not found. Now this is an unrecoverable error.
26260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26261$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26262      has_space=`$ECHO "$complete" | $GREP " "`
26263      if test "x$has_space" != x; then
26264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26266      fi
26267      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26268    fi
26269  fi
26270
26271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26274  # "foo.exe" is OK but "foo" is an error.
26275  #
26276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26277  # It is also a way to make sure we got the proper file name for the real test later on.
26278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26279  if test "x$test_shortpath" = x; then
26280    # Short path failed, file does not exist as specified.
26281    # Try adding .exe or .cmd
26282    if test -f "${new_path}.exe"; then
26283       input_to_shortpath="${new_path}.exe"
26284    elif test -f "${new_path}.cmd"; then
26285       input_to_shortpath="${new_path}.cmd"
26286    else
26287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26288$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26291      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26292    fi
26293  else
26294    input_to_shortpath="$new_path"
26295  fi
26296
26297  # Call helper function which possibly converts this using DOS-style short mode.
26298  # If so, the updated path is stored in $new_path.
26299  new_path="$input_to_shortpath"
26300
26301  input_path="$input_to_shortpath"
26302  # Check if we need to convert this using DOS-style short mode. If the path
26303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26304  # take no chances and rewrite it.
26305  # Note: m4 eats our [], so we need to use [ and ] instead.
26306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26307  if test "x$has_forbidden_chars" != x; then
26308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26312      # Going to short mode and back again did indeed matter. Since short mode is
26313      # case insensitive, let's make it lowercase to improve readability.
26314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26315      # Now convert it back to Unix-stile (cygpath)
26316      input_path=`$CYGPATH -u "$shortmode_path"`
26317      new_path="$input_path"
26318    fi
26319  fi
26320
26321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26322  if test "x$test_cygdrive_prefix" = x; then
26323    # As a simple fix, exclude /usr/bin since it's not a real path.
26324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26326      # a path prefixed by /cygdrive for fixpath to work.
26327      new_path="$CYGWIN_ROOT_PATH$input_path"
26328    fi
26329  fi
26330
26331  # remove trailing .exe if any
26332  new_path="${new_path/%.exe/}"
26333
26334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26335
26336  # First separate the path from the arguments. This will split at the first
26337  # space.
26338  complete="$NM"
26339  path="${complete%% *}"
26340  tmp="$complete EOL"
26341  arguments="${tmp#* }"
26342
26343  # Input might be given as Windows format, start by converting to
26344  # unix format.
26345  new_path="$path"
26346
26347  windows_path="$new_path"
26348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26349    unix_path=`$CYGPATH -u "$windows_path"`
26350    new_path="$unix_path"
26351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26353    new_path="$unix_path"
26354  fi
26355
26356
26357  # Now try to locate executable using which
26358  new_path=`$WHICH "$new_path" 2> /dev/null`
26359
26360  if test "x$new_path" = x; then
26361    # Oops. Which didn't find the executable.
26362    # The splitting of arguments from the executable at a space might have been incorrect,
26363    # since paths with space are more likely in Windows. Give it another try with the whole
26364    # argument.
26365    path="$complete"
26366    arguments="EOL"
26367    new_path="$path"
26368
26369  windows_path="$new_path"
26370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26371    unix_path=`$CYGPATH -u "$windows_path"`
26372    new_path="$unix_path"
26373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26375    new_path="$unix_path"
26376  fi
26377
26378
26379    new_path=`$WHICH "$new_path" 2> /dev/null`
26380
26381    if test "x$new_path" = x; then
26382      # It's still not found. Now this is an unrecoverable error.
26383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26384$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26385      has_space=`$ECHO "$complete" | $GREP " "`
26386      if test "x$has_space" != x; then
26387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26389      fi
26390      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26391    fi
26392  fi
26393
26394  # Now new_path has a complete unix path to the binary
26395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26396    # Keep paths in /bin as-is, but remove trailing .exe if any
26397    new_path="${new_path/%.exe/}"
26398    # Do not save /bin paths to all_fixpath_prefixes!
26399  else
26400    # Not in mixed or Windows style, start by that.
26401    new_path=`cmd //c echo $new_path`
26402
26403  input_path="$new_path"
26404  # Check if we need to convert this using DOS-style short mode. If the path
26405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26406  # take no chances and rewrite it.
26407  # Note: m4 eats our [], so we need to use [ and ] instead.
26408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26409  if test "x$has_forbidden_chars" != x; then
26410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26412  fi
26413
26414    # Output is in $new_path
26415
26416  windows_path="$new_path"
26417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26418    unix_path=`$CYGPATH -u "$windows_path"`
26419    new_path="$unix_path"
26420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26422    new_path="$unix_path"
26423  fi
26424
26425    # remove trailing .exe if any
26426    new_path="${new_path/%.exe/}"
26427
26428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26430  fi
26431
26432  else
26433    # We're on a posix platform. Hooray! :)
26434    # First separate the path from the arguments. This will split at the first
26435    # space.
26436    complete="$NM"
26437    path="${complete%% *}"
26438    tmp="$complete EOL"
26439    arguments="${tmp#* }"
26440
26441    # Cannot rely on the command "which" here since it doesn't always work.
26442    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26443    if test -z "$is_absolute_path"; then
26444      # Path to executable is not absolute. Find it.
26445      IFS_save="$IFS"
26446      IFS=:
26447      for p in $PATH; do
26448        if test -f "$p/$path" && test -x "$p/$path"; then
26449          new_path="$p/$path"
26450          break
26451        fi
26452      done
26453      IFS="$IFS_save"
26454    else
26455      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26456$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26457      new_path="$path"
26458    fi
26459
26460    if test "x$new_path" = x; then
26461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26462$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26463        has_space=`$ECHO "$complete" | $GREP " "`
26464        if test "x$has_space" != x; then
26465          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26467        fi
26468        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26469      fi
26470  fi
26471
26472      # Now join together the path and the arguments once again
26473      if test "x$arguments" != xEOL; then
26474        new_complete="$new_path ${arguments% *}"
26475      else
26476        new_complete="$new_path"
26477      fi
26478
26479  if test "x$complete" != "x$new_complete"; then
26480      NM="$new_complete"
26481      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26482$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26483    fi
26484
26485    if test -n "$ac_tool_prefix"; then
26486  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26487set dummy ${ac_tool_prefix}strip; ac_word=$2
26488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26489$as_echo_n "checking for $ac_word... " >&6; }
26490if test "${ac_cv_prog_STRIP+set}" = set; then :
26491  $as_echo_n "(cached) " >&6
26492else
26493  if test -n "$STRIP"; then
26494  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26495else
26496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26497for as_dir in $PATH
26498do
26499  IFS=$as_save_IFS
26500  test -z "$as_dir" && as_dir=.
26501    for ac_exec_ext in '' $ac_executable_extensions; do
26502  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26503    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26505    break 2
26506  fi
26507done
26508  done
26509IFS=$as_save_IFS
26510
26511fi
26512fi
26513STRIP=$ac_cv_prog_STRIP
26514if test -n "$STRIP"; then
26515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26516$as_echo "$STRIP" >&6; }
26517else
26518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26519$as_echo "no" >&6; }
26520fi
26521
26522
26523fi
26524if test -z "$ac_cv_prog_STRIP"; then
26525  ac_ct_STRIP=$STRIP
26526  # Extract the first word of "strip", so it can be a program name with args.
26527set dummy strip; ac_word=$2
26528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26529$as_echo_n "checking for $ac_word... " >&6; }
26530if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
26531  $as_echo_n "(cached) " >&6
26532else
26533  if test -n "$ac_ct_STRIP"; then
26534  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26535else
26536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26537for as_dir in $PATH
26538do
26539  IFS=$as_save_IFS
26540  test -z "$as_dir" && as_dir=.
26541    for ac_exec_ext in '' $ac_executable_extensions; do
26542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26543    ac_cv_prog_ac_ct_STRIP="strip"
26544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26545    break 2
26546  fi
26547done
26548  done
26549IFS=$as_save_IFS
26550
26551fi
26552fi
26553ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26554if test -n "$ac_ct_STRIP"; then
26555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26556$as_echo "$ac_ct_STRIP" >&6; }
26557else
26558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26559$as_echo "no" >&6; }
26560fi
26561
26562  if test "x$ac_ct_STRIP" = x; then
26563    STRIP=""
26564  else
26565    case $cross_compiling:$ac_tool_warned in
26566yes:)
26567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26569ac_tool_warned=yes ;;
26570esac
26571    STRIP=$ac_ct_STRIP
26572  fi
26573else
26574  STRIP="$ac_cv_prog_STRIP"
26575fi
26576
26577
26578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26579
26580  # First separate the path from the arguments. This will split at the first
26581  # space.
26582  complete="$STRIP"
26583  path="${complete%% *}"
26584  tmp="$complete EOL"
26585  arguments="${tmp#* }"
26586
26587  # Input might be given as Windows format, start by converting to
26588  # unix format.
26589  new_path=`$CYGPATH -u "$path"`
26590
26591  # Now try to locate executable using which
26592  new_path=`$WHICH "$new_path" 2> /dev/null`
26593  # bat and cmd files are not always considered executable in cygwin causing which
26594  # to not find them
26595  if test "x$new_path" = x \
26596           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26597           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26598    new_path=`$CYGPATH -u "$path"`
26599  fi
26600  if test "x$new_path" = x; then
26601    # Oops. Which didn't find the executable.
26602    # The splitting of arguments from the executable at a space might have been incorrect,
26603    # since paths with space are more likely in Windows. Give it another try with the whole
26604    # argument.
26605    path="$complete"
26606    arguments="EOL"
26607    new_path=`$CYGPATH -u "$path"`
26608    new_path=`$WHICH "$new_path" 2> /dev/null`
26609    # bat and cmd files are not always considered executable in cygwin causing which
26610    # to not find them
26611    if test "x$new_path" = x \
26612             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26613             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26614      new_path=`$CYGPATH -u "$path"`
26615    fi
26616    if test "x$new_path" = x; then
26617      # It's still not found. Now this is an unrecoverable error.
26618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26619$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26620      has_space=`$ECHO "$complete" | $GREP " "`
26621      if test "x$has_space" != x; then
26622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26624      fi
26625      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26626    fi
26627  fi
26628
26629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26632  # "foo.exe" is OK but "foo" is an error.
26633  #
26634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26635  # It is also a way to make sure we got the proper file name for the real test later on.
26636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26637  if test "x$test_shortpath" = x; then
26638    # Short path failed, file does not exist as specified.
26639    # Try adding .exe or .cmd
26640    if test -f "${new_path}.exe"; then
26641       input_to_shortpath="${new_path}.exe"
26642    elif test -f "${new_path}.cmd"; then
26643       input_to_shortpath="${new_path}.cmd"
26644    else
26645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26646$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26647      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26648$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26649      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26650    fi
26651  else
26652    input_to_shortpath="$new_path"
26653  fi
26654
26655  # Call helper function which possibly converts this using DOS-style short mode.
26656  # If so, the updated path is stored in $new_path.
26657  new_path="$input_to_shortpath"
26658
26659  input_path="$input_to_shortpath"
26660  # Check if we need to convert this using DOS-style short mode. If the path
26661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26662  # take no chances and rewrite it.
26663  # Note: m4 eats our [], so we need to use [ and ] instead.
26664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26665  if test "x$has_forbidden_chars" != x; then
26666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26670      # Going to short mode and back again did indeed matter. Since short mode is
26671      # case insensitive, let's make it lowercase to improve readability.
26672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26673      # Now convert it back to Unix-stile (cygpath)
26674      input_path=`$CYGPATH -u "$shortmode_path"`
26675      new_path="$input_path"
26676    fi
26677  fi
26678
26679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26680  if test "x$test_cygdrive_prefix" = x; then
26681    # As a simple fix, exclude /usr/bin since it's not a real path.
26682    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26684      # a path prefixed by /cygdrive for fixpath to work.
26685      new_path="$CYGWIN_ROOT_PATH$input_path"
26686    fi
26687  fi
26688
26689  # remove trailing .exe if any
26690  new_path="${new_path/%.exe/}"
26691
26692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26693
26694  # First separate the path from the arguments. This will split at the first
26695  # space.
26696  complete="$STRIP"
26697  path="${complete%% *}"
26698  tmp="$complete EOL"
26699  arguments="${tmp#* }"
26700
26701  # Input might be given as Windows format, start by converting to
26702  # unix format.
26703  new_path="$path"
26704
26705  windows_path="$new_path"
26706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26707    unix_path=`$CYGPATH -u "$windows_path"`
26708    new_path="$unix_path"
26709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26711    new_path="$unix_path"
26712  fi
26713
26714
26715  # Now try to locate executable using which
26716  new_path=`$WHICH "$new_path" 2> /dev/null`
26717
26718  if test "x$new_path" = x; then
26719    # Oops. Which didn't find the executable.
26720    # The splitting of arguments from the executable at a space might have been incorrect,
26721    # since paths with space are more likely in Windows. Give it another try with the whole
26722    # argument.
26723    path="$complete"
26724    arguments="EOL"
26725    new_path="$path"
26726
26727  windows_path="$new_path"
26728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26729    unix_path=`$CYGPATH -u "$windows_path"`
26730    new_path="$unix_path"
26731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26733    new_path="$unix_path"
26734  fi
26735
26736
26737    new_path=`$WHICH "$new_path" 2> /dev/null`
26738
26739    if test "x$new_path" = x; then
26740      # It's still not found. Now this is an unrecoverable error.
26741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26742$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26743      has_space=`$ECHO "$complete" | $GREP " "`
26744      if test "x$has_space" != x; then
26745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26747      fi
26748      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26749    fi
26750  fi
26751
26752  # Now new_path has a complete unix path to the binary
26753  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26754    # Keep paths in /bin as-is, but remove trailing .exe if any
26755    new_path="${new_path/%.exe/}"
26756    # Do not save /bin paths to all_fixpath_prefixes!
26757  else
26758    # Not in mixed or Windows style, start by that.
26759    new_path=`cmd //c echo $new_path`
26760
26761  input_path="$new_path"
26762  # Check if we need to convert this using DOS-style short mode. If the path
26763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26764  # take no chances and rewrite it.
26765  # Note: m4 eats our [], so we need to use [ and ] instead.
26766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26767  if test "x$has_forbidden_chars" != x; then
26768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26770  fi
26771
26772    # Output is in $new_path
26773
26774  windows_path="$new_path"
26775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26776    unix_path=`$CYGPATH -u "$windows_path"`
26777    new_path="$unix_path"
26778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26780    new_path="$unix_path"
26781  fi
26782
26783    # remove trailing .exe if any
26784    new_path="${new_path/%.exe/}"
26785
26786    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26787    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26788  fi
26789
26790  else
26791    # We're on a posix platform. Hooray! :)
26792    # First separate the path from the arguments. This will split at the first
26793    # space.
26794    complete="$STRIP"
26795    path="${complete%% *}"
26796    tmp="$complete EOL"
26797    arguments="${tmp#* }"
26798
26799    # Cannot rely on the command "which" here since it doesn't always work.
26800    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26801    if test -z "$is_absolute_path"; then
26802      # Path to executable is not absolute. Find it.
26803      IFS_save="$IFS"
26804      IFS=:
26805      for p in $PATH; do
26806        if test -f "$p/$path" && test -x "$p/$path"; then
26807          new_path="$p/$path"
26808          break
26809        fi
26810      done
26811      IFS="$IFS_save"
26812    else
26813      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26814$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26815      new_path="$path"
26816    fi
26817
26818    if test "x$new_path" = x; then
26819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26820$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26821        has_space=`$ECHO "$complete" | $GREP " "`
26822        if test "x$has_space" != x; then
26823          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26824$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26825        fi
26826        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26827      fi
26828  fi
26829
26830      # Now join together the path and the arguments once again
26831      if test "x$arguments" != xEOL; then
26832        new_complete="$new_path ${arguments% *}"
26833      else
26834        new_complete="$new_path"
26835      fi
26836
26837  if test "x$complete" != "x$new_complete"; then
26838      STRIP="$new_complete"
26839      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26840$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26841    fi
26842
26843fi
26844
26845# objcopy is used for moving debug symbols to separate files when
26846# full debug symbols are enabled.
26847if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26848    if test -n "$ac_tool_prefix"; then
26849  for ac_prog in gobjcopy objcopy
26850  do
26851    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26852set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26854$as_echo_n "checking for $ac_word... " >&6; }
26855if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26856  $as_echo_n "(cached) " >&6
26857else
26858  if test -n "$OBJCOPY"; then
26859  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26860else
26861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26862for as_dir in $PATH
26863do
26864  IFS=$as_save_IFS
26865  test -z "$as_dir" && as_dir=.
26866    for ac_exec_ext in '' $ac_executable_extensions; do
26867  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26868    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26870    break 2
26871  fi
26872done
26873  done
26874IFS=$as_save_IFS
26875
26876fi
26877fi
26878OBJCOPY=$ac_cv_prog_OBJCOPY
26879if test -n "$OBJCOPY"; then
26880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26881$as_echo "$OBJCOPY" >&6; }
26882else
26883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26884$as_echo "no" >&6; }
26885fi
26886
26887
26888    test -n "$OBJCOPY" && break
26889  done
26890fi
26891if test -z "$OBJCOPY"; then
26892  ac_ct_OBJCOPY=$OBJCOPY
26893  for ac_prog in gobjcopy objcopy
26894do
26895  # Extract the first word of "$ac_prog", so it can be a program name with args.
26896set dummy $ac_prog; ac_word=$2
26897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26898$as_echo_n "checking for $ac_word... " >&6; }
26899if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26900  $as_echo_n "(cached) " >&6
26901else
26902  if test -n "$ac_ct_OBJCOPY"; then
26903  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26904else
26905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26906for as_dir in $PATH
26907do
26908  IFS=$as_save_IFS
26909  test -z "$as_dir" && as_dir=.
26910    for ac_exec_ext in '' $ac_executable_extensions; do
26911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26912    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26914    break 2
26915  fi
26916done
26917  done
26918IFS=$as_save_IFS
26919
26920fi
26921fi
26922ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26923if test -n "$ac_ct_OBJCOPY"; then
26924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26925$as_echo "$ac_ct_OBJCOPY" >&6; }
26926else
26927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26928$as_echo "no" >&6; }
26929fi
26930
26931
26932  test -n "$ac_ct_OBJCOPY" && break
26933done
26934
26935  if test "x$ac_ct_OBJCOPY" = x; then
26936    OBJCOPY=""
26937  else
26938    case $cross_compiling:$ac_tool_warned in
26939yes:)
26940{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26941$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26942ac_tool_warned=yes ;;
26943esac
26944    OBJCOPY=$ac_ct_OBJCOPY
26945  fi
26946fi
26947
26948    # Only call fixup if objcopy was found.
26949    if test -n "$OBJCOPY"; then
26950
26951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26952
26953  # First separate the path from the arguments. This will split at the first
26954  # space.
26955  complete="$OBJCOPY"
26956  path="${complete%% *}"
26957  tmp="$complete EOL"
26958  arguments="${tmp#* }"
26959
26960  # Input might be given as Windows format, start by converting to
26961  # unix format.
26962  new_path=`$CYGPATH -u "$path"`
26963
26964  # Now try to locate executable using which
26965  new_path=`$WHICH "$new_path" 2> /dev/null`
26966  # bat and cmd files are not always considered executable in cygwin causing which
26967  # to not find them
26968  if test "x$new_path" = x \
26969           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26970           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26971    new_path=`$CYGPATH -u "$path"`
26972  fi
26973  if test "x$new_path" = x; then
26974    # Oops. Which didn't find the executable.
26975    # The splitting of arguments from the executable at a space might have been incorrect,
26976    # since paths with space are more likely in Windows. Give it another try with the whole
26977    # argument.
26978    path="$complete"
26979    arguments="EOL"
26980    new_path=`$CYGPATH -u "$path"`
26981    new_path=`$WHICH "$new_path" 2> /dev/null`
26982    # bat and cmd files are not always considered executable in cygwin causing which
26983    # to not find them
26984    if test "x$new_path" = x \
26985             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26986             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26987      new_path=`$CYGPATH -u "$path"`
26988    fi
26989    if test "x$new_path" = x; then
26990      # It's still not found. Now this is an unrecoverable error.
26991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26992$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26993      has_space=`$ECHO "$complete" | $GREP " "`
26994      if test "x$has_space" != x; then
26995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26997      fi
26998      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26999    fi
27000  fi
27001
27002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27005  # "foo.exe" is OK but "foo" is an error.
27006  #
27007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27008  # It is also a way to make sure we got the proper file name for the real test later on.
27009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27010  if test "x$test_shortpath" = x; then
27011    # Short path failed, file does not exist as specified.
27012    # Try adding .exe or .cmd
27013    if test -f "${new_path}.exe"; then
27014       input_to_shortpath="${new_path}.exe"
27015    elif test -f "${new_path}.cmd"; then
27016       input_to_shortpath="${new_path}.cmd"
27017    else
27018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27019$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27020      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27021$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27022      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27023    fi
27024  else
27025    input_to_shortpath="$new_path"
27026  fi
27027
27028  # Call helper function which possibly converts this using DOS-style short mode.
27029  # If so, the updated path is stored in $new_path.
27030  new_path="$input_to_shortpath"
27031
27032  input_path="$input_to_shortpath"
27033  # Check if we need to convert this using DOS-style short mode. If the path
27034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27035  # take no chances and rewrite it.
27036  # Note: m4 eats our [], so we need to use [ and ] instead.
27037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27038  if test "x$has_forbidden_chars" != x; then
27039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27043      # Going to short mode and back again did indeed matter. Since short mode is
27044      # case insensitive, let's make it lowercase to improve readability.
27045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27046      # Now convert it back to Unix-stile (cygpath)
27047      input_path=`$CYGPATH -u "$shortmode_path"`
27048      new_path="$input_path"
27049    fi
27050  fi
27051
27052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27053  if test "x$test_cygdrive_prefix" = x; then
27054    # As a simple fix, exclude /usr/bin since it's not a real path.
27055    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27057      # a path prefixed by /cygdrive for fixpath to work.
27058      new_path="$CYGWIN_ROOT_PATH$input_path"
27059    fi
27060  fi
27061
27062  # remove trailing .exe if any
27063  new_path="${new_path/%.exe/}"
27064
27065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27066
27067  # First separate the path from the arguments. This will split at the first
27068  # space.
27069  complete="$OBJCOPY"
27070  path="${complete%% *}"
27071  tmp="$complete EOL"
27072  arguments="${tmp#* }"
27073
27074  # Input might be given as Windows format, start by converting to
27075  # unix format.
27076  new_path="$path"
27077
27078  windows_path="$new_path"
27079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27080    unix_path=`$CYGPATH -u "$windows_path"`
27081    new_path="$unix_path"
27082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27084    new_path="$unix_path"
27085  fi
27086
27087
27088  # Now try to locate executable using which
27089  new_path=`$WHICH "$new_path" 2> /dev/null`
27090
27091  if test "x$new_path" = x; then
27092    # Oops. Which didn't find the executable.
27093    # The splitting of arguments from the executable at a space might have been incorrect,
27094    # since paths with space are more likely in Windows. Give it another try with the whole
27095    # argument.
27096    path="$complete"
27097    arguments="EOL"
27098    new_path="$path"
27099
27100  windows_path="$new_path"
27101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27102    unix_path=`$CYGPATH -u "$windows_path"`
27103    new_path="$unix_path"
27104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27106    new_path="$unix_path"
27107  fi
27108
27109
27110    new_path=`$WHICH "$new_path" 2> /dev/null`
27111
27112    if test "x$new_path" = x; then
27113      # It's still not found. Now this is an unrecoverable error.
27114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27115$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27116      has_space=`$ECHO "$complete" | $GREP " "`
27117      if test "x$has_space" != x; then
27118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27120      fi
27121      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27122    fi
27123  fi
27124
27125  # Now new_path has a complete unix path to the binary
27126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27127    # Keep paths in /bin as-is, but remove trailing .exe if any
27128    new_path="${new_path/%.exe/}"
27129    # Do not save /bin paths to all_fixpath_prefixes!
27130  else
27131    # Not in mixed or Windows style, start by that.
27132    new_path=`cmd //c echo $new_path`
27133
27134  input_path="$new_path"
27135  # Check if we need to convert this using DOS-style short mode. If the path
27136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27137  # take no chances and rewrite it.
27138  # Note: m4 eats our [], so we need to use [ and ] instead.
27139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27140  if test "x$has_forbidden_chars" != x; then
27141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27143  fi
27144
27145    # Output is in $new_path
27146
27147  windows_path="$new_path"
27148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27149    unix_path=`$CYGPATH -u "$windows_path"`
27150    new_path="$unix_path"
27151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27153    new_path="$unix_path"
27154  fi
27155
27156    # remove trailing .exe if any
27157    new_path="${new_path/%.exe/}"
27158
27159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27161  fi
27162
27163  else
27164    # We're on a posix platform. Hooray! :)
27165    # First separate the path from the arguments. This will split at the first
27166    # space.
27167    complete="$OBJCOPY"
27168    path="${complete%% *}"
27169    tmp="$complete EOL"
27170    arguments="${tmp#* }"
27171
27172    # Cannot rely on the command "which" here since it doesn't always work.
27173    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27174    if test -z "$is_absolute_path"; then
27175      # Path to executable is not absolute. Find it.
27176      IFS_save="$IFS"
27177      IFS=:
27178      for p in $PATH; do
27179        if test -f "$p/$path" && test -x "$p/$path"; then
27180          new_path="$p/$path"
27181          break
27182        fi
27183      done
27184      IFS="$IFS_save"
27185    else
27186      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27187$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27188      new_path="$path"
27189    fi
27190
27191    if test "x$new_path" = x; then
27192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27193$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27194        has_space=`$ECHO "$complete" | $GREP " "`
27195        if test "x$has_space" != x; then
27196          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27197$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27198        fi
27199        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27200      fi
27201  fi
27202
27203      # Now join together the path and the arguments once again
27204      if test "x$arguments" != xEOL; then
27205        new_complete="$new_path ${arguments% *}"
27206      else
27207        new_complete="$new_path"
27208      fi
27209
27210  if test "x$complete" != "x$new_complete"; then
27211      OBJCOPY="$new_complete"
27212      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27213$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27214    fi
27215
27216    fi
27217fi
27218
27219if test -n "$ac_tool_prefix"; then
27220  for ac_prog in gobjdump objdump
27221  do
27222    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27223set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27225$as_echo_n "checking for $ac_word... " >&6; }
27226if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27227  $as_echo_n "(cached) " >&6
27228else
27229  if test -n "$OBJDUMP"; then
27230  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27231else
27232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27233for as_dir in $PATH
27234do
27235  IFS=$as_save_IFS
27236  test -z "$as_dir" && as_dir=.
27237    for ac_exec_ext in '' $ac_executable_extensions; do
27238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27239    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27241    break 2
27242  fi
27243done
27244  done
27245IFS=$as_save_IFS
27246
27247fi
27248fi
27249OBJDUMP=$ac_cv_prog_OBJDUMP
27250if test -n "$OBJDUMP"; then
27251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27252$as_echo "$OBJDUMP" >&6; }
27253else
27254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27255$as_echo "no" >&6; }
27256fi
27257
27258
27259    test -n "$OBJDUMP" && break
27260  done
27261fi
27262if test -z "$OBJDUMP"; then
27263  ac_ct_OBJDUMP=$OBJDUMP
27264  for ac_prog in gobjdump objdump
27265do
27266  # Extract the first word of "$ac_prog", so it can be a program name with args.
27267set dummy $ac_prog; ac_word=$2
27268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27269$as_echo_n "checking for $ac_word... " >&6; }
27270if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27271  $as_echo_n "(cached) " >&6
27272else
27273  if test -n "$ac_ct_OBJDUMP"; then
27274  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27275else
27276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27277for as_dir in $PATH
27278do
27279  IFS=$as_save_IFS
27280  test -z "$as_dir" && as_dir=.
27281    for ac_exec_ext in '' $ac_executable_extensions; do
27282  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27283    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27285    break 2
27286  fi
27287done
27288  done
27289IFS=$as_save_IFS
27290
27291fi
27292fi
27293ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27294if test -n "$ac_ct_OBJDUMP"; then
27295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27296$as_echo "$ac_ct_OBJDUMP" >&6; }
27297else
27298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27299$as_echo "no" >&6; }
27300fi
27301
27302
27303  test -n "$ac_ct_OBJDUMP" && break
27304done
27305
27306  if test "x$ac_ct_OBJDUMP" = x; then
27307    OBJDUMP=""
27308  else
27309    case $cross_compiling:$ac_tool_warned in
27310yes:)
27311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27313ac_tool_warned=yes ;;
27314esac
27315    OBJDUMP=$ac_ct_OBJDUMP
27316  fi
27317fi
27318
27319if test "x$OBJDUMP" != x; then
27320  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27321
27322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27323
27324  # First separate the path from the arguments. This will split at the first
27325  # space.
27326  complete="$OBJDUMP"
27327  path="${complete%% *}"
27328  tmp="$complete EOL"
27329  arguments="${tmp#* }"
27330
27331  # Input might be given as Windows format, start by converting to
27332  # unix format.
27333  new_path=`$CYGPATH -u "$path"`
27334
27335  # Now try to locate executable using which
27336  new_path=`$WHICH "$new_path" 2> /dev/null`
27337  # bat and cmd files are not always considered executable in cygwin causing which
27338  # to not find them
27339  if test "x$new_path" = x \
27340           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27341           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27342    new_path=`$CYGPATH -u "$path"`
27343  fi
27344  if test "x$new_path" = x; then
27345    # Oops. Which didn't find the executable.
27346    # The splitting of arguments from the executable at a space might have been incorrect,
27347    # since paths with space are more likely in Windows. Give it another try with the whole
27348    # argument.
27349    path="$complete"
27350    arguments="EOL"
27351    new_path=`$CYGPATH -u "$path"`
27352    new_path=`$WHICH "$new_path" 2> /dev/null`
27353    # bat and cmd files are not always considered executable in cygwin causing which
27354    # to not find them
27355    if test "x$new_path" = x \
27356             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27357             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27358      new_path=`$CYGPATH -u "$path"`
27359    fi
27360    if test "x$new_path" = x; then
27361      # It's still not found. Now this is an unrecoverable error.
27362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27363$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27364      has_space=`$ECHO "$complete" | $GREP " "`
27365      if test "x$has_space" != x; then
27366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27368      fi
27369      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27370    fi
27371  fi
27372
27373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27376  # "foo.exe" is OK but "foo" is an error.
27377  #
27378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27379  # It is also a way to make sure we got the proper file name for the real test later on.
27380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27381  if test "x$test_shortpath" = x; then
27382    # Short path failed, file does not exist as specified.
27383    # Try adding .exe or .cmd
27384    if test -f "${new_path}.exe"; then
27385       input_to_shortpath="${new_path}.exe"
27386    elif test -f "${new_path}.cmd"; then
27387       input_to_shortpath="${new_path}.cmd"
27388    else
27389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27390$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27393      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27394    fi
27395  else
27396    input_to_shortpath="$new_path"
27397  fi
27398
27399  # Call helper function which possibly converts this using DOS-style short mode.
27400  # If so, the updated path is stored in $new_path.
27401  new_path="$input_to_shortpath"
27402
27403  input_path="$input_to_shortpath"
27404  # Check if we need to convert this using DOS-style short mode. If the path
27405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27406  # take no chances and rewrite it.
27407  # Note: m4 eats our [], so we need to use [ and ] instead.
27408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27409  if test "x$has_forbidden_chars" != x; then
27410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27414      # Going to short mode and back again did indeed matter. Since short mode is
27415      # case insensitive, let's make it lowercase to improve readability.
27416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27417      # Now convert it back to Unix-stile (cygpath)
27418      input_path=`$CYGPATH -u "$shortmode_path"`
27419      new_path="$input_path"
27420    fi
27421  fi
27422
27423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27424  if test "x$test_cygdrive_prefix" = x; then
27425    # As a simple fix, exclude /usr/bin since it's not a real path.
27426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27428      # a path prefixed by /cygdrive for fixpath to work.
27429      new_path="$CYGWIN_ROOT_PATH$input_path"
27430    fi
27431  fi
27432
27433  # remove trailing .exe if any
27434  new_path="${new_path/%.exe/}"
27435
27436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27437
27438  # First separate the path from the arguments. This will split at the first
27439  # space.
27440  complete="$OBJDUMP"
27441  path="${complete%% *}"
27442  tmp="$complete EOL"
27443  arguments="${tmp#* }"
27444
27445  # Input might be given as Windows format, start by converting to
27446  # unix format.
27447  new_path="$path"
27448
27449  windows_path="$new_path"
27450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27451    unix_path=`$CYGPATH -u "$windows_path"`
27452    new_path="$unix_path"
27453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27455    new_path="$unix_path"
27456  fi
27457
27458
27459  # Now try to locate executable using which
27460  new_path=`$WHICH "$new_path" 2> /dev/null`
27461
27462  if test "x$new_path" = x; then
27463    # Oops. Which didn't find the executable.
27464    # The splitting of arguments from the executable at a space might have been incorrect,
27465    # since paths with space are more likely in Windows. Give it another try with the whole
27466    # argument.
27467    path="$complete"
27468    arguments="EOL"
27469    new_path="$path"
27470
27471  windows_path="$new_path"
27472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27473    unix_path=`$CYGPATH -u "$windows_path"`
27474    new_path="$unix_path"
27475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27477    new_path="$unix_path"
27478  fi
27479
27480
27481    new_path=`$WHICH "$new_path" 2> /dev/null`
27482
27483    if test "x$new_path" = x; then
27484      # It's still not found. Now this is an unrecoverable error.
27485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27486$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27487      has_space=`$ECHO "$complete" | $GREP " "`
27488      if test "x$has_space" != x; then
27489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27491      fi
27492      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27493    fi
27494  fi
27495
27496  # Now new_path has a complete unix path to the binary
27497  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27498    # Keep paths in /bin as-is, but remove trailing .exe if any
27499    new_path="${new_path/%.exe/}"
27500    # Do not save /bin paths to all_fixpath_prefixes!
27501  else
27502    # Not in mixed or Windows style, start by that.
27503    new_path=`cmd //c echo $new_path`
27504
27505  input_path="$new_path"
27506  # Check if we need to convert this using DOS-style short mode. If the path
27507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27508  # take no chances and rewrite it.
27509  # Note: m4 eats our [], so we need to use [ and ] instead.
27510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27511  if test "x$has_forbidden_chars" != x; then
27512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27514  fi
27515
27516    # Output is in $new_path
27517
27518  windows_path="$new_path"
27519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27520    unix_path=`$CYGPATH -u "$windows_path"`
27521    new_path="$unix_path"
27522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27524    new_path="$unix_path"
27525  fi
27526
27527    # remove trailing .exe if any
27528    new_path="${new_path/%.exe/}"
27529
27530    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27531    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27532  fi
27533
27534  else
27535    # We're on a posix platform. Hooray! :)
27536    # First separate the path from the arguments. This will split at the first
27537    # space.
27538    complete="$OBJDUMP"
27539    path="${complete%% *}"
27540    tmp="$complete EOL"
27541    arguments="${tmp#* }"
27542
27543    # Cannot rely on the command "which" here since it doesn't always work.
27544    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27545    if test -z "$is_absolute_path"; then
27546      # Path to executable is not absolute. Find it.
27547      IFS_save="$IFS"
27548      IFS=:
27549      for p in $PATH; do
27550        if test -f "$p/$path" && test -x "$p/$path"; then
27551          new_path="$p/$path"
27552          break
27553        fi
27554      done
27555      IFS="$IFS_save"
27556    else
27557      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27558$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27559      new_path="$path"
27560    fi
27561
27562    if test "x$new_path" = x; then
27563        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27564$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27565        has_space=`$ECHO "$complete" | $GREP " "`
27566        if test "x$has_space" != x; then
27567          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27569        fi
27570        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27571      fi
27572  fi
27573
27574      # Now join together the path and the arguments once again
27575      if test "x$arguments" != xEOL; then
27576        new_complete="$new_path ${arguments% *}"
27577      else
27578        new_complete="$new_path"
27579      fi
27580
27581  if test "x$complete" != "x$new_complete"; then
27582      OBJDUMP="$new_complete"
27583      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27584$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27585    fi
27586
27587fi
27588
27589if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27590   # Extract the first word of "lipo", so it can be a program name with args.
27591set dummy lipo; ac_word=$2
27592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27593$as_echo_n "checking for $ac_word... " >&6; }
27594if test "${ac_cv_path_LIPO+set}" = set; then :
27595  $as_echo_n "(cached) " >&6
27596else
27597  case $LIPO in
27598  [\\/]* | ?:[\\/]*)
27599  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27600  ;;
27601  *)
27602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27603for as_dir in $PATH
27604do
27605  IFS=$as_save_IFS
27606  test -z "$as_dir" && as_dir=.
27607    for ac_exec_ext in '' $ac_executable_extensions; do
27608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27609    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27611    break 2
27612  fi
27613done
27614  done
27615IFS=$as_save_IFS
27616
27617  ;;
27618esac
27619fi
27620LIPO=$ac_cv_path_LIPO
27621if test -n "$LIPO"; then
27622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27623$as_echo "$LIPO" >&6; }
27624else
27625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27626$as_echo "no" >&6; }
27627fi
27628
27629
27630
27631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27632
27633  # First separate the path from the arguments. This will split at the first
27634  # space.
27635  complete="$LIPO"
27636  path="${complete%% *}"
27637  tmp="$complete EOL"
27638  arguments="${tmp#* }"
27639
27640  # Input might be given as Windows format, start by converting to
27641  # unix format.
27642  new_path=`$CYGPATH -u "$path"`
27643
27644  # Now try to locate executable using which
27645  new_path=`$WHICH "$new_path" 2> /dev/null`
27646  # bat and cmd files are not always considered executable in cygwin causing which
27647  # to not find them
27648  if test "x$new_path" = x \
27649           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27650           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27651    new_path=`$CYGPATH -u "$path"`
27652  fi
27653  if test "x$new_path" = x; then
27654    # Oops. Which didn't find the executable.
27655    # The splitting of arguments from the executable at a space might have been incorrect,
27656    # since paths with space are more likely in Windows. Give it another try with the whole
27657    # argument.
27658    path="$complete"
27659    arguments="EOL"
27660    new_path=`$CYGPATH -u "$path"`
27661    new_path=`$WHICH "$new_path" 2> /dev/null`
27662    # bat and cmd files are not always considered executable in cygwin causing which
27663    # to not find them
27664    if test "x$new_path" = x \
27665             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27666             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27667      new_path=`$CYGPATH -u "$path"`
27668    fi
27669    if test "x$new_path" = x; then
27670      # It's still not found. Now this is an unrecoverable error.
27671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27672$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27673      has_space=`$ECHO "$complete" | $GREP " "`
27674      if test "x$has_space" != x; then
27675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27677      fi
27678      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27679    fi
27680  fi
27681
27682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27685  # "foo.exe" is OK but "foo" is an error.
27686  #
27687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27688  # It is also a way to make sure we got the proper file name for the real test later on.
27689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27690  if test "x$test_shortpath" = x; then
27691    # Short path failed, file does not exist as specified.
27692    # Try adding .exe or .cmd
27693    if test -f "${new_path}.exe"; then
27694       input_to_shortpath="${new_path}.exe"
27695    elif test -f "${new_path}.cmd"; then
27696       input_to_shortpath="${new_path}.cmd"
27697    else
27698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27699$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27702      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27703    fi
27704  else
27705    input_to_shortpath="$new_path"
27706  fi
27707
27708  # Call helper function which possibly converts this using DOS-style short mode.
27709  # If so, the updated path is stored in $new_path.
27710  new_path="$input_to_shortpath"
27711
27712  input_path="$input_to_shortpath"
27713  # Check if we need to convert this using DOS-style short mode. If the path
27714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27715  # take no chances and rewrite it.
27716  # Note: m4 eats our [], so we need to use [ and ] instead.
27717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27718  if test "x$has_forbidden_chars" != x; then
27719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27723      # Going to short mode and back again did indeed matter. Since short mode is
27724      # case insensitive, let's make it lowercase to improve readability.
27725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27726      # Now convert it back to Unix-stile (cygpath)
27727      input_path=`$CYGPATH -u "$shortmode_path"`
27728      new_path="$input_path"
27729    fi
27730  fi
27731
27732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27733  if test "x$test_cygdrive_prefix" = x; then
27734    # As a simple fix, exclude /usr/bin since it's not a real path.
27735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27737      # a path prefixed by /cygdrive for fixpath to work.
27738      new_path="$CYGWIN_ROOT_PATH$input_path"
27739    fi
27740  fi
27741
27742  # remove trailing .exe if any
27743  new_path="${new_path/%.exe/}"
27744
27745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27746
27747  # First separate the path from the arguments. This will split at the first
27748  # space.
27749  complete="$LIPO"
27750  path="${complete%% *}"
27751  tmp="$complete EOL"
27752  arguments="${tmp#* }"
27753
27754  # Input might be given as Windows format, start by converting to
27755  # unix format.
27756  new_path="$path"
27757
27758  windows_path="$new_path"
27759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27760    unix_path=`$CYGPATH -u "$windows_path"`
27761    new_path="$unix_path"
27762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27764    new_path="$unix_path"
27765  fi
27766
27767
27768  # Now try to locate executable using which
27769  new_path=`$WHICH "$new_path" 2> /dev/null`
27770
27771  if test "x$new_path" = x; then
27772    # Oops. Which didn't find the executable.
27773    # The splitting of arguments from the executable at a space might have been incorrect,
27774    # since paths with space are more likely in Windows. Give it another try with the whole
27775    # argument.
27776    path="$complete"
27777    arguments="EOL"
27778    new_path="$path"
27779
27780  windows_path="$new_path"
27781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27782    unix_path=`$CYGPATH -u "$windows_path"`
27783    new_path="$unix_path"
27784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27786    new_path="$unix_path"
27787  fi
27788
27789
27790    new_path=`$WHICH "$new_path" 2> /dev/null`
27791
27792    if test "x$new_path" = x; then
27793      # It's still not found. Now this is an unrecoverable error.
27794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27795$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27796      has_space=`$ECHO "$complete" | $GREP " "`
27797      if test "x$has_space" != x; then
27798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27800      fi
27801      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27802    fi
27803  fi
27804
27805  # Now new_path has a complete unix path to the binary
27806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27807    # Keep paths in /bin as-is, but remove trailing .exe if any
27808    new_path="${new_path/%.exe/}"
27809    # Do not save /bin paths to all_fixpath_prefixes!
27810  else
27811    # Not in mixed or Windows style, start by that.
27812    new_path=`cmd //c echo $new_path`
27813
27814  input_path="$new_path"
27815  # Check if we need to convert this using DOS-style short mode. If the path
27816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27817  # take no chances and rewrite it.
27818  # Note: m4 eats our [], so we need to use [ and ] instead.
27819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27820  if test "x$has_forbidden_chars" != x; then
27821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27823  fi
27824
27825    # Output is in $new_path
27826
27827  windows_path="$new_path"
27828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27829    unix_path=`$CYGPATH -u "$windows_path"`
27830    new_path="$unix_path"
27831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27833    new_path="$unix_path"
27834  fi
27835
27836    # remove trailing .exe if any
27837    new_path="${new_path/%.exe/}"
27838
27839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27841  fi
27842
27843  else
27844    # We're on a posix platform. Hooray! :)
27845    # First separate the path from the arguments. This will split at the first
27846    # space.
27847    complete="$LIPO"
27848    path="${complete%% *}"
27849    tmp="$complete EOL"
27850    arguments="${tmp#* }"
27851
27852    # Cannot rely on the command "which" here since it doesn't always work.
27853    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27854    if test -z "$is_absolute_path"; then
27855      # Path to executable is not absolute. Find it.
27856      IFS_save="$IFS"
27857      IFS=:
27858      for p in $PATH; do
27859        if test -f "$p/$path" && test -x "$p/$path"; then
27860          new_path="$p/$path"
27861          break
27862        fi
27863      done
27864      IFS="$IFS_save"
27865    else
27866      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27867$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27868      new_path="$path"
27869    fi
27870
27871    if test "x$new_path" = x; then
27872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27873$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27874        has_space=`$ECHO "$complete" | $GREP " "`
27875        if test "x$has_space" != x; then
27876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27878        fi
27879        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27880      fi
27881  fi
27882
27883      # Now join together the path and the arguments once again
27884      if test "x$arguments" != xEOL; then
27885        new_complete="$new_path ${arguments% *}"
27886      else
27887        new_complete="$new_path"
27888      fi
27889
27890  if test "x$complete" != "x$new_complete"; then
27891      LIPO="$new_complete"
27892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27893$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27894    fi
27895
27896fi
27897
27898# Restore old path without tools dir
27899PATH="$OLD_PATH"
27900
27901
27902# FIXME: Currently we must test this after paths but before flags. Fix!
27903
27904# And we can test some aspects on the target using configure macros.
27905
27906
27907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27908$as_echo_n "checking for ANSI C header files... " >&6; }
27909if test "${ac_cv_header_stdc+set}" = set; then :
27910  $as_echo_n "(cached) " >&6
27911else
27912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27913/* end confdefs.h.  */
27914#include <stdlib.h>
27915#include <stdarg.h>
27916#include <string.h>
27917#include <float.h>
27918
27919int
27920main ()
27921{
27922
27923  ;
27924  return 0;
27925}
27926_ACEOF
27927if ac_fn_cxx_try_compile "$LINENO"; then :
27928  ac_cv_header_stdc=yes
27929else
27930  ac_cv_header_stdc=no
27931fi
27932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27933
27934if test $ac_cv_header_stdc = yes; then
27935  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27937/* end confdefs.h.  */
27938#include <string.h>
27939
27940_ACEOF
27941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27942  $EGREP "memchr" >/dev/null 2>&1; then :
27943
27944else
27945  ac_cv_header_stdc=no
27946fi
27947rm -f conftest*
27948
27949fi
27950
27951if test $ac_cv_header_stdc = yes; then
27952  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27954/* end confdefs.h.  */
27955#include <stdlib.h>
27956
27957_ACEOF
27958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27959  $EGREP "free" >/dev/null 2>&1; then :
27960
27961else
27962  ac_cv_header_stdc=no
27963fi
27964rm -f conftest*
27965
27966fi
27967
27968if test $ac_cv_header_stdc = yes; then
27969  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27970  if test "$cross_compiling" = yes; then :
27971  :
27972else
27973  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27974/* end confdefs.h.  */
27975#include <ctype.h>
27976#include <stdlib.h>
27977#if ((' ' & 0x0FF) == 0x020)
27978# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27979# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27980#else
27981# define ISLOWER(c) \
27982		   (('a' <= (c) && (c) <= 'i') \
27983		     || ('j' <= (c) && (c) <= 'r') \
27984		     || ('s' <= (c) && (c) <= 'z'))
27985# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27986#endif
27987
27988#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27989int
27990main ()
27991{
27992  int i;
27993  for (i = 0; i < 256; i++)
27994    if (XOR (islower (i), ISLOWER (i))
27995	|| toupper (i) != TOUPPER (i))
27996      return 2;
27997  return 0;
27998}
27999_ACEOF
28000if ac_fn_cxx_try_run "$LINENO"; then :
28001
28002else
28003  ac_cv_header_stdc=no
28004fi
28005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28006  conftest.$ac_objext conftest.beam conftest.$ac_ext
28007fi
28008
28009fi
28010fi
28011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28012$as_echo "$ac_cv_header_stdc" >&6; }
28013if test $ac_cv_header_stdc = yes; then
28014
28015$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28016
28017fi
28018
28019# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28020for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28021		  inttypes.h stdint.h unistd.h
28022do :
28023  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28024ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28025"
28026if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28027  cat >>confdefs.h <<_ACEOF
28028#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28029_ACEOF
28030
28031fi
28032
28033done
28034
28035
28036
28037###############################################################################
28038#
28039# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28040# (The JVM can use 32 or 64 bit Java pointers but that decision
28041# is made at runtime.)
28042#
28043if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28044  # Always specify -m flags on Solaris
28045
28046  # keep track of c/cxx flags that we added outselves...
28047  #   to prevent emitting warning...
28048  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28049  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28050  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28051
28052  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28053  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28054  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28055
28056  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28057  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28058  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28059
28060elif test "x$COMPILE_TYPE" = xreduced; then
28061  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28062    # Specify -m if running reduced on other Posix platforms
28063
28064  # keep track of c/cxx flags that we added outselves...
28065  #   to prevent emitting warning...
28066  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28067  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28068  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28069
28070  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28071  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28072  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28073
28074  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28075  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28076  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28077
28078  fi
28079fi
28080
28081# Make compilation sanity check
28082for ac_header in stdio.h
28083do :
28084  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28085if test "x$ac_cv_header_stdio_h" = x""yes; then :
28086  cat >>confdefs.h <<_ACEOF
28087#define HAVE_STDIO_H 1
28088_ACEOF
28089
28090else
28091
28092  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28093$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28094  if test "x$COMPILE_TYPE" = xreduced; then
28095    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28096$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28097  elif test "x$COMPILE_TYPE" = xcross; then
28098    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28099$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28100  fi
28101  as_fn_error $? "Cannot continue." "$LINENO" 5
28102
28103fi
28104
28105done
28106
28107
28108# The cast to long int works around a bug in the HP C Compiler
28109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28111# This bug is HP SR number 8606223364.
28112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28113$as_echo_n "checking size of int *... " >&6; }
28114if test "${ac_cv_sizeof_int_p+set}" = set; then :
28115  $as_echo_n "(cached) " >&6
28116else
28117  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28118
28119else
28120  if test "$ac_cv_type_int_p" = yes; then
28121     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28123as_fn_error 77 "cannot compute sizeof (int *)
28124See \`config.log' for more details" "$LINENO" 5 ; }
28125   else
28126     ac_cv_sizeof_int_p=0
28127   fi
28128fi
28129
28130fi
28131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28132$as_echo "$ac_cv_sizeof_int_p" >&6; }
28133
28134
28135
28136cat >>confdefs.h <<_ACEOF
28137#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28138_ACEOF
28139
28140
28141
28142if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28143  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28144  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28145fi
28146
28147if test "x$SIZEOF_INT_P" = x; then
28148    # The test failed, lets stick to the assumed value.
28149    { $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
28150$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28151else
28152    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28153
28154    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28155        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
28156    fi
28157fi
28158
28159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28160$as_echo_n "checking for target address size... " >&6; }
28161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28162$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28163
28164
28165###############################################################################
28166#
28167# Is the target little of big endian?
28168#
28169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28170$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28171if test "${ac_cv_c_bigendian+set}" = set; then :
28172  $as_echo_n "(cached) " >&6
28173else
28174  ac_cv_c_bigendian=unknown
28175    # See if we're dealing with a universal compiler.
28176    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28177/* end confdefs.h.  */
28178#ifndef __APPLE_CC__
28179	       not a universal capable compiler
28180	     #endif
28181	     typedef int dummy;
28182
28183_ACEOF
28184if ac_fn_cxx_try_compile "$LINENO"; then :
28185
28186	# Check for potential -arch flags.  It is not universal unless
28187	# there are at least two -arch flags with different values.
28188	ac_arch=
28189	ac_prev=
28190	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28191	 if test -n "$ac_prev"; then
28192	   case $ac_word in
28193	     i?86 | x86_64 | ppc | ppc64)
28194	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28195		 ac_arch=$ac_word
28196	       else
28197		 ac_cv_c_bigendian=universal
28198		 break
28199	       fi
28200	       ;;
28201	   esac
28202	   ac_prev=
28203	 elif test "x$ac_word" = "x-arch"; then
28204	   ac_prev=arch
28205	 fi
28206       done
28207fi
28208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28209    if test $ac_cv_c_bigendian = unknown; then
28210      # See if sys/param.h defines the BYTE_ORDER macro.
28211      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28212/* end confdefs.h.  */
28213#include <sys/types.h>
28214	     #include <sys/param.h>
28215
28216int
28217main ()
28218{
28219#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28220		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28221		     && LITTLE_ENDIAN)
28222	      bogus endian macros
28223	     #endif
28224
28225  ;
28226  return 0;
28227}
28228_ACEOF
28229if ac_fn_cxx_try_compile "$LINENO"; then :
28230  # It does; now see whether it defined to BIG_ENDIAN or not.
28231	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28232/* end confdefs.h.  */
28233#include <sys/types.h>
28234		#include <sys/param.h>
28235
28236int
28237main ()
28238{
28239#if BYTE_ORDER != BIG_ENDIAN
28240		 not big endian
28241		#endif
28242
28243  ;
28244  return 0;
28245}
28246_ACEOF
28247if ac_fn_cxx_try_compile "$LINENO"; then :
28248  ac_cv_c_bigendian=yes
28249else
28250  ac_cv_c_bigendian=no
28251fi
28252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28253fi
28254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28255    fi
28256    if test $ac_cv_c_bigendian = unknown; then
28257      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28258      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28259/* end confdefs.h.  */
28260#include <limits.h>
28261
28262int
28263main ()
28264{
28265#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28266	      bogus endian macros
28267	     #endif
28268
28269  ;
28270  return 0;
28271}
28272_ACEOF
28273if ac_fn_cxx_try_compile "$LINENO"; then :
28274  # It does; now see whether it defined to _BIG_ENDIAN or not.
28275	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28276/* end confdefs.h.  */
28277#include <limits.h>
28278
28279int
28280main ()
28281{
28282#ifndef _BIG_ENDIAN
28283		 not big endian
28284		#endif
28285
28286  ;
28287  return 0;
28288}
28289_ACEOF
28290if ac_fn_cxx_try_compile "$LINENO"; then :
28291  ac_cv_c_bigendian=yes
28292else
28293  ac_cv_c_bigendian=no
28294fi
28295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28296fi
28297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28298    fi
28299    if test $ac_cv_c_bigendian = unknown; then
28300      # Compile a test program.
28301      if test "$cross_compiling" = yes; then :
28302  # Try to guess by grepping values from an object file.
28303	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28304/* end confdefs.h.  */
28305short int ascii_mm[] =
28306		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28307		short int ascii_ii[] =
28308		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28309		int use_ascii (int i) {
28310		  return ascii_mm[i] + ascii_ii[i];
28311		}
28312		short int ebcdic_ii[] =
28313		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28314		short int ebcdic_mm[] =
28315		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28316		int use_ebcdic (int i) {
28317		  return ebcdic_mm[i] + ebcdic_ii[i];
28318		}
28319		extern int foo;
28320
28321int
28322main ()
28323{
28324return use_ascii (foo) == use_ebcdic (foo);
28325  ;
28326  return 0;
28327}
28328_ACEOF
28329if ac_fn_cxx_try_compile "$LINENO"; then :
28330  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28331	      ac_cv_c_bigendian=yes
28332	    fi
28333	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28334	      if test "$ac_cv_c_bigendian" = unknown; then
28335		ac_cv_c_bigendian=no
28336	      else
28337		# finding both strings is unlikely to happen, but who knows?
28338		ac_cv_c_bigendian=unknown
28339	      fi
28340	    fi
28341fi
28342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28343else
28344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28345/* end confdefs.h.  */
28346$ac_includes_default
28347int
28348main ()
28349{
28350
28351	     /* Are we little or big endian?  From Harbison&Steele.  */
28352	     union
28353	     {
28354	       long int l;
28355	       char c[sizeof (long int)];
28356	     } u;
28357	     u.l = 1;
28358	     return u.c[sizeof (long int) - 1] == 1;
28359
28360  ;
28361  return 0;
28362}
28363_ACEOF
28364if ac_fn_cxx_try_run "$LINENO"; then :
28365  ac_cv_c_bigendian=no
28366else
28367  ac_cv_c_bigendian=yes
28368fi
28369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28370  conftest.$ac_objext conftest.beam conftest.$ac_ext
28371fi
28372
28373    fi
28374fi
28375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28376$as_echo "$ac_cv_c_bigendian" >&6; }
28377 case $ac_cv_c_bigendian in #(
28378   yes)
28379     ENDIAN="big";; #(
28380   no)
28381     ENDIAN="little" ;; #(
28382   universal)
28383     ENDIAN="universal_endianness"
28384     ;; #(
28385   *)
28386     ENDIAN="unknown" ;;
28387 esac
28388
28389
28390if test "x$ENDIAN" = xuniversal_endianness; then
28391    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28392fi
28393if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28394    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
28395fi
28396
28397
28398# Configure flags for the tools
28399
28400
28401###############################################################################
28402#
28403# How to compile shared libraries.
28404#
28405
28406if test "x$GCC" = xyes; then
28407    COMPILER_NAME=gcc
28408    PICFLAG="-fPIC"
28409    LIBRARY_PREFIX=lib
28410    SHARED_LIBRARY='lib$1.so'
28411    STATIC_LIBRARY='lib$1.a'
28412    SHARED_LIBRARY_FLAGS="-shared"
28413    SHARED_LIBRARY_SUFFIX='.so'
28414    STATIC_LIBRARY_SUFFIX='.a'
28415    OBJ_SUFFIX='.o'
28416    EXE_SUFFIX=''
28417    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28418    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28419    C_FLAG_REORDER=''
28420    CXX_FLAG_REORDER=''
28421    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28422    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28423    LD="$CC"
28424    LDEXE="$CC"
28425    LDCXX="$CXX"
28426    LDEXECXX="$CXX"
28427    POST_STRIP_CMD="$STRIP -g"
28428
28429    # Linking is different on MacOSX
28430    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28431        # Might change in the future to clang.
28432        COMPILER_NAME=gcc
28433        SHARED_LIBRARY='lib$1.dylib'
28434        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28435        SHARED_LIBRARY_SUFFIX='.dylib'
28436        EXE_SUFFIX=''
28437        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28438        SET_SHARED_LIBRARY_MAPFILE=''
28439        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28440        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28441        POST_STRIP_CMD="$STRIP -S"
28442    fi
28443else
28444    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28445        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28446        COMPILER_NAME=ossc
28447        PICFLAG="-KPIC"
28448        LIBRARY_PREFIX=lib
28449        SHARED_LIBRARY='lib$1.so'
28450        STATIC_LIBRARY='lib$1.a'
28451        SHARED_LIBRARY_FLAGS="-G"
28452        SHARED_LIBRARY_SUFFIX='.so'
28453        STATIC_LIBRARY_SUFFIX='.a'
28454        OBJ_SUFFIX='.o'
28455        EXE_SUFFIX=''
28456        SET_SHARED_LIBRARY_NAME=''
28457        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28458	C_FLAG_REORDER='-xF'
28459	CXX_FLAG_REORDER='-xF'
28460        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28461        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28462        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28463        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28464        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28465        POST_STRIP_CMD="$STRIP -x"
28466        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28467    fi
28468    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28469        # If it is not gcc, then assume it is the MS Visual Studio compiler
28470        COMPILER_NAME=cl
28471        PICFLAG=""
28472        LIBRARY_PREFIX=
28473        SHARED_LIBRARY='$1.dll'
28474        STATIC_LIBRARY='$1.lib'
28475        SHARED_LIBRARY_FLAGS="-LD"
28476        SHARED_LIBRARY_SUFFIX='.dll'
28477        STATIC_LIBRARY_SUFFIX='.lib'
28478        OBJ_SUFFIX='.obj'
28479        EXE_SUFFIX='.exe'
28480        SET_SHARED_LIBRARY_NAME=''
28481        SET_SHARED_LIBRARY_MAPFILE=''
28482        SET_SHARED_LIBRARY_ORIGIN=''
28483        SET_EXECUTABLE_ORIGIN=''
28484    fi
28485fi
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504# The (cross) compiler is now configured, we can now test capabilities
28505# of the target platform.
28506
28507
28508
28509###############################################################################
28510#
28511# Setup the opt flags for different compilers
28512# and different operating systems.
28513#
28514
28515#
28516# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28517#
28518if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28519    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28520    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28521    CFLAGS="$CFLAGS -mstackrealign"
28522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28523$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28524    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28525/* end confdefs.h.  */
28526int main() { return 0; }
28527_ACEOF
28528if ac_fn_cxx_try_link "$LINENO"; then :
28529
28530		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28531$as_echo "yes" >&6; }
28532
28533else
28534
28535		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28536$as_echo "no" >&6; }
28537	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28538
28539fi
28540rm -f core conftest.err conftest.$ac_objext \
28541    conftest$ac_exeext conftest.$ac_ext
28542fi
28543
28544C_FLAG_DEPS="-MMD -MF"
28545CXX_FLAG_DEPS="-MMD -MF"
28546
28547case $COMPILER_TYPE in
28548  CC )
28549    D_FLAG="-g"
28550    case $COMPILER_NAME in
28551      gcc )
28552      	case $OPENJDK_TARGET_OS in
28553	  macosx )
28554	    # On MacOSX we optimize for size, something
28555	    # we should do for all platforms?
28556	    C_O_FLAG_HI="-Os"
28557	    C_O_FLAG_NORM="-Os"
28558	    C_O_FLAG_NONE=""
28559	    ;;
28560	  *)
28561	    C_O_FLAG_HI="-O3"
28562	    C_O_FLAG_NORM="-O2"
28563	    C_O_FLAG_NONE="-O0"
28564	    CFLAGS_DEBUG_SYMBOLS="-g"
28565	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28566	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28567	       CFLAGS_DEBUG_SYMBOLS="-g1"
28568	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28569	    fi
28570	    ;;
28571	esac
28572        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28573        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28574        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28575        ;;
28576      ossc )
28577        #
28578        # Forte has different names for this with their C++ compiler...
28579        #
28580        C_FLAG_DEPS="-xMMD -xMF"
28581        CXX_FLAG_DEPS="-xMMD -xMF"
28582
28583        # Extra options used with HIGHEST
28584        #
28585        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28586        #          done with care, there are some assumptions below that need to
28587        #          be understood about the use of pointers, and IEEE behavior.
28588        #
28589        # Use non-standard floating point mode (not IEEE 754)
28590        CC_HIGHEST="$CC_HIGHEST -fns"
28591        # Do some simplification of floating point arithmetic (not IEEE 754)
28592        CC_HIGHEST="$CC_HIGHEST -fsimple"
28593        # Use single precision floating point with 'float'
28594        CC_HIGHEST="$CC_HIGHEST -fsingle"
28595        # Assume memory references via basic pointer types do not alias
28596        #   (Source with excessing pointer casting and data access with mixed
28597        #    pointer types are not recommended)
28598        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28599        # Use intrinsic or inline versions for math/std functions
28600        #   (If you expect perfect errno behavior, do not use this)
28601        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28602        # Loop data dependency optimizations (need -xO3 or higher)
28603        CC_HIGHEST="$CC_HIGHEST -xdepend"
28604        # Pointer parameters to functions do not overlap
28605        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28606        #    If you pass in multiple pointers to the same data, do not use this)
28607        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28608        # Inline some library routines
28609        #   (If you expect perfect errno behavior, do not use this)
28610        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28611        # Use optimized math routines
28612        #   (If you expect perfect errno behavior, do not use this)
28613        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28614        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28615
28616        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28617          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28618          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28619        fi
28620
28621        case $OPENJDK_TARGET_CPU_ARCH in
28622          x86)
28623            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28624            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28625            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28626            C_O_FLAG_NONE="-xregs=no%frameptr"
28627            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28628            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28629            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28630            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28631            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28632               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28633               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28634            fi
28635            ;;
28636          sparc)
28637            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28638            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28639            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28640            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28641            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28642            C_O_FLAG_NONE=""
28643            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28644            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28645            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28646            CXX_O_FLAG_NONE=""
28647            ;;
28648        esac
28649
28650    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28651    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28652    esac
28653    ;;
28654  CL )
28655    D_FLAG=
28656    C_O_FLAG_HIGHEST="-O2"
28657    C_O_FLAG_HI="-O1"
28658    C_O_FLAG_NORM="-O1"
28659    C_O_FLAG_NONE="-Od"
28660    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28661    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28662    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28663    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28664    ;;
28665esac
28666
28667if test -z "$C_O_FLAG_HIGHEST"; then
28668   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28669fi
28670
28671if test -z "$CXX_O_FLAG_HIGHEST"; then
28672   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28673fi
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28689   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28690$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28691fi
28692
28693if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28694   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28695$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28696fi
28697
28698if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28699   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28700$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28701fi
28702
28703
28704# Check whether --with-extra-cflags was given.
28705if test "${with_extra_cflags+set}" = set; then :
28706  withval=$with_extra_cflags;
28707fi
28708
28709
28710
28711# Check whether --with-extra-cxxflags was given.
28712if test "${with_extra_cxxflags+set}" = set; then :
28713  withval=$with_extra_cxxflags;
28714fi
28715
28716
28717
28718# Check whether --with-extra-ldflags was given.
28719if test "${with_extra_ldflags+set}" = set; then :
28720  withval=$with_extra_ldflags;
28721fi
28722
28723
28724CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28725CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28726LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28727
28728# Hotspot needs these set in their legacy form
28729LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28730LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28731LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28732
28733
28734
28735
28736
28737###############################################################################
28738#
28739# Now setup the CFLAGS and LDFLAGS for the JDK build.
28740# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28741#
28742case $COMPILER_NAME in
28743      gcc )
28744      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28745                          -pipe \
28746                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28747	  case $OPENJDK_TARGET_CPU_ARCH in
28748	  arm )
28749            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28750	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28751	  ;;
28752	  ppc )
28753            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28754	  ;;
28755	  * )
28756	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28757	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28758          ;;
28759	  esac
28760          ;;
28761      ossc )
28762          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28763          case $OPENJDK_TARGET_CPU_ARCH in
28764          x86 )
28765            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28766       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28767          ;;
28768          esac
28769
28770      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28771      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28772
28773          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28774          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28775          ;;
28776      cl )
28777          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28778               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28779	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28780	       -DWIN32 -DIAL"
28781          case $OPENJDK_TARGET_CPU in
28782              x86 )
28783                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28784                  ;;
28785              x86_64 )
28786                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28787                  ;;
28788          esac
28789          ;;
28790esac
28791
28792###############################################################################
28793
28794CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28795
28796# The package path is used only on macosx?
28797PACKAGE_PATH=/opt/local
28798
28799
28800if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28801    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28802    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28803    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28804    #   Note: -Dmacro         is the same as    #define macro 1
28805    #         -Dmacro=	    is the same as    #define macro
28806    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28807        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28808    else
28809        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28810    fi
28811else
28812    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28813fi
28814if test "x$OPENJDK_TARGET_OS" = xlinux; then
28815    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28816fi
28817if test "x$OPENJDK_TARGET_OS" = xwindows; then
28818    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28819fi
28820if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28821    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28822fi
28823if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28824    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28825    # Setting these parameters makes it an error to link to macosx APIs that are
28826    # newer than the given OS version and makes the linked binaries compatible even
28827    # if built on a newer version of the OS.
28828    # The expected format is X.Y.Z
28829    MACOSX_VERSION_MIN=10.7.0
28830
28831    # The macro takes the version with no dots, ex: 1070
28832    # Let the flags variables get resolved in make for easier override on make
28833    # command line.
28834    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28835    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28836fi
28837if test "x$OPENJDK_TARGET_OS" = xbsd; then
28838    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28839fi
28840if test "x$DEBUG_LEVEL" = xrelease; then
28841    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28842    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28843        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28844    fi
28845else
28846    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28847fi
28848
28849CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28850CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28851
28852CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28853        -I${JDK_OUTPUTDIR}/include \
28854        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28855        -I${JDK_TOPDIR}/src/share/javavm/export \
28856        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28857        -I${JDK_TOPDIR}/src/share/native/common \
28858        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28859
28860# The shared libraries are compiled using the picflag.
28861CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28862CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28863
28864# Executable flags
28865CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28866CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28867
28868# Now this is odd. The JDK native libraries have to link against libjvm.so
28869# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28870# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28871# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28872# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28873# libraries will link to whatever is in memory. Yuck.
28874#
28875# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28876if test "x$COMPILER_NAME" = xcl; then
28877    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28878    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28879        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28880    fi
28881    # TODO: make -debug optional "--disable-full-debug-symbols"
28882    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28883    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28884    LDFLAGS_JDKLIB_SUFFIX=""
28885    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28886        LDFLAGS_STACK_SIZE=1048576
28887    else
28888        LDFLAGS_STACK_SIZE=327680
28889    fi
28890    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28891else
28892    if test "x$COMPILER_NAME" = xgcc; then
28893        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28894        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28895        if test -n "$HAS_GNU_HASH"; then
28896            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28897        fi
28898        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28899          # And since we now know that the linker is gnu, then add -z defs, to forbid
28900          # undefined symbols in object files.
28901          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28902          if test "x$DEBUG_LEVEL" = "xrelease"; then
28903              # When building release libraries, tell the linker optimize them.
28904              # Should this be supplied to the OSS linker as well?
28905              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28906          fi
28907        fi
28908    fi
28909    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28910                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28911
28912    # On some platforms (mac) the linker warns about non existing -L dirs.
28913    # Add server first if available. Linking aginst client does not always produce the same results.
28914    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28915    # Default to server for other variants.
28916    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28917        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28918    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28919        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28920    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28921        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28922    else
28923        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28924    fi
28925
28926    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28927    if test "x$COMPILER_NAME" = xossc; then
28928        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28929    fi
28930
28931    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28932    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28933        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28934    fi
28935fi
28936
28937# Adjust flags according to debug level.
28938case $DEBUG_LEVEL in
28939      fastdebug )
28940              CFLAGS="$CFLAGS $D_FLAG"
28941              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28942              ;;
28943      slowdebug )
28944              CFLAGS="$CFLAGS $D_FLAG"
28945	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28946	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28947	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28948	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28949              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28950              ;;
28951esac
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967# Setup debug symbols (need objcopy from the toolchain for that)
28968
28969#
28970# ENABLE_DEBUG_SYMBOLS
28971# This must be done after the toolchain is setup, since we're looking at objcopy.
28972#
28973# Check whether --enable-debug-symbols was given.
28974if test "${enable_debug_symbols+set}" = set; then :
28975  enableval=$enable_debug_symbols;
28976fi
28977
28978
28979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28980$as_echo_n "checking if we should generate debug symbols... " >&6; }
28981
28982if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28983   # explicit enabling of enable-debug-symbols and can't find objcopy
28984   #   this is an error
28985   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28986fi
28987
28988if test "x$enable_debug_symbols" = "xyes"; then
28989  ENABLE_DEBUG_SYMBOLS=true
28990elif test "x$enable_debug_symbols" = "xno"; then
28991  ENABLE_DEBUG_SYMBOLS=false
28992else
28993  # default on macosx is false
28994  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28995    ENABLE_DEBUG_SYMBOLS=false
28996  # Default is on if objcopy is found, otherwise off
28997  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28998    ENABLE_DEBUG_SYMBOLS=true
28999  else
29000    ENABLE_DEBUG_SYMBOLS=false
29001  fi
29002fi
29003
29004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29005$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29006
29007#
29008# ZIP_DEBUGINFO_FILES
29009#
29010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29011$as_echo_n "checking if we should zip debug-info files... " >&6; }
29012# Check whether --enable-zip-debug-info was given.
29013if test "${enable_zip_debug_info+set}" = set; then :
29014  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29015else
29016  enable_zip_debug_info="yes"
29017fi
29018
29019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29020$as_echo "${enable_zip_debug_info}" >&6; }
29021
29022if test "x${enable_zip_debug_info}" = "xno"; then
29023   ZIP_DEBUGINFO_FILES=false
29024else
29025   ZIP_DEBUGINFO_FILES=true
29026fi
29027
29028
29029
29030
29031
29032
29033
29034###############################################################################
29035#
29036# Check dependencies for external and internal libraries.
29037#
29038###############################################################################
29039
29040
29041
29042###############################################################################
29043#
29044# OS specific settings that we never will need to probe.
29045#
29046if test "x$OPENJDK_TARGET_OS" = xlinux; then
29047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29048$as_echo_n "checking what is not needed on Linux?... " >&6; }
29049    PULSE_NOT_NEEDED=yes
29050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29051$as_echo "pulse" >&6; }
29052fi
29053
29054if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29056$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29057    ALSA_NOT_NEEDED=yes
29058    PULSE_NOT_NEEDED=yes
29059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29060$as_echo "alsa pulse" >&6; }
29061fi
29062
29063if test "x$OPENJDK_TARGET_OS" = xwindows; then
29064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29065$as_echo_n "checking what is not needed on Windows?... " >&6; }
29066    CUPS_NOT_NEEDED=yes
29067    ALSA_NOT_NEEDED=yes
29068    PULSE_NOT_NEEDED=yes
29069    X11_NOT_NEEDED=yes
29070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29071$as_echo "alsa cups pulse x11" >&6; }
29072fi
29073
29074if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29076$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29077    ALSA_NOT_NEEDED=yes
29078    PULSE_NOT_NEEDED=yes
29079    X11_NOT_NEEDED=yes
29080    FREETYPE2_NOT_NEEDED=yes
29081    # If the java runtime framework is disabled, then we need X11.
29082    # This will be adjusted below.
29083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29084$as_echo "alsa pulse x11" >&6; }
29085fi
29086
29087if test "x$OPENJDK_TARGET_OS" = xbsd; then
29088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29089$as_echo_n "checking what is not needed on bsd?... " >&6; }
29090    ALSA_NOT_NEEDED=yes
29091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29092$as_echo "alsa" >&6; }
29093fi
29094
29095if test "x$OPENJDK" = "xfalse"; then
29096    FREETYPE2_NOT_NEEDED=yes
29097fi
29098
29099if test "x$SUPPORT_HEADFUL" = xno; then
29100    X11_NOT_NEEDED=yes
29101fi
29102
29103###############################################################################
29104#
29105# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29106# that uses this API.
29107#
29108# Check whether --enable-macosx-runtime-support was given.
29109if test "${enable_macosx_runtime_support+set}" = set; then :
29110  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29111else
29112  MACOSX_RUNTIME_SUPPORT="no"
29113fi
29114
29115
29116USE_MACOSX_RUNTIME_SUPPORT=no
29117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29118$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29119if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29120    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29121        MACOSX_RUNTIME_SUPPORT=yes
29122        USE_MACOSX_RUNTIME_SUPPORT=yes
29123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29124$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29125    else
29126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29127$as_echo "yes, but explicitly disabled." >&6; }
29128    fi
29129else
29130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29131$as_echo "no" >&6; }
29132fi
29133
29134if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29136$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29137    X11_NOT_NEEDED=
29138    FREETYPE2_NOT_NEEDED=
29139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29140$as_echo "alsa pulse" >&6; }
29141fi
29142
29143
29144
29145
29146###############################################################################
29147#
29148# Check for X Windows
29149#
29150
29151# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29152# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29153# --x-libraries for the sysroot, if that seems to be correct.
29154if test "x$SYS_ROOT" != "x/"; then
29155  if test "x$x_includes" = xNONE; then
29156    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29157      x_includes="$SYS_ROOT/usr/X11R6/include"
29158    fi
29159  fi
29160  if test "x$x_libraries" = xNONE; then
29161    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29162      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29163    fi
29164  fi
29165fi
29166
29167# Now let autoconf do it's magic
29168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29169$as_echo_n "checking for X... " >&6; }
29170
29171
29172# Check whether --with-x was given.
29173if test "${with_x+set}" = set; then :
29174  withval=$with_x;
29175fi
29176
29177# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29178if test "x$with_x" = xno; then
29179  # The user explicitly disabled X.
29180  have_x=disabled
29181else
29182  case $x_includes,$x_libraries in #(
29183    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29184    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29185  $as_echo_n "(cached) " >&6
29186else
29187  # One or both of the vars are not set, and there is no cached value.
29188ac_x_includes=no ac_x_libraries=no
29189rm -f -r conftest.dir
29190if mkdir conftest.dir; then
29191  cd conftest.dir
29192  cat >Imakefile <<'_ACEOF'
29193incroot:
29194	@echo incroot='${INCROOT}'
29195usrlibdir:
29196	@echo usrlibdir='${USRLIBDIR}'
29197libdir:
29198	@echo libdir='${LIBDIR}'
29199_ACEOF
29200  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29201    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29202    for ac_var in incroot usrlibdir libdir; do
29203      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29204    done
29205    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29206    for ac_extension in a so sl dylib la dll; do
29207      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29208	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29209	ac_im_usrlibdir=$ac_im_libdir; break
29210      fi
29211    done
29212    # Screen out bogus values from the imake configuration.  They are
29213    # bogus both because they are the default anyway, and because
29214    # using them would break gcc on systems where it needs fixed includes.
29215    case $ac_im_incroot in
29216	/usr/include) ac_x_includes= ;;
29217	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29218    esac
29219    case $ac_im_usrlibdir in
29220	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29221	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29222    esac
29223  fi
29224  cd ..
29225  rm -f -r conftest.dir
29226fi
29227
29228# Standard set of common directories for X headers.
29229# Check X11 before X11Rn because it is often a symlink to the current release.
29230ac_x_header_dirs='
29231/usr/X11/include
29232/usr/X11R7/include
29233/usr/X11R6/include
29234/usr/X11R5/include
29235/usr/X11R4/include
29236
29237/usr/include/X11
29238/usr/include/X11R7
29239/usr/include/X11R6
29240/usr/include/X11R5
29241/usr/include/X11R4
29242
29243/usr/local/X11/include
29244/usr/local/X11R7/include
29245/usr/local/X11R6/include
29246/usr/local/X11R5/include
29247/usr/local/X11R4/include
29248
29249/usr/local/include/X11
29250/usr/local/include/X11R7
29251/usr/local/include/X11R6
29252/usr/local/include/X11R5
29253/usr/local/include/X11R4
29254
29255/usr/X386/include
29256/usr/x386/include
29257/usr/XFree86/include/X11
29258
29259/usr/include
29260/usr/local/include
29261/usr/unsupported/include
29262/usr/athena/include
29263/usr/local/x11r5/include
29264/usr/lpp/Xamples/include
29265
29266/usr/openwin/include
29267/usr/openwin/share/include'
29268
29269if test "$ac_x_includes" = no; then
29270  # Guess where to find include files, by looking for Xlib.h.
29271  # First, try using that file with no special directory specified.
29272  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29273/* end confdefs.h.  */
29274#include <X11/Xlib.h>
29275_ACEOF
29276if ac_fn_cxx_try_cpp "$LINENO"; then :
29277  # We can compile using X headers with no special include directory.
29278ac_x_includes=
29279else
29280  for ac_dir in $ac_x_header_dirs; do
29281  if test -r "$ac_dir/X11/Xlib.h"; then
29282    ac_x_includes=$ac_dir
29283    break
29284  fi
29285done
29286fi
29287rm -f conftest.err conftest.i conftest.$ac_ext
29288fi # $ac_x_includes = no
29289
29290if test "$ac_x_libraries" = no; then
29291  # Check for the libraries.
29292  # See if we find them without any special options.
29293  # Don't add to $LIBS permanently.
29294  ac_save_LIBS=$LIBS
29295  LIBS="-lX11 $LIBS"
29296  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29297/* end confdefs.h.  */
29298#include <X11/Xlib.h>
29299int
29300main ()
29301{
29302XrmInitialize ()
29303  ;
29304  return 0;
29305}
29306_ACEOF
29307if ac_fn_cxx_try_link "$LINENO"; then :
29308  LIBS=$ac_save_LIBS
29309# We can link X programs with no special library path.
29310ac_x_libraries=
29311else
29312  LIBS=$ac_save_LIBS
29313for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29314do
29315  # Don't even attempt the hair of trying to link an X program!
29316  for ac_extension in a so sl dylib la dll; do
29317    if test -r "$ac_dir/libX11.$ac_extension"; then
29318      ac_x_libraries=$ac_dir
29319      break 2
29320    fi
29321  done
29322done
29323fi
29324rm -f core conftest.err conftest.$ac_objext \
29325    conftest$ac_exeext conftest.$ac_ext
29326fi # $ac_x_libraries = no
29327
29328case $ac_x_includes,$ac_x_libraries in #(
29329  no,* | *,no | *\'*)
29330    # Didn't find X, or a directory has "'" in its name.
29331    ac_cv_have_x="have_x=no";; #(
29332  *)
29333    # Record where we found X for the cache.
29334    ac_cv_have_x="have_x=yes\
29335	ac_x_includes='$ac_x_includes'\
29336	ac_x_libraries='$ac_x_libraries'"
29337esac
29338fi
29339;; #(
29340    *) have_x=yes;;
29341  esac
29342  eval "$ac_cv_have_x"
29343fi # $with_x != no
29344
29345if test "$have_x" != yes; then
29346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29347$as_echo "$have_x" >&6; }
29348  no_x=yes
29349else
29350  # If each of the values was on the command line, it overrides each guess.
29351  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29352  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29353  # Update the cache value to reflect the command line values.
29354  ac_cv_have_x="have_x=yes\
29355	ac_x_includes='$x_includes'\
29356	ac_x_libraries='$x_libraries'"
29357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29358$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29359fi
29360
29361if test "$no_x" = yes; then
29362  # Not all programs may use this symbol, but it does not hurt to define it.
29363
29364$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29365
29366  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29367else
29368  if test -n "$x_includes"; then
29369    X_CFLAGS="$X_CFLAGS -I$x_includes"
29370  fi
29371
29372  # It would also be nice to do this for all -L options, not just this one.
29373  if test -n "$x_libraries"; then
29374    X_LIBS="$X_LIBS -L$x_libraries"
29375    # For Solaris; some versions of Sun CC require a space after -R and
29376    # others require no space.  Words are not sufficient . . . .
29377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29378$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29379    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29380    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29381    ac_cxx_werror_flag=yes
29382    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29383/* end confdefs.h.  */
29384
29385int
29386main ()
29387{
29388
29389  ;
29390  return 0;
29391}
29392_ACEOF
29393if ac_fn_cxx_try_link "$LINENO"; then :
29394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29395$as_echo "no" >&6; }
29396       X_LIBS="$X_LIBS -R$x_libraries"
29397else
29398  LIBS="$ac_xsave_LIBS -R $x_libraries"
29399       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29400/* end confdefs.h.  */
29401
29402int
29403main ()
29404{
29405
29406  ;
29407  return 0;
29408}
29409_ACEOF
29410if ac_fn_cxx_try_link "$LINENO"; then :
29411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29412$as_echo "yes" >&6; }
29413	  X_LIBS="$X_LIBS -R $x_libraries"
29414else
29415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29416$as_echo "neither works" >&6; }
29417fi
29418rm -f core conftest.err conftest.$ac_objext \
29419    conftest$ac_exeext conftest.$ac_ext
29420fi
29421rm -f core conftest.err conftest.$ac_objext \
29422    conftest$ac_exeext conftest.$ac_ext
29423    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29424    LIBS=$ac_xsave_LIBS
29425  fi
29426
29427  # Check for system-dependent libraries X programs must link with.
29428  # Do this before checking for the system-independent R6 libraries
29429  # (-lICE), since we may need -lsocket or whatever for X linking.
29430
29431  if test "$ISC" = yes; then
29432    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29433  else
29434    # Martyn Johnson says this is needed for Ultrix, if the X
29435    # libraries were built with DECnet support.  And Karl Berry says
29436    # the Alpha needs dnet_stub (dnet does not exist).
29437    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29438    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29439/* end confdefs.h.  */
29440
29441/* Override any GCC internal prototype to avoid an error.
29442   Use char because int might match the return type of a GCC
29443   builtin and then its argument prototype would still apply.  */
29444#ifdef __cplusplus
29445extern "C"
29446#endif
29447char XOpenDisplay ();
29448int
29449main ()
29450{
29451return XOpenDisplay ();
29452  ;
29453  return 0;
29454}
29455_ACEOF
29456if ac_fn_cxx_try_link "$LINENO"; then :
29457
29458else
29459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29460$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29461if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
29462  $as_echo_n "(cached) " >&6
29463else
29464  ac_check_lib_save_LIBS=$LIBS
29465LIBS="-ldnet  $LIBS"
29466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29467/* end confdefs.h.  */
29468
29469/* Override any GCC internal prototype to avoid an error.
29470   Use char because int might match the return type of a GCC
29471   builtin and then its argument prototype would still apply.  */
29472#ifdef __cplusplus
29473extern "C"
29474#endif
29475char dnet_ntoa ();
29476int
29477main ()
29478{
29479return dnet_ntoa ();
29480  ;
29481  return 0;
29482}
29483_ACEOF
29484if ac_fn_cxx_try_link "$LINENO"; then :
29485  ac_cv_lib_dnet_dnet_ntoa=yes
29486else
29487  ac_cv_lib_dnet_dnet_ntoa=no
29488fi
29489rm -f core conftest.err conftest.$ac_objext \
29490    conftest$ac_exeext conftest.$ac_ext
29491LIBS=$ac_check_lib_save_LIBS
29492fi
29493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29494$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29495if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
29496  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29497fi
29498
29499    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29501$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29502if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
29503  $as_echo_n "(cached) " >&6
29504else
29505  ac_check_lib_save_LIBS=$LIBS
29506LIBS="-ldnet_stub  $LIBS"
29507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29508/* end confdefs.h.  */
29509
29510/* Override any GCC internal prototype to avoid an error.
29511   Use char because int might match the return type of a GCC
29512   builtin and then its argument prototype would still apply.  */
29513#ifdef __cplusplus
29514extern "C"
29515#endif
29516char dnet_ntoa ();
29517int
29518main ()
29519{
29520return dnet_ntoa ();
29521  ;
29522  return 0;
29523}
29524_ACEOF
29525if ac_fn_cxx_try_link "$LINENO"; then :
29526  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29527else
29528  ac_cv_lib_dnet_stub_dnet_ntoa=no
29529fi
29530rm -f core conftest.err conftest.$ac_objext \
29531    conftest$ac_exeext conftest.$ac_ext
29532LIBS=$ac_check_lib_save_LIBS
29533fi
29534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29535$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29536if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
29537  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29538fi
29539
29540    fi
29541fi
29542rm -f core conftest.err conftest.$ac_objext \
29543    conftest$ac_exeext conftest.$ac_ext
29544    LIBS="$ac_xsave_LIBS"
29545
29546    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29547    # to get the SysV transport functions.
29548    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29549    # needs -lnsl.
29550    # The nsl library prevents programs from opening the X display
29551    # on Irix 5.2, according to T.E. Dickey.
29552    # The functions gethostbyname, getservbyname, and inet_addr are
29553    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29554    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29555if test "x$ac_cv_func_gethostbyname" = x""yes; then :
29556
29557fi
29558
29559    if test $ac_cv_func_gethostbyname = no; then
29560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29561$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29562if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
29563  $as_echo_n "(cached) " >&6
29564else
29565  ac_check_lib_save_LIBS=$LIBS
29566LIBS="-lnsl  $LIBS"
29567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29568/* end confdefs.h.  */
29569
29570/* Override any GCC internal prototype to avoid an error.
29571   Use char because int might match the return type of a GCC
29572   builtin and then its argument prototype would still apply.  */
29573#ifdef __cplusplus
29574extern "C"
29575#endif
29576char gethostbyname ();
29577int
29578main ()
29579{
29580return gethostbyname ();
29581  ;
29582  return 0;
29583}
29584_ACEOF
29585if ac_fn_cxx_try_link "$LINENO"; then :
29586  ac_cv_lib_nsl_gethostbyname=yes
29587else
29588  ac_cv_lib_nsl_gethostbyname=no
29589fi
29590rm -f core conftest.err conftest.$ac_objext \
29591    conftest$ac_exeext conftest.$ac_ext
29592LIBS=$ac_check_lib_save_LIBS
29593fi
29594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29595$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29596if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29597  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29598fi
29599
29600      if test $ac_cv_lib_nsl_gethostbyname = no; then
29601	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29602$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29603if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29604  $as_echo_n "(cached) " >&6
29605else
29606  ac_check_lib_save_LIBS=$LIBS
29607LIBS="-lbsd  $LIBS"
29608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29609/* end confdefs.h.  */
29610
29611/* Override any GCC internal prototype to avoid an error.
29612   Use char because int might match the return type of a GCC
29613   builtin and then its argument prototype would still apply.  */
29614#ifdef __cplusplus
29615extern "C"
29616#endif
29617char gethostbyname ();
29618int
29619main ()
29620{
29621return gethostbyname ();
29622  ;
29623  return 0;
29624}
29625_ACEOF
29626if ac_fn_cxx_try_link "$LINENO"; then :
29627  ac_cv_lib_bsd_gethostbyname=yes
29628else
29629  ac_cv_lib_bsd_gethostbyname=no
29630fi
29631rm -f core conftest.err conftest.$ac_objext \
29632    conftest$ac_exeext conftest.$ac_ext
29633LIBS=$ac_check_lib_save_LIBS
29634fi
29635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29636$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29637if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29638  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29639fi
29640
29641      fi
29642    fi
29643
29644    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29645    # socket/setsockopt and other routines are undefined under SCO ODT
29646    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29647    # on later versions), says Simon Leinen: it contains gethostby*
29648    # variants that don't use the name server (or something).  -lsocket
29649    # must be given before -lnsl if both are needed.  We assume that
29650    # if connect needs -lnsl, so does gethostbyname.
29651    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29652if test "x$ac_cv_func_connect" = x""yes; then :
29653
29654fi
29655
29656    if test $ac_cv_func_connect = no; then
29657      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29658$as_echo_n "checking for connect in -lsocket... " >&6; }
29659if test "${ac_cv_lib_socket_connect+set}" = set; then :
29660  $as_echo_n "(cached) " >&6
29661else
29662  ac_check_lib_save_LIBS=$LIBS
29663LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29665/* end confdefs.h.  */
29666
29667/* Override any GCC internal prototype to avoid an error.
29668   Use char because int might match the return type of a GCC
29669   builtin and then its argument prototype would still apply.  */
29670#ifdef __cplusplus
29671extern "C"
29672#endif
29673char connect ();
29674int
29675main ()
29676{
29677return connect ();
29678  ;
29679  return 0;
29680}
29681_ACEOF
29682if ac_fn_cxx_try_link "$LINENO"; then :
29683  ac_cv_lib_socket_connect=yes
29684else
29685  ac_cv_lib_socket_connect=no
29686fi
29687rm -f core conftest.err conftest.$ac_objext \
29688    conftest$ac_exeext conftest.$ac_ext
29689LIBS=$ac_check_lib_save_LIBS
29690fi
29691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29692$as_echo "$ac_cv_lib_socket_connect" >&6; }
29693if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29694  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29695fi
29696
29697    fi
29698
29699    # Guillermo Gomez says -lposix is necessary on A/UX.
29700    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29701if test "x$ac_cv_func_remove" = x""yes; then :
29702
29703fi
29704
29705    if test $ac_cv_func_remove = no; then
29706      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29707$as_echo_n "checking for remove in -lposix... " >&6; }
29708if test "${ac_cv_lib_posix_remove+set}" = set; then :
29709  $as_echo_n "(cached) " >&6
29710else
29711  ac_check_lib_save_LIBS=$LIBS
29712LIBS="-lposix  $LIBS"
29713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29714/* end confdefs.h.  */
29715
29716/* Override any GCC internal prototype to avoid an error.
29717   Use char because int might match the return type of a GCC
29718   builtin and then its argument prototype would still apply.  */
29719#ifdef __cplusplus
29720extern "C"
29721#endif
29722char remove ();
29723int
29724main ()
29725{
29726return remove ();
29727  ;
29728  return 0;
29729}
29730_ACEOF
29731if ac_fn_cxx_try_link "$LINENO"; then :
29732  ac_cv_lib_posix_remove=yes
29733else
29734  ac_cv_lib_posix_remove=no
29735fi
29736rm -f core conftest.err conftest.$ac_objext \
29737    conftest$ac_exeext conftest.$ac_ext
29738LIBS=$ac_check_lib_save_LIBS
29739fi
29740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29741$as_echo "$ac_cv_lib_posix_remove" >&6; }
29742if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29743  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29744fi
29745
29746    fi
29747
29748    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29749    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29750if test "x$ac_cv_func_shmat" = x""yes; then :
29751
29752fi
29753
29754    if test $ac_cv_func_shmat = no; then
29755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29756$as_echo_n "checking for shmat in -lipc... " >&6; }
29757if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29758  $as_echo_n "(cached) " >&6
29759else
29760  ac_check_lib_save_LIBS=$LIBS
29761LIBS="-lipc  $LIBS"
29762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29763/* end confdefs.h.  */
29764
29765/* Override any GCC internal prototype to avoid an error.
29766   Use char because int might match the return type of a GCC
29767   builtin and then its argument prototype would still apply.  */
29768#ifdef __cplusplus
29769extern "C"
29770#endif
29771char shmat ();
29772int
29773main ()
29774{
29775return shmat ();
29776  ;
29777  return 0;
29778}
29779_ACEOF
29780if ac_fn_cxx_try_link "$LINENO"; then :
29781  ac_cv_lib_ipc_shmat=yes
29782else
29783  ac_cv_lib_ipc_shmat=no
29784fi
29785rm -f core conftest.err conftest.$ac_objext \
29786    conftest$ac_exeext conftest.$ac_ext
29787LIBS=$ac_check_lib_save_LIBS
29788fi
29789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29790$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29791if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29792  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29793fi
29794
29795    fi
29796  fi
29797
29798  # Check for libraries that X11R6 Xt/Xaw programs need.
29799  ac_save_LDFLAGS=$LDFLAGS
29800  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29801  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29802  # check for ICE first), but we must link in the order -lSM -lICE or
29803  # we get undefined symbols.  So assume we have SM if we have ICE.
29804  # These have to be linked with before -lX11, unlike the other
29805  # libraries we check for below, so use a different variable.
29806  # John Interrante, Karl Berry
29807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29808$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29809if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29810  $as_echo_n "(cached) " >&6
29811else
29812  ac_check_lib_save_LIBS=$LIBS
29813LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29815/* end confdefs.h.  */
29816
29817/* Override any GCC internal prototype to avoid an error.
29818   Use char because int might match the return type of a GCC
29819   builtin and then its argument prototype would still apply.  */
29820#ifdef __cplusplus
29821extern "C"
29822#endif
29823char IceConnectionNumber ();
29824int
29825main ()
29826{
29827return IceConnectionNumber ();
29828  ;
29829  return 0;
29830}
29831_ACEOF
29832if ac_fn_cxx_try_link "$LINENO"; then :
29833  ac_cv_lib_ICE_IceConnectionNumber=yes
29834else
29835  ac_cv_lib_ICE_IceConnectionNumber=no
29836fi
29837rm -f core conftest.err conftest.$ac_objext \
29838    conftest$ac_exeext conftest.$ac_ext
29839LIBS=$ac_check_lib_save_LIBS
29840fi
29841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29842$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29843if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29844  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29845fi
29846
29847  LDFLAGS=$ac_save_LDFLAGS
29848
29849fi
29850
29851
29852# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29853# this doesn't make sense so we remove it.
29854if test "x$COMPILE_TYPE" = xcross; then
29855  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29856fi
29857
29858if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29859
29860    # Print a helpful message on how to acquire the necessary build dependency.
29861    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29862    MISSING_DEPENDENCY=x11
29863    PKGHANDLER_COMMAND=
29864
29865    case $PKGHANDLER in
29866	apt-get)
29867                apt_help     $MISSING_DEPENDENCY ;;
29868    yum)
29869                yum_help     $MISSING_DEPENDENCY ;;
29870	port)
29871                port_help    $MISSING_DEPENDENCY ;;
29872	pkgutil)
29873                pkgutil_help $MISSING_DEPENDENCY ;;
29874	pkgadd)
29875                pkgadd_help  $MISSING_DEPENDENCY ;;
29876    * )
29877      break ;;
29878    esac
29879
29880    if test "x$PKGHANDLER_COMMAND" != x; then
29881        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29882    fi
29883
29884    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29885fi
29886
29887# Some of the old makefiles require a setting of OPENWIN_HOME
29888# Since the X11R6 directory has disappeared on later Linuxes,
29889# we need to probe for it.
29890if test "x$OPENJDK_TARGET_OS" = xlinux; then
29891    if test -d "$SYS_ROOT/usr/X11R6"; then
29892        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29893    fi
29894    if test -d "$SYS_ROOT/usr/include/X11"; then
29895        OPENWIN_HOME="$SYS_ROOT/usr"
29896    fi
29897fi
29898if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29899    OPENWIN_HOME="/usr/openwin"
29900fi
29901
29902
29903
29904#
29905# Weird Sol10 something check...TODO change to try compile
29906#
29907if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29908  if test "`uname -r`" = "5.10"; then
29909     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29910     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29911     fi
29912  fi
29913fi
29914
29915ac_ext=c
29916ac_cpp='$CPP $CPPFLAGS'
29917ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29918ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29919ac_compiler_gnu=$ac_cv_c_compiler_gnu
29920
29921OLD_CFLAGS="$CFLAGS"
29922CFLAGS="$CFLAGS $X_CFLAGS"
29923
29924# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29925for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29926do :
29927  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29928ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29929                   # include <X11/Xutil.h>
29930
29931"
29932if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29933  cat >>confdefs.h <<_ACEOF
29934#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29935_ACEOF
29936 X11_A_OK=yes
29937else
29938  X11_A_OK=no; break
29939fi
29940
29941done
29942
29943
29944CFLAGS="$OLD_CFLAGS"
29945ac_ext=cpp
29946ac_cpp='$CXXCPP $CPPFLAGS'
29947ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29948ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29949ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29950
29951
29952if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29953
29954    # Print a helpful message on how to acquire the necessary build dependency.
29955    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29956    MISSING_DEPENDENCY=x11
29957    PKGHANDLER_COMMAND=
29958
29959    case $PKGHANDLER in
29960	apt-get)
29961                apt_help     $MISSING_DEPENDENCY ;;
29962    yum)
29963                yum_help     $MISSING_DEPENDENCY ;;
29964	port)
29965                port_help    $MISSING_DEPENDENCY ;;
29966	pkgutil)
29967                pkgutil_help $MISSING_DEPENDENCY ;;
29968	pkgadd)
29969                pkgadd_help  $MISSING_DEPENDENCY ;;
29970    * )
29971      break ;;
29972    esac
29973
29974    if test "x$PKGHANDLER_COMMAND" != x; then
29975        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29976    fi
29977
29978    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29979fi
29980
29981
29982
29983
29984
29985
29986###############################################################################
29987#
29988# The common unix printing system cups is used to print from java.
29989#
29990
29991# Check whether --with-cups was given.
29992if test "${with_cups+set}" = set; then :
29993  withval=$with_cups;
29994fi
29995
29996
29997# Check whether --with-cups-include was given.
29998if test "${with_cups_include+set}" = set; then :
29999  withval=$with_cups_include;
30000fi
30001
30002
30003if test "x$CUPS_NOT_NEEDED" = xyes; then
30004	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30005		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30006$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30007	fi
30008	CUPS_CFLAGS=
30009else
30010	CUPS_FOUND=no
30011
30012	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30013	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30014	fi
30015
30016	if test "x${with_cups}" != x; then
30017	    CUPS_CFLAGS="-I${with_cups}/include"
30018	    CUPS_FOUND=yes
30019	fi
30020	if test "x${with_cups_include}" != x; then
30021	    CUPS_CFLAGS="-I${with_cups_include}"
30022	    CUPS_FOUND=yes
30023	fi
30024	if test "x$CUPS_FOUND" = xno; then
30025
30026
30027    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30028        # Source the builddeps file again, to make sure it uses the latest variables!
30029        . $builddepsfile
30030        # Look for a target and build machine specific resource!
30031        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30032        if test "x$resource" = x; then
30033            # Ok, lets instead look for a target specific resource
30034            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30035        fi
30036        if test "x$resource" = x; then
30037            # Ok, lets instead look for a build specific resource
30038            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30039        fi
30040        if test "x$resource" = x; then
30041            # Ok, lets instead look for a generic resource
30042            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30043            resource=${builddep_cups}
30044        fi
30045        if test "x$resource" != x; then
30046            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30047$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30048	    # If the resource in the builddeps.conf file is an existing directory,
30049	    # for example /java/linux/cups
30050	    if test -d ${resource}; then
30051	       depdir=${resource}
30052	    else
30053
30054# cups is for example mymodule
30055# $resource is for example libs/general/libmymod_1_2_3.zip
30056# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30057# $with_builddeps_dir is for example /localhome/builddeps
30058# depdir is the name of the variable into which we store the depdir, eg MYMOD
30059# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30060# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30061    filename=`basename $resource`
30062    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30063    filebase=${filename%%.*}
30064    extension=${filename#*.}
30065    installdir=$with_builddeps_dir/$filebase
30066    if test ! -f $installdir/$filename.unpacked; then
30067        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30068$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30069        if test ! -d $installdir; then
30070            mkdir -p $installdir
30071        fi
30072        if test ! -d $installdir; then
30073            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30074        fi
30075        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30076        touch $tmpfile
30077        if test ! -f $tmpfile; then
30078            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30079        fi
30080
30081    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30082    # $tmpfile is the local file name for the downloaded file.
30083    VALID_TOOL=no
30084    if test "x$BDEPS_FTP" = xwget; then
30085       VALID_TOOL=yes
30086       wget -O $tmpfile $with_builddeps_server/$resource
30087    fi
30088    if test "x$BDEPS_FTP" = xlftp; then
30089       VALID_TOOL=yes
30090       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30091    fi
30092    if test "x$BDEPS_FTP" = xftp; then
30093        VALID_TOOL=yes
30094        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30095        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30096        FTPUSERPWD=${FTPSERVER%%@*}
30097        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30098            FTPUSER=${userpwd%%:*}
30099            FTPPWD=${userpwd#*@}
30100            FTPSERVER=${FTPSERVER#*@}
30101        else
30102            FTPUSER=ftp
30103            FTPPWD=ftp
30104        fi
30105        # the "pass" command does not work on some
30106        # ftp clients (read ftp.exe) but if it works,
30107        # passive mode is better!
30108        (\
30109            echo "user $FTPUSER $FTPPWD"        ;\
30110            echo "pass"                         ;\
30111            echo "bin"                          ;\
30112            echo "get $FTPPATH $tmpfile"              ;\
30113        ) | ftp -in $FTPSERVER
30114    fi
30115    if test "x$VALID_TOOL" != xyes; then
30116       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30117    fi
30118
30119        mv $tmpfile $installdir/$filename
30120        if test ! -s $installdir/$filename; then
30121            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30122        fi
30123        case "$extension" in
30124            zip)  echo "Unzipping $installdir/$filename..."
30125               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30126            ;;
30127            tar.gz) echo "Untaring $installdir/$filename..."
30128               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30129            ;;
30130            tgz) echo "Untaring $installdir/$filename..."
30131               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30132            ;;
30133            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30134            ;;
30135        esac
30136    fi
30137    if test -f $installdir/$filename.unpacked; then
30138        depdir=$installdir
30139    fi
30140
30141	    fi
30142            # Source the builddeps file again, because in the previous command, the depdir
30143            # was updated to point at the current build dependency install directory.
30144            . $builddepsfile
30145            # Now extract variables from the builddeps.conf files.
30146            theroot=${builddep_cups_ROOT}
30147            thecflags=${builddep_cups_CFLAGS}
30148            thelibs=${builddep_cups_LIBS}
30149            if test "x$depdir" = x; then
30150                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30151            fi
30152            CUPS=$depdir
30153            if test "x$theroot" != x; then
30154               CUPS="$theroot"
30155            fi
30156            if test "x$thecflags" != x; then
30157               CUPS_CFLAGS="$thecflags"
30158            fi
30159            if test "x$thelibs" != x; then
30160               CUPS_LIBS="$thelibs"
30161            fi
30162            CUPS_FOUND=yes
30163
30164        fi
30165
30166    fi
30167
30168	fi
30169	if test "x$CUPS_FOUND" = xno; then
30170	    # Are the cups headers installed in the default /usr/include location?
30171	    for ac_header in cups/cups.h cups/ppd.h
30172do :
30173  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30174ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30175if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30176  cat >>confdefs.h <<_ACEOF
30177#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30178_ACEOF
30179 CUPS_FOUND=yes
30180	                      CUPS_CFLAGS=
30181	                      DEFAULT_CUPS=yes
30182fi
30183
30184done
30185
30186	fi
30187	if test "x$CUPS_FOUND" = xno; then
30188	    # Getting nervous now? Lets poke around for standard Solaris third-party
30189	    # package installation locations.
30190	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30191$as_echo_n "checking for cups headers... " >&6; }
30192	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30193	       # An SFW package seems to be installed!
30194	       CUPS_FOUND=yes
30195	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30196	    elif test -s /opt/csw/include/cups/cups.h; then
30197	       # A CSW package seems to be installed!
30198	       CUPS_FOUND=yes
30199	       CUPS_CFLAGS="-I/opt/csw/include"
30200	    fi
30201	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30202$as_echo "$CUPS_FOUND" >&6; }
30203	fi
30204	if test "x$CUPS_FOUND" = xno; then
30205
30206    # Print a helpful message on how to acquire the necessary build dependency.
30207    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30208    MISSING_DEPENDENCY=cups
30209    PKGHANDLER_COMMAND=
30210
30211    case $PKGHANDLER in
30212	apt-get)
30213                apt_help     $MISSING_DEPENDENCY ;;
30214    yum)
30215                yum_help     $MISSING_DEPENDENCY ;;
30216	port)
30217                port_help    $MISSING_DEPENDENCY ;;
30218	pkgutil)
30219                pkgutil_help $MISSING_DEPENDENCY ;;
30220	pkgadd)
30221                pkgadd_help  $MISSING_DEPENDENCY ;;
30222    * )
30223      break ;;
30224    esac
30225
30226    if test "x$PKGHANDLER_COMMAND" != x; then
30227        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30228    fi
30229
30230	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30231	fi
30232fi
30233
30234
30235
30236
30237
30238
30239###############################################################################
30240#
30241# The ubiquitous freetype2 library is used to render fonts.
30242#
30243
30244# Check whether --with-freetype was given.
30245if test "${with_freetype+set}" = set; then :
30246  withval=$with_freetype;
30247fi
30248
30249
30250# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30251USING_SYSTEM_FT_LIB=false
30252
30253if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30254	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30255		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30256$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30257	fi
30258	FREETYPE2_CFLAGS=
30259	FREETYPE2_LIBS=
30260        FREETYPE2_LIB_PATH=
30261else
30262	FREETYPE2_FOUND=no
30263
30264	if test "x$with_freetype" != x; then
30265
30266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30267
30268  # Input might be given as Windows format, start by converting to
30269  # unix format.
30270  path="$with_freetype"
30271  new_path=`$CYGPATH -u "$path"`
30272
30273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30276  # "foo.exe" is OK but "foo" is an error.
30277  #
30278  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30279  # It is also a way to make sure we got the proper file name for the real test later on.
30280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30281  if test "x$test_shortpath" = x; then
30282    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30283$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30284    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30285  fi
30286
30287  # Call helper function which possibly converts this using DOS-style short mode.
30288  # If so, the updated path is stored in $new_path.
30289
30290  input_path="$new_path"
30291  # Check if we need to convert this using DOS-style short mode. If the path
30292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30293  # take no chances and rewrite it.
30294  # Note: m4 eats our [], so we need to use [ and ] instead.
30295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30296  if test "x$has_forbidden_chars" != x; then
30297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30301      # Going to short mode and back again did indeed matter. Since short mode is
30302      # case insensitive, let's make it lowercase to improve readability.
30303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30304      # Now convert it back to Unix-stile (cygpath)
30305      input_path=`$CYGPATH -u "$shortmode_path"`
30306      new_path="$input_path"
30307    fi
30308  fi
30309
30310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30311  if test "x$test_cygdrive_prefix" = x; then
30312    # As a simple fix, exclude /usr/bin since it's not a real path.
30313    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30315      # a path prefixed by /cygdrive for fixpath to work.
30316      new_path="$CYGWIN_ROOT_PATH$input_path"
30317    fi
30318  fi
30319
30320
30321  if test "x$path" != "x$new_path"; then
30322    with_freetype="$new_path"
30323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30324$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30325  fi
30326
30327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30328
30329  path="$with_freetype"
30330  has_colon=`$ECHO $path | $GREP ^.:`
30331  new_path="$path"
30332  if test "x$has_colon" = x; then
30333    # Not in mixed or Windows style, start by that.
30334    new_path=`cmd //c echo $path`
30335  fi
30336
30337
30338  input_path="$new_path"
30339  # Check if we need to convert this using DOS-style short mode. If the path
30340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30341  # take no chances and rewrite it.
30342  # Note: m4 eats our [], so we need to use [ and ] instead.
30343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30344  if test "x$has_forbidden_chars" != x; then
30345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30347  fi
30348
30349
30350  windows_path="$new_path"
30351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30352    unix_path=`$CYGPATH -u "$windows_path"`
30353    new_path="$unix_path"
30354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30356    new_path="$unix_path"
30357  fi
30358
30359  if test "x$path" != "x$new_path"; then
30360    with_freetype="$new_path"
30361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30362$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30363  fi
30364
30365  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30366  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30367
30368  else
30369    # We're on a posix platform. Hooray! :)
30370    path="$with_freetype"
30371
30372    if test ! -f "$path" && test ! -d "$path"; then
30373      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30374    fi
30375
30376    has_space=`$ECHO "$path" | $GREP " "`
30377    if test "x$has_space" != x; then
30378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30379$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30380      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30381    fi
30382  fi
30383
30384	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30385            FREETYPE2_LIB_PATH="$with_freetype/lib"
30386            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30387                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30388                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30389            fi
30390            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30391                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30392            fi
30393	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30394            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30395                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30396            fi
30397 	    FREETYPE2_FOUND=yes
30398   	    if test "x$FREETYPE2_FOUND" = xyes; then
30399	        # Verify that the directories exist
30400                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30401		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30402		fi
30403	        # List the contents of the lib.
30404		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30405                if test "x$FREETYPELIB" = x; then
30406		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30407		fi
30408	        # Check one h-file
30409                if ! test -s "$with_freetype/include/ft2build.h"; then
30410		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30411		fi
30412            fi
30413        fi
30414	if test "x$FREETYPE2_FOUND" = xno; then
30415
30416
30417    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30418        # Source the builddeps file again, to make sure it uses the latest variables!
30419        . $builddepsfile
30420        # Look for a target and build machine specific resource!
30421        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30422        if test "x$resource" = x; then
30423            # Ok, lets instead look for a target specific resource
30424            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30425        fi
30426        if test "x$resource" = x; then
30427            # Ok, lets instead look for a build specific resource
30428            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30429        fi
30430        if test "x$resource" = x; then
30431            # Ok, lets instead look for a generic resource
30432            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30433            resource=${builddep_freetype2}
30434        fi
30435        if test "x$resource" != x; then
30436            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30437$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30438	    # If the resource in the builddeps.conf file is an existing directory,
30439	    # for example /java/linux/cups
30440	    if test -d ${resource}; then
30441	       depdir=${resource}
30442	    else
30443
30444# freetype2 is for example mymodule
30445# $resource is for example libs/general/libmymod_1_2_3.zip
30446# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30447# $with_builddeps_dir is for example /localhome/builddeps
30448# depdir is the name of the variable into which we store the depdir, eg MYMOD
30449# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30450# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30451    filename=`basename $resource`
30452    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30453    filebase=${filename%%.*}
30454    extension=${filename#*.}
30455    installdir=$with_builddeps_dir/$filebase
30456    if test ! -f $installdir/$filename.unpacked; then
30457        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30458$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30459        if test ! -d $installdir; then
30460            mkdir -p $installdir
30461        fi
30462        if test ! -d $installdir; then
30463            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30464        fi
30465        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30466        touch $tmpfile
30467        if test ! -f $tmpfile; then
30468            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30469        fi
30470
30471    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30472    # $tmpfile is the local file name for the downloaded file.
30473    VALID_TOOL=no
30474    if test "x$BDEPS_FTP" = xwget; then
30475       VALID_TOOL=yes
30476       wget -O $tmpfile $with_builddeps_server/$resource
30477    fi
30478    if test "x$BDEPS_FTP" = xlftp; then
30479       VALID_TOOL=yes
30480       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30481    fi
30482    if test "x$BDEPS_FTP" = xftp; then
30483        VALID_TOOL=yes
30484        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30485        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30486        FTPUSERPWD=${FTPSERVER%%@*}
30487        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30488            FTPUSER=${userpwd%%:*}
30489            FTPPWD=${userpwd#*@}
30490            FTPSERVER=${FTPSERVER#*@}
30491        else
30492            FTPUSER=ftp
30493            FTPPWD=ftp
30494        fi
30495        # the "pass" command does not work on some
30496        # ftp clients (read ftp.exe) but if it works,
30497        # passive mode is better!
30498        (\
30499            echo "user $FTPUSER $FTPPWD"        ;\
30500            echo "pass"                         ;\
30501            echo "bin"                          ;\
30502            echo "get $FTPPATH $tmpfile"              ;\
30503        ) | ftp -in $FTPSERVER
30504    fi
30505    if test "x$VALID_TOOL" != xyes; then
30506       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30507    fi
30508
30509        mv $tmpfile $installdir/$filename
30510        if test ! -s $installdir/$filename; then
30511            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30512        fi
30513        case "$extension" in
30514            zip)  echo "Unzipping $installdir/$filename..."
30515               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30516            ;;
30517            tar.gz) echo "Untaring $installdir/$filename..."
30518               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30519            ;;
30520            tgz) echo "Untaring $installdir/$filename..."
30521               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30522            ;;
30523            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30524            ;;
30525        esac
30526    fi
30527    if test -f $installdir/$filename.unpacked; then
30528        depdir=$installdir
30529    fi
30530
30531	    fi
30532            # Source the builddeps file again, because in the previous command, the depdir
30533            # was updated to point at the current build dependency install directory.
30534            . $builddepsfile
30535            # Now extract variables from the builddeps.conf files.
30536            theroot=${builddep_freetype2_ROOT}
30537            thecflags=${builddep_freetype2_CFLAGS}
30538            thelibs=${builddep_freetype2_LIBS}
30539            if test "x$depdir" = x; then
30540                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30541            fi
30542            FREETYPE2=$depdir
30543            if test "x$theroot" != x; then
30544               FREETYPE2="$theroot"
30545            fi
30546            if test "x$thecflags" != x; then
30547               FREETYPE2_CFLAGS="$thecflags"
30548            fi
30549            if test "x$thelibs" != x; then
30550               FREETYPE2_LIBS="$thelibs"
30551            fi
30552            FREETYPE2_FOUND=yes
30553            else FREETYPE2_FOUND=no
30554
30555        fi
30556        else FREETYPE2_FOUND=no
30557
30558    fi
30559
30560            USING_SYSTEM_FT_LIB=true
30561	fi
30562	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30563            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30564
30565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30566
30567  # Input might be given as Windows format, start by converting to
30568  # unix format.
30569  path="$FREETYPELOCATION"
30570  new_path=`$CYGPATH -u "$path"`
30571
30572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30575  # "foo.exe" is OK but "foo" is an error.
30576  #
30577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30578  # It is also a way to make sure we got the proper file name for the real test later on.
30579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30580  if test "x$test_shortpath" = x; then
30581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30582$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30583    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30584  fi
30585
30586  # Call helper function which possibly converts this using DOS-style short mode.
30587  # If so, the updated path is stored in $new_path.
30588
30589  input_path="$new_path"
30590  # Check if we need to convert this using DOS-style short mode. If the path
30591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30592  # take no chances and rewrite it.
30593  # Note: m4 eats our [], so we need to use [ and ] instead.
30594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30595  if test "x$has_forbidden_chars" != x; then
30596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30600      # Going to short mode and back again did indeed matter. Since short mode is
30601      # case insensitive, let's make it lowercase to improve readability.
30602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30603      # Now convert it back to Unix-stile (cygpath)
30604      input_path=`$CYGPATH -u "$shortmode_path"`
30605      new_path="$input_path"
30606    fi
30607  fi
30608
30609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30610  if test "x$test_cygdrive_prefix" = x; then
30611    # As a simple fix, exclude /usr/bin since it's not a real path.
30612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30614      # a path prefixed by /cygdrive for fixpath to work.
30615      new_path="$CYGWIN_ROOT_PATH$input_path"
30616    fi
30617  fi
30618
30619
30620  if test "x$path" != "x$new_path"; then
30621    FREETYPELOCATION="$new_path"
30622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30623$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30624  fi
30625
30626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30627
30628  path="$FREETYPELOCATION"
30629  has_colon=`$ECHO $path | $GREP ^.:`
30630  new_path="$path"
30631  if test "x$has_colon" = x; then
30632    # Not in mixed or Windows style, start by that.
30633    new_path=`cmd //c echo $path`
30634  fi
30635
30636
30637  input_path="$new_path"
30638  # Check if we need to convert this using DOS-style short mode. If the path
30639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30640  # take no chances and rewrite it.
30641  # Note: m4 eats our [], so we need to use [ and ] instead.
30642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30643  if test "x$has_forbidden_chars" != x; then
30644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30646  fi
30647
30648
30649  windows_path="$new_path"
30650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30651    unix_path=`$CYGPATH -u "$windows_path"`
30652    new_path="$unix_path"
30653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30655    new_path="$unix_path"
30656  fi
30657
30658  if test "x$path" != "x$new_path"; then
30659    FREETYPELOCATION="$new_path"
30660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30661$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30662  fi
30663
30664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30666
30667  else
30668    # We're on a posix platform. Hooray! :)
30669    path="$FREETYPELOCATION"
30670
30671    if test ! -f "$path" && test ! -d "$path"; then
30672      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30673    fi
30674
30675    has_space=`$ECHO "$path" | $GREP " "`
30676    if test "x$has_space" != x; then
30677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30678$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30679      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30680    fi
30681  fi
30682
30683	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30684$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30685	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30686	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30687	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30688 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30689                if ! test -s "$FREETYPE2_LIBS"; then
30690		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30691		fi
30692                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30693		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30694		fi
30695                USING_SYSTEM_FT_LIB=true
30696                FREETYPE2_FOUND=yes
30697	    fi
30698	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30699$as_echo "$FREETYPE2_FOUND" >&6; }
30700        fi
30701	if test "x$FREETYPE2_FOUND" = xno; then
30702
30703pkg_failed=no
30704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30705$as_echo_n "checking for FREETYPE2... " >&6; }
30706
30707if test -n "$FREETYPE2_CFLAGS"; then
30708    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30709 elif test -n "$PKG_CONFIG"; then
30710    if test -n "$PKG_CONFIG" && \
30711    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30712  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30713  ac_status=$?
30714  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30715  test $ac_status = 0; }; then
30716  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30717else
30718  pkg_failed=yes
30719fi
30720 else
30721    pkg_failed=untried
30722fi
30723if test -n "$FREETYPE2_LIBS"; then
30724    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30725 elif test -n "$PKG_CONFIG"; then
30726    if test -n "$PKG_CONFIG" && \
30727    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30728  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30729  ac_status=$?
30730  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30731  test $ac_status = 0; }; then
30732  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30733else
30734  pkg_failed=yes
30735fi
30736 else
30737    pkg_failed=untried
30738fi
30739
30740
30741
30742if test $pkg_failed = yes; then
30743
30744if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30745        _pkg_short_errors_supported=yes
30746else
30747        _pkg_short_errors_supported=no
30748fi
30749        if test $_pkg_short_errors_supported = yes; then
30750	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30751        else
30752	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30753        fi
30754	# Put the nasty error message in config.log where it belongs
30755	echo "$FREETYPE2_PKG_ERRORS" >&5
30756
30757	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30758$as_echo "no" >&6; }
30759                FREETYPE2_FOUND=no
30760elif test $pkg_failed = untried; then
30761	FREETYPE2_FOUND=no
30762else
30763	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30764	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30766$as_echo "yes" >&6; }
30767	FREETYPE2_FOUND=yes
30768fi
30769            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30770            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30771            USING_SYSTEM_FT_LIB=true
30772            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30773            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30774              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30775            fi
30776	fi
30777	if test "x$FREETYPE2_FOUND" = xno; then
30778	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30779$as_echo_n "checking for freetype in some standard locations... " >&6; }
30780
30781	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30782	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30783	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30784	    fi
30785	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30786	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30787	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30788	    fi
30789
30790	    PREV_CXXCFLAGS="$CXXFLAGS"
30791	    PREV_LDFLAGS="$LDFLAGS"
30792	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30793	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30794	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30795/* end confdefs.h.  */
30796#include<ft2build.h>
30797	                    #include FT_FREETYPE_H
30798	                   int main() { return 0; }
30799
30800_ACEOF
30801if ac_fn_cxx_try_link "$LINENO"; then :
30802
30803	                      # Yes, the default cflags and libs did the trick.
30804	                      FREETYPE2_FOUND=yes
30805	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30806	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30807
30808else
30809
30810	                      FREETYPE2_FOUND=no
30811
30812fi
30813rm -f core conftest.err conftest.$ac_objext \
30814    conftest$ac_exeext conftest.$ac_ext
30815            CXXCFLAGS="$PREV_CXXFLAGS"
30816	    LDFLAGS="$PREV_LDFLAGS"
30817	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30818$as_echo "$FREETYPE2_FOUND" >&6; }
30819            USING_SYSTEM_FT_LIB=true
30820	fi
30821	if test "x$FREETYPE2_FOUND" = xno; then
30822
30823    # Print a helpful message on how to acquire the necessary build dependency.
30824    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30825    MISSING_DEPENDENCY=freetype2
30826    PKGHANDLER_COMMAND=
30827
30828    case $PKGHANDLER in
30829	apt-get)
30830                apt_help     $MISSING_DEPENDENCY ;;
30831    yum)
30832                yum_help     $MISSING_DEPENDENCY ;;
30833	port)
30834                port_help    $MISSING_DEPENDENCY ;;
30835	pkgutil)
30836                pkgutil_help $MISSING_DEPENDENCY ;;
30837	pkgadd)
30838                pkgadd_help  $MISSING_DEPENDENCY ;;
30839    * )
30840      break ;;
30841    esac
30842
30843    if test "x$PKGHANDLER_COMMAND" != x; then
30844        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30845    fi
30846
30847		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30848	fi
30849
30850        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30851            # AC_CHECK_LIB does not support use of cl.exe
30852            PREV_LDFLAGS="$LDFLAGS"
30853            LDFLAGS="$FREETYPE2_LIBS"
30854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30855$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30856if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30857  $as_echo_n "(cached) " >&6
30858else
30859  ac_check_lib_save_LIBS=$LIBS
30860LIBS="-lfreetype  $LIBS"
30861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30862/* end confdefs.h.  */
30863
30864/* Override any GCC internal prototype to avoid an error.
30865   Use char because int might match the return type of a GCC
30866   builtin and then its argument prototype would still apply.  */
30867#ifdef __cplusplus
30868extern "C"
30869#endif
30870char FT_Init_FreeType ();
30871int
30872main ()
30873{
30874return FT_Init_FreeType ();
30875  ;
30876  return 0;
30877}
30878_ACEOF
30879if ac_fn_cxx_try_link "$LINENO"; then :
30880  ac_cv_lib_freetype_FT_Init_FreeType=yes
30881else
30882  ac_cv_lib_freetype_FT_Init_FreeType=no
30883fi
30884rm -f core conftest.err conftest.$ac_objext \
30885    conftest$ac_exeext conftest.$ac_ext
30886LIBS=$ac_check_lib_save_LIBS
30887fi
30888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30889$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30890if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30891  FREETYPE2_FOUND=true
30892else
30893  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30894fi
30895
30896            LDFLAGS="$PREV_LDFLAGS"
30897        fi
30898fi
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908###############################################################################
30909#
30910# Check for alsa headers and libraries. Used on Linux/GNU systems.
30911#
30912
30913# Check whether --with-alsa was given.
30914if test "${with_alsa+set}" = set; then :
30915  withval=$with_alsa;
30916fi
30917
30918
30919# Check whether --with-alsa-include was given.
30920if test "${with_alsa_include+set}" = set; then :
30921  withval=$with_alsa_include;
30922fi
30923
30924
30925# Check whether --with-alsa-lib was given.
30926if test "${with_alsa_lib+set}" = set; then :
30927  withval=$with_alsa_lib;
30928fi
30929
30930
30931if test "x$ALSA_NOT_NEEDED" = xyes; then
30932	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30933		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30934$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30935	fi
30936	ALSA_CFLAGS=
30937	ALSA_LIBS=
30938else
30939	ALSA_FOUND=no
30940
30941	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30942	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30943	fi
30944
30945	if test "x${with_alsa}" != x; then
30946	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30947	    ALSA_CFLAGS="-I${with_alsa}/include"
30948	    ALSA_FOUND=yes
30949	fi
30950	if test "x${with_alsa_include}" != x; then
30951	    ALSA_CFLAGS="-I${with_alsa_include}"
30952	    ALSA_FOUND=yes
30953	fi
30954	if test "x${with_alsa_lib}" != x; then
30955	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30956	    ALSA_FOUND=yes
30957	fi
30958	if test "x$ALSA_FOUND" = xno; then
30959
30960
30961    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30962        # Source the builddeps file again, to make sure it uses the latest variables!
30963        . $builddepsfile
30964        # Look for a target and build machine specific resource!
30965        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30966        if test "x$resource" = x; then
30967            # Ok, lets instead look for a target specific resource
30968            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30969        fi
30970        if test "x$resource" = x; then
30971            # Ok, lets instead look for a build specific resource
30972            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30973        fi
30974        if test "x$resource" = x; then
30975            # Ok, lets instead look for a generic resource
30976            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30977            resource=${builddep_alsa}
30978        fi
30979        if test "x$resource" != x; then
30980            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30981$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30982	    # If the resource in the builddeps.conf file is an existing directory,
30983	    # for example /java/linux/cups
30984	    if test -d ${resource}; then
30985	       depdir=${resource}
30986	    else
30987
30988# alsa is for example mymodule
30989# $resource is for example libs/general/libmymod_1_2_3.zip
30990# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30991# $with_builddeps_dir is for example /localhome/builddeps
30992# depdir is the name of the variable into which we store the depdir, eg MYMOD
30993# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30994# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30995    filename=`basename $resource`
30996    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30997    filebase=${filename%%.*}
30998    extension=${filename#*.}
30999    installdir=$with_builddeps_dir/$filebase
31000    if test ! -f $installdir/$filename.unpacked; then
31001        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31002$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31003        if test ! -d $installdir; then
31004            mkdir -p $installdir
31005        fi
31006        if test ! -d $installdir; then
31007            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31008        fi
31009        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31010        touch $tmpfile
31011        if test ! -f $tmpfile; then
31012            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31013        fi
31014
31015    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31016    # $tmpfile is the local file name for the downloaded file.
31017    VALID_TOOL=no
31018    if test "x$BDEPS_FTP" = xwget; then
31019       VALID_TOOL=yes
31020       wget -O $tmpfile $with_builddeps_server/$resource
31021    fi
31022    if test "x$BDEPS_FTP" = xlftp; then
31023       VALID_TOOL=yes
31024       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31025    fi
31026    if test "x$BDEPS_FTP" = xftp; then
31027        VALID_TOOL=yes
31028        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31029        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31030        FTPUSERPWD=${FTPSERVER%%@*}
31031        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31032            FTPUSER=${userpwd%%:*}
31033            FTPPWD=${userpwd#*@}
31034            FTPSERVER=${FTPSERVER#*@}
31035        else
31036            FTPUSER=ftp
31037            FTPPWD=ftp
31038        fi
31039        # the "pass" command does not work on some
31040        # ftp clients (read ftp.exe) but if it works,
31041        # passive mode is better!
31042        (\
31043            echo "user $FTPUSER $FTPPWD"        ;\
31044            echo "pass"                         ;\
31045            echo "bin"                          ;\
31046            echo "get $FTPPATH $tmpfile"              ;\
31047        ) | ftp -in $FTPSERVER
31048    fi
31049    if test "x$VALID_TOOL" != xyes; then
31050       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31051    fi
31052
31053        mv $tmpfile $installdir/$filename
31054        if test ! -s $installdir/$filename; then
31055            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31056        fi
31057        case "$extension" in
31058            zip)  echo "Unzipping $installdir/$filename..."
31059               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31060            ;;
31061            tar.gz) echo "Untaring $installdir/$filename..."
31062               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31063            ;;
31064            tgz) echo "Untaring $installdir/$filename..."
31065               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31066            ;;
31067            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31068            ;;
31069        esac
31070    fi
31071    if test -f $installdir/$filename.unpacked; then
31072        depdir=$installdir
31073    fi
31074
31075	    fi
31076            # Source the builddeps file again, because in the previous command, the depdir
31077            # was updated to point at the current build dependency install directory.
31078            . $builddepsfile
31079            # Now extract variables from the builddeps.conf files.
31080            theroot=${builddep_alsa_ROOT}
31081            thecflags=${builddep_alsa_CFLAGS}
31082            thelibs=${builddep_alsa_LIBS}
31083            if test "x$depdir" = x; then
31084                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31085            fi
31086            ALSA=$depdir
31087            if test "x$theroot" != x; then
31088               ALSA="$theroot"
31089            fi
31090            if test "x$thecflags" != x; then
31091               ALSA_CFLAGS="$thecflags"
31092            fi
31093            if test "x$thelibs" != x; then
31094               ALSA_LIBS="$thelibs"
31095            fi
31096            ALSA_FOUND=yes
31097            else ALSA_FOUND=no
31098
31099        fi
31100        else ALSA_FOUND=no
31101
31102    fi
31103
31104	fi
31105	if test "x$ALSA_FOUND" = xno; then
31106
31107pkg_failed=no
31108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31109$as_echo_n "checking for ALSA... " >&6; }
31110
31111if test -n "$ALSA_CFLAGS"; then
31112    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31113 elif test -n "$PKG_CONFIG"; then
31114    if test -n "$PKG_CONFIG" && \
31115    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31116  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31117  ac_status=$?
31118  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31119  test $ac_status = 0; }; then
31120  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31121else
31122  pkg_failed=yes
31123fi
31124 else
31125    pkg_failed=untried
31126fi
31127if test -n "$ALSA_LIBS"; then
31128    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31129 elif test -n "$PKG_CONFIG"; then
31130    if test -n "$PKG_CONFIG" && \
31131    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31132  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31133  ac_status=$?
31134  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31135  test $ac_status = 0; }; then
31136  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31137else
31138  pkg_failed=yes
31139fi
31140 else
31141    pkg_failed=untried
31142fi
31143
31144
31145
31146if test $pkg_failed = yes; then
31147
31148if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31149        _pkg_short_errors_supported=yes
31150else
31151        _pkg_short_errors_supported=no
31152fi
31153        if test $_pkg_short_errors_supported = yes; then
31154	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31155        else
31156	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31157        fi
31158	# Put the nasty error message in config.log where it belongs
31159	echo "$ALSA_PKG_ERRORS" >&5
31160
31161	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31162$as_echo "no" >&6; }
31163                ALSA_FOUND=no
31164elif test $pkg_failed = untried; then
31165	ALSA_FOUND=no
31166else
31167	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31168	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31170$as_echo "yes" >&6; }
31171	ALSA_FOUND=yes
31172fi
31173	fi
31174	if test "x$ALSA_FOUND" = xno; then
31175	    for ac_header in alsa/asoundlib.h
31176do :
31177  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31178if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31179  cat >>confdefs.h <<_ACEOF
31180#define HAVE_ALSA_ASOUNDLIB_H 1
31181_ACEOF
31182 ALSA_FOUND=yes
31183	                      ALSA_CFLAGS=-Iignoreme
31184	                      ALSA_LIBS=-lasound
31185	                      DEFAULT_ALSA=yes
31186else
31187  ALSA_FOUND=no
31188fi
31189
31190done
31191
31192	fi
31193	if test "x$ALSA_FOUND" = xno; then
31194
31195    # Print a helpful message on how to acquire the necessary build dependency.
31196    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31197    MISSING_DEPENDENCY=alsa
31198    PKGHANDLER_COMMAND=
31199
31200    case $PKGHANDLER in
31201	apt-get)
31202                apt_help     $MISSING_DEPENDENCY ;;
31203    yum)
31204                yum_help     $MISSING_DEPENDENCY ;;
31205	port)
31206                port_help    $MISSING_DEPENDENCY ;;
31207	pkgutil)
31208                pkgutil_help $MISSING_DEPENDENCY ;;
31209	pkgadd)
31210                pkgadd_help  $MISSING_DEPENDENCY ;;
31211    * )
31212      break ;;
31213    esac
31214
31215    if test "x$PKGHANDLER_COMMAND" != x; then
31216        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31217    fi
31218
31219	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31220	fi
31221fi
31222
31223
31224
31225
31226
31227
31228
31229###############################################################################
31230#
31231# Check for the jpeg library
31232#
31233
31234USE_EXTERNAL_LIBJPEG=true
31235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31236$as_echo_n "checking for main in -ljpeg... " >&6; }
31237if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31238  $as_echo_n "(cached) " >&6
31239else
31240  ac_check_lib_save_LIBS=$LIBS
31241LIBS="-ljpeg  $LIBS"
31242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31243/* end confdefs.h.  */
31244
31245
31246int
31247main ()
31248{
31249return main ();
31250  ;
31251  return 0;
31252}
31253_ACEOF
31254if ac_fn_cxx_try_link "$LINENO"; then :
31255  ac_cv_lib_jpeg_main=yes
31256else
31257  ac_cv_lib_jpeg_main=no
31258fi
31259rm -f core conftest.err conftest.$ac_objext \
31260    conftest$ac_exeext conftest.$ac_ext
31261LIBS=$ac_check_lib_save_LIBS
31262fi
31263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31264$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31265if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31266  cat >>confdefs.h <<_ACEOF
31267#define HAVE_LIBJPEG 1
31268_ACEOF
31269
31270  LIBS="-ljpeg $LIBS"
31271
31272else
31273   USE_EXTERNAL_LIBJPEG=false
31274               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31275$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31276
31277fi
31278
31279
31280
31281###############################################################################
31282#
31283# Check for the gif library
31284#
31285
31286
31287# Check whether --with-giflib was given.
31288if test "${with_giflib+set}" = set; then :
31289  withval=$with_giflib;
31290fi
31291
31292
31293
31294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31295$as_echo_n "checking for which giflib to use... " >&6; }
31296
31297# default is bundled
31298DEFAULT_GIFLIB=bundled
31299
31300#
31301# if user didn't specify, use DEFAULT_GIFLIB
31302#
31303if test "x${with_giflib}" = "x"; then
31304    with_giflib=${DEFAULT_GIFLIB}
31305fi
31306
31307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31308$as_echo "${with_giflib}" >&6; }
31309
31310if test "x${with_giflib}" = "xbundled"; then
31311    USE_EXTERNAL_LIBGIF=false
31312elif test "x${with_giflib}" = "xsystem"; then
31313    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31314if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
31315
31316else
31317   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31318fi
31319
31320
31321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31322$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31323if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
31324  $as_echo_n "(cached) " >&6
31325else
31326  ac_check_lib_save_LIBS=$LIBS
31327LIBS="-lgif  $LIBS"
31328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31329/* end confdefs.h.  */
31330
31331/* Override any GCC internal prototype to avoid an error.
31332   Use char because int might match the return type of a GCC
31333   builtin and then its argument prototype would still apply.  */
31334#ifdef __cplusplus
31335extern "C"
31336#endif
31337char DGifGetCode ();
31338int
31339main ()
31340{
31341return DGifGetCode ();
31342  ;
31343  return 0;
31344}
31345_ACEOF
31346if ac_fn_cxx_try_link "$LINENO"; then :
31347  ac_cv_lib_gif_DGifGetCode=yes
31348else
31349  ac_cv_lib_gif_DGifGetCode=no
31350fi
31351rm -f core conftest.err conftest.$ac_objext \
31352    conftest$ac_exeext conftest.$ac_ext
31353LIBS=$ac_check_lib_save_LIBS
31354fi
31355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31356$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31357if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
31358  cat >>confdefs.h <<_ACEOF
31359#define HAVE_LIBGIF 1
31360_ACEOF
31361
31362  LIBS="-lgif $LIBS"
31363
31364else
31365   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31366fi
31367
31368
31369    USE_EXTERNAL_LIBGIF=true
31370else
31371    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31372fi
31373
31374
31375###############################################################################
31376#
31377# Check for the zlib library
31378#
31379
31380
31381# Check whether --with-zlib was given.
31382if test "${with_zlib+set}" = set; then :
31383  withval=$with_zlib;
31384fi
31385
31386
31387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31388$as_echo_n "checking for compress in -lz... " >&6; }
31389if test "${ac_cv_lib_z_compress+set}" = set; then :
31390  $as_echo_n "(cached) " >&6
31391else
31392  ac_check_lib_save_LIBS=$LIBS
31393LIBS="-lz  $LIBS"
31394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31395/* end confdefs.h.  */
31396
31397/* Override any GCC internal prototype to avoid an error.
31398   Use char because int might match the return type of a GCC
31399   builtin and then its argument prototype would still apply.  */
31400#ifdef __cplusplus
31401extern "C"
31402#endif
31403char compress ();
31404int
31405main ()
31406{
31407return compress ();
31408  ;
31409  return 0;
31410}
31411_ACEOF
31412if ac_fn_cxx_try_link "$LINENO"; then :
31413  ac_cv_lib_z_compress=yes
31414else
31415  ac_cv_lib_z_compress=no
31416fi
31417rm -f core conftest.err conftest.$ac_objext \
31418    conftest$ac_exeext conftest.$ac_ext
31419LIBS=$ac_check_lib_save_LIBS
31420fi
31421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31422$as_echo "$ac_cv_lib_z_compress" >&6; }
31423if test "x$ac_cv_lib_z_compress" = x""yes; then :
31424   ZLIB_FOUND=yes
31425else
31426   ZLIB_FOUND=no
31427fi
31428
31429
31430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31431$as_echo_n "checking for which zlib to use... " >&6; }
31432
31433DEFAULT_ZLIB=bundled
31434if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31435#
31436# On macosx default is system...on others default is
31437#
31438    DEFAULT_ZLIB=system
31439fi
31440
31441if test "x${ZLIB_FOUND}" != "xyes"; then
31442#
31443# If we don't find any system...set default to bundled
31444#
31445    DEFAULT_ZLIB=bundled
31446fi
31447
31448#
31449# If user didn't specify, use DEFAULT_ZLIB
31450#
31451if test "x${with_zlib}" = "x"; then
31452    with_zlib=${DEFAULT_ZLIB}
31453fi
31454
31455if test "x${with_zlib}" = "xbundled"; then
31456    USE_EXTERNAL_LIBZ=false
31457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31458$as_echo "bundled" >&6; }
31459elif test "x${with_zlib}" = "xsystem"; then
31460    if test "x${ZLIB_FOUND}" = "xyes"; then
31461        USE_EXTERNAL_LIBZ=true
31462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31463$as_echo "system" >&6; }
31464    else
31465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31466$as_echo "system not found" >&6; }
31467        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31468    fi
31469else
31470    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31471fi
31472
31473
31474
31475###############################################################################
31476LIBZIP_CAN_USE_MMAP=true
31477
31478
31479
31480###############################################################################
31481#
31482# Check if altzone exists in time.h
31483#
31484
31485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31486/* end confdefs.h.  */
31487#include <time.h>
31488int
31489main ()
31490{
31491return (int)altzone;
31492  ;
31493  return 0;
31494}
31495_ACEOF
31496if ac_fn_cxx_try_link "$LINENO"; then :
31497  has_altzone=yes
31498else
31499  has_altzone=no
31500fi
31501rm -f core conftest.err conftest.$ac_objext \
31502    conftest$ac_exeext conftest.$ac_ext
31503if test "x$has_altzone" = xyes; then
31504
31505$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31506
31507fi
31508
31509###############################################################################
31510#
31511# Check the maths library
31512#
31513
31514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31515$as_echo_n "checking for cos in -lm... " >&6; }
31516if test "${ac_cv_lib_m_cos+set}" = set; then :
31517  $as_echo_n "(cached) " >&6
31518else
31519  ac_check_lib_save_LIBS=$LIBS
31520LIBS="-lm  $LIBS"
31521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31522/* end confdefs.h.  */
31523
31524/* Override any GCC internal prototype to avoid an error.
31525   Use char because int might match the return type of a GCC
31526   builtin and then its argument prototype would still apply.  */
31527#ifdef __cplusplus
31528extern "C"
31529#endif
31530char cos ();
31531int
31532main ()
31533{
31534return cos ();
31535  ;
31536  return 0;
31537}
31538_ACEOF
31539if ac_fn_cxx_try_link "$LINENO"; then :
31540  ac_cv_lib_m_cos=yes
31541else
31542  ac_cv_lib_m_cos=no
31543fi
31544rm -f core conftest.err conftest.$ac_objext \
31545    conftest$ac_exeext conftest.$ac_ext
31546LIBS=$ac_check_lib_save_LIBS
31547fi
31548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31549$as_echo "$ac_cv_lib_m_cos" >&6; }
31550if test "x$ac_cv_lib_m_cos" = x""yes; then :
31551  cat >>confdefs.h <<_ACEOF
31552#define HAVE_LIBM 1
31553_ACEOF
31554
31555  LIBS="-lm $LIBS"
31556
31557else
31558
31559                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31560$as_echo "$as_me: Maths library was not found" >&6;}
31561
31562fi
31563
31564
31565
31566###############################################################################
31567#
31568# Check for libdl.so
31569
31570save_LIBS="$LIBS"
31571LIBS=""
31572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31573$as_echo_n "checking for dlopen in -ldl... " >&6; }
31574if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
31575  $as_echo_n "(cached) " >&6
31576else
31577  ac_check_lib_save_LIBS=$LIBS
31578LIBS="-ldl  $LIBS"
31579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31580/* end confdefs.h.  */
31581
31582/* Override any GCC internal prototype to avoid an error.
31583   Use char because int might match the return type of a GCC
31584   builtin and then its argument prototype would still apply.  */
31585#ifdef __cplusplus
31586extern "C"
31587#endif
31588char dlopen ();
31589int
31590main ()
31591{
31592return dlopen ();
31593  ;
31594  return 0;
31595}
31596_ACEOF
31597if ac_fn_cxx_try_link "$LINENO"; then :
31598  ac_cv_lib_dl_dlopen=yes
31599else
31600  ac_cv_lib_dl_dlopen=no
31601fi
31602rm -f core conftest.err conftest.$ac_objext \
31603    conftest$ac_exeext conftest.$ac_ext
31604LIBS=$ac_check_lib_save_LIBS
31605fi
31606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31607$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31608if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
31609  cat >>confdefs.h <<_ACEOF
31610#define HAVE_LIBDL 1
31611_ACEOF
31612
31613  LIBS="-ldl $LIBS"
31614
31615fi
31616
31617LIBDL="$LIBS"
31618
31619LIBS="$save_LIBS"
31620
31621
31622
31623###############################################################################
31624#
31625# statically link libstdc++ before C++ ABI is stablized on Linux unless
31626# dynamic build is configured on command line.
31627#
31628
31629# Check whether --with-stdc++lib was given.
31630if test "${with_stdc__lib+set}" = set; then :
31631  withval=$with_stdc__lib;
31632    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31633        && test "x$with_stdc__lib" != xdefault; then
31634      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31635    fi
31636
31637else
31638  with_stdc__lib=default
31639
31640fi
31641
31642
31643if test "x$OPENJDK_TARGET_OS" = xlinux; then
31644    # Test if -lstdc++ works.
31645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31646$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31647    ac_ext=cpp
31648ac_cpp='$CXXCPP $CPPFLAGS'
31649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31652
31653    OLD_CXXFLAGS="$CXXFLAGS"
31654    CXXFLAGS="$CXXFLAGS -lstdc++"
31655    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31656/* end confdefs.h.  */
31657
31658int
31659main ()
31660{
31661return 0;
31662  ;
31663  return 0;
31664}
31665_ACEOF
31666if ac_fn_cxx_try_link "$LINENO"; then :
31667  has_dynamic_libstdcxx=yes
31668else
31669  has_dynamic_libstdcxx=no
31670fi
31671rm -f core conftest.err conftest.$ac_objext \
31672    conftest$ac_exeext conftest.$ac_ext
31673    CXXFLAGS="$OLD_CXXFLAGS"
31674    ac_ext=cpp
31675ac_cpp='$CXXCPP $CPPFLAGS'
31676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31679
31680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31681$as_echo "$has_dynamic_libstdcxx" >&6; }
31682
31683    # Test if stdc++ can be linked statically.
31684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31685$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31686    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31687    ac_ext=cpp
31688ac_cpp='$CXXCPP $CPPFLAGS'
31689ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31690ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31691ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31692
31693    OLD_LIBS="$LIBS"
31694    OLD_CXX="$CXX"
31695    LIBS="$STATIC_STDCXX_FLAGS"
31696    CXX="$CC"
31697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31698/* end confdefs.h.  */
31699
31700int
31701main ()
31702{
31703return 0;
31704  ;
31705  return 0;
31706}
31707_ACEOF
31708if ac_fn_cxx_try_link "$LINENO"; then :
31709  has_static_libstdcxx=yes
31710else
31711  has_static_libstdcxx=no
31712fi
31713rm -f core conftest.err conftest.$ac_objext \
31714    conftest$ac_exeext conftest.$ac_ext
31715    LIBS="$OLD_LIBS"
31716    CXX="$OLD_CXX"
31717    ac_ext=cpp
31718ac_cpp='$CXXCPP $CPPFLAGS'
31719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31722
31723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31724$as_echo "$has_static_libstdcxx" >&6; }
31725
31726    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31727        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31728    fi
31729
31730    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31731        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31732    fi
31733
31734    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31735        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31736    fi
31737
31738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31739$as_echo_n "checking how to link with libstdc++... " >&6; }
31740    # If dynamic was requested, it's available since it would fail above otherwise.
31741    # If dynamic wasn't requested, go with static unless it isn't available.
31742    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31743        LIBCXX="$LIBCXX -lstdc++"
31744        LDCXX="$CXX"
31745        STATIC_CXX_SETTING="STATIC_CXX=false"
31746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31747$as_echo "dynamic" >&6; }
31748    else
31749        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31750        LDCXX="$CC"
31751        STATIC_CXX_SETTING="STATIC_CXX=true"
31752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31753$as_echo "static" >&6; }
31754    fi
31755fi
31756
31757
31758if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31759    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
31760
31761pkg_failed=no
31762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
31763$as_echo_n "checking for LIBFFI... " >&6; }
31764
31765if test -n "$LIBFFI_CFLAGS"; then
31766    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
31767 elif test -n "$PKG_CONFIG"; then
31768    if test -n "$PKG_CONFIG" && \
31769    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
31770  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
31771  ac_status=$?
31772  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31773  test $ac_status = 0; }; then
31774  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
31775else
31776  pkg_failed=yes
31777fi
31778 else
31779    pkg_failed=untried
31780fi
31781if test -n "$LIBFFI_LIBS"; then
31782    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
31783 elif test -n "$PKG_CONFIG"; then
31784    if test -n "$PKG_CONFIG" && \
31785    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
31786  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
31787  ac_status=$?
31788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31789  test $ac_status = 0; }; then
31790  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
31791else
31792  pkg_failed=yes
31793fi
31794 else
31795    pkg_failed=untried
31796fi
31797
31798
31799
31800if test $pkg_failed = yes; then
31801
31802if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31803        _pkg_short_errors_supported=yes
31804else
31805        _pkg_short_errors_supported=no
31806fi
31807        if test $_pkg_short_errors_supported = yes; then
31808	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
31809        else
31810	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
31811        fi
31812	# Put the nasty error message in config.log where it belongs
31813	echo "$LIBFFI_PKG_ERRORS" >&5
31814
31815	as_fn_error $? "Package requirements (libffi) were not met:
31816
31817$LIBFFI_PKG_ERRORS
31818
31819Consider adjusting the PKG_CONFIG_PATH environment variable if you
31820installed software in a non-standard prefix.
31821
31822Alternatively, you may set the environment variables LIBFFI_CFLAGS
31823and LIBFFI_LIBS to avoid the need to call pkg-config.
31824See the pkg-config man page for more details.
31825" "$LINENO" 5
31826elif test $pkg_failed = untried; then
31827	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31829as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
31830is in your PATH or set the PKG_CONFIG environment variable to the full
31831path to pkg-config.
31832
31833Alternatively, you may set the environment variables LIBFFI_CFLAGS
31834and LIBFFI_LIBS to avoid the need to call pkg-config.
31835See the pkg-config man page for more details.
31836
31837To get pkg-config, see <http://pkg-config.freedesktop.org/>.
31838See \`config.log' for more details" "$LINENO" 5; }
31839else
31840	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
31841	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
31842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31843$as_echo "yes" >&6; }
31844	:
31845fi
31846
31847fi
31848
31849if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31850    # Extract the first word of "llvm-config", so it can be a program name with args.
31851set dummy llvm-config; ac_word=$2
31852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31853$as_echo_n "checking for $ac_word... " >&6; }
31854if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
31855  $as_echo_n "(cached) " >&6
31856else
31857  if test -n "$LLVM_CONFIG"; then
31858  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
31859else
31860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31861for as_dir in $PATH
31862do
31863  IFS=$as_save_IFS
31864  test -z "$as_dir" && as_dir=.
31865    for ac_exec_ext in '' $ac_executable_extensions; do
31866  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31867    ac_cv_prog_LLVM_CONFIG="llvm-config"
31868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31869    break 2
31870  fi
31871done
31872  done
31873IFS=$as_save_IFS
31874
31875fi
31876fi
31877LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
31878if test -n "$LLVM_CONFIG"; then
31879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
31880$as_echo "$LLVM_CONFIG" >&6; }
31881else
31882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31883$as_echo "no" >&6; }
31884fi
31885
31886
31887
31888    if test "x$LLVM_CONFIG" != xllvm-config; then
31889        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
31890    fi
31891
31892    llvm_components="jit mcjit engine nativecodegen native"
31893    unset LLVM_CFLAGS
31894    for flag in $("$LLVM_CONFIG" --cxxflags); do
31895      if echo "${flag}" | grep -q '^-[ID]'; then
31896        if test "${flag}" != "-D_DEBUG" ; then
31897          if test "${LLVM_CFLAGS}" != "" ; then
31898            LLVM_CFLAGS="${LLVM_CFLAGS} "
31899          fi
31900          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
31901        fi
31902      fi
31903    done
31904    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
31905    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
31906
31907    unset LLVM_LDFLAGS
31908    for flag in $("${LLVM_CONFIG}" --ldflags); do
31909      if echo "${flag}" | grep -q '^-L'; then
31910        if test "${LLVM_LDFLAGS}" != ""; then
31911          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
31912        fi
31913        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
31914      fi
31915    done
31916
31917    unset LLVM_LIBS
31918    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
31919      if echo "${flag}" | grep -q '^-l'; then
31920        if test "${LLVM_LIBS}" != ""; then
31921          LLVM_LIBS="${LLVM_LIBS} "
31922        fi
31923        LLVM_LIBS="${LLVM_LIBS}${flag}"
31924      fi
31925    done
31926
31927
31928
31929
31930fi
31931
31932# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31933if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31934    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31935fi
31936
31937# TODO better (platform agnostic) test
31938if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31939    LIBCXX="-lstdc++"
31940fi
31941
31942
31943
31944
31945
31946# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31947
31948# When using cygwin or msys, we need a wrapper binary that renames
31949# /cygdrive/c/ arguments into c:/ arguments and peeks into
31950# @files and rewrites these too! This wrapper binary is
31951# called fixpath.
31952FIXPATH=
31953if test "x$OPENJDK_BUILD_OS" = xwindows; then
31954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31955$as_echo_n "checking if fixpath can be created... " >&6; }
31956    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31957    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31958    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31959      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31960      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31961      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31962      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31963    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31964      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31965      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31966
31967      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31968      # @ was chosen as separator to minimize risk of other tools messing around with it
31969      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31970      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31971
31972      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31973    fi
31974    rm -f $OUTPUT_ROOT/fixpath*
31975    cd $OUTPUT_ROOT
31976    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31977    cd $CURDIR
31978
31979    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31981$as_echo "no" >&6; }
31982        cat $OUTPUT_ROOT/fixpath1.log
31983        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31984    fi
31985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31986$as_echo "yes" >&6; }
31987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31988$as_echo_n "checking if fixpath.exe works... " >&6; }
31989    cd $OUTPUT_ROOT
31990    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31991    cd $CURDIR
31992    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31994$as_echo "no" >&6; }
31995        cat $OUTPUT_ROOT/fixpath2.log
31996        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31997    fi
31998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31999$as_echo "yes" >&6; }
32000    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32001fi
32002
32003
32004
32005
32006###############################################################################
32007#
32008# We need to do some final tweaking, when everything else is done.
32009#
32010###############################################################################
32011
32012
32013HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32014
32015
32016# The name of the Service Agent jar.
32017SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32018if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32019  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32020fi
32021
32022
32023
32024
32025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32026$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32027
32028if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32029    ENABLE_INTREE_EC=yes
32030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32031$as_echo "yes" >&6; }
32032else
32033    ENABLE_INTREE_EC=no
32034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32035$as_echo "no" >&6; }
32036fi
32037
32038
32039
32040
32041###############################################################################
32042#
32043# Configure parts of the build that only affect the build performance,
32044# not the result.
32045#
32046###############################################################################
32047
32048
32049  # How many cores do we have on this build system?
32050
32051# Check whether --with-num-cores was given.
32052if test "${with_num_cores+set}" = set; then :
32053  withval=$with_num_cores;
32054fi
32055
32056  if test "x$with_num_cores" = x; then
32057    # The number of cores were not specified, try to probe them.
32058
32059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32060$as_echo_n "checking for number of cores... " >&6; }
32061    NUM_CORES=1
32062    FOUND_CORES=no
32063
32064    if test -f /proc/cpuinfo; then
32065        # Looks like a Linux (or cygwin) system
32066        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32067        FOUND_CORES=yes
32068    elif test -x /usr/sbin/psrinfo; then
32069        # Looks like a Solaris system
32070        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32071        FOUND_CORES=yes
32072    elif test -x /usr/sbin/system_profiler; then
32073        # Looks like a MacOSX system
32074        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32075        FOUND_CORES=yes
32076    elif test -n "$NUMBER_OF_PROCESSORS"; then
32077        # On windows, look in the env
32078        NUM_CORES=$NUMBER_OF_PROCESSORS
32079        FOUND_CORES=yes
32080    fi
32081
32082    if test "x$FOUND_CORES" = xyes; then
32083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32084$as_echo "$NUM_CORES" >&6; }
32085    else
32086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32087$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32089$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32090    fi
32091
32092
32093  else
32094    NUM_CORES=$with_num_cores
32095  fi
32096
32097
32098
32099  # How much memory do we have on this build system?
32100
32101# Check whether --with-memory-size was given.
32102if test "${with_memory_size+set}" = set; then :
32103  withval=$with_memory_size;
32104fi
32105
32106  if test "x$with_memory_size" = x; then
32107    # The memory size was not specified, try to probe it.
32108
32109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32110$as_echo_n "checking for memory size... " >&6; }
32111    # Default to 1024 MB
32112    MEMORY_SIZE=1024
32113    FOUND_MEM=no
32114
32115    if test -f /proc/meminfo; then
32116        # Looks like a Linux (or cygwin) system
32117        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32118        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32119        FOUND_MEM=yes
32120    elif test -x /usr/sbin/prtconf; then
32121        # Looks like a Solaris system
32122        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32123        FOUND_MEM=yes
32124    elif test -x /usr/sbin/system_profiler; then
32125        # Looks like a MacOSX system
32126        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32127        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32128        FOUND_MEM=yes
32129    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32130        # Windows, but without cygwin
32131        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32132        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32133        FOUND_MEM=yes
32134    fi
32135
32136    if test "x$FOUND_MEM" = xyes; then
32137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32138$as_echo "$MEMORY_SIZE MB" >&6; }
32139    else
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32141$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32143$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32144    fi
32145
32146  else
32147    MEMORY_SIZE=$with_memory_size
32148  fi
32149
32150
32151
32152  # Provide a decent default number of parallel jobs for make depending on
32153  # number of cores, amount of memory and machine architecture.
32154
32155# Check whether --with-jobs was given.
32156if test "${with_jobs+set}" = set; then :
32157  withval=$with_jobs;
32158fi
32159
32160  if test "x$with_jobs" = x; then
32161    # Number of jobs was not specified, calculate.
32162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32163$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32164    # Approximate memory in GB, rounding up a bit.
32165    memory_gb=`expr $MEMORY_SIZE / 1100`
32166    # Pick the lowest of memory in gb and number of cores.
32167    if test "$memory_gb" -lt "$NUM_CORES"; then
32168      JOBS="$memory_gb"
32169    else
32170      JOBS="$NUM_CORES"
32171      # On bigger machines, leave some room for other processes to run
32172      if test "$JOBS" -gt "4"; then
32173        JOBS=`expr $JOBS '*' 90 / 100`
32174      fi
32175    fi
32176    # Cap number of jobs to 16
32177    if test "$JOBS" -gt "16"; then
32178      JOBS=16
32179    fi
32180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32181$as_echo "$JOBS" >&6; }
32182  else
32183    JOBS=$with_jobs
32184  fi
32185
32186
32187
32188# Setup smart javac (after cores and memory have been setup)
32189
32190
32191# Check whether --with-sjavac-server-java was given.
32192if test "${with_sjavac_server_java+set}" = set; then :
32193  withval=$with_sjavac_server_java;
32194fi
32195
32196
32197if test "x$with_sjavac_server_java" != x; then
32198    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32199    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32200    if test "x$FOUND_VERSION" = x; then
32201        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32202    fi
32203else
32204    SJAVAC_SERVER_JAVA=""
32205    # Hotspot specific options.
32206
32207    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
32208    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
32209    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
32210    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
32211    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32212        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32213    fi
32214
32215    # JRockit specific options.
32216
32217    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
32218    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
32219    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
32220    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
32221    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32222        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32223    fi
32224
32225    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32226fi
32227
32228
32229
32230# Check whether --with-sjavac-server-cores was given.
32231if test "${with_sjavac_server_cores+set}" = set; then :
32232  withval=$with_sjavac_server_cores;
32233fi
32234
32235if test "x$with_sjavac_server_cores" != x; then
32236    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
32237else
32238    if test "$NUM_CORES" -gt 16; then
32239        # We set this arbitrary limit because we want to limit the heap
32240        # size of the javac server.
32241        # In the future we will make the javac compilers in the server
32242        # share more and more state, thus enabling us to use more and
32243        # more concurrent threads in the server.
32244        SJAVAC_SERVER_CORES="16"
32245    else
32246        SJAVAC_SERVER_CORES="$NUM_CORES"
32247    fi
32248
32249    if test "$MEMORY_SIZE" -gt "17000"; then
32250        MAX_HEAP_MEM=10000
32251
32252    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32253    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32254    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32255    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32256    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32257        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32258    fi
32259
32260
32261    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32262    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
32263    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
32264    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
32265    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32266        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32267    fi
32268
32269    elif test "$MEMORY_SIZE" -gt "10000"; then
32270        MAX_HEAP_MEM=6000
32271
32272    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32273    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32274    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32275    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32276    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32277        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32278    fi
32279
32280
32281    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32282    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
32283    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
32284    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
32285    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32286        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32287    fi
32288
32289    elif test "$MEMORY_SIZE" -gt "5000"; then
32290        MAX_HEAP_MEM=3000
32291
32292    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32293    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32294    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32295    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32296    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32297        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32298    fi
32299
32300
32301    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32302    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
32303    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
32304    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
32305    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32306        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32307    fi
32308
32309    elif test "$MEMORY_SIZE" -gt "3800"; then
32310        MAX_HEAP_MEM=2500
32311
32312    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32313    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
32314    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
32315    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
32316    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32317        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32318    fi
32319
32320    elif test "$MEMORY_SIZE" -gt "1900"; then
32321        MAX_HEAP_MEM=1200
32322
32323    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32324    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
32325    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
32326    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
32327    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32328        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
32329    fi
32330
32331    elif test "$MEMORY_SIZE" -gt "1000"; then
32332        MAX_HEAP_MEM=900
32333
32334    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32335    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
32336    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
32337    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
32338    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32339        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32340    fi
32341
32342    else
32343        MAX_HEAP_MEM=512
32344
32345    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32346    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32347    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32348    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32349    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32350        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32351    fi
32352
32353    fi
32354
32355
32356    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32357    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32358    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32359    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32360    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32361        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32362    fi
32363
32364
32365    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32366    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32367    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32368    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32369    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32370        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32371    fi
32372
32373
32374    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32375    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32376    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32377    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32378    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32379        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32380    fi
32381
32382
32383    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32384    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32386$as_echo_n "checking if number of server cores must be reduced... " >&6; }
32387        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32389$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32390    fi
32391fi
32392
32393
32394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32395$as_echo_n "checking whether to use sjavac... " >&6; }
32396# Check whether --enable-sjavac was given.
32397if test "${enable_sjavac+set}" = set; then :
32398  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32399else
32400  ENABLE_SJAVAC='no'
32401fi
32402
32403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32404$as_echo "$ENABLE_SJAVAC" >&6; }
32405
32406
32407if test "x$ENABLE_SJAVAC" = xyes; then
32408    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32409else
32410    SJAVAC_SERVER_DIR=
32411fi
32412
32413
32414
32415
32416# Can the C/C++ compiler use precompiled headers?
32417
32418
32419###############################################################################
32420#
32421# Can the C/C++ compiler use precompiled headers?
32422#
32423# Check whether --enable-precompiled-headers was given.
32424if test "${enable_precompiled_headers+set}" = set; then :
32425  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32426else
32427  ENABLE_PRECOMPH=yes
32428fi
32429
32430
32431USE_PRECOMPILED_HEADER=1
32432if test "x$ENABLE_PRECOMPH" = xno; then
32433    USE_PRECOMPILED_HEADER=0
32434fi
32435
32436if test "x$ENABLE_PRECOMPH" = xyes; then
32437    # Check that the compiler actually supports precomp headers.
32438    if test "x$GCC" = xyes; then
32439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32440$as_echo_n "checking that precompiled headers work... " >&6; }
32441         echo "int alfa();" > conftest.h
32442         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32443         if test ! -f conftest.hpp.gch; then
32444             USE_PRECOMPILED_HEADER=0
32445             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32446$as_echo "no" >&6; }
32447         else
32448             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32449$as_echo "yes" >&6; }
32450         fi
32451         rm -f conftest.h conftest.hpp.gch
32452    fi
32453fi
32454
32455
32456
32457
32458# Setup use of ccache, if available
32459
32460    # Check whether --enable-ccache was given.
32461if test "${enable_ccache+set}" = set; then :
32462  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32463else
32464  ENABLE_CCACHE=yes
32465fi
32466
32467    if test "x$ENABLE_CCACHE" = xyes; then
32468        # Extract the first word of "ccache", so it can be a program name with args.
32469set dummy ccache; ac_word=$2
32470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32471$as_echo_n "checking for $ac_word... " >&6; }
32472if test "${ac_cv_path_CCACHE+set}" = set; then :
32473  $as_echo_n "(cached) " >&6
32474else
32475  case $CCACHE in
32476  [\\/]* | ?:[\\/]*)
32477  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32478  ;;
32479  *)
32480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32481for as_dir in $PATH
32482do
32483  IFS=$as_save_IFS
32484  test -z "$as_dir" && as_dir=.
32485    for ac_exec_ext in '' $ac_executable_extensions; do
32486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32487    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32489    break 2
32490  fi
32491done
32492  done
32493IFS=$as_save_IFS
32494
32495  ;;
32496esac
32497fi
32498CCACHE=$ac_cv_path_CCACHE
32499if test -n "$CCACHE"; then
32500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32501$as_echo "$CCACHE" >&6; }
32502else
32503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32504$as_echo "no" >&6; }
32505fi
32506
32507
32508    else
32509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32510$as_echo_n "checking for ccache... " >&6; }
32511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32512$as_echo "explicitly disabled" >&6; }
32513        CCACHE=
32514    fi
32515
32516
32517
32518# Check whether --with-ccache-dir was given.
32519if test "${with_ccache_dir+set}" = set; then :
32520  withval=$with_ccache_dir;
32521fi
32522
32523
32524    if test "x$with_ccache_dir" != x; then
32525        # When using a non home ccache directory, assume the use is to share ccache files
32526        # with other users. Thus change the umask.
32527        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32528    fi
32529    CCACHE_FOUND=""
32530    if test "x$CCACHE" != x; then
32531
32532    if test "x$CCACHE" != x; then
32533        CCACHE_FOUND="true"
32534        # Only use ccache if it is 3.1.4 or later, which supports
32535        # precompiled headers.
32536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32537$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32538        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32539        if test "x$HAS_GOOD_CCACHE" = x; then
32540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32541$as_echo "no, disabling ccache" >&6; }
32542            CCACHE=
32543        else
32544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32545$as_echo "yes" >&6; }
32546            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32547$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32548            PUSHED_FLAGS="$CXXFLAGS"
32549            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32550            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32551/* end confdefs.h.  */
32552
32553int
32554main ()
32555{
32556
32557  ;
32558  return 0;
32559}
32560_ACEOF
32561if ac_fn_cxx_try_compile "$LINENO"; then :
32562  CC_KNOWS_CCACHE_TRICK=yes
32563else
32564  CC_KNOWS_CCACHE_TRICK=no
32565fi
32566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32567            CXXFLAGS="$PUSHED_FLAGS"
32568            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32569                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32570$as_echo "yes" >&6; }
32571            else
32572                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32573$as_echo "no, disabling ccaching of precompiled headers" >&6; }
32574                CCACHE=
32575            fi
32576        fi
32577    fi
32578
32579    if test "x$CCACHE" != x; then
32580        CCACHE_SLOPPINESS=time_macros
32581        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32582        CCACHE_FLAGS=-fpch-preprocess
32583
32584        if test "x$SET_CCACHE_DIR" != x; then
32585            mkdir -p $CCACHE_DIR > /dev/null 2>&1
32586	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32587        fi
32588    fi
32589
32590    fi
32591
32592
32593###############################################################################
32594#
32595# And now the finish...
32596#
32597###############################################################################
32598
32599# Check for some common pitfalls
32600
32601  if test x"$OPENJDK_BUILD_OS" = xwindows; then
32602    file_to_test="$SRC_ROOT/LICENSE"
32603    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32604      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
32605    fi
32606  fi
32607
32608
32609
32610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32611$as_echo_n "checking if build directory is on local disk... " >&6; }
32612
32613	# df -l lists only local disks; if the given directory is not found then
32614	# a non-zero exit code is given
32615  if test "x$DF" = x; then
32616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32617      # msys does not have df; use Windows "net use" instead.
32618      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32619      if test "x$IS_NETWORK_DISK" = x; then
32620        OUTPUT_DIR_IS_LOCAL="yes"
32621      else
32622        OUTPUT_DIR_IS_LOCAL="no"
32623      fi
32624    else
32625      # No df here, say it's local
32626      OUTPUT_DIR_IS_LOCAL="yes"
32627    fi
32628  else
32629    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32630      OUTPUT_DIR_IS_LOCAL="yes"
32631    else
32632      OUTPUT_DIR_IS_LOCAL="no"
32633    fi
32634  fi
32635
32636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32637$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32638
32639
32640
32641# Check if the user has any old-style ALT_ variables set.
32642FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32643
32644# Before generating output files, test if they exist. If they do, this is a reconfigure.
32645# Since we can't properly handle the dependencies for this, warn the user about the situation
32646if test -e $OUTPUT_ROOT/spec.gmk; then
32647  IS_RECONFIGURE=yes
32648else
32649  IS_RECONFIGURE=no
32650fi
32651
32652if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32653  HIDE_PERFORMANCE_HINTS=yes
32654else
32655  HIDE_PERFORMANCE_HINTS=no
32656  # Hide it the next time around...
32657  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32658fi
32659
32660
32661
32662# At the end, call the custom hook. (Dummy macro if no custom sources available)
32663
32664
32665# We're messing a bit with internal autoconf variables to put the config.status
32666# in the output directory instead of the current directory.
32667CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32668# Create the actual output files. Now the main work of configure is done.
32669cat >confcache <<\_ACEOF
32670# This file is a shell script that caches the results of configure
32671# tests run on this system so they can be shared between configure
32672# scripts and configure runs, see configure's option --config-cache.
32673# It is not useful on other systems.  If it contains results you don't
32674# want to keep, you may remove or edit it.
32675#
32676# config.status only pays attention to the cache file if you give it
32677# the --recheck option to rerun configure.
32678#
32679# `ac_cv_env_foo' variables (set or unset) will be overridden when
32680# loading this file, other *unset* `ac_cv_foo' will be assigned the
32681# following values.
32682
32683_ACEOF
32684
32685# The following way of writing the cache mishandles newlines in values,
32686# but we know of no workaround that is simple, portable, and efficient.
32687# So, we kill variables containing newlines.
32688# Ultrix sh set writes to stderr and can't be redirected directly,
32689# and sets the high bit in the cache file unless we assign to the vars.
32690(
32691  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32692    eval ac_val=\$$ac_var
32693    case $ac_val in #(
32694    *${as_nl}*)
32695      case $ac_var in #(
32696      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32697$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32698      esac
32699      case $ac_var in #(
32700      _ | IFS | as_nl) ;; #(
32701      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32702      *) { eval $ac_var=; unset $ac_var;} ;;
32703      esac ;;
32704    esac
32705  done
32706
32707  (set) 2>&1 |
32708    case $as_nl`(ac_space=' '; set) 2>&1` in #(
32709    *${as_nl}ac_space=\ *)
32710      # `set' does not quote correctly, so add quotes: double-quote
32711      # substitution turns \\\\ into \\, and sed turns \\ into \.
32712      sed -n \
32713	"s/'/'\\\\''/g;
32714	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32715      ;; #(
32716    *)
32717      # `set' quotes correctly as required by POSIX, so do not add quotes.
32718      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32719      ;;
32720    esac |
32721    sort
32722) |
32723  sed '
32724     /^ac_cv_env_/b end
32725     t clear
32726     :clear
32727     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32728     t end
32729     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32730     :end' >>confcache
32731if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32732  if test -w "$cache_file"; then
32733    test "x$cache_file" != "x/dev/null" &&
32734      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32735$as_echo "$as_me: updating cache $cache_file" >&6;}
32736    cat confcache >$cache_file
32737  else
32738    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32739$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32740  fi
32741fi
32742rm -f confcache
32743
32744test "x$prefix" = xNONE && prefix=$ac_default_prefix
32745# Let make expand exec_prefix.
32746test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32747
32748DEFS=-DHAVE_CONFIG_H
32749
32750ac_libobjs=
32751ac_ltlibobjs=
32752U=
32753for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32754  # 1. Remove the extension, and $U if already installed.
32755  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32756  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32757  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32758  #    will be set to the directory where LIBOBJS objects are built.
32759  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32760  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32761done
32762LIBOBJS=$ac_libobjs
32763
32764LTLIBOBJS=$ac_ltlibobjs
32765
32766
32767
32768: ${CONFIG_STATUS=./config.status}
32769ac_write_fail=0
32770ac_clean_files_save=$ac_clean_files
32771ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32772{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32773$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32774as_write_fail=0
32775cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32776#! $SHELL
32777# Generated by $as_me.
32778# Run this file to recreate the current configuration.
32779# Compiler output produced by configure, useful for debugging
32780# configure, is in config.log if it exists.
32781
32782debug=false
32783ac_cs_recheck=false
32784ac_cs_silent=false
32785
32786SHELL=\${CONFIG_SHELL-$SHELL}
32787export SHELL
32788_ASEOF
32789cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32790## -------------------- ##
32791## M4sh Initialization. ##
32792## -------------------- ##
32793
32794# Be more Bourne compatible
32795DUALCASE=1; export DUALCASE # for MKS sh
32796if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32797  emulate sh
32798  NULLCMD=:
32799  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32800  # is contrary to our usage.  Disable this feature.
32801  alias -g '${1+"$@"}'='"$@"'
32802  setopt NO_GLOB_SUBST
32803else
32804  case `(set -o) 2>/dev/null` in #(
32805  *posix*) :
32806    set -o posix ;; #(
32807  *) :
32808     ;;
32809esac
32810fi
32811
32812
32813as_nl='
32814'
32815export as_nl
32816# Printing a long string crashes Solaris 7 /usr/bin/printf.
32817as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32818as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32819as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32820# Prefer a ksh shell builtin over an external printf program on Solaris,
32821# but without wasting forks for bash or zsh.
32822if test -z "$BASH_VERSION$ZSH_VERSION" \
32823    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32824  as_echo='print -r --'
32825  as_echo_n='print -rn --'
32826elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32827  as_echo='printf %s\n'
32828  as_echo_n='printf %s'
32829else
32830  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32831    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32832    as_echo_n='/usr/ucb/echo -n'
32833  else
32834    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32835    as_echo_n_body='eval
32836      arg=$1;
32837      case $arg in #(
32838      *"$as_nl"*)
32839	expr "X$arg" : "X\\(.*\\)$as_nl";
32840	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32841      esac;
32842      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32843    '
32844    export as_echo_n_body
32845    as_echo_n='sh -c $as_echo_n_body as_echo'
32846  fi
32847  export as_echo_body
32848  as_echo='sh -c $as_echo_body as_echo'
32849fi
32850
32851# The user is always right.
32852if test "${PATH_SEPARATOR+set}" != set; then
32853  PATH_SEPARATOR=:
32854  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32855    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32856      PATH_SEPARATOR=';'
32857  }
32858fi
32859
32860
32861# IFS
32862# We need space, tab and new line, in precisely that order.  Quoting is
32863# there to prevent editors from complaining about space-tab.
32864# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32865# splitting by setting IFS to empty value.)
32866IFS=" ""	$as_nl"
32867
32868# Find who we are.  Look in the path if we contain no directory separator.
32869case $0 in #((
32870  *[\\/]* ) as_myself=$0 ;;
32871  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32872for as_dir in $PATH
32873do
32874  IFS=$as_save_IFS
32875  test -z "$as_dir" && as_dir=.
32876    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32877  done
32878IFS=$as_save_IFS
32879
32880     ;;
32881esac
32882# We did not find ourselves, most probably we were run as `sh COMMAND'
32883# in which case we are not to be found in the path.
32884if test "x$as_myself" = x; then
32885  as_myself=$0
32886fi
32887if test ! -f "$as_myself"; then
32888  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32889  exit 1
32890fi
32891
32892# Unset variables that we do not need and which cause bugs (e.g. in
32893# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32894# suppresses any "Segmentation fault" message there.  '((' could
32895# trigger a bug in pdksh 5.2.14.
32896for as_var in BASH_ENV ENV MAIL MAILPATH
32897do eval test x\${$as_var+set} = xset \
32898  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32899done
32900PS1='$ '
32901PS2='> '
32902PS4='+ '
32903
32904# NLS nuisances.
32905LC_ALL=C
32906export LC_ALL
32907LANGUAGE=C
32908export LANGUAGE
32909
32910# CDPATH.
32911(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32912
32913
32914# as_fn_error STATUS ERROR [LINENO LOG_FD]
32915# ----------------------------------------
32916# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32917# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32918# script with STATUS, using 1 if that was 0.
32919as_fn_error ()
32920{
32921  as_status=$1; test $as_status -eq 0 && as_status=1
32922  if test "$4"; then
32923    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32924    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32925  fi
32926  $as_echo "$as_me: error: $2" >&2
32927  as_fn_exit $as_status
32928} # as_fn_error
32929
32930
32931# as_fn_set_status STATUS
32932# -----------------------
32933# Set $? to STATUS, without forking.
32934as_fn_set_status ()
32935{
32936  return $1
32937} # as_fn_set_status
32938
32939# as_fn_exit STATUS
32940# -----------------
32941# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32942as_fn_exit ()
32943{
32944  set +e
32945  as_fn_set_status $1
32946  exit $1
32947} # as_fn_exit
32948
32949# as_fn_unset VAR
32950# ---------------
32951# Portably unset VAR.
32952as_fn_unset ()
32953{
32954  { eval $1=; unset $1;}
32955}
32956as_unset=as_fn_unset
32957# as_fn_append VAR VALUE
32958# ----------------------
32959# Append the text in VALUE to the end of the definition contained in VAR. Take
32960# advantage of any shell optimizations that allow amortized linear growth over
32961# repeated appends, instead of the typical quadratic growth present in naive
32962# implementations.
32963if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32964  eval 'as_fn_append ()
32965  {
32966    eval $1+=\$2
32967  }'
32968else
32969  as_fn_append ()
32970  {
32971    eval $1=\$$1\$2
32972  }
32973fi # as_fn_append
32974
32975# as_fn_arith ARG...
32976# ------------------
32977# Perform arithmetic evaluation on the ARGs, and store the result in the
32978# global $as_val. Take advantage of shells that can avoid forks. The arguments
32979# must be portable across $(()) and expr.
32980if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32981  eval 'as_fn_arith ()
32982  {
32983    as_val=$(( $* ))
32984  }'
32985else
32986  as_fn_arith ()
32987  {
32988    as_val=`expr "$@" || test $? -eq 1`
32989  }
32990fi # as_fn_arith
32991
32992
32993if expr a : '\(a\)' >/dev/null 2>&1 &&
32994   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32995  as_expr=expr
32996else
32997  as_expr=false
32998fi
32999
33000if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33001  as_basename=basename
33002else
33003  as_basename=false
33004fi
33005
33006if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33007  as_dirname=dirname
33008else
33009  as_dirname=false
33010fi
33011
33012as_me=`$as_basename -- "$0" ||
33013$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33014	 X"$0" : 'X\(//\)$' \| \
33015	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33016$as_echo X/"$0" |
33017    sed '/^.*\/\([^/][^/]*\)\/*$/{
33018	    s//\1/
33019	    q
33020	  }
33021	  /^X\/\(\/\/\)$/{
33022	    s//\1/
33023	    q
33024	  }
33025	  /^X\/\(\/\).*/{
33026	    s//\1/
33027	    q
33028	  }
33029	  s/.*/./; q'`
33030
33031# Avoid depending upon Character Ranges.
33032as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33033as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33034as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33035as_cr_digits='0123456789'
33036as_cr_alnum=$as_cr_Letters$as_cr_digits
33037
33038ECHO_C= ECHO_N= ECHO_T=
33039case `echo -n x` in #(((((
33040-n*)
33041  case `echo 'xy\c'` in
33042  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33043  xy)  ECHO_C='\c';;
33044  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33045       ECHO_T='	';;
33046  esac;;
33047*)
33048  ECHO_N='-n';;
33049esac
33050
33051rm -f conf$$ conf$$.exe conf$$.file
33052if test -d conf$$.dir; then
33053  rm -f conf$$.dir/conf$$.file
33054else
33055  rm -f conf$$.dir
33056  mkdir conf$$.dir 2>/dev/null
33057fi
33058if (echo >conf$$.file) 2>/dev/null; then
33059  if ln -s conf$$.file conf$$ 2>/dev/null; then
33060    as_ln_s='ln -s'
33061    # ... but there are two gotchas:
33062    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33063    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33064    # In both cases, we have to default to `cp -p'.
33065    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33066      as_ln_s='cp -p'
33067  elif ln conf$$.file conf$$ 2>/dev/null; then
33068    as_ln_s=ln
33069  else
33070    as_ln_s='cp -p'
33071  fi
33072else
33073  as_ln_s='cp -p'
33074fi
33075rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33076rmdir conf$$.dir 2>/dev/null
33077
33078
33079# as_fn_mkdir_p
33080# -------------
33081# Create "$as_dir" as a directory, including parents if necessary.
33082as_fn_mkdir_p ()
33083{
33084
33085  case $as_dir in #(
33086  -*) as_dir=./$as_dir;;
33087  esac
33088  test -d "$as_dir" || eval $as_mkdir_p || {
33089    as_dirs=
33090    while :; do
33091      case $as_dir in #(
33092      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33093      *) as_qdir=$as_dir;;
33094      esac
33095      as_dirs="'$as_qdir' $as_dirs"
33096      as_dir=`$as_dirname -- "$as_dir" ||
33097$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33098	 X"$as_dir" : 'X\(//\)[^/]' \| \
33099	 X"$as_dir" : 'X\(//\)$' \| \
33100	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33101$as_echo X"$as_dir" |
33102    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33103	    s//\1/
33104	    q
33105	  }
33106	  /^X\(\/\/\)[^/].*/{
33107	    s//\1/
33108	    q
33109	  }
33110	  /^X\(\/\/\)$/{
33111	    s//\1/
33112	    q
33113	  }
33114	  /^X\(\/\).*/{
33115	    s//\1/
33116	    q
33117	  }
33118	  s/.*/./; q'`
33119      test -d "$as_dir" && break
33120    done
33121    test -z "$as_dirs" || eval "mkdir $as_dirs"
33122  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33123
33124
33125} # as_fn_mkdir_p
33126if mkdir -p . 2>/dev/null; then
33127  as_mkdir_p='mkdir -p "$as_dir"'
33128else
33129  test -d ./-p && rmdir ./-p
33130  as_mkdir_p=false
33131fi
33132
33133if test -x / >/dev/null 2>&1; then
33134  as_test_x='test -x'
33135else
33136  if ls -dL / >/dev/null 2>&1; then
33137    as_ls_L_option=L
33138  else
33139    as_ls_L_option=
33140  fi
33141  as_test_x='
33142    eval sh -c '\''
33143      if test -d "$1"; then
33144	test -d "$1/.";
33145      else
33146	case $1 in #(
33147	-*)set "./$1";;
33148	esac;
33149	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33150	???[sx]*):;;*)false;;esac;fi
33151    '\'' sh
33152  '
33153fi
33154as_executable_p=$as_test_x
33155
33156# Sed expression to map a string onto a valid CPP name.
33157as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33158
33159# Sed expression to map a string onto a valid variable name.
33160as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33161
33162
33163exec 6>&1
33164## ----------------------------------- ##
33165## Main body of $CONFIG_STATUS script. ##
33166## ----------------------------------- ##
33167_ASEOF
33168test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33169
33170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33171# Save the log message, to keep $0 and so on meaningful, and to
33172# report actual input values of CONFIG_FILES etc. instead of their
33173# values after options handling.
33174ac_log="
33175This file was extended by OpenJDK $as_me jdk8, which was
33176generated by GNU Autoconf 2.67.  Invocation command line was
33177
33178  CONFIG_FILES    = $CONFIG_FILES
33179  CONFIG_HEADERS  = $CONFIG_HEADERS
33180  CONFIG_LINKS    = $CONFIG_LINKS
33181  CONFIG_COMMANDS = $CONFIG_COMMANDS
33182  $ $0 $@
33183
33184on `(hostname || uname -n) 2>/dev/null | sed 1q`
33185"
33186
33187_ACEOF
33188
33189case $ac_config_files in *"
33190"*) set x $ac_config_files; shift; ac_config_files=$*;;
33191esac
33192
33193case $ac_config_headers in *"
33194"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33195esac
33196
33197
33198cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33199# Files that config.status was made for.
33200config_files="$ac_config_files"
33201config_headers="$ac_config_headers"
33202
33203_ACEOF
33204
33205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33206ac_cs_usage="\
33207\`$as_me' instantiates files and other configuration actions
33208from templates according to the current configuration.  Unless the files
33209and actions are specified as TAGs, all are instantiated by default.
33210
33211Usage: $0 [OPTION]... [TAG]...
33212
33213  -h, --help       print this help, then exit
33214  -V, --version    print version number and configuration settings, then exit
33215      --config     print configuration, then exit
33216  -q, --quiet, --silent
33217                   do not print progress messages
33218  -d, --debug      don't remove temporary files
33219      --recheck    update $as_me by reconfiguring in the same conditions
33220      --file=FILE[:TEMPLATE]
33221                   instantiate the configuration file FILE
33222      --header=FILE[:TEMPLATE]
33223                   instantiate the configuration header FILE
33224
33225Configuration files:
33226$config_files
33227
33228Configuration headers:
33229$config_headers
33230
33231Report bugs to <build-dev@openjdk.java.net>.
33232OpenJDK home page: <http://openjdk.java.net>."
33233
33234_ACEOF
33235cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33236ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33237ac_cs_version="\\
33238OpenJDK config.status jdk8
33239configured by $0, generated by GNU Autoconf 2.67,
33240  with options \\"\$ac_cs_config\\"
33241
33242Copyright (C) 2010 Free Software Foundation, Inc.
33243This config.status script is free software; the Free Software Foundation
33244gives unlimited permission to copy, distribute and modify it."
33245
33246ac_pwd='$ac_pwd'
33247srcdir='$srcdir'
33248AWK='$AWK'
33249test -n "\$AWK" || AWK=awk
33250_ACEOF
33251
33252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33253# The default lists apply if the user does not specify any file.
33254ac_need_defaults=:
33255while test $# != 0
33256do
33257  case $1 in
33258  --*=?*)
33259    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33260    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33261    ac_shift=:
33262    ;;
33263  --*=)
33264    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33265    ac_optarg=
33266    ac_shift=:
33267    ;;
33268  *)
33269    ac_option=$1
33270    ac_optarg=$2
33271    ac_shift=shift
33272    ;;
33273  esac
33274
33275  case $ac_option in
33276  # Handling of the options.
33277  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33278    ac_cs_recheck=: ;;
33279  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33280    $as_echo "$ac_cs_version"; exit ;;
33281  --config | --confi | --conf | --con | --co | --c )
33282    $as_echo "$ac_cs_config"; exit ;;
33283  --debug | --debu | --deb | --de | --d | -d )
33284    debug=: ;;
33285  --file | --fil | --fi | --f )
33286    $ac_shift
33287    case $ac_optarg in
33288    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33289    '') as_fn_error $? "missing file argument" ;;
33290    esac
33291    as_fn_append CONFIG_FILES " '$ac_optarg'"
33292    ac_need_defaults=false;;
33293  --header | --heade | --head | --hea )
33294    $ac_shift
33295    case $ac_optarg in
33296    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33297    esac
33298    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33299    ac_need_defaults=false;;
33300  --he | --h)
33301    # Conflict between --help and --header
33302    as_fn_error $? "ambiguous option: \`$1'
33303Try \`$0 --help' for more information.";;
33304  --help | --hel | -h )
33305    $as_echo "$ac_cs_usage"; exit ;;
33306  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33307  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33308    ac_cs_silent=: ;;
33309
33310  # This is an error.
33311  -*) as_fn_error $? "unrecognized option: \`$1'
33312Try \`$0 --help' for more information." ;;
33313
33314  *) as_fn_append ac_config_targets " $1"
33315     ac_need_defaults=false ;;
33316
33317  esac
33318  shift
33319done
33320
33321ac_configure_extra_args=
33322
33323if $ac_cs_silent; then
33324  exec 6>/dev/null
33325  ac_configure_extra_args="$ac_configure_extra_args --silent"
33326fi
33327
33328_ACEOF
33329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33330if \$ac_cs_recheck; then
33331  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33332  shift
33333  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33334  CONFIG_SHELL='$SHELL'
33335  export CONFIG_SHELL
33336  exec "\$@"
33337fi
33338
33339_ACEOF
33340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33341exec 5>>config.log
33342{
33343  echo
33344  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33345## Running $as_me. ##
33346_ASBOX
33347  $as_echo "$ac_log"
33348} >&5
33349
33350_ACEOF
33351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33352_ACEOF
33353
33354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33355
33356# Handling of arguments.
33357for ac_config_target in $ac_config_targets
33358do
33359  case $ac_config_target in
33360    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33361    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33362    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33363    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33364    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33365    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33366    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33367
33368  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
33369  esac
33370done
33371
33372
33373# If the user did not use the arguments to specify the items to instantiate,
33374# then the envvar interface is used.  Set only those that are not.
33375# We use the long form for the default assignment because of an extremely
33376# bizarre bug on SunOS 4.1.3.
33377if $ac_need_defaults; then
33378  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33379  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33380fi
33381
33382# Have a temporary directory for convenience.  Make it in the build tree
33383# simply because there is no reason against having it here, and in addition,
33384# creating and moving files from /tmp can sometimes cause problems.
33385# Hook for its removal unless debugging.
33386# Note that there is a small window in which the directory will not be cleaned:
33387# after its creation but before its name has been assigned to `$tmp'.
33388$debug ||
33389{
33390  tmp=
33391  trap 'exit_status=$?
33392  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
33393' 0
33394  trap 'as_fn_exit 1' 1 2 13 15
33395}
33396# Create a (secure) tmp directory for tmp files.
33397
33398{
33399  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33400  test -n "$tmp" && test -d "$tmp"
33401}  ||
33402{
33403  tmp=./conf$$-$RANDOM
33404  (umask 077 && mkdir "$tmp")
33405} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33406
33407# Set up the scripts for CONFIG_FILES section.
33408# No need to generate them if there are no CONFIG_FILES.
33409# This happens for instance with `./config.status config.h'.
33410if test -n "$CONFIG_FILES"; then
33411
33412
33413ac_cr=`echo X | tr X '\015'`
33414# On cygwin, bash can eat \r inside `` if the user requested igncr.
33415# But we know of no other shell where ac_cr would be empty at this
33416# point, so we can use a bashism as a fallback.
33417if test "x$ac_cr" = x; then
33418  eval ac_cr=\$\'\\r\'
33419fi
33420ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33421if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33422  ac_cs_awk_cr='\\r'
33423else
33424  ac_cs_awk_cr=$ac_cr
33425fi
33426
33427echo 'BEGIN {' >"$tmp/subs1.awk" &&
33428_ACEOF
33429
33430
33431{
33432  echo "cat >conf$$subs.awk <<_ACEOF" &&
33433  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33434  echo "_ACEOF"
33435} >conf$$subs.sh ||
33436  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33437ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33438ac_delim='%!_!# '
33439for ac_last_try in false false false false false :; do
33440  . ./conf$$subs.sh ||
33441    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33442
33443  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33444  if test $ac_delim_n = $ac_delim_num; then
33445    break
33446  elif $ac_last_try; then
33447    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33448  else
33449    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33450  fi
33451done
33452rm -f conf$$subs.sh
33453
33454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33455cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
33456_ACEOF
33457sed -n '
33458h
33459s/^/S["/; s/!.*/"]=/
33460p
33461g
33462s/^[^!]*!//
33463:repl
33464t repl
33465s/'"$ac_delim"'$//
33466t delim
33467:nl
33468h
33469s/\(.\{148\}\)..*/\1/
33470t more1
33471s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33472p
33473n
33474b repl
33475:more1
33476s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33477p
33478g
33479s/.\{148\}//
33480t nl
33481:delim
33482h
33483s/\(.\{148\}\)..*/\1/
33484t more2
33485s/["\\]/\\&/g; s/^/"/; s/$/"/
33486p
33487b
33488:more2
33489s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33490p
33491g
33492s/.\{148\}//
33493t delim
33494' <conf$$subs.awk | sed '
33495/^[^""]/{
33496  N
33497  s/\n//
33498}
33499' >>$CONFIG_STATUS || ac_write_fail=1
33500rm -f conf$$subs.awk
33501cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33502_ACAWK
33503cat >>"\$tmp/subs1.awk" <<_ACAWK &&
33504  for (key in S) S_is_set[key] = 1
33505  FS = ""
33506
33507}
33508{
33509  line = $ 0
33510  nfields = split(line, field, "@")
33511  substed = 0
33512  len = length(field[1])
33513  for (i = 2; i < nfields; i++) {
33514    key = field[i]
33515    keylen = length(key)
33516    if (S_is_set[key]) {
33517      value = S[key]
33518      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33519      len += length(value) + length(field[++i])
33520      substed = 1
33521    } else
33522      len += 1 + keylen
33523  }
33524
33525  print line
33526}
33527
33528_ACAWK
33529_ACEOF
33530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33531if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33532  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33533else
33534  cat
33535fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
33536  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33537_ACEOF
33538
33539# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33540# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33541# trailing colons and then remove the whole line if VPATH becomes empty
33542# (actually we leave an empty line to preserve line numbers).
33543if test "x$srcdir" = x.; then
33544  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
33545h
33546s///
33547s/^/:/
33548s/[	 ]*$/:/
33549s/:\$(srcdir):/:/g
33550s/:\${srcdir}:/:/g
33551s/:@srcdir@:/:/g
33552s/^:*//
33553s/:*$//
33554x
33555s/\(=[	 ]*\).*/\1/
33556G
33557s/\n//
33558s/^[^=]*=[	 ]*$//
33559}'
33560fi
33561
33562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33563fi # test -n "$CONFIG_FILES"
33564
33565# Set up the scripts for CONFIG_HEADERS section.
33566# No need to generate them if there are no CONFIG_HEADERS.
33567# This happens for instance with `./config.status Makefile'.
33568if test -n "$CONFIG_HEADERS"; then
33569cat >"$tmp/defines.awk" <<\_ACAWK ||
33570BEGIN {
33571_ACEOF
33572
33573# Transform confdefs.h into an awk script `defines.awk', embedded as
33574# here-document in config.status, that substitutes the proper values into
33575# config.h.in to produce config.h.
33576
33577# Create a delimiter string that does not exist in confdefs.h, to ease
33578# handling of long lines.
33579ac_delim='%!_!# '
33580for ac_last_try in false false :; do
33581  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
33582  if test -z "$ac_t"; then
33583    break
33584  elif $ac_last_try; then
33585    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33586  else
33587    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33588  fi
33589done
33590
33591# For the awk script, D is an array of macro values keyed by name,
33592# likewise P contains macro parameters if any.  Preserve backslash
33593# newline sequences.
33594
33595ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33596sed -n '
33597s/.\{148\}/&'"$ac_delim"'/g
33598t rset
33599:rset
33600s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33601t def
33602d
33603:def
33604s/\\$//
33605t bsnl
33606s/["\\]/\\&/g
33607s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33608D["\1"]=" \3"/p
33609s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33610d
33611:bsnl
33612s/["\\]/\\&/g
33613s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33614D["\1"]=" \3\\\\\\n"\\/p
33615t cont
33616s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33617t cont
33618d
33619:cont
33620n
33621s/.\{148\}/&'"$ac_delim"'/g
33622t clear
33623:clear
33624s/\\$//
33625t bsnlc
33626s/["\\]/\\&/g; s/^/"/; s/$/"/p
33627d
33628:bsnlc
33629s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33630b cont
33631' <confdefs.h | sed '
33632s/'"$ac_delim"'/"\\\
33633"/g' >>$CONFIG_STATUS || ac_write_fail=1
33634
33635cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33636  for (key in D) D_is_set[key] = 1
33637  FS = ""
33638}
33639/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33640  line = \$ 0
33641  split(line, arg, " ")
33642  if (arg[1] == "#") {
33643    defundef = arg[2]
33644    mac1 = arg[3]
33645  } else {
33646    defundef = substr(arg[1], 2)
33647    mac1 = arg[2]
33648  }
33649  split(mac1, mac2, "(") #)
33650  macro = mac2[1]
33651  prefix = substr(line, 1, index(line, defundef) - 1)
33652  if (D_is_set[macro]) {
33653    # Preserve the white space surrounding the "#".
33654    print prefix "define", macro P[macro] D[macro]
33655    next
33656  } else {
33657    # Replace #undef with comments.  This is necessary, for example,
33658    # in the case of _POSIX_SOURCE, which is predefined and required
33659    # on some systems where configure will not decide to define it.
33660    if (defundef == "undef") {
33661      print "/*", prefix defundef, macro, "*/"
33662      next
33663    }
33664  }
33665}
33666{ print }
33667_ACAWK
33668_ACEOF
33669cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33670  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33671fi # test -n "$CONFIG_HEADERS"
33672
33673
33674eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33675shift
33676for ac_tag
33677do
33678  case $ac_tag in
33679  :[FHLC]) ac_mode=$ac_tag; continue;;
33680  esac
33681  case $ac_mode$ac_tag in
33682  :[FHL]*:*);;
33683  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
33684  :[FH]-) ac_tag=-:-;;
33685  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33686  esac
33687  ac_save_IFS=$IFS
33688  IFS=:
33689  set x $ac_tag
33690  IFS=$ac_save_IFS
33691  shift
33692  ac_file=$1
33693  shift
33694
33695  case $ac_mode in
33696  :L) ac_source=$1;;
33697  :[FH])
33698    ac_file_inputs=
33699    for ac_f
33700    do
33701      case $ac_f in
33702      -) ac_f="$tmp/stdin";;
33703      *) # Look for the file first in the build tree, then in the source tree
33704	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33705	 # because $ac_f cannot contain `:'.
33706	 test -f "$ac_f" ||
33707	   case $ac_f in
33708	   [\\/$]*) false;;
33709	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33710	   esac ||
33711	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
33712      esac
33713      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33714      as_fn_append ac_file_inputs " '$ac_f'"
33715    done
33716
33717    # Let's still pretend it is `configure' which instantiates (i.e., don't
33718    # use $as_me), people would be surprised to read:
33719    #    /* config.h.  Generated by config.status.  */
33720    configure_input='Generated from '`
33721	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33722	`' by configure.'
33723    if test x"$ac_file" != x-; then
33724      configure_input="$ac_file.  $configure_input"
33725      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33726$as_echo "$as_me: creating $ac_file" >&6;}
33727    fi
33728    # Neutralize special characters interpreted by sed in replacement strings.
33729    case $configure_input in #(
33730    *\&* | *\|* | *\\* )
33731       ac_sed_conf_input=`$as_echo "$configure_input" |
33732       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33733    *) ac_sed_conf_input=$configure_input;;
33734    esac
33735
33736    case $ac_tag in
33737    *:-:* | *:-) cat >"$tmp/stdin" \
33738      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
33739    esac
33740    ;;
33741  esac
33742
33743  ac_dir=`$as_dirname -- "$ac_file" ||
33744$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33745	 X"$ac_file" : 'X\(//\)[^/]' \| \
33746	 X"$ac_file" : 'X\(//\)$' \| \
33747	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33748$as_echo X"$ac_file" |
33749    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33750	    s//\1/
33751	    q
33752	  }
33753	  /^X\(\/\/\)[^/].*/{
33754	    s//\1/
33755	    q
33756	  }
33757	  /^X\(\/\/\)$/{
33758	    s//\1/
33759	    q
33760	  }
33761	  /^X\(\/\).*/{
33762	    s//\1/
33763	    q
33764	  }
33765	  s/.*/./; q'`
33766  as_dir="$ac_dir"; as_fn_mkdir_p
33767  ac_builddir=.
33768
33769case "$ac_dir" in
33770.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33771*)
33772  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33773  # A ".." for each directory in $ac_dir_suffix.
33774  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33775  case $ac_top_builddir_sub in
33776  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33777  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33778  esac ;;
33779esac
33780ac_abs_top_builddir=$ac_pwd
33781ac_abs_builddir=$ac_pwd$ac_dir_suffix
33782# for backward compatibility:
33783ac_top_builddir=$ac_top_build_prefix
33784
33785case $srcdir in
33786  .)  # We are building in place.
33787    ac_srcdir=.
33788    ac_top_srcdir=$ac_top_builddir_sub
33789    ac_abs_top_srcdir=$ac_pwd ;;
33790  [\\/]* | ?:[\\/]* )  # Absolute name.
33791    ac_srcdir=$srcdir$ac_dir_suffix;
33792    ac_top_srcdir=$srcdir
33793    ac_abs_top_srcdir=$srcdir ;;
33794  *) # Relative name.
33795    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33796    ac_top_srcdir=$ac_top_build_prefix$srcdir
33797    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33798esac
33799ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33800
33801
33802  case $ac_mode in
33803  :F)
33804  #
33805  # CONFIG_FILE
33806  #
33807
33808_ACEOF
33809
33810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33811# If the template does not know about datarootdir, expand it.
33812# FIXME: This hack should be removed a few years after 2.60.
33813ac_datarootdir_hack=; ac_datarootdir_seen=
33814ac_sed_dataroot='
33815/datarootdir/ {
33816  p
33817  q
33818}
33819/@datadir@/p
33820/@docdir@/p
33821/@infodir@/p
33822/@localedir@/p
33823/@mandir@/p'
33824case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33825*datarootdir*) ac_datarootdir_seen=yes;;
33826*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33827  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33828$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33829_ACEOF
33830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33831  ac_datarootdir_hack='
33832  s&@datadir@&$datadir&g
33833  s&@docdir@&$docdir&g
33834  s&@infodir@&$infodir&g
33835  s&@localedir@&$localedir&g
33836  s&@mandir@&$mandir&g
33837  s&\\\${datarootdir}&$datarootdir&g' ;;
33838esac
33839_ACEOF
33840
33841# Neutralize VPATH when `$srcdir' = `.'.
33842# Shell code in configure.ac might set extrasub.
33843# FIXME: do we really want to maintain this feature?
33844cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33845ac_sed_extra="$ac_vpsub
33846$extrasub
33847_ACEOF
33848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33849:t
33850/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33851s|@configure_input@|$ac_sed_conf_input|;t t
33852s&@top_builddir@&$ac_top_builddir_sub&;t t
33853s&@top_build_prefix@&$ac_top_build_prefix&;t t
33854s&@srcdir@&$ac_srcdir&;t t
33855s&@abs_srcdir@&$ac_abs_srcdir&;t t
33856s&@top_srcdir@&$ac_top_srcdir&;t t
33857s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33858s&@builddir@&$ac_builddir&;t t
33859s&@abs_builddir@&$ac_abs_builddir&;t t
33860s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33861$ac_datarootdir_hack
33862"
33863eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33864  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33865
33866test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33867  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33868  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33869  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33870which seems to be undefined.  Please make sure it is defined" >&5
33871$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33872which seems to be undefined.  Please make sure it is defined" >&2;}
33873
33874  rm -f "$tmp/stdin"
33875  case $ac_file in
33876  -) cat "$tmp/out" && rm -f "$tmp/out";;
33877  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33878  esac \
33879  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33880 ;;
33881  :H)
33882  #
33883  # CONFIG_HEADER
33884  #
33885  if test x"$ac_file" != x-; then
33886    {
33887      $as_echo "/* $configure_input  */" \
33888      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33889    } >"$tmp/config.h" \
33890      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33891    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33892      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33893$as_echo "$as_me: $ac_file is unchanged" >&6;}
33894    else
33895      rm -f "$ac_file"
33896      mv "$tmp/config.h" "$ac_file" \
33897	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33898    fi
33899  else
33900    $as_echo "/* $configure_input  */" \
33901      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33902      || as_fn_error $? "could not create -" "$LINENO" 5
33903  fi
33904 ;;
33905
33906
33907  esac
33908
33909done # for ac_tag
33910
33911
33912as_fn_exit 0
33913_ACEOF
33914ac_clean_files=$ac_clean_files_save
33915
33916test $ac_write_fail = 0 ||
33917  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33918
33919
33920# configure is writing to config.log, and then calls config.status.
33921# config.status does its own redirection, appending to config.log.
33922# Unfortunately, on DOS this fails, as config.log is still kept open
33923# by configure, so config.status won't be able to write to it; its
33924# output is simply discarded.  So we exec the FD to /dev/null,
33925# effectively closing config.log, so it can be properly (re)opened and
33926# appended to by config.status.  When coming back to configure, we
33927# need to make the FD available again.
33928if test "$no_create" != yes; then
33929  ac_cs_success=:
33930  ac_config_status_args=
33931  test "$silent" = yes &&
33932    ac_config_status_args="$ac_config_status_args --quiet"
33933  exec 5>/dev/null
33934  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33935  exec 5>>config.log
33936  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33937  # would make configure fail if this is the last instruction.
33938  $ac_cs_success || as_fn_exit 1
33939fi
33940if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33941  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33942$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33943fi
33944
33945
33946# Make the compare script executable
33947$CHMOD +x $OUTPUT_ROOT/compare.sh
33948
33949# Finally output some useful information to the user
33950
33951# Finally output some useful information to the user
33952
33953if test "x$CCACHE_FOUND" != x; then
33954	if  test "x$HAS_GOOD_CCACHE" = x; then
33955		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33956		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33957	else
33958		CCACHE_STATUS="installed and in use"
33959	fi
33960else
33961	if test "x$GCC" = xyes; then
33962		CCACHE_STATUS="not installed (consider installing)"
33963		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33964	else
33965		CCACHE_STATUS="not available for your system"
33966	fi
33967fi
33968
33969printf "\n"
33970printf "====================================================\n"
33971printf "A new configuration has been successfully created in\n"
33972printf "$OUTPUT_ROOT\n"
33973if test "x$CONFIGURE_COMMAND_LINE" != x; then
33974	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33975else
33976	printf "using default settings.\n"
33977fi
33978
33979printf "\n"
33980printf "Configuration summary:\n"
33981printf "* Debug level:    $DEBUG_LEVEL\n"
33982printf "* JDK variant:    $JDK_VARIANT\n"
33983printf "* JVM variants:   $with_jvm_variants\n"
33984printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33985
33986printf "\n"
33987printf "Tools summary:\n"
33988if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33989  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33990fi
33991printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33992printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33993printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33994
33995printf "\n"
33996printf "Build performance summary:\n"
33997printf "* Cores to use:   $JOBS\n"
33998printf "* Memory limit:   $MEMORY_SIZE MB\n"
33999printf "* ccache status:  $CCACHE_STATUS\n"
34000printf "\n"
34001
34002if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34003	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34004	printf "$CCACHE_HELP_MSG\n"
34005
34006    # Print a helpful message on how to acquire the necessary build dependency.
34007    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34008    MISSING_DEPENDENCY=ccache
34009    PKGHANDLER_COMMAND=
34010
34011    case $PKGHANDLER in
34012	apt-get)
34013                apt_help     $MISSING_DEPENDENCY ;;
34014    yum)
34015                yum_help     $MISSING_DEPENDENCY ;;
34016	port)
34017                port_help    $MISSING_DEPENDENCY ;;
34018	pkgutil)
34019                pkgutil_help $MISSING_DEPENDENCY ;;
34020	pkgadd)
34021                pkgadd_help  $MISSING_DEPENDENCY ;;
34022    * )
34023      break ;;
34024    esac
34025
34026    if test "x$PKGHANDLER_COMMAND" != x; then
34027        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34028    fi
34029
34030	printf "$HELP_MSG\n"
34031	printf "\n"
34032fi
34033
34034if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34035	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34036	printf "will result in longer build times.\n"
34037	printf "\n"
34038fi
34039
34040if test "x$FOUND_ALT_VARIABLES" != "x"; then
34041	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34042	printf "These are not respected, and will be ignored. It is recommended\n"
34043	printf "that you clean your environment. The following variables are set:\n"
34044	printf "$FOUND_ALT_VARIABLES\n"
34045	printf "\n"
34046fi
34047
34048if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34049	printf "WARNING: Your build output directory is not on a local disk.\n"
34050	printf "This will severely degrade build performance!\n"
34051	printf "It is recommended that you create an output directory on a local disk,\n"
34052	printf "and run the configure script again from that directory.\n"
34053	printf "\n"
34054fi
34055
34056if test "x$IS_RECONFIGURE" = "xyes"; then
34057	printf "WARNING: The result of this configuration has overridden an older\n"
34058	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34059	printf "proper build. Failure to do so might result in strange build problems.\n"
34060	printf "\n"
34061fi
34062
34063