generated-configure.sh revision 764:4fb877dfe5c4
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_JAVA
603JOBS
604MEMORY_SIZE
605NUM_CORES
606ENABLE_INTREE_EC
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611LLVM_LIBS
612LLVM_LDFLAGS
613LLVM_CFLAGS
614LLVM_CONFIG
615LIBFFI_LIBS
616LIBFFI_CFLAGS
617STATIC_CXX_SETTING
618LIBDL
619LIBM
620LIBZIP_CAN_USE_MMAP
621USE_EXTERNAL_LIBZ
622USE_EXTERNAL_LIBGIF
623USE_EXTERNAL_LIBJPEG
624ALSA_LIBS
625ALSA_CFLAGS
626FREETYPE2_LIB_PATH
627USING_SYSTEM_FT_LIB
628FREETYPE2_LIBS
629FREETYPE2_CFLAGS
630CUPS_CFLAGS
631OPENWIN_HOME
632X_EXTRA_LIBS
633X_LIBS
634X_PRE_LIBS
635X_CFLAGS
636XMKMF
637CXXFLAGS_DEBUG_SYMBOLS
638CFLAGS_DEBUG_SYMBOLS
639ZIP_DEBUGINFO_FILES
640ENABLE_DEBUG_SYMBOLS
641COMPILER_SUPPORTS_TARGET_BITS_FLAG
642ZERO_ARCHFLAG
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_VERSION_MIN
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683COMPILER_NAME
684TARGET_BITS_FLAG
685JT_HOME
686JTREGEXE
687LIPO
688ac_ct_OBJDUMP
689OBJDUMP
690ac_ct_OBJCOPY
691OBJCOPY
692MCS
693STRIP
694GNM
695NM
696AS
697CXXCPP
698CPP
699COMPILER_TYPE
700RC_FLAGS
701DUMPBIN
702WINAR
703HOTSPOT_RC
704HOTSPOT_MT
705RC
706MT
707WINLD
708HOTSPOT_LD
709HOTSPOT_CXX
710ARFLAGS
711AR
712LDEXECXX
713LDCXX
714LDEXE
715LD
716ac_ct_OBJC
717OBJCFLAGS
718OBJC
719ac_ct_CXX
720CXXFLAGS
721CXX
722ac_ct_PROPER_COMPILER_CXX
723PROPER_COMPILER_CXX
724POTENTIAL_CXX
725TOOLS_DIR_CXX
726OBJEXT
727EXEEXT
728ac_ct_CC
729CPPFLAGS
730LDFLAGS
731CFLAGS
732CC
733ac_ct_PROPER_COMPILER_CC
734PROPER_COMPILER_CC
735POTENTIAL_CC
736TOOLS_DIR_CC
737BUILD_LD
738BUILD_CXX
739BUILD_CC
740MSVCR_DLL
741DXSDK_INCLUDE_PATH
742DXSDK_LIB_PATH
743VS_PATH
744VS_LIB
745VS_INCLUDE
746CYGWIN_LINK
747AR_OUT_OPTION
748LD_OUT_OPTION
749EXE_OUT_OPTION
750CC_OUT_OPTION
751BUILD_HOTSPOT
752HOTSPOT_DIST
753BUILD_OUTPUT
754OVERRIDE_SRC_ROOT
755ADD_SRC_ROOT
756JDK_TOPDIR
757NASHORN_TOPDIR
758HOTSPOT_TOPDIR
759JAXWS_TOPDIR
760JAXP_TOPDIR
761CORBA_TOPDIR
762LANGTOOLS_TOPDIR
763BOOT_JDK_JVMARGS
764JAVAC_FLAGS
765BOOT_JDK_SOURCETARGET
766BOOT_JDK
767BOOT_TOOLSJAR
768BOOT_RTJAR
769JAVA_CHECK
770JAVAC_CHECK
771COOKED_BUILD_NUMBER
772JDK_VERSION
773COPYRIGHT_YEAR
774MACOSX_BUNDLE_ID_BASE
775MACOSX_BUNDLE_NAME_BASE
776COMPANY_NAME
777JDK_RC_PLATFORM_NAME
778PRODUCT_SUFFIX
779PRODUCT_NAME
780LAUNCHER_NAME
781MILESTONE
782JDK_BUILD_NUMBER
783JDK_UPDATE_VERSION
784JDK_MICRO_VERSION
785JDK_MINOR_VERSION
786JDK_MAJOR_VERSION
787USER_RELEASE_SUFFIX
788COMPRESS_JARS
789UNLIMITED_CRYPTO
790CACERTS_FILE
791TEST_IN_BUILD
792BUILD_HEADLESS
793SUPPORT_HEADFUL
794SUPPORT_HEADLESS
795BDEPS_FTP
796BDEPS_UNZIP
797OS_VERSION_MICRO
798OS_VERSION_MINOR
799OS_VERSION_MAJOR
800PKG_CONFIG
801CODESIGN
802XATTR
803IS_GNU_TIME
804TIME
805STAT
806HG
807READELF
808OTOOL
809LDD
810ZIP
811UNZIP
812FIND_DELETE
813MAKE
814CHECK_TOOLSDIR_MAKE
815CHECK_TOOLSDIR_GMAKE
816CHECK_MAKE
817CHECK_GMAKE
818PKGHANDLER
819OUTPUT_ROOT
820CONF_NAME
821SPEC
822BUILD_VARIANT_RELEASE
823DEBUG_CLASSFILES
824FASTDEBUG
825VARIANT
826DEBUG_LEVEL
827MACOSX_UNIVERSAL
828INCLUDE_SA
829JVM_VARIANT_ZEROSHARK
830JVM_VARIANT_ZERO
831JVM_VARIANT_KERNEL
832JVM_VARIANT_MINIMAL1
833JVM_VARIANT_CLIENT
834JVM_VARIANT_SERVER
835JVM_VARIANTS
836JDK_VARIANT
837SET_OPENJDK
838BUILD_LOG_WRAPPER
839BUILD_LOG_PREVIOUS
840BUILD_LOG
841SYS_ROOT
842PATH_SEP
843SRC_ROOT
844ZERO_ARCHDEF
845DEFINE_CROSS_COMPILE_ARCH
846LP64
847OPENJDK_TARGET_OS_API_DIR
848OPENJDK_TARGET_CPU_JLI_CFLAGS
849OPENJDK_TARGET_CPU_OSARCH
850OPENJDK_TARGET_CPU_ISADIR
851OPENJDK_TARGET_CPU_LIBDIR
852OPENJDK_TARGET_CPU_LEGACY_LIB
853OPENJDK_TARGET_CPU_LEGACY
854REQUIRED_OS_VERSION
855REQUIRED_OS_NAME
856COMPILE_TYPE
857OPENJDK_TARGET_CPU_ENDIAN
858OPENJDK_TARGET_CPU_BITS
859OPENJDK_TARGET_CPU_ARCH
860OPENJDK_TARGET_CPU
861OPENJDK_TARGET_OS_API
862OPENJDK_TARGET_OS
863OPENJDK_BUILD_CPU_ENDIAN
864OPENJDK_BUILD_CPU_BITS
865OPENJDK_BUILD_CPU_ARCH
866OPENJDK_BUILD_CPU
867OPENJDK_BUILD_OS_API
868OPENJDK_BUILD_OS
869OPENJDK_BUILD_AUTOCONF_NAME
870OPENJDK_TARGET_AUTOCONF_NAME
871target_os
872target_vendor
873target_cpu
874target
875host_os
876host_vendor
877host_cpu
878host
879build_os
880build_vendor
881build_cpu
882build
883SETFILE
884DF
885READLINK
886CYGPATH
887NAWK
888SED
889FGREP
890EGREP
891GREP
892AWK
893XARGS
894WHICH
895WC
896UNIQ
897UNAME
898TR
899TOUCH
900TEE
901TAR
902TAIL
903SORT
904SH
905RM
906PRINTF
907MV
908MKTEMP
909MKDIR
910LS
911LN
912HEAD
913FIND
914FILE
915EXPR
916ECHO
917DIRNAME
918DIFF
919DATE
920CUT
921CPIO
922CP
923COMM
924CMP
925CHMOD
926CAT
927BASH
928BASENAME
929DATE_WHEN_CONFIGURED
930CONFIGURE_COMMAND_LINE
931CUSTOM_MAKE_DIR
932target_alias
933host_alias
934build_alias
935LIBS
936ECHO_T
937ECHO_N
938ECHO_C
939DEFS
940mandir
941localedir
942libdir
943psdir
944pdfdir
945dvidir
946htmldir
947infodir
948docdir
949oldincludedir
950includedir
951localstatedir
952sharedstatedir
953sysconfdir
954datadir
955datarootdir
956libexecdir
957sbindir
958bindir
959program_transform_name
960prefix
961exec_prefix
962PACKAGE_URL
963PACKAGE_BUGREPORT
964PACKAGE_STRING
965PACKAGE_VERSION
966PACKAGE_TARNAME
967PACKAGE_NAME
968PATH_SEPARATOR
969SHELL'
970ac_subst_files=''
971ac_user_opts='
972enable_option_checking
973with_custom_make_dir
974with_target_bits
975with_sys_root
976with_tools_dir
977with_devkit
978enable_openjdk_only
979with_jdk_variant
980with_jvm_variants
981enable_debug
982with_debug_level
983with_conf_name
984with_builddeps_conf
985with_builddeps_server
986with_builddeps_dir
987with_builddeps_group
988enable_headful
989enable_hotspot_test_in_build
990with_cacerts_file
991enable_unlimited_crypto
992with_milestone
993with_update_version
994with_build_number
995with_user_release_suffix
996with_boot_jdk
997with_boot_jdk_jvmargs
998with_add_source_root
999with_override_source_root
1000with_adds_and_overrides
1001with_override_langtools
1002with_override_corba
1003with_override_jaxp
1004with_override_jaxws
1005with_override_hotspot
1006with_override_jdk
1007with_import_hotspot
1008with_msvcr_dll
1009with_dxsdk
1010with_dxsdk_lib
1011with_dxsdk_include
1012with_jtreg
1013with_extra_cflags
1014with_extra_cxxflags
1015with_extra_ldflags
1016enable_debug_symbols
1017enable_zip_debug_info
1018enable_macosx_runtime_support
1019with_x
1020with_cups
1021with_cups_include
1022with_freetype
1023with_alsa
1024with_alsa_include
1025with_alsa_lib
1026with_giflib
1027with_zlib
1028with_stdc__lib
1029with_num_cores
1030with_memory_size
1031with_jobs
1032with_sjavac_server_java
1033enable_sjavac
1034enable_precompiled_headers
1035enable_ccache
1036with_ccache_dir
1037'
1038      ac_precious_vars='build_alias
1039host_alias
1040target_alias
1041PKG_CONFIG
1042CC
1043CFLAGS
1044LDFLAGS
1045LIBS
1046CPPFLAGS
1047CXX
1048CXXFLAGS
1049CCC
1050OBJC
1051OBJCFLAGS
1052CPP
1053CXXCPP
1054XMKMF
1055FREETYPE2_CFLAGS
1056FREETYPE2_LIBS
1057ALSA_CFLAGS
1058ALSA_LIBS
1059LIBFFI_CFLAGS
1060LIBFFI_LIBS'
1061
1062
1063# Initialize some variables set by options.
1064ac_init_help=
1065ac_init_version=false
1066ac_unrecognized_opts=
1067ac_unrecognized_sep=
1068# The variables have the same names as the options, with
1069# dashes changed to underlines.
1070cache_file=/dev/null
1071exec_prefix=NONE
1072no_create=
1073no_recursion=
1074prefix=NONE
1075program_prefix=NONE
1076program_suffix=NONE
1077program_transform_name=s,x,x,
1078silent=
1079site=
1080srcdir=
1081verbose=
1082x_includes=NONE
1083x_libraries=NONE
1084
1085# Installation directory options.
1086# These are left unexpanded so users can "make install exec_prefix=/foo"
1087# and all the variables that are supposed to be based on exec_prefix
1088# by default will actually change.
1089# Use braces instead of parens because sh, perl, etc. also accept them.
1090# (The list follows the same order as the GNU Coding Standards.)
1091bindir='${exec_prefix}/bin'
1092sbindir='${exec_prefix}/sbin'
1093libexecdir='${exec_prefix}/libexec'
1094datarootdir='${prefix}/share'
1095datadir='${datarootdir}'
1096sysconfdir='${prefix}/etc'
1097sharedstatedir='${prefix}/com'
1098localstatedir='${prefix}/var'
1099includedir='${prefix}/include'
1100oldincludedir='/usr/include'
1101docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1102infodir='${datarootdir}/info'
1103htmldir='${docdir}'
1104dvidir='${docdir}'
1105pdfdir='${docdir}'
1106psdir='${docdir}'
1107libdir='${exec_prefix}/lib'
1108localedir='${datarootdir}/locale'
1109mandir='${datarootdir}/man'
1110
1111ac_prev=
1112ac_dashdash=
1113for ac_option
1114do
1115  # If the previous option needs an argument, assign it.
1116  if test -n "$ac_prev"; then
1117    eval $ac_prev=\$ac_option
1118    ac_prev=
1119    continue
1120  fi
1121
1122  case $ac_option in
1123  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1124  *=)   ac_optarg= ;;
1125  *)    ac_optarg=yes ;;
1126  esac
1127
1128  # Accept the important Cygnus configure options, so we can diagnose typos.
1129
1130  case $ac_dashdash$ac_option in
1131  --)
1132    ac_dashdash=yes ;;
1133
1134  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1135    ac_prev=bindir ;;
1136  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1137    bindir=$ac_optarg ;;
1138
1139  -build | --build | --buil | --bui | --bu)
1140    ac_prev=build_alias ;;
1141  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1142    build_alias=$ac_optarg ;;
1143
1144  -cache-file | --cache-file | --cache-fil | --cache-fi \
1145  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1146    ac_prev=cache_file ;;
1147  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1148  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1149    cache_file=$ac_optarg ;;
1150
1151  --config-cache | -C)
1152    cache_file=config.cache ;;
1153
1154  -datadir | --datadir | --datadi | --datad)
1155    ac_prev=datadir ;;
1156  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1157    datadir=$ac_optarg ;;
1158
1159  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1160  | --dataroo | --dataro | --datar)
1161    ac_prev=datarootdir ;;
1162  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1163  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1164    datarootdir=$ac_optarg ;;
1165
1166  -disable-* | --disable-*)
1167    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1168    # Reject names that are not valid shell variable names.
1169    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1170      as_fn_error $? "invalid feature name: $ac_useropt"
1171    ac_useropt_orig=$ac_useropt
1172    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1173    case $ac_user_opts in
1174      *"
1175"enable_$ac_useropt"
1176"*) ;;
1177      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1178	 ac_unrecognized_sep=', ';;
1179    esac
1180    eval enable_$ac_useropt=no ;;
1181
1182  -docdir | --docdir | --docdi | --doc | --do)
1183    ac_prev=docdir ;;
1184  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1185    docdir=$ac_optarg ;;
1186
1187  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1188    ac_prev=dvidir ;;
1189  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1190    dvidir=$ac_optarg ;;
1191
1192  -enable-* | --enable-*)
1193    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1194    # Reject names that are not valid shell variable names.
1195    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1196      as_fn_error $? "invalid feature name: $ac_useropt"
1197    ac_useropt_orig=$ac_useropt
1198    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199    case $ac_user_opts in
1200      *"
1201"enable_$ac_useropt"
1202"*) ;;
1203      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1204	 ac_unrecognized_sep=', ';;
1205    esac
1206    eval enable_$ac_useropt=\$ac_optarg ;;
1207
1208  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1209  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1210  | --exec | --exe | --ex)
1211    ac_prev=exec_prefix ;;
1212  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1213  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1214  | --exec=* | --exe=* | --ex=*)
1215    exec_prefix=$ac_optarg ;;
1216
1217  -gas | --gas | --ga | --g)
1218    # Obsolete; use --with-gas.
1219    with_gas=yes ;;
1220
1221  -help | --help | --hel | --he | -h)
1222    ac_init_help=long ;;
1223  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1224    ac_init_help=recursive ;;
1225  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1226    ac_init_help=short ;;
1227
1228  -host | --host | --hos | --ho)
1229    ac_prev=host_alias ;;
1230  -host=* | --host=* | --hos=* | --ho=*)
1231    host_alias=$ac_optarg ;;
1232
1233  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1234    ac_prev=htmldir ;;
1235  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1236  | --ht=*)
1237    htmldir=$ac_optarg ;;
1238
1239  -includedir | --includedir | --includedi | --included | --include \
1240  | --includ | --inclu | --incl | --inc)
1241    ac_prev=includedir ;;
1242  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1243  | --includ=* | --inclu=* | --incl=* | --inc=*)
1244    includedir=$ac_optarg ;;
1245
1246  -infodir | --infodir | --infodi | --infod | --info | --inf)
1247    ac_prev=infodir ;;
1248  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1249    infodir=$ac_optarg ;;
1250
1251  -libdir | --libdir | --libdi | --libd)
1252    ac_prev=libdir ;;
1253  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1254    libdir=$ac_optarg ;;
1255
1256  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1257  | --libexe | --libex | --libe)
1258    ac_prev=libexecdir ;;
1259  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1260  | --libexe=* | --libex=* | --libe=*)
1261    libexecdir=$ac_optarg ;;
1262
1263  -localedir | --localedir | --localedi | --localed | --locale)
1264    ac_prev=localedir ;;
1265  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1266    localedir=$ac_optarg ;;
1267
1268  -localstatedir | --localstatedir | --localstatedi | --localstated \
1269  | --localstate | --localstat | --localsta | --localst | --locals)
1270    ac_prev=localstatedir ;;
1271  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1272  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1273    localstatedir=$ac_optarg ;;
1274
1275  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1276    ac_prev=mandir ;;
1277  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1278    mandir=$ac_optarg ;;
1279
1280  -nfp | --nfp | --nf)
1281    # Obsolete; use --without-fp.
1282    with_fp=no ;;
1283
1284  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1285  | --no-cr | --no-c | -n)
1286    no_create=yes ;;
1287
1288  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1289  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1290    no_recursion=yes ;;
1291
1292  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1293  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1294  | --oldin | --oldi | --old | --ol | --o)
1295    ac_prev=oldincludedir ;;
1296  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1297  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1298  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1299    oldincludedir=$ac_optarg ;;
1300
1301  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1302    ac_prev=prefix ;;
1303  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1304    prefix=$ac_optarg ;;
1305
1306  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1307  | --program-pre | --program-pr | --program-p)
1308    ac_prev=program_prefix ;;
1309  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1310  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1311    program_prefix=$ac_optarg ;;
1312
1313  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1314  | --program-suf | --program-su | --program-s)
1315    ac_prev=program_suffix ;;
1316  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1317  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1318    program_suffix=$ac_optarg ;;
1319
1320  -program-transform-name | --program-transform-name \
1321  | --program-transform-nam | --program-transform-na \
1322  | --program-transform-n | --program-transform- \
1323  | --program-transform | --program-transfor \
1324  | --program-transfo | --program-transf \
1325  | --program-trans | --program-tran \
1326  | --progr-tra | --program-tr | --program-t)
1327    ac_prev=program_transform_name ;;
1328  -program-transform-name=* | --program-transform-name=* \
1329  | --program-transform-nam=* | --program-transform-na=* \
1330  | --program-transform-n=* | --program-transform-=* \
1331  | --program-transform=* | --program-transfor=* \
1332  | --program-transfo=* | --program-transf=* \
1333  | --program-trans=* | --program-tran=* \
1334  | --progr-tra=* | --program-tr=* | --program-t=*)
1335    program_transform_name=$ac_optarg ;;
1336
1337  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1338    ac_prev=pdfdir ;;
1339  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1340    pdfdir=$ac_optarg ;;
1341
1342  -psdir | --psdir | --psdi | --psd | --ps)
1343    ac_prev=psdir ;;
1344  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1345    psdir=$ac_optarg ;;
1346
1347  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1348  | -silent | --silent | --silen | --sile | --sil)
1349    silent=yes ;;
1350
1351  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1352    ac_prev=sbindir ;;
1353  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1354  | --sbi=* | --sb=*)
1355    sbindir=$ac_optarg ;;
1356
1357  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1358  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1359  | --sharedst | --shareds | --shared | --share | --shar \
1360  | --sha | --sh)
1361    ac_prev=sharedstatedir ;;
1362  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1363  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1364  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1365  | --sha=* | --sh=*)
1366    sharedstatedir=$ac_optarg ;;
1367
1368  -site | --site | --sit)
1369    ac_prev=site ;;
1370  -site=* | --site=* | --sit=*)
1371    site=$ac_optarg ;;
1372
1373  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1374    ac_prev=srcdir ;;
1375  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1376    srcdir=$ac_optarg ;;
1377
1378  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1379  | --syscon | --sysco | --sysc | --sys | --sy)
1380    ac_prev=sysconfdir ;;
1381  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1382  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1383    sysconfdir=$ac_optarg ;;
1384
1385  -target | --target | --targe | --targ | --tar | --ta | --t)
1386    ac_prev=target_alias ;;
1387  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1388    target_alias=$ac_optarg ;;
1389
1390  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1391    verbose=yes ;;
1392
1393  -version | --version | --versio | --versi | --vers | -V)
1394    ac_init_version=: ;;
1395
1396  -with-* | --with-*)
1397    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1398    # Reject names that are not valid shell variable names.
1399    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1400      as_fn_error $? "invalid package name: $ac_useropt"
1401    ac_useropt_orig=$ac_useropt
1402    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1403    case $ac_user_opts in
1404      *"
1405"with_$ac_useropt"
1406"*) ;;
1407      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1408	 ac_unrecognized_sep=', ';;
1409    esac
1410    eval with_$ac_useropt=\$ac_optarg ;;
1411
1412  -without-* | --without-*)
1413    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1414    # Reject names that are not valid shell variable names.
1415    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1416      as_fn_error $? "invalid package name: $ac_useropt"
1417    ac_useropt_orig=$ac_useropt
1418    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1419    case $ac_user_opts in
1420      *"
1421"with_$ac_useropt"
1422"*) ;;
1423      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1424	 ac_unrecognized_sep=', ';;
1425    esac
1426    eval with_$ac_useropt=no ;;
1427
1428  --x)
1429    # Obsolete; use --with-x.
1430    with_x=yes ;;
1431
1432  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1433  | --x-incl | --x-inc | --x-in | --x-i)
1434    ac_prev=x_includes ;;
1435  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1436  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1437    x_includes=$ac_optarg ;;
1438
1439  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1440  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1441    ac_prev=x_libraries ;;
1442  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1443  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1444    x_libraries=$ac_optarg ;;
1445
1446  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1447Try \`$0 --help' for more information"
1448    ;;
1449
1450  *=*)
1451    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1452    # Reject names that are not valid shell variable names.
1453    case $ac_envvar in #(
1454      '' | [0-9]* | *[!_$as_cr_alnum]* )
1455      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1456    esac
1457    eval $ac_envvar=\$ac_optarg
1458    export $ac_envvar ;;
1459
1460  *)
1461    # FIXME: should be removed in autoconf 3.0.
1462    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1463    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1464      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1465    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1466    ;;
1467
1468  esac
1469done
1470
1471if test -n "$ac_prev"; then
1472  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1473  as_fn_error $? "missing argument to $ac_option"
1474fi
1475
1476if test -n "$ac_unrecognized_opts"; then
1477  case $enable_option_checking in
1478    no) ;;
1479    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1480    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1481  esac
1482fi
1483
1484# Check all directory arguments for consistency.
1485for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1486		datadir sysconfdir sharedstatedir localstatedir includedir \
1487		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1488		libdir localedir mandir
1489do
1490  eval ac_val=\$$ac_var
1491  # Remove trailing slashes.
1492  case $ac_val in
1493    */ )
1494      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1495      eval $ac_var=\$ac_val;;
1496  esac
1497  # Be sure to have absolute directory names.
1498  case $ac_val in
1499    [\\/$]* | ?:[\\/]* )  continue;;
1500    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1501  esac
1502  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1503done
1504
1505# There might be people who depend on the old broken behavior: `$host'
1506# used to hold the argument of --host etc.
1507# FIXME: To remove some day.
1508build=$build_alias
1509host=$host_alias
1510target=$target_alias
1511
1512# FIXME: To remove some day.
1513if test "x$host_alias" != x; then
1514  if test "x$build_alias" = x; then
1515    cross_compiling=maybe
1516    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1517    If a cross compiler is detected then cross compile mode will be used" >&2
1518  elif test "x$build_alias" != "x$host_alias"; then
1519    cross_compiling=yes
1520  fi
1521fi
1522
1523ac_tool_prefix=
1524test -n "$host_alias" && ac_tool_prefix=$host_alias-
1525
1526test "$silent" = yes && exec 6>/dev/null
1527
1528
1529ac_pwd=`pwd` && test -n "$ac_pwd" &&
1530ac_ls_di=`ls -di .` &&
1531ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1532  as_fn_error $? "working directory cannot be determined"
1533test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1534  as_fn_error $? "pwd does not report name of working directory"
1535
1536
1537# Find the source files, if location was not specified.
1538if test -z "$srcdir"; then
1539  ac_srcdir_defaulted=yes
1540  # Try the directory containing this script, then the parent directory.
1541  ac_confdir=`$as_dirname -- "$as_myself" ||
1542$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1543	 X"$as_myself" : 'X\(//\)[^/]' \| \
1544	 X"$as_myself" : 'X\(//\)$' \| \
1545	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1546$as_echo X"$as_myself" |
1547    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1548	    s//\1/
1549	    q
1550	  }
1551	  /^X\(\/\/\)[^/].*/{
1552	    s//\1/
1553	    q
1554	  }
1555	  /^X\(\/\/\)$/{
1556	    s//\1/
1557	    q
1558	  }
1559	  /^X\(\/\).*/{
1560	    s//\1/
1561	    q
1562	  }
1563	  s/.*/./; q'`
1564  srcdir=$ac_confdir
1565  if test ! -r "$srcdir/$ac_unique_file"; then
1566    srcdir=..
1567  fi
1568else
1569  ac_srcdir_defaulted=no
1570fi
1571if test ! -r "$srcdir/$ac_unique_file"; then
1572  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1573  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1574fi
1575ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1576ac_abs_confdir=`(
1577	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1578	pwd)`
1579# When building in place, set srcdir=.
1580if test "$ac_abs_confdir" = "$ac_pwd"; then
1581  srcdir=.
1582fi
1583# Remove unnecessary trailing slashes from srcdir.
1584# Double slashes in file names in object file debugging info
1585# mess up M-x gdb in Emacs.
1586case $srcdir in
1587*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1588esac
1589for ac_var in $ac_precious_vars; do
1590  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1591  eval ac_env_${ac_var}_value=\$${ac_var}
1592  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1593  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1594done
1595
1596#
1597# Report the --help message.
1598#
1599if test "$ac_init_help" = "long"; then
1600  # Omit some internal or obsolete options to make the list less imposing.
1601  # This message is too long to be a string in the A/UX 3.1 sh.
1602  cat <<_ACEOF
1603\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1604
1605Usage: $0 [OPTION]... [VAR=VALUE]...
1606
1607To assign environment variables (e.g., CC, CFLAGS...), specify them as
1608VAR=VALUE.  See below for descriptions of some of the useful variables.
1609
1610Defaults for the options are specified in brackets.
1611
1612Configuration:
1613  -h, --help              display this help and exit
1614      --help=short        display options specific to this package
1615      --help=recursive    display the short help of all the included packages
1616  -V, --version           display version information and exit
1617  -q, --quiet, --silent   do not print \`checking ...' messages
1618      --cache-file=FILE   cache test results in FILE [disabled]
1619  -C, --config-cache      alias for \`--cache-file=config.cache'
1620  -n, --no-create         do not create output files
1621      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1622
1623Installation directories:
1624  --prefix=PREFIX         install architecture-independent files in PREFIX
1625                          [$ac_default_prefix]
1626  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1627                          [PREFIX]
1628
1629By default, \`make install' will install all the files in
1630\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1631an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1632for instance \`--prefix=\$HOME'.
1633
1634For better control, use the options below.
1635
1636Fine tuning of the installation directories:
1637  --bindir=DIR            user executables [EPREFIX/bin]
1638  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1639  --libexecdir=DIR        program executables [EPREFIX/libexec]
1640  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1641  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1642  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1643  --libdir=DIR            object code libraries [EPREFIX/lib]
1644  --includedir=DIR        C header files [PREFIX/include]
1645  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1646  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1647  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1648  --infodir=DIR           info documentation [DATAROOTDIR/info]
1649  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1650  --mandir=DIR            man documentation [DATAROOTDIR/man]
1651  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1652  --htmldir=DIR           html documentation [DOCDIR]
1653  --dvidir=DIR            dvi documentation [DOCDIR]
1654  --pdfdir=DIR            pdf documentation [DOCDIR]
1655  --psdir=DIR             ps documentation [DOCDIR]
1656_ACEOF
1657
1658  cat <<\_ACEOF
1659
1660X features:
1661  --x-includes=DIR    X include files are in DIR
1662  --x-libraries=DIR   X library files are in DIR
1663
1664System types:
1665  --build=BUILD     configure for building on BUILD [guessed]
1666  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1667  --target=TARGET   configure for building compilers for TARGET [HOST]
1668_ACEOF
1669fi
1670
1671if test -n "$ac_init_help"; then
1672  case $ac_init_help in
1673     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1674   esac
1675  cat <<\_ACEOF
1676
1677Optional Features:
1678  --disable-option-checking  ignore unrecognized --enable/--with options
1679  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1680  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1681  --enable-openjdk-only   suppress building custom source even if present
1682                          [disabled]
1683  --enable-debug          set the debug level to fastdebug (shorthand for
1684                          --with-debug-level=fastdebug) [disabled]
1685  --disable-headful       disable building headful support (graphical UI
1686                          support) [enabled]
1687  --enable-hotspot-test-in-build
1688                          run the Queens test after Hotspot build [disabled]
1689  --enable-unlimited-crypto
1690                          Enable unlimited crypto policy [disabled]
1691  --disable-debug-symbols disable generation of debug symbols [enabled]
1692  --disable-zip-debug-info
1693                          disable zipping of debug-info files [enabled]
1694  --disable-macosx-runtime-support
1695                          disable the use of MacOSX Java runtime support
1696                          framework [enabled]
1697  --enable-sjavac         use sjavac to do fast incremental compiles
1698                          [disabled]
1699  --disable-precompiled-headers
1700                          disable using precompiled headers when compiling C++
1701                          [enabled]
1702  --disable-ccache        disable using ccache to speed up recompilations
1703                          [enabled]
1704
1705Optional Packages:
1706  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1707  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1708  --with-custom-make-dir  use this directory for custom build/make files
1709  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1710                          support it), e.g. --with-target-bits=32 [guessed]
1711  --with-sys-root         pass this sys-root to the compilers and tools (for
1712                          cross-compiling)
1713  --with-tools-dir        search this directory for compilers and tools (for
1714                          cross-compiling)
1715  --with-devkit           use this directory as base for tools-dir and
1716                          sys-root (for cross-compiling)
1717  --with-jdk-variant      JDK variant to build (normal) [normal]
1718  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1719                          client, minimal1, kernel, zero, zeroshark) [server]
1720  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1721                          [release]
1722  --with-conf-name        use this as the name of the configuration [generated
1723                          from important configuration options]
1724  --with-builddeps-conf   use this configuration file for the builddeps
1725  --with-builddeps-server download and use build dependencies from this server
1726                          url
1727  --with-builddeps-dir    store downloaded build dependencies here
1728                          [/localhome/builddeps]
1729  --with-builddeps-group  chgrp the downloaded build dependencies to this
1730                          group
1731  --with-cacerts-file     specify alternative cacerts file
1732  --with-milestone        Set milestone value for build [internal]
1733  --with-update-version   Set update version value for build [b00]
1734  --with-build-number     Set build number value for build [b00]
1735  --with-user-release-suffix
1736                          Add a custom string to the version string if build
1737                          number isn't set.[username_builddateb00]
1738  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1739  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1740                          invocations of the Boot JDK, overriding the default
1741                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1742                          -enableassertions"
1743  --with-add-source-root  for each and every source directory, look in this
1744                          additional source root for the same directory; if it
1745                          exists and have files in it, include it in the build
1746  --with-override-source-root
1747                          for each and every source directory, look in this
1748                          override source root for the same directory; if it
1749                          exists, use that directory instead and ignore the
1750                          directory in the original source root
1751  --with-adds-and-overrides
1752                          use the subdirs 'adds' and 'overrides' in the
1753                          specified directory as add-source-root and
1754                          override-source-root
1755  --with-override-langtools
1756                          use this langtools dir for the build
1757  --with-override-corba   use this corba dir for the build
1758  --with-override-jaxp    use this jaxp dir for the build
1759  --with-override-jaxws   use this jaxws dir for the build
1760  --with-override-hotspot use this hotspot dir for the build
1761  --with-override-jdk     use this jdk dir for the build
1762  --with-import-hotspot   import hotspot binaries from this jdk image or
1763                          hotspot build dist dir instead of building from
1764                          source
1765  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1766                          only) [probed]
1767  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1768  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1769                          [probed]
1770  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1771                          [probed]
1772  --with-jtreg            Regression Test Harness [probed]
1773  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1774  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1775  --with-extra-ldflags    extra flags to be used when linking jdk
1776  --with-x                use the X Window System
1777  --with-cups             specify prefix directory for the cups package
1778                          (expecting the headers under PATH/include)
1779  --with-cups-include     specify directory for the cups include files
1780  --with-freetype         specify prefix directory for the freetype2 package
1781                          (expecting the libraries under PATH/lib and the
1782                          headers under PATH/include)
1783  --with-alsa             specify prefix directory for the alsa package
1784                          (expecting the libraries under PATH/lib and the
1785                          headers under PATH/include)
1786  --with-alsa-include     specify directory for the alsa include files
1787  --with-alsa-lib         specify directory for the alsa library
1788  --with-giflib           use giflib from build system or OpenJDK source
1789                          (system, bundled) [bundled]
1790  --with-zlib             use zlib from build system or OpenJDK source
1791                          (system, bundled) [bundled]
1792  --with-stdc++lib=<static>,<dynamic>,<default>
1793                          force linking of the C++ runtime on Linux to either
1794                          static or dynamic, default is static with dynamic as
1795                          fallback
1796  --with-num-cores        number of cores in the build system, e.g.
1797                          --with-num-cores=8 [probed]
1798  --with-memory-size      memory (in MB) available in the build system, e.g.
1799                          --with-memory-size=1024 [probed]
1800  --with-jobs             number of parallel jobs to let make run [calculated
1801                          based on cores and memory]
1802  --with-sjavac-server-java
1803                          use this java binary for running the sjavac
1804                          background server [Boot JDK java]
1805  --with-ccache-dir       where to store ccache files [~/.ccache]
1806
1807Some influential environment variables:
1808  PKG_CONFIG  path to pkg-config utility
1809  CC          C compiler command
1810  CFLAGS      C compiler flags
1811  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1812              nonstandard directory <lib dir>
1813  LIBS        libraries to pass to the linker, e.g. -l<library>
1814  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1815              you have headers in a nonstandard directory <include dir>
1816  CXX         C++ compiler command
1817  CXXFLAGS    C++ compiler flags
1818  OBJC        Objective C compiler command
1819  OBJCFLAGS   Objective C compiler flags
1820  CPP         C preprocessor
1821  CXXCPP      C++ preprocessor
1822  XMKMF       Path to xmkmf, Makefile generator for X Window System
1823  FREETYPE2_CFLAGS
1824              C compiler flags for FREETYPE2, overriding pkg-config
1825  FREETYPE2_LIBS
1826              linker flags for FREETYPE2, overriding pkg-config
1827  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1828  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1829  LIBFFI_CFLAGS
1830              C compiler flags for LIBFFI, overriding pkg-config
1831  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1832
1833Use these variables to override the choices made by `configure' or to help
1834it to find libraries and programs with nonstandard names/locations.
1835
1836Report bugs to <build-dev@openjdk.java.net>.
1837OpenJDK home page: <http://openjdk.java.net>.
1838_ACEOF
1839ac_status=$?
1840fi
1841
1842if test "$ac_init_help" = "recursive"; then
1843  # If there are subdirs, report their specific --help.
1844  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1845    test -d "$ac_dir" ||
1846      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1847      continue
1848    ac_builddir=.
1849
1850case "$ac_dir" in
1851.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1852*)
1853  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1854  # A ".." for each directory in $ac_dir_suffix.
1855  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1856  case $ac_top_builddir_sub in
1857  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1858  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1859  esac ;;
1860esac
1861ac_abs_top_builddir=$ac_pwd
1862ac_abs_builddir=$ac_pwd$ac_dir_suffix
1863# for backward compatibility:
1864ac_top_builddir=$ac_top_build_prefix
1865
1866case $srcdir in
1867  .)  # We are building in place.
1868    ac_srcdir=.
1869    ac_top_srcdir=$ac_top_builddir_sub
1870    ac_abs_top_srcdir=$ac_pwd ;;
1871  [\\/]* | ?:[\\/]* )  # Absolute name.
1872    ac_srcdir=$srcdir$ac_dir_suffix;
1873    ac_top_srcdir=$srcdir
1874    ac_abs_top_srcdir=$srcdir ;;
1875  *) # Relative name.
1876    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1877    ac_top_srcdir=$ac_top_build_prefix$srcdir
1878    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1879esac
1880ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1881
1882    cd "$ac_dir" || { ac_status=$?; continue; }
1883    # Check for guested configure.
1884    if test -f "$ac_srcdir/configure.gnu"; then
1885      echo &&
1886      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1887    elif test -f "$ac_srcdir/configure"; then
1888      echo &&
1889      $SHELL "$ac_srcdir/configure" --help=recursive
1890    else
1891      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1892    fi || ac_status=$?
1893    cd "$ac_pwd" || { ac_status=$?; break; }
1894  done
1895fi
1896
1897test -n "$ac_init_help" && exit $ac_status
1898if $ac_init_version; then
1899  cat <<\_ACEOF
1900OpenJDK configure jdk8
1901generated by GNU Autoconf 2.67
1902
1903Copyright (C) 2010 Free Software Foundation, Inc.
1904This configure script is free software; the Free Software Foundation
1905gives unlimited permission to copy, distribute and modify it.
1906_ACEOF
1907  exit
1908fi
1909
1910## ------------------------ ##
1911## Autoconf initialization. ##
1912## ------------------------ ##
1913
1914# ac_fn_c_try_compile LINENO
1915# --------------------------
1916# Try to compile conftest.$ac_ext, and return whether this succeeded.
1917ac_fn_c_try_compile ()
1918{
1919  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920  rm -f conftest.$ac_objext
1921  if { { ac_try="$ac_compile"
1922case "(($ac_try" in
1923  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1924  *) ac_try_echo=$ac_try;;
1925esac
1926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1927$as_echo "$ac_try_echo"; } >&5
1928  (eval "$ac_compile") 2>conftest.err
1929  ac_status=$?
1930  if test -s conftest.err; then
1931    grep -v '^ *+' conftest.err >conftest.er1
1932    cat conftest.er1 >&5
1933    mv -f conftest.er1 conftest.err
1934  fi
1935  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1936  test $ac_status = 0; } && {
1937	 test -z "$ac_c_werror_flag" ||
1938	 test ! -s conftest.err
1939       } && test -s conftest.$ac_objext; then :
1940  ac_retval=0
1941else
1942  $as_echo "$as_me: failed program was:" >&5
1943sed 's/^/| /' conftest.$ac_ext >&5
1944
1945	ac_retval=1
1946fi
1947  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1948  as_fn_set_status $ac_retval
1949
1950} # ac_fn_c_try_compile
1951
1952# ac_fn_cxx_try_compile LINENO
1953# ----------------------------
1954# Try to compile conftest.$ac_ext, and return whether this succeeded.
1955ac_fn_cxx_try_compile ()
1956{
1957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1958  rm -f conftest.$ac_objext
1959  if { { ac_try="$ac_compile"
1960case "(($ac_try" in
1961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1962  *) ac_try_echo=$ac_try;;
1963esac
1964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1965$as_echo "$ac_try_echo"; } >&5
1966  (eval "$ac_compile") 2>conftest.err
1967  ac_status=$?
1968  if test -s conftest.err; then
1969    grep -v '^ *+' conftest.err >conftest.er1
1970    cat conftest.er1 >&5
1971    mv -f conftest.er1 conftest.err
1972  fi
1973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974  test $ac_status = 0; } && {
1975	 test -z "$ac_cxx_werror_flag" ||
1976	 test ! -s conftest.err
1977       } && test -s conftest.$ac_objext; then :
1978  ac_retval=0
1979else
1980  $as_echo "$as_me: failed program was:" >&5
1981sed 's/^/| /' conftest.$ac_ext >&5
1982
1983	ac_retval=1
1984fi
1985  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1986  as_fn_set_status $ac_retval
1987
1988} # ac_fn_cxx_try_compile
1989
1990# ac_fn_objc_try_compile LINENO
1991# -----------------------------
1992# Try to compile conftest.$ac_ext, and return whether this succeeded.
1993ac_fn_objc_try_compile ()
1994{
1995  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996  rm -f conftest.$ac_objext
1997  if { { ac_try="$ac_compile"
1998case "(($ac_try" in
1999  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2000  *) ac_try_echo=$ac_try;;
2001esac
2002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2003$as_echo "$ac_try_echo"; } >&5
2004  (eval "$ac_compile") 2>conftest.err
2005  ac_status=$?
2006  if test -s conftest.err; then
2007    grep -v '^ *+' conftest.err >conftest.er1
2008    cat conftest.er1 >&5
2009    mv -f conftest.er1 conftest.err
2010  fi
2011  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2012  test $ac_status = 0; } && {
2013	 test -z "$ac_objc_werror_flag" ||
2014	 test ! -s conftest.err
2015       } && test -s conftest.$ac_objext; then :
2016  ac_retval=0
2017else
2018  $as_echo "$as_me: failed program was:" >&5
2019sed 's/^/| /' conftest.$ac_ext >&5
2020
2021	ac_retval=1
2022fi
2023  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2024  as_fn_set_status $ac_retval
2025
2026} # ac_fn_objc_try_compile
2027
2028# ac_fn_c_try_cpp LINENO
2029# ----------------------
2030# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2031ac_fn_c_try_cpp ()
2032{
2033  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2034  if { { ac_try="$ac_cpp conftest.$ac_ext"
2035case "(($ac_try" in
2036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2037  *) ac_try_echo=$ac_try;;
2038esac
2039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2040$as_echo "$ac_try_echo"; } >&5
2041  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2042  ac_status=$?
2043  if test -s conftest.err; then
2044    grep -v '^ *+' conftest.err >conftest.er1
2045    cat conftest.er1 >&5
2046    mv -f conftest.er1 conftest.err
2047  fi
2048  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2049  test $ac_status = 0; } > conftest.i && {
2050	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2051	 test ! -s conftest.err
2052       }; then :
2053  ac_retval=0
2054else
2055  $as_echo "$as_me: failed program was:" >&5
2056sed 's/^/| /' conftest.$ac_ext >&5
2057
2058    ac_retval=1
2059fi
2060  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2061  as_fn_set_status $ac_retval
2062
2063} # ac_fn_c_try_cpp
2064
2065# ac_fn_cxx_try_cpp LINENO
2066# ------------------------
2067# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2068ac_fn_cxx_try_cpp ()
2069{
2070  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071  if { { ac_try="$ac_cpp conftest.$ac_ext"
2072case "(($ac_try" in
2073  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2074  *) ac_try_echo=$ac_try;;
2075esac
2076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2077$as_echo "$ac_try_echo"; } >&5
2078  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2079  ac_status=$?
2080  if test -s conftest.err; then
2081    grep -v '^ *+' conftest.err >conftest.er1
2082    cat conftest.er1 >&5
2083    mv -f conftest.er1 conftest.err
2084  fi
2085  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2086  test $ac_status = 0; } > conftest.i && {
2087	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2088	 test ! -s conftest.err
2089       }; then :
2090  ac_retval=0
2091else
2092  $as_echo "$as_me: failed program was:" >&5
2093sed 's/^/| /' conftest.$ac_ext >&5
2094
2095    ac_retval=1
2096fi
2097  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2098  as_fn_set_status $ac_retval
2099
2100} # ac_fn_cxx_try_cpp
2101
2102# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2103# ---------------------------------------------------------
2104# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2105# the include files in INCLUDES and setting the cache variable VAR
2106# accordingly.
2107ac_fn_cxx_check_header_mongrel ()
2108{
2109  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2110  if eval "test \"\${$3+set}\"" = set; then :
2111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2112$as_echo_n "checking for $2... " >&6; }
2113if eval "test \"\${$3+set}\"" = set; then :
2114  $as_echo_n "(cached) " >&6
2115fi
2116eval ac_res=\$$3
2117	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2118$as_echo "$ac_res" >&6; }
2119else
2120  # Is the header compilable?
2121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2122$as_echo_n "checking $2 usability... " >&6; }
2123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h.  */
2125$4
2126#include <$2>
2127_ACEOF
2128if ac_fn_cxx_try_compile "$LINENO"; then :
2129  ac_header_compiler=yes
2130else
2131  ac_header_compiler=no
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2135$as_echo "$ac_header_compiler" >&6; }
2136
2137# Is the header present?
2138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2139$as_echo_n "checking $2 presence... " >&6; }
2140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141/* end confdefs.h.  */
2142#include <$2>
2143_ACEOF
2144if ac_fn_cxx_try_cpp "$LINENO"; then :
2145  ac_header_preproc=yes
2146else
2147  ac_header_preproc=no
2148fi
2149rm -f conftest.err conftest.i conftest.$ac_ext
2150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2151$as_echo "$ac_header_preproc" >&6; }
2152
2153# So?  What about this header?
2154case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2155  yes:no: )
2156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2157$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2159$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2160    ;;
2161  no:yes:* )
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2163$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2165$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2167$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2168    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2169$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2170    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2171$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2172( $as_echo "## ----------------------------------------- ##
2173## Report this to build-dev@openjdk.java.net ##
2174## ----------------------------------------- ##"
2175     ) | sed "s/^/$as_me: WARNING:     /" >&2
2176    ;;
2177esac
2178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
2180if eval "test \"\${$3+set}\"" = set; then :
2181  $as_echo_n "(cached) " >&6
2182else
2183  eval "$3=\$ac_header_compiler"
2184fi
2185eval ac_res=\$$3
2186	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2187$as_echo "$ac_res" >&6; }
2188fi
2189  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2190
2191} # ac_fn_cxx_check_header_mongrel
2192
2193# ac_fn_cxx_try_run LINENO
2194# ------------------------
2195# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2196# that executables *can* be run.
2197ac_fn_cxx_try_run ()
2198{
2199  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2200  if { { ac_try="$ac_link"
2201case "(($ac_try" in
2202  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203  *) ac_try_echo=$ac_try;;
2204esac
2205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206$as_echo "$ac_try_echo"; } >&5
2207  (eval "$ac_link") 2>&5
2208  ac_status=$?
2209  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2210  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2211  { { case "(($ac_try" in
2212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2213  *) ac_try_echo=$ac_try;;
2214esac
2215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2216$as_echo "$ac_try_echo"; } >&5
2217  (eval "$ac_try") 2>&5
2218  ac_status=$?
2219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2220  test $ac_status = 0; }; }; then :
2221  ac_retval=0
2222else
2223  $as_echo "$as_me: program exited with status $ac_status" >&5
2224       $as_echo "$as_me: failed program was:" >&5
2225sed 's/^/| /' conftest.$ac_ext >&5
2226
2227       ac_retval=$ac_status
2228fi
2229  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2230  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2231  as_fn_set_status $ac_retval
2232
2233} # ac_fn_cxx_try_run
2234
2235# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2236# ---------------------------------------------------------
2237# Tests whether HEADER exists and can be compiled using the include files in
2238# INCLUDES, setting the cache variable VAR accordingly.
2239ac_fn_cxx_check_header_compile ()
2240{
2241  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2243$as_echo_n "checking for $2... " >&6; }
2244if eval "test \"\${$3+set}\"" = set; then :
2245  $as_echo_n "(cached) " >&6
2246else
2247  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h.  */
2249$4
2250#include <$2>
2251_ACEOF
2252if ac_fn_cxx_try_compile "$LINENO"; then :
2253  eval "$3=yes"
2254else
2255  eval "$3=no"
2256fi
2257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2258fi
2259eval ac_res=\$$3
2260	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2261$as_echo "$ac_res" >&6; }
2262  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2263
2264} # ac_fn_cxx_check_header_compile
2265
2266# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2267# ----------------------------------------------
2268# Tries to find the compile-time value of EXPR in a program that includes
2269# INCLUDES, setting VAR accordingly. Returns whether the value could be
2270# computed
2271ac_fn_cxx_compute_int ()
2272{
2273  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274  if test "$cross_compiling" = yes; then
2275    # Depending upon the size, compute the lo and hi bounds.
2276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h.  */
2278$4
2279int
2280main ()
2281{
2282static int test_array [1 - 2 * !(($2) >= 0)];
2283test_array [0] = 0
2284
2285  ;
2286  return 0;
2287}
2288_ACEOF
2289if ac_fn_cxx_try_compile "$LINENO"; then :
2290  ac_lo=0 ac_mid=0
2291  while :; do
2292    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h.  */
2294$4
2295int
2296main ()
2297{
2298static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2299test_array [0] = 0
2300
2301  ;
2302  return 0;
2303}
2304_ACEOF
2305if ac_fn_cxx_try_compile "$LINENO"; then :
2306  ac_hi=$ac_mid; break
2307else
2308  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2309			if test $ac_lo -le $ac_mid; then
2310			  ac_lo= ac_hi=
2311			  break
2312			fi
2313			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2314fi
2315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2316  done
2317else
2318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h.  */
2320$4
2321int
2322main ()
2323{
2324static int test_array [1 - 2 * !(($2) < 0)];
2325test_array [0] = 0
2326
2327  ;
2328  return 0;
2329}
2330_ACEOF
2331if ac_fn_cxx_try_compile "$LINENO"; then :
2332  ac_hi=-1 ac_mid=-1
2333  while :; do
2334    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h.  */
2336$4
2337int
2338main ()
2339{
2340static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2341test_array [0] = 0
2342
2343  ;
2344  return 0;
2345}
2346_ACEOF
2347if ac_fn_cxx_try_compile "$LINENO"; then :
2348  ac_lo=$ac_mid; break
2349else
2350  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2351			if test $ac_mid -le $ac_hi; then
2352			  ac_lo= ac_hi=
2353			  break
2354			fi
2355			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358  done
2359else
2360  ac_lo= ac_hi=
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365# Binary search between lo and hi bounds.
2366while test "x$ac_lo" != "x$ac_hi"; do
2367  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369/* end confdefs.h.  */
2370$4
2371int
2372main ()
2373{
2374static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2375test_array [0] = 0
2376
2377  ;
2378  return 0;
2379}
2380_ACEOF
2381if ac_fn_cxx_try_compile "$LINENO"; then :
2382  ac_hi=$ac_mid
2383else
2384  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387done
2388case $ac_lo in #((
2389?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2390'') ac_retval=1 ;;
2391esac
2392  else
2393    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2394/* end confdefs.h.  */
2395$4
2396static long int longval () { return $2; }
2397static unsigned long int ulongval () { return $2; }
2398#include <stdio.h>
2399#include <stdlib.h>
2400int
2401main ()
2402{
2403
2404  FILE *f = fopen ("conftest.val", "w");
2405  if (! f)
2406    return 1;
2407  if (($2) < 0)
2408    {
2409      long int i = longval ();
2410      if (i != ($2))
2411	return 1;
2412      fprintf (f, "%ld", i);
2413    }
2414  else
2415    {
2416      unsigned long int i = ulongval ();
2417      if (i != ($2))
2418	return 1;
2419      fprintf (f, "%lu", i);
2420    }
2421  /* Do not output a trailing newline, as this causes \r\n confusion
2422     on some platforms.  */
2423  return ferror (f) || fclose (f) != 0;
2424
2425  ;
2426  return 0;
2427}
2428_ACEOF
2429if ac_fn_cxx_try_run "$LINENO"; then :
2430  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2431else
2432  ac_retval=1
2433fi
2434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2435  conftest.$ac_objext conftest.beam conftest.$ac_ext
2436rm -f conftest.val
2437
2438  fi
2439  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2440  as_fn_set_status $ac_retval
2441
2442} # ac_fn_cxx_compute_int
2443
2444# ac_fn_cxx_try_link LINENO
2445# -------------------------
2446# Try to link conftest.$ac_ext, and return whether this succeeded.
2447ac_fn_cxx_try_link ()
2448{
2449  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2450  rm -f conftest.$ac_objext conftest$ac_exeext
2451  if { { ac_try="$ac_link"
2452case "(($ac_try" in
2453  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2454  *) ac_try_echo=$ac_try;;
2455esac
2456eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2457$as_echo "$ac_try_echo"; } >&5
2458  (eval "$ac_link") 2>conftest.err
2459  ac_status=$?
2460  if test -s conftest.err; then
2461    grep -v '^ *+' conftest.err >conftest.er1
2462    cat conftest.er1 >&5
2463    mv -f conftest.er1 conftest.err
2464  fi
2465  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2466  test $ac_status = 0; } && {
2467	 test -z "$ac_cxx_werror_flag" ||
2468	 test ! -s conftest.err
2469       } && test -s conftest$ac_exeext && {
2470	 test "$cross_compiling" = yes ||
2471	 $as_test_x conftest$ac_exeext
2472       }; then :
2473  ac_retval=0
2474else
2475  $as_echo "$as_me: failed program was:" >&5
2476sed 's/^/| /' conftest.$ac_ext >&5
2477
2478	ac_retval=1
2479fi
2480  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2481  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2482  # interfere with the next link command; also delete a directory that is
2483  # left behind by Apple's compiler.  We do this before executing the actions.
2484  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2485  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2486  as_fn_set_status $ac_retval
2487
2488} # ac_fn_cxx_try_link
2489
2490# ac_fn_cxx_check_func LINENO FUNC VAR
2491# ------------------------------------
2492# Tests whether FUNC exists, setting the cache variable VAR accordingly
2493ac_fn_cxx_check_func ()
2494{
2495  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2497$as_echo_n "checking for $2... " >&6; }
2498if eval "test \"\${$3+set}\"" = set; then :
2499  $as_echo_n "(cached) " >&6
2500else
2501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2502/* end confdefs.h.  */
2503/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2504   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2505#define $2 innocuous_$2
2506
2507/* System header to define __stub macros and hopefully few prototypes,
2508    which can conflict with char $2 (); below.
2509    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2510    <limits.h> exists even on freestanding compilers.  */
2511
2512#ifdef __STDC__
2513# include <limits.h>
2514#else
2515# include <assert.h>
2516#endif
2517
2518#undef $2
2519
2520/* Override any GCC internal prototype to avoid an error.
2521   Use char because int might match the return type of a GCC
2522   builtin and then its argument prototype would still apply.  */
2523#ifdef __cplusplus
2524extern "C"
2525#endif
2526char $2 ();
2527/* The GNU C library defines this for functions which it implements
2528    to always fail with ENOSYS.  Some functions are actually named
2529    something starting with __ and the normal name is an alias.  */
2530#if defined __stub_$2 || defined __stub___$2
2531choke me
2532#endif
2533
2534int
2535main ()
2536{
2537return $2 ();
2538  ;
2539  return 0;
2540}
2541_ACEOF
2542if ac_fn_cxx_try_link "$LINENO"; then :
2543  eval "$3=yes"
2544else
2545  eval "$3=no"
2546fi
2547rm -f core conftest.err conftest.$ac_objext \
2548    conftest$ac_exeext conftest.$ac_ext
2549fi
2550eval ac_res=\$$3
2551	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2552$as_echo "$ac_res" >&6; }
2553  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2554
2555} # ac_fn_cxx_check_func
2556
2557# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2558# -------------------------------------------------------
2559# Tests whether HEADER exists and can be compiled using the include files in
2560# INCLUDES, setting the cache variable VAR accordingly.
2561ac_fn_c_check_header_compile ()
2562{
2563  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2565$as_echo_n "checking for $2... " >&6; }
2566if eval "test \"\${$3+set}\"" = set; then :
2567  $as_echo_n "(cached) " >&6
2568else
2569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h.  */
2571$4
2572#include <$2>
2573_ACEOF
2574if ac_fn_c_try_compile "$LINENO"; then :
2575  eval "$3=yes"
2576else
2577  eval "$3=no"
2578fi
2579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2585
2586} # ac_fn_c_check_header_compile
2587cat >config.log <<_ACEOF
2588This file contains any messages produced by compilers while
2589running configure, to aid debugging if configure makes a mistake.
2590
2591It was created by OpenJDK $as_me jdk8, which was
2592generated by GNU Autoconf 2.67.  Invocation command line was
2593
2594  $ $0 $@
2595
2596_ACEOF
2597exec 5>>config.log
2598{
2599cat <<_ASUNAME
2600## --------- ##
2601## Platform. ##
2602## --------- ##
2603
2604hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2605uname -m = `(uname -m) 2>/dev/null || echo unknown`
2606uname -r = `(uname -r) 2>/dev/null || echo unknown`
2607uname -s = `(uname -s) 2>/dev/null || echo unknown`
2608uname -v = `(uname -v) 2>/dev/null || echo unknown`
2609
2610/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2611/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2612
2613/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2614/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2615/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2616/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2617/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2618/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2619/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2620
2621_ASUNAME
2622
2623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2624for as_dir in $PATH
2625do
2626  IFS=$as_save_IFS
2627  test -z "$as_dir" && as_dir=.
2628    $as_echo "PATH: $as_dir"
2629  done
2630IFS=$as_save_IFS
2631
2632} >&5
2633
2634cat >&5 <<_ACEOF
2635
2636
2637## ----------- ##
2638## Core tests. ##
2639## ----------- ##
2640
2641_ACEOF
2642
2643
2644# Keep a trace of the command line.
2645# Strip out --no-create and --no-recursion so they do not pile up.
2646# Strip out --silent because we don't want to record it for future runs.
2647# Also quote any args containing shell meta-characters.
2648# Make two passes to allow for proper duplicate-argument suppression.
2649ac_configure_args=
2650ac_configure_args0=
2651ac_configure_args1=
2652ac_must_keep_next=false
2653for ac_pass in 1 2
2654do
2655  for ac_arg
2656  do
2657    case $ac_arg in
2658    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2659    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2660    | -silent | --silent | --silen | --sile | --sil)
2661      continue ;;
2662    *\'*)
2663      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2664    esac
2665    case $ac_pass in
2666    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2667    2)
2668      as_fn_append ac_configure_args1 " '$ac_arg'"
2669      if test $ac_must_keep_next = true; then
2670	ac_must_keep_next=false # Got value, back to normal.
2671      else
2672	case $ac_arg in
2673	  *=* | --config-cache | -C | -disable-* | --disable-* \
2674	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2675	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2676	  | -with-* | --with-* | -without-* | --without-* | --x)
2677	    case "$ac_configure_args0 " in
2678	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2679	    esac
2680	    ;;
2681	  -* ) ac_must_keep_next=true ;;
2682	esac
2683      fi
2684      as_fn_append ac_configure_args " '$ac_arg'"
2685      ;;
2686    esac
2687  done
2688done
2689{ ac_configure_args0=; unset ac_configure_args0;}
2690{ ac_configure_args1=; unset ac_configure_args1;}
2691
2692# When interrupted or exit'd, cleanup temporary files, and complete
2693# config.log.  We remove comments because anyway the quotes in there
2694# would cause problems or look ugly.
2695# WARNING: Use '\'' to represent an apostrophe within the trap.
2696# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2697trap 'exit_status=$?
2698  # Save into config.log some information that might help in debugging.
2699  {
2700    echo
2701
2702    $as_echo "## ---------------- ##
2703## Cache variables. ##
2704## ---------------- ##"
2705    echo
2706    # The following way of writing the cache mishandles newlines in values,
2707(
2708  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2709    eval ac_val=\$$ac_var
2710    case $ac_val in #(
2711    *${as_nl}*)
2712      case $ac_var in #(
2713      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2714$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2715      esac
2716      case $ac_var in #(
2717      _ | IFS | as_nl) ;; #(
2718      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2719      *) { eval $ac_var=; unset $ac_var;} ;;
2720      esac ;;
2721    esac
2722  done
2723  (set) 2>&1 |
2724    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2725    *${as_nl}ac_space=\ *)
2726      sed -n \
2727	"s/'\''/'\''\\\\'\'''\''/g;
2728	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2729      ;; #(
2730    *)
2731      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2732      ;;
2733    esac |
2734    sort
2735)
2736    echo
2737
2738    $as_echo "## ----------------- ##
2739## Output variables. ##
2740## ----------------- ##"
2741    echo
2742    for ac_var in $ac_subst_vars
2743    do
2744      eval ac_val=\$$ac_var
2745      case $ac_val in
2746      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2747      esac
2748      $as_echo "$ac_var='\''$ac_val'\''"
2749    done | sort
2750    echo
2751
2752    if test -n "$ac_subst_files"; then
2753      $as_echo "## ------------------- ##
2754## File substitutions. ##
2755## ------------------- ##"
2756      echo
2757      for ac_var in $ac_subst_files
2758      do
2759	eval ac_val=\$$ac_var
2760	case $ac_val in
2761	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2762	esac
2763	$as_echo "$ac_var='\''$ac_val'\''"
2764      done | sort
2765      echo
2766    fi
2767
2768    if test -s confdefs.h; then
2769      $as_echo "## ----------- ##
2770## confdefs.h. ##
2771## ----------- ##"
2772      echo
2773      cat confdefs.h
2774      echo
2775    fi
2776    test "$ac_signal" != 0 &&
2777      $as_echo "$as_me: caught signal $ac_signal"
2778    $as_echo "$as_me: exit $exit_status"
2779  } >&5
2780  rm -f core *.core core.conftest.* &&
2781    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2782    exit $exit_status
2783' 0
2784for ac_signal in 1 2 13 15; do
2785  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2786done
2787ac_signal=0
2788
2789# confdefs.h avoids OS command line length limits that DEFS can exceed.
2790rm -f -r conftest* confdefs.h
2791
2792$as_echo "/* confdefs.h */" > confdefs.h
2793
2794# Predefined preprocessor variables.
2795
2796cat >>confdefs.h <<_ACEOF
2797#define PACKAGE_NAME "$PACKAGE_NAME"
2798_ACEOF
2799
2800cat >>confdefs.h <<_ACEOF
2801#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2802_ACEOF
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_VERSION "$PACKAGE_VERSION"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_STRING "$PACKAGE_STRING"
2810_ACEOF
2811
2812cat >>confdefs.h <<_ACEOF
2813#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2814_ACEOF
2815
2816cat >>confdefs.h <<_ACEOF
2817#define PACKAGE_URL "$PACKAGE_URL"
2818_ACEOF
2819
2820
2821# Let the site file select an alternate cache file if it wants to.
2822# Prefer an explicitly selected file to automatically selected ones.
2823ac_site_file1=NONE
2824ac_site_file2=NONE
2825if test -n "$CONFIG_SITE"; then
2826  # We do not want a PATH search for config.site.
2827  case $CONFIG_SITE in #((
2828    -*)  ac_site_file1=./$CONFIG_SITE;;
2829    */*) ac_site_file1=$CONFIG_SITE;;
2830    *)   ac_site_file1=./$CONFIG_SITE;;
2831  esac
2832elif test "x$prefix" != xNONE; then
2833  ac_site_file1=$prefix/share/config.site
2834  ac_site_file2=$prefix/etc/config.site
2835else
2836  ac_site_file1=$ac_default_prefix/share/config.site
2837  ac_site_file2=$ac_default_prefix/etc/config.site
2838fi
2839for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2840do
2841  test "x$ac_site_file" = xNONE && continue
2842  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2843    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2844$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2845    sed 's/^/| /' "$ac_site_file" >&5
2846    . "$ac_site_file" \
2847      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2849as_fn_error $? "failed to load site script $ac_site_file
2850See \`config.log' for more details" "$LINENO" 5 ; }
2851  fi
2852done
2853
2854if test -r "$cache_file"; then
2855  # Some versions of bash will fail to source /dev/null (special files
2856  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2857  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2858    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2859$as_echo "$as_me: loading cache $cache_file" >&6;}
2860    case $cache_file in
2861      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2862      *)                      . "./$cache_file";;
2863    esac
2864  fi
2865else
2866  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2867$as_echo "$as_me: creating cache $cache_file" >&6;}
2868  >$cache_file
2869fi
2870
2871# Check that the precious variables saved in the cache have kept the same
2872# value.
2873ac_cache_corrupted=false
2874for ac_var in $ac_precious_vars; do
2875  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2876  eval ac_new_set=\$ac_env_${ac_var}_set
2877  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2878  eval ac_new_val=\$ac_env_${ac_var}_value
2879  case $ac_old_set,$ac_new_set in
2880    set,)
2881      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2882$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2883      ac_cache_corrupted=: ;;
2884    ,set)
2885      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2886$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2887      ac_cache_corrupted=: ;;
2888    ,);;
2889    *)
2890      if test "x$ac_old_val" != "x$ac_new_val"; then
2891	# differences in whitespace do not lead to failure.
2892	ac_old_val_w=`echo x $ac_old_val`
2893	ac_new_val_w=`echo x $ac_new_val`
2894	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2895	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2896$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2897	  ac_cache_corrupted=:
2898	else
2899	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2900$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2901	  eval $ac_var=\$ac_old_val
2902	fi
2903	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2904$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2905	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2906$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2907      fi;;
2908  esac
2909  # Pass precious variables to config.status.
2910  if test "$ac_new_set" = set; then
2911    case $ac_new_val in
2912    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2913    *) ac_arg=$ac_var=$ac_new_val ;;
2914    esac
2915    case " $ac_configure_args " in
2916      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2917      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2918    esac
2919  fi
2920done
2921if $ac_cache_corrupted; then
2922  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2924  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2925$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2926  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2927fi
2928## -------------------- ##
2929## Main body of script. ##
2930## -------------------- ##
2931
2932ac_ext=c
2933ac_cpp='$CPP $CPPFLAGS'
2934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2936ac_compiler_gnu=$ac_cv_c_compiler_gnu
2937
2938
2939
2940ac_aux_dir=
2941for ac_dir in build-aux "$srcdir"/build-aux; do
2942  if test -f "$ac_dir/install-sh"; then
2943    ac_aux_dir=$ac_dir
2944    ac_install_sh="$ac_aux_dir/install-sh -c"
2945    break
2946  elif test -f "$ac_dir/install.sh"; then
2947    ac_aux_dir=$ac_dir
2948    ac_install_sh="$ac_aux_dir/install.sh -c"
2949    break
2950  elif test -f "$ac_dir/shtool"; then
2951    ac_aux_dir=$ac_dir
2952    ac_install_sh="$ac_aux_dir/shtool install -c"
2953    break
2954  fi
2955done
2956if test -z "$ac_aux_dir"; then
2957  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2958fi
2959
2960# These three variables are undocumented and unsupported,
2961# and are intended to be withdrawn in a future Autoconf release.
2962# They can cause serious problems if a builder's source tree is in a directory
2963# whose full name contains unusual characters.
2964ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2965ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2966ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2967
2968
2969# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2970
2971#
2972# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2973# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2974#
2975# This code is free software; you can redistribute it and/or modify it
2976# under the terms of the GNU General Public License version 2 only, as
2977# published by the Free Software Foundation.  Oracle designates this
2978# particular file as subject to the "Classpath" exception as provided
2979# by Oracle in the LICENSE file that accompanied this code.
2980#
2981# This code is distributed in the hope that it will be useful, but WITHOUT
2982# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2983# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2984# version 2 for more details (a copy is included in the LICENSE file that
2985# accompanied this code).
2986#
2987# You should have received a copy of the GNU General Public License version
2988# 2 along with this work; if not, write to the Free Software Foundation,
2989# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2990#
2991# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2992# or visit www.oracle.com if you need additional information or have any
2993# questions.
2994#
2995
2996#
2997# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2998#
2999# This program is free software; you can redistribute it and/or modify
3000# it under the terms of the GNU General Public License as published by
3001# the Free Software Foundation; either version 2 of the License, or
3002# (at your option) any later version.
3003#
3004# This program is distributed in the hope that it will be useful, but
3005# WITHOUT ANY WARRANTY; without even the implied warranty of
3006# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3007# General Public License for more details.
3008#
3009# You should have received a copy of the GNU General Public License
3010# along with this program; if not, write to the Free Software
3011# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3012#
3013# As a special exception to the GNU General Public License, if you
3014# distribute this file as part of a program that contains a
3015# configuration script generated by Autoconf, you may include it under
3016# the same distribution terms that you use for the rest of that program.
3017
3018# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3019# ----------------------------------
3020# PKG_PROG_PKG_CONFIG
3021
3022# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3023#
3024# Check to see whether a particular set of modules exists.  Similar
3025# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3026#
3027#
3028# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3029# this or PKG_CHECK_MODULES is called, or make sure to call
3030# PKG_CHECK_EXISTS manually
3031# --------------------------------------------------------------
3032
3033
3034
3035# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3036# ---------------------------------------------
3037# _PKG_CONFIG
3038
3039# _PKG_SHORT_ERRORS_SUPPORTED
3040# -----------------------------
3041# _PKG_SHORT_ERRORS_SUPPORTED
3042
3043
3044# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3045# [ACTION-IF-NOT-FOUND])
3046#
3047#
3048# Note that if there is a possibility the first call to
3049# PKG_CHECK_MODULES might not happen, you should be sure to include an
3050# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3051#
3052#
3053# --------------------------------------------------------------
3054# PKG_CHECK_MODULES
3055
3056
3057# Include these first...
3058#
3059# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3060# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3061#
3062# This code is free software; you can redistribute it and/or modify it
3063# under the terms of the GNU General Public License version 2 only, as
3064# published by the Free Software Foundation.  Oracle designates this
3065# particular file as subject to the "Classpath" exception as provided
3066# by Oracle in the LICENSE file that accompanied this code.
3067#
3068# This code is distributed in the hope that it will be useful, but WITHOUT
3069# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3070# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3071# version 2 for more details (a copy is included in the LICENSE file that
3072# accompanied this code).
3073#
3074# You should have received a copy of the GNU General Public License version
3075# 2 along with this work; if not, write to the Free Software Foundation,
3076# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3077#
3078# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3079# or visit www.oracle.com if you need additional information or have any
3080# questions.
3081#
3082
3083# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3084# If so, then append $1 to $2\
3085# Also set JVM_ARG_OK to true/false depending on outcome.
3086
3087
3088# Appends a string to a path variable, only adding the : when needed.
3089
3090
3091# This will make sure the given variable points to a full and proper
3092# path. This means:
3093# 1) There will be no spaces in the path. On posix platforms,
3094#    spaces in the path will result in an error. On Windows,
3095#    the path will be rewritten using short-style to be space-free.
3096# 2) The path will be absolute, and it will be in unix-style (on
3097#     cygwin).
3098# $1: The name of the variable to fix
3099
3100
3101# This will make sure the given variable points to a executable
3102# with a full and proper path. This means:
3103# 1) There will be no spaces in the path. On posix platforms,
3104#    spaces in the path will result in an error. On Windows,
3105#    the path will be rewritten using short-style to be space-free.
3106# 2) The path will be absolute, and it will be in unix-style (on
3107#     cygwin).
3108# Any arguments given to the executable is preserved.
3109# If the input variable does not have a directory specification, then
3110# it need to be in the PATH.
3111# $1: The name of the variable to fix
3112
3113
3114
3115
3116
3117
3118# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3119# $1: variable to check
3120# $2: executable name to print in warning (optional)
3121
3122
3123# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3124# Arguments as AC_PATH_PROG:
3125# $1: variable to set
3126# $2: executable name to look for
3127
3128
3129# Setup the most fundamental tools that relies on not much else to set up,
3130# but is used by much of the early bootstrap code.
3131
3132
3133# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3134
3135
3136
3137
3138
3139
3140
3141#%%% Simple tools %%%
3142
3143# Check if we have found a usable version of make
3144# $1: the path to a potential make binary (or empty)
3145# $2: the description on how we found this
3146
3147
3148# Goes looking for a usable version of GNU make.
3149
3150
3151
3152
3153
3154
3155# Check if build directory is on local disk. If not possible to determine,
3156# we prefer to claim it's local.
3157# Argument 1: directory to test
3158# Argument 2: what to do if it is on local disk
3159# Argument 3: what to do otherwise (remote disk or failure)
3160
3161
3162# Check that source files have basic read permissions set. This might
3163# not be the case in cygwin in certain conditions.
3164
3165
3166
3167
3168#
3169# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3170# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3171#
3172# This code is free software; you can redistribute it and/or modify it
3173# under the terms of the GNU General Public License version 2 only, as
3174# published by the Free Software Foundation.  Oracle designates this
3175# particular file as subject to the "Classpath" exception as provided
3176# by Oracle in the LICENSE file that accompanied this code.
3177#
3178# This code is distributed in the hope that it will be useful, but WITHOUT
3179# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3180# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3181# version 2 for more details (a copy is included in the LICENSE file that
3182# accompanied this code).
3183#
3184# You should have received a copy of the GNU General Public License version
3185# 2 along with this work; if not, write to the Free Software Foundation,
3186# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3187#
3188# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3189# or visit www.oracle.com if you need additional information or have any
3190# questions.
3191#
3192
3193
3194
3195
3196
3197# Helper function which possibly converts a path using DOS-style short mode.
3198# If so, the updated path is stored in $new_path.
3199# $1: The path to check
3200
3201
3202# Helper function which possibly converts a path using DOS-style short mode.
3203# If so, the updated path is stored in $new_path.
3204# $1: The path to check
3205
3206
3207# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3208# and could probably be heavily simplified. However, all changes in this
3209# area tend to need lot of testing in different scenarios, and in lack of
3210# proper unit testing, cleaning this up has not been deemed worth the effort
3211# at the moment.
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3222
3223
3224
3225
3226#
3227# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3228# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3229#
3230# This code is free software; you can redistribute it and/or modify it
3231# under the terms of the GNU General Public License version 2 only, as
3232# published by the Free Software Foundation.  Oracle designates this
3233# particular file as subject to the "Classpath" exception as provided
3234# by Oracle in the LICENSE file that accompanied this code.
3235#
3236# This code is distributed in the hope that it will be useful, but WITHOUT
3237# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3238# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3239# version 2 for more details (a copy is included in the LICENSE file that
3240# accompanied this code).
3241#
3242# You should have received a copy of the GNU General Public License version
3243# 2 along with this work; if not, write to the Free Software Foundation,
3244# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3245#
3246# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3247# or visit www.oracle.com if you need additional information or have any
3248# questions.
3249#
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261# ... then the rest
3262#
3263# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3264# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3265#
3266# This code is free software; you can redistribute it and/or modify it
3267# under the terms of the GNU General Public License version 2 only, as
3268# published by the Free Software Foundation.  Oracle designates this
3269# particular file as subject to the "Classpath" exception as provided
3270# by Oracle in the LICENSE file that accompanied this code.
3271#
3272# This code is distributed in the hope that it will be useful, but WITHOUT
3273# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3274# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3275# version 2 for more details (a copy is included in the LICENSE file that
3276# accompanied this code).
3277#
3278# You should have received a copy of the GNU General Public License version
3279# 2 along with this work; if not, write to the Free Software Foundation,
3280# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3281#
3282# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3283# or visit www.oracle.com if you need additional information or have any
3284# questions.
3285#
3286
3287# Execute the check given as argument, and verify the result
3288# If the Boot JDK was previously found, do nothing
3289# $1 A command line (typically autoconf macro) to execute
3290
3291
3292# Test: Is bootjdk explicitely set by command line arguments?
3293
3294
3295# Test: Is bootjdk available from builddeps?
3296
3297
3298# Test: Is $JAVA_HOME set?
3299
3300
3301# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3302
3303
3304# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3305
3306
3307# Look for a jdk in the given path. If there are multiple, try to select the newest.
3308# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3309# $1 = Path to directory containing jdk installations.
3310# $2 = String to append to the found JDK directory to get the proper JDK home
3311
3312
3313# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3314# environmental variable as base for where to look.
3315# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3316
3317
3318# Test: Is there a JDK installed in default, well-known locations?
3319
3320
3321# Check that a command-line tool in the Boot JDK is correct
3322# $1 = name of variable to assign
3323# $2 = name of binary
3324
3325
3326###############################################################################
3327#
3328# We need a Boot JDK to bootstrap the build.
3329#
3330
3331
3332
3333
3334
3335#
3336# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3337# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3338#
3339# This code is free software; you can redistribute it and/or modify it
3340# under the terms of the GNU General Public License version 2 only, as
3341# published by the Free Software Foundation.  Oracle designates this
3342# particular file as subject to the "Classpath" exception as provided
3343# by Oracle in the LICENSE file that accompanied this code.
3344#
3345# This code is distributed in the hope that it will be useful, but WITHOUT
3346# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3347# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3348# version 2 for more details (a copy is included in the LICENSE file that
3349# accompanied this code).
3350#
3351# You should have received a copy of the GNU General Public License version
3352# 2 along with this work; if not, write to the Free Software Foundation,
3353# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3354#
3355# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3356# or visit www.oracle.com if you need additional information or have any
3357# questions.
3358#
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379#
3380# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3381# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3382#
3383# This code is free software; you can redistribute it and/or modify it
3384# under the terms of the GNU General Public License version 2 only, as
3385# published by the Free Software Foundation.  Oracle designates this
3386# particular file as subject to the "Classpath" exception as provided
3387# by Oracle in the LICENSE file that accompanied this code.
3388#
3389# This code is distributed in the hope that it will be useful, but WITHOUT
3390# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3391# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3392# version 2 for more details (a copy is included in the LICENSE file that
3393# accompanied this code).
3394#
3395# You should have received a copy of the GNU General Public License version
3396# 2 along with this work; if not, write to the Free Software Foundation,
3397# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3398#
3399# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3400# or visit www.oracle.com if you need additional information or have any
3401# questions.
3402#
3403
3404
3405
3406
3407
3408cygwin_help() {
3409    case $1 in
3410    unzip)
3411        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3412    zip)
3413        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3414    make)
3415        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3416    * )
3417       break ;;
3418    esac
3419}
3420
3421apt_help() {
3422    case $1 in
3423    devkit)
3424        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3425    openjdk)
3426        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3427    alsa)
3428        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3429    cups)
3430        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3431    freetype2)
3432        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3433    pulse)
3434        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3435    x11)
3436        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3437    ccache)
3438        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3439    * )
3440       break ;;
3441    esac
3442}
3443
3444yum_help() {
3445    case $1 in
3446    devkit)
3447        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3448    openjdk)
3449        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3450    alsa)
3451        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3452    cups)
3453        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3454    freetype2)
3455        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3456    pulse)
3457        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3458    x11)
3459        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3460    ccache)
3461        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3462    * )
3463       break ;;
3464    esac
3465}
3466
3467port_help() {
3468    PKGHANDLER_COMMAND=""
3469}
3470
3471pkgutil_help() {
3472    PKGHANDLER_COMMAND=""
3473}
3474
3475pkgadd_help() {
3476    PKGHANDLER_COMMAND=""
3477}
3478
3479
3480
3481#
3482# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3483# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3484#
3485# This code is free software; you can redistribute it and/or modify it
3486# under the terms of the GNU General Public License version 2 only, as
3487# published by the Free Software Foundation.  Oracle designates this
3488# particular file as subject to the "Classpath" exception as provided
3489# by Oracle in the LICENSE file that accompanied this code.
3490#
3491# This code is distributed in the hope that it will be useful, but WITHOUT
3492# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3493# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3494# version 2 for more details (a copy is included in the LICENSE file that
3495# accompanied this code).
3496#
3497# You should have received a copy of the GNU General Public License version
3498# 2 along with this work; if not, write to the Free Software Foundation,
3499# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3500#
3501# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3502# or visit www.oracle.com if you need additional information or have any
3503# questions.
3504#
3505
3506
3507
3508
3509
3510
3511
3512
3513###############################################################################
3514#
3515# Should we build only OpenJDK even if closed sources are present?
3516#
3517
3518
3519
3520
3521###############################################################################
3522#
3523# Setup version numbers
3524#
3525
3526
3527
3528
3529
3530
3531# Support for customization of the build process. Some build files
3532# will include counterparts from this location, if they exist. This allows
3533# for a degree of customization of the build targets and the rules/recipes
3534# to create them
3535
3536# Check whether --with-custom-make-dir was given.
3537if test "${with_custom_make_dir+set}" = set; then :
3538  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3539fi
3540
3541
3542
3543#
3544# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3546#
3547# This code is free software; you can redistribute it and/or modify it
3548# under the terms of the GNU General Public License version 2 only, as
3549# published by the Free Software Foundation.  Oracle designates this
3550# particular file as subject to the "Classpath" exception as provided
3551# by Oracle in the LICENSE file that accompanied this code.
3552#
3553# This code is distributed in the hope that it will be useful, but WITHOUT
3554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3556# version 2 for more details (a copy is included in the LICENSE file that
3557# accompanied this code).
3558#
3559# You should have received a copy of the GNU General Public License version
3560# 2 along with this work; if not, write to the Free Software Foundation,
3561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3562#
3563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3564# or visit www.oracle.com if you need additional information or have any
3565# questions.
3566#
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582#
3583# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3584# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3585#
3586# This code is free software; you can redistribute it and/or modify it
3587# under the terms of the GNU General Public License version 2 only, as
3588# published by the Free Software Foundation.  Oracle designates this
3589# particular file as subject to the "Classpath" exception as provided
3590# by Oracle in the LICENSE file that accompanied this code.
3591#
3592# This code is distributed in the hope that it will be useful, but WITHOUT
3593# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3594# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3595# version 2 for more details (a copy is included in the LICENSE file that
3596# accompanied this code).
3597#
3598# You should have received a copy of the GNU General Public License version
3599# 2 along with this work; if not, write to the Free Software Foundation,
3600# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3601#
3602# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3603# or visit www.oracle.com if you need additional information or have any
3604# questions.
3605#
3606
3607# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3608# Converts autoconf style CPU name to OpenJDK style, into
3609# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3610
3611
3612# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3613# Converts autoconf style OS name to OpenJDK style, into
3614# VAR_OS and VAR_OS_API.
3615
3616
3617# Expects $host_os $host_cpu $build_os and $build_cpu
3618# and $with_target_bits to have been setup!
3619#
3620# Translate the standard triplet(quadruplet) definition
3621# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3622# OPENJDK_BUILD_OS, etc.
3623
3624
3625# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3626# accordingly. Must be done after setting up build and target system, but before
3627# doing anything else with these values.
3628
3629
3630    # Setup the legacy variables, for controlling the old makefiles.
3631    #
3632
3633
3634
3635
3636#%%% Build and target systems %%%
3637
3638
3639
3640
3641# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3642# Add -mX to various FLAGS variables.
3643
3644
3645
3646
3647
3648
3649#
3650# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3651# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3652#
3653# This code is free software; you can redistribute it and/or modify it
3654# under the terms of the GNU General Public License version 2 only, as
3655# published by the Free Software Foundation.  Oracle designates this
3656# particular file as subject to the "Classpath" exception as provided
3657# by Oracle in the LICENSE file that accompanied this code.
3658#
3659# This code is distributed in the hope that it will be useful, but WITHOUT
3660# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3661# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3662# version 2 for more details (a copy is included in the LICENSE file that
3663# accompanied this code).
3664#
3665# You should have received a copy of the GNU General Public License version
3666# 2 along with this work; if not, write to the Free Software Foundation,
3667# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3668#
3669# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3670# or visit www.oracle.com if you need additional information or have any
3671# questions.
3672#
3673
3674
3675
3676
3677
3678
3679
3680
3681#
3682# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3683# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3684#
3685# This code is free software; you can redistribute it and/or modify it
3686# under the terms of the GNU General Public License version 2 only, as
3687# published by the Free Software Foundation.  Oracle designates this
3688# particular file as subject to the "Classpath" exception as provided
3689# by Oracle in the LICENSE file that accompanied this code.
3690#
3691# This code is distributed in the hope that it will be useful, but WITHOUT
3692# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3693# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3694# version 2 for more details (a copy is included in the LICENSE file that
3695# accompanied this code).
3696#
3697# You should have received a copy of the GNU General Public License version
3698# 2 along with this work; if not, write to the Free Software Foundation,
3699# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3700#
3701# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3702# or visit www.oracle.com if you need additional information or have any
3703# questions.
3704#
3705
3706# $1 = compiler to test (CC or CXX)
3707# $2 = human readable name of compiler (C or C++)
3708
3709
3710
3711
3712
3713# $1 = compiler to test (CC or CXX)
3714# $2 = human readable name of compiler (C or C++)
3715# $3 = list of compiler names to search for
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3730#                                   [RUN-IF-FALSE])
3731# ------------------------------------------------------------
3732# Check that the c and c++ compilers support an argument
3733
3734
3735
3736
3737# Setup the JTREG paths
3738
3739
3740#
3741# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3742# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3743#
3744# This code is free software; you can redistribute it and/or modify it
3745# under the terms of the GNU General Public License version 2 only, as
3746# published by the Free Software Foundation.  Oracle designates this
3747# particular file as subject to the "Classpath" exception as provided
3748# by Oracle in the LICENSE file that accompanied this code.
3749#
3750# This code is distributed in the hope that it will be useful, but WITHOUT
3751# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3752# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3753# version 2 for more details (a copy is included in the LICENSE file that
3754# accompanied this code).
3755#
3756# You should have received a copy of the GNU General Public License version
3757# 2 along with this work; if not, write to the Free Software Foundation,
3758# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3759#
3760# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3761# or visit www.oracle.com if you need additional information or have any
3762# questions.
3763#
3764
3765
3766
3767
3768
3769
3770
3771# Check if the VS env variables were setup prior to running configure.
3772# If not, then find vcvarsall.bat and run it automatically, and integrate
3773# the set env variables into the spec file.
3774
3775
3776
3777# Setup the DXSDK paths
3778
3779
3780
3781
3782
3783
3784# This line needs to be here, verbatim, after all includes and the dummy hook
3785# definitions. It is replaced with custom functionality when building
3786# custom sources.
3787#CUSTOM_AUTOCONF_INCLUDE
3788
3789# Do not change or remove the following line, it is needed for consistency checks:
3790DATE_WHEN_GENERATED=1376579640
3791
3792###############################################################################
3793#
3794# Initialization / Boot-strapping
3795#
3796# The bootstrapping process needs to solve the "chicken or the egg" problem,
3797# thus it jumps back and forth, each time gaining something needed later on.
3798#
3799###############################################################################
3800
3801# Basic initialization that must happen first of all
3802
3803# Save the original command line. This is passed to us by the wrapper configure script.
3804
3805DATE_WHEN_CONFIGURED=`LANG=C date`
3806
3807{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3808$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3809{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3810$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3811
3812
3813
3814# Start with tools that do not need have cross compilation support
3815# and can be expected to be found in the default PATH. These tools are
3816# used by configure. Nor are these tools expected to be found in the
3817# devkit from the builddeps server either, since they are
3818# needed to download the devkit.
3819
3820# First are all the simple required tools.
3821
3822    for ac_prog in basename
3823do
3824  # Extract the first word of "$ac_prog", so it can be a program name with args.
3825set dummy $ac_prog; ac_word=$2
3826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827$as_echo_n "checking for $ac_word... " >&6; }
3828if test "${ac_cv_path_BASENAME+set}" = set; then :
3829  $as_echo_n "(cached) " >&6
3830else
3831  case $BASENAME in
3832  [\\/]* | ?:[\\/]*)
3833  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3834  ;;
3835  *)
3836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3837for as_dir in $PATH
3838do
3839  IFS=$as_save_IFS
3840  test -z "$as_dir" && as_dir=.
3841    for ac_exec_ext in '' $ac_executable_extensions; do
3842  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3843    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3845    break 2
3846  fi
3847done
3848  done
3849IFS=$as_save_IFS
3850
3851  ;;
3852esac
3853fi
3854BASENAME=$ac_cv_path_BASENAME
3855if test -n "$BASENAME"; then
3856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3857$as_echo "$BASENAME" >&6; }
3858else
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3860$as_echo "no" >&6; }
3861fi
3862
3863
3864  test -n "$BASENAME" && break
3865done
3866
3867
3868    if test "x$BASENAME" = x; then
3869        if test "xbasename" = x; then
3870          PROG_NAME=basename
3871        else
3872          PROG_NAME=basename
3873        fi
3874        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3875$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3876        as_fn_error $? "Cannot continue" "$LINENO" 5
3877    fi
3878
3879
3880
3881    for ac_prog in bash
3882do
3883  # Extract the first word of "$ac_prog", so it can be a program name with args.
3884set dummy $ac_prog; ac_word=$2
3885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3886$as_echo_n "checking for $ac_word... " >&6; }
3887if test "${ac_cv_path_BASH+set}" = set; then :
3888  $as_echo_n "(cached) " >&6
3889else
3890  case $BASH in
3891  [\\/]* | ?:[\\/]*)
3892  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3893  ;;
3894  *)
3895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3896for as_dir in $PATH
3897do
3898  IFS=$as_save_IFS
3899  test -z "$as_dir" && as_dir=.
3900    for ac_exec_ext in '' $ac_executable_extensions; do
3901  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3902    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3904    break 2
3905  fi
3906done
3907  done
3908IFS=$as_save_IFS
3909
3910  ;;
3911esac
3912fi
3913BASH=$ac_cv_path_BASH
3914if test -n "$BASH"; then
3915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3916$as_echo "$BASH" >&6; }
3917else
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919$as_echo "no" >&6; }
3920fi
3921
3922
3923  test -n "$BASH" && break
3924done
3925
3926
3927    if test "x$BASH" = x; then
3928        if test "xbash" = x; then
3929          PROG_NAME=bash
3930        else
3931          PROG_NAME=bash
3932        fi
3933        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3934$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3935        as_fn_error $? "Cannot continue" "$LINENO" 5
3936    fi
3937
3938
3939
3940    for ac_prog in cat
3941do
3942  # Extract the first word of "$ac_prog", so it can be a program name with args.
3943set dummy $ac_prog; ac_word=$2
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3945$as_echo_n "checking for $ac_word... " >&6; }
3946if test "${ac_cv_path_CAT+set}" = set; then :
3947  $as_echo_n "(cached) " >&6
3948else
3949  case $CAT in
3950  [\\/]* | ?:[\\/]*)
3951  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3952  ;;
3953  *)
3954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3955for as_dir in $PATH
3956do
3957  IFS=$as_save_IFS
3958  test -z "$as_dir" && as_dir=.
3959    for ac_exec_ext in '' $ac_executable_extensions; do
3960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3961    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3963    break 2
3964  fi
3965done
3966  done
3967IFS=$as_save_IFS
3968
3969  ;;
3970esac
3971fi
3972CAT=$ac_cv_path_CAT
3973if test -n "$CAT"; then
3974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3975$as_echo "$CAT" >&6; }
3976else
3977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978$as_echo "no" >&6; }
3979fi
3980
3981
3982  test -n "$CAT" && break
3983done
3984
3985
3986    if test "x$CAT" = x; then
3987        if test "xcat" = x; then
3988          PROG_NAME=cat
3989        else
3990          PROG_NAME=cat
3991        fi
3992        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3993$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3994        as_fn_error $? "Cannot continue" "$LINENO" 5
3995    fi
3996
3997
3998
3999    for ac_prog in chmod
4000do
4001  # Extract the first word of "$ac_prog", so it can be a program name with args.
4002set dummy $ac_prog; ac_word=$2
4003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4004$as_echo_n "checking for $ac_word... " >&6; }
4005if test "${ac_cv_path_CHMOD+set}" = set; then :
4006  $as_echo_n "(cached) " >&6
4007else
4008  case $CHMOD in
4009  [\\/]* | ?:[\\/]*)
4010  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4011  ;;
4012  *)
4013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4014for as_dir in $PATH
4015do
4016  IFS=$as_save_IFS
4017  test -z "$as_dir" && as_dir=.
4018    for ac_exec_ext in '' $ac_executable_extensions; do
4019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4020    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4022    break 2
4023  fi
4024done
4025  done
4026IFS=$as_save_IFS
4027
4028  ;;
4029esac
4030fi
4031CHMOD=$ac_cv_path_CHMOD
4032if test -n "$CHMOD"; then
4033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4034$as_echo "$CHMOD" >&6; }
4035else
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4037$as_echo "no" >&6; }
4038fi
4039
4040
4041  test -n "$CHMOD" && break
4042done
4043
4044
4045    if test "x$CHMOD" = x; then
4046        if test "xchmod" = x; then
4047          PROG_NAME=chmod
4048        else
4049          PROG_NAME=chmod
4050        fi
4051        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4052$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4053        as_fn_error $? "Cannot continue" "$LINENO" 5
4054    fi
4055
4056
4057
4058    for ac_prog in cmp
4059do
4060  # Extract the first word of "$ac_prog", so it can be a program name with args.
4061set dummy $ac_prog; ac_word=$2
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4063$as_echo_n "checking for $ac_word... " >&6; }
4064if test "${ac_cv_path_CMP+set}" = set; then :
4065  $as_echo_n "(cached) " >&6
4066else
4067  case $CMP in
4068  [\\/]* | ?:[\\/]*)
4069  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4070  ;;
4071  *)
4072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4073for as_dir in $PATH
4074do
4075  IFS=$as_save_IFS
4076  test -z "$as_dir" && as_dir=.
4077    for ac_exec_ext in '' $ac_executable_extensions; do
4078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4079    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4081    break 2
4082  fi
4083done
4084  done
4085IFS=$as_save_IFS
4086
4087  ;;
4088esac
4089fi
4090CMP=$ac_cv_path_CMP
4091if test -n "$CMP"; then
4092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4093$as_echo "$CMP" >&6; }
4094else
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4096$as_echo "no" >&6; }
4097fi
4098
4099
4100  test -n "$CMP" && break
4101done
4102
4103
4104    if test "x$CMP" = x; then
4105        if test "xcmp" = x; then
4106          PROG_NAME=cmp
4107        else
4108          PROG_NAME=cmp
4109        fi
4110        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4111$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4112        as_fn_error $? "Cannot continue" "$LINENO" 5
4113    fi
4114
4115
4116
4117    for ac_prog in comm
4118do
4119  # Extract the first word of "$ac_prog", so it can be a program name with args.
4120set dummy $ac_prog; ac_word=$2
4121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4122$as_echo_n "checking for $ac_word... " >&6; }
4123if test "${ac_cv_path_COMM+set}" = set; then :
4124  $as_echo_n "(cached) " >&6
4125else
4126  case $COMM in
4127  [\\/]* | ?:[\\/]*)
4128  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4129  ;;
4130  *)
4131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4132for as_dir in $PATH
4133do
4134  IFS=$as_save_IFS
4135  test -z "$as_dir" && as_dir=.
4136    for ac_exec_ext in '' $ac_executable_extensions; do
4137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4138    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4140    break 2
4141  fi
4142done
4143  done
4144IFS=$as_save_IFS
4145
4146  ;;
4147esac
4148fi
4149COMM=$ac_cv_path_COMM
4150if test -n "$COMM"; then
4151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4152$as_echo "$COMM" >&6; }
4153else
4154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4155$as_echo "no" >&6; }
4156fi
4157
4158
4159  test -n "$COMM" && break
4160done
4161
4162
4163    if test "x$COMM" = x; then
4164        if test "xcomm" = x; then
4165          PROG_NAME=comm
4166        else
4167          PROG_NAME=comm
4168        fi
4169        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4170$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4171        as_fn_error $? "Cannot continue" "$LINENO" 5
4172    fi
4173
4174
4175
4176    for ac_prog in cp
4177do
4178  # Extract the first word of "$ac_prog", so it can be a program name with args.
4179set dummy $ac_prog; ac_word=$2
4180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4181$as_echo_n "checking for $ac_word... " >&6; }
4182if test "${ac_cv_path_CP+set}" = set; then :
4183  $as_echo_n "(cached) " >&6
4184else
4185  case $CP in
4186  [\\/]* | ?:[\\/]*)
4187  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4188  ;;
4189  *)
4190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4191for as_dir in $PATH
4192do
4193  IFS=$as_save_IFS
4194  test -z "$as_dir" && as_dir=.
4195    for ac_exec_ext in '' $ac_executable_extensions; do
4196  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4197    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4199    break 2
4200  fi
4201done
4202  done
4203IFS=$as_save_IFS
4204
4205  ;;
4206esac
4207fi
4208CP=$ac_cv_path_CP
4209if test -n "$CP"; then
4210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4211$as_echo "$CP" >&6; }
4212else
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4214$as_echo "no" >&6; }
4215fi
4216
4217
4218  test -n "$CP" && break
4219done
4220
4221
4222    if test "x$CP" = x; then
4223        if test "xcp" = x; then
4224          PROG_NAME=cp
4225        else
4226          PROG_NAME=cp
4227        fi
4228        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4229$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4230        as_fn_error $? "Cannot continue" "$LINENO" 5
4231    fi
4232
4233
4234
4235    for ac_prog in cpio
4236do
4237  # Extract the first word of "$ac_prog", so it can be a program name with args.
4238set dummy $ac_prog; ac_word=$2
4239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4240$as_echo_n "checking for $ac_word... " >&6; }
4241if test "${ac_cv_path_CPIO+set}" = set; then :
4242  $as_echo_n "(cached) " >&6
4243else
4244  case $CPIO in
4245  [\\/]* | ?:[\\/]*)
4246  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4247  ;;
4248  *)
4249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4250for as_dir in $PATH
4251do
4252  IFS=$as_save_IFS
4253  test -z "$as_dir" && as_dir=.
4254    for ac_exec_ext in '' $ac_executable_extensions; do
4255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4256    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4258    break 2
4259  fi
4260done
4261  done
4262IFS=$as_save_IFS
4263
4264  ;;
4265esac
4266fi
4267CPIO=$ac_cv_path_CPIO
4268if test -n "$CPIO"; then
4269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4270$as_echo "$CPIO" >&6; }
4271else
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4273$as_echo "no" >&6; }
4274fi
4275
4276
4277  test -n "$CPIO" && break
4278done
4279
4280
4281    if test "x$CPIO" = x; then
4282        if test "xcpio" = x; then
4283          PROG_NAME=cpio
4284        else
4285          PROG_NAME=cpio
4286        fi
4287        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4288$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4289        as_fn_error $? "Cannot continue" "$LINENO" 5
4290    fi
4291
4292
4293
4294    for ac_prog in cut
4295do
4296  # Extract the first word of "$ac_prog", so it can be a program name with args.
4297set dummy $ac_prog; ac_word=$2
4298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4299$as_echo_n "checking for $ac_word... " >&6; }
4300if test "${ac_cv_path_CUT+set}" = set; then :
4301  $as_echo_n "(cached) " >&6
4302else
4303  case $CUT in
4304  [\\/]* | ?:[\\/]*)
4305  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4306  ;;
4307  *)
4308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4309for as_dir in $PATH
4310do
4311  IFS=$as_save_IFS
4312  test -z "$as_dir" && as_dir=.
4313    for ac_exec_ext in '' $ac_executable_extensions; do
4314  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4315    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4317    break 2
4318  fi
4319done
4320  done
4321IFS=$as_save_IFS
4322
4323  ;;
4324esac
4325fi
4326CUT=$ac_cv_path_CUT
4327if test -n "$CUT"; then
4328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4329$as_echo "$CUT" >&6; }
4330else
4331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4332$as_echo "no" >&6; }
4333fi
4334
4335
4336  test -n "$CUT" && break
4337done
4338
4339
4340    if test "x$CUT" = x; then
4341        if test "xcut" = x; then
4342          PROG_NAME=cut
4343        else
4344          PROG_NAME=cut
4345        fi
4346        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4347$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4348        as_fn_error $? "Cannot continue" "$LINENO" 5
4349    fi
4350
4351
4352
4353    for ac_prog in date
4354do
4355  # Extract the first word of "$ac_prog", so it can be a program name with args.
4356set dummy $ac_prog; ac_word=$2
4357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4358$as_echo_n "checking for $ac_word... " >&6; }
4359if test "${ac_cv_path_DATE+set}" = set; then :
4360  $as_echo_n "(cached) " >&6
4361else
4362  case $DATE in
4363  [\\/]* | ?:[\\/]*)
4364  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4365  ;;
4366  *)
4367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4368for as_dir in $PATH
4369do
4370  IFS=$as_save_IFS
4371  test -z "$as_dir" && as_dir=.
4372    for ac_exec_ext in '' $ac_executable_extensions; do
4373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4374    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4376    break 2
4377  fi
4378done
4379  done
4380IFS=$as_save_IFS
4381
4382  ;;
4383esac
4384fi
4385DATE=$ac_cv_path_DATE
4386if test -n "$DATE"; then
4387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4388$as_echo "$DATE" >&6; }
4389else
4390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4391$as_echo "no" >&6; }
4392fi
4393
4394
4395  test -n "$DATE" && break
4396done
4397
4398
4399    if test "x$DATE" = x; then
4400        if test "xdate" = x; then
4401          PROG_NAME=date
4402        else
4403          PROG_NAME=date
4404        fi
4405        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4406$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4407        as_fn_error $? "Cannot continue" "$LINENO" 5
4408    fi
4409
4410
4411
4412    for ac_prog in gdiff diff
4413do
4414  # Extract the first word of "$ac_prog", so it can be a program name with args.
4415set dummy $ac_prog; ac_word=$2
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4417$as_echo_n "checking for $ac_word... " >&6; }
4418if test "${ac_cv_path_DIFF+set}" = set; then :
4419  $as_echo_n "(cached) " >&6
4420else
4421  case $DIFF in
4422  [\\/]* | ?:[\\/]*)
4423  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4424  ;;
4425  *)
4426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4427for as_dir in $PATH
4428do
4429  IFS=$as_save_IFS
4430  test -z "$as_dir" && as_dir=.
4431    for ac_exec_ext in '' $ac_executable_extensions; do
4432  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4433    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4435    break 2
4436  fi
4437done
4438  done
4439IFS=$as_save_IFS
4440
4441  ;;
4442esac
4443fi
4444DIFF=$ac_cv_path_DIFF
4445if test -n "$DIFF"; then
4446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4447$as_echo "$DIFF" >&6; }
4448else
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4450$as_echo "no" >&6; }
4451fi
4452
4453
4454  test -n "$DIFF" && break
4455done
4456
4457
4458    if test "x$DIFF" = x; then
4459        if test "xgdiff diff" = x; then
4460          PROG_NAME=diff
4461        else
4462          PROG_NAME=gdiff diff
4463        fi
4464        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4465$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4466        as_fn_error $? "Cannot continue" "$LINENO" 5
4467    fi
4468
4469
4470
4471    for ac_prog in dirname
4472do
4473  # Extract the first word of "$ac_prog", so it can be a program name with args.
4474set dummy $ac_prog; ac_word=$2
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4476$as_echo_n "checking for $ac_word... " >&6; }
4477if test "${ac_cv_path_DIRNAME+set}" = set; then :
4478  $as_echo_n "(cached) " >&6
4479else
4480  case $DIRNAME in
4481  [\\/]* | ?:[\\/]*)
4482  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4483  ;;
4484  *)
4485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4486for as_dir in $PATH
4487do
4488  IFS=$as_save_IFS
4489  test -z "$as_dir" && as_dir=.
4490    for ac_exec_ext in '' $ac_executable_extensions; do
4491  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4492    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4494    break 2
4495  fi
4496done
4497  done
4498IFS=$as_save_IFS
4499
4500  ;;
4501esac
4502fi
4503DIRNAME=$ac_cv_path_DIRNAME
4504if test -n "$DIRNAME"; then
4505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4506$as_echo "$DIRNAME" >&6; }
4507else
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4509$as_echo "no" >&6; }
4510fi
4511
4512
4513  test -n "$DIRNAME" && break
4514done
4515
4516
4517    if test "x$DIRNAME" = x; then
4518        if test "xdirname" = x; then
4519          PROG_NAME=dirname
4520        else
4521          PROG_NAME=dirname
4522        fi
4523        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4524$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4525        as_fn_error $? "Cannot continue" "$LINENO" 5
4526    fi
4527
4528
4529
4530    for ac_prog in echo
4531do
4532  # Extract the first word of "$ac_prog", so it can be a program name with args.
4533set dummy $ac_prog; ac_word=$2
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4535$as_echo_n "checking for $ac_word... " >&6; }
4536if test "${ac_cv_path_ECHO+set}" = set; then :
4537  $as_echo_n "(cached) " >&6
4538else
4539  case $ECHO in
4540  [\\/]* | ?:[\\/]*)
4541  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4542  ;;
4543  *)
4544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545for as_dir in $PATH
4546do
4547  IFS=$as_save_IFS
4548  test -z "$as_dir" && as_dir=.
4549    for ac_exec_ext in '' $ac_executable_extensions; do
4550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4551    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4553    break 2
4554  fi
4555done
4556  done
4557IFS=$as_save_IFS
4558
4559  ;;
4560esac
4561fi
4562ECHO=$ac_cv_path_ECHO
4563if test -n "$ECHO"; then
4564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4565$as_echo "$ECHO" >&6; }
4566else
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4568$as_echo "no" >&6; }
4569fi
4570
4571
4572  test -n "$ECHO" && break
4573done
4574
4575
4576    if test "x$ECHO" = x; then
4577        if test "xecho" = x; then
4578          PROG_NAME=echo
4579        else
4580          PROG_NAME=echo
4581        fi
4582        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4583$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4584        as_fn_error $? "Cannot continue" "$LINENO" 5
4585    fi
4586
4587
4588
4589    for ac_prog in expr
4590do
4591  # Extract the first word of "$ac_prog", so it can be a program name with args.
4592set dummy $ac_prog; ac_word=$2
4593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4594$as_echo_n "checking for $ac_word... " >&6; }
4595if test "${ac_cv_path_EXPR+set}" = set; then :
4596  $as_echo_n "(cached) " >&6
4597else
4598  case $EXPR in
4599  [\\/]* | ?:[\\/]*)
4600  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4601  ;;
4602  *)
4603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604for as_dir in $PATH
4605do
4606  IFS=$as_save_IFS
4607  test -z "$as_dir" && as_dir=.
4608    for ac_exec_ext in '' $ac_executable_extensions; do
4609  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4610    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4612    break 2
4613  fi
4614done
4615  done
4616IFS=$as_save_IFS
4617
4618  ;;
4619esac
4620fi
4621EXPR=$ac_cv_path_EXPR
4622if test -n "$EXPR"; then
4623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4624$as_echo "$EXPR" >&6; }
4625else
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627$as_echo "no" >&6; }
4628fi
4629
4630
4631  test -n "$EXPR" && break
4632done
4633
4634
4635    if test "x$EXPR" = x; then
4636        if test "xexpr" = x; then
4637          PROG_NAME=expr
4638        else
4639          PROG_NAME=expr
4640        fi
4641        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4642$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4643        as_fn_error $? "Cannot continue" "$LINENO" 5
4644    fi
4645
4646
4647
4648    for ac_prog in file
4649do
4650  # Extract the first word of "$ac_prog", so it can be a program name with args.
4651set dummy $ac_prog; ac_word=$2
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653$as_echo_n "checking for $ac_word... " >&6; }
4654if test "${ac_cv_path_FILE+set}" = set; then :
4655  $as_echo_n "(cached) " >&6
4656else
4657  case $FILE in
4658  [\\/]* | ?:[\\/]*)
4659  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4660  ;;
4661  *)
4662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4663for as_dir in $PATH
4664do
4665  IFS=$as_save_IFS
4666  test -z "$as_dir" && as_dir=.
4667    for ac_exec_ext in '' $ac_executable_extensions; do
4668  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4669    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4671    break 2
4672  fi
4673done
4674  done
4675IFS=$as_save_IFS
4676
4677  ;;
4678esac
4679fi
4680FILE=$ac_cv_path_FILE
4681if test -n "$FILE"; then
4682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4683$as_echo "$FILE" >&6; }
4684else
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686$as_echo "no" >&6; }
4687fi
4688
4689
4690  test -n "$FILE" && break
4691done
4692
4693
4694    if test "x$FILE" = x; then
4695        if test "xfile" = x; then
4696          PROG_NAME=file
4697        else
4698          PROG_NAME=file
4699        fi
4700        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4701$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4702        as_fn_error $? "Cannot continue" "$LINENO" 5
4703    fi
4704
4705
4706
4707    for ac_prog in find
4708do
4709  # Extract the first word of "$ac_prog", so it can be a program name with args.
4710set dummy $ac_prog; ac_word=$2
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
4713if test "${ac_cv_path_FIND+set}" = set; then :
4714  $as_echo_n "(cached) " >&6
4715else
4716  case $FIND in
4717  [\\/]* | ?:[\\/]*)
4718  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4719  ;;
4720  *)
4721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4722for as_dir in $PATH
4723do
4724  IFS=$as_save_IFS
4725  test -z "$as_dir" && as_dir=.
4726    for ac_exec_ext in '' $ac_executable_extensions; do
4727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4728    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4730    break 2
4731  fi
4732done
4733  done
4734IFS=$as_save_IFS
4735
4736  ;;
4737esac
4738fi
4739FIND=$ac_cv_path_FIND
4740if test -n "$FIND"; then
4741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4742$as_echo "$FIND" >&6; }
4743else
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745$as_echo "no" >&6; }
4746fi
4747
4748
4749  test -n "$FIND" && break
4750done
4751
4752
4753    if test "x$FIND" = x; then
4754        if test "xfind" = x; then
4755          PROG_NAME=find
4756        else
4757          PROG_NAME=find
4758        fi
4759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4760$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4761        as_fn_error $? "Cannot continue" "$LINENO" 5
4762    fi
4763
4764
4765
4766    for ac_prog in head
4767do
4768  # Extract the first word of "$ac_prog", so it can be a program name with args.
4769set dummy $ac_prog; ac_word=$2
4770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771$as_echo_n "checking for $ac_word... " >&6; }
4772if test "${ac_cv_path_HEAD+set}" = set; then :
4773  $as_echo_n "(cached) " >&6
4774else
4775  case $HEAD in
4776  [\\/]* | ?:[\\/]*)
4777  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4778  ;;
4779  *)
4780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4781for as_dir in $PATH
4782do
4783  IFS=$as_save_IFS
4784  test -z "$as_dir" && as_dir=.
4785    for ac_exec_ext in '' $ac_executable_extensions; do
4786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4787    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4789    break 2
4790  fi
4791done
4792  done
4793IFS=$as_save_IFS
4794
4795  ;;
4796esac
4797fi
4798HEAD=$ac_cv_path_HEAD
4799if test -n "$HEAD"; then
4800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4801$as_echo "$HEAD" >&6; }
4802else
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804$as_echo "no" >&6; }
4805fi
4806
4807
4808  test -n "$HEAD" && break
4809done
4810
4811
4812    if test "x$HEAD" = x; then
4813        if test "xhead" = x; then
4814          PROG_NAME=head
4815        else
4816          PROG_NAME=head
4817        fi
4818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4820        as_fn_error $? "Cannot continue" "$LINENO" 5
4821    fi
4822
4823
4824
4825    for ac_prog in ln
4826do
4827  # Extract the first word of "$ac_prog", so it can be a program name with args.
4828set dummy $ac_prog; ac_word=$2
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830$as_echo_n "checking for $ac_word... " >&6; }
4831if test "${ac_cv_path_LN+set}" = set; then :
4832  $as_echo_n "(cached) " >&6
4833else
4834  case $LN in
4835  [\\/]* | ?:[\\/]*)
4836  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4837  ;;
4838  *)
4839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840for as_dir in $PATH
4841do
4842  IFS=$as_save_IFS
4843  test -z "$as_dir" && as_dir=.
4844    for ac_exec_ext in '' $ac_executable_extensions; do
4845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4846    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4848    break 2
4849  fi
4850done
4851  done
4852IFS=$as_save_IFS
4853
4854  ;;
4855esac
4856fi
4857LN=$ac_cv_path_LN
4858if test -n "$LN"; then
4859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4860$as_echo "$LN" >&6; }
4861else
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4863$as_echo "no" >&6; }
4864fi
4865
4866
4867  test -n "$LN" && break
4868done
4869
4870
4871    if test "x$LN" = x; then
4872        if test "xln" = x; then
4873          PROG_NAME=ln
4874        else
4875          PROG_NAME=ln
4876        fi
4877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4879        as_fn_error $? "Cannot continue" "$LINENO" 5
4880    fi
4881
4882
4883
4884    for ac_prog in ls
4885do
4886  # Extract the first word of "$ac_prog", so it can be a program name with args.
4887set dummy $ac_prog; ac_word=$2
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4889$as_echo_n "checking for $ac_word... " >&6; }
4890if test "${ac_cv_path_LS+set}" = set; then :
4891  $as_echo_n "(cached) " >&6
4892else
4893  case $LS in
4894  [\\/]* | ?:[\\/]*)
4895  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4896  ;;
4897  *)
4898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899for as_dir in $PATH
4900do
4901  IFS=$as_save_IFS
4902  test -z "$as_dir" && as_dir=.
4903    for ac_exec_ext in '' $ac_executable_extensions; do
4904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4905    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4907    break 2
4908  fi
4909done
4910  done
4911IFS=$as_save_IFS
4912
4913  ;;
4914esac
4915fi
4916LS=$ac_cv_path_LS
4917if test -n "$LS"; then
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4919$as_echo "$LS" >&6; }
4920else
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922$as_echo "no" >&6; }
4923fi
4924
4925
4926  test -n "$LS" && break
4927done
4928
4929
4930    if test "x$LS" = x; then
4931        if test "xls" = x; then
4932          PROG_NAME=ls
4933        else
4934          PROG_NAME=ls
4935        fi
4936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4938        as_fn_error $? "Cannot continue" "$LINENO" 5
4939    fi
4940
4941
4942
4943    for ac_prog in mkdir
4944do
4945  # Extract the first word of "$ac_prog", so it can be a program name with args.
4946set dummy $ac_prog; ac_word=$2
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4948$as_echo_n "checking for $ac_word... " >&6; }
4949if test "${ac_cv_path_MKDIR+set}" = set; then :
4950  $as_echo_n "(cached) " >&6
4951else
4952  case $MKDIR in
4953  [\\/]* | ?:[\\/]*)
4954  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4955  ;;
4956  *)
4957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in $PATH
4959do
4960  IFS=$as_save_IFS
4961  test -z "$as_dir" && as_dir=.
4962    for ac_exec_ext in '' $ac_executable_extensions; do
4963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4964    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966    break 2
4967  fi
4968done
4969  done
4970IFS=$as_save_IFS
4971
4972  ;;
4973esac
4974fi
4975MKDIR=$ac_cv_path_MKDIR
4976if test -n "$MKDIR"; then
4977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4978$as_echo "$MKDIR" >&6; }
4979else
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981$as_echo "no" >&6; }
4982fi
4983
4984
4985  test -n "$MKDIR" && break
4986done
4987
4988
4989    if test "x$MKDIR" = x; then
4990        if test "xmkdir" = x; then
4991          PROG_NAME=mkdir
4992        else
4993          PROG_NAME=mkdir
4994        fi
4995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4997        as_fn_error $? "Cannot continue" "$LINENO" 5
4998    fi
4999
5000
5001
5002    for ac_prog in mktemp
5003do
5004  # Extract the first word of "$ac_prog", so it can be a program name with args.
5005set dummy $ac_prog; ac_word=$2
5006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007$as_echo_n "checking for $ac_word... " >&6; }
5008if test "${ac_cv_path_MKTEMP+set}" = set; then :
5009  $as_echo_n "(cached) " >&6
5010else
5011  case $MKTEMP in
5012  [\\/]* | ?:[\\/]*)
5013  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5014  ;;
5015  *)
5016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017for as_dir in $PATH
5018do
5019  IFS=$as_save_IFS
5020  test -z "$as_dir" && as_dir=.
5021    for ac_exec_ext in '' $ac_executable_extensions; do
5022  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5023    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5025    break 2
5026  fi
5027done
5028  done
5029IFS=$as_save_IFS
5030
5031  ;;
5032esac
5033fi
5034MKTEMP=$ac_cv_path_MKTEMP
5035if test -n "$MKTEMP"; then
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5037$as_echo "$MKTEMP" >&6; }
5038else
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040$as_echo "no" >&6; }
5041fi
5042
5043
5044  test -n "$MKTEMP" && break
5045done
5046
5047
5048    if test "x$MKTEMP" = x; then
5049        if test "xmktemp" = x; then
5050          PROG_NAME=mktemp
5051        else
5052          PROG_NAME=mktemp
5053        fi
5054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5055$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5056        as_fn_error $? "Cannot continue" "$LINENO" 5
5057    fi
5058
5059
5060
5061    for ac_prog in mv
5062do
5063  # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if test "${ac_cv_path_MV+set}" = set; then :
5068  $as_echo_n "(cached) " >&6
5069else
5070  case $MV in
5071  [\\/]* | ?:[\\/]*)
5072  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5073  ;;
5074  *)
5075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078  IFS=$as_save_IFS
5079  test -z "$as_dir" && as_dir=.
5080    for ac_exec_ext in '' $ac_executable_extensions; do
5081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5082    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5084    break 2
5085  fi
5086done
5087  done
5088IFS=$as_save_IFS
5089
5090  ;;
5091esac
5092fi
5093MV=$ac_cv_path_MV
5094if test -n "$MV"; then
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5096$as_echo "$MV" >&6; }
5097else
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
5100fi
5101
5102
5103  test -n "$MV" && break
5104done
5105
5106
5107    if test "x$MV" = x; then
5108        if test "xmv" = x; then
5109          PROG_NAME=mv
5110        else
5111          PROG_NAME=mv
5112        fi
5113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5115        as_fn_error $? "Cannot continue" "$LINENO" 5
5116    fi
5117
5118
5119
5120    for ac_prog in printf
5121do
5122  # Extract the first word of "$ac_prog", so it can be a program name with args.
5123set dummy $ac_prog; ac_word=$2
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if test "${ac_cv_path_PRINTF+set}" = set; then :
5127  $as_echo_n "(cached) " >&6
5128else
5129  case $PRINTF in
5130  [\\/]* | ?:[\\/]*)
5131  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5132  ;;
5133  *)
5134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137  IFS=$as_save_IFS
5138  test -z "$as_dir" && as_dir=.
5139    for ac_exec_ext in '' $ac_executable_extensions; do
5140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5141    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5143    break 2
5144  fi
5145done
5146  done
5147IFS=$as_save_IFS
5148
5149  ;;
5150esac
5151fi
5152PRINTF=$ac_cv_path_PRINTF
5153if test -n "$PRINTF"; then
5154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5155$as_echo "$PRINTF" >&6; }
5156else
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161
5162  test -n "$PRINTF" && break
5163done
5164
5165
5166    if test "x$PRINTF" = x; then
5167        if test "xprintf" = x; then
5168          PROG_NAME=printf
5169        else
5170          PROG_NAME=printf
5171        fi
5172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5174        as_fn_error $? "Cannot continue" "$LINENO" 5
5175    fi
5176
5177
5178
5179    for ac_prog in rm
5180do
5181  # Extract the first word of "$ac_prog", so it can be a program name with args.
5182set dummy $ac_prog; ac_word=$2
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5184$as_echo_n "checking for $ac_word... " >&6; }
5185if test "${ac_cv_path_RM+set}" = set; then :
5186  $as_echo_n "(cached) " >&6
5187else
5188  case $RM in
5189  [\\/]* | ?:[\\/]*)
5190  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5191  ;;
5192  *)
5193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5194for as_dir in $PATH
5195do
5196  IFS=$as_save_IFS
5197  test -z "$as_dir" && as_dir=.
5198    for ac_exec_ext in '' $ac_executable_extensions; do
5199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5200    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5202    break 2
5203  fi
5204done
5205  done
5206IFS=$as_save_IFS
5207
5208  ;;
5209esac
5210fi
5211RM=$ac_cv_path_RM
5212if test -n "$RM"; then
5213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5214$as_echo "$RM" >&6; }
5215else
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5217$as_echo "no" >&6; }
5218fi
5219
5220
5221  test -n "$RM" && break
5222done
5223
5224
5225    if test "x$RM" = x; then
5226        if test "xrm" = x; then
5227          PROG_NAME=rm
5228        else
5229          PROG_NAME=rm
5230        fi
5231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5233        as_fn_error $? "Cannot continue" "$LINENO" 5
5234    fi
5235
5236
5237
5238    for ac_prog in sh
5239do
5240  # Extract the first word of "$ac_prog", so it can be a program name with args.
5241set dummy $ac_prog; ac_word=$2
5242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5243$as_echo_n "checking for $ac_word... " >&6; }
5244if test "${ac_cv_path_SH+set}" = set; then :
5245  $as_echo_n "(cached) " >&6
5246else
5247  case $SH in
5248  [\\/]* | ?:[\\/]*)
5249  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5250  ;;
5251  *)
5252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5253for as_dir in $PATH
5254do
5255  IFS=$as_save_IFS
5256  test -z "$as_dir" && as_dir=.
5257    for ac_exec_ext in '' $ac_executable_extensions; do
5258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5259    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5261    break 2
5262  fi
5263done
5264  done
5265IFS=$as_save_IFS
5266
5267  ;;
5268esac
5269fi
5270SH=$ac_cv_path_SH
5271if test -n "$SH"; then
5272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5273$as_echo "$SH" >&6; }
5274else
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5276$as_echo "no" >&6; }
5277fi
5278
5279
5280  test -n "$SH" && break
5281done
5282
5283
5284    if test "x$SH" = x; then
5285        if test "xsh" = x; then
5286          PROG_NAME=sh
5287        else
5288          PROG_NAME=sh
5289        fi
5290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5292        as_fn_error $? "Cannot continue" "$LINENO" 5
5293    fi
5294
5295
5296
5297    for ac_prog in sort
5298do
5299  # Extract the first word of "$ac_prog", so it can be a program name with args.
5300set dummy $ac_prog; ac_word=$2
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5302$as_echo_n "checking for $ac_word... " >&6; }
5303if test "${ac_cv_path_SORT+set}" = set; then :
5304  $as_echo_n "(cached) " >&6
5305else
5306  case $SORT in
5307  [\\/]* | ?:[\\/]*)
5308  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5309  ;;
5310  *)
5311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5312for as_dir in $PATH
5313do
5314  IFS=$as_save_IFS
5315  test -z "$as_dir" && as_dir=.
5316    for ac_exec_ext in '' $ac_executable_extensions; do
5317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5318    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5320    break 2
5321  fi
5322done
5323  done
5324IFS=$as_save_IFS
5325
5326  ;;
5327esac
5328fi
5329SORT=$ac_cv_path_SORT
5330if test -n "$SORT"; then
5331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5332$as_echo "$SORT" >&6; }
5333else
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337
5338
5339  test -n "$SORT" && break
5340done
5341
5342
5343    if test "x$SORT" = x; then
5344        if test "xsort" = x; then
5345          PROG_NAME=sort
5346        else
5347          PROG_NAME=sort
5348        fi
5349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5351        as_fn_error $? "Cannot continue" "$LINENO" 5
5352    fi
5353
5354
5355
5356    for ac_prog in tail
5357do
5358  # Extract the first word of "$ac_prog", so it can be a program name with args.
5359set dummy $ac_prog; ac_word=$2
5360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5361$as_echo_n "checking for $ac_word... " >&6; }
5362if test "${ac_cv_path_TAIL+set}" = set; then :
5363  $as_echo_n "(cached) " >&6
5364else
5365  case $TAIL in
5366  [\\/]* | ?:[\\/]*)
5367  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5368  ;;
5369  *)
5370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5371for as_dir in $PATH
5372do
5373  IFS=$as_save_IFS
5374  test -z "$as_dir" && as_dir=.
5375    for ac_exec_ext in '' $ac_executable_extensions; do
5376  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5377    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5379    break 2
5380  fi
5381done
5382  done
5383IFS=$as_save_IFS
5384
5385  ;;
5386esac
5387fi
5388TAIL=$ac_cv_path_TAIL
5389if test -n "$TAIL"; then
5390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5391$as_echo "$TAIL" >&6; }
5392else
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5394$as_echo "no" >&6; }
5395fi
5396
5397
5398  test -n "$TAIL" && break
5399done
5400
5401
5402    if test "x$TAIL" = x; then
5403        if test "xtail" = x; then
5404          PROG_NAME=tail
5405        else
5406          PROG_NAME=tail
5407        fi
5408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5409$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5410        as_fn_error $? "Cannot continue" "$LINENO" 5
5411    fi
5412
5413
5414
5415    for ac_prog in tar
5416do
5417  # Extract the first word of "$ac_prog", so it can be a program name with args.
5418set dummy $ac_prog; ac_word=$2
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5420$as_echo_n "checking for $ac_word... " >&6; }
5421if test "${ac_cv_path_TAR+set}" = set; then :
5422  $as_echo_n "(cached) " >&6
5423else
5424  case $TAR in
5425  [\\/]* | ?:[\\/]*)
5426  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5427  ;;
5428  *)
5429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5430for as_dir in $PATH
5431do
5432  IFS=$as_save_IFS
5433  test -z "$as_dir" && as_dir=.
5434    for ac_exec_ext in '' $ac_executable_extensions; do
5435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5436    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5438    break 2
5439  fi
5440done
5441  done
5442IFS=$as_save_IFS
5443
5444  ;;
5445esac
5446fi
5447TAR=$ac_cv_path_TAR
5448if test -n "$TAR"; then
5449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5450$as_echo "$TAR" >&6; }
5451else
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5453$as_echo "no" >&6; }
5454fi
5455
5456
5457  test -n "$TAR" && break
5458done
5459
5460
5461    if test "x$TAR" = x; then
5462        if test "xtar" = x; then
5463          PROG_NAME=tar
5464        else
5465          PROG_NAME=tar
5466        fi
5467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5468$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5469        as_fn_error $? "Cannot continue" "$LINENO" 5
5470    fi
5471
5472
5473
5474    for ac_prog in tee
5475do
5476  # Extract the first word of "$ac_prog", so it can be a program name with args.
5477set dummy $ac_prog; ac_word=$2
5478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5479$as_echo_n "checking for $ac_word... " >&6; }
5480if test "${ac_cv_path_TEE+set}" = set; then :
5481  $as_echo_n "(cached) " >&6
5482else
5483  case $TEE in
5484  [\\/]* | ?:[\\/]*)
5485  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5486  ;;
5487  *)
5488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5489for as_dir in $PATH
5490do
5491  IFS=$as_save_IFS
5492  test -z "$as_dir" && as_dir=.
5493    for ac_exec_ext in '' $ac_executable_extensions; do
5494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5495    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5497    break 2
5498  fi
5499done
5500  done
5501IFS=$as_save_IFS
5502
5503  ;;
5504esac
5505fi
5506TEE=$ac_cv_path_TEE
5507if test -n "$TEE"; then
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5509$as_echo "$TEE" >&6; }
5510else
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5512$as_echo "no" >&6; }
5513fi
5514
5515
5516  test -n "$TEE" && break
5517done
5518
5519
5520    if test "x$TEE" = x; then
5521        if test "xtee" = x; then
5522          PROG_NAME=tee
5523        else
5524          PROG_NAME=tee
5525        fi
5526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5528        as_fn_error $? "Cannot continue" "$LINENO" 5
5529    fi
5530
5531
5532
5533    for ac_prog in touch
5534do
5535  # Extract the first word of "$ac_prog", so it can be a program name with args.
5536set dummy $ac_prog; ac_word=$2
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538$as_echo_n "checking for $ac_word... " >&6; }
5539if test "${ac_cv_path_TOUCH+set}" = set; then :
5540  $as_echo_n "(cached) " >&6
5541else
5542  case $TOUCH in
5543  [\\/]* | ?:[\\/]*)
5544  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5545  ;;
5546  *)
5547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5548for as_dir in $PATH
5549do
5550  IFS=$as_save_IFS
5551  test -z "$as_dir" && as_dir=.
5552    for ac_exec_ext in '' $ac_executable_extensions; do
5553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5554    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5556    break 2
5557  fi
5558done
5559  done
5560IFS=$as_save_IFS
5561
5562  ;;
5563esac
5564fi
5565TOUCH=$ac_cv_path_TOUCH
5566if test -n "$TOUCH"; then
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5568$as_echo "$TOUCH" >&6; }
5569else
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571$as_echo "no" >&6; }
5572fi
5573
5574
5575  test -n "$TOUCH" && break
5576done
5577
5578
5579    if test "x$TOUCH" = x; then
5580        if test "xtouch" = x; then
5581          PROG_NAME=touch
5582        else
5583          PROG_NAME=touch
5584        fi
5585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5587        as_fn_error $? "Cannot continue" "$LINENO" 5
5588    fi
5589
5590
5591
5592    for ac_prog in tr
5593do
5594  # Extract the first word of "$ac_prog", so it can be a program name with args.
5595set dummy $ac_prog; ac_word=$2
5596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5597$as_echo_n "checking for $ac_word... " >&6; }
5598if test "${ac_cv_path_TR+set}" = set; then :
5599  $as_echo_n "(cached) " >&6
5600else
5601  case $TR in
5602  [\\/]* | ?:[\\/]*)
5603  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5604  ;;
5605  *)
5606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5607for as_dir in $PATH
5608do
5609  IFS=$as_save_IFS
5610  test -z "$as_dir" && as_dir=.
5611    for ac_exec_ext in '' $ac_executable_extensions; do
5612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5613    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5615    break 2
5616  fi
5617done
5618  done
5619IFS=$as_save_IFS
5620
5621  ;;
5622esac
5623fi
5624TR=$ac_cv_path_TR
5625if test -n "$TR"; then
5626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5627$as_echo "$TR" >&6; }
5628else
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5630$as_echo "no" >&6; }
5631fi
5632
5633
5634  test -n "$TR" && break
5635done
5636
5637
5638    if test "x$TR" = x; then
5639        if test "xtr" = x; then
5640          PROG_NAME=tr
5641        else
5642          PROG_NAME=tr
5643        fi
5644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5645$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5646        as_fn_error $? "Cannot continue" "$LINENO" 5
5647    fi
5648
5649
5650
5651    for ac_prog in uname
5652do
5653  # Extract the first word of "$ac_prog", so it can be a program name with args.
5654set dummy $ac_prog; ac_word=$2
5655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5656$as_echo_n "checking for $ac_word... " >&6; }
5657if test "${ac_cv_path_UNAME+set}" = set; then :
5658  $as_echo_n "(cached) " >&6
5659else
5660  case $UNAME in
5661  [\\/]* | ?:[\\/]*)
5662  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5663  ;;
5664  *)
5665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5666for as_dir in $PATH
5667do
5668  IFS=$as_save_IFS
5669  test -z "$as_dir" && as_dir=.
5670    for ac_exec_ext in '' $ac_executable_extensions; do
5671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5672    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5674    break 2
5675  fi
5676done
5677  done
5678IFS=$as_save_IFS
5679
5680  ;;
5681esac
5682fi
5683UNAME=$ac_cv_path_UNAME
5684if test -n "$UNAME"; then
5685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5686$as_echo "$UNAME" >&6; }
5687else
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689$as_echo "no" >&6; }
5690fi
5691
5692
5693  test -n "$UNAME" && break
5694done
5695
5696
5697    if test "x$UNAME" = x; then
5698        if test "xuname" = x; then
5699          PROG_NAME=uname
5700        else
5701          PROG_NAME=uname
5702        fi
5703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5705        as_fn_error $? "Cannot continue" "$LINENO" 5
5706    fi
5707
5708
5709
5710    for ac_prog in uniq
5711do
5712  # Extract the first word of "$ac_prog", so it can be a program name with args.
5713set dummy $ac_prog; ac_word=$2
5714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5715$as_echo_n "checking for $ac_word... " >&6; }
5716if test "${ac_cv_path_UNIQ+set}" = set; then :
5717  $as_echo_n "(cached) " >&6
5718else
5719  case $UNIQ in
5720  [\\/]* | ?:[\\/]*)
5721  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5722  ;;
5723  *)
5724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5725for as_dir in $PATH
5726do
5727  IFS=$as_save_IFS
5728  test -z "$as_dir" && as_dir=.
5729    for ac_exec_ext in '' $ac_executable_extensions; do
5730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5731    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5733    break 2
5734  fi
5735done
5736  done
5737IFS=$as_save_IFS
5738
5739  ;;
5740esac
5741fi
5742UNIQ=$ac_cv_path_UNIQ
5743if test -n "$UNIQ"; then
5744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5745$as_echo "$UNIQ" >&6; }
5746else
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5748$as_echo "no" >&6; }
5749fi
5750
5751
5752  test -n "$UNIQ" && break
5753done
5754
5755
5756    if test "x$UNIQ" = x; then
5757        if test "xuniq" = x; then
5758          PROG_NAME=uniq
5759        else
5760          PROG_NAME=uniq
5761        fi
5762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5763$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5764        as_fn_error $? "Cannot continue" "$LINENO" 5
5765    fi
5766
5767
5768
5769    for ac_prog in wc
5770do
5771  # Extract the first word of "$ac_prog", so it can be a program name with args.
5772set dummy $ac_prog; ac_word=$2
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774$as_echo_n "checking for $ac_word... " >&6; }
5775if test "${ac_cv_path_WC+set}" = set; then :
5776  $as_echo_n "(cached) " >&6
5777else
5778  case $WC in
5779  [\\/]* | ?:[\\/]*)
5780  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5781  ;;
5782  *)
5783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5784for as_dir in $PATH
5785do
5786  IFS=$as_save_IFS
5787  test -z "$as_dir" && as_dir=.
5788    for ac_exec_ext in '' $ac_executable_extensions; do
5789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5790    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5792    break 2
5793  fi
5794done
5795  done
5796IFS=$as_save_IFS
5797
5798  ;;
5799esac
5800fi
5801WC=$ac_cv_path_WC
5802if test -n "$WC"; then
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5804$as_echo "$WC" >&6; }
5805else
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807$as_echo "no" >&6; }
5808fi
5809
5810
5811  test -n "$WC" && break
5812done
5813
5814
5815    if test "x$WC" = x; then
5816        if test "xwc" = x; then
5817          PROG_NAME=wc
5818        else
5819          PROG_NAME=wc
5820        fi
5821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5822$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5823        as_fn_error $? "Cannot continue" "$LINENO" 5
5824    fi
5825
5826
5827
5828    for ac_prog in which
5829do
5830  # Extract the first word of "$ac_prog", so it can be a program name with args.
5831set dummy $ac_prog; ac_word=$2
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5833$as_echo_n "checking for $ac_word... " >&6; }
5834if test "${ac_cv_path_WHICH+set}" = set; then :
5835  $as_echo_n "(cached) " >&6
5836else
5837  case $WHICH in
5838  [\\/]* | ?:[\\/]*)
5839  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5840  ;;
5841  *)
5842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843for as_dir in $PATH
5844do
5845  IFS=$as_save_IFS
5846  test -z "$as_dir" && as_dir=.
5847    for ac_exec_ext in '' $ac_executable_extensions; do
5848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5849    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5851    break 2
5852  fi
5853done
5854  done
5855IFS=$as_save_IFS
5856
5857  ;;
5858esac
5859fi
5860WHICH=$ac_cv_path_WHICH
5861if test -n "$WHICH"; then
5862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5863$as_echo "$WHICH" >&6; }
5864else
5865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5866$as_echo "no" >&6; }
5867fi
5868
5869
5870  test -n "$WHICH" && break
5871done
5872
5873
5874    if test "x$WHICH" = x; then
5875        if test "xwhich" = x; then
5876          PROG_NAME=which
5877        else
5878          PROG_NAME=which
5879        fi
5880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5882        as_fn_error $? "Cannot continue" "$LINENO" 5
5883    fi
5884
5885
5886
5887    for ac_prog in xargs
5888do
5889  # Extract the first word of "$ac_prog", so it can be a program name with args.
5890set dummy $ac_prog; ac_word=$2
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5892$as_echo_n "checking for $ac_word... " >&6; }
5893if test "${ac_cv_path_XARGS+set}" = set; then :
5894  $as_echo_n "(cached) " >&6
5895else
5896  case $XARGS in
5897  [\\/]* | ?:[\\/]*)
5898  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5899  ;;
5900  *)
5901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5902for as_dir in $PATH
5903do
5904  IFS=$as_save_IFS
5905  test -z "$as_dir" && as_dir=.
5906    for ac_exec_ext in '' $ac_executable_extensions; do
5907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5908    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5910    break 2
5911  fi
5912done
5913  done
5914IFS=$as_save_IFS
5915
5916  ;;
5917esac
5918fi
5919XARGS=$ac_cv_path_XARGS
5920if test -n "$XARGS"; then
5921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5922$as_echo "$XARGS" >&6; }
5923else
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
5926fi
5927
5928
5929  test -n "$XARGS" && break
5930done
5931
5932
5933    if test "x$XARGS" = x; then
5934        if test "xxargs" = x; then
5935          PROG_NAME=xargs
5936        else
5937          PROG_NAME=xargs
5938        fi
5939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5941        as_fn_error $? "Cannot continue" "$LINENO" 5
5942    fi
5943
5944
5945
5946# Then required tools that require some special treatment.
5947for ac_prog in gawk mawk nawk awk
5948do
5949  # Extract the first word of "$ac_prog", so it can be a program name with args.
5950set dummy $ac_prog; ac_word=$2
5951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5952$as_echo_n "checking for $ac_word... " >&6; }
5953if test "${ac_cv_prog_AWK+set}" = set; then :
5954  $as_echo_n "(cached) " >&6
5955else
5956  if test -n "$AWK"; then
5957  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5958else
5959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5960for as_dir in $PATH
5961do
5962  IFS=$as_save_IFS
5963  test -z "$as_dir" && as_dir=.
5964    for ac_exec_ext in '' $ac_executable_extensions; do
5965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5966    ac_cv_prog_AWK="$ac_prog"
5967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5968    break 2
5969  fi
5970done
5971  done
5972IFS=$as_save_IFS
5973
5974fi
5975fi
5976AWK=$ac_cv_prog_AWK
5977if test -n "$AWK"; then
5978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5979$as_echo "$AWK" >&6; }
5980else
5981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982$as_echo "no" >&6; }
5983fi
5984
5985
5986  test -n "$AWK" && break
5987done
5988
5989
5990    if test "x$AWK" = x; then
5991        if test "x" = x; then
5992          PROG_NAME=awk
5993        else
5994          PROG_NAME=
5995        fi
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5997$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5998        as_fn_error $? "Cannot continue" "$LINENO" 5
5999    fi
6000
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6002$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6003if test "${ac_cv_path_GREP+set}" = set; then :
6004  $as_echo_n "(cached) " >&6
6005else
6006  if test -z "$GREP"; then
6007  ac_path_GREP_found=false
6008  # Loop through the user's path and test for each of PROGNAME-LIST
6009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6010for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6011do
6012  IFS=$as_save_IFS
6013  test -z "$as_dir" && as_dir=.
6014    for ac_prog in grep ggrep; do
6015    for ac_exec_ext in '' $ac_executable_extensions; do
6016      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6017      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6018# Check for GNU ac_path_GREP and select it if it is found.
6019  # Check for GNU $ac_path_GREP
6020case `"$ac_path_GREP" --version 2>&1` in
6021*GNU*)
6022  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6023*)
6024  ac_count=0
6025  $as_echo_n 0123456789 >"conftest.in"
6026  while :
6027  do
6028    cat "conftest.in" "conftest.in" >"conftest.tmp"
6029    mv "conftest.tmp" "conftest.in"
6030    cp "conftest.in" "conftest.nl"
6031    $as_echo 'GREP' >> "conftest.nl"
6032    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6033    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6034    as_fn_arith $ac_count + 1 && ac_count=$as_val
6035    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6036      # Best one so far, save it but keep looking for a better one
6037      ac_cv_path_GREP="$ac_path_GREP"
6038      ac_path_GREP_max=$ac_count
6039    fi
6040    # 10*(2^10) chars as input seems more than enough
6041    test $ac_count -gt 10 && break
6042  done
6043  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6044esac
6045
6046      $ac_path_GREP_found && break 3
6047    done
6048  done
6049  done
6050IFS=$as_save_IFS
6051  if test -z "$ac_cv_path_GREP"; then
6052    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6053  fi
6054else
6055  ac_cv_path_GREP=$GREP
6056fi
6057
6058fi
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6060$as_echo "$ac_cv_path_GREP" >&6; }
6061 GREP="$ac_cv_path_GREP"
6062
6063
6064
6065    if test "x$GREP" = x; then
6066        if test "x" = x; then
6067          PROG_NAME=grep
6068        else
6069          PROG_NAME=
6070        fi
6071        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6072$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6073        as_fn_error $? "Cannot continue" "$LINENO" 5
6074    fi
6075
6076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6077$as_echo_n "checking for egrep... " >&6; }
6078if test "${ac_cv_path_EGREP+set}" = set; then :
6079  $as_echo_n "(cached) " >&6
6080else
6081  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6082   then ac_cv_path_EGREP="$GREP -E"
6083   else
6084     if test -z "$EGREP"; then
6085  ac_path_EGREP_found=false
6086  # Loop through the user's path and test for each of PROGNAME-LIST
6087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6088for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6089do
6090  IFS=$as_save_IFS
6091  test -z "$as_dir" && as_dir=.
6092    for ac_prog in egrep; do
6093    for ac_exec_ext in '' $ac_executable_extensions; do
6094      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6095      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6096# Check for GNU ac_path_EGREP and select it if it is found.
6097  # Check for GNU $ac_path_EGREP
6098case `"$ac_path_EGREP" --version 2>&1` in
6099*GNU*)
6100  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6101*)
6102  ac_count=0
6103  $as_echo_n 0123456789 >"conftest.in"
6104  while :
6105  do
6106    cat "conftest.in" "conftest.in" >"conftest.tmp"
6107    mv "conftest.tmp" "conftest.in"
6108    cp "conftest.in" "conftest.nl"
6109    $as_echo 'EGREP' >> "conftest.nl"
6110    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6111    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6112    as_fn_arith $ac_count + 1 && ac_count=$as_val
6113    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6114      # Best one so far, save it but keep looking for a better one
6115      ac_cv_path_EGREP="$ac_path_EGREP"
6116      ac_path_EGREP_max=$ac_count
6117    fi
6118    # 10*(2^10) chars as input seems more than enough
6119    test $ac_count -gt 10 && break
6120  done
6121  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6122esac
6123
6124      $ac_path_EGREP_found && break 3
6125    done
6126  done
6127  done
6128IFS=$as_save_IFS
6129  if test -z "$ac_cv_path_EGREP"; then
6130    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6131  fi
6132else
6133  ac_cv_path_EGREP=$EGREP
6134fi
6135
6136   fi
6137fi
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6139$as_echo "$ac_cv_path_EGREP" >&6; }
6140 EGREP="$ac_cv_path_EGREP"
6141
6142
6143
6144    if test "x$EGREP" = x; then
6145        if test "x" = x; then
6146          PROG_NAME=egrep
6147        else
6148          PROG_NAME=
6149        fi
6150        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6151$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6152        as_fn_error $? "Cannot continue" "$LINENO" 5
6153    fi
6154
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6156$as_echo_n "checking for fgrep... " >&6; }
6157if test "${ac_cv_path_FGREP+set}" = set; then :
6158  $as_echo_n "(cached) " >&6
6159else
6160  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6161   then ac_cv_path_FGREP="$GREP -F"
6162   else
6163     if test -z "$FGREP"; then
6164  ac_path_FGREP_found=false
6165  # Loop through the user's path and test for each of PROGNAME-LIST
6166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6167for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6168do
6169  IFS=$as_save_IFS
6170  test -z "$as_dir" && as_dir=.
6171    for ac_prog in fgrep; do
6172    for ac_exec_ext in '' $ac_executable_extensions; do
6173      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6174      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6175# Check for GNU ac_path_FGREP and select it if it is found.
6176  # Check for GNU $ac_path_FGREP
6177case `"$ac_path_FGREP" --version 2>&1` in
6178*GNU*)
6179  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6180*)
6181  ac_count=0
6182  $as_echo_n 0123456789 >"conftest.in"
6183  while :
6184  do
6185    cat "conftest.in" "conftest.in" >"conftest.tmp"
6186    mv "conftest.tmp" "conftest.in"
6187    cp "conftest.in" "conftest.nl"
6188    $as_echo 'FGREP' >> "conftest.nl"
6189    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6190    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6191    as_fn_arith $ac_count + 1 && ac_count=$as_val
6192    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6193      # Best one so far, save it but keep looking for a better one
6194      ac_cv_path_FGREP="$ac_path_FGREP"
6195      ac_path_FGREP_max=$ac_count
6196    fi
6197    # 10*(2^10) chars as input seems more than enough
6198    test $ac_count -gt 10 && break
6199  done
6200  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6201esac
6202
6203      $ac_path_FGREP_found && break 3
6204    done
6205  done
6206  done
6207IFS=$as_save_IFS
6208  if test -z "$ac_cv_path_FGREP"; then
6209    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6210  fi
6211else
6212  ac_cv_path_FGREP=$FGREP
6213fi
6214
6215   fi
6216fi
6217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6218$as_echo "$ac_cv_path_FGREP" >&6; }
6219 FGREP="$ac_cv_path_FGREP"
6220
6221
6222
6223    if test "x$FGREP" = x; then
6224        if test "x" = x; then
6225          PROG_NAME=fgrep
6226        else
6227          PROG_NAME=
6228        fi
6229        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6230$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6231        as_fn_error $? "Cannot continue" "$LINENO" 5
6232    fi
6233
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6235$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6236if test "${ac_cv_path_SED+set}" = set; then :
6237  $as_echo_n "(cached) " >&6
6238else
6239            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6240     for ac_i in 1 2 3 4 5 6 7; do
6241       ac_script="$ac_script$as_nl$ac_script"
6242     done
6243     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6244     { ac_script=; unset ac_script;}
6245     if test -z "$SED"; then
6246  ac_path_SED_found=false
6247  # Loop through the user's path and test for each of PROGNAME-LIST
6248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH
6250do
6251  IFS=$as_save_IFS
6252  test -z "$as_dir" && as_dir=.
6253    for ac_prog in sed gsed; do
6254    for ac_exec_ext in '' $ac_executable_extensions; do
6255      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6256      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6257# Check for GNU ac_path_SED and select it if it is found.
6258  # Check for GNU $ac_path_SED
6259case `"$ac_path_SED" --version 2>&1` in
6260*GNU*)
6261  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6262*)
6263  ac_count=0
6264  $as_echo_n 0123456789 >"conftest.in"
6265  while :
6266  do
6267    cat "conftest.in" "conftest.in" >"conftest.tmp"
6268    mv "conftest.tmp" "conftest.in"
6269    cp "conftest.in" "conftest.nl"
6270    $as_echo '' >> "conftest.nl"
6271    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6272    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6273    as_fn_arith $ac_count + 1 && ac_count=$as_val
6274    if test $ac_count -gt ${ac_path_SED_max-0}; then
6275      # Best one so far, save it but keep looking for a better one
6276      ac_cv_path_SED="$ac_path_SED"
6277      ac_path_SED_max=$ac_count
6278    fi
6279    # 10*(2^10) chars as input seems more than enough
6280    test $ac_count -gt 10 && break
6281  done
6282  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6283esac
6284
6285      $ac_path_SED_found && break 3
6286    done
6287  done
6288  done
6289IFS=$as_save_IFS
6290  if test -z "$ac_cv_path_SED"; then
6291    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6292  fi
6293else
6294  ac_cv_path_SED=$SED
6295fi
6296
6297fi
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6299$as_echo "$ac_cv_path_SED" >&6; }
6300 SED="$ac_cv_path_SED"
6301  rm -f conftest.sed
6302
6303
6304    if test "x$SED" = x; then
6305        if test "x" = x; then
6306          PROG_NAME=sed
6307        else
6308          PROG_NAME=
6309        fi
6310        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6311$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6312        as_fn_error $? "Cannot continue" "$LINENO" 5
6313    fi
6314
6315
6316for ac_prog in nawk gawk awk
6317do
6318  # Extract the first word of "$ac_prog", so it can be a program name with args.
6319set dummy $ac_prog; ac_word=$2
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6321$as_echo_n "checking for $ac_word... " >&6; }
6322if test "${ac_cv_path_NAWK+set}" = set; then :
6323  $as_echo_n "(cached) " >&6
6324else
6325  case $NAWK in
6326  [\\/]* | ?:[\\/]*)
6327  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6328  ;;
6329  *)
6330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6331for as_dir in $PATH
6332do
6333  IFS=$as_save_IFS
6334  test -z "$as_dir" && as_dir=.
6335    for ac_exec_ext in '' $ac_executable_extensions; do
6336  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6337    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6339    break 2
6340  fi
6341done
6342  done
6343IFS=$as_save_IFS
6344
6345  ;;
6346esac
6347fi
6348NAWK=$ac_cv_path_NAWK
6349if test -n "$NAWK"; then
6350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6351$as_echo "$NAWK" >&6; }
6352else
6353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6354$as_echo "no" >&6; }
6355fi
6356
6357
6358  test -n "$NAWK" && break
6359done
6360
6361
6362    if test "x$NAWK" = x; then
6363        if test "x" = x; then
6364          PROG_NAME=nawk
6365        else
6366          PROG_NAME=
6367        fi
6368        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6369$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6370        as_fn_error $? "Cannot continue" "$LINENO" 5
6371    fi
6372
6373
6374# Always force rm.
6375RM="$RM -f"
6376
6377# pwd behaves differently on various platforms and some don't support the -L flag.
6378# Always use the bash builtin pwd to get uniform behavior.
6379THEPWDCMD=pwd
6380
6381# These are not required on all platforms
6382# Extract the first word of "cygpath", so it can be a program name with args.
6383set dummy cygpath; ac_word=$2
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385$as_echo_n "checking for $ac_word... " >&6; }
6386if test "${ac_cv_path_CYGPATH+set}" = set; then :
6387  $as_echo_n "(cached) " >&6
6388else
6389  case $CYGPATH in
6390  [\\/]* | ?:[\\/]*)
6391  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6392  ;;
6393  *)
6394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397  IFS=$as_save_IFS
6398  test -z "$as_dir" && as_dir=.
6399    for ac_exec_ext in '' $ac_executable_extensions; do
6400  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6401    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403    break 2
6404  fi
6405done
6406  done
6407IFS=$as_save_IFS
6408
6409  ;;
6410esac
6411fi
6412CYGPATH=$ac_cv_path_CYGPATH
6413if test -n "$CYGPATH"; then
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6415$as_echo "$CYGPATH" >&6; }
6416else
6417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; }
6419fi
6420
6421
6422# Extract the first word of "readlink", so it can be a program name with args.
6423set dummy readlink; ac_word=$2
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6425$as_echo_n "checking for $ac_word... " >&6; }
6426if test "${ac_cv_path_READLINK+set}" = set; then :
6427  $as_echo_n "(cached) " >&6
6428else
6429  case $READLINK in
6430  [\\/]* | ?:[\\/]*)
6431  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6432  ;;
6433  *)
6434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6435for as_dir in $PATH
6436do
6437  IFS=$as_save_IFS
6438  test -z "$as_dir" && as_dir=.
6439    for ac_exec_ext in '' $ac_executable_extensions; do
6440  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6441    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6443    break 2
6444  fi
6445done
6446  done
6447IFS=$as_save_IFS
6448
6449  ;;
6450esac
6451fi
6452READLINK=$ac_cv_path_READLINK
6453if test -n "$READLINK"; then
6454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6455$as_echo "$READLINK" >&6; }
6456else
6457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }
6459fi
6460
6461
6462# Extract the first word of "df", so it can be a program name with args.
6463set dummy df; ac_word=$2
6464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6465$as_echo_n "checking for $ac_word... " >&6; }
6466if test "${ac_cv_path_DF+set}" = set; then :
6467  $as_echo_n "(cached) " >&6
6468else
6469  case $DF in
6470  [\\/]* | ?:[\\/]*)
6471  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6472  ;;
6473  *)
6474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475for as_dir in $PATH
6476do
6477  IFS=$as_save_IFS
6478  test -z "$as_dir" && as_dir=.
6479    for ac_exec_ext in '' $ac_executable_extensions; do
6480  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6481    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6483    break 2
6484  fi
6485done
6486  done
6487IFS=$as_save_IFS
6488
6489  ;;
6490esac
6491fi
6492DF=$ac_cv_path_DF
6493if test -n "$DF"; then
6494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6495$as_echo "$DF" >&6; }
6496else
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498$as_echo "no" >&6; }
6499fi
6500
6501
6502# Extract the first word of "SetFile", so it can be a program name with args.
6503set dummy SetFile; ac_word=$2
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if test "${ac_cv_path_SETFILE+set}" = set; then :
6507  $as_echo_n "(cached) " >&6
6508else
6509  case $SETFILE in
6510  [\\/]* | ?:[\\/]*)
6511  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6512  ;;
6513  *)
6514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH
6516do
6517  IFS=$as_save_IFS
6518  test -z "$as_dir" && as_dir=.
6519    for ac_exec_ext in '' $ac_executable_extensions; do
6520  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6521    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6523    break 2
6524  fi
6525done
6526  done
6527IFS=$as_save_IFS
6528
6529  ;;
6530esac
6531fi
6532SETFILE=$ac_cv_path_SETFILE
6533if test -n "$SETFILE"; then
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6535$as_echo "$SETFILE" >&6; }
6536else
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540
6541
6542
6543
6544# Now we can determine OpenJDK build and target platforms. This is required to
6545# have early on.
6546# Make sure we can run config.sub.
6547$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6548  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6549
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6551$as_echo_n "checking build system type... " >&6; }
6552if test "${ac_cv_build+set}" = set; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  ac_build_alias=$build_alias
6556test "x$ac_build_alias" = x &&
6557  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6558test "x$ac_build_alias" = x &&
6559  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6560ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6561  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6562
6563fi
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6565$as_echo "$ac_cv_build" >&6; }
6566case $ac_cv_build in
6567*-*-*) ;;
6568*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6569esac
6570build=$ac_cv_build
6571ac_save_IFS=$IFS; IFS='-'
6572set x $ac_cv_build
6573shift
6574build_cpu=$1
6575build_vendor=$2
6576shift; shift
6577# Remember, the first character of IFS is used to create $*,
6578# except with old shells:
6579build_os=$*
6580IFS=$ac_save_IFS
6581case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6582
6583
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6585$as_echo_n "checking host system type... " >&6; }
6586if test "${ac_cv_host+set}" = set; then :
6587  $as_echo_n "(cached) " >&6
6588else
6589  if test "x$host_alias" = x; then
6590  ac_cv_host=$ac_cv_build
6591else
6592  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6593    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6594fi
6595
6596fi
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6598$as_echo "$ac_cv_host" >&6; }
6599case $ac_cv_host in
6600*-*-*) ;;
6601*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6602esac
6603host=$ac_cv_host
6604ac_save_IFS=$IFS; IFS='-'
6605set x $ac_cv_host
6606shift
6607host_cpu=$1
6608host_vendor=$2
6609shift; shift
6610# Remember, the first character of IFS is used to create $*,
6611# except with old shells:
6612host_os=$*
6613IFS=$ac_save_IFS
6614case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6615
6616
6617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6618$as_echo_n "checking target system type... " >&6; }
6619if test "${ac_cv_target+set}" = set; then :
6620  $as_echo_n "(cached) " >&6
6621else
6622  if test "x$target_alias" = x; then
6623  ac_cv_target=$ac_cv_host
6624else
6625  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6626    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6627fi
6628
6629fi
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6631$as_echo "$ac_cv_target" >&6; }
6632case $ac_cv_target in
6633*-*-*) ;;
6634*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6635esac
6636target=$ac_cv_target
6637ac_save_IFS=$IFS; IFS='-'
6638set x $ac_cv_target
6639shift
6640target_cpu=$1
6641target_vendor=$2
6642shift; shift
6643# Remember, the first character of IFS is used to create $*,
6644# except with old shells:
6645target_os=$*
6646IFS=$ac_save_IFS
6647case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6648
6649
6650# The aliases save the names the user supplied, while $host etc.
6651# will get canonicalized.
6652test -n "$target_alias" &&
6653  test "$program_prefix$program_suffix$program_transform_name" = \
6654    NONENONEs,x,x, &&
6655  program_prefix=${target_alias}-
6656
6657# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6658# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6659# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6660# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6661# to use the configure naming style.
6662
6663
6664
6665
6666
6667    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6668    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6669    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6670    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6671    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6672    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6673
6674
6675
6676    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6677
6678  case "$build_os" in
6679    *linux*)
6680      VAR_OS=linux
6681      VAR_OS_API=posix
6682      VAR_OS_ENV=linux
6683      ;;
6684    *solaris*)
6685      VAR_OS=solaris
6686      VAR_OS_API=posix
6687      VAR_OS_ENV=solaris
6688      ;;
6689    *darwin*)
6690      VAR_OS=macosx
6691      VAR_OS_API=posix
6692      VAR_OS_ENV=macosx
6693      ;;
6694    *bsd*)
6695      VAR_OS=bsd
6696      VAR_OS_API=posix
6697      VAR_OS_ENV=bsd
6698      ;;
6699    *cygwin*)
6700      VAR_OS=windows
6701      VAR_OS_API=winapi
6702      VAR_OS_ENV=windows.cygwin
6703      ;;
6704    *mingw*)
6705      VAR_OS=windows
6706      VAR_OS_API=winapi
6707      VAR_OS_ENV=windows.msys
6708      ;;
6709    *)
6710      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6711      ;;
6712  esac
6713
6714
6715  # First argument is the cpu name from the trip/quad
6716  case "$build_cpu" in
6717    x86_64)
6718      VAR_CPU=x86_64
6719      VAR_CPU_ARCH=x86
6720      VAR_CPU_BITS=64
6721      VAR_CPU_ENDIAN=little
6722      ;;
6723    i?86)
6724      VAR_CPU=x86
6725      VAR_CPU_ARCH=x86
6726      VAR_CPU_BITS=32
6727      VAR_CPU_ENDIAN=little
6728      ;;
6729    arm*)
6730      VAR_CPU=arm
6731      VAR_CPU_ARCH=arm
6732      VAR_CPU_BITS=32
6733      VAR_CPU_ENDIAN=little
6734      ;;
6735    powerpc)
6736      VAR_CPU=ppc
6737      VAR_CPU_ARCH=ppc
6738      VAR_CPU_BITS=32
6739      VAR_CPU_ENDIAN=big
6740       ;;
6741    powerpc64)
6742      VAR_CPU=ppc64
6743      VAR_CPU_ARCH=ppc
6744      VAR_CPU_BITS=64
6745      VAR_CPU_ENDIAN=big
6746       ;;
6747    sparc)
6748      VAR_CPU=sparc
6749      VAR_CPU_ARCH=sparc
6750      VAR_CPU_BITS=32
6751      VAR_CPU_ENDIAN=big
6752       ;;
6753    sparcv9)
6754      VAR_CPU=sparcv9
6755      VAR_CPU_ARCH=sparc
6756      VAR_CPU_BITS=64
6757      VAR_CPU_ENDIAN=big
6758       ;;
6759    *)
6760      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6761      ;;
6762  esac
6763
6764    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6765    OPENJDK_BUILD_OS="$VAR_OS"
6766    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6767    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6768    OPENJDK_BUILD_CPU="$VAR_CPU"
6769    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6770    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6771    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6772
6773
6774
6775
6776
6777
6778
6779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6780$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6782$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6783
6784    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6785
6786  case "$host_os" in
6787    *linux*)
6788      VAR_OS=linux
6789      VAR_OS_API=posix
6790      VAR_OS_ENV=linux
6791      ;;
6792    *solaris*)
6793      VAR_OS=solaris
6794      VAR_OS_API=posix
6795      VAR_OS_ENV=solaris
6796      ;;
6797    *darwin*)
6798      VAR_OS=macosx
6799      VAR_OS_API=posix
6800      VAR_OS_ENV=macosx
6801      ;;
6802    *bsd*)
6803      VAR_OS=bsd
6804      VAR_OS_API=posix
6805      VAR_OS_ENV=bsd
6806      ;;
6807    *cygwin*)
6808      VAR_OS=windows
6809      VAR_OS_API=winapi
6810      VAR_OS_ENV=windows.cygwin
6811      ;;
6812    *mingw*)
6813      VAR_OS=windows
6814      VAR_OS_API=winapi
6815      VAR_OS_ENV=windows.msys
6816      ;;
6817    *)
6818      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6819      ;;
6820  esac
6821
6822
6823  # First argument is the cpu name from the trip/quad
6824  case "$host_cpu" in
6825    x86_64)
6826      VAR_CPU=x86_64
6827      VAR_CPU_ARCH=x86
6828      VAR_CPU_BITS=64
6829      VAR_CPU_ENDIAN=little
6830      ;;
6831    i?86)
6832      VAR_CPU=x86
6833      VAR_CPU_ARCH=x86
6834      VAR_CPU_BITS=32
6835      VAR_CPU_ENDIAN=little
6836      ;;
6837    arm*)
6838      VAR_CPU=arm
6839      VAR_CPU_ARCH=arm
6840      VAR_CPU_BITS=32
6841      VAR_CPU_ENDIAN=little
6842      ;;
6843    powerpc)
6844      VAR_CPU=ppc
6845      VAR_CPU_ARCH=ppc
6846      VAR_CPU_BITS=32
6847      VAR_CPU_ENDIAN=big
6848       ;;
6849    powerpc64)
6850      VAR_CPU=ppc64
6851      VAR_CPU_ARCH=ppc
6852      VAR_CPU_BITS=64
6853      VAR_CPU_ENDIAN=big
6854       ;;
6855    sparc)
6856      VAR_CPU=sparc
6857      VAR_CPU_ARCH=sparc
6858      VAR_CPU_BITS=32
6859      VAR_CPU_ENDIAN=big
6860       ;;
6861    sparcv9)
6862      VAR_CPU=sparcv9
6863      VAR_CPU_ARCH=sparc
6864      VAR_CPU_BITS=64
6865      VAR_CPU_ENDIAN=big
6866       ;;
6867    *)
6868      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6869      ;;
6870  esac
6871
6872    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6873    OPENJDK_TARGET_OS="$VAR_OS"
6874    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6875    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6876    OPENJDK_TARGET_CPU="$VAR_CPU"
6877    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6878    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6879    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6880
6881
6882
6883
6884
6885
6886
6887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6888$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6890$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6891
6892
6893
6894# Check whether --with-target-bits was given.
6895if test "${with_target_bits+set}" = set; then :
6896  withval=$with_target_bits;
6897fi
6898
6899
6900  # We have three types of compiles:
6901  # native  == normal compilation, target system == build system
6902  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6903  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6904  #
6905  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6906    # We're doing a proper cross-compilation
6907    COMPILE_TYPE="cross"
6908  else
6909    COMPILE_TYPE="native"
6910  fi
6911
6912  if test "x$with_target_bits" != x; then
6913    if test "x$COMPILE_TYPE" = "xcross"; then
6914      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6915    fi
6916
6917    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6918      # A reduced build is requested
6919      COMPILE_TYPE="reduced"
6920      OPENJDK_TARGET_CPU_BITS=32
6921      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6922        OPENJDK_TARGET_CPU=x86
6923      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6924        OPENJDK_TARGET_CPU=sparc
6925      else
6926        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6927      fi
6928    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6929      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
6930    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6931      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6932$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6933    else
6934      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6935    fi
6936  fi
6937
6938
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6940$as_echo_n "checking compilation type... " >&6; }
6941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6942$as_echo "$COMPILE_TYPE" >&6; }
6943
6944
6945    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6946       REQUIRED_OS_NAME=SunOS
6947       REQUIRED_OS_VERSION=5.10
6948    fi
6949    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6950       REQUIRED_OS_NAME=Linux
6951       REQUIRED_OS_VERSION=2.6
6952    fi
6953    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6954        REQUIRED_OS_NAME=Windows
6955        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6956            REQUIRED_OS_VERSION=5.2
6957        else
6958            REQUIRED_OS_VERSION=5.1
6959        fi
6960    fi
6961    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6962        REQUIRED_OS_NAME=Darwin
6963        REQUIRED_OS_VERSION=11.2
6964    fi
6965
6966
6967
6968
6969
6970    # Also store the legacy naming of the cpu.
6971    # Ie i586 and amd64 instead of x86 and x86_64
6972    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6973    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6974      OPENJDK_TARGET_CPU_LEGACY="i586"
6975    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6976      # On all platforms except MacOSX replace x86_64 with amd64.
6977      OPENJDK_TARGET_CPU_LEGACY="amd64"
6978    fi
6979
6980
6981    # And the second legacy naming of the cpu.
6982    # Ie i386 and amd64 instead of x86 and x86_64.
6983    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6984    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6985      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6986    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6987      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6988    fi
6989
6990
6991    # This is the name of the cpu (but using i386 and amd64 instead of
6992    # x86 and x86_64, respectively), preceeded by a /, to be used when
6993    # locating libraries. On macosx, it's empty, though.
6994    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6995    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6996        OPENJDK_TARGET_CPU_LIBDIR=""
6997    fi
6998
6999
7000    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7001    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7002    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7003    OPENJDK_TARGET_CPU_ISADIR=""
7004    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7005      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7006          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7007      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7008          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7009      fi
7010    fi
7011
7012
7013    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7014    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7015    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7016      # On linux only, we replace x86 with i386.
7017      OPENJDK_TARGET_CPU_OSARCH="i386"
7018    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7019      # On all platforms except macosx, we replace x86_64 with amd64.
7020      OPENJDK_TARGET_CPU_OSARCH="amd64"
7021    fi
7022
7023
7024    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7025    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7026      OPENJDK_TARGET_CPU_JLI="i386"
7027    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7028      # On all platforms except macosx, we replace x86_64 with amd64.
7029      OPENJDK_TARGET_CPU_JLI="amd64"
7030    fi
7031    # Now setup the -D flags for building libjli.
7032    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7033    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7034      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7035        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7036      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7037        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7038      fi
7039    fi
7040
7041
7042    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7043    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7044        OPENJDK_TARGET_OS_API_DIR="solaris"
7045    fi
7046    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7047        OPENJDK_TARGET_OS_API_DIR="windows"
7048    fi
7049
7050
7051    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7052        A_LP64="LP64:="
7053        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7054        # unpack200.exe
7055        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7056            ADD_LP64="-D_LP64=1"
7057        fi
7058    fi
7059    LP64=$A_LP64
7060
7061
7062    if test "x$COMPILE_TYPE" = "xcross"; then
7063      # FIXME: ... or should this include reduced builds..?
7064      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7065    else
7066      DEFINE_CROSS_COMPILE_ARCH=""
7067    fi
7068
7069
7070    # ZERO_ARCHDEF is used to enable architecture-specific code
7071    case "${OPENJDK_TARGET_CPU}" in
7072      ppc*)    ZERO_ARCHDEF=PPC   ;;
7073      s390*)   ZERO_ARCHDEF=S390  ;;
7074      sparc*)  ZERO_ARCHDEF=SPARC ;;
7075      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7076      x86)     ZERO_ARCHDEF=IA32  ;;
7077      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7078    esac
7079
7080
7081
7082
7083
7084# Continue setting up basic stuff. Most remaining code require fundamental tools.
7085
7086# Locate the directory of this script.
7087SCRIPT="$0"
7088AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7089
7090# Where is the source? It is located two levels above the configure script.
7091CURDIR="$PWD"
7092cd "$AUTOCONF_DIR/../.."
7093SRC_ROOT="`$THEPWDCMD -L`"
7094
7095if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7096  PATH_SEP=";"
7097
7098  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7099  if test $SRC_ROOT_LENGTH -gt 100; then
7100      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7101  fi
7102
7103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7105$as_echo_n "checking cygwin release... " >&6; }
7106    CYGWIN_VERSION=`$UNAME -r`
7107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7108$as_echo "$CYGWIN_VERSION" >&6; }
7109    WINDOWS_ENV_VENDOR='cygwin'
7110    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7111
7112    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7113    if test "x$CYGWIN_VERSION_OK" = x; then
7114      { $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
7115$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;}
7116      as_fn_error $? "Cannot continue" "$LINENO" 5
7117    fi
7118    if test "x$CYGPATH" = x; then
7119        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7120    fi
7121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7122$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7123    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7124    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7125    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7126    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7128$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7129    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7130    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7131    if test "x$test_cygdrive_prefix" = x; then
7132        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7133    fi
7134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7136$as_echo_n "checking msys release... " >&6; }
7137    MSYS_VERSION=`$UNAME -r`
7138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7139$as_echo "$MSYS_VERSION" >&6; }
7140
7141    WINDOWS_ENV_VENDOR='msys'
7142    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7143
7144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7145$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7146    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7147    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7148
7149  windows_path="$MSYS_ROOT_PATH"
7150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7151    unix_path=`$CYGPATH -u "$windows_path"`
7152    MSYS_ROOT_PATH="$unix_path"
7153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7155    MSYS_ROOT_PATH="$unix_path"
7156  fi
7157
7158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7159$as_echo "$MSYS_ROOT_PATH" >&6; }
7160    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7161  else
7162    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7163  fi
7164
7165  # Test if windows or unix (cygwin/msys) find is first in path.
7166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7167$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7168  FIND_BINARY_OUTPUT=`find --version 2>&1`
7169  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7171$as_echo "unix style" >&6; }
7172  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7174$as_echo "Windows" >&6; }
7175    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7176$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7177    { $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
7178$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7179    as_fn_error $? "Cannot continue" "$LINENO" 5
7180  else
7181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7182$as_echo "unknown" >&6; }
7183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7184$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7185  fi
7186
7187else
7188  PATH_SEP=":"
7189fi
7190
7191
7192
7193cd "$CURDIR"
7194
7195
7196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7197
7198  # Input might be given as Windows format, start by converting to
7199  # unix format.
7200  path="$SRC_ROOT"
7201  new_path=`$CYGPATH -u "$path"`
7202
7203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7206  # "foo.exe" is OK but "foo" is an error.
7207  #
7208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7209  # It is also a way to make sure we got the proper file name for the real test later on.
7210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7211  if test "x$test_shortpath" = x; then
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7213$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7214    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7215  fi
7216
7217  # Call helper function which possibly converts this using DOS-style short mode.
7218  # If so, the updated path is stored in $new_path.
7219
7220  input_path="$new_path"
7221  # Check if we need to convert this using DOS-style short mode. If the path
7222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7223  # take no chances and rewrite it.
7224  # Note: m4 eats our [], so we need to use [ and ] instead.
7225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7226  if test "x$has_forbidden_chars" != x; then
7227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7231      # Going to short mode and back again did indeed matter. Since short mode is
7232      # case insensitive, let's make it lowercase to improve readability.
7233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7234      # Now convert it back to Unix-stile (cygpath)
7235      input_path=`$CYGPATH -u "$shortmode_path"`
7236      new_path="$input_path"
7237    fi
7238  fi
7239
7240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7241  if test "x$test_cygdrive_prefix" = x; then
7242    # As a simple fix, exclude /usr/bin since it's not a real path.
7243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7245      # a path prefixed by /cygdrive for fixpath to work.
7246      new_path="$CYGWIN_ROOT_PATH$input_path"
7247    fi
7248  fi
7249
7250
7251  if test "x$path" != "x$new_path"; then
7252    SRC_ROOT="$new_path"
7253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7254$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7255  fi
7256
7257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7258
7259  path="$SRC_ROOT"
7260  has_colon=`$ECHO $path | $GREP ^.:`
7261  new_path="$path"
7262  if test "x$has_colon" = x; then
7263    # Not in mixed or Windows style, start by that.
7264    new_path=`cmd //c echo $path`
7265  fi
7266
7267
7268  input_path="$new_path"
7269  # Check if we need to convert this using DOS-style short mode. If the path
7270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7271  # take no chances and rewrite it.
7272  # Note: m4 eats our [], so we need to use [ and ] instead.
7273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7274  if test "x$has_forbidden_chars" != x; then
7275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7277  fi
7278
7279
7280  windows_path="$new_path"
7281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7282    unix_path=`$CYGPATH -u "$windows_path"`
7283    new_path="$unix_path"
7284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7286    new_path="$unix_path"
7287  fi
7288
7289  if test "x$path" != "x$new_path"; then
7290    SRC_ROOT="$new_path"
7291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7292$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7293  fi
7294
7295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7297
7298  else
7299    # We're on a posix platform. Hooray! :)
7300    path="$SRC_ROOT"
7301    has_space=`$ECHO "$path" | $GREP " "`
7302    if test "x$has_space" != x; then
7303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7304$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7305      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7306    fi
7307
7308    # Use eval to expand a potential ~
7309    eval path="$path"
7310    if test ! -f "$path" && test ! -d "$path"; then
7311      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7312    fi
7313
7314    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7315  fi
7316
7317
7318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7319
7320  # Input might be given as Windows format, start by converting to
7321  # unix format.
7322  path="$CURDIR"
7323  new_path=`$CYGPATH -u "$path"`
7324
7325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7328  # "foo.exe" is OK but "foo" is an error.
7329  #
7330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7331  # It is also a way to make sure we got the proper file name for the real test later on.
7332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7333  if test "x$test_shortpath" = x; then
7334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7335$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7336    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7337  fi
7338
7339  # Call helper function which possibly converts this using DOS-style short mode.
7340  # If so, the updated path is stored in $new_path.
7341
7342  input_path="$new_path"
7343  # Check if we need to convert this using DOS-style short mode. If the path
7344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7345  # take no chances and rewrite it.
7346  # Note: m4 eats our [], so we need to use [ and ] instead.
7347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7348  if test "x$has_forbidden_chars" != x; then
7349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7353      # Going to short mode and back again did indeed matter. Since short mode is
7354      # case insensitive, let's make it lowercase to improve readability.
7355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7356      # Now convert it back to Unix-stile (cygpath)
7357      input_path=`$CYGPATH -u "$shortmode_path"`
7358      new_path="$input_path"
7359    fi
7360  fi
7361
7362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7363  if test "x$test_cygdrive_prefix" = x; then
7364    # As a simple fix, exclude /usr/bin since it's not a real path.
7365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7367      # a path prefixed by /cygdrive for fixpath to work.
7368      new_path="$CYGWIN_ROOT_PATH$input_path"
7369    fi
7370  fi
7371
7372
7373  if test "x$path" != "x$new_path"; then
7374    CURDIR="$new_path"
7375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7376$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7377  fi
7378
7379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7380
7381  path="$CURDIR"
7382  has_colon=`$ECHO $path | $GREP ^.:`
7383  new_path="$path"
7384  if test "x$has_colon" = x; then
7385    # Not in mixed or Windows style, start by that.
7386    new_path=`cmd //c echo $path`
7387  fi
7388
7389
7390  input_path="$new_path"
7391  # Check if we need to convert this using DOS-style short mode. If the path
7392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7393  # take no chances and rewrite it.
7394  # Note: m4 eats our [], so we need to use [ and ] instead.
7395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7396  if test "x$has_forbidden_chars" != x; then
7397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7399  fi
7400
7401
7402  windows_path="$new_path"
7403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7404    unix_path=`$CYGPATH -u "$windows_path"`
7405    new_path="$unix_path"
7406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7408    new_path="$unix_path"
7409  fi
7410
7411  if test "x$path" != "x$new_path"; then
7412    CURDIR="$new_path"
7413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7414$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7415  fi
7416
7417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7419
7420  else
7421    # We're on a posix platform. Hooray! :)
7422    path="$CURDIR"
7423    has_space=`$ECHO "$path" | $GREP " "`
7424    if test "x$has_space" != x; then
7425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7426$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7427      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7428    fi
7429
7430    # Use eval to expand a potential ~
7431    eval path="$path"
7432    if test ! -f "$path" && test ! -d "$path"; then
7433      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7434    fi
7435
7436    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7437  fi
7438
7439
7440if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7441    # Add extra search paths on solaris for utilities like ar and as etc...
7442    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7443fi
7444
7445# You can force the sys-root if the sys-root encoded into the cross compiler tools
7446# is not correct.
7447
7448# Check whether --with-sys-root was given.
7449if test "${with_sys_root+set}" = set; then :
7450  withval=$with_sys_root;
7451fi
7452
7453
7454if test "x$with_sys_root" != x; then
7455  SYS_ROOT=$with_sys_root
7456else
7457  SYS_ROOT=/
7458fi
7459
7460
7461
7462# Check whether --with-tools-dir was given.
7463if test "${with_tools_dir+set}" = set; then :
7464  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7465
7466fi
7467
7468
7469
7470# Check whether --with-devkit was given.
7471if test "${with_devkit+set}" = set; then :
7472  withval=$with_devkit;
7473    if test "x$with_sys_root" != x; then
7474      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7475    fi
7476
7477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7478
7479  # Input might be given as Windows format, start by converting to
7480  # unix format.
7481  path="$with_devkit"
7482  new_path=`$CYGPATH -u "$path"`
7483
7484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7487  # "foo.exe" is OK but "foo" is an error.
7488  #
7489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7490  # It is also a way to make sure we got the proper file name for the real test later on.
7491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7492  if test "x$test_shortpath" = x; then
7493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7494$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7495    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7496  fi
7497
7498  # Call helper function which possibly converts this using DOS-style short mode.
7499  # If so, the updated path is stored in $new_path.
7500
7501  input_path="$new_path"
7502  # Check if we need to convert this using DOS-style short mode. If the path
7503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7504  # take no chances and rewrite it.
7505  # Note: m4 eats our [], so we need to use [ and ] instead.
7506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7507  if test "x$has_forbidden_chars" != x; then
7508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7512      # Going to short mode and back again did indeed matter. Since short mode is
7513      # case insensitive, let's make it lowercase to improve readability.
7514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7515      # Now convert it back to Unix-stile (cygpath)
7516      input_path=`$CYGPATH -u "$shortmode_path"`
7517      new_path="$input_path"
7518    fi
7519  fi
7520
7521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7522  if test "x$test_cygdrive_prefix" = x; then
7523    # As a simple fix, exclude /usr/bin since it's not a real path.
7524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7526      # a path prefixed by /cygdrive for fixpath to work.
7527      new_path="$CYGWIN_ROOT_PATH$input_path"
7528    fi
7529  fi
7530
7531
7532  if test "x$path" != "x$new_path"; then
7533    with_devkit="$new_path"
7534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7535$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7536  fi
7537
7538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7539
7540  path="$with_devkit"
7541  has_colon=`$ECHO $path | $GREP ^.:`
7542  new_path="$path"
7543  if test "x$has_colon" = x; then
7544    # Not in mixed or Windows style, start by that.
7545    new_path=`cmd //c echo $path`
7546  fi
7547
7548
7549  input_path="$new_path"
7550  # Check if we need to convert this using DOS-style short mode. If the path
7551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7552  # take no chances and rewrite it.
7553  # Note: m4 eats our [], so we need to use [ and ] instead.
7554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7555  if test "x$has_forbidden_chars" != x; then
7556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7558  fi
7559
7560
7561  windows_path="$new_path"
7562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7563    unix_path=`$CYGPATH -u "$windows_path"`
7564    new_path="$unix_path"
7565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7567    new_path="$unix_path"
7568  fi
7569
7570  if test "x$path" != "x$new_path"; then
7571    with_devkit="$new_path"
7572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7573$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7574  fi
7575
7576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7578
7579  else
7580    # We're on a posix platform. Hooray! :)
7581    path="$with_devkit"
7582    has_space=`$ECHO "$path" | $GREP " "`
7583    if test "x$has_space" != x; then
7584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7585$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7586      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7587    fi
7588
7589    # Use eval to expand a potential ~
7590    eval path="$path"
7591    if test ! -f "$path" && test ! -d "$path"; then
7592      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7593    fi
7594
7595    with_devkit="`cd "$path"; $THEPWDCMD -L`"
7596  fi
7597
7598
7599  if test "x$TOOLS_DIR" = x; then
7600    TOOLS_DIR="$with_devkit/bin"
7601  else
7602    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7603  fi
7604
7605    if test -d "$with_devkit/$host_alias/libc"; then
7606      SYS_ROOT=$with_devkit/$host_alias/libc
7607    elif test -d "$with_devkit/$host/sys-root"; then
7608      SYS_ROOT=$with_devkit/$host/sys-root
7609    fi
7610
7611fi
7612
7613
7614
7615# Setup default logging of stdout and stderr to build.log in the output root.
7616BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7617BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7618BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7619
7620
7621
7622
7623
7624# Check if it's a pure open build or if custom sources are to be used.
7625
7626  # Check whether --enable-openjdk-only was given.
7627if test "${enable_openjdk_only+set}" = set; then :
7628  enableval=$enable_openjdk_only;
7629else
7630  enable_openjdk_only="no"
7631fi
7632
7633
7634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7635$as_echo_n "checking for presence of closed sources... " >&6; }
7636  if test -d "$SRC_ROOT/jdk/src/closed"; then
7637    CLOSED_SOURCE_PRESENT=yes
7638  else
7639    CLOSED_SOURCE_PRESENT=no
7640  fi
7641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7642$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7643
7644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7645$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7646  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7648$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7649
7650  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7651    OPENJDK=true
7652    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7653      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7654$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7655    fi
7656  else
7657    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7658      OPENJDK=true
7659    else
7660      OPENJDK=false
7661    fi
7662  fi
7663
7664  if test "x$OPENJDK" = "xtrue"; then
7665    SET_OPENJDK="OPENJDK=true"
7666  fi
7667
7668
7669
7670
7671# These are needed to be able to create a configuration name (and thus the output directory)
7672
7673###############################################################################
7674#
7675# Check which variant of the JDK that we want to build.
7676# Currently we have:
7677#    normal:   standard edition
7678# but the custom make system may add other variants
7679#
7680# Effectively the JDK variant gives a name to a specific set of
7681# modules to compile into the JDK. In the future, these modules
7682# might even be Jigsaw modules.
7683#
7684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7685$as_echo_n "checking which variant of the JDK to build... " >&6; }
7686
7687# Check whether --with-jdk-variant was given.
7688if test "${with_jdk_variant+set}" = set; then :
7689  withval=$with_jdk_variant;
7690fi
7691
7692
7693if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7694    JDK_VARIANT="normal"
7695else
7696    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7697fi
7698
7699
7700
7701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7702$as_echo "$JDK_VARIANT" >&6; }
7703
7704
7705
7706###############################################################################
7707#
7708# Check which variants of the JVM that we want to build.
7709# Currently we have:
7710#    server: normal interpreter and a tiered C1/C2 compiler
7711#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7712#    minimal1: reduced form of client with optional VM services and features stripped out
7713#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7714#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7715#    zero: no machine code interpreter, no compiler
7716#    zeroshark: zero interpreter and shark/llvm compiler backend
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7718$as_echo_n "checking which variants of the JVM to build... " >&6; }
7719
7720# Check whether --with-jvm-variants was given.
7721if test "${with_jvm_variants+set}" = set; then :
7722  withval=$with_jvm_variants;
7723fi
7724
7725
7726if test "x$with_jvm_variants" = x; then
7727     with_jvm_variants="server"
7728fi
7729
7730JVM_VARIANTS=",$with_jvm_variants,"
7731TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7732
7733if test "x$TEST_VARIANTS" != "x,"; then
7734   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7735fi
7736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7737$as_echo "$with_jvm_variants" >&6; }
7738
7739JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7740JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7741JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7742JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7743JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7744JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7745
7746if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7747    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7748        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7749    fi
7750fi
7751if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7752    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7753        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7754    fi
7755fi
7756if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7757    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7758        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7759    fi
7760fi
7761
7762# Replace the commas with AND for use in the build directory name.
7763ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7764COUNT_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/'`
7765if test "x$COUNT_VARIANTS" != "x,1"; then
7766    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7767else
7768    BUILDING_MULTIPLE_JVM_VARIANTS=no
7769fi
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779INCLUDE_SA=true
7780if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7781    INCLUDE_SA=false
7782fi
7783if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7784    INCLUDE_SA=false
7785fi
7786
7787
7788if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7789   MACOSX_UNIVERSAL="true"
7790fi
7791
7792
7793
7794
7795
7796###############################################################################
7797#
7798# Set the debug level
7799#    release: no debug information, all optimizations, no asserts.
7800#    fastdebug: debug information (-g), all optimizations, all asserts
7801#    slowdebug: debug information (-g), no optimizations, all asserts
7802#
7803DEBUG_LEVEL="release"
7804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7805$as_echo_n "checking which debug level to use... " >&6; }
7806# Check whether --enable-debug was given.
7807if test "${enable_debug+set}" = set; then :
7808  enableval=$enable_debug;
7809        ENABLE_DEBUG="${enableval}"
7810        DEBUG_LEVEL="fastdebug"
7811
7812else
7813  ENABLE_DEBUG="no"
7814fi
7815
7816
7817
7818# Check whether --with-debug-level was given.
7819if test "${with_debug_level+set}" = set; then :
7820  withval=$with_debug_level;
7821        DEBUG_LEVEL="${withval}"
7822        if test "x$ENABLE_DEBUG" = xyes; then
7823			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7824        fi
7825
7826fi
7827
7828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7829$as_echo "$DEBUG_LEVEL" >&6; }
7830
7831if test "x$DEBUG_LEVEL" != xrelease && \
7832   test "x$DEBUG_LEVEL" != xfastdebug && \
7833   test "x$DEBUG_LEVEL" != xslowdebug; then
7834   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7835fi
7836
7837
7838###############################################################################
7839#
7840# Setup legacy vars/targets and new vars to deal with different debug levels.
7841#
7842
7843case $DEBUG_LEVEL in
7844      release )
7845          VARIANT="OPT"
7846          FASTDEBUG="false"
7847          DEBUG_CLASSFILES="false"
7848          BUILD_VARIANT_RELEASE=""
7849          HOTSPOT_DEBUG_LEVEL="product"
7850          HOTSPOT_EXPORT="product"
7851           ;;
7852      fastdebug )
7853          VARIANT="DBG"
7854          FASTDEBUG="true"
7855          DEBUG_CLASSFILES="true"
7856          BUILD_VARIANT_RELEASE="-fastdebug"
7857          HOTSPOT_DEBUG_LEVEL="fastdebug"
7858          HOTSPOT_EXPORT="fastdebug"
7859           ;;
7860      slowdebug )
7861          VARIANT="DBG"
7862          FASTDEBUG="false"
7863          DEBUG_CLASSFILES="true"
7864          BUILD_VARIANT_RELEASE="-debug"
7865          HOTSPOT_DEBUG_LEVEL="jvmg"
7866          HOTSPOT_EXPORT="debug"
7867           ;;
7868esac
7869
7870#####
7871# Generate the legacy makefile targets for hotspot.
7872# The hotspot api for selecting the build artifacts, really, needs to be improved.
7873# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7874# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7875# But until then ...
7876HOTSPOT_TARGET=""
7877
7878if test "x$JVM_VARIANT_SERVER" = xtrue; then
7879    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7880fi
7881
7882if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7883    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7884fi
7885
7886if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7887    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7888fi
7889
7890if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7891    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7892fi
7893
7894if test "x$JVM_VARIANT_ZERO" = xtrue; then
7895    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7896fi
7897
7898if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7899    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7900fi
7901
7902HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7903
7904# On Macosx universal binaries are produced, but they only contain
7905# 64 bit intel. This invalidates control of which jvms are built
7906# from configure, but only server is valid anyway. Fix this
7907# when hotspot makefiles are rewritten.
7908if test "x$MACOSX_UNIVERSAL" = xtrue; then
7909    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7910fi
7911
7912#####
7913
7914
7915
7916
7917
7918
7919
7920
7921# With basic setup done, call the custom early hook.
7922
7923
7924# To properly create a configuration name, we need to have the OpenJDK target
7925# and options (variants and debug level) parsed.
7926
7927
7928
7929# Check whether --with-conf-name was given.
7930if test "${with_conf_name+set}" = set; then :
7931  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7932fi
7933
7934
7935# Test from where we are running configure, in or outside of src root.
7936if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7937        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7938        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7939    # We are running configure from the src root.
7940    # Create a default ./build/target-variant-debuglevel output root.
7941    if test "x${CONF_NAME}" = x; then
7942        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7943    fi
7944    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7945    $MKDIR -p "$OUTPUT_ROOT"
7946    if test ! -d "$OUTPUT_ROOT"; then
7947        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7948    fi
7949else
7950    # We are running configure from outside of the src dir.
7951    # Then use the current directory as output dir!
7952    # If configuration is situated in normal build directory, just use the build
7953    # directory name as configuration name, otherwise use the complete path.
7954    if test "x${CONF_NAME}" = x; then
7955        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7956    fi
7957    OUTPUT_ROOT="$CURDIR"
7958
7959    # WARNING: This might be a bad thing to do. You need to be sure you want to
7960    # have a configuration in this directory. Do some sanity checks!
7961
7962    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7963      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7964      # other files
7965      files_present=`$LS $OUTPUT_ROOT`
7966      # Configure has already touched config.log and confdefs.h in the current dir when this check
7967      # is performed.
7968      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7969                                             | $TR -d '\n'`
7970      if test "x$filtered_files" != x; then
7971        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7972$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7973        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7974$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7975        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7976$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7977        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7978$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7979        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7980$as_echo "$as_me: seriously mess up just about everything." >&6;}
7981        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7982$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7983        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7984$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7985        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7986      fi
7987    fi
7988fi
7989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7990$as_echo_n "checking what configuration name to use... " >&6; }
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7992$as_echo "$CONF_NAME" >&6; }
7993
7994
7995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7996
7997  # Input might be given as Windows format, start by converting to
7998  # unix format.
7999  path="$OUTPUT_ROOT"
8000  new_path=`$CYGPATH -u "$path"`
8001
8002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8005  # "foo.exe" is OK but "foo" is an error.
8006  #
8007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8008  # It is also a way to make sure we got the proper file name for the real test later on.
8009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8010  if test "x$test_shortpath" = x; then
8011    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8012$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8013    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8014  fi
8015
8016  # Call helper function which possibly converts this using DOS-style short mode.
8017  # If so, the updated path is stored in $new_path.
8018
8019  input_path="$new_path"
8020  # Check if we need to convert this using DOS-style short mode. If the path
8021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8022  # take no chances and rewrite it.
8023  # Note: m4 eats our [], so we need to use [ and ] instead.
8024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8025  if test "x$has_forbidden_chars" != x; then
8026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8030      # Going to short mode and back again did indeed matter. Since short mode is
8031      # case insensitive, let's make it lowercase to improve readability.
8032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8033      # Now convert it back to Unix-stile (cygpath)
8034      input_path=`$CYGPATH -u "$shortmode_path"`
8035      new_path="$input_path"
8036    fi
8037  fi
8038
8039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8040  if test "x$test_cygdrive_prefix" = x; then
8041    # As a simple fix, exclude /usr/bin since it's not a real path.
8042    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8044      # a path prefixed by /cygdrive for fixpath to work.
8045      new_path="$CYGWIN_ROOT_PATH$input_path"
8046    fi
8047  fi
8048
8049
8050  if test "x$path" != "x$new_path"; then
8051    OUTPUT_ROOT="$new_path"
8052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8053$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8054  fi
8055
8056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8057
8058  path="$OUTPUT_ROOT"
8059  has_colon=`$ECHO $path | $GREP ^.:`
8060  new_path="$path"
8061  if test "x$has_colon" = x; then
8062    # Not in mixed or Windows style, start by that.
8063    new_path=`cmd //c echo $path`
8064  fi
8065
8066
8067  input_path="$new_path"
8068  # Check if we need to convert this using DOS-style short mode. If the path
8069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8070  # take no chances and rewrite it.
8071  # Note: m4 eats our [], so we need to use [ and ] instead.
8072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8073  if test "x$has_forbidden_chars" != x; then
8074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8076  fi
8077
8078
8079  windows_path="$new_path"
8080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8081    unix_path=`$CYGPATH -u "$windows_path"`
8082    new_path="$unix_path"
8083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8085    new_path="$unix_path"
8086  fi
8087
8088  if test "x$path" != "x$new_path"; then
8089    OUTPUT_ROOT="$new_path"
8090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8091$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8092  fi
8093
8094  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8095  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8096
8097  else
8098    # We're on a posix platform. Hooray! :)
8099    path="$OUTPUT_ROOT"
8100    has_space=`$ECHO "$path" | $GREP " "`
8101    if test "x$has_space" != x; then
8102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8103$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8104      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8105    fi
8106
8107    # Use eval to expand a potential ~
8108    eval path="$path"
8109    if test ! -f "$path" && test ! -d "$path"; then
8110      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8111    fi
8112
8113    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8114  fi
8115
8116
8117SPEC=$OUTPUT_ROOT/spec.gmk
8118
8119CONF_NAME=$CONF_NAME
8120
8121OUTPUT_ROOT=$OUTPUT_ROOT
8122
8123
8124# Most of the probed defines are put into config.h
8125ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8126
8127# The spec.gmk file contains all variables for the make system.
8128ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8129
8130# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8131ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8132
8133# The bootcycle-spec.gmk file contains support for boot cycle builds.
8134ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8135
8136# The compare.sh is used to compare the build output to other builds.
8137ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8138
8139# Spec.sh is currently used by compare-objects.sh
8140ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8141
8142# The generated Makefile knows where the spec.gmk is and where the source is.
8143# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8144# which will look for generated configurations
8145ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8146
8147
8148# Save the arguments given to us
8149echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8150
8151
8152# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8153
8154    for ac_prog in apt-get yum port pkgutil pkgadd
8155do
8156  # Extract the first word of "$ac_prog", so it can be a program name with args.
8157set dummy $ac_prog; ac_word=$2
8158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8159$as_echo_n "checking for $ac_word... " >&6; }
8160if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8161  $as_echo_n "(cached) " >&6
8162else
8163  if test -n "$PKGHANDLER"; then
8164  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8165else
8166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8167for as_dir in $PATH
8168do
8169  IFS=$as_save_IFS
8170  test -z "$as_dir" && as_dir=.
8171    for ac_exec_ext in '' $ac_executable_extensions; do
8172  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8173    ac_cv_prog_PKGHANDLER="$ac_prog"
8174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8175    break 2
8176  fi
8177done
8178  done
8179IFS=$as_save_IFS
8180
8181fi
8182fi
8183PKGHANDLER=$ac_cv_prog_PKGHANDLER
8184if test -n "$PKGHANDLER"; then
8185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8186$as_echo "$PKGHANDLER" >&6; }
8187else
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189$as_echo "no" >&6; }
8190fi
8191
8192
8193  test -n "$PKGHANDLER" && break
8194done
8195
8196
8197
8198# Setup tools that requires more complex handling, or that is not needed by the configure script.
8199
8200
8201  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8202  if test "x$MAKE" != x; then
8203    # User has supplied a make, test it.
8204    if test ! -f "$MAKE"; then
8205      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8206    fi
8207
8208  MAKE_CANDIDATE=""$MAKE""
8209  DESCRIPTION="user supplied MAKE=$MAKE"
8210  if test "x$MAKE_CANDIDATE" != x; then
8211    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8212$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8213    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8214    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8215    if test "x$IS_GNU_MAKE" = x; then
8216      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8217$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8218    else
8219      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8220      if test "x$IS_MODERN_MAKE" = x; then
8221        { $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
8222$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;}
8223      else
8224        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8225          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8226            MAKE_EXPECTED_ENV='cygwin'
8227          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8228            MAKE_EXPECTED_ENV='msys'
8229          else
8230            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8231          fi
8232          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8233          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8234        else
8235          # Not relevant for non-Windows
8236          IS_MAKE_CORRECT_ENV=true
8237        fi
8238        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8239          { $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
8240$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;}
8241        else
8242          FOUND_MAKE=$MAKE_CANDIDATE
8243
8244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8245
8246  # First separate the path from the arguments. This will split at the first
8247  # space.
8248  complete="$FOUND_MAKE"
8249  path="${complete%% *}"
8250  tmp="$complete EOL"
8251  arguments="${tmp#* }"
8252
8253  # Input might be given as Windows format, start by converting to
8254  # unix format.
8255  new_path=`$CYGPATH -u "$path"`
8256
8257  # Now try to locate executable using which
8258  new_path=`$WHICH "$new_path" 2> /dev/null`
8259  # bat and cmd files are not always considered executable in cygwin causing which
8260  # to not find them
8261  if test "x$new_path" = x \
8262           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8263           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8264    new_path=`$CYGPATH -u "$path"`
8265  fi
8266  if test "x$new_path" = x; then
8267    # Oops. Which didn't find the executable.
8268    # The splitting of arguments from the executable at a space might have been incorrect,
8269    # since paths with space are more likely in Windows. Give it another try with the whole
8270    # argument.
8271    path="$complete"
8272    arguments="EOL"
8273    new_path=`$CYGPATH -u "$path"`
8274    new_path=`$WHICH "$new_path" 2> /dev/null`
8275    # bat and cmd files are not always considered executable in cygwin causing which
8276    # to not find them
8277    if test "x$new_path" = x \
8278             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8279             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8280      new_path=`$CYGPATH -u "$path"`
8281    fi
8282    if test "x$new_path" = x; then
8283      # It's still not found. Now this is an unrecoverable error.
8284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8285$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8286      has_space=`$ECHO "$complete" | $GREP " "`
8287      if test "x$has_space" != x; then
8288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8290      fi
8291      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8292    fi
8293  fi
8294
8295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8298  # "foo.exe" is OK but "foo" is an error.
8299  #
8300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8301  # It is also a way to make sure we got the proper file name for the real test later on.
8302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8303  if test "x$test_shortpath" = x; then
8304    # Short path failed, file does not exist as specified.
8305    # Try adding .exe or .cmd
8306    if test -f "${new_path}.exe"; then
8307       input_to_shortpath="${new_path}.exe"
8308    elif test -f "${new_path}.cmd"; then
8309       input_to_shortpath="${new_path}.cmd"
8310    else
8311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8312$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8315      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8316    fi
8317  else
8318    input_to_shortpath="$new_path"
8319  fi
8320
8321  # Call helper function which possibly converts this using DOS-style short mode.
8322  # If so, the updated path is stored in $new_path.
8323  new_path="$input_to_shortpath"
8324
8325  input_path="$input_to_shortpath"
8326  # Check if we need to convert this using DOS-style short mode. If the path
8327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8328  # take no chances and rewrite it.
8329  # Note: m4 eats our [], so we need to use [ and ] instead.
8330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8331  if test "x$has_forbidden_chars" != x; then
8332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8336      # Going to short mode and back again did indeed matter. Since short mode is
8337      # case insensitive, let's make it lowercase to improve readability.
8338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8339      # Now convert it back to Unix-stile (cygpath)
8340      input_path=`$CYGPATH -u "$shortmode_path"`
8341      new_path="$input_path"
8342    fi
8343  fi
8344
8345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8346  if test "x$test_cygdrive_prefix" = x; then
8347    # As a simple fix, exclude /usr/bin since it's not a real path.
8348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8350      # a path prefixed by /cygdrive for fixpath to work.
8351      new_path="$CYGWIN_ROOT_PATH$input_path"
8352    fi
8353  fi
8354
8355  # remove trailing .exe if any
8356  new_path="${new_path/%.exe/}"
8357
8358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8359
8360  # First separate the path from the arguments. This will split at the first
8361  # space.
8362  complete="$FOUND_MAKE"
8363  path="${complete%% *}"
8364  tmp="$complete EOL"
8365  arguments="${tmp#* }"
8366
8367  # Input might be given as Windows format, start by converting to
8368  # unix format.
8369  new_path="$path"
8370
8371  windows_path="$new_path"
8372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8373    unix_path=`$CYGPATH -u "$windows_path"`
8374    new_path="$unix_path"
8375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8377    new_path="$unix_path"
8378  fi
8379
8380
8381  # Now try to locate executable using which
8382  new_path=`$WHICH "$new_path" 2> /dev/null`
8383
8384  if test "x$new_path" = x; then
8385    # Oops. Which didn't find the executable.
8386    # The splitting of arguments from the executable at a space might have been incorrect,
8387    # since paths with space are more likely in Windows. Give it another try with the whole
8388    # argument.
8389    path="$complete"
8390    arguments="EOL"
8391    new_path="$path"
8392
8393  windows_path="$new_path"
8394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8395    unix_path=`$CYGPATH -u "$windows_path"`
8396    new_path="$unix_path"
8397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8399    new_path="$unix_path"
8400  fi
8401
8402
8403    new_path=`$WHICH "$new_path" 2> /dev/null`
8404
8405    if test "x$new_path" = x; then
8406      # It's still not found. Now this is an unrecoverable error.
8407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8408$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8409      has_space=`$ECHO "$complete" | $GREP " "`
8410      if test "x$has_space" != x; then
8411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8413      fi
8414      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8415    fi
8416  fi
8417
8418  # Now new_path has a complete unix path to the binary
8419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8420    # Keep paths in /bin as-is, but remove trailing .exe if any
8421    new_path="${new_path/%.exe/}"
8422    # Do not save /bin paths to all_fixpath_prefixes!
8423  else
8424    # Not in mixed or Windows style, start by that.
8425    new_path=`cmd //c echo $new_path`
8426
8427  input_path="$new_path"
8428  # Check if we need to convert this using DOS-style short mode. If the path
8429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8430  # take no chances and rewrite it.
8431  # Note: m4 eats our [], so we need to use [ and ] instead.
8432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8433  if test "x$has_forbidden_chars" != x; then
8434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8436  fi
8437
8438    # Output is in $new_path
8439
8440  windows_path="$new_path"
8441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8442    unix_path=`$CYGPATH -u "$windows_path"`
8443    new_path="$unix_path"
8444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8446    new_path="$unix_path"
8447  fi
8448
8449    # remove trailing .exe if any
8450    new_path="${new_path/%.exe/}"
8451
8452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8454  fi
8455
8456  else
8457    # We're on a posix platform. Hooray! :)
8458    # First separate the path from the arguments. This will split at the first
8459    # space.
8460    complete="$FOUND_MAKE"
8461    path="${complete%% *}"
8462    tmp="$complete EOL"
8463    arguments="${tmp#* }"
8464
8465    # Cannot rely on the command "which" here since it doesn't always work.
8466    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8467    if test -z "$is_absolute_path"; then
8468      # Path to executable is not absolute. Find it.
8469      IFS_save="$IFS"
8470      IFS=:
8471      for p in $PATH; do
8472        if test -f "$p/$path" && test -x "$p/$path"; then
8473          new_path="$p/$path"
8474          break
8475        fi
8476      done
8477      IFS="$IFS_save"
8478    else
8479      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8480$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8481      new_path="$path"
8482    fi
8483
8484    if test "x$new_path" = x; then
8485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8486$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8487        has_space=`$ECHO "$complete" | $GREP " "`
8488        if test "x$has_space" != x; then
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8491        fi
8492        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8493      fi
8494  fi
8495
8496      # Now join together the path and the arguments once again
8497      if test "x$arguments" != xEOL; then
8498        new_complete="$new_path ${arguments% *}"
8499      else
8500        new_complete="$new_path"
8501      fi
8502
8503  if test "x$complete" != "x$new_complete"; then
8504      FOUND_MAKE="$new_complete"
8505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8506$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8507    fi
8508
8509        fi
8510      fi
8511    fi
8512  fi
8513
8514    if test "x$FOUND_MAKE" = x; then
8515      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8516    fi
8517  else
8518    # Try our hardest to locate a correct version of GNU make
8519    for ac_prog in gmake
8520do
8521  # Extract the first word of "$ac_prog", so it can be a program name with args.
8522set dummy $ac_prog; ac_word=$2
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8524$as_echo_n "checking for $ac_word... " >&6; }
8525if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8526  $as_echo_n "(cached) " >&6
8527else
8528  case $CHECK_GMAKE in
8529  [\\/]* | ?:[\\/]*)
8530  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8531  ;;
8532  *)
8533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8534for as_dir in $PATH
8535do
8536  IFS=$as_save_IFS
8537  test -z "$as_dir" && as_dir=.
8538    for ac_exec_ext in '' $ac_executable_extensions; do
8539  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8540    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8542    break 2
8543  fi
8544done
8545  done
8546IFS=$as_save_IFS
8547
8548  ;;
8549esac
8550fi
8551CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8552if test -n "$CHECK_GMAKE"; then
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8554$as_echo "$CHECK_GMAKE" >&6; }
8555else
8556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8557$as_echo "no" >&6; }
8558fi
8559
8560
8561  test -n "$CHECK_GMAKE" && break
8562done
8563
8564
8565  MAKE_CANDIDATE=""$CHECK_GMAKE""
8566  DESCRIPTION="gmake in PATH"
8567  if test "x$MAKE_CANDIDATE" != x; then
8568    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8569$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8570    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8571    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8572    if test "x$IS_GNU_MAKE" = x; then
8573      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8574$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8575    else
8576      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8577      if test "x$IS_MODERN_MAKE" = x; then
8578        { $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
8579$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;}
8580      else
8581        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8582          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8583            MAKE_EXPECTED_ENV='cygwin'
8584          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8585            MAKE_EXPECTED_ENV='msys'
8586          else
8587            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8588          fi
8589          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8590          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8591        else
8592          # Not relevant for non-Windows
8593          IS_MAKE_CORRECT_ENV=true
8594        fi
8595        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8596          { $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
8597$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;}
8598        else
8599          FOUND_MAKE=$MAKE_CANDIDATE
8600
8601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8602
8603  # First separate the path from the arguments. This will split at the first
8604  # space.
8605  complete="$FOUND_MAKE"
8606  path="${complete%% *}"
8607  tmp="$complete EOL"
8608  arguments="${tmp#* }"
8609
8610  # Input might be given as Windows format, start by converting to
8611  # unix format.
8612  new_path=`$CYGPATH -u "$path"`
8613
8614  # Now try to locate executable using which
8615  new_path=`$WHICH "$new_path" 2> /dev/null`
8616  # bat and cmd files are not always considered executable in cygwin causing which
8617  # to not find them
8618  if test "x$new_path" = x \
8619           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8620           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8621    new_path=`$CYGPATH -u "$path"`
8622  fi
8623  if test "x$new_path" = x; then
8624    # Oops. Which didn't find the executable.
8625    # The splitting of arguments from the executable at a space might have been incorrect,
8626    # since paths with space are more likely in Windows. Give it another try with the whole
8627    # argument.
8628    path="$complete"
8629    arguments="EOL"
8630    new_path=`$CYGPATH -u "$path"`
8631    new_path=`$WHICH "$new_path" 2> /dev/null`
8632    # bat and cmd files are not always considered executable in cygwin causing which
8633    # to not find them
8634    if test "x$new_path" = x \
8635             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8636             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8637      new_path=`$CYGPATH -u "$path"`
8638    fi
8639    if test "x$new_path" = x; then
8640      # It's still not found. Now this is an unrecoverable error.
8641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8642$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8643      has_space=`$ECHO "$complete" | $GREP " "`
8644      if test "x$has_space" != x; then
8645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8647      fi
8648      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8649    fi
8650  fi
8651
8652  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8653  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8654  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8655  # "foo.exe" is OK but "foo" is an error.
8656  #
8657  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8658  # It is also a way to make sure we got the proper file name for the real test later on.
8659  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8660  if test "x$test_shortpath" = x; then
8661    # Short path failed, file does not exist as specified.
8662    # Try adding .exe or .cmd
8663    if test -f "${new_path}.exe"; then
8664       input_to_shortpath="${new_path}.exe"
8665    elif test -f "${new_path}.cmd"; then
8666       input_to_shortpath="${new_path}.cmd"
8667    else
8668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8670      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8671$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8672      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8673    fi
8674  else
8675    input_to_shortpath="$new_path"
8676  fi
8677
8678  # Call helper function which possibly converts this using DOS-style short mode.
8679  # If so, the updated path is stored in $new_path.
8680  new_path="$input_to_shortpath"
8681
8682  input_path="$input_to_shortpath"
8683  # Check if we need to convert this using DOS-style short mode. If the path
8684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8685  # take no chances and rewrite it.
8686  # Note: m4 eats our [], so we need to use [ and ] instead.
8687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8688  if test "x$has_forbidden_chars" != x; then
8689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8693      # Going to short mode and back again did indeed matter. Since short mode is
8694      # case insensitive, let's make it lowercase to improve readability.
8695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8696      # Now convert it back to Unix-stile (cygpath)
8697      input_path=`$CYGPATH -u "$shortmode_path"`
8698      new_path="$input_path"
8699    fi
8700  fi
8701
8702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8703  if test "x$test_cygdrive_prefix" = x; then
8704    # As a simple fix, exclude /usr/bin since it's not a real path.
8705    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8707      # a path prefixed by /cygdrive for fixpath to work.
8708      new_path="$CYGWIN_ROOT_PATH$input_path"
8709    fi
8710  fi
8711
8712  # remove trailing .exe if any
8713  new_path="${new_path/%.exe/}"
8714
8715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8716
8717  # First separate the path from the arguments. This will split at the first
8718  # space.
8719  complete="$FOUND_MAKE"
8720  path="${complete%% *}"
8721  tmp="$complete EOL"
8722  arguments="${tmp#* }"
8723
8724  # Input might be given as Windows format, start by converting to
8725  # unix format.
8726  new_path="$path"
8727
8728  windows_path="$new_path"
8729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8730    unix_path=`$CYGPATH -u "$windows_path"`
8731    new_path="$unix_path"
8732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8734    new_path="$unix_path"
8735  fi
8736
8737
8738  # Now try to locate executable using which
8739  new_path=`$WHICH "$new_path" 2> /dev/null`
8740
8741  if test "x$new_path" = x; then
8742    # Oops. Which didn't find the executable.
8743    # The splitting of arguments from the executable at a space might have been incorrect,
8744    # since paths with space are more likely in Windows. Give it another try with the whole
8745    # argument.
8746    path="$complete"
8747    arguments="EOL"
8748    new_path="$path"
8749
8750  windows_path="$new_path"
8751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8752    unix_path=`$CYGPATH -u "$windows_path"`
8753    new_path="$unix_path"
8754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8756    new_path="$unix_path"
8757  fi
8758
8759
8760    new_path=`$WHICH "$new_path" 2> /dev/null`
8761
8762    if test "x$new_path" = x; then
8763      # It's still not found. Now this is an unrecoverable error.
8764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8766      has_space=`$ECHO "$complete" | $GREP " "`
8767      if test "x$has_space" != x; then
8768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8770      fi
8771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8772    fi
8773  fi
8774
8775  # Now new_path has a complete unix path to the binary
8776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8777    # Keep paths in /bin as-is, but remove trailing .exe if any
8778    new_path="${new_path/%.exe/}"
8779    # Do not save /bin paths to all_fixpath_prefixes!
8780  else
8781    # Not in mixed or Windows style, start by that.
8782    new_path=`cmd //c echo $new_path`
8783
8784  input_path="$new_path"
8785  # Check if we need to convert this using DOS-style short mode. If the path
8786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8787  # take no chances and rewrite it.
8788  # Note: m4 eats our [], so we need to use [ and ] instead.
8789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8790  if test "x$has_forbidden_chars" != x; then
8791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8793  fi
8794
8795    # Output is in $new_path
8796
8797  windows_path="$new_path"
8798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8799    unix_path=`$CYGPATH -u "$windows_path"`
8800    new_path="$unix_path"
8801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8803    new_path="$unix_path"
8804  fi
8805
8806    # remove trailing .exe if any
8807    new_path="${new_path/%.exe/}"
8808
8809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8811  fi
8812
8813  else
8814    # We're on a posix platform. Hooray! :)
8815    # First separate the path from the arguments. This will split at the first
8816    # space.
8817    complete="$FOUND_MAKE"
8818    path="${complete%% *}"
8819    tmp="$complete EOL"
8820    arguments="${tmp#* }"
8821
8822    # Cannot rely on the command "which" here since it doesn't always work.
8823    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8824    if test -z "$is_absolute_path"; then
8825      # Path to executable is not absolute. Find it.
8826      IFS_save="$IFS"
8827      IFS=:
8828      for p in $PATH; do
8829        if test -f "$p/$path" && test -x "$p/$path"; then
8830          new_path="$p/$path"
8831          break
8832        fi
8833      done
8834      IFS="$IFS_save"
8835    else
8836      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8837$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8838      new_path="$path"
8839    fi
8840
8841    if test "x$new_path" = x; then
8842        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8844        has_space=`$ECHO "$complete" | $GREP " "`
8845        if test "x$has_space" != x; then
8846          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8847$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8848        fi
8849        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8850      fi
8851  fi
8852
8853      # Now join together the path and the arguments once again
8854      if test "x$arguments" != xEOL; then
8855        new_complete="$new_path ${arguments% *}"
8856      else
8857        new_complete="$new_path"
8858      fi
8859
8860  if test "x$complete" != "x$new_complete"; then
8861      FOUND_MAKE="$new_complete"
8862      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8863$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8864    fi
8865
8866        fi
8867      fi
8868    fi
8869  fi
8870
8871
8872    if test "x$FOUND_MAKE" = x; then
8873      for ac_prog in make
8874do
8875  # Extract the first word of "$ac_prog", so it can be a program name with args.
8876set dummy $ac_prog; ac_word=$2
8877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8878$as_echo_n "checking for $ac_word... " >&6; }
8879if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8880  $as_echo_n "(cached) " >&6
8881else
8882  case $CHECK_MAKE in
8883  [\\/]* | ?:[\\/]*)
8884  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8885  ;;
8886  *)
8887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8888for as_dir in $PATH
8889do
8890  IFS=$as_save_IFS
8891  test -z "$as_dir" && as_dir=.
8892    for ac_exec_ext in '' $ac_executable_extensions; do
8893  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8894    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8896    break 2
8897  fi
8898done
8899  done
8900IFS=$as_save_IFS
8901
8902  ;;
8903esac
8904fi
8905CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8906if test -n "$CHECK_MAKE"; then
8907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8908$as_echo "$CHECK_MAKE" >&6; }
8909else
8910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8911$as_echo "no" >&6; }
8912fi
8913
8914
8915  test -n "$CHECK_MAKE" && break
8916done
8917
8918
8919  MAKE_CANDIDATE=""$CHECK_MAKE""
8920  DESCRIPTION="make in PATH"
8921  if test "x$MAKE_CANDIDATE" != x; then
8922    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8923$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8924    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8925    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8926    if test "x$IS_GNU_MAKE" = x; then
8927      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8928$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8929    else
8930      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8931      if test "x$IS_MODERN_MAKE" = x; then
8932        { $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
8933$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;}
8934      else
8935        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8936          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8937            MAKE_EXPECTED_ENV='cygwin'
8938          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8939            MAKE_EXPECTED_ENV='msys'
8940          else
8941            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8942          fi
8943          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8944          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8945        else
8946          # Not relevant for non-Windows
8947          IS_MAKE_CORRECT_ENV=true
8948        fi
8949        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8950          { $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
8951$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;}
8952        else
8953          FOUND_MAKE=$MAKE_CANDIDATE
8954
8955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8956
8957  # First separate the path from the arguments. This will split at the first
8958  # space.
8959  complete="$FOUND_MAKE"
8960  path="${complete%% *}"
8961  tmp="$complete EOL"
8962  arguments="${tmp#* }"
8963
8964  # Input might be given as Windows format, start by converting to
8965  # unix format.
8966  new_path=`$CYGPATH -u "$path"`
8967
8968  # Now try to locate executable using which
8969  new_path=`$WHICH "$new_path" 2> /dev/null`
8970  # bat and cmd files are not always considered executable in cygwin causing which
8971  # to not find them
8972  if test "x$new_path" = x \
8973           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8974           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8975    new_path=`$CYGPATH -u "$path"`
8976  fi
8977  if test "x$new_path" = x; then
8978    # Oops. Which didn't find the executable.
8979    # The splitting of arguments from the executable at a space might have been incorrect,
8980    # since paths with space are more likely in Windows. Give it another try with the whole
8981    # argument.
8982    path="$complete"
8983    arguments="EOL"
8984    new_path=`$CYGPATH -u "$path"`
8985    new_path=`$WHICH "$new_path" 2> /dev/null`
8986    # bat and cmd files are not always considered executable in cygwin causing which
8987    # to not find them
8988    if test "x$new_path" = x \
8989             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8990             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8991      new_path=`$CYGPATH -u "$path"`
8992    fi
8993    if test "x$new_path" = x; then
8994      # It's still not found. Now this is an unrecoverable error.
8995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8996$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8997      has_space=`$ECHO "$complete" | $GREP " "`
8998      if test "x$has_space" != x; then
8999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9001      fi
9002      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9003    fi
9004  fi
9005
9006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9009  # "foo.exe" is OK but "foo" is an error.
9010  #
9011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9012  # It is also a way to make sure we got the proper file name for the real test later on.
9013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9014  if test "x$test_shortpath" = x; then
9015    # Short path failed, file does not exist as specified.
9016    # Try adding .exe or .cmd
9017    if test -f "${new_path}.exe"; then
9018       input_to_shortpath="${new_path}.exe"
9019    elif test -f "${new_path}.cmd"; then
9020       input_to_shortpath="${new_path}.cmd"
9021    else
9022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9023$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9024      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9025$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9026      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9027    fi
9028  else
9029    input_to_shortpath="$new_path"
9030  fi
9031
9032  # Call helper function which possibly converts this using DOS-style short mode.
9033  # If so, the updated path is stored in $new_path.
9034  new_path="$input_to_shortpath"
9035
9036  input_path="$input_to_shortpath"
9037  # Check if we need to convert this using DOS-style short mode. If the path
9038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9039  # take no chances and rewrite it.
9040  # Note: m4 eats our [], so we need to use [ and ] instead.
9041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9042  if test "x$has_forbidden_chars" != x; then
9043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9047      # Going to short mode and back again did indeed matter. Since short mode is
9048      # case insensitive, let's make it lowercase to improve readability.
9049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9050      # Now convert it back to Unix-stile (cygpath)
9051      input_path=`$CYGPATH -u "$shortmode_path"`
9052      new_path="$input_path"
9053    fi
9054  fi
9055
9056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9057  if test "x$test_cygdrive_prefix" = x; then
9058    # As a simple fix, exclude /usr/bin since it's not a real path.
9059    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9061      # a path prefixed by /cygdrive for fixpath to work.
9062      new_path="$CYGWIN_ROOT_PATH$input_path"
9063    fi
9064  fi
9065
9066  # remove trailing .exe if any
9067  new_path="${new_path/%.exe/}"
9068
9069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9070
9071  # First separate the path from the arguments. This will split at the first
9072  # space.
9073  complete="$FOUND_MAKE"
9074  path="${complete%% *}"
9075  tmp="$complete EOL"
9076  arguments="${tmp#* }"
9077
9078  # Input might be given as Windows format, start by converting to
9079  # unix format.
9080  new_path="$path"
9081
9082  windows_path="$new_path"
9083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9084    unix_path=`$CYGPATH -u "$windows_path"`
9085    new_path="$unix_path"
9086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9088    new_path="$unix_path"
9089  fi
9090
9091
9092  # Now try to locate executable using which
9093  new_path=`$WHICH "$new_path" 2> /dev/null`
9094
9095  if test "x$new_path" = x; then
9096    # Oops. Which didn't find the executable.
9097    # The splitting of arguments from the executable at a space might have been incorrect,
9098    # since paths with space are more likely in Windows. Give it another try with the whole
9099    # argument.
9100    path="$complete"
9101    arguments="EOL"
9102    new_path="$path"
9103
9104  windows_path="$new_path"
9105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9106    unix_path=`$CYGPATH -u "$windows_path"`
9107    new_path="$unix_path"
9108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9110    new_path="$unix_path"
9111  fi
9112
9113
9114    new_path=`$WHICH "$new_path" 2> /dev/null`
9115
9116    if test "x$new_path" = x; then
9117      # It's still not found. Now this is an unrecoverable error.
9118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9119$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9120      has_space=`$ECHO "$complete" | $GREP " "`
9121      if test "x$has_space" != x; then
9122        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9123$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9124      fi
9125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9126    fi
9127  fi
9128
9129  # Now new_path has a complete unix path to the binary
9130  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9131    # Keep paths in /bin as-is, but remove trailing .exe if any
9132    new_path="${new_path/%.exe/}"
9133    # Do not save /bin paths to all_fixpath_prefixes!
9134  else
9135    # Not in mixed or Windows style, start by that.
9136    new_path=`cmd //c echo $new_path`
9137
9138  input_path="$new_path"
9139  # Check if we need to convert this using DOS-style short mode. If the path
9140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9141  # take no chances and rewrite it.
9142  # Note: m4 eats our [], so we need to use [ and ] instead.
9143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9144  if test "x$has_forbidden_chars" != x; then
9145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9147  fi
9148
9149    # Output is in $new_path
9150
9151  windows_path="$new_path"
9152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9153    unix_path=`$CYGPATH -u "$windows_path"`
9154    new_path="$unix_path"
9155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9157    new_path="$unix_path"
9158  fi
9159
9160    # remove trailing .exe if any
9161    new_path="${new_path/%.exe/}"
9162
9163    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9164    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9165  fi
9166
9167  else
9168    # We're on a posix platform. Hooray! :)
9169    # First separate the path from the arguments. This will split at the first
9170    # space.
9171    complete="$FOUND_MAKE"
9172    path="${complete%% *}"
9173    tmp="$complete EOL"
9174    arguments="${tmp#* }"
9175
9176    # Cannot rely on the command "which" here since it doesn't always work.
9177    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9178    if test -z "$is_absolute_path"; then
9179      # Path to executable is not absolute. Find it.
9180      IFS_save="$IFS"
9181      IFS=:
9182      for p in $PATH; do
9183        if test -f "$p/$path" && test -x "$p/$path"; then
9184          new_path="$p/$path"
9185          break
9186        fi
9187      done
9188      IFS="$IFS_save"
9189    else
9190      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9191$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9192      new_path="$path"
9193    fi
9194
9195    if test "x$new_path" = x; then
9196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9197$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9198        has_space=`$ECHO "$complete" | $GREP " "`
9199        if test "x$has_space" != x; then
9200          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9201$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9202        fi
9203        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9204      fi
9205  fi
9206
9207      # Now join together the path and the arguments once again
9208      if test "x$arguments" != xEOL; then
9209        new_complete="$new_path ${arguments% *}"
9210      else
9211        new_complete="$new_path"
9212      fi
9213
9214  if test "x$complete" != "x$new_complete"; then
9215      FOUND_MAKE="$new_complete"
9216      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9217$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9218    fi
9219
9220        fi
9221      fi
9222    fi
9223  fi
9224
9225    fi
9226
9227    if test "x$FOUND_MAKE" = x; then
9228      if test "x$TOOLS_DIR" != x; then
9229        # We have a tools-dir, check that as well before giving up.
9230        OLD_PATH=$PATH
9231        PATH=$TOOLS_DIR:$PATH
9232        for ac_prog in gmake
9233do
9234  # Extract the first word of "$ac_prog", so it can be a program name with args.
9235set dummy $ac_prog; ac_word=$2
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9237$as_echo_n "checking for $ac_word... " >&6; }
9238if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9239  $as_echo_n "(cached) " >&6
9240else
9241  case $CHECK_TOOLSDIR_GMAKE in
9242  [\\/]* | ?:[\\/]*)
9243  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9244  ;;
9245  *)
9246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9247for as_dir in $PATH
9248do
9249  IFS=$as_save_IFS
9250  test -z "$as_dir" && as_dir=.
9251    for ac_exec_ext in '' $ac_executable_extensions; do
9252  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9253    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9255    break 2
9256  fi
9257done
9258  done
9259IFS=$as_save_IFS
9260
9261  ;;
9262esac
9263fi
9264CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9265if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9267$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9268else
9269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9270$as_echo "no" >&6; }
9271fi
9272
9273
9274  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9275done
9276
9277
9278  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9279  DESCRIPTION="gmake in tools-dir"
9280  if test "x$MAKE_CANDIDATE" != x; then
9281    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9282$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9283    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9284    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9285    if test "x$IS_GNU_MAKE" = x; then
9286      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9287$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9288    else
9289      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9290      if test "x$IS_MODERN_MAKE" = x; then
9291        { $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
9292$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;}
9293      else
9294        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9295          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9296            MAKE_EXPECTED_ENV='cygwin'
9297          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9298            MAKE_EXPECTED_ENV='msys'
9299          else
9300            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9301          fi
9302          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9303          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9304        else
9305          # Not relevant for non-Windows
9306          IS_MAKE_CORRECT_ENV=true
9307        fi
9308        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9309          { $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
9310$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;}
9311        else
9312          FOUND_MAKE=$MAKE_CANDIDATE
9313
9314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9315
9316  # First separate the path from the arguments. This will split at the first
9317  # space.
9318  complete="$FOUND_MAKE"
9319  path="${complete%% *}"
9320  tmp="$complete EOL"
9321  arguments="${tmp#* }"
9322
9323  # Input might be given as Windows format, start by converting to
9324  # unix format.
9325  new_path=`$CYGPATH -u "$path"`
9326
9327  # Now try to locate executable using which
9328  new_path=`$WHICH "$new_path" 2> /dev/null`
9329  # bat and cmd files are not always considered executable in cygwin causing which
9330  # to not find them
9331  if test "x$new_path" = x \
9332           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9333           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9334    new_path=`$CYGPATH -u "$path"`
9335  fi
9336  if test "x$new_path" = x; then
9337    # Oops. Which didn't find the executable.
9338    # The splitting of arguments from the executable at a space might have been incorrect,
9339    # since paths with space are more likely in Windows. Give it another try with the whole
9340    # argument.
9341    path="$complete"
9342    arguments="EOL"
9343    new_path=`$CYGPATH -u "$path"`
9344    new_path=`$WHICH "$new_path" 2> /dev/null`
9345    # bat and cmd files are not always considered executable in cygwin causing which
9346    # to not find them
9347    if test "x$new_path" = x \
9348             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9349             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9350      new_path=`$CYGPATH -u "$path"`
9351    fi
9352    if test "x$new_path" = x; then
9353      # It's still not found. Now this is an unrecoverable error.
9354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9355$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9356      has_space=`$ECHO "$complete" | $GREP " "`
9357      if test "x$has_space" != x; then
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9360      fi
9361      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9362    fi
9363  fi
9364
9365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9368  # "foo.exe" is OK but "foo" is an error.
9369  #
9370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9371  # It is also a way to make sure we got the proper file name for the real test later on.
9372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9373  if test "x$test_shortpath" = x; then
9374    # Short path failed, file does not exist as specified.
9375    # Try adding .exe or .cmd
9376    if test -f "${new_path}.exe"; then
9377       input_to_shortpath="${new_path}.exe"
9378    elif test -f "${new_path}.cmd"; then
9379       input_to_shortpath="${new_path}.cmd"
9380    else
9381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9382$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9383      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9384$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9385      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9386    fi
9387  else
9388    input_to_shortpath="$new_path"
9389  fi
9390
9391  # Call helper function which possibly converts this using DOS-style short mode.
9392  # If so, the updated path is stored in $new_path.
9393  new_path="$input_to_shortpath"
9394
9395  input_path="$input_to_shortpath"
9396  # Check if we need to convert this using DOS-style short mode. If the path
9397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9398  # take no chances and rewrite it.
9399  # Note: m4 eats our [], so we need to use [ and ] instead.
9400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9401  if test "x$has_forbidden_chars" != x; then
9402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9406      # Going to short mode and back again did indeed matter. Since short mode is
9407      # case insensitive, let's make it lowercase to improve readability.
9408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9409      # Now convert it back to Unix-stile (cygpath)
9410      input_path=`$CYGPATH -u "$shortmode_path"`
9411      new_path="$input_path"
9412    fi
9413  fi
9414
9415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9416  if test "x$test_cygdrive_prefix" = x; then
9417    # As a simple fix, exclude /usr/bin since it's not a real path.
9418    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9420      # a path prefixed by /cygdrive for fixpath to work.
9421      new_path="$CYGWIN_ROOT_PATH$input_path"
9422    fi
9423  fi
9424
9425  # remove trailing .exe if any
9426  new_path="${new_path/%.exe/}"
9427
9428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9429
9430  # First separate the path from the arguments. This will split at the first
9431  # space.
9432  complete="$FOUND_MAKE"
9433  path="${complete%% *}"
9434  tmp="$complete EOL"
9435  arguments="${tmp#* }"
9436
9437  # Input might be given as Windows format, start by converting to
9438  # unix format.
9439  new_path="$path"
9440
9441  windows_path="$new_path"
9442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9443    unix_path=`$CYGPATH -u "$windows_path"`
9444    new_path="$unix_path"
9445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9447    new_path="$unix_path"
9448  fi
9449
9450
9451  # Now try to locate executable using which
9452  new_path=`$WHICH "$new_path" 2> /dev/null`
9453
9454  if test "x$new_path" = x; then
9455    # Oops. Which didn't find the executable.
9456    # The splitting of arguments from the executable at a space might have been incorrect,
9457    # since paths with space are more likely in Windows. Give it another try with the whole
9458    # argument.
9459    path="$complete"
9460    arguments="EOL"
9461    new_path="$path"
9462
9463  windows_path="$new_path"
9464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9465    unix_path=`$CYGPATH -u "$windows_path"`
9466    new_path="$unix_path"
9467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9469    new_path="$unix_path"
9470  fi
9471
9472
9473    new_path=`$WHICH "$new_path" 2> /dev/null`
9474
9475    if test "x$new_path" = x; then
9476      # It's still not found. Now this is an unrecoverable error.
9477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9478$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9479      has_space=`$ECHO "$complete" | $GREP " "`
9480      if test "x$has_space" != x; then
9481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9483      fi
9484      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9485    fi
9486  fi
9487
9488  # Now new_path has a complete unix path to the binary
9489  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9490    # Keep paths in /bin as-is, but remove trailing .exe if any
9491    new_path="${new_path/%.exe/}"
9492    # Do not save /bin paths to all_fixpath_prefixes!
9493  else
9494    # Not in mixed or Windows style, start by that.
9495    new_path=`cmd //c echo $new_path`
9496
9497  input_path="$new_path"
9498  # Check if we need to convert this using DOS-style short mode. If the path
9499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9500  # take no chances and rewrite it.
9501  # Note: m4 eats our [], so we need to use [ and ] instead.
9502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9503  if test "x$has_forbidden_chars" != x; then
9504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9506  fi
9507
9508    # Output is in $new_path
9509
9510  windows_path="$new_path"
9511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9512    unix_path=`$CYGPATH -u "$windows_path"`
9513    new_path="$unix_path"
9514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9516    new_path="$unix_path"
9517  fi
9518
9519    # remove trailing .exe if any
9520    new_path="${new_path/%.exe/}"
9521
9522    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9523    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9524  fi
9525
9526  else
9527    # We're on a posix platform. Hooray! :)
9528    # First separate the path from the arguments. This will split at the first
9529    # space.
9530    complete="$FOUND_MAKE"
9531    path="${complete%% *}"
9532    tmp="$complete EOL"
9533    arguments="${tmp#* }"
9534
9535    # Cannot rely on the command "which" here since it doesn't always work.
9536    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9537    if test -z "$is_absolute_path"; then
9538      # Path to executable is not absolute. Find it.
9539      IFS_save="$IFS"
9540      IFS=:
9541      for p in $PATH; do
9542        if test -f "$p/$path" && test -x "$p/$path"; then
9543          new_path="$p/$path"
9544          break
9545        fi
9546      done
9547      IFS="$IFS_save"
9548    else
9549      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9550$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9551      new_path="$path"
9552    fi
9553
9554    if test "x$new_path" = x; then
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9556$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9557        has_space=`$ECHO "$complete" | $GREP " "`
9558        if test "x$has_space" != x; then
9559          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9560$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9561        fi
9562        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9563      fi
9564  fi
9565
9566      # Now join together the path and the arguments once again
9567      if test "x$arguments" != xEOL; then
9568        new_complete="$new_path ${arguments% *}"
9569      else
9570        new_complete="$new_path"
9571      fi
9572
9573  if test "x$complete" != "x$new_complete"; then
9574      FOUND_MAKE="$new_complete"
9575      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9576$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9577    fi
9578
9579        fi
9580      fi
9581    fi
9582  fi
9583
9584        if test "x$FOUND_MAKE" = x; then
9585          for ac_prog in make
9586do
9587  # Extract the first word of "$ac_prog", so it can be a program name with args.
9588set dummy $ac_prog; ac_word=$2
9589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9590$as_echo_n "checking for $ac_word... " >&6; }
9591if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9592  $as_echo_n "(cached) " >&6
9593else
9594  case $CHECK_TOOLSDIR_MAKE in
9595  [\\/]* | ?:[\\/]*)
9596  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9597  ;;
9598  *)
9599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9600for as_dir in $PATH
9601do
9602  IFS=$as_save_IFS
9603  test -z "$as_dir" && as_dir=.
9604    for ac_exec_ext in '' $ac_executable_extensions; do
9605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9606    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9608    break 2
9609  fi
9610done
9611  done
9612IFS=$as_save_IFS
9613
9614  ;;
9615esac
9616fi
9617CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9618if test -n "$CHECK_TOOLSDIR_MAKE"; then
9619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9620$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9621else
9622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9623$as_echo "no" >&6; }
9624fi
9625
9626
9627  test -n "$CHECK_TOOLSDIR_MAKE" && break
9628done
9629
9630
9631  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9632  DESCRIPTION="make in tools-dir"
9633  if test "x$MAKE_CANDIDATE" != x; then
9634    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9635$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9636    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9637    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9638    if test "x$IS_GNU_MAKE" = x; then
9639      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9640$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9641    else
9642      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9643      if test "x$IS_MODERN_MAKE" = x; then
9644        { $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
9645$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;}
9646      else
9647        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9648          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9649            MAKE_EXPECTED_ENV='cygwin'
9650          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9651            MAKE_EXPECTED_ENV='msys'
9652          else
9653            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9654          fi
9655          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9656          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9657        else
9658          # Not relevant for non-Windows
9659          IS_MAKE_CORRECT_ENV=true
9660        fi
9661        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9662          { $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
9663$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;}
9664        else
9665          FOUND_MAKE=$MAKE_CANDIDATE
9666
9667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9668
9669  # First separate the path from the arguments. This will split at the first
9670  # space.
9671  complete="$FOUND_MAKE"
9672  path="${complete%% *}"
9673  tmp="$complete EOL"
9674  arguments="${tmp#* }"
9675
9676  # Input might be given as Windows format, start by converting to
9677  # unix format.
9678  new_path=`$CYGPATH -u "$path"`
9679
9680  # Now try to locate executable using which
9681  new_path=`$WHICH "$new_path" 2> /dev/null`
9682  # bat and cmd files are not always considered executable in cygwin causing which
9683  # to not find them
9684  if test "x$new_path" = x \
9685           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9686           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9687    new_path=`$CYGPATH -u "$path"`
9688  fi
9689  if test "x$new_path" = x; then
9690    # Oops. Which didn't find the executable.
9691    # The splitting of arguments from the executable at a space might have been incorrect,
9692    # since paths with space are more likely in Windows. Give it another try with the whole
9693    # argument.
9694    path="$complete"
9695    arguments="EOL"
9696    new_path=`$CYGPATH -u "$path"`
9697    new_path=`$WHICH "$new_path" 2> /dev/null`
9698    # bat and cmd files are not always considered executable in cygwin causing which
9699    # to not find them
9700    if test "x$new_path" = x \
9701             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9702             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9703      new_path=`$CYGPATH -u "$path"`
9704    fi
9705    if test "x$new_path" = x; then
9706      # It's still not found. Now this is an unrecoverable error.
9707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9708$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9709      has_space=`$ECHO "$complete" | $GREP " "`
9710      if test "x$has_space" != x; then
9711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9713      fi
9714      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9715    fi
9716  fi
9717
9718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9721  # "foo.exe" is OK but "foo" is an error.
9722  #
9723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9724  # It is also a way to make sure we got the proper file name for the real test later on.
9725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9726  if test "x$test_shortpath" = x; then
9727    # Short path failed, file does not exist as specified.
9728    # Try adding .exe or .cmd
9729    if test -f "${new_path}.exe"; then
9730       input_to_shortpath="${new_path}.exe"
9731    elif test -f "${new_path}.cmd"; then
9732       input_to_shortpath="${new_path}.cmd"
9733    else
9734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9735$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9736      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9737$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9738      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9739    fi
9740  else
9741    input_to_shortpath="$new_path"
9742  fi
9743
9744  # Call helper function which possibly converts this using DOS-style short mode.
9745  # If so, the updated path is stored in $new_path.
9746  new_path="$input_to_shortpath"
9747
9748  input_path="$input_to_shortpath"
9749  # Check if we need to convert this using DOS-style short mode. If the path
9750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9751  # take no chances and rewrite it.
9752  # Note: m4 eats our [], so we need to use [ and ] instead.
9753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9754  if test "x$has_forbidden_chars" != x; then
9755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9759      # Going to short mode and back again did indeed matter. Since short mode is
9760      # case insensitive, let's make it lowercase to improve readability.
9761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9762      # Now convert it back to Unix-stile (cygpath)
9763      input_path=`$CYGPATH -u "$shortmode_path"`
9764      new_path="$input_path"
9765    fi
9766  fi
9767
9768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9769  if test "x$test_cygdrive_prefix" = x; then
9770    # As a simple fix, exclude /usr/bin since it's not a real path.
9771    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9773      # a path prefixed by /cygdrive for fixpath to work.
9774      new_path="$CYGWIN_ROOT_PATH$input_path"
9775    fi
9776  fi
9777
9778  # remove trailing .exe if any
9779  new_path="${new_path/%.exe/}"
9780
9781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9782
9783  # First separate the path from the arguments. This will split at the first
9784  # space.
9785  complete="$FOUND_MAKE"
9786  path="${complete%% *}"
9787  tmp="$complete EOL"
9788  arguments="${tmp#* }"
9789
9790  # Input might be given as Windows format, start by converting to
9791  # unix format.
9792  new_path="$path"
9793
9794  windows_path="$new_path"
9795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9796    unix_path=`$CYGPATH -u "$windows_path"`
9797    new_path="$unix_path"
9798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9800    new_path="$unix_path"
9801  fi
9802
9803
9804  # Now try to locate executable using which
9805  new_path=`$WHICH "$new_path" 2> /dev/null`
9806
9807  if test "x$new_path" = x; then
9808    # Oops. Which didn't find the executable.
9809    # The splitting of arguments from the executable at a space might have been incorrect,
9810    # since paths with space are more likely in Windows. Give it another try with the whole
9811    # argument.
9812    path="$complete"
9813    arguments="EOL"
9814    new_path="$path"
9815
9816  windows_path="$new_path"
9817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9818    unix_path=`$CYGPATH -u "$windows_path"`
9819    new_path="$unix_path"
9820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9822    new_path="$unix_path"
9823  fi
9824
9825
9826    new_path=`$WHICH "$new_path" 2> /dev/null`
9827
9828    if test "x$new_path" = x; then
9829      # It's still not found. Now this is an unrecoverable error.
9830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9831$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9832      has_space=`$ECHO "$complete" | $GREP " "`
9833      if test "x$has_space" != x; then
9834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9836      fi
9837      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9838    fi
9839  fi
9840
9841  # Now new_path has a complete unix path to the binary
9842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9843    # Keep paths in /bin as-is, but remove trailing .exe if any
9844    new_path="${new_path/%.exe/}"
9845    # Do not save /bin paths to all_fixpath_prefixes!
9846  else
9847    # Not in mixed or Windows style, start by that.
9848    new_path=`cmd //c echo $new_path`
9849
9850  input_path="$new_path"
9851  # Check if we need to convert this using DOS-style short mode. If the path
9852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9853  # take no chances and rewrite it.
9854  # Note: m4 eats our [], so we need to use [ and ] instead.
9855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9856  if test "x$has_forbidden_chars" != x; then
9857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9859  fi
9860
9861    # Output is in $new_path
9862
9863  windows_path="$new_path"
9864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9865    unix_path=`$CYGPATH -u "$windows_path"`
9866    new_path="$unix_path"
9867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9869    new_path="$unix_path"
9870  fi
9871
9872    # remove trailing .exe if any
9873    new_path="${new_path/%.exe/}"
9874
9875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9877  fi
9878
9879  else
9880    # We're on a posix platform. Hooray! :)
9881    # First separate the path from the arguments. This will split at the first
9882    # space.
9883    complete="$FOUND_MAKE"
9884    path="${complete%% *}"
9885    tmp="$complete EOL"
9886    arguments="${tmp#* }"
9887
9888    # Cannot rely on the command "which" here since it doesn't always work.
9889    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9890    if test -z "$is_absolute_path"; then
9891      # Path to executable is not absolute. Find it.
9892      IFS_save="$IFS"
9893      IFS=:
9894      for p in $PATH; do
9895        if test -f "$p/$path" && test -x "$p/$path"; then
9896          new_path="$p/$path"
9897          break
9898        fi
9899      done
9900      IFS="$IFS_save"
9901    else
9902      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9903$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9904      new_path="$path"
9905    fi
9906
9907    if test "x$new_path" = x; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9909$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9910        has_space=`$ECHO "$complete" | $GREP " "`
9911        if test "x$has_space" != x; then
9912          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9913$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9914        fi
9915        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9916      fi
9917  fi
9918
9919      # Now join together the path and the arguments once again
9920      if test "x$arguments" != xEOL; then
9921        new_complete="$new_path ${arguments% *}"
9922      else
9923        new_complete="$new_path"
9924      fi
9925
9926  if test "x$complete" != "x$new_complete"; then
9927      FOUND_MAKE="$new_complete"
9928      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9929$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9930    fi
9931
9932        fi
9933      fi
9934    fi
9935  fi
9936
9937        fi
9938        PATH=$OLD_PATH
9939      fi
9940    fi
9941
9942    if test "x$FOUND_MAKE" = x; then
9943      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
9944    fi
9945  fi
9946
9947  MAKE=$FOUND_MAKE
9948
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9950$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9951
9952
9953
9954    # Test if find supports -delete
9955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9956$as_echo_n "checking if find supports -delete... " >&6; }
9957    FIND_DELETE="-delete"
9958
9959    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9960
9961    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9962
9963    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9964    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9965        # No, it does not.
9966        rm $DELETEDIR/TestIfFindSupportsDelete
9967        FIND_DELETE="-exec rm \{\} \+"
9968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970    else
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9972$as_echo "yes" >&6; }
9973    fi
9974    rmdir $DELETEDIR
9975
9976
9977
9978# These tools might not be installed by default,
9979# need hint on how to install them.
9980
9981    for ac_prog in unzip
9982do
9983  # Extract the first word of "$ac_prog", so it can be a program name with args.
9984set dummy $ac_prog; ac_word=$2
9985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986$as_echo_n "checking for $ac_word... " >&6; }
9987if test "${ac_cv_path_UNZIP+set}" = set; then :
9988  $as_echo_n "(cached) " >&6
9989else
9990  case $UNZIP in
9991  [\\/]* | ?:[\\/]*)
9992  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9993  ;;
9994  *)
9995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996for as_dir in $PATH
9997do
9998  IFS=$as_save_IFS
9999  test -z "$as_dir" && as_dir=.
10000    for ac_exec_ext in '' $ac_executable_extensions; do
10001  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10002    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004    break 2
10005  fi
10006done
10007  done
10008IFS=$as_save_IFS
10009
10010  ;;
10011esac
10012fi
10013UNZIP=$ac_cv_path_UNZIP
10014if test -n "$UNZIP"; then
10015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10016$as_echo "$UNZIP" >&6; }
10017else
10018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019$as_echo "no" >&6; }
10020fi
10021
10022
10023  test -n "$UNZIP" && break
10024done
10025
10026
10027    if test "x$UNZIP" = x; then
10028        if test "xunzip" = x; then
10029          PROG_NAME=unzip
10030        else
10031          PROG_NAME=unzip
10032        fi
10033        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10034$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10035        as_fn_error $? "Cannot continue" "$LINENO" 5
10036    fi
10037
10038
10039
10040    for ac_prog in zip
10041do
10042  # Extract the first word of "$ac_prog", so it can be a program name with args.
10043set dummy $ac_prog; ac_word=$2
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10045$as_echo_n "checking for $ac_word... " >&6; }
10046if test "${ac_cv_path_ZIP+set}" = set; then :
10047  $as_echo_n "(cached) " >&6
10048else
10049  case $ZIP in
10050  [\\/]* | ?:[\\/]*)
10051  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10052  ;;
10053  *)
10054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10055for as_dir in $PATH
10056do
10057  IFS=$as_save_IFS
10058  test -z "$as_dir" && as_dir=.
10059    for ac_exec_ext in '' $ac_executable_extensions; do
10060  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10061    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10063    break 2
10064  fi
10065done
10066  done
10067IFS=$as_save_IFS
10068
10069  ;;
10070esac
10071fi
10072ZIP=$ac_cv_path_ZIP
10073if test -n "$ZIP"; then
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10075$as_echo "$ZIP" >&6; }
10076else
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10078$as_echo "no" >&6; }
10079fi
10080
10081
10082  test -n "$ZIP" && break
10083done
10084
10085
10086    if test "x$ZIP" = x; then
10087        if test "xzip" = x; then
10088          PROG_NAME=zip
10089        else
10090          PROG_NAME=zip
10091        fi
10092        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10093$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10094        as_fn_error $? "Cannot continue" "$LINENO" 5
10095    fi
10096
10097
10098
10099# Non-required basic tools
10100
10101# Extract the first word of "ldd", so it can be a program name with args.
10102set dummy ldd; ac_word=$2
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104$as_echo_n "checking for $ac_word... " >&6; }
10105if test "${ac_cv_path_LDD+set}" = set; then :
10106  $as_echo_n "(cached) " >&6
10107else
10108  case $LDD in
10109  [\\/]* | ?:[\\/]*)
10110  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10111  ;;
10112  *)
10113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114for as_dir in $PATH
10115do
10116  IFS=$as_save_IFS
10117  test -z "$as_dir" && as_dir=.
10118    for ac_exec_ext in '' $ac_executable_extensions; do
10119  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10120    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122    break 2
10123  fi
10124done
10125  done
10126IFS=$as_save_IFS
10127
10128  ;;
10129esac
10130fi
10131LDD=$ac_cv_path_LDD
10132if test -n "$LDD"; then
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10134$as_echo "$LDD" >&6; }
10135else
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137$as_echo "no" >&6; }
10138fi
10139
10140
10141if test "x$LDD" = "x"; then
10142    # List shared lib dependencies is used for
10143    # debug output and checking for forbidden dependencies.
10144    # We can build without it.
10145    LDD="true"
10146fi
10147# Extract the first word of "otool", so it can be a program name with args.
10148set dummy otool; ac_word=$2
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10150$as_echo_n "checking for $ac_word... " >&6; }
10151if test "${ac_cv_path_OTOOL+set}" = set; then :
10152  $as_echo_n "(cached) " >&6
10153else
10154  case $OTOOL in
10155  [\\/]* | ?:[\\/]*)
10156  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10157  ;;
10158  *)
10159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10160for as_dir in $PATH
10161do
10162  IFS=$as_save_IFS
10163  test -z "$as_dir" && as_dir=.
10164    for ac_exec_ext in '' $ac_executable_extensions; do
10165  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10166    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10168    break 2
10169  fi
10170done
10171  done
10172IFS=$as_save_IFS
10173
10174  ;;
10175esac
10176fi
10177OTOOL=$ac_cv_path_OTOOL
10178if test -n "$OTOOL"; then
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10180$as_echo "$OTOOL" >&6; }
10181else
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
10184fi
10185
10186
10187if test "x$OTOOL" = "x"; then
10188   OTOOL="true"
10189fi
10190for ac_prog in readelf greadelf
10191do
10192  # Extract the first word of "$ac_prog", so it can be a program name with args.
10193set dummy $ac_prog; ac_word=$2
10194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10195$as_echo_n "checking for $ac_word... " >&6; }
10196if test "${ac_cv_path_READELF+set}" = set; then :
10197  $as_echo_n "(cached) " >&6
10198else
10199  case $READELF in
10200  [\\/]* | ?:[\\/]*)
10201  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10202  ;;
10203  *)
10204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10205for as_dir in $PATH
10206do
10207  IFS=$as_save_IFS
10208  test -z "$as_dir" && as_dir=.
10209    for ac_exec_ext in '' $ac_executable_extensions; do
10210  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10211    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10213    break 2
10214  fi
10215done
10216  done
10217IFS=$as_save_IFS
10218
10219  ;;
10220esac
10221fi
10222READELF=$ac_cv_path_READELF
10223if test -n "$READELF"; then
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10225$as_echo "$READELF" >&6; }
10226else
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228$as_echo "no" >&6; }
10229fi
10230
10231
10232  test -n "$READELF" && break
10233done
10234
10235# Extract the first word of "hg", so it can be a program name with args.
10236set dummy hg; ac_word=$2
10237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10238$as_echo_n "checking for $ac_word... " >&6; }
10239if test "${ac_cv_path_HG+set}" = set; then :
10240  $as_echo_n "(cached) " >&6
10241else
10242  case $HG in
10243  [\\/]* | ?:[\\/]*)
10244  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10245  ;;
10246  *)
10247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10248for as_dir in $PATH
10249do
10250  IFS=$as_save_IFS
10251  test -z "$as_dir" && as_dir=.
10252    for ac_exec_ext in '' $ac_executable_extensions; do
10253  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10254    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10256    break 2
10257  fi
10258done
10259  done
10260IFS=$as_save_IFS
10261
10262  ;;
10263esac
10264fi
10265HG=$ac_cv_path_HG
10266if test -n "$HG"; then
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10268$as_echo "$HG" >&6; }
10269else
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271$as_echo "no" >&6; }
10272fi
10273
10274
10275# Extract the first word of "stat", so it can be a program name with args.
10276set dummy stat; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if test "${ac_cv_path_STAT+set}" = set; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $STAT in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10294    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305STAT=$ac_cv_path_STAT
10306if test -n "$STAT"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10308$as_echo "$STAT" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315# Extract the first word of "time", so it can be a program name with args.
10316set dummy time; ac_word=$2
10317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318$as_echo_n "checking for $ac_word... " >&6; }
10319if test "${ac_cv_path_TIME+set}" = set; then :
10320  $as_echo_n "(cached) " >&6
10321else
10322  case $TIME in
10323  [\\/]* | ?:[\\/]*)
10324  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10325  ;;
10326  *)
10327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330  IFS=$as_save_IFS
10331  test -z "$as_dir" && as_dir=.
10332    for ac_exec_ext in '' $ac_executable_extensions; do
10333  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10334    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336    break 2
10337  fi
10338done
10339  done
10340IFS=$as_save_IFS
10341
10342  ;;
10343esac
10344fi
10345TIME=$ac_cv_path_TIME
10346if test -n "$TIME"; then
10347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10348$as_echo "$TIME" >&6; }
10349else
10350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351$as_echo "no" >&6; }
10352fi
10353
10354
10355# Check if it's GNU time
10356IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10357if test "x$IS_GNU_TIME" != x; then
10358  IS_GNU_TIME=yes
10359else
10360  IS_GNU_TIME=no
10361fi
10362
10363
10364if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10365
10366    for ac_prog in comm
10367do
10368  # Extract the first word of "$ac_prog", so it can be a program name with args.
10369set dummy $ac_prog; ac_word=$2
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10371$as_echo_n "checking for $ac_word... " >&6; }
10372if test "${ac_cv_path_COMM+set}" = set; then :
10373  $as_echo_n "(cached) " >&6
10374else
10375  case $COMM in
10376  [\\/]* | ?:[\\/]*)
10377  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10378  ;;
10379  *)
10380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10381for as_dir in $PATH
10382do
10383  IFS=$as_save_IFS
10384  test -z "$as_dir" && as_dir=.
10385    for ac_exec_ext in '' $ac_executable_extensions; do
10386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10387    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10389    break 2
10390  fi
10391done
10392  done
10393IFS=$as_save_IFS
10394
10395  ;;
10396esac
10397fi
10398COMM=$ac_cv_path_COMM
10399if test -n "$COMM"; then
10400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10401$as_echo "$COMM" >&6; }
10402else
10403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
10405fi
10406
10407
10408  test -n "$COMM" && break
10409done
10410
10411
10412    if test "x$COMM" = x; then
10413        if test "xcomm" = x; then
10414          PROG_NAME=comm
10415        else
10416          PROG_NAME=comm
10417        fi
10418        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10419$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10420        as_fn_error $? "Cannot continue" "$LINENO" 5
10421    fi
10422
10423
10424fi
10425
10426if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10427
10428    for ac_prog in xattr
10429do
10430  # Extract the first word of "$ac_prog", so it can be a program name with args.
10431set dummy $ac_prog; ac_word=$2
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10433$as_echo_n "checking for $ac_word... " >&6; }
10434if test "${ac_cv_path_XATTR+set}" = set; then :
10435  $as_echo_n "(cached) " >&6
10436else
10437  case $XATTR in
10438  [\\/]* | ?:[\\/]*)
10439  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10440  ;;
10441  *)
10442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10443for as_dir in $PATH
10444do
10445  IFS=$as_save_IFS
10446  test -z "$as_dir" && as_dir=.
10447    for ac_exec_ext in '' $ac_executable_extensions; do
10448  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10449    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10451    break 2
10452  fi
10453done
10454  done
10455IFS=$as_save_IFS
10456
10457  ;;
10458esac
10459fi
10460XATTR=$ac_cv_path_XATTR
10461if test -n "$XATTR"; then
10462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10463$as_echo "$XATTR" >&6; }
10464else
10465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10466$as_echo "no" >&6; }
10467fi
10468
10469
10470  test -n "$XATTR" && break
10471done
10472
10473
10474    if test "x$XATTR" = x; then
10475        if test "xxattr" = x; then
10476          PROG_NAME=xattr
10477        else
10478          PROG_NAME=xattr
10479        fi
10480        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10481$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10482        as_fn_error $? "Cannot continue" "$LINENO" 5
10483    fi
10484
10485
10486  # Extract the first word of "codesign", so it can be a program name with args.
10487set dummy codesign; ac_word=$2
10488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10489$as_echo_n "checking for $ac_word... " >&6; }
10490if test "${ac_cv_path_CODESIGN+set}" = set; then :
10491  $as_echo_n "(cached) " >&6
10492else
10493  case $CODESIGN in
10494  [\\/]* | ?:[\\/]*)
10495  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10496  ;;
10497  *)
10498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10499for as_dir in $PATH
10500do
10501  IFS=$as_save_IFS
10502  test -z "$as_dir" && as_dir=.
10503    for ac_exec_ext in '' $ac_executable_extensions; do
10504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10505    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10507    break 2
10508  fi
10509done
10510  done
10511IFS=$as_save_IFS
10512
10513  ;;
10514esac
10515fi
10516CODESIGN=$ac_cv_path_CODESIGN
10517if test -n "$CODESIGN"; then
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10519$as_echo "$CODESIGN" >&6; }
10520else
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
10523fi
10524
10525
10526  if test "x$CODESIGN" != "x"; then
10527    # Verify that the openjdk_codesign certificate is present
10528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10529$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10530    rm -f codesign-testfile
10531    touch codesign-testfile
10532    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10533    rm -f codesign-testfile
10534    if test "x$CODESIGN" = x; then
10535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10536$as_echo "no" >&6; }
10537    else
10538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10539$as_echo "yes" >&6; }
10540    fi
10541  fi
10542fi
10543
10544
10545# Check if pkg-config is available.
10546
10547
10548if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10549	if test -n "$ac_tool_prefix"; then
10550  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10551set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10553$as_echo_n "checking for $ac_word... " >&6; }
10554if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10555  $as_echo_n "(cached) " >&6
10556else
10557  case $PKG_CONFIG in
10558  [\\/]* | ?:[\\/]*)
10559  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10560  ;;
10561  *)
10562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563for as_dir in $PATH
10564do
10565  IFS=$as_save_IFS
10566  test -z "$as_dir" && as_dir=.
10567    for ac_exec_ext in '' $ac_executable_extensions; do
10568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10569    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10571    break 2
10572  fi
10573done
10574  done
10575IFS=$as_save_IFS
10576
10577  ;;
10578esac
10579fi
10580PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10581if test -n "$PKG_CONFIG"; then
10582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10583$as_echo "$PKG_CONFIG" >&6; }
10584else
10585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586$as_echo "no" >&6; }
10587fi
10588
10589
10590fi
10591if test -z "$ac_cv_path_PKG_CONFIG"; then
10592  ac_pt_PKG_CONFIG=$PKG_CONFIG
10593  # Extract the first word of "pkg-config", so it can be a program name with args.
10594set dummy pkg-config; ac_word=$2
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596$as_echo_n "checking for $ac_word... " >&6; }
10597if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10598  $as_echo_n "(cached) " >&6
10599else
10600  case $ac_pt_PKG_CONFIG in
10601  [\\/]* | ?:[\\/]*)
10602  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10603  ;;
10604  *)
10605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10606for as_dir in $PATH
10607do
10608  IFS=$as_save_IFS
10609  test -z "$as_dir" && as_dir=.
10610    for ac_exec_ext in '' $ac_executable_extensions; do
10611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10612    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10614    break 2
10615  fi
10616done
10617  done
10618IFS=$as_save_IFS
10619
10620  ;;
10621esac
10622fi
10623ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10624if test -n "$ac_pt_PKG_CONFIG"; then
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10626$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10627else
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
10630fi
10631
10632  if test "x$ac_pt_PKG_CONFIG" = x; then
10633    PKG_CONFIG=""
10634  else
10635    case $cross_compiling:$ac_tool_warned in
10636yes:)
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10639ac_tool_warned=yes ;;
10640esac
10641    PKG_CONFIG=$ac_pt_PKG_CONFIG
10642  fi
10643else
10644  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10645fi
10646
10647fi
10648if test -n "$PKG_CONFIG"; then
10649	_pkg_min_version=0.9.0
10650	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10651$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10652	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10653		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10654$as_echo "yes" >&6; }
10655	else
10656		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658		PKG_CONFIG=""
10659	fi
10660
10661fi
10662
10663# After basic tools have been setup, we can check build os specific details.
10664
10665###############################################################################
10666
10667# Note that this is the build platform OS version!
10668
10669OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10670OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10671OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10672OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10673
10674
10675
10676
10677
10678# Setup builddeps, for automatic downloading of tools we need.
10679# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10680# boot-jdk setup, but we need to have basic tools setup first.
10681
10682
10683# Check whether --with-builddeps-conf was given.
10684if test "${with_builddeps_conf+set}" = set; then :
10685  withval=$with_builddeps_conf;
10686fi
10687
10688
10689
10690# Check whether --with-builddeps-server was given.
10691if test "${with_builddeps_server+set}" = set; then :
10692  withval=$with_builddeps_server;
10693fi
10694
10695
10696
10697# Check whether --with-builddeps-dir was given.
10698if test "${with_builddeps_dir+set}" = set; then :
10699  withval=$with_builddeps_dir;
10700else
10701  with_builddeps_dir=/localhome/builddeps
10702fi
10703
10704
10705
10706# Check whether --with-builddeps-group was given.
10707if test "${with_builddeps_group+set}" = set; then :
10708  withval=$with_builddeps_group;
10709fi
10710
10711
10712
10713
10714    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10715        if test "x$with_builddeps_conf" != x; then
10716            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10717$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10718            builddepsfile=$with_builddeps_conf
10719            if test -s $builddepsfile; then
10720                . $builddepsfile
10721                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10722$as_echo "loaded!" >&6; }
10723            else
10724               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10725           fi
10726        else
10727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10728$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10729            builddepsfile=`mktemp`
10730            touch $builddepsfile
10731            # Put all found confs into a single file.
10732            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10733            # Source the file to acquire the variables
10734            if test -s $builddepsfile; then
10735                . $builddepsfile
10736                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10737$as_echo "found at least one!" >&6; }
10738            else
10739               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10740           fi
10741        fi
10742        # Create build and target names that use _ instead of "-" and ".".
10743        # This is necessary to use them in variable names.
10744        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10745        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10746        # Extract rewrite information for build and target
10747        eval rewritten_build=\${REWRITE_${build_var}}
10748        if test "x$rewritten_build" = x; then
10749            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10750            echo Build stays the same $rewritten_build
10751        else
10752            echo Rewriting build for builddeps into $rewritten_build
10753        fi
10754        eval rewritten_target=\${REWRITE_${target_var}}
10755        if test "x$rewritten_target" = x; then
10756            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10757            echo Target stays the same $rewritten_target
10758        else
10759            echo Rewriting target for builddeps into $rewritten_target
10760        fi
10761        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10762        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10763    fi
10764    for ac_prog in 7z unzip
10765do
10766  # Extract the first word of "$ac_prog", so it can be a program name with args.
10767set dummy $ac_prog; ac_word=$2
10768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10769$as_echo_n "checking for $ac_word... " >&6; }
10770if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10771  $as_echo_n "(cached) " >&6
10772else
10773  if test -n "$BDEPS_UNZIP"; then
10774  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10775else
10776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10777for as_dir in $PATH
10778do
10779  IFS=$as_save_IFS
10780  test -z "$as_dir" && as_dir=.
10781    for ac_exec_ext in '' $ac_executable_extensions; do
10782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10783    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10785    break 2
10786  fi
10787done
10788  done
10789IFS=$as_save_IFS
10790
10791fi
10792fi
10793BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10794if test -n "$BDEPS_UNZIP"; then
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10796$as_echo "$BDEPS_UNZIP" >&6; }
10797else
10798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10799$as_echo "no" >&6; }
10800fi
10801
10802
10803  test -n "$BDEPS_UNZIP" && break
10804done
10805
10806    if test "x$BDEPS_UNZIP" = x7z; then
10807        BDEPS_UNZIP="7z x"
10808    fi
10809
10810    for ac_prog in wget lftp ftp
10811do
10812  # Extract the first word of "$ac_prog", so it can be a program name with args.
10813set dummy $ac_prog; ac_word=$2
10814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10815$as_echo_n "checking for $ac_word... " >&6; }
10816if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10817  $as_echo_n "(cached) " >&6
10818else
10819  if test -n "$BDEPS_FTP"; then
10820  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10821else
10822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10823for as_dir in $PATH
10824do
10825  IFS=$as_save_IFS
10826  test -z "$as_dir" && as_dir=.
10827    for ac_exec_ext in '' $ac_executable_extensions; do
10828  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10829    ac_cv_prog_BDEPS_FTP="$ac_prog"
10830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10831    break 2
10832  fi
10833done
10834  done
10835IFS=$as_save_IFS
10836
10837fi
10838fi
10839BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10840if test -n "$BDEPS_FTP"; then
10841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10842$as_echo "$BDEPS_FTP" >&6; }
10843else
10844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10845$as_echo "no" >&6; }
10846fi
10847
10848
10849  test -n "$BDEPS_FTP" && break
10850done
10851
10852
10853
10854###############################################################################
10855#
10856# Determine OpenJDK variants, options and version numbers.
10857#
10858###############################################################################
10859
10860# We need build & target for this.
10861
10862
10863###############################################################################
10864#
10865# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10866# We always build headless support.
10867#
10868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10869$as_echo_n "checking headful support... " >&6; }
10870# Check whether --enable-headful was given.
10871if test "${enable_headful+set}" = set; then :
10872  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10873else
10874  SUPPORT_HEADFUL=yes
10875fi
10876
10877
10878SUPPORT_HEADLESS=yes
10879BUILD_HEADLESS="BUILD_HEADLESS:=true"
10880
10881if test "x$SUPPORT_HEADFUL" = xyes; then
10882    # We are building both headful and headless.
10883    headful_msg="inlude support for both headful and headless"
10884fi
10885
10886if test "x$SUPPORT_HEADFUL" = xno; then
10887    # Thus we are building headless only.
10888    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10889    headful_msg="headless only"
10890fi
10891
10892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10893$as_echo "$headful_msg" >&6; }
10894
10895
10896
10897
10898
10899# Control wether Hotspot runs Queens test after build.
10900# Check whether --enable-hotspot-test-in-build was given.
10901if test "${enable_hotspot_test_in_build+set}" = set; then :
10902  enableval=$enable_hotspot_test_in_build;
10903else
10904  enable_hotspot_test_in_build=no
10905fi
10906
10907if test "x$enable_hotspot_test_in_build" = "xyes"; then
10908    TEST_IN_BUILD=true
10909else
10910    TEST_IN_BUILD=false
10911fi
10912
10913
10914###############################################################################
10915#
10916# Choose cacerts source file
10917#
10918
10919# Check whether --with-cacerts-file was given.
10920if test "${with_cacerts_file+set}" = set; then :
10921  withval=$with_cacerts_file;
10922fi
10923
10924if test "x$with_cacerts_file" != x; then
10925    CACERTS_FILE=$with_cacerts_file
10926else
10927    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10928fi
10929
10930
10931###############################################################################
10932#
10933# Enable or disable unlimited crypto
10934#
10935# Check whether --enable-unlimited-crypto was given.
10936if test "${enable_unlimited_crypto+set}" = set; then :
10937  enableval=$enable_unlimited_crypto;
10938else
10939  enable_unlimited_crypto=no
10940fi
10941
10942if test "x$enable_unlimited_crypto" = "xyes"; then
10943    UNLIMITED_CRYPTO=true
10944else
10945    UNLIMITED_CRYPTO=false
10946fi
10947
10948
10949###############################################################################
10950#
10951# Enable or disable the elliptic curve crypto implementation
10952#
10953
10954
10955###############################################################################
10956#
10957# Compress jars
10958#
10959COMPRESS_JARS=false
10960
10961
10962
10963
10964# Source the version numbers
10965. $AUTOCONF_DIR/version-numbers
10966
10967# Get the settings from parameters
10968
10969# Check whether --with-milestone was given.
10970if test "${with_milestone+set}" = set; then :
10971  withval=$with_milestone;
10972fi
10973
10974if test "x$with_milestone" = xyes; then
10975  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10976elif test "x$with_milestone" != x; then
10977    MILESTONE="$with_milestone"
10978fi
10979if test "x$MILESTONE" = x; then
10980  MILESTONE=internal
10981fi
10982
10983
10984# Check whether --with-update-version was given.
10985if test "${with_update_version+set}" = set; then :
10986  withval=$with_update_version;
10987fi
10988
10989if test "x$with_update_version" = xyes; then
10990  as_fn_error $? "Update version must have a value" "$LINENO" 5
10991elif test "x$with_update_version" != x; then
10992  JDK_UPDATE_VERSION="$with_update_version"
10993fi
10994
10995
10996# Check whether --with-build-number was given.
10997if test "${with_build_number+set}" = set; then :
10998  withval=$with_build_number;
10999fi
11000
11001if test "x$with_build_number" = xyes; then
11002  as_fn_error $? "Build number must have a value" "$LINENO" 5
11003elif test "x$with_build_number" != x; then
11004  JDK_BUILD_NUMBER="$with_build_number"
11005fi
11006if test "x$JDK_BUILD_NUMBER" = x; then
11007  JDK_BUILD_NUMBER=b00
11008fi
11009
11010
11011# Check whether --with-user-release-suffix was given.
11012if test "${with_user_release_suffix+set}" = set; then :
11013  withval=$with_user_release_suffix;
11014fi
11015
11016if test "x$with_user_release_suffix" = xyes; then
11017  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11018elif test "x$with_user_release_suffix" != x; then
11019  USER_RELEASE_SUFFIX="$with_user_release_suffix"
11020else
11021  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11022  # Avoid [:alnum:] since it depends on the locale.
11023  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11024  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11025fi
11026
11027
11028# Now set the JDK version, milestone, build number etc.
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043COPYRIGHT_YEAR=`date +'%Y'`
11044
11045
11046if test "x$JDK_UPDATE_VERSION" != x; then
11047  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11048else
11049  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11050fi
11051
11052
11053COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11054
11055
11056
11057###############################################################################
11058#
11059# Setup BootJDK, used to bootstrap the build.
11060#
11061###############################################################################
11062
11063
11064BOOT_JDK_FOUND=no
11065
11066# Check whether --with-boot-jdk was given.
11067if test "${with_boot_jdk+set}" = set; then :
11068  withval=$with_boot_jdk;
11069fi
11070
11071
11072# We look for the Boot JDK through various means, going from more certain to
11073# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11074# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11075# must check if this is indeed valid; otherwise we'll continue looking.
11076
11077# Test: Is bootjdk explicitely set by command line arguments?
11078
11079  if test "x$BOOT_JDK_FOUND" = xno; then
11080    # Now execute the test
11081
11082if test "x$with_boot_jdk" != x; then
11083    BOOT_JDK=$with_boot_jdk
11084    BOOT_JDK_FOUND=maybe
11085    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11086$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11087fi
11088
11089
11090    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11091    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11092      # Do we have a bin/java?
11093      if test ! -x "$BOOT_JDK/bin/java"; then
11094        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11096        BOOT_JDK_FOUND=no
11097      else
11098        # Do we have a bin/javac?
11099        if test ! -x "$BOOT_JDK/bin/javac"; then
11100          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11102          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11103$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11104          BOOT_JDK_FOUND=no
11105        else
11106          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11107          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11108            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11110            BOOT_JDK_FOUND=no
11111          else
11112            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11113            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11114
11115            # Extra M4 quote needed to protect [] in grep expression.
11116            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11117            if test "x$FOUND_VERSION_78" = x; then
11118              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11120              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11121$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11122              BOOT_JDK_FOUND=no
11123            else
11124              # We're done! :-)
11125              BOOT_JDK_FOUND=yes
11126
11127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11128
11129  # Input might be given as Windows format, start by converting to
11130  # unix format.
11131  path="$BOOT_JDK"
11132  new_path=`$CYGPATH -u "$path"`
11133
11134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11137  # "foo.exe" is OK but "foo" is an error.
11138  #
11139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11140  # It is also a way to make sure we got the proper file name for the real test later on.
11141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11142  if test "x$test_shortpath" = x; then
11143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11146  fi
11147
11148  # Call helper function which possibly converts this using DOS-style short mode.
11149  # If so, the updated path is stored in $new_path.
11150
11151  input_path="$new_path"
11152  # Check if we need to convert this using DOS-style short mode. If the path
11153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11154  # take no chances and rewrite it.
11155  # Note: m4 eats our [], so we need to use [ and ] instead.
11156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11157  if test "x$has_forbidden_chars" != x; then
11158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11162      # Going to short mode and back again did indeed matter. Since short mode is
11163      # case insensitive, let's make it lowercase to improve readability.
11164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11165      # Now convert it back to Unix-stile (cygpath)
11166      input_path=`$CYGPATH -u "$shortmode_path"`
11167      new_path="$input_path"
11168    fi
11169  fi
11170
11171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11172  if test "x$test_cygdrive_prefix" = x; then
11173    # As a simple fix, exclude /usr/bin since it's not a real path.
11174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11176      # a path prefixed by /cygdrive for fixpath to work.
11177      new_path="$CYGWIN_ROOT_PATH$input_path"
11178    fi
11179  fi
11180
11181
11182  if test "x$path" != "x$new_path"; then
11183    BOOT_JDK="$new_path"
11184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11186  fi
11187
11188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11189
11190  path="$BOOT_JDK"
11191  has_colon=`$ECHO $path | $GREP ^.:`
11192  new_path="$path"
11193  if test "x$has_colon" = x; then
11194    # Not in mixed or Windows style, start by that.
11195    new_path=`cmd //c echo $path`
11196  fi
11197
11198
11199  input_path="$new_path"
11200  # Check if we need to convert this using DOS-style short mode. If the path
11201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11202  # take no chances and rewrite it.
11203  # Note: m4 eats our [], so we need to use [ and ] instead.
11204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11205  if test "x$has_forbidden_chars" != x; then
11206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11208  fi
11209
11210
11211  windows_path="$new_path"
11212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11213    unix_path=`$CYGPATH -u "$windows_path"`
11214    new_path="$unix_path"
11215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11217    new_path="$unix_path"
11218  fi
11219
11220  if test "x$path" != "x$new_path"; then
11221    BOOT_JDK="$new_path"
11222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11224  fi
11225
11226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11228
11229  else
11230    # We're on a posix platform. Hooray! :)
11231    path="$BOOT_JDK"
11232    has_space=`$ECHO "$path" | $GREP " "`
11233    if test "x$has_space" != x; then
11234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11236      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11237    fi
11238
11239    # Use eval to expand a potential ~
11240    eval path="$path"
11241    if test ! -f "$path" && test ! -d "$path"; then
11242      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11243    fi
11244
11245    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11246  fi
11247
11248              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11249$as_echo_n "checking for Boot JDK... " >&6; }
11250              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11251$as_echo "$BOOT_JDK" >&6; }
11252              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11253$as_echo_n "checking Boot JDK version... " >&6; }
11254              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11255              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11256$as_echo "$BOOT_JDK_VERSION" >&6; }
11257            fi # end check jdk version
11258          fi # end check rt.jar
11259        fi # end check javac
11260      fi # end check java
11261    fi # end check boot jdk found
11262  fi
11263
11264if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11265  # Having specified an argument which is incorrect will produce an instant failure;
11266  # we should not go on looking
11267  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11268fi
11269
11270# Test: Is bootjdk available from builddeps?
11271
11272  if test "x$BOOT_JDK_FOUND" = xno; then
11273    # Now execute the test
11274
11275
11276
11277    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11278        # Source the builddeps file again, to make sure it uses the latest variables!
11279        . $builddepsfile
11280        # Look for a target and build machine specific resource!
11281        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11282        if test "x$resource" = x; then
11283            # Ok, lets instead look for a target specific resource
11284            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11285        fi
11286        if test "x$resource" = x; then
11287            # Ok, lets instead look for a build specific resource
11288            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11289        fi
11290        if test "x$resource" = x; then
11291            # Ok, lets instead look for a generic resource
11292            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11293            resource=${builddep_bootjdk}
11294        fi
11295        if test "x$resource" != x; then
11296            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11297$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11298	    # If the resource in the builddeps.conf file is an existing directory,
11299	    # for example /java/linux/cups
11300	    if test -d ${resource}; then
11301	       depdir=${resource}
11302	    else
11303
11304# bootjdk is for example mymodule
11305# $resource is for example libs/general/libmymod_1_2_3.zip
11306# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11307# $with_builddeps_dir is for example /localhome/builddeps
11308# depdir is the name of the variable into which we store the depdir, eg MYMOD
11309# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11310# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11311    filename=`basename $resource`
11312    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11313    filebase=${filename%%.*}
11314    extension=${filename#*.}
11315    installdir=$with_builddeps_dir/$filebase
11316    if test ! -f $installdir/$filename.unpacked; then
11317        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11318$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11319        if test ! -d $installdir; then
11320            mkdir -p $installdir
11321        fi
11322        if test ! -d $installdir; then
11323            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11324        fi
11325        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11326        touch $tmpfile
11327        if test ! -f $tmpfile; then
11328            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11329        fi
11330
11331    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11332    # $tmpfile is the local file name for the downloaded file.
11333    VALID_TOOL=no
11334    if test "x$BDEPS_FTP" = xwget; then
11335       VALID_TOOL=yes
11336       wget -O $tmpfile $with_builddeps_server/$resource
11337    fi
11338    if test "x$BDEPS_FTP" = xlftp; then
11339       VALID_TOOL=yes
11340       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11341    fi
11342    if test "x$BDEPS_FTP" = xftp; then
11343        VALID_TOOL=yes
11344        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11345        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11346        FTPUSERPWD=${FTPSERVER%%@*}
11347        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11348            FTPUSER=${userpwd%%:*}
11349            FTPPWD=${userpwd#*@}
11350            FTPSERVER=${FTPSERVER#*@}
11351        else
11352            FTPUSER=ftp
11353            FTPPWD=ftp
11354        fi
11355        # the "pass" command does not work on some
11356        # ftp clients (read ftp.exe) but if it works,
11357        # passive mode is better!
11358        (\
11359            echo "user $FTPUSER $FTPPWD"        ;\
11360            echo "pass"                         ;\
11361            echo "bin"                          ;\
11362            echo "get $FTPPATH $tmpfile"              ;\
11363        ) | ftp -in $FTPSERVER
11364    fi
11365    if test "x$VALID_TOOL" != xyes; then
11366       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11367    fi
11368
11369        mv $tmpfile $installdir/$filename
11370        if test ! -s $installdir/$filename; then
11371            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11372        fi
11373        case "$extension" in
11374            zip)  echo "Unzipping $installdir/$filename..."
11375               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11376            ;;
11377            tar.gz) echo "Untaring $installdir/$filename..."
11378               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11379            ;;
11380            tgz) echo "Untaring $installdir/$filename..."
11381               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11382            ;;
11383            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11384            ;;
11385        esac
11386    fi
11387    if test -f $installdir/$filename.unpacked; then
11388        depdir=$installdir
11389    fi
11390
11391	    fi
11392            # Source the builddeps file again, because in the previous command, the depdir
11393            # was updated to point at the current build dependency install directory.
11394            . $builddepsfile
11395            # Now extract variables from the builddeps.conf files.
11396            theroot=${builddep_bootjdk_ROOT}
11397            thecflags=${builddep_bootjdk_CFLAGS}
11398            thelibs=${builddep_bootjdk_LIBS}
11399            if test "x$depdir" = x; then
11400                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11401            fi
11402            BOOT_JDK=$depdir
11403            if test "x$theroot" != x; then
11404               BOOT_JDK="$theroot"
11405            fi
11406            if test "x$thecflags" != x; then
11407               BOOT_JDK_CFLAGS="$thecflags"
11408            fi
11409            if test "x$thelibs" != x; then
11410               BOOT_JDK_LIBS="$thelibs"
11411            fi
11412            BOOT_JDK_FOUND=maybe
11413            else BOOT_JDK_FOUND=no
11414
11415        fi
11416        else BOOT_JDK_FOUND=no
11417
11418    fi
11419
11420
11421
11422    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11423    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11424      # Do we have a bin/java?
11425      if test ! -x "$BOOT_JDK/bin/java"; then
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11428        BOOT_JDK_FOUND=no
11429      else
11430        # Do we have a bin/javac?
11431        if test ! -x "$BOOT_JDK/bin/javac"; then
11432          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11434          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11435$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11436          BOOT_JDK_FOUND=no
11437        else
11438          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11439          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11440            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11442            BOOT_JDK_FOUND=no
11443          else
11444            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11445            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11446
11447            # Extra M4 quote needed to protect [] in grep expression.
11448            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11449            if test "x$FOUND_VERSION_78" = x; then
11450              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11452              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11453$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11454              BOOT_JDK_FOUND=no
11455            else
11456              # We're done! :-)
11457              BOOT_JDK_FOUND=yes
11458
11459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11460
11461  # Input might be given as Windows format, start by converting to
11462  # unix format.
11463  path="$BOOT_JDK"
11464  new_path=`$CYGPATH -u "$path"`
11465
11466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11469  # "foo.exe" is OK but "foo" is an error.
11470  #
11471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11472  # It is also a way to make sure we got the proper file name for the real test later on.
11473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11474  if test "x$test_shortpath" = x; then
11475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11477    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11478  fi
11479
11480  # Call helper function which possibly converts this using DOS-style short mode.
11481  # If so, the updated path is stored in $new_path.
11482
11483  input_path="$new_path"
11484  # Check if we need to convert this using DOS-style short mode. If the path
11485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11486  # take no chances and rewrite it.
11487  # Note: m4 eats our [], so we need to use [ and ] instead.
11488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11489  if test "x$has_forbidden_chars" != x; then
11490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11494      # Going to short mode and back again did indeed matter. Since short mode is
11495      # case insensitive, let's make it lowercase to improve readability.
11496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11497      # Now convert it back to Unix-stile (cygpath)
11498      input_path=`$CYGPATH -u "$shortmode_path"`
11499      new_path="$input_path"
11500    fi
11501  fi
11502
11503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11504  if test "x$test_cygdrive_prefix" = x; then
11505    # As a simple fix, exclude /usr/bin since it's not a real path.
11506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11508      # a path prefixed by /cygdrive for fixpath to work.
11509      new_path="$CYGWIN_ROOT_PATH$input_path"
11510    fi
11511  fi
11512
11513
11514  if test "x$path" != "x$new_path"; then
11515    BOOT_JDK="$new_path"
11516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11518  fi
11519
11520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11521
11522  path="$BOOT_JDK"
11523  has_colon=`$ECHO $path | $GREP ^.:`
11524  new_path="$path"
11525  if test "x$has_colon" = x; then
11526    # Not in mixed or Windows style, start by that.
11527    new_path=`cmd //c echo $path`
11528  fi
11529
11530
11531  input_path="$new_path"
11532  # Check if we need to convert this using DOS-style short mode. If the path
11533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11534  # take no chances and rewrite it.
11535  # Note: m4 eats our [], so we need to use [ and ] instead.
11536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11537  if test "x$has_forbidden_chars" != x; then
11538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11540  fi
11541
11542
11543  windows_path="$new_path"
11544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11545    unix_path=`$CYGPATH -u "$windows_path"`
11546    new_path="$unix_path"
11547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11549    new_path="$unix_path"
11550  fi
11551
11552  if test "x$path" != "x$new_path"; then
11553    BOOT_JDK="$new_path"
11554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11556  fi
11557
11558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11560
11561  else
11562    # We're on a posix platform. Hooray! :)
11563    path="$BOOT_JDK"
11564    has_space=`$ECHO "$path" | $GREP " "`
11565    if test "x$has_space" != x; then
11566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11568      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11569    fi
11570
11571    # Use eval to expand a potential ~
11572    eval path="$path"
11573    if test ! -f "$path" && test ! -d "$path"; then
11574      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11575    fi
11576
11577    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11578  fi
11579
11580              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11581$as_echo_n "checking for Boot JDK... " >&6; }
11582              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11583$as_echo "$BOOT_JDK" >&6; }
11584              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11585$as_echo_n "checking Boot JDK version... " >&6; }
11586              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11587              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11588$as_echo "$BOOT_JDK_VERSION" >&6; }
11589            fi # end check jdk version
11590          fi # end check rt.jar
11591        fi # end check javac
11592      fi # end check java
11593    fi # end check boot jdk found
11594  fi
11595
11596
11597# Test: Is $JAVA_HOME set?
11598
11599  if test "x$BOOT_JDK_FOUND" = xno; then
11600    # Now execute the test
11601
11602    if test "x$JAVA_HOME" != x; then
11603        JAVA_HOME_PROCESSED="$JAVA_HOME"
11604
11605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11606
11607  # Input might be given as Windows format, start by converting to
11608  # unix format.
11609  path="$JAVA_HOME_PROCESSED"
11610  new_path=`$CYGPATH -u "$path"`
11611
11612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11615  # "foo.exe" is OK but "foo" is an error.
11616  #
11617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11618  # It is also a way to make sure we got the proper file name for the real test later on.
11619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11620  if test "x$test_shortpath" = x; then
11621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11622$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11623    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11624  fi
11625
11626  # Call helper function which possibly converts this using DOS-style short mode.
11627  # If so, the updated path is stored in $new_path.
11628
11629  input_path="$new_path"
11630  # Check if we need to convert this using DOS-style short mode. If the path
11631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11632  # take no chances and rewrite it.
11633  # Note: m4 eats our [], so we need to use [ and ] instead.
11634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11635  if test "x$has_forbidden_chars" != x; then
11636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11640      # Going to short mode and back again did indeed matter. Since short mode is
11641      # case insensitive, let's make it lowercase to improve readability.
11642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11643      # Now convert it back to Unix-stile (cygpath)
11644      input_path=`$CYGPATH -u "$shortmode_path"`
11645      new_path="$input_path"
11646    fi
11647  fi
11648
11649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11650  if test "x$test_cygdrive_prefix" = x; then
11651    # As a simple fix, exclude /usr/bin since it's not a real path.
11652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11654      # a path prefixed by /cygdrive for fixpath to work.
11655      new_path="$CYGWIN_ROOT_PATH$input_path"
11656    fi
11657  fi
11658
11659
11660  if test "x$path" != "x$new_path"; then
11661    JAVA_HOME_PROCESSED="$new_path"
11662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11663$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11664  fi
11665
11666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11667
11668  path="$JAVA_HOME_PROCESSED"
11669  has_colon=`$ECHO $path | $GREP ^.:`
11670  new_path="$path"
11671  if test "x$has_colon" = x; then
11672    # Not in mixed or Windows style, start by that.
11673    new_path=`cmd //c echo $path`
11674  fi
11675
11676
11677  input_path="$new_path"
11678  # Check if we need to convert this using DOS-style short mode. If the path
11679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11680  # take no chances and rewrite it.
11681  # Note: m4 eats our [], so we need to use [ and ] instead.
11682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11683  if test "x$has_forbidden_chars" != x; then
11684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11686  fi
11687
11688
11689  windows_path="$new_path"
11690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11691    unix_path=`$CYGPATH -u "$windows_path"`
11692    new_path="$unix_path"
11693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11695    new_path="$unix_path"
11696  fi
11697
11698  if test "x$path" != "x$new_path"; then
11699    JAVA_HOME_PROCESSED="$new_path"
11700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11701$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11702  fi
11703
11704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11706
11707  else
11708    # We're on a posix platform. Hooray! :)
11709    path="$JAVA_HOME_PROCESSED"
11710    has_space=`$ECHO "$path" | $GREP " "`
11711    if test "x$has_space" != x; then
11712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11713$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11714      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11715    fi
11716
11717    # Use eval to expand a potential ~
11718    eval path="$path"
11719    if test ! -f "$path" && test ! -d "$path"; then
11720      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11721    fi
11722
11723    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11724  fi
11725
11726        if test ! -d "$JAVA_HOME_PROCESSED"; then
11727            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11728$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11729        else
11730          # Aha, the user has set a JAVA_HOME
11731          # let us use that as the Boot JDK.
11732          BOOT_JDK="$JAVA_HOME_PROCESSED"
11733          BOOT_JDK_FOUND=maybe
11734          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11735$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11736        fi
11737    fi
11738
11739
11740    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11741    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11742      # Do we have a bin/java?
11743      if test ! -x "$BOOT_JDK/bin/java"; then
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11746        BOOT_JDK_FOUND=no
11747      else
11748        # Do we have a bin/javac?
11749        if test ! -x "$BOOT_JDK/bin/javac"; then
11750          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11752          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11753$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11754          BOOT_JDK_FOUND=no
11755        else
11756          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11757          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11758            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11760            BOOT_JDK_FOUND=no
11761          else
11762            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11764
11765            # Extra M4 quote needed to protect [] in grep expression.
11766            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11767            if test "x$FOUND_VERSION_78" = x; then
11768              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11770              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11771$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11772              BOOT_JDK_FOUND=no
11773            else
11774              # We're done! :-)
11775              BOOT_JDK_FOUND=yes
11776
11777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11778
11779  # Input might be given as Windows format, start by converting to
11780  # unix format.
11781  path="$BOOT_JDK"
11782  new_path=`$CYGPATH -u "$path"`
11783
11784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11787  # "foo.exe" is OK but "foo" is an error.
11788  #
11789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11790  # It is also a way to make sure we got the proper file name for the real test later on.
11791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11792  if test "x$test_shortpath" = x; then
11793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11795    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11796  fi
11797
11798  # Call helper function which possibly converts this using DOS-style short mode.
11799  # If so, the updated path is stored in $new_path.
11800
11801  input_path="$new_path"
11802  # Check if we need to convert this using DOS-style short mode. If the path
11803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11804  # take no chances and rewrite it.
11805  # Note: m4 eats our [], so we need to use [ and ] instead.
11806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11807  if test "x$has_forbidden_chars" != x; then
11808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11812      # Going to short mode and back again did indeed matter. Since short mode is
11813      # case insensitive, let's make it lowercase to improve readability.
11814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11815      # Now convert it back to Unix-stile (cygpath)
11816      input_path=`$CYGPATH -u "$shortmode_path"`
11817      new_path="$input_path"
11818    fi
11819  fi
11820
11821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11822  if test "x$test_cygdrive_prefix" = x; then
11823    # As a simple fix, exclude /usr/bin since it's not a real path.
11824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11826      # a path prefixed by /cygdrive for fixpath to work.
11827      new_path="$CYGWIN_ROOT_PATH$input_path"
11828    fi
11829  fi
11830
11831
11832  if test "x$path" != "x$new_path"; then
11833    BOOT_JDK="$new_path"
11834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11836  fi
11837
11838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11839
11840  path="$BOOT_JDK"
11841  has_colon=`$ECHO $path | $GREP ^.:`
11842  new_path="$path"
11843  if test "x$has_colon" = x; then
11844    # Not in mixed or Windows style, start by that.
11845    new_path=`cmd //c echo $path`
11846  fi
11847
11848
11849  input_path="$new_path"
11850  # Check if we need to convert this using DOS-style short mode. If the path
11851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11852  # take no chances and rewrite it.
11853  # Note: m4 eats our [], so we need to use [ and ] instead.
11854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11855  if test "x$has_forbidden_chars" != x; then
11856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11858  fi
11859
11860
11861  windows_path="$new_path"
11862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11863    unix_path=`$CYGPATH -u "$windows_path"`
11864    new_path="$unix_path"
11865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11867    new_path="$unix_path"
11868  fi
11869
11870  if test "x$path" != "x$new_path"; then
11871    BOOT_JDK="$new_path"
11872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11874  fi
11875
11876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11878
11879  else
11880    # We're on a posix platform. Hooray! :)
11881    path="$BOOT_JDK"
11882    has_space=`$ECHO "$path" | $GREP " "`
11883    if test "x$has_space" != x; then
11884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11886      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11887    fi
11888
11889    # Use eval to expand a potential ~
11890    eval path="$path"
11891    if test ! -f "$path" && test ! -d "$path"; then
11892      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11893    fi
11894
11895    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11896  fi
11897
11898              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11899$as_echo_n "checking for Boot JDK... " >&6; }
11900              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11901$as_echo "$BOOT_JDK" >&6; }
11902              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11903$as_echo_n "checking Boot JDK version... " >&6; }
11904              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11905              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11906$as_echo "$BOOT_JDK_VERSION" >&6; }
11907            fi # end check jdk version
11908          fi # end check rt.jar
11909        fi # end check javac
11910      fi # end check java
11911    fi # end check boot jdk found
11912  fi
11913
11914
11915# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11916
11917  if test "x$BOOT_JDK_FOUND" = xno; then
11918    # Now execute the test
11919
11920    if test -x /usr/libexec/java_home; then
11921        BOOT_JDK=`/usr/libexec/java_home`
11922        BOOT_JDK_FOUND=maybe
11923        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11924$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11925    fi
11926
11927
11928    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11929    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11930      # Do we have a bin/java?
11931      if test ! -x "$BOOT_JDK/bin/java"; then
11932        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11934        BOOT_JDK_FOUND=no
11935      else
11936        # Do we have a bin/javac?
11937        if test ! -x "$BOOT_JDK/bin/javac"; then
11938          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11940          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11941$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11942          BOOT_JDK_FOUND=no
11943        else
11944          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11945          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11946            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11948            BOOT_JDK_FOUND=no
11949          else
11950            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11952
11953            # Extra M4 quote needed to protect [] in grep expression.
11954            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11955            if test "x$FOUND_VERSION_78" = x; then
11956              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11958              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11959$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11960              BOOT_JDK_FOUND=no
11961            else
11962              # We're done! :-)
11963              BOOT_JDK_FOUND=yes
11964
11965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11966
11967  # Input might be given as Windows format, start by converting to
11968  # unix format.
11969  path="$BOOT_JDK"
11970  new_path=`$CYGPATH -u "$path"`
11971
11972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11975  # "foo.exe" is OK but "foo" is an error.
11976  #
11977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11978  # It is also a way to make sure we got the proper file name for the real test later on.
11979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11980  if test "x$test_shortpath" = x; then
11981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11983    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11984  fi
11985
11986  # Call helper function which possibly converts this using DOS-style short mode.
11987  # If so, the updated path is stored in $new_path.
11988
11989  input_path="$new_path"
11990  # Check if we need to convert this using DOS-style short mode. If the path
11991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11992  # take no chances and rewrite it.
11993  # Note: m4 eats our [], so we need to use [ and ] instead.
11994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11995  if test "x$has_forbidden_chars" != x; then
11996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12000      # Going to short mode and back again did indeed matter. Since short mode is
12001      # case insensitive, let's make it lowercase to improve readability.
12002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12003      # Now convert it back to Unix-stile (cygpath)
12004      input_path=`$CYGPATH -u "$shortmode_path"`
12005      new_path="$input_path"
12006    fi
12007  fi
12008
12009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12010  if test "x$test_cygdrive_prefix" = x; then
12011    # As a simple fix, exclude /usr/bin since it's not a real path.
12012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12014      # a path prefixed by /cygdrive for fixpath to work.
12015      new_path="$CYGWIN_ROOT_PATH$input_path"
12016    fi
12017  fi
12018
12019
12020  if test "x$path" != "x$new_path"; then
12021    BOOT_JDK="$new_path"
12022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12024  fi
12025
12026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12027
12028  path="$BOOT_JDK"
12029  has_colon=`$ECHO $path | $GREP ^.:`
12030  new_path="$path"
12031  if test "x$has_colon" = x; then
12032    # Not in mixed or Windows style, start by that.
12033    new_path=`cmd //c echo $path`
12034  fi
12035
12036
12037  input_path="$new_path"
12038  # Check if we need to convert this using DOS-style short mode. If the path
12039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12040  # take no chances and rewrite it.
12041  # Note: m4 eats our [], so we need to use [ and ] instead.
12042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12043  if test "x$has_forbidden_chars" != x; then
12044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12046  fi
12047
12048
12049  windows_path="$new_path"
12050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12051    unix_path=`$CYGPATH -u "$windows_path"`
12052    new_path="$unix_path"
12053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12055    new_path="$unix_path"
12056  fi
12057
12058  if test "x$path" != "x$new_path"; then
12059    BOOT_JDK="$new_path"
12060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12062  fi
12063
12064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12066
12067  else
12068    # We're on a posix platform. Hooray! :)
12069    path="$BOOT_JDK"
12070    has_space=`$ECHO "$path" | $GREP " "`
12071    if test "x$has_space" != x; then
12072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12074      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12075    fi
12076
12077    # Use eval to expand a potential ~
12078    eval path="$path"
12079    if test ! -f "$path" && test ! -d "$path"; then
12080      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12081    fi
12082
12083    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12084  fi
12085
12086              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12087$as_echo_n "checking for Boot JDK... " >&6; }
12088              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12089$as_echo "$BOOT_JDK" >&6; }
12090              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12091$as_echo_n "checking Boot JDK version... " >&6; }
12092              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12093              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12094$as_echo "$BOOT_JDK_VERSION" >&6; }
12095            fi # end check jdk version
12096          fi # end check rt.jar
12097        fi # end check javac
12098      fi # end check java
12099    fi # end check boot jdk found
12100  fi
12101
12102
12103# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12104
12105  if test "x$BOOT_JDK_FOUND" = xno; then
12106    # Now execute the test
12107
12108    # Extract the first word of "javac", so it can be a program name with args.
12109set dummy javac; ac_word=$2
12110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12111$as_echo_n "checking for $ac_word... " >&6; }
12112if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12113  $as_echo_n "(cached) " >&6
12114else
12115  case $JAVAC_CHECK in
12116  [\\/]* | ?:[\\/]*)
12117  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12118  ;;
12119  *)
12120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12121for as_dir in $PATH
12122do
12123  IFS=$as_save_IFS
12124  test -z "$as_dir" && as_dir=.
12125    for ac_exec_ext in '' $ac_executable_extensions; do
12126  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12127    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12129    break 2
12130  fi
12131done
12132  done
12133IFS=$as_save_IFS
12134
12135  ;;
12136esac
12137fi
12138JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12139if test -n "$JAVAC_CHECK"; then
12140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12141$as_echo "$JAVAC_CHECK" >&6; }
12142else
12143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12144$as_echo "no" >&6; }
12145fi
12146
12147
12148    # Extract the first word of "java", so it can be a program name with args.
12149set dummy java; ac_word=$2
12150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12151$as_echo_n "checking for $ac_word... " >&6; }
12152if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12153  $as_echo_n "(cached) " >&6
12154else
12155  case $JAVA_CHECK in
12156  [\\/]* | ?:[\\/]*)
12157  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12158  ;;
12159  *)
12160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12161for as_dir in $PATH
12162do
12163  IFS=$as_save_IFS
12164  test -z "$as_dir" && as_dir=.
12165    for ac_exec_ext in '' $ac_executable_extensions; do
12166  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12167    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12169    break 2
12170  fi
12171done
12172  done
12173IFS=$as_save_IFS
12174
12175  ;;
12176esac
12177fi
12178JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12179if test -n "$JAVA_CHECK"; then
12180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12181$as_echo "$JAVA_CHECK" >&6; }
12182else
12183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12184$as_echo "no" >&6; }
12185fi
12186
12187
12188    BINARY="$JAVAC_CHECK"
12189    if test "x$JAVAC_CHECK" = x; then
12190        BINARY="$JAVA_CHECK"
12191    fi
12192    if test "x$BINARY" != x; then
12193        # So there is a java(c) binary, it might be part of a JDK.
12194        # Lets find the JDK/JRE directory by following symbolic links.
12195        # Linux/GNU systems often have links from /usr/bin/java to
12196        # /etc/alternatives/java to the real JDK binary.
12197
12198    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12199        # Follow a chain of symbolic links. Use readlink
12200        # where it exists, else fall back to horribly
12201        # complicated shell code.
12202        if test "x$READLINK_TESTED" != yes; then
12203            # On MacOSX there is a readlink tool with a different
12204            # purpose than the GNU readlink tool. Check the found readlink.
12205            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12206            if test "x$ISGNU" = x; then
12207                 # A readlink that we do not know how to use.
12208                 # Are there other non-GNU readlinks out there?
12209                 READLINK_TESTED=yes
12210                 READLINK=
12211            fi
12212        fi
12213
12214        if test "x$READLINK" != x; then
12215            BINARY=`$READLINK -f $BINARY`
12216        else
12217            # Save the current directory for restoring afterwards
12218            STARTDIR=$PWD
12219            COUNTER=0
12220            sym_link_dir=`$DIRNAME $BINARY`
12221            sym_link_file=`$BASENAME $BINARY`
12222            cd $sym_link_dir
12223            # Use -P flag to resolve symlinks in directories.
12224            cd `$THEPWDCMD -P`
12225            sym_link_dir=`$THEPWDCMD -P`
12226            # Resolve file symlinks
12227            while test $COUNTER -lt 20; do
12228                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12229                if test "x$ISLINK" == x; then
12230                    # This is not a symbolic link! We are done!
12231                    break
12232                fi
12233                # Again resolve directory symlinks since the target of the just found
12234                # link could be in a different directory
12235                cd `$DIRNAME $ISLINK`
12236                sym_link_dir=`$THEPWDCMD -P`
12237                sym_link_file=`$BASENAME $ISLINK`
12238                let COUNTER=COUNTER+1
12239            done
12240            cd $STARTDIR
12241            BINARY=$sym_link_dir/$sym_link_file
12242        fi
12243    fi
12244
12245        BOOT_JDK=`dirname "$BINARY"`
12246        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12247        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12248            # Looks like we found ourselves an JDK
12249            BOOT_JDK_FOUND=maybe
12250            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12251$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12252        fi
12253    fi
12254
12255
12256    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12257    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12258      # Do we have a bin/java?
12259      if test ! -x "$BOOT_JDK/bin/java"; then
12260        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12262        BOOT_JDK_FOUND=no
12263      else
12264        # Do we have a bin/javac?
12265        if test ! -x "$BOOT_JDK/bin/javac"; then
12266          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12268          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12269$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12270          BOOT_JDK_FOUND=no
12271        else
12272          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12273          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12274            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12276            BOOT_JDK_FOUND=no
12277          else
12278            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12279            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12280
12281            # Extra M4 quote needed to protect [] in grep expression.
12282            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12283            if test "x$FOUND_VERSION_78" = x; then
12284              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12286              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12287$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12288              BOOT_JDK_FOUND=no
12289            else
12290              # We're done! :-)
12291              BOOT_JDK_FOUND=yes
12292
12293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12294
12295  # Input might be given as Windows format, start by converting to
12296  # unix format.
12297  path="$BOOT_JDK"
12298  new_path=`$CYGPATH -u "$path"`
12299
12300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12303  # "foo.exe" is OK but "foo" is an error.
12304  #
12305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12306  # It is also a way to make sure we got the proper file name for the real test later on.
12307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12308  if test "x$test_shortpath" = x; then
12309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12311    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12312  fi
12313
12314  # Call helper function which possibly converts this using DOS-style short mode.
12315  # If so, the updated path is stored in $new_path.
12316
12317  input_path="$new_path"
12318  # Check if we need to convert this using DOS-style short mode. If the path
12319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12320  # take no chances and rewrite it.
12321  # Note: m4 eats our [], so we need to use [ and ] instead.
12322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12323  if test "x$has_forbidden_chars" != x; then
12324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12328      # Going to short mode and back again did indeed matter. Since short mode is
12329      # case insensitive, let's make it lowercase to improve readability.
12330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12331      # Now convert it back to Unix-stile (cygpath)
12332      input_path=`$CYGPATH -u "$shortmode_path"`
12333      new_path="$input_path"
12334    fi
12335  fi
12336
12337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12338  if test "x$test_cygdrive_prefix" = x; then
12339    # As a simple fix, exclude /usr/bin since it's not a real path.
12340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12342      # a path prefixed by /cygdrive for fixpath to work.
12343      new_path="$CYGWIN_ROOT_PATH$input_path"
12344    fi
12345  fi
12346
12347
12348  if test "x$path" != "x$new_path"; then
12349    BOOT_JDK="$new_path"
12350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12352  fi
12353
12354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12355
12356  path="$BOOT_JDK"
12357  has_colon=`$ECHO $path | $GREP ^.:`
12358  new_path="$path"
12359  if test "x$has_colon" = x; then
12360    # Not in mixed or Windows style, start by that.
12361    new_path=`cmd //c echo $path`
12362  fi
12363
12364
12365  input_path="$new_path"
12366  # Check if we need to convert this using DOS-style short mode. If the path
12367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12368  # take no chances and rewrite it.
12369  # Note: m4 eats our [], so we need to use [ and ] instead.
12370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12371  if test "x$has_forbidden_chars" != x; then
12372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12374  fi
12375
12376
12377  windows_path="$new_path"
12378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12379    unix_path=`$CYGPATH -u "$windows_path"`
12380    new_path="$unix_path"
12381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12383    new_path="$unix_path"
12384  fi
12385
12386  if test "x$path" != "x$new_path"; then
12387    BOOT_JDK="$new_path"
12388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12390  fi
12391
12392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12394
12395  else
12396    # We're on a posix platform. Hooray! :)
12397    path="$BOOT_JDK"
12398    has_space=`$ECHO "$path" | $GREP " "`
12399    if test "x$has_space" != x; then
12400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12402      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12403    fi
12404
12405    # Use eval to expand a potential ~
12406    eval path="$path"
12407    if test ! -f "$path" && test ! -d "$path"; then
12408      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12409    fi
12410
12411    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12412  fi
12413
12414              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12415$as_echo_n "checking for Boot JDK... " >&6; }
12416              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12417$as_echo "$BOOT_JDK" >&6; }
12418              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12419$as_echo_n "checking Boot JDK version... " >&6; }
12420              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12421              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12422$as_echo "$BOOT_JDK_VERSION" >&6; }
12423            fi # end check jdk version
12424          fi # end check rt.jar
12425        fi # end check javac
12426      fi # end check java
12427    fi # end check boot jdk found
12428  fi
12429
12430
12431# Test: Is there a JDK installed in default, well-known locations?
12432
12433  if test "x$BOOT_JDK_FOUND" = xno; then
12434    # Now execute the test
12435
12436  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12437
12438  if test "x$BOOT_JDK_FOUND" = xno; then
12439    # Now execute the test
12440
12441  if test "x$ProgramW6432" != x; then
12442    VIRTUAL_DIR="$ProgramW6432/Java"
12443
12444  windows_path="$VIRTUAL_DIR"
12445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12446    unix_path=`$CYGPATH -u "$windows_path"`
12447    VIRTUAL_DIR="$unix_path"
12448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12450    VIRTUAL_DIR="$unix_path"
12451  fi
12452
12453
12454  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12455  BOOT_JDK_SUFFIX=""
12456  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12457  if test "x$ALL_JDKS_FOUND" != x; then
12458    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12459
12460  if test "x$BOOT_JDK_FOUND" = xno; then
12461    # Now execute the test
12462
12463        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12464        if test -d "$BOOT_JDK"; then
12465          BOOT_JDK_FOUND=maybe
12466          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12467$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12468        fi
12469
12470
12471    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12472    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12473      # Do we have a bin/java?
12474      if test ! -x "$BOOT_JDK/bin/java"; then
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12477        BOOT_JDK_FOUND=no
12478      else
12479        # Do we have a bin/javac?
12480        if test ! -x "$BOOT_JDK/bin/javac"; then
12481          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12483          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12484$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12485          BOOT_JDK_FOUND=no
12486        else
12487          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12488          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12491            BOOT_JDK_FOUND=no
12492          else
12493            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12495
12496            # Extra M4 quote needed to protect [] in grep expression.
12497            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12498            if test "x$FOUND_VERSION_78" = x; then
12499              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12501              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12502$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12503              BOOT_JDK_FOUND=no
12504            else
12505              # We're done! :-)
12506              BOOT_JDK_FOUND=yes
12507
12508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12509
12510  # Input might be given as Windows format, start by converting to
12511  # unix format.
12512  path="$BOOT_JDK"
12513  new_path=`$CYGPATH -u "$path"`
12514
12515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12518  # "foo.exe" is OK but "foo" is an error.
12519  #
12520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12521  # It is also a way to make sure we got the proper file name for the real test later on.
12522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12523  if test "x$test_shortpath" = x; then
12524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12526    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12527  fi
12528
12529  # Call helper function which possibly converts this using DOS-style short mode.
12530  # If so, the updated path is stored in $new_path.
12531
12532  input_path="$new_path"
12533  # Check if we need to convert this using DOS-style short mode. If the path
12534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12535  # take no chances and rewrite it.
12536  # Note: m4 eats our [], so we need to use [ and ] instead.
12537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12538  if test "x$has_forbidden_chars" != x; then
12539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12543      # Going to short mode and back again did indeed matter. Since short mode is
12544      # case insensitive, let's make it lowercase to improve readability.
12545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12546      # Now convert it back to Unix-stile (cygpath)
12547      input_path=`$CYGPATH -u "$shortmode_path"`
12548      new_path="$input_path"
12549    fi
12550  fi
12551
12552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12553  if test "x$test_cygdrive_prefix" = x; then
12554    # As a simple fix, exclude /usr/bin since it's not a real path.
12555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12557      # a path prefixed by /cygdrive for fixpath to work.
12558      new_path="$CYGWIN_ROOT_PATH$input_path"
12559    fi
12560  fi
12561
12562
12563  if test "x$path" != "x$new_path"; then
12564    BOOT_JDK="$new_path"
12565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12567  fi
12568
12569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12570
12571  path="$BOOT_JDK"
12572  has_colon=`$ECHO $path | $GREP ^.:`
12573  new_path="$path"
12574  if test "x$has_colon" = x; then
12575    # Not in mixed or Windows style, start by that.
12576    new_path=`cmd //c echo $path`
12577  fi
12578
12579
12580  input_path="$new_path"
12581  # Check if we need to convert this using DOS-style short mode. If the path
12582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12583  # take no chances and rewrite it.
12584  # Note: m4 eats our [], so we need to use [ and ] instead.
12585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12586  if test "x$has_forbidden_chars" != x; then
12587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12589  fi
12590
12591
12592  windows_path="$new_path"
12593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12594    unix_path=`$CYGPATH -u "$windows_path"`
12595    new_path="$unix_path"
12596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12598    new_path="$unix_path"
12599  fi
12600
12601  if test "x$path" != "x$new_path"; then
12602    BOOT_JDK="$new_path"
12603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12605  fi
12606
12607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12609
12610  else
12611    # We're on a posix platform. Hooray! :)
12612    path="$BOOT_JDK"
12613    has_space=`$ECHO "$path" | $GREP " "`
12614    if test "x$has_space" != x; then
12615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12617      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12618    fi
12619
12620    # Use eval to expand a potential ~
12621    eval path="$path"
12622    if test ! -f "$path" && test ! -d "$path"; then
12623      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12624    fi
12625
12626    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12627  fi
12628
12629              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12630$as_echo_n "checking for Boot JDK... " >&6; }
12631              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12632$as_echo "$BOOT_JDK" >&6; }
12633              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12634$as_echo_n "checking Boot JDK version... " >&6; }
12635              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12636              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12637$as_echo "$BOOT_JDK_VERSION" >&6; }
12638            fi # end check jdk version
12639          fi # end check rt.jar
12640        fi # end check javac
12641      fi # end check java
12642    fi # end check boot jdk found
12643  fi
12644
12645    done
12646  fi
12647
12648  fi
12649
12650
12651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12653      # Do we have a bin/java?
12654      if test ! -x "$BOOT_JDK/bin/java"; then
12655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12657        BOOT_JDK_FOUND=no
12658      else
12659        # Do we have a bin/javac?
12660        if test ! -x "$BOOT_JDK/bin/javac"; then
12661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12665          BOOT_JDK_FOUND=no
12666        else
12667          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12668          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12671            BOOT_JDK_FOUND=no
12672          else
12673            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12675
12676            # Extra M4 quote needed to protect [] in grep expression.
12677            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12678            if test "x$FOUND_VERSION_78" = x; then
12679              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12681              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12682$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12683              BOOT_JDK_FOUND=no
12684            else
12685              # We're done! :-)
12686              BOOT_JDK_FOUND=yes
12687
12688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12689
12690  # Input might be given as Windows format, start by converting to
12691  # unix format.
12692  path="$BOOT_JDK"
12693  new_path=`$CYGPATH -u "$path"`
12694
12695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12698  # "foo.exe" is OK but "foo" is an error.
12699  #
12700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12701  # It is also a way to make sure we got the proper file name for the real test later on.
12702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12703  if test "x$test_shortpath" = x; then
12704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12707  fi
12708
12709  # Call helper function which possibly converts this using DOS-style short mode.
12710  # If so, the updated path is stored in $new_path.
12711
12712  input_path="$new_path"
12713  # Check if we need to convert this using DOS-style short mode. If the path
12714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12715  # take no chances and rewrite it.
12716  # Note: m4 eats our [], so we need to use [ and ] instead.
12717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12718  if test "x$has_forbidden_chars" != x; then
12719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12723      # Going to short mode and back again did indeed matter. Since short mode is
12724      # case insensitive, let's make it lowercase to improve readability.
12725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12726      # Now convert it back to Unix-stile (cygpath)
12727      input_path=`$CYGPATH -u "$shortmode_path"`
12728      new_path="$input_path"
12729    fi
12730  fi
12731
12732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12733  if test "x$test_cygdrive_prefix" = x; then
12734    # As a simple fix, exclude /usr/bin since it's not a real path.
12735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12737      # a path prefixed by /cygdrive for fixpath to work.
12738      new_path="$CYGWIN_ROOT_PATH$input_path"
12739    fi
12740  fi
12741
12742
12743  if test "x$path" != "x$new_path"; then
12744    BOOT_JDK="$new_path"
12745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12747  fi
12748
12749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12750
12751  path="$BOOT_JDK"
12752  has_colon=`$ECHO $path | $GREP ^.:`
12753  new_path="$path"
12754  if test "x$has_colon" = x; then
12755    # Not in mixed or Windows style, start by that.
12756    new_path=`cmd //c echo $path`
12757  fi
12758
12759
12760  input_path="$new_path"
12761  # Check if we need to convert this using DOS-style short mode. If the path
12762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12763  # take no chances and rewrite it.
12764  # Note: m4 eats our [], so we need to use [ and ] instead.
12765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12766  if test "x$has_forbidden_chars" != x; then
12767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12769  fi
12770
12771
12772  windows_path="$new_path"
12773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12774    unix_path=`$CYGPATH -u "$windows_path"`
12775    new_path="$unix_path"
12776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12778    new_path="$unix_path"
12779  fi
12780
12781  if test "x$path" != "x$new_path"; then
12782    BOOT_JDK="$new_path"
12783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12785  fi
12786
12787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12789
12790  else
12791    # We're on a posix platform. Hooray! :)
12792    path="$BOOT_JDK"
12793    has_space=`$ECHO "$path" | $GREP " "`
12794    if test "x$has_space" != x; then
12795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12797      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12798    fi
12799
12800    # Use eval to expand a potential ~
12801    eval path="$path"
12802    if test ! -f "$path" && test ! -d "$path"; then
12803      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12804    fi
12805
12806    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12807  fi
12808
12809              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12810$as_echo_n "checking for Boot JDK... " >&6; }
12811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12812$as_echo "$BOOT_JDK" >&6; }
12813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12814$as_echo_n "checking Boot JDK version... " >&6; }
12815              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12817$as_echo "$BOOT_JDK_VERSION" >&6; }
12818            fi # end check jdk version
12819          fi # end check rt.jar
12820        fi # end check javac
12821      fi # end check java
12822    fi # end check boot jdk found
12823  fi
12824
12825
12826  if test "x$BOOT_JDK_FOUND" = xno; then
12827    # Now execute the test
12828
12829  if test "x$PROGRAMW6432" != x; then
12830    VIRTUAL_DIR="$PROGRAMW6432/Java"
12831
12832  windows_path="$VIRTUAL_DIR"
12833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12834    unix_path=`$CYGPATH -u "$windows_path"`
12835    VIRTUAL_DIR="$unix_path"
12836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12838    VIRTUAL_DIR="$unix_path"
12839  fi
12840
12841
12842  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12843  BOOT_JDK_SUFFIX=""
12844  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12845  if test "x$ALL_JDKS_FOUND" != x; then
12846    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12847
12848  if test "x$BOOT_JDK_FOUND" = xno; then
12849    # Now execute the test
12850
12851        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12852        if test -d "$BOOT_JDK"; then
12853          BOOT_JDK_FOUND=maybe
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12855$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12856        fi
12857
12858
12859    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12860    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12861      # Do we have a bin/java?
12862      if test ! -x "$BOOT_JDK/bin/java"; then
12863        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12865        BOOT_JDK_FOUND=no
12866      else
12867        # Do we have a bin/javac?
12868        if test ! -x "$BOOT_JDK/bin/javac"; then
12869          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12871          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12872$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12873          BOOT_JDK_FOUND=no
12874        else
12875          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12876          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12877            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12879            BOOT_JDK_FOUND=no
12880          else
12881            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12882            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12883
12884            # Extra M4 quote needed to protect [] in grep expression.
12885            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12886            if test "x$FOUND_VERSION_78" = x; then
12887              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12889              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12890$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12891              BOOT_JDK_FOUND=no
12892            else
12893              # We're done! :-)
12894              BOOT_JDK_FOUND=yes
12895
12896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12897
12898  # Input might be given as Windows format, start by converting to
12899  # unix format.
12900  path="$BOOT_JDK"
12901  new_path=`$CYGPATH -u "$path"`
12902
12903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12906  # "foo.exe" is OK but "foo" is an error.
12907  #
12908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12909  # It is also a way to make sure we got the proper file name for the real test later on.
12910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12911  if test "x$test_shortpath" = x; then
12912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12914    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12915  fi
12916
12917  # Call helper function which possibly converts this using DOS-style short mode.
12918  # If so, the updated path is stored in $new_path.
12919
12920  input_path="$new_path"
12921  # Check if we need to convert this using DOS-style short mode. If the path
12922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12923  # take no chances and rewrite it.
12924  # Note: m4 eats our [], so we need to use [ and ] instead.
12925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12926  if test "x$has_forbidden_chars" != x; then
12927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12931      # Going to short mode and back again did indeed matter. Since short mode is
12932      # case insensitive, let's make it lowercase to improve readability.
12933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12934      # Now convert it back to Unix-stile (cygpath)
12935      input_path=`$CYGPATH -u "$shortmode_path"`
12936      new_path="$input_path"
12937    fi
12938  fi
12939
12940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12941  if test "x$test_cygdrive_prefix" = x; then
12942    # As a simple fix, exclude /usr/bin since it's not a real path.
12943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12945      # a path prefixed by /cygdrive for fixpath to work.
12946      new_path="$CYGWIN_ROOT_PATH$input_path"
12947    fi
12948  fi
12949
12950
12951  if test "x$path" != "x$new_path"; then
12952    BOOT_JDK="$new_path"
12953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12955  fi
12956
12957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12958
12959  path="$BOOT_JDK"
12960  has_colon=`$ECHO $path | $GREP ^.:`
12961  new_path="$path"
12962  if test "x$has_colon" = x; then
12963    # Not in mixed or Windows style, start by that.
12964    new_path=`cmd //c echo $path`
12965  fi
12966
12967
12968  input_path="$new_path"
12969  # Check if we need to convert this using DOS-style short mode. If the path
12970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12971  # take no chances and rewrite it.
12972  # Note: m4 eats our [], so we need to use [ and ] instead.
12973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12974  if test "x$has_forbidden_chars" != x; then
12975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12977  fi
12978
12979
12980  windows_path="$new_path"
12981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12982    unix_path=`$CYGPATH -u "$windows_path"`
12983    new_path="$unix_path"
12984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12986    new_path="$unix_path"
12987  fi
12988
12989  if test "x$path" != "x$new_path"; then
12990    BOOT_JDK="$new_path"
12991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12993  fi
12994
12995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12997
12998  else
12999    # We're on a posix platform. Hooray! :)
13000    path="$BOOT_JDK"
13001    has_space=`$ECHO "$path" | $GREP " "`
13002    if test "x$has_space" != x; then
13003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13005      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13006    fi
13007
13008    # Use eval to expand a potential ~
13009    eval path="$path"
13010    if test ! -f "$path" && test ! -d "$path"; then
13011      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13012    fi
13013
13014    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13015  fi
13016
13017              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13018$as_echo_n "checking for Boot JDK... " >&6; }
13019              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13020$as_echo "$BOOT_JDK" >&6; }
13021              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13022$as_echo_n "checking Boot JDK version... " >&6; }
13023              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13024              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13025$as_echo "$BOOT_JDK_VERSION" >&6; }
13026            fi # end check jdk version
13027          fi # end check rt.jar
13028        fi # end check javac
13029      fi # end check java
13030    fi # end check boot jdk found
13031  fi
13032
13033    done
13034  fi
13035
13036  fi
13037
13038
13039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13041      # Do we have a bin/java?
13042      if test ! -x "$BOOT_JDK/bin/java"; then
13043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13045        BOOT_JDK_FOUND=no
13046      else
13047        # Do we have a bin/javac?
13048        if test ! -x "$BOOT_JDK/bin/javac"; then
13049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13053          BOOT_JDK_FOUND=no
13054        else
13055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13059            BOOT_JDK_FOUND=no
13060          else
13061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13063
13064            # Extra M4 quote needed to protect [] in grep expression.
13065            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13066            if test "x$FOUND_VERSION_78" = x; then
13067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13070$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13071              BOOT_JDK_FOUND=no
13072            else
13073              # We're done! :-)
13074              BOOT_JDK_FOUND=yes
13075
13076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13077
13078  # Input might be given as Windows format, start by converting to
13079  # unix format.
13080  path="$BOOT_JDK"
13081  new_path=`$CYGPATH -u "$path"`
13082
13083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13086  # "foo.exe" is OK but "foo" is an error.
13087  #
13088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13089  # It is also a way to make sure we got the proper file name for the real test later on.
13090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13091  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13095  fi
13096
13097  # Call helper function which possibly converts this using DOS-style short mode.
13098  # If so, the updated path is stored in $new_path.
13099
13100  input_path="$new_path"
13101  # Check if we need to convert this using DOS-style short mode. If the path
13102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13103  # take no chances and rewrite it.
13104  # Note: m4 eats our [], so we need to use [ and ] instead.
13105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13106  if test "x$has_forbidden_chars" != x; then
13107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13111      # Going to short mode and back again did indeed matter. Since short mode is
13112      # case insensitive, let's make it lowercase to improve readability.
13113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13114      # Now convert it back to Unix-stile (cygpath)
13115      input_path=`$CYGPATH -u "$shortmode_path"`
13116      new_path="$input_path"
13117    fi
13118  fi
13119
13120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13121  if test "x$test_cygdrive_prefix" = x; then
13122    # As a simple fix, exclude /usr/bin since it's not a real path.
13123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13125      # a path prefixed by /cygdrive for fixpath to work.
13126      new_path="$CYGWIN_ROOT_PATH$input_path"
13127    fi
13128  fi
13129
13130
13131  if test "x$path" != "x$new_path"; then
13132    BOOT_JDK="$new_path"
13133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13135  fi
13136
13137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13138
13139  path="$BOOT_JDK"
13140  has_colon=`$ECHO $path | $GREP ^.:`
13141  new_path="$path"
13142  if test "x$has_colon" = x; then
13143    # Not in mixed or Windows style, start by that.
13144    new_path=`cmd //c echo $path`
13145  fi
13146
13147
13148  input_path="$new_path"
13149  # Check if we need to convert this using DOS-style short mode. If the path
13150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13151  # take no chances and rewrite it.
13152  # Note: m4 eats our [], so we need to use [ and ] instead.
13153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13154  if test "x$has_forbidden_chars" != x; then
13155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13157  fi
13158
13159
13160  windows_path="$new_path"
13161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13162    unix_path=`$CYGPATH -u "$windows_path"`
13163    new_path="$unix_path"
13164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13166    new_path="$unix_path"
13167  fi
13168
13169  if test "x$path" != "x$new_path"; then
13170    BOOT_JDK="$new_path"
13171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13173  fi
13174
13175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13177
13178  else
13179    # We're on a posix platform. Hooray! :)
13180    path="$BOOT_JDK"
13181    has_space=`$ECHO "$path" | $GREP " "`
13182    if test "x$has_space" != x; then
13183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13184$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13186    fi
13187
13188    # Use eval to expand a potential ~
13189    eval path="$path"
13190    if test ! -f "$path" && test ! -d "$path"; then
13191      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13192    fi
13193
13194    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13195  fi
13196
13197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13198$as_echo_n "checking for Boot JDK... " >&6; }
13199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13200$as_echo "$BOOT_JDK" >&6; }
13201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13202$as_echo_n "checking Boot JDK version... " >&6; }
13203              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13205$as_echo "$BOOT_JDK_VERSION" >&6; }
13206            fi # end check jdk version
13207          fi # end check rt.jar
13208        fi # end check javac
13209      fi # end check java
13210    fi # end check boot jdk found
13211  fi
13212
13213
13214  if test "x$BOOT_JDK_FOUND" = xno; then
13215    # Now execute the test
13216
13217  if test "x$PROGRAMFILES" != x; then
13218    VIRTUAL_DIR="$PROGRAMFILES/Java"
13219
13220  windows_path="$VIRTUAL_DIR"
13221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13222    unix_path=`$CYGPATH -u "$windows_path"`
13223    VIRTUAL_DIR="$unix_path"
13224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13226    VIRTUAL_DIR="$unix_path"
13227  fi
13228
13229
13230  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13231  BOOT_JDK_SUFFIX=""
13232  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13233  if test "x$ALL_JDKS_FOUND" != x; then
13234    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13235
13236  if test "x$BOOT_JDK_FOUND" = xno; then
13237    # Now execute the test
13238
13239        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13240        if test -d "$BOOT_JDK"; then
13241          BOOT_JDK_FOUND=maybe
13242          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13243$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13244        fi
13245
13246
13247    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13248    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13249      # Do we have a bin/java?
13250      if test ! -x "$BOOT_JDK/bin/java"; then
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13253        BOOT_JDK_FOUND=no
13254      else
13255        # Do we have a bin/javac?
13256        if test ! -x "$BOOT_JDK/bin/javac"; then
13257          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13259          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13260$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13261          BOOT_JDK_FOUND=no
13262        else
13263          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13264          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13265            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13267            BOOT_JDK_FOUND=no
13268          else
13269            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13270            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13271
13272            # Extra M4 quote needed to protect [] in grep expression.
13273            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13274            if test "x$FOUND_VERSION_78" = x; then
13275              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13277              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13278$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13279              BOOT_JDK_FOUND=no
13280            else
13281              # We're done! :-)
13282              BOOT_JDK_FOUND=yes
13283
13284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13285
13286  # Input might be given as Windows format, start by converting to
13287  # unix format.
13288  path="$BOOT_JDK"
13289  new_path=`$CYGPATH -u "$path"`
13290
13291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13294  # "foo.exe" is OK but "foo" is an error.
13295  #
13296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13297  # It is also a way to make sure we got the proper file name for the real test later on.
13298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13299  if test "x$test_shortpath" = x; then
13300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13302    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13303  fi
13304
13305  # Call helper function which possibly converts this using DOS-style short mode.
13306  # If so, the updated path is stored in $new_path.
13307
13308  input_path="$new_path"
13309  # Check if we need to convert this using DOS-style short mode. If the path
13310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13311  # take no chances and rewrite it.
13312  # Note: m4 eats our [], so we need to use [ and ] instead.
13313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13314  if test "x$has_forbidden_chars" != x; then
13315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13319      # Going to short mode and back again did indeed matter. Since short mode is
13320      # case insensitive, let's make it lowercase to improve readability.
13321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13322      # Now convert it back to Unix-stile (cygpath)
13323      input_path=`$CYGPATH -u "$shortmode_path"`
13324      new_path="$input_path"
13325    fi
13326  fi
13327
13328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13329  if test "x$test_cygdrive_prefix" = x; then
13330    # As a simple fix, exclude /usr/bin since it's not a real path.
13331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13333      # a path prefixed by /cygdrive for fixpath to work.
13334      new_path="$CYGWIN_ROOT_PATH$input_path"
13335    fi
13336  fi
13337
13338
13339  if test "x$path" != "x$new_path"; then
13340    BOOT_JDK="$new_path"
13341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13343  fi
13344
13345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13346
13347  path="$BOOT_JDK"
13348  has_colon=`$ECHO $path | $GREP ^.:`
13349  new_path="$path"
13350  if test "x$has_colon" = x; then
13351    # Not in mixed or Windows style, start by that.
13352    new_path=`cmd //c echo $path`
13353  fi
13354
13355
13356  input_path="$new_path"
13357  # Check if we need to convert this using DOS-style short mode. If the path
13358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13359  # take no chances and rewrite it.
13360  # Note: m4 eats our [], so we need to use [ and ] instead.
13361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13362  if test "x$has_forbidden_chars" != x; then
13363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13365  fi
13366
13367
13368  windows_path="$new_path"
13369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13370    unix_path=`$CYGPATH -u "$windows_path"`
13371    new_path="$unix_path"
13372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13374    new_path="$unix_path"
13375  fi
13376
13377  if test "x$path" != "x$new_path"; then
13378    BOOT_JDK="$new_path"
13379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13381  fi
13382
13383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13385
13386  else
13387    # We're on a posix platform. Hooray! :)
13388    path="$BOOT_JDK"
13389    has_space=`$ECHO "$path" | $GREP " "`
13390    if test "x$has_space" != x; then
13391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13393      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13394    fi
13395
13396    # Use eval to expand a potential ~
13397    eval path="$path"
13398    if test ! -f "$path" && test ! -d "$path"; then
13399      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13400    fi
13401
13402    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13403  fi
13404
13405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13406$as_echo_n "checking for Boot JDK... " >&6; }
13407              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13408$as_echo "$BOOT_JDK" >&6; }
13409              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13410$as_echo_n "checking Boot JDK version... " >&6; }
13411              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13412              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13413$as_echo "$BOOT_JDK_VERSION" >&6; }
13414            fi # end check jdk version
13415          fi # end check rt.jar
13416        fi # end check javac
13417      fi # end check java
13418    fi # end check boot jdk found
13419  fi
13420
13421    done
13422  fi
13423
13424  fi
13425
13426
13427    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13428    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13429      # Do we have a bin/java?
13430      if test ! -x "$BOOT_JDK/bin/java"; then
13431        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13433        BOOT_JDK_FOUND=no
13434      else
13435        # Do we have a bin/javac?
13436        if test ! -x "$BOOT_JDK/bin/javac"; then
13437          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13439          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13440$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13441          BOOT_JDK_FOUND=no
13442        else
13443          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13444          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13447            BOOT_JDK_FOUND=no
13448          else
13449            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13450            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13451
13452            # Extra M4 quote needed to protect [] in grep expression.
13453            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13454            if test "x$FOUND_VERSION_78" = x; then
13455              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13457              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13458$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13459              BOOT_JDK_FOUND=no
13460            else
13461              # We're done! :-)
13462              BOOT_JDK_FOUND=yes
13463
13464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13465
13466  # Input might be given as Windows format, start by converting to
13467  # unix format.
13468  path="$BOOT_JDK"
13469  new_path=`$CYGPATH -u "$path"`
13470
13471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13474  # "foo.exe" is OK but "foo" is an error.
13475  #
13476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13477  # It is also a way to make sure we got the proper file name for the real test later on.
13478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13479  if test "x$test_shortpath" = x; then
13480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13482    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13483  fi
13484
13485  # Call helper function which possibly converts this using DOS-style short mode.
13486  # If so, the updated path is stored in $new_path.
13487
13488  input_path="$new_path"
13489  # Check if we need to convert this using DOS-style short mode. If the path
13490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13491  # take no chances and rewrite it.
13492  # Note: m4 eats our [], so we need to use [ and ] instead.
13493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13494  if test "x$has_forbidden_chars" != x; then
13495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13499      # Going to short mode and back again did indeed matter. Since short mode is
13500      # case insensitive, let's make it lowercase to improve readability.
13501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13502      # Now convert it back to Unix-stile (cygpath)
13503      input_path=`$CYGPATH -u "$shortmode_path"`
13504      new_path="$input_path"
13505    fi
13506  fi
13507
13508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13509  if test "x$test_cygdrive_prefix" = x; then
13510    # As a simple fix, exclude /usr/bin since it's not a real path.
13511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13513      # a path prefixed by /cygdrive for fixpath to work.
13514      new_path="$CYGWIN_ROOT_PATH$input_path"
13515    fi
13516  fi
13517
13518
13519  if test "x$path" != "x$new_path"; then
13520    BOOT_JDK="$new_path"
13521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13523  fi
13524
13525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13526
13527  path="$BOOT_JDK"
13528  has_colon=`$ECHO $path | $GREP ^.:`
13529  new_path="$path"
13530  if test "x$has_colon" = x; then
13531    # Not in mixed or Windows style, start by that.
13532    new_path=`cmd //c echo $path`
13533  fi
13534
13535
13536  input_path="$new_path"
13537  # Check if we need to convert this using DOS-style short mode. If the path
13538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13539  # take no chances and rewrite it.
13540  # Note: m4 eats our [], so we need to use [ and ] instead.
13541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13542  if test "x$has_forbidden_chars" != x; then
13543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13545  fi
13546
13547
13548  windows_path="$new_path"
13549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13550    unix_path=`$CYGPATH -u "$windows_path"`
13551    new_path="$unix_path"
13552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13554    new_path="$unix_path"
13555  fi
13556
13557  if test "x$path" != "x$new_path"; then
13558    BOOT_JDK="$new_path"
13559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13561  fi
13562
13563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13565
13566  else
13567    # We're on a posix platform. Hooray! :)
13568    path="$BOOT_JDK"
13569    has_space=`$ECHO "$path" | $GREP " "`
13570    if test "x$has_space" != x; then
13571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13573      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13574    fi
13575
13576    # Use eval to expand a potential ~
13577    eval path="$path"
13578    if test ! -f "$path" && test ! -d "$path"; then
13579      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13580    fi
13581
13582    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13583  fi
13584
13585              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13586$as_echo_n "checking for Boot JDK... " >&6; }
13587              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13588$as_echo "$BOOT_JDK" >&6; }
13589              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13590$as_echo_n "checking Boot JDK version... " >&6; }
13591              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13592              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13593$as_echo "$BOOT_JDK_VERSION" >&6; }
13594            fi # end check jdk version
13595          fi # end check rt.jar
13596        fi # end check javac
13597      fi # end check java
13598    fi # end check boot jdk found
13599  fi
13600
13601
13602  if test "x$BOOT_JDK_FOUND" = xno; then
13603    # Now execute the test
13604
13605  if test "x$ProgramFiles" != x; then
13606    VIRTUAL_DIR="$ProgramFiles/Java"
13607
13608  windows_path="$VIRTUAL_DIR"
13609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13610    unix_path=`$CYGPATH -u "$windows_path"`
13611    VIRTUAL_DIR="$unix_path"
13612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13614    VIRTUAL_DIR="$unix_path"
13615  fi
13616
13617
13618  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13619  BOOT_JDK_SUFFIX=""
13620  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13621  if test "x$ALL_JDKS_FOUND" != x; then
13622    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13623
13624  if test "x$BOOT_JDK_FOUND" = xno; then
13625    # Now execute the test
13626
13627        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13628        if test -d "$BOOT_JDK"; then
13629          BOOT_JDK_FOUND=maybe
13630          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13631$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13632        fi
13633
13634
13635    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13636    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13637      # Do we have a bin/java?
13638      if test ! -x "$BOOT_JDK/bin/java"; then
13639        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13641        BOOT_JDK_FOUND=no
13642      else
13643        # Do we have a bin/javac?
13644        if test ! -x "$BOOT_JDK/bin/javac"; then
13645          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13647          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13648$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13649          BOOT_JDK_FOUND=no
13650        else
13651          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13652          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13653            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13655            BOOT_JDK_FOUND=no
13656          else
13657            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13658            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13659
13660            # Extra M4 quote needed to protect [] in grep expression.
13661            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13662            if test "x$FOUND_VERSION_78" = x; then
13663              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13665              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13666$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13667              BOOT_JDK_FOUND=no
13668            else
13669              # We're done! :-)
13670              BOOT_JDK_FOUND=yes
13671
13672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13673
13674  # Input might be given as Windows format, start by converting to
13675  # unix format.
13676  path="$BOOT_JDK"
13677  new_path=`$CYGPATH -u "$path"`
13678
13679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13682  # "foo.exe" is OK but "foo" is an error.
13683  #
13684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13685  # It is also a way to make sure we got the proper file name for the real test later on.
13686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13687  if test "x$test_shortpath" = x; then
13688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13689$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13690    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13691  fi
13692
13693  # Call helper function which possibly converts this using DOS-style short mode.
13694  # If so, the updated path is stored in $new_path.
13695
13696  input_path="$new_path"
13697  # Check if we need to convert this using DOS-style short mode. If the path
13698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13699  # take no chances and rewrite it.
13700  # Note: m4 eats our [], so we need to use [ and ] instead.
13701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13702  if test "x$has_forbidden_chars" != x; then
13703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13707      # Going to short mode and back again did indeed matter. Since short mode is
13708      # case insensitive, let's make it lowercase to improve readability.
13709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13710      # Now convert it back to Unix-stile (cygpath)
13711      input_path=`$CYGPATH -u "$shortmode_path"`
13712      new_path="$input_path"
13713    fi
13714  fi
13715
13716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13717  if test "x$test_cygdrive_prefix" = x; then
13718    # As a simple fix, exclude /usr/bin since it's not a real path.
13719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13721      # a path prefixed by /cygdrive for fixpath to work.
13722      new_path="$CYGWIN_ROOT_PATH$input_path"
13723    fi
13724  fi
13725
13726
13727  if test "x$path" != "x$new_path"; then
13728    BOOT_JDK="$new_path"
13729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13731  fi
13732
13733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13734
13735  path="$BOOT_JDK"
13736  has_colon=`$ECHO $path | $GREP ^.:`
13737  new_path="$path"
13738  if test "x$has_colon" = x; then
13739    # Not in mixed or Windows style, start by that.
13740    new_path=`cmd //c echo $path`
13741  fi
13742
13743
13744  input_path="$new_path"
13745  # Check if we need to convert this using DOS-style short mode. If the path
13746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13747  # take no chances and rewrite it.
13748  # Note: m4 eats our [], so we need to use [ and ] instead.
13749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13750  if test "x$has_forbidden_chars" != x; then
13751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13753  fi
13754
13755
13756  windows_path="$new_path"
13757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13758    unix_path=`$CYGPATH -u "$windows_path"`
13759    new_path="$unix_path"
13760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13762    new_path="$unix_path"
13763  fi
13764
13765  if test "x$path" != "x$new_path"; then
13766    BOOT_JDK="$new_path"
13767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13769  fi
13770
13771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13773
13774  else
13775    # We're on a posix platform. Hooray! :)
13776    path="$BOOT_JDK"
13777    has_space=`$ECHO "$path" | $GREP " "`
13778    if test "x$has_space" != x; then
13779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13781      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13782    fi
13783
13784    # Use eval to expand a potential ~
13785    eval path="$path"
13786    if test ! -f "$path" && test ! -d "$path"; then
13787      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13788    fi
13789
13790    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13791  fi
13792
13793              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13794$as_echo_n "checking for Boot JDK... " >&6; }
13795              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13796$as_echo "$BOOT_JDK" >&6; }
13797              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13798$as_echo_n "checking Boot JDK version... " >&6; }
13799              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13800              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13801$as_echo "$BOOT_JDK_VERSION" >&6; }
13802            fi # end check jdk version
13803          fi # end check rt.jar
13804        fi # end check javac
13805      fi # end check java
13806    fi # end check boot jdk found
13807  fi
13808
13809    done
13810  fi
13811
13812  fi
13813
13814
13815    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13816    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13817      # Do we have a bin/java?
13818      if test ! -x "$BOOT_JDK/bin/java"; then
13819        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13821        BOOT_JDK_FOUND=no
13822      else
13823        # Do we have a bin/javac?
13824        if test ! -x "$BOOT_JDK/bin/javac"; then
13825          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13827          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13828$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13829          BOOT_JDK_FOUND=no
13830        else
13831          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13832          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13833            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13835            BOOT_JDK_FOUND=no
13836          else
13837            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13838            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13839
13840            # Extra M4 quote needed to protect [] in grep expression.
13841            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13842            if test "x$FOUND_VERSION_78" = x; then
13843              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13845              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13846$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13847              BOOT_JDK_FOUND=no
13848            else
13849              # We're done! :-)
13850              BOOT_JDK_FOUND=yes
13851
13852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13853
13854  # Input might be given as Windows format, start by converting to
13855  # unix format.
13856  path="$BOOT_JDK"
13857  new_path=`$CYGPATH -u "$path"`
13858
13859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13862  # "foo.exe" is OK but "foo" is an error.
13863  #
13864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13865  # It is also a way to make sure we got the proper file name for the real test later on.
13866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13867  if test "x$test_shortpath" = x; then
13868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13870    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13871  fi
13872
13873  # Call helper function which possibly converts this using DOS-style short mode.
13874  # If so, the updated path is stored in $new_path.
13875
13876  input_path="$new_path"
13877  # Check if we need to convert this using DOS-style short mode. If the path
13878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13879  # take no chances and rewrite it.
13880  # Note: m4 eats our [], so we need to use [ and ] instead.
13881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13882  if test "x$has_forbidden_chars" != x; then
13883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13887      # Going to short mode and back again did indeed matter. Since short mode is
13888      # case insensitive, let's make it lowercase to improve readability.
13889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13890      # Now convert it back to Unix-stile (cygpath)
13891      input_path=`$CYGPATH -u "$shortmode_path"`
13892      new_path="$input_path"
13893    fi
13894  fi
13895
13896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13897  if test "x$test_cygdrive_prefix" = x; then
13898    # As a simple fix, exclude /usr/bin since it's not a real path.
13899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13901      # a path prefixed by /cygdrive for fixpath to work.
13902      new_path="$CYGWIN_ROOT_PATH$input_path"
13903    fi
13904  fi
13905
13906
13907  if test "x$path" != "x$new_path"; then
13908    BOOT_JDK="$new_path"
13909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13911  fi
13912
13913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13914
13915  path="$BOOT_JDK"
13916  has_colon=`$ECHO $path | $GREP ^.:`
13917  new_path="$path"
13918  if test "x$has_colon" = x; then
13919    # Not in mixed or Windows style, start by that.
13920    new_path=`cmd //c echo $path`
13921  fi
13922
13923
13924  input_path="$new_path"
13925  # Check if we need to convert this using DOS-style short mode. If the path
13926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13927  # take no chances and rewrite it.
13928  # Note: m4 eats our [], so we need to use [ and ] instead.
13929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13930  if test "x$has_forbidden_chars" != x; then
13931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13933  fi
13934
13935
13936  windows_path="$new_path"
13937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13938    unix_path=`$CYGPATH -u "$windows_path"`
13939    new_path="$unix_path"
13940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13942    new_path="$unix_path"
13943  fi
13944
13945  if test "x$path" != "x$new_path"; then
13946    BOOT_JDK="$new_path"
13947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13949  fi
13950
13951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13953
13954  else
13955    # We're on a posix platform. Hooray! :)
13956    path="$BOOT_JDK"
13957    has_space=`$ECHO "$path" | $GREP " "`
13958    if test "x$has_space" != x; then
13959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13960$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13961      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13962    fi
13963
13964    # Use eval to expand a potential ~
13965    eval path="$path"
13966    if test ! -f "$path" && test ! -d "$path"; then
13967      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13968    fi
13969
13970    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13971  fi
13972
13973              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13974$as_echo_n "checking for Boot JDK... " >&6; }
13975              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13976$as_echo "$BOOT_JDK" >&6; }
13977              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13978$as_echo_n "checking Boot JDK version... " >&6; }
13979              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13980              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13981$as_echo "$BOOT_JDK_VERSION" >&6; }
13982            fi # end check jdk version
13983          fi # end check rt.jar
13984        fi # end check javac
13985      fi # end check java
13986    fi # end check boot jdk found
13987  fi
13988
13989
13990  if test "x$BOOT_JDK_FOUND" = xno; then
13991    # Now execute the test
13992
13993  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13994  BOOT_JDK_SUFFIX=""
13995  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13996  if test "x$ALL_JDKS_FOUND" != x; then
13997    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13998
13999  if test "x$BOOT_JDK_FOUND" = xno; then
14000    # Now execute the test
14001
14002        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14003        if test -d "$BOOT_JDK"; then
14004          BOOT_JDK_FOUND=maybe
14005          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14006$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14007        fi
14008
14009
14010    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14011    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14012      # Do we have a bin/java?
14013      if test ! -x "$BOOT_JDK/bin/java"; then
14014        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14016        BOOT_JDK_FOUND=no
14017      else
14018        # Do we have a bin/javac?
14019        if test ! -x "$BOOT_JDK/bin/javac"; then
14020          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14022          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14023$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14024          BOOT_JDK_FOUND=no
14025        else
14026          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14027          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14030            BOOT_JDK_FOUND=no
14031          else
14032            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14033            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14034
14035            # Extra M4 quote needed to protect [] in grep expression.
14036            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14037            if test "x$FOUND_VERSION_78" = x; then
14038              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14040              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14041$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14042              BOOT_JDK_FOUND=no
14043            else
14044              # We're done! :-)
14045              BOOT_JDK_FOUND=yes
14046
14047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14048
14049  # Input might be given as Windows format, start by converting to
14050  # unix format.
14051  path="$BOOT_JDK"
14052  new_path=`$CYGPATH -u "$path"`
14053
14054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14057  # "foo.exe" is OK but "foo" is an error.
14058  #
14059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14060  # It is also a way to make sure we got the proper file name for the real test later on.
14061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14062  if test "x$test_shortpath" = x; then
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14066  fi
14067
14068  # Call helper function which possibly converts this using DOS-style short mode.
14069  # If so, the updated path is stored in $new_path.
14070
14071  input_path="$new_path"
14072  # Check if we need to convert this using DOS-style short mode. If the path
14073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14074  # take no chances and rewrite it.
14075  # Note: m4 eats our [], so we need to use [ and ] instead.
14076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14077  if test "x$has_forbidden_chars" != x; then
14078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14082      # Going to short mode and back again did indeed matter. Since short mode is
14083      # case insensitive, let's make it lowercase to improve readability.
14084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14085      # Now convert it back to Unix-stile (cygpath)
14086      input_path=`$CYGPATH -u "$shortmode_path"`
14087      new_path="$input_path"
14088    fi
14089  fi
14090
14091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14092  if test "x$test_cygdrive_prefix" = x; then
14093    # As a simple fix, exclude /usr/bin since it's not a real path.
14094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14096      # a path prefixed by /cygdrive for fixpath to work.
14097      new_path="$CYGWIN_ROOT_PATH$input_path"
14098    fi
14099  fi
14100
14101
14102  if test "x$path" != "x$new_path"; then
14103    BOOT_JDK="$new_path"
14104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14106  fi
14107
14108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14109
14110  path="$BOOT_JDK"
14111  has_colon=`$ECHO $path | $GREP ^.:`
14112  new_path="$path"
14113  if test "x$has_colon" = x; then
14114    # Not in mixed or Windows style, start by that.
14115    new_path=`cmd //c echo $path`
14116  fi
14117
14118
14119  input_path="$new_path"
14120  # Check if we need to convert this using DOS-style short mode. If the path
14121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14122  # take no chances and rewrite it.
14123  # Note: m4 eats our [], so we need to use [ and ] instead.
14124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14125  if test "x$has_forbidden_chars" != x; then
14126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14128  fi
14129
14130
14131  windows_path="$new_path"
14132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14133    unix_path=`$CYGPATH -u "$windows_path"`
14134    new_path="$unix_path"
14135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14137    new_path="$unix_path"
14138  fi
14139
14140  if test "x$path" != "x$new_path"; then
14141    BOOT_JDK="$new_path"
14142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14144  fi
14145
14146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14148
14149  else
14150    # We're on a posix platform. Hooray! :)
14151    path="$BOOT_JDK"
14152    has_space=`$ECHO "$path" | $GREP " "`
14153    if test "x$has_space" != x; then
14154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14156      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14157    fi
14158
14159    # Use eval to expand a potential ~
14160    eval path="$path"
14161    if test ! -f "$path" && test ! -d "$path"; then
14162      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14163    fi
14164
14165    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14166  fi
14167
14168              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14169$as_echo_n "checking for Boot JDK... " >&6; }
14170              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14171$as_echo "$BOOT_JDK" >&6; }
14172              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14173$as_echo_n "checking Boot JDK version... " >&6; }
14174              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14175              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14176$as_echo "$BOOT_JDK_VERSION" >&6; }
14177            fi # end check jdk version
14178          fi # end check rt.jar
14179        fi # end check javac
14180      fi # end check java
14181    fi # end check boot jdk found
14182  fi
14183
14184    done
14185  fi
14186
14187
14188    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14189    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14190      # Do we have a bin/java?
14191      if test ! -x "$BOOT_JDK/bin/java"; then
14192        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14194        BOOT_JDK_FOUND=no
14195      else
14196        # Do we have a bin/javac?
14197        if test ! -x "$BOOT_JDK/bin/javac"; then
14198          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14200          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14201$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14202          BOOT_JDK_FOUND=no
14203        else
14204          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14205          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14208            BOOT_JDK_FOUND=no
14209          else
14210            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14211            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14212
14213            # Extra M4 quote needed to protect [] in grep expression.
14214            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14215            if test "x$FOUND_VERSION_78" = x; then
14216              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14218              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14219$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14220              BOOT_JDK_FOUND=no
14221            else
14222              # We're done! :-)
14223              BOOT_JDK_FOUND=yes
14224
14225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14226
14227  # Input might be given as Windows format, start by converting to
14228  # unix format.
14229  path="$BOOT_JDK"
14230  new_path=`$CYGPATH -u "$path"`
14231
14232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14235  # "foo.exe" is OK but "foo" is an error.
14236  #
14237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14238  # It is also a way to make sure we got the proper file name for the real test later on.
14239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14240  if test "x$test_shortpath" = x; then
14241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14243    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14244  fi
14245
14246  # Call helper function which possibly converts this using DOS-style short mode.
14247  # If so, the updated path is stored in $new_path.
14248
14249  input_path="$new_path"
14250  # Check if we need to convert this using DOS-style short mode. If the path
14251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14252  # take no chances and rewrite it.
14253  # Note: m4 eats our [], so we need to use [ and ] instead.
14254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14255  if test "x$has_forbidden_chars" != x; then
14256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14260      # Going to short mode and back again did indeed matter. Since short mode is
14261      # case insensitive, let's make it lowercase to improve readability.
14262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14263      # Now convert it back to Unix-stile (cygpath)
14264      input_path=`$CYGPATH -u "$shortmode_path"`
14265      new_path="$input_path"
14266    fi
14267  fi
14268
14269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14270  if test "x$test_cygdrive_prefix" = x; then
14271    # As a simple fix, exclude /usr/bin since it's not a real path.
14272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14274      # a path prefixed by /cygdrive for fixpath to work.
14275      new_path="$CYGWIN_ROOT_PATH$input_path"
14276    fi
14277  fi
14278
14279
14280  if test "x$path" != "x$new_path"; then
14281    BOOT_JDK="$new_path"
14282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14283$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14284  fi
14285
14286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14287
14288  path="$BOOT_JDK"
14289  has_colon=`$ECHO $path | $GREP ^.:`
14290  new_path="$path"
14291  if test "x$has_colon" = x; then
14292    # Not in mixed or Windows style, start by that.
14293    new_path=`cmd //c echo $path`
14294  fi
14295
14296
14297  input_path="$new_path"
14298  # Check if we need to convert this using DOS-style short mode. If the path
14299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14300  # take no chances and rewrite it.
14301  # Note: m4 eats our [], so we need to use [ and ] instead.
14302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14303  if test "x$has_forbidden_chars" != x; then
14304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14306  fi
14307
14308
14309  windows_path="$new_path"
14310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14311    unix_path=`$CYGPATH -u "$windows_path"`
14312    new_path="$unix_path"
14313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14315    new_path="$unix_path"
14316  fi
14317
14318  if test "x$path" != "x$new_path"; then
14319    BOOT_JDK="$new_path"
14320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14322  fi
14323
14324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14326
14327  else
14328    # We're on a posix platform. Hooray! :)
14329    path="$BOOT_JDK"
14330    has_space=`$ECHO "$path" | $GREP " "`
14331    if test "x$has_space" != x; then
14332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14334      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14335    fi
14336
14337    # Use eval to expand a potential ~
14338    eval path="$path"
14339    if test ! -f "$path" && test ! -d "$path"; then
14340      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14341    fi
14342
14343    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14344  fi
14345
14346              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14347$as_echo_n "checking for Boot JDK... " >&6; }
14348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14349$as_echo "$BOOT_JDK" >&6; }
14350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14351$as_echo_n "checking Boot JDK version... " >&6; }
14352              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14354$as_echo "$BOOT_JDK_VERSION" >&6; }
14355            fi # end check jdk version
14356          fi # end check rt.jar
14357        fi # end check javac
14358      fi # end check java
14359    fi # end check boot jdk found
14360  fi
14361
14362  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14363
14364  if test "x$BOOT_JDK_FOUND" = xno; then
14365    # Now execute the test
14366
14367  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14368  BOOT_JDK_SUFFIX="/Contents/Home"
14369  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14370  if test "x$ALL_JDKS_FOUND" != x; then
14371    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14372
14373  if test "x$BOOT_JDK_FOUND" = xno; then
14374    # Now execute the test
14375
14376        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14377        if test -d "$BOOT_JDK"; then
14378          BOOT_JDK_FOUND=maybe
14379          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14380$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14381        fi
14382
14383
14384    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14385    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14386      # Do we have a bin/java?
14387      if test ! -x "$BOOT_JDK/bin/java"; then
14388        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14390        BOOT_JDK_FOUND=no
14391      else
14392        # Do we have a bin/javac?
14393        if test ! -x "$BOOT_JDK/bin/javac"; then
14394          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14396          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14397$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14398          BOOT_JDK_FOUND=no
14399        else
14400          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14401          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14402            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14404            BOOT_JDK_FOUND=no
14405          else
14406            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14407            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14408
14409            # Extra M4 quote needed to protect [] in grep expression.
14410            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14411            if test "x$FOUND_VERSION_78" = x; then
14412              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14414              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14415$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14416              BOOT_JDK_FOUND=no
14417            else
14418              # We're done! :-)
14419              BOOT_JDK_FOUND=yes
14420
14421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14422
14423  # Input might be given as Windows format, start by converting to
14424  # unix format.
14425  path="$BOOT_JDK"
14426  new_path=`$CYGPATH -u "$path"`
14427
14428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14431  # "foo.exe" is OK but "foo" is an error.
14432  #
14433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14434  # It is also a way to make sure we got the proper file name for the real test later on.
14435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14436  if test "x$test_shortpath" = x; then
14437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14439    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14440  fi
14441
14442  # Call helper function which possibly converts this using DOS-style short mode.
14443  # If so, the updated path is stored in $new_path.
14444
14445  input_path="$new_path"
14446  # Check if we need to convert this using DOS-style short mode. If the path
14447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14448  # take no chances and rewrite it.
14449  # Note: m4 eats our [], so we need to use [ and ] instead.
14450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14451  if test "x$has_forbidden_chars" != x; then
14452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14456      # Going to short mode and back again did indeed matter. Since short mode is
14457      # case insensitive, let's make it lowercase to improve readability.
14458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14459      # Now convert it back to Unix-stile (cygpath)
14460      input_path=`$CYGPATH -u "$shortmode_path"`
14461      new_path="$input_path"
14462    fi
14463  fi
14464
14465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14466  if test "x$test_cygdrive_prefix" = x; then
14467    # As a simple fix, exclude /usr/bin since it's not a real path.
14468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14470      # a path prefixed by /cygdrive for fixpath to work.
14471      new_path="$CYGWIN_ROOT_PATH$input_path"
14472    fi
14473  fi
14474
14475
14476  if test "x$path" != "x$new_path"; then
14477    BOOT_JDK="$new_path"
14478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14479$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14480  fi
14481
14482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14483
14484  path="$BOOT_JDK"
14485  has_colon=`$ECHO $path | $GREP ^.:`
14486  new_path="$path"
14487  if test "x$has_colon" = x; then
14488    # Not in mixed or Windows style, start by that.
14489    new_path=`cmd //c echo $path`
14490  fi
14491
14492
14493  input_path="$new_path"
14494  # Check if we need to convert this using DOS-style short mode. If the path
14495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14496  # take no chances and rewrite it.
14497  # Note: m4 eats our [], so we need to use [ and ] instead.
14498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14499  if test "x$has_forbidden_chars" != x; then
14500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14502  fi
14503
14504
14505  windows_path="$new_path"
14506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14507    unix_path=`$CYGPATH -u "$windows_path"`
14508    new_path="$unix_path"
14509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14511    new_path="$unix_path"
14512  fi
14513
14514  if test "x$path" != "x$new_path"; then
14515    BOOT_JDK="$new_path"
14516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14518  fi
14519
14520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14522
14523  else
14524    # We're on a posix platform. Hooray! :)
14525    path="$BOOT_JDK"
14526    has_space=`$ECHO "$path" | $GREP " "`
14527    if test "x$has_space" != x; then
14528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14529$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14530      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14531    fi
14532
14533    # Use eval to expand a potential ~
14534    eval path="$path"
14535    if test ! -f "$path" && test ! -d "$path"; then
14536      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14537    fi
14538
14539    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14540  fi
14541
14542              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14543$as_echo_n "checking for Boot JDK... " >&6; }
14544              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14545$as_echo "$BOOT_JDK" >&6; }
14546              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14547$as_echo_n "checking Boot JDK version... " >&6; }
14548              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14549              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14550$as_echo "$BOOT_JDK_VERSION" >&6; }
14551            fi # end check jdk version
14552          fi # end check rt.jar
14553        fi # end check javac
14554      fi # end check java
14555    fi # end check boot jdk found
14556  fi
14557
14558    done
14559  fi
14560
14561
14562    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14563    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14564      # Do we have a bin/java?
14565      if test ! -x "$BOOT_JDK/bin/java"; then
14566        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14568        BOOT_JDK_FOUND=no
14569      else
14570        # Do we have a bin/javac?
14571        if test ! -x "$BOOT_JDK/bin/javac"; then
14572          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14574          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14575$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14576          BOOT_JDK_FOUND=no
14577        else
14578          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14579          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14580            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14582            BOOT_JDK_FOUND=no
14583          else
14584            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14585            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14586
14587            # Extra M4 quote needed to protect [] in grep expression.
14588            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14589            if test "x$FOUND_VERSION_78" = x; then
14590              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14592              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14593$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14594              BOOT_JDK_FOUND=no
14595            else
14596              # We're done! :-)
14597              BOOT_JDK_FOUND=yes
14598
14599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14600
14601  # Input might be given as Windows format, start by converting to
14602  # unix format.
14603  path="$BOOT_JDK"
14604  new_path=`$CYGPATH -u "$path"`
14605
14606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14609  # "foo.exe" is OK but "foo" is an error.
14610  #
14611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14612  # It is also a way to make sure we got the proper file name for the real test later on.
14613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14614  if test "x$test_shortpath" = x; then
14615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14618  fi
14619
14620  # Call helper function which possibly converts this using DOS-style short mode.
14621  # If so, the updated path is stored in $new_path.
14622
14623  input_path="$new_path"
14624  # Check if we need to convert this using DOS-style short mode. If the path
14625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14626  # take no chances and rewrite it.
14627  # Note: m4 eats our [], so we need to use [ and ] instead.
14628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14629  if test "x$has_forbidden_chars" != x; then
14630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14634      # Going to short mode and back again did indeed matter. Since short mode is
14635      # case insensitive, let's make it lowercase to improve readability.
14636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14637      # Now convert it back to Unix-stile (cygpath)
14638      input_path=`$CYGPATH -u "$shortmode_path"`
14639      new_path="$input_path"
14640    fi
14641  fi
14642
14643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14644  if test "x$test_cygdrive_prefix" = x; then
14645    # As a simple fix, exclude /usr/bin since it's not a real path.
14646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14648      # a path prefixed by /cygdrive for fixpath to work.
14649      new_path="$CYGWIN_ROOT_PATH$input_path"
14650    fi
14651  fi
14652
14653
14654  if test "x$path" != "x$new_path"; then
14655    BOOT_JDK="$new_path"
14656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14658  fi
14659
14660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14661
14662  path="$BOOT_JDK"
14663  has_colon=`$ECHO $path | $GREP ^.:`
14664  new_path="$path"
14665  if test "x$has_colon" = x; then
14666    # Not in mixed or Windows style, start by that.
14667    new_path=`cmd //c echo $path`
14668  fi
14669
14670
14671  input_path="$new_path"
14672  # Check if we need to convert this using DOS-style short mode. If the path
14673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14674  # take no chances and rewrite it.
14675  # Note: m4 eats our [], so we need to use [ and ] instead.
14676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14677  if test "x$has_forbidden_chars" != x; then
14678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14680  fi
14681
14682
14683  windows_path="$new_path"
14684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14685    unix_path=`$CYGPATH -u "$windows_path"`
14686    new_path="$unix_path"
14687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14689    new_path="$unix_path"
14690  fi
14691
14692  if test "x$path" != "x$new_path"; then
14693    BOOT_JDK="$new_path"
14694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14696  fi
14697
14698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14700
14701  else
14702    # We're on a posix platform. Hooray! :)
14703    path="$BOOT_JDK"
14704    has_space=`$ECHO "$path" | $GREP " "`
14705    if test "x$has_space" != x; then
14706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14708      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14709    fi
14710
14711    # Use eval to expand a potential ~
14712    eval path="$path"
14713    if test ! -f "$path" && test ! -d "$path"; then
14714      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14715    fi
14716
14717    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14718  fi
14719
14720              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14721$as_echo_n "checking for Boot JDK... " >&6; }
14722              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14723$as_echo "$BOOT_JDK" >&6; }
14724              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14725$as_echo_n "checking Boot JDK version... " >&6; }
14726              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14727              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14728$as_echo "$BOOT_JDK_VERSION" >&6; }
14729            fi # end check jdk version
14730          fi # end check rt.jar
14731        fi # end check javac
14732      fi # end check java
14733    fi # end check boot jdk found
14734  fi
14735
14736
14737  if test "x$BOOT_JDK_FOUND" = xno; then
14738    # Now execute the test
14739
14740  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14741  BOOT_JDK_SUFFIX="/Contents/Home"
14742  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14743  if test "x$ALL_JDKS_FOUND" != x; then
14744    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14745
14746  if test "x$BOOT_JDK_FOUND" = xno; then
14747    # Now execute the test
14748
14749        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14750        if test -d "$BOOT_JDK"; then
14751          BOOT_JDK_FOUND=maybe
14752          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14753$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14754        fi
14755
14756
14757    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14758    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14759      # Do we have a bin/java?
14760      if test ! -x "$BOOT_JDK/bin/java"; then
14761        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14763        BOOT_JDK_FOUND=no
14764      else
14765        # Do we have a bin/javac?
14766        if test ! -x "$BOOT_JDK/bin/javac"; then
14767          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14769          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14770$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14771          BOOT_JDK_FOUND=no
14772        else
14773          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14774          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14775            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14777            BOOT_JDK_FOUND=no
14778          else
14779            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14780            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14781
14782            # Extra M4 quote needed to protect [] in grep expression.
14783            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14784            if test "x$FOUND_VERSION_78" = x; then
14785              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14787              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14788$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14789              BOOT_JDK_FOUND=no
14790            else
14791              # We're done! :-)
14792              BOOT_JDK_FOUND=yes
14793
14794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14795
14796  # Input might be given as Windows format, start by converting to
14797  # unix format.
14798  path="$BOOT_JDK"
14799  new_path=`$CYGPATH -u "$path"`
14800
14801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14804  # "foo.exe" is OK but "foo" is an error.
14805  #
14806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14807  # It is also a way to make sure we got the proper file name for the real test later on.
14808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14809  if test "x$test_shortpath" = x; then
14810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14813  fi
14814
14815  # Call helper function which possibly converts this using DOS-style short mode.
14816  # If so, the updated path is stored in $new_path.
14817
14818  input_path="$new_path"
14819  # Check if we need to convert this using DOS-style short mode. If the path
14820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14821  # take no chances and rewrite it.
14822  # Note: m4 eats our [], so we need to use [ and ] instead.
14823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14824  if test "x$has_forbidden_chars" != x; then
14825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14829      # Going to short mode and back again did indeed matter. Since short mode is
14830      # case insensitive, let's make it lowercase to improve readability.
14831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14832      # Now convert it back to Unix-stile (cygpath)
14833      input_path=`$CYGPATH -u "$shortmode_path"`
14834      new_path="$input_path"
14835    fi
14836  fi
14837
14838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14839  if test "x$test_cygdrive_prefix" = x; then
14840    # As a simple fix, exclude /usr/bin since it's not a real path.
14841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14843      # a path prefixed by /cygdrive for fixpath to work.
14844      new_path="$CYGWIN_ROOT_PATH$input_path"
14845    fi
14846  fi
14847
14848
14849  if test "x$path" != "x$new_path"; then
14850    BOOT_JDK="$new_path"
14851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14853  fi
14854
14855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14856
14857  path="$BOOT_JDK"
14858  has_colon=`$ECHO $path | $GREP ^.:`
14859  new_path="$path"
14860  if test "x$has_colon" = x; then
14861    # Not in mixed or Windows style, start by that.
14862    new_path=`cmd //c echo $path`
14863  fi
14864
14865
14866  input_path="$new_path"
14867  # Check if we need to convert this using DOS-style short mode. If the path
14868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14869  # take no chances and rewrite it.
14870  # Note: m4 eats our [], so we need to use [ and ] instead.
14871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14872  if test "x$has_forbidden_chars" != x; then
14873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14875  fi
14876
14877
14878  windows_path="$new_path"
14879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14880    unix_path=`$CYGPATH -u "$windows_path"`
14881    new_path="$unix_path"
14882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14884    new_path="$unix_path"
14885  fi
14886
14887  if test "x$path" != "x$new_path"; then
14888    BOOT_JDK="$new_path"
14889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14891  fi
14892
14893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14895
14896  else
14897    # We're on a posix platform. Hooray! :)
14898    path="$BOOT_JDK"
14899    has_space=`$ECHO "$path" | $GREP " "`
14900    if test "x$has_space" != x; then
14901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14903      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14904    fi
14905
14906    # Use eval to expand a potential ~
14907    eval path="$path"
14908    if test ! -f "$path" && test ! -d "$path"; then
14909      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14910    fi
14911
14912    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14913  fi
14914
14915              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14916$as_echo_n "checking for Boot JDK... " >&6; }
14917              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14918$as_echo "$BOOT_JDK" >&6; }
14919              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14920$as_echo_n "checking Boot JDK version... " >&6; }
14921              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14922              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14923$as_echo "$BOOT_JDK_VERSION" >&6; }
14924            fi # end check jdk version
14925          fi # end check rt.jar
14926        fi # end check javac
14927      fi # end check java
14928    fi # end check boot jdk found
14929  fi
14930
14931    done
14932  fi
14933
14934
14935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14937      # Do we have a bin/java?
14938      if test ! -x "$BOOT_JDK/bin/java"; then
14939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14941        BOOT_JDK_FOUND=no
14942      else
14943        # Do we have a bin/javac?
14944        if test ! -x "$BOOT_JDK/bin/javac"; then
14945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14949          BOOT_JDK_FOUND=no
14950        else
14951          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14952          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14953            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14955            BOOT_JDK_FOUND=no
14956          else
14957            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14958            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14959
14960            # Extra M4 quote needed to protect [] in grep expression.
14961            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14962            if test "x$FOUND_VERSION_78" = x; then
14963              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14965              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14966$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14967              BOOT_JDK_FOUND=no
14968            else
14969              # We're done! :-)
14970              BOOT_JDK_FOUND=yes
14971
14972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14973
14974  # Input might be given as Windows format, start by converting to
14975  # unix format.
14976  path="$BOOT_JDK"
14977  new_path=`$CYGPATH -u "$path"`
14978
14979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14982  # "foo.exe" is OK but "foo" is an error.
14983  #
14984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14985  # It is also a way to make sure we got the proper file name for the real test later on.
14986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14987  if test "x$test_shortpath" = x; then
14988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14990    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14991  fi
14992
14993  # Call helper function which possibly converts this using DOS-style short mode.
14994  # If so, the updated path is stored in $new_path.
14995
14996  input_path="$new_path"
14997  # Check if we need to convert this using DOS-style short mode. If the path
14998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14999  # take no chances and rewrite it.
15000  # Note: m4 eats our [], so we need to use [ and ] instead.
15001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15002  if test "x$has_forbidden_chars" != x; then
15003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15007      # Going to short mode and back again did indeed matter. Since short mode is
15008      # case insensitive, let's make it lowercase to improve readability.
15009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15010      # Now convert it back to Unix-stile (cygpath)
15011      input_path=`$CYGPATH -u "$shortmode_path"`
15012      new_path="$input_path"
15013    fi
15014  fi
15015
15016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15017  if test "x$test_cygdrive_prefix" = x; then
15018    # As a simple fix, exclude /usr/bin since it's not a real path.
15019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15021      # a path prefixed by /cygdrive for fixpath to work.
15022      new_path="$CYGWIN_ROOT_PATH$input_path"
15023    fi
15024  fi
15025
15026
15027  if test "x$path" != "x$new_path"; then
15028    BOOT_JDK="$new_path"
15029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15031  fi
15032
15033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15034
15035  path="$BOOT_JDK"
15036  has_colon=`$ECHO $path | $GREP ^.:`
15037  new_path="$path"
15038  if test "x$has_colon" = x; then
15039    # Not in mixed or Windows style, start by that.
15040    new_path=`cmd //c echo $path`
15041  fi
15042
15043
15044  input_path="$new_path"
15045  # Check if we need to convert this using DOS-style short mode. If the path
15046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15047  # take no chances and rewrite it.
15048  # Note: m4 eats our [], so we need to use [ and ] instead.
15049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15050  if test "x$has_forbidden_chars" != x; then
15051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15053  fi
15054
15055
15056  windows_path="$new_path"
15057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15058    unix_path=`$CYGPATH -u "$windows_path"`
15059    new_path="$unix_path"
15060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15062    new_path="$unix_path"
15063  fi
15064
15065  if test "x$path" != "x$new_path"; then
15066    BOOT_JDK="$new_path"
15067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15069  fi
15070
15071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15073
15074  else
15075    # We're on a posix platform. Hooray! :)
15076    path="$BOOT_JDK"
15077    has_space=`$ECHO "$path" | $GREP " "`
15078    if test "x$has_space" != x; then
15079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15080$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15081      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15082    fi
15083
15084    # Use eval to expand a potential ~
15085    eval path="$path"
15086    if test ! -f "$path" && test ! -d "$path"; then
15087      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15088    fi
15089
15090    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15091  fi
15092
15093              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15094$as_echo_n "checking for Boot JDK... " >&6; }
15095              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15096$as_echo "$BOOT_JDK" >&6; }
15097              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15098$as_echo_n "checking Boot JDK version... " >&6; }
15099              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15100              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15101$as_echo "$BOOT_JDK_VERSION" >&6; }
15102            fi # end check jdk version
15103          fi # end check rt.jar
15104        fi # end check javac
15105      fi # end check java
15106    fi # end check boot jdk found
15107  fi
15108
15109  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15110
15111  if test "x$BOOT_JDK_FOUND" = xno; then
15112    # Now execute the test
15113
15114  BOOT_JDK_PREFIX="/usr/lib/jvm"
15115  BOOT_JDK_SUFFIX=""
15116  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15117  if test "x$ALL_JDKS_FOUND" != x; then
15118    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15119
15120  if test "x$BOOT_JDK_FOUND" = xno; then
15121    # Now execute the test
15122
15123        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15124        if test -d "$BOOT_JDK"; then
15125          BOOT_JDK_FOUND=maybe
15126          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15127$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15128        fi
15129
15130
15131    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15132    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15133      # Do we have a bin/java?
15134      if test ! -x "$BOOT_JDK/bin/java"; then
15135        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15137        BOOT_JDK_FOUND=no
15138      else
15139        # Do we have a bin/javac?
15140        if test ! -x "$BOOT_JDK/bin/javac"; then
15141          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15143          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15144$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15145          BOOT_JDK_FOUND=no
15146        else
15147          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15148          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15151            BOOT_JDK_FOUND=no
15152          else
15153            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15154            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15155
15156            # Extra M4 quote needed to protect [] in grep expression.
15157            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15158            if test "x$FOUND_VERSION_78" = x; then
15159              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15161              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15162$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15163              BOOT_JDK_FOUND=no
15164            else
15165              # We're done! :-)
15166              BOOT_JDK_FOUND=yes
15167
15168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15169
15170  # Input might be given as Windows format, start by converting to
15171  # unix format.
15172  path="$BOOT_JDK"
15173  new_path=`$CYGPATH -u "$path"`
15174
15175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15178  # "foo.exe" is OK but "foo" is an error.
15179  #
15180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15181  # It is also a way to make sure we got the proper file name for the real test later on.
15182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15183  if test "x$test_shortpath" = x; then
15184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15187  fi
15188
15189  # Call helper function which possibly converts this using DOS-style short mode.
15190  # If so, the updated path is stored in $new_path.
15191
15192  input_path="$new_path"
15193  # Check if we need to convert this using DOS-style short mode. If the path
15194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15195  # take no chances and rewrite it.
15196  # Note: m4 eats our [], so we need to use [ and ] instead.
15197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15198  if test "x$has_forbidden_chars" != x; then
15199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15203      # Going to short mode and back again did indeed matter. Since short mode is
15204      # case insensitive, let's make it lowercase to improve readability.
15205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15206      # Now convert it back to Unix-stile (cygpath)
15207      input_path=`$CYGPATH -u "$shortmode_path"`
15208      new_path="$input_path"
15209    fi
15210  fi
15211
15212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15213  if test "x$test_cygdrive_prefix" = x; then
15214    # As a simple fix, exclude /usr/bin since it's not a real path.
15215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15217      # a path prefixed by /cygdrive for fixpath to work.
15218      new_path="$CYGWIN_ROOT_PATH$input_path"
15219    fi
15220  fi
15221
15222
15223  if test "x$path" != "x$new_path"; then
15224    BOOT_JDK="$new_path"
15225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15227  fi
15228
15229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15230
15231  path="$BOOT_JDK"
15232  has_colon=`$ECHO $path | $GREP ^.:`
15233  new_path="$path"
15234  if test "x$has_colon" = x; then
15235    # Not in mixed or Windows style, start by that.
15236    new_path=`cmd //c echo $path`
15237  fi
15238
15239
15240  input_path="$new_path"
15241  # Check if we need to convert this using DOS-style short mode. If the path
15242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15243  # take no chances and rewrite it.
15244  # Note: m4 eats our [], so we need to use [ and ] instead.
15245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15246  if test "x$has_forbidden_chars" != x; then
15247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249  fi
15250
15251
15252  windows_path="$new_path"
15253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15254    unix_path=`$CYGPATH -u "$windows_path"`
15255    new_path="$unix_path"
15256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15258    new_path="$unix_path"
15259  fi
15260
15261  if test "x$path" != "x$new_path"; then
15262    BOOT_JDK="$new_path"
15263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15265  fi
15266
15267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15269
15270  else
15271    # We're on a posix platform. Hooray! :)
15272    path="$BOOT_JDK"
15273    has_space=`$ECHO "$path" | $GREP " "`
15274    if test "x$has_space" != x; then
15275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15277      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15278    fi
15279
15280    # Use eval to expand a potential ~
15281    eval path="$path"
15282    if test ! -f "$path" && test ! -d "$path"; then
15283      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15284    fi
15285
15286    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15287  fi
15288
15289              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15290$as_echo_n "checking for Boot JDK... " >&6; }
15291              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15292$as_echo "$BOOT_JDK" >&6; }
15293              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15294$as_echo_n "checking Boot JDK version... " >&6; }
15295              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15296              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15297$as_echo "$BOOT_JDK_VERSION" >&6; }
15298            fi # end check jdk version
15299          fi # end check rt.jar
15300        fi # end check javac
15301      fi # end check java
15302    fi # end check boot jdk found
15303  fi
15304
15305    done
15306  fi
15307
15308
15309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15311      # Do we have a bin/java?
15312      if test ! -x "$BOOT_JDK/bin/java"; then
15313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15315        BOOT_JDK_FOUND=no
15316      else
15317        # Do we have a bin/javac?
15318        if test ! -x "$BOOT_JDK/bin/javac"; then
15319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15323          BOOT_JDK_FOUND=no
15324        else
15325          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15326          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15329            BOOT_JDK_FOUND=no
15330          else
15331            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15332            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15333
15334            # Extra M4 quote needed to protect [] in grep expression.
15335            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15336            if test "x$FOUND_VERSION_78" = x; then
15337              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15339              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15340$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15341              BOOT_JDK_FOUND=no
15342            else
15343              # We're done! :-)
15344              BOOT_JDK_FOUND=yes
15345
15346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15347
15348  # Input might be given as Windows format, start by converting to
15349  # unix format.
15350  path="$BOOT_JDK"
15351  new_path=`$CYGPATH -u "$path"`
15352
15353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15356  # "foo.exe" is OK but "foo" is an error.
15357  #
15358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15359  # It is also a way to make sure we got the proper file name for the real test later on.
15360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15361  if test "x$test_shortpath" = x; then
15362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15365  fi
15366
15367  # Call helper function which possibly converts this using DOS-style short mode.
15368  # If so, the updated path is stored in $new_path.
15369
15370  input_path="$new_path"
15371  # Check if we need to convert this using DOS-style short mode. If the path
15372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15373  # take no chances and rewrite it.
15374  # Note: m4 eats our [], so we need to use [ and ] instead.
15375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15376  if test "x$has_forbidden_chars" != x; then
15377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15381      # Going to short mode and back again did indeed matter. Since short mode is
15382      # case insensitive, let's make it lowercase to improve readability.
15383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15384      # Now convert it back to Unix-stile (cygpath)
15385      input_path=`$CYGPATH -u "$shortmode_path"`
15386      new_path="$input_path"
15387    fi
15388  fi
15389
15390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15391  if test "x$test_cygdrive_prefix" = x; then
15392    # As a simple fix, exclude /usr/bin since it's not a real path.
15393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15395      # a path prefixed by /cygdrive for fixpath to work.
15396      new_path="$CYGWIN_ROOT_PATH$input_path"
15397    fi
15398  fi
15399
15400
15401  if test "x$path" != "x$new_path"; then
15402    BOOT_JDK="$new_path"
15403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15405  fi
15406
15407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15408
15409  path="$BOOT_JDK"
15410  has_colon=`$ECHO $path | $GREP ^.:`
15411  new_path="$path"
15412  if test "x$has_colon" = x; then
15413    # Not in mixed or Windows style, start by that.
15414    new_path=`cmd //c echo $path`
15415  fi
15416
15417
15418  input_path="$new_path"
15419  # Check if we need to convert this using DOS-style short mode. If the path
15420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15421  # take no chances and rewrite it.
15422  # Note: m4 eats our [], so we need to use [ and ] instead.
15423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15424  if test "x$has_forbidden_chars" != x; then
15425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15427  fi
15428
15429
15430  windows_path="$new_path"
15431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15432    unix_path=`$CYGPATH -u "$windows_path"`
15433    new_path="$unix_path"
15434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15436    new_path="$unix_path"
15437  fi
15438
15439  if test "x$path" != "x$new_path"; then
15440    BOOT_JDK="$new_path"
15441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15443  fi
15444
15445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15447
15448  else
15449    # We're on a posix platform. Hooray! :)
15450    path="$BOOT_JDK"
15451    has_space=`$ECHO "$path" | $GREP " "`
15452    if test "x$has_space" != x; then
15453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15456    fi
15457
15458    # Use eval to expand a potential ~
15459    eval path="$path"
15460    if test ! -f "$path" && test ! -d "$path"; then
15461      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15462    fi
15463
15464    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15465  fi
15466
15467              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15468$as_echo_n "checking for Boot JDK... " >&6; }
15469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15470$as_echo "$BOOT_JDK" >&6; }
15471              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15472$as_echo_n "checking Boot JDK version... " >&6; }
15473              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15474              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15475$as_echo "$BOOT_JDK_VERSION" >&6; }
15476            fi # end check jdk version
15477          fi # end check rt.jar
15478        fi # end check javac
15479      fi # end check java
15480    fi # end check boot jdk found
15481  fi
15482
15483  fi
15484
15485
15486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15488      # Do we have a bin/java?
15489      if test ! -x "$BOOT_JDK/bin/java"; then
15490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15492        BOOT_JDK_FOUND=no
15493      else
15494        # Do we have a bin/javac?
15495        if test ! -x "$BOOT_JDK/bin/javac"; then
15496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15500          BOOT_JDK_FOUND=no
15501        else
15502          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15503          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15506            BOOT_JDK_FOUND=no
15507          else
15508            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15510
15511            # Extra M4 quote needed to protect [] in grep expression.
15512            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15513            if test "x$FOUND_VERSION_78" = x; then
15514              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15516              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15517$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15518              BOOT_JDK_FOUND=no
15519            else
15520              # We're done! :-)
15521              BOOT_JDK_FOUND=yes
15522
15523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15524
15525  # Input might be given as Windows format, start by converting to
15526  # unix format.
15527  path="$BOOT_JDK"
15528  new_path=`$CYGPATH -u "$path"`
15529
15530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15533  # "foo.exe" is OK but "foo" is an error.
15534  #
15535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15536  # It is also a way to make sure we got the proper file name for the real test later on.
15537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15538  if test "x$test_shortpath" = x; then
15539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15542  fi
15543
15544  # Call helper function which possibly converts this using DOS-style short mode.
15545  # If so, the updated path is stored in $new_path.
15546
15547  input_path="$new_path"
15548  # Check if we need to convert this using DOS-style short mode. If the path
15549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15550  # take no chances and rewrite it.
15551  # Note: m4 eats our [], so we need to use [ and ] instead.
15552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15553  if test "x$has_forbidden_chars" != x; then
15554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15558      # Going to short mode and back again did indeed matter. Since short mode is
15559      # case insensitive, let's make it lowercase to improve readability.
15560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15561      # Now convert it back to Unix-stile (cygpath)
15562      input_path=`$CYGPATH -u "$shortmode_path"`
15563      new_path="$input_path"
15564    fi
15565  fi
15566
15567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15568  if test "x$test_cygdrive_prefix" = x; then
15569    # As a simple fix, exclude /usr/bin since it's not a real path.
15570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15572      # a path prefixed by /cygdrive for fixpath to work.
15573      new_path="$CYGWIN_ROOT_PATH$input_path"
15574    fi
15575  fi
15576
15577
15578  if test "x$path" != "x$new_path"; then
15579    BOOT_JDK="$new_path"
15580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15582  fi
15583
15584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15585
15586  path="$BOOT_JDK"
15587  has_colon=`$ECHO $path | $GREP ^.:`
15588  new_path="$path"
15589  if test "x$has_colon" = x; then
15590    # Not in mixed or Windows style, start by that.
15591    new_path=`cmd //c echo $path`
15592  fi
15593
15594
15595  input_path="$new_path"
15596  # Check if we need to convert this using DOS-style short mode. If the path
15597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15598  # take no chances and rewrite it.
15599  # Note: m4 eats our [], so we need to use [ and ] instead.
15600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15601  if test "x$has_forbidden_chars" != x; then
15602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15604  fi
15605
15606
15607  windows_path="$new_path"
15608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15609    unix_path=`$CYGPATH -u "$windows_path"`
15610    new_path="$unix_path"
15611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15613    new_path="$unix_path"
15614  fi
15615
15616  if test "x$path" != "x$new_path"; then
15617    BOOT_JDK="$new_path"
15618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15620  fi
15621
15622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15624
15625  else
15626    # We're on a posix platform. Hooray! :)
15627    path="$BOOT_JDK"
15628    has_space=`$ECHO "$path" | $GREP " "`
15629    if test "x$has_space" != x; then
15630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15632      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15633    fi
15634
15635    # Use eval to expand a potential ~
15636    eval path="$path"
15637    if test ! -f "$path" && test ! -d "$path"; then
15638      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15639    fi
15640
15641    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15642  fi
15643
15644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15645$as_echo_n "checking for Boot JDK... " >&6; }
15646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15647$as_echo "$BOOT_JDK" >&6; }
15648              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15649$as_echo_n "checking Boot JDK version... " >&6; }
15650              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15652$as_echo "$BOOT_JDK_VERSION" >&6; }
15653            fi # end check jdk version
15654          fi # end check rt.jar
15655        fi # end check javac
15656      fi # end check java
15657    fi # end check boot jdk found
15658  fi
15659
15660
15661# If we haven't found anything yet, we've truly lost. Give up.
15662if test "x$BOOT_JDK_FOUND" = xno; then
15663
15664    # Print a helpful message on how to acquire the necessary build dependency.
15665    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15666    MISSING_DEPENDENCY=openjdk
15667    PKGHANDLER_COMMAND=
15668
15669    case $PKGHANDLER in
15670	apt-get)
15671                apt_help     $MISSING_DEPENDENCY ;;
15672    yum)
15673                yum_help     $MISSING_DEPENDENCY ;;
15674	port)
15675                port_help    $MISSING_DEPENDENCY ;;
15676	pkgutil)
15677                pkgutil_help $MISSING_DEPENDENCY ;;
15678	pkgadd)
15679                pkgadd_help  $MISSING_DEPENDENCY ;;
15680    * )
15681      break ;;
15682    esac
15683
15684    if test "x$PKGHANDLER_COMMAND" != x; then
15685        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15686    fi
15687
15688  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15689$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15691$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15692  as_fn_error $? "Cannot continue" "$LINENO" 5
15693fi
15694
15695# Setup proper paths for what we found
15696BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15697if test ! -f "$BOOT_RTJAR"; then
15698    # On MacOSX it is called classes.jar
15699    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15700    if test -f "$BOOT_RTJAR"; then
15701      # Remove the ..
15702      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15703    fi
15704fi
15705BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15706BOOT_JDK="$BOOT_JDK"
15707
15708
15709
15710
15711# Setup tools from the Boot JDK.
15712
15713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15714$as_echo_n "checking for java in Boot JDK... " >&6; }
15715  JAVA=$BOOT_JDK/bin/java
15716  if test ! -x $JAVA; then
15717      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15718$as_echo "not found" >&6; }
15719      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15720$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15721      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15722  fi
15723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15724$as_echo "ok" >&6; }
15725
15726
15727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15728$as_echo_n "checking for javac in Boot JDK... " >&6; }
15729  JAVAC=$BOOT_JDK/bin/javac
15730  if test ! -x $JAVAC; then
15731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15732$as_echo "not found" >&6; }
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15734$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15735      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15736  fi
15737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15738$as_echo "ok" >&6; }
15739
15740
15741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15742$as_echo_n "checking for javah in Boot JDK... " >&6; }
15743  JAVAH=$BOOT_JDK/bin/javah
15744  if test ! -x $JAVAH; then
15745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15746$as_echo "not found" >&6; }
15747      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15748$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15749      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15750  fi
15751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15752$as_echo "ok" >&6; }
15753
15754
15755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15756$as_echo_n "checking for javap in Boot JDK... " >&6; }
15757  JAVAP=$BOOT_JDK/bin/javap
15758  if test ! -x $JAVAP; then
15759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15760$as_echo "not found" >&6; }
15761      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15762$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15763      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15764  fi
15765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15766$as_echo "ok" >&6; }
15767
15768
15769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15770$as_echo_n "checking for jar in Boot JDK... " >&6; }
15771  JAR=$BOOT_JDK/bin/jar
15772  if test ! -x $JAR; then
15773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15774$as_echo "not found" >&6; }
15775      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15776$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15777      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15778  fi
15779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15780$as_echo "ok" >&6; }
15781
15782
15783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15784$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15785  RMIC=$BOOT_JDK/bin/rmic
15786  if test ! -x $RMIC; then
15787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15788$as_echo "not found" >&6; }
15789      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15790$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15791      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15792  fi
15793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15794$as_echo "ok" >&6; }
15795
15796
15797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15798$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15799  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15800  if test ! -x $NATIVE2ASCII; then
15801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15802$as_echo "not found" >&6; }
15803      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15804$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15805      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15806  fi
15807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15808$as_echo "ok" >&6; }
15809
15810
15811# Finally, set some other options...
15812
15813# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15814BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15815
15816
15817
15818
15819##############################################################################
15820#
15821# Specify options for anything that is run with the Boot JDK.
15822#
15823
15824# Check whether --with-boot-jdk-jvmargs was given.
15825if test "${with_boot_jdk_jvmargs+set}" = set; then :
15826  withval=$with_boot_jdk_jvmargs;
15827fi
15828
15829
15830if test "x$with_boot_jdk_jvmargs" = x; then
15831    # Not all JVM:s accept the same arguments on the command line.
15832    # OpenJDK specific increase in thread stack for JDK build,
15833    # well more specifically, when running javac.
15834    if test "x$BUILD_NUM_BITS" = x32; then
15835       STACK_SIZE=768
15836    else
15837       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15838       # since 64-bit pointers are pushed on the stach. Apparently, we need
15839       # to increase the stack space when javacing the JDK....
15840       STACK_SIZE=1536
15841    fi
15842
15843    # Minimum amount of heap memory.
15844
15845    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15846    $ECHO "Command: $JAVA -Xms64M -version" >&5
15847    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15848    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15849    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15850    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15851        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15852	JVM_ARG_OK=true
15853    else
15854	$ECHO "Arg failed:" >&5
15855	$ECHO "$OUTPUT" >&5
15856	JVM_ARG_OK=false
15857    fi
15858
15859    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15860        # Why does macosx need more heap? Its the huge JDK batch.
15861
15862    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15863    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15864    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15865    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15866    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15867    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15868        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15869	JVM_ARG_OK=true
15870    else
15871	$ECHO "Arg failed:" >&5
15872	$ECHO "$OUTPUT" >&5
15873	JVM_ARG_OK=false
15874    fi
15875
15876    else
15877
15878    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15879    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15880    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15881    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15882    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15883    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15884        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15885	JVM_ARG_OK=true
15886    else
15887	$ECHO "Arg failed:" >&5
15888	$ECHO "$OUTPUT" >&5
15889	JVM_ARG_OK=false
15890    fi
15891
15892    fi
15893    # When is adding -client something that speeds up the JVM?
15894    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15895
15896    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15897    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15898    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15899    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15900    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15901    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15902        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15903	JVM_ARG_OK=true
15904    else
15905	$ECHO "Arg failed:" >&5
15906	$ECHO "$OUTPUT" >&5
15907	JVM_ARG_OK=false
15908    fi
15909
15910
15911    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15912    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15913    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15914    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15915    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15916    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15917        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15918	JVM_ARG_OK=true
15919    else
15920	$ECHO "Arg failed:" >&5
15921	$ECHO "$OUTPUT" >&5
15922	JVM_ARG_OK=false
15923    fi
15924
15925
15926    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15927    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15928    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15929    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15930    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15931    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15932        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15933	JVM_ARG_OK=true
15934    else
15935	$ECHO "Arg failed:" >&5
15936	$ECHO "$OUTPUT" >&5
15937	JVM_ARG_OK=false
15938    fi
15939
15940    # Disable special log output when a debug build is used as Boot JDK...
15941
15942    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15943    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15944    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15945    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15946    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15947    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15948        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15949	JVM_ARG_OK=true
15950    else
15951	$ECHO "Arg failed:" >&5
15952	$ECHO "$OUTPUT" >&5
15953	JVM_ARG_OK=false
15954    fi
15955
15956fi
15957
15958BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15959
15960
15961
15962###############################################################################
15963#
15964# Configure the sources to use. We can add or override individual directories.
15965#
15966###############################################################################
15967
15968
15969
15970# Where are the sources. Any of these can be overridden
15971# using --with-override-corba and the likes.
15972LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15973CORBA_TOPDIR="$SRC_ROOT/corba"
15974JAXP_TOPDIR="$SRC_ROOT/jaxp"
15975JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15976HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15977NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15978JDK_TOPDIR="$SRC_ROOT/jdk"
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989###############################################################################
15990#
15991# Pickup additional source for a component from outside of the source root
15992# or override source for a component.
15993#
15994
15995# Check whether --with-add-source-root was given.
15996if test "${with_add_source_root+set}" = set; then :
15997  withval=$with_add_source_root;
15998fi
15999
16000
16001
16002# Check whether --with-override-source-root was given.
16003if test "${with_override_source_root+set}" = set; then :
16004  withval=$with_override_source_root;
16005fi
16006
16007
16008
16009# Check whether --with-adds-and-overrides was given.
16010if test "${with_adds_and_overrides+set}" = set; then :
16011  withval=$with_adds_and_overrides;
16012fi
16013
16014
16015if test "x$with_adds_and_overrides" != x; then
16016    with_add_source_root="$with_adds_and_overrides/adds"
16017    with_override_source_root="$with_adds_and_overrides/overrides"
16018fi
16019
16020if test "x$with_add_source_root" != x; then
16021    if ! test -d $with_add_source_root; then
16022       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16023    fi
16024    CURDIR="$PWD"
16025    cd "$with_add_source_root"
16026    ADD_SRC_ROOT="`pwd`"
16027    cd "$CURDIR"
16028    # Verify that the addon source root does not have any root makefiles.
16029    # If it does, then it is usually an error, prevent this.
16030    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16031       test -f $with_add_source_root/langtools/make/Makefile; then
16032        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
16033    fi
16034    if test -f $with_add_source_root/corba/makefiles/Makefile || \
16035       test -f $with_add_source_root/corba/make/Makefile; then
16036        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
16037    fi
16038    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16039       test -f $with_add_source_root/jaxp/make/Makefile; then
16040        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
16041    fi
16042    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16043       test -f $with_add_source_root/jaxws/make/Makefile; then
16044        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
16045    fi
16046    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16047       test -f $with_add_source_root/hotspot/make/Makefile; then
16048        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
16049    fi
16050    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16051       test -f $with_add_source_root/jdk/make/Makefile; then
16052        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
16053    fi
16054fi
16055
16056
16057if test "x$with_override_source_root" != x; then
16058    if ! test -d $with_override_source_root; then
16059       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16060    fi
16061    CURDIR="$PWD"
16062    cd "$with_override_source_root"
16063    OVERRIDE_SRC_ROOT="`pwd`"
16064    cd "$CURDIR"
16065    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16066       test -f $with_override_source_root/langtools/make/Makefile; then
16067        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
16068    fi
16069    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16070       test -f $with_override_source_root/corba/make/Makefile; then
16071        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
16072    fi
16073    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16074       test -f $with_override_source_root/jaxp/make/Makefile; then
16075        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
16076    fi
16077    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16078       test -f $with_override_source_root/jaxws/make/Makefile; then
16079        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
16080    fi
16081    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16082       test -f $with_override_source_root/hotspot/make/Makefile; then
16083        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
16084    fi
16085    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16086       test -f $with_override_source_root/jdk/make/Makefile; then
16087        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
16088    fi
16089fi
16090
16091
16092###############################################################################
16093#
16094# Override a repo completely, this is used for example when you have 3 small
16095# development sandboxes of the langtools sources and want to avoid having 3 full
16096# OpenJDK sources checked out on disk.
16097#
16098# Assuming that the 3 langtools sandboxes are located here:
16099# /home/fredrik/sandbox1/langtools
16100# /home/fredrik/sandbox2/langtools
16101# /home/fredrik/sandbox3/langtools
16102#
16103# From the source root you create build subdirs manually:
16104#     mkdir -p build1 build2 build3
16105# in each build directory run:
16106#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16107#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16108#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16109#
16110
16111
16112# Check whether --with-override-langtools was given.
16113if test "${with_override_langtools+set}" = set; then :
16114  withval=$with_override_langtools;
16115fi
16116
16117
16118
16119# Check whether --with-override-corba was given.
16120if test "${with_override_corba+set}" = set; then :
16121  withval=$with_override_corba;
16122fi
16123
16124
16125
16126# Check whether --with-override-jaxp was given.
16127if test "${with_override_jaxp+set}" = set; then :
16128  withval=$with_override_jaxp;
16129fi
16130
16131
16132
16133# Check whether --with-override-jaxws was given.
16134if test "${with_override_jaxws+set}" = set; then :
16135  withval=$with_override_jaxws;
16136fi
16137
16138
16139
16140# Check whether --with-override-hotspot was given.
16141if test "${with_override_hotspot+set}" = set; then :
16142  withval=$with_override_hotspot;
16143fi
16144
16145
16146
16147# Check whether --with-override-jdk was given.
16148if test "${with_override_jdk+set}" = set; then :
16149  withval=$with_override_jdk;
16150fi
16151
16152
16153if test "x$with_override_langtools" != x; then
16154    CURDIR="$PWD"
16155    cd "$with_override_langtools"
16156    LANGTOOLS_TOPDIR="`pwd`"
16157    cd "$CURDIR"
16158    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16159        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16160    fi
16161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16162$as_echo_n "checking if langtools should be overridden... " >&6; }
16163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16164$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16165fi
16166if test "x$with_override_corba" != x; then
16167    CURDIR="$PWD"
16168    cd "$with_override_corba"
16169    CORBA_TOPDIR="`pwd`"
16170    cd "$CURDIR"
16171    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16172        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16173    fi
16174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16175$as_echo_n "checking if corba should be overridden... " >&6; }
16176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16177$as_echo "yes with $CORBA_TOPDIR" >&6; }
16178fi
16179if test "x$with_override_jaxp" != x; then
16180    CURDIR="$PWD"
16181    cd "$with_override_jaxp"
16182    JAXP_TOPDIR="`pwd`"
16183    cd "$CURDIR"
16184    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16185        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16186    fi
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16188$as_echo_n "checking if jaxp should be overridden... " >&6; }
16189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16190$as_echo "yes with $JAXP_TOPDIR" >&6; }
16191fi
16192if test "x$with_override_jaxws" != x; then
16193    CURDIR="$PWD"
16194    cd "$with_override_jaxws"
16195    JAXWS_TOPDIR="`pwd`"
16196    cd "$CURDIR"
16197    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16198        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16199    fi
16200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16201$as_echo_n "checking if jaxws should be overridden... " >&6; }
16202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16203$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16204fi
16205if test "x$with_override_hotspot" != x; then
16206    CURDIR="$PWD"
16207    cd "$with_override_hotspot"
16208    HOTSPOT_TOPDIR="`pwd`"
16209    cd "$CURDIR"
16210    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16211       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16212        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16213    fi
16214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16215$as_echo_n "checking if hotspot should be overridden... " >&6; }
16216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16217$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16218fi
16219if test "x$with_override_nashorn" != x; then
16220    CURDIR="$PWD"
16221    cd "$with_override_nashorn"
16222    NASHORN_TOPDIR="`pwd`"
16223    cd "$CURDIR"
16224    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16225        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16226    fi
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16228$as_echo_n "checking if nashorn should be overridden... " >&6; }
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16230$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16231fi
16232if test "x$with_override_jdk" != x; then
16233    CURDIR="$PWD"
16234    cd "$with_override_jdk"
16235    JDK_TOPDIR="`pwd`"
16236    cd "$CURDIR"
16237    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16238        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16239    fi
16240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16241$as_echo_n "checking if JDK should be overridden... " >&6; }
16242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16243$as_echo "yes with $JDK_TOPDIR" >&6; }
16244fi
16245
16246
16247
16248BUILD_OUTPUT="$OUTPUT_ROOT"
16249
16250
16251HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16252BUILD_HOTSPOT=true
16253
16254
16255
16256# Check whether --with-import-hotspot was given.
16257if test "${with_import_hotspot+set}" = set; then :
16258  withval=$with_import_hotspot;
16259fi
16260
16261if test "x$with_import_hotspot" != x; then
16262    CURDIR="$PWD"
16263    cd "$with_import_hotspot"
16264    HOTSPOT_DIST="`pwd`"
16265    cd "$CURDIR"
16266    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16267        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16268    fi
16269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16270$as_echo_n "checking if hotspot should be imported... " >&6; }
16271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16272$as_echo "yes from $HOTSPOT_DIST" >&6; }
16273    BUILD_HOTSPOT=false
16274fi
16275
16276JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16277
16278
16279###############################################################################
16280#
16281# Setup the toolchain (compilers etc), i.e. the tools that need to be
16282# cross-compilation aware.
16283#
16284###############################################################################
16285
16286
16287###############################################################################
16288#
16289# Configure the development tool paths and potential sysroot.
16290#
16291ac_ext=cpp
16292ac_cpp='$CXXCPP $CPPFLAGS'
16293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16296
16297
16298# The option used to specify the target .o,.a or .so file.
16299# When compiling, how to specify the to be created object file.
16300CC_OUT_OPTION='-o$(SPACE)'
16301# When linking, how to specify the to be created executable.
16302EXE_OUT_OPTION='-o$(SPACE)'
16303# When linking, how to specify the to be created dynamically linkable library.
16304LD_OUT_OPTION='-o$(SPACE)'
16305# When archiving, how to specify the to be create static archive for object files.
16306AR_OUT_OPTION='rcs$(SPACE)'
16307
16308
16309
16310
16311
16312# Locate the actual tools
16313
16314
16315# Check whether --with-jtreg was given.
16316if test "${with_jtreg+set}" = set; then :
16317  withval=$with_jtreg;
16318else
16319  with_jtreg=no
16320fi
16321
16322
16323  if test "x$with_jtreg" = xno; then
16324    # jtreg disabled
16325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16326$as_echo_n "checking for jtreg... " >&6; }
16327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16328$as_echo "no" >&6; }
16329  else
16330    if test "x$with_jtreg" != xyes; then
16331      # with path specified.
16332      JT_HOME="$with_jtreg"
16333    fi
16334
16335    if test "x$JT_HOME" != x; then
16336      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16337$as_echo_n "checking for jtreg... " >&6; }
16338
16339      # use JT_HOME enviroment var.
16340
16341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16342
16343  # Input might be given as Windows format, start by converting to
16344  # unix format.
16345  path="$JT_HOME"
16346  new_path=`$CYGPATH -u "$path"`
16347
16348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16351  # "foo.exe" is OK but "foo" is an error.
16352  #
16353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16354  # It is also a way to make sure we got the proper file name for the real test later on.
16355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16356  if test "x$test_shortpath" = x; then
16357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16358$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16359    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16360  fi
16361
16362  # Call helper function which possibly converts this using DOS-style short mode.
16363  # If so, the updated path is stored in $new_path.
16364
16365  input_path="$new_path"
16366  # Check if we need to convert this using DOS-style short mode. If the path
16367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16368  # take no chances and rewrite it.
16369  # Note: m4 eats our [], so we need to use [ and ] instead.
16370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16371  if test "x$has_forbidden_chars" != x; then
16372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16376      # Going to short mode and back again did indeed matter. Since short mode is
16377      # case insensitive, let's make it lowercase to improve readability.
16378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16379      # Now convert it back to Unix-stile (cygpath)
16380      input_path=`$CYGPATH -u "$shortmode_path"`
16381      new_path="$input_path"
16382    fi
16383  fi
16384
16385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16386  if test "x$test_cygdrive_prefix" = x; then
16387    # As a simple fix, exclude /usr/bin since it's not a real path.
16388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16390      # a path prefixed by /cygdrive for fixpath to work.
16391      new_path="$CYGWIN_ROOT_PATH$input_path"
16392    fi
16393  fi
16394
16395
16396  if test "x$path" != "x$new_path"; then
16397    JT_HOME="$new_path"
16398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16399$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16400  fi
16401
16402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16403
16404  path="$JT_HOME"
16405  has_colon=`$ECHO $path | $GREP ^.:`
16406  new_path="$path"
16407  if test "x$has_colon" = x; then
16408    # Not in mixed or Windows style, start by that.
16409    new_path=`cmd //c echo $path`
16410  fi
16411
16412
16413  input_path="$new_path"
16414  # Check if we need to convert this using DOS-style short mode. If the path
16415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16416  # take no chances and rewrite it.
16417  # Note: m4 eats our [], so we need to use [ and ] instead.
16418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16419  if test "x$has_forbidden_chars" != x; then
16420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16422  fi
16423
16424
16425  windows_path="$new_path"
16426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16427    unix_path=`$CYGPATH -u "$windows_path"`
16428    new_path="$unix_path"
16429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16431    new_path="$unix_path"
16432  fi
16433
16434  if test "x$path" != "x$new_path"; then
16435    JT_HOME="$new_path"
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16437$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16438  fi
16439
16440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16442
16443  else
16444    # We're on a posix platform. Hooray! :)
16445    path="$JT_HOME"
16446    has_space=`$ECHO "$path" | $GREP " "`
16447    if test "x$has_space" != x; then
16448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16449$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16450      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16451    fi
16452
16453    # Use eval to expand a potential ~
16454    eval path="$path"
16455    if test ! -f "$path" && test ! -d "$path"; then
16456      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16457    fi
16458
16459    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16460  fi
16461
16462
16463      # jtreg win32 script works for everybody
16464      JTREGEXE="$JT_HOME/win32/bin/jtreg"
16465
16466      if test ! -f "$JTREGEXE"; then
16467        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16468      fi
16469
16470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16471$as_echo "$JTREGEXE" >&6; }
16472    else
16473      # try to find jtreg on path
16474
16475    for ac_prog in jtreg
16476do
16477  # Extract the first word of "$ac_prog", so it can be a program name with args.
16478set dummy $ac_prog; ac_word=$2
16479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16480$as_echo_n "checking for $ac_word... " >&6; }
16481if test "${ac_cv_path_JTREGEXE+set}" = set; then :
16482  $as_echo_n "(cached) " >&6
16483else
16484  case $JTREGEXE in
16485  [\\/]* | ?:[\\/]*)
16486  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16487  ;;
16488  *)
16489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16490for as_dir in $PATH
16491do
16492  IFS=$as_save_IFS
16493  test -z "$as_dir" && as_dir=.
16494    for ac_exec_ext in '' $ac_executable_extensions; do
16495  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16496    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16498    break 2
16499  fi
16500done
16501  done
16502IFS=$as_save_IFS
16503
16504  ;;
16505esac
16506fi
16507JTREGEXE=$ac_cv_path_JTREGEXE
16508if test -n "$JTREGEXE"; then
16509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16510$as_echo "$JTREGEXE" >&6; }
16511else
16512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16513$as_echo "no" >&6; }
16514fi
16515
16516
16517  test -n "$JTREGEXE" && break
16518done
16519
16520
16521    if test "x$JTREGEXE" = x; then
16522        if test "xjtreg" = x; then
16523          PROG_NAME=jtregexe
16524        else
16525          PROG_NAME=jtreg
16526        fi
16527        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16528$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16529        as_fn_error $? "Cannot continue" "$LINENO" 5
16530    fi
16531
16532
16533      JT_HOME="`$DIRNAME $JTREGEXE`"
16534    fi
16535  fi
16536
16537
16538
16539
16540
16541if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16542
16543  # Store path to cygwin link.exe to help excluding it when searching for
16544  # VS linker. This must be done before changing the PATH when looking for VS.
16545  # Extract the first word of "link", so it can be a program name with args.
16546set dummy link; ac_word=$2
16547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16548$as_echo_n "checking for $ac_word... " >&6; }
16549if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16550  $as_echo_n "(cached) " >&6
16551else
16552  case $CYGWIN_LINK in
16553  [\\/]* | ?:[\\/]*)
16554  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16555  ;;
16556  *)
16557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16558for as_dir in $PATH
16559do
16560  IFS=$as_save_IFS
16561  test -z "$as_dir" && as_dir=.
16562    for ac_exec_ext in '' $ac_executable_extensions; do
16563  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16564    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16566    break 2
16567  fi
16568done
16569  done
16570IFS=$as_save_IFS
16571
16572  ;;
16573esac
16574fi
16575CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16576if test -n "$CYGWIN_LINK"; then
16577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16578$as_echo "$CYGWIN_LINK" >&6; }
16579else
16580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16581$as_echo "no" >&6; }
16582fi
16583
16584
16585  if test "x$CYGWIN_LINK" != x; then
16586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16587$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16588    "$CYGWIN_LINK" --version > /dev/null
16589    if test $? -eq 0 ; then
16590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16591$as_echo "yes" >&6; }
16592    else
16593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16594$as_echo "no" >&6; }
16595      # This might be the VS linker. Don't exclude it later on.
16596      CYGWIN_LINK=""
16597    fi
16598  fi
16599
16600  # First-hand choice is to locate and run the vsvars bat file.
16601
16602  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16603    VCVARSFILE="vc/bin/vcvars32.bat"
16604  else
16605    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16606  fi
16607
16608  VS_ENV_CMD=""
16609  VS_ENV_ARGS=""
16610  if test "x$with_toolsdir" != x; then
16611
16612  if test "x$VS_ENV_CMD" = x; then
16613    VS100BASE="$with_toolsdir/../.."
16614    METHOD="--with-tools-dir"
16615
16616  windows_path="$VS100BASE"
16617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16618    unix_path=`$CYGPATH -u "$windows_path"`
16619    VS100BASE="$unix_path"
16620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16622    VS100BASE="$unix_path"
16623  fi
16624
16625    if test -d "$VS100BASE"; then
16626      if test -f "$VS100BASE/$VCVARSFILE"; then
16627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16628$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16629        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16630      else
16631        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16632$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16633        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16634$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16635      fi
16636    fi
16637  fi
16638
16639  fi
16640
16641  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16642    # Having specified an argument which is incorrect will produce an instant failure;
16643    # we should not go on looking
16644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16645$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16646    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16647$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16648    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16649  fi
16650
16651  if test "x$VS100COMNTOOLS" != x; then
16652
16653  if test "x$VS_ENV_CMD" = x; then
16654    VS100BASE="$VS100COMNTOOLS/../.."
16655    METHOD="VS100COMNTOOLS variable"
16656
16657  windows_path="$VS100BASE"
16658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16659    unix_path=`$CYGPATH -u "$windows_path"`
16660    VS100BASE="$unix_path"
16661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16663    VS100BASE="$unix_path"
16664  fi
16665
16666    if test -d "$VS100BASE"; then
16667      if test -f "$VS100BASE/$VCVARSFILE"; then
16668        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16669$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16670        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16671      else
16672        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16673$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16674        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16675$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16676      fi
16677    fi
16678  fi
16679
16680  fi
16681  if test "x$PROGRAMFILES" != x; then
16682
16683  if test "x$VS_ENV_CMD" = x; then
16684    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16685    METHOD="well-known name"
16686
16687  windows_path="$VS100BASE"
16688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16689    unix_path=`$CYGPATH -u "$windows_path"`
16690    VS100BASE="$unix_path"
16691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16693    VS100BASE="$unix_path"
16694  fi
16695
16696    if test -d "$VS100BASE"; then
16697      if test -f "$VS100BASE/$VCVARSFILE"; then
16698        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16699$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16700        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16701      else
16702        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16703$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16704        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16705$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16706      fi
16707    fi
16708  fi
16709
16710  fi
16711
16712  if test "x$VS_ENV_CMD" = x; then
16713    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16714    METHOD="well-known name"
16715
16716  windows_path="$VS100BASE"
16717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16718    unix_path=`$CYGPATH -u "$windows_path"`
16719    VS100BASE="$unix_path"
16720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16722    VS100BASE="$unix_path"
16723  fi
16724
16725    if test -d "$VS100BASE"; then
16726      if test -f "$VS100BASE/$VCVARSFILE"; then
16727        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16728$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16729        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16730      else
16731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16732$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16733        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16734$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16735      fi
16736    fi
16737  fi
16738
16739
16740  if test "x$VS_ENV_CMD" = x; then
16741    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16742    METHOD="well-known name"
16743
16744  windows_path="$VS100BASE"
16745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16746    unix_path=`$CYGPATH -u "$windows_path"`
16747    VS100BASE="$unix_path"
16748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16750    VS100BASE="$unix_path"
16751  fi
16752
16753    if test -d "$VS100BASE"; then
16754      if test -f "$VS100BASE/$VCVARSFILE"; then
16755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16756$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16757        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16758      else
16759        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16760$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16761        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16762$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16763      fi
16764    fi
16765  fi
16766
16767
16768  if test "x$ProgramW6432" != x; then
16769
16770  if test "x$VS_ENV_CMD" = x; then
16771    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16772    METHOD="well-known name"
16773
16774  windows_path="$WIN_SDK_BASE"
16775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16776    unix_path=`$CYGPATH -u "$windows_path"`
16777    WIN_SDK_BASE="$unix_path"
16778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16780    WIN_SDK_BASE="$unix_path"
16781  fi
16782
16783    if test -d "$WIN_SDK_BASE"; then
16784      # There have been cases of partial or broken SDK installations. A missing
16785      # lib dir is not going to work.
16786      if test ! -d "$WIN_SDK_BASE/../lib"; then
16787        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16788$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16789        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16790$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16791      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16792        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16793$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16794        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16795        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16796          VS_ENV_ARGS="/x86"
16797        else
16798          VS_ENV_ARGS="/x64"
16799        fi
16800      else
16801        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16802$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16803        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16804$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16805      fi
16806    fi
16807  fi
16808
16809  fi
16810  if test "x$PROGRAMW6432" != x; then
16811
16812  if test "x$VS_ENV_CMD" = x; then
16813    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16814    METHOD="well-known name"
16815
16816  windows_path="$WIN_SDK_BASE"
16817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16818    unix_path=`$CYGPATH -u "$windows_path"`
16819    WIN_SDK_BASE="$unix_path"
16820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16822    WIN_SDK_BASE="$unix_path"
16823  fi
16824
16825    if test -d "$WIN_SDK_BASE"; then
16826      # There have been cases of partial or broken SDK installations. A missing
16827      # lib dir is not going to work.
16828      if test ! -d "$WIN_SDK_BASE/../lib"; then
16829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16830$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16832$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16833      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16835$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16836        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16837        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16838          VS_ENV_ARGS="/x86"
16839        else
16840          VS_ENV_ARGS="/x64"
16841        fi
16842      else
16843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16844$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16845        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16846$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16847      fi
16848    fi
16849  fi
16850
16851  fi
16852  if test "x$PROGRAMFILES" != x; then
16853
16854  if test "x$VS_ENV_CMD" = x; then
16855    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16856    METHOD="well-known name"
16857
16858  windows_path="$WIN_SDK_BASE"
16859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16860    unix_path=`$CYGPATH -u "$windows_path"`
16861    WIN_SDK_BASE="$unix_path"
16862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16864    WIN_SDK_BASE="$unix_path"
16865  fi
16866
16867    if test -d "$WIN_SDK_BASE"; then
16868      # There have been cases of partial or broken SDK installations. A missing
16869      # lib dir is not going to work.
16870      if test ! -d "$WIN_SDK_BASE/../lib"; then
16871        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16872$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16874$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16875      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16876        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16877$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16878        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16879        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16880          VS_ENV_ARGS="/x86"
16881        else
16882          VS_ENV_ARGS="/x64"
16883        fi
16884      else
16885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16886$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16888$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16889      fi
16890    fi
16891  fi
16892
16893  fi
16894
16895  if test "x$VS_ENV_CMD" = x; then
16896    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16897    METHOD="well-known name"
16898
16899  windows_path="$WIN_SDK_BASE"
16900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16901    unix_path=`$CYGPATH -u "$windows_path"`
16902    WIN_SDK_BASE="$unix_path"
16903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16905    WIN_SDK_BASE="$unix_path"
16906  fi
16907
16908    if test -d "$WIN_SDK_BASE"; then
16909      # There have been cases of partial or broken SDK installations. A missing
16910      # lib dir is not going to work.
16911      if test ! -d "$WIN_SDK_BASE/../lib"; then
16912        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16913$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16914        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16915$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16916      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16917        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16918$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16919        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16920        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16921          VS_ENV_ARGS="/x86"
16922        else
16923          VS_ENV_ARGS="/x64"
16924        fi
16925      else
16926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16927$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16929$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16930      fi
16931    fi
16932  fi
16933
16934
16935  if test "x$VS_ENV_CMD" = x; then
16936    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16937    METHOD="well-known name"
16938
16939  windows_path="$WIN_SDK_BASE"
16940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16941    unix_path=`$CYGPATH -u "$windows_path"`
16942    WIN_SDK_BASE="$unix_path"
16943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16945    WIN_SDK_BASE="$unix_path"
16946  fi
16947
16948    if test -d "$WIN_SDK_BASE"; then
16949      # There have been cases of partial or broken SDK installations. A missing
16950      # lib dir is not going to work.
16951      if test ! -d "$WIN_SDK_BASE/../lib"; then
16952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16953$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16954        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16955$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16956      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16958$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16959        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16960        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16961          VS_ENV_ARGS="/x86"
16962        else
16963          VS_ENV_ARGS="/x64"
16964        fi
16965      else
16966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16967$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16968        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16969$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16970      fi
16971    fi
16972  fi
16973
16974
16975  if test "x$VS_ENV_CMD" != x; then
16976    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16977
16978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16979
16980  # First separate the path from the arguments. This will split at the first
16981  # space.
16982  complete="$VS_ENV_CMD"
16983  path="${complete%% *}"
16984  tmp="$complete EOL"
16985  arguments="${tmp#* }"
16986
16987  # Input might be given as Windows format, start by converting to
16988  # unix format.
16989  new_path=`$CYGPATH -u "$path"`
16990
16991  # Now try to locate executable using which
16992  new_path=`$WHICH "$new_path" 2> /dev/null`
16993  # bat and cmd files are not always considered executable in cygwin causing which
16994  # to not find them
16995  if test "x$new_path" = x \
16996           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16997           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16998    new_path=`$CYGPATH -u "$path"`
16999  fi
17000  if test "x$new_path" = x; then
17001    # Oops. Which didn't find the executable.
17002    # The splitting of arguments from the executable at a space might have been incorrect,
17003    # since paths with space are more likely in Windows. Give it another try with the whole
17004    # argument.
17005    path="$complete"
17006    arguments="EOL"
17007    new_path=`$CYGPATH -u "$path"`
17008    new_path=`$WHICH "$new_path" 2> /dev/null`
17009    # bat and cmd files are not always considered executable in cygwin causing which
17010    # to not find them
17011    if test "x$new_path" = x \
17012             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17013             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17014      new_path=`$CYGPATH -u "$path"`
17015    fi
17016    if test "x$new_path" = x; then
17017      # It's still not found. Now this is an unrecoverable error.
17018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17019$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17020      has_space=`$ECHO "$complete" | $GREP " "`
17021      if test "x$has_space" != x; then
17022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17024      fi
17025      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17026    fi
17027  fi
17028
17029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17032  # "foo.exe" is OK but "foo" is an error.
17033  #
17034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17035  # It is also a way to make sure we got the proper file name for the real test later on.
17036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17037  if test "x$test_shortpath" = x; then
17038    # Short path failed, file does not exist as specified.
17039    # Try adding .exe or .cmd
17040    if test -f "${new_path}.exe"; then
17041       input_to_shortpath="${new_path}.exe"
17042    elif test -f "${new_path}.cmd"; then
17043       input_to_shortpath="${new_path}.cmd"
17044    else
17045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17046$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17047      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17048$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17049      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17050    fi
17051  else
17052    input_to_shortpath="$new_path"
17053  fi
17054
17055  # Call helper function which possibly converts this using DOS-style short mode.
17056  # If so, the updated path is stored in $new_path.
17057  new_path="$input_to_shortpath"
17058
17059  input_path="$input_to_shortpath"
17060  # Check if we need to convert this using DOS-style short mode. If the path
17061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17062  # take no chances and rewrite it.
17063  # Note: m4 eats our [], so we need to use [ and ] instead.
17064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17065  if test "x$has_forbidden_chars" != x; then
17066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17070      # Going to short mode and back again did indeed matter. Since short mode is
17071      # case insensitive, let's make it lowercase to improve readability.
17072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17073      # Now convert it back to Unix-stile (cygpath)
17074      input_path=`$CYGPATH -u "$shortmode_path"`
17075      new_path="$input_path"
17076    fi
17077  fi
17078
17079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17080  if test "x$test_cygdrive_prefix" = x; then
17081    # As a simple fix, exclude /usr/bin since it's not a real path.
17082    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17084      # a path prefixed by /cygdrive for fixpath to work.
17085      new_path="$CYGWIN_ROOT_PATH$input_path"
17086    fi
17087  fi
17088
17089  # remove trailing .exe if any
17090  new_path="${new_path/%.exe/}"
17091
17092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17093
17094  # First separate the path from the arguments. This will split at the first
17095  # space.
17096  complete="$VS_ENV_CMD"
17097  path="${complete%% *}"
17098  tmp="$complete EOL"
17099  arguments="${tmp#* }"
17100
17101  # Input might be given as Windows format, start by converting to
17102  # unix format.
17103  new_path="$path"
17104
17105  windows_path="$new_path"
17106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17107    unix_path=`$CYGPATH -u "$windows_path"`
17108    new_path="$unix_path"
17109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17111    new_path="$unix_path"
17112  fi
17113
17114
17115  # Now try to locate executable using which
17116  new_path=`$WHICH "$new_path" 2> /dev/null`
17117
17118  if test "x$new_path" = x; then
17119    # Oops. Which didn't find the executable.
17120    # The splitting of arguments from the executable at a space might have been incorrect,
17121    # since paths with space are more likely in Windows. Give it another try with the whole
17122    # argument.
17123    path="$complete"
17124    arguments="EOL"
17125    new_path="$path"
17126
17127  windows_path="$new_path"
17128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17129    unix_path=`$CYGPATH -u "$windows_path"`
17130    new_path="$unix_path"
17131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17133    new_path="$unix_path"
17134  fi
17135
17136
17137    new_path=`$WHICH "$new_path" 2> /dev/null`
17138
17139    if test "x$new_path" = x; then
17140      # It's still not found. Now this is an unrecoverable error.
17141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17142$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17143      has_space=`$ECHO "$complete" | $GREP " "`
17144      if test "x$has_space" != x; then
17145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17147      fi
17148      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17149    fi
17150  fi
17151
17152  # Now new_path has a complete unix path to the binary
17153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17154    # Keep paths in /bin as-is, but remove trailing .exe if any
17155    new_path="${new_path/%.exe/}"
17156    # Do not save /bin paths to all_fixpath_prefixes!
17157  else
17158    # Not in mixed or Windows style, start by that.
17159    new_path=`cmd //c echo $new_path`
17160
17161  input_path="$new_path"
17162  # Check if we need to convert this using DOS-style short mode. If the path
17163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17164  # take no chances and rewrite it.
17165  # Note: m4 eats our [], so we need to use [ and ] instead.
17166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17167  if test "x$has_forbidden_chars" != x; then
17168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17170  fi
17171
17172    # Output is in $new_path
17173
17174  windows_path="$new_path"
17175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17176    unix_path=`$CYGPATH -u "$windows_path"`
17177    new_path="$unix_path"
17178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17180    new_path="$unix_path"
17181  fi
17182
17183    # remove trailing .exe if any
17184    new_path="${new_path/%.exe/}"
17185
17186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17188  fi
17189
17190  else
17191    # We're on a posix platform. Hooray! :)
17192    # First separate the path from the arguments. This will split at the first
17193    # space.
17194    complete="$VS_ENV_CMD"
17195    path="${complete%% *}"
17196    tmp="$complete EOL"
17197    arguments="${tmp#* }"
17198
17199    # Cannot rely on the command "which" here since it doesn't always work.
17200    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17201    if test -z "$is_absolute_path"; then
17202      # Path to executable is not absolute. Find it.
17203      IFS_save="$IFS"
17204      IFS=:
17205      for p in $PATH; do
17206        if test -f "$p/$path" && test -x "$p/$path"; then
17207          new_path="$p/$path"
17208          break
17209        fi
17210      done
17211      IFS="$IFS_save"
17212    else
17213      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17214$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17215      new_path="$path"
17216    fi
17217
17218    if test "x$new_path" = x; then
17219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17220$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17221        has_space=`$ECHO "$complete" | $GREP " "`
17222        if test "x$has_space" != x; then
17223          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17225        fi
17226        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17227      fi
17228  fi
17229
17230      # Now join together the path and the arguments once again
17231      if test "x$arguments" != xEOL; then
17232        new_complete="$new_path ${arguments% *}"
17233      else
17234        new_complete="$new_path"
17235      fi
17236
17237  if test "x$complete" != "x$new_complete"; then
17238      VS_ENV_CMD="$new_complete"
17239      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17240$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17241    fi
17242
17243
17244    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17245    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17246$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17247    cd $OUTPUT_ROOT
17248    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17249    # to autoconf standards.
17250
17251    #----
17252
17253    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17254    # but calculate the difference in Cygwin environment before/after running it and then
17255    # apply the diff.
17256
17257    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17258      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17259      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17260      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17261    else
17262      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17263      _dosbash=`cmd //c echo \`which bash\``
17264    fi
17265
17266    # generate the set of exported vars before/after the vs10 setup
17267    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17268    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17269    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17270    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17271
17272    # Now execute the newly created bat file.
17273    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17274    cmd /c localdevenvtmp.bat | cat
17275
17276    # apply the diff (less some non-vs10 vars named by "!")
17277    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17278    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17279    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17280
17281    # cleanup
17282    $RM localdevenvtmp*
17283    #----
17284    cd $CURDIR
17285    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17287$as_echo "no" >&6; }
17288      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17289$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17290      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17291$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17292      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17293$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17294      as_fn_error $? "Cannot continue" "$LINENO" 5
17295    fi
17296
17297    # Now set all paths and other env variables. This will allow the rest of
17298    # the configure script to find and run the compiler in the proper way.
17299    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17300$as_echo "$as_me: Setting extracted environment variables" >&6;}
17301    . $OUTPUT_ROOT/localdevenv.sh
17302  else
17303    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17304    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17305$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17306  fi
17307
17308  # At this point, we should have corrent variables in the environment, or we can't continue.
17309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17310$as_echo_n "checking for Visual Studio variables... " >&6; }
17311
17312  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17313    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17315$as_echo "present but broken" >&6; }
17316      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17317    else
17318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17319$as_echo "ok" >&6; }
17320      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17321      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17322      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17323      # Remove any paths containing # (typically F#) as that messes up make
17324      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17325      VS_PATH="$PATH"
17326
17327
17328
17329    fi
17330  else
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17332$as_echo "not found" >&6; }
17333
17334    if test "x$VS_ENV_CMD" = x; then
17335      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17336$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17337      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17338$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17339    else
17340      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17341$as_echo "$as_me: Running the extraction script failed." >&6;}
17342    fi
17343    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17344$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17345    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17346$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17347    as_fn_error $? "Cannot continue" "$LINENO" 5
17348  fi
17349
17350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17351$as_echo_n "checking for msvcr100.dll... " >&6; }
17352
17353# Check whether --with-msvcr-dll was given.
17354if test "${with_msvcr_dll+set}" = set; then :
17355  withval=$with_msvcr_dll;
17356fi
17357
17358  if test "x$with_msvcr_dll" != x; then
17359    MSVCR_DLL="$with_msvcr_dll"
17360  else
17361    if test "x$VCINSTALLDIR" != x; then
17362      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17363        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17364      else
17365        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17366        if test "x$MSVCR_DLL" = x; then
17367          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17368        fi
17369      fi
17370      if test "x$MSVCR_DLL" != x; then
17371        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17372$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17373      else
17374        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17375$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17376      fi
17377    fi
17378    # Try some fallback alternatives
17379    if test "x$MSVCR_DLL" = x; then
17380      # If visual studio express is installed, there is usually one with the debugger
17381      if test "x$VS100COMNTOOLS" != x; then
17382        if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17383          MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17384          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17385$as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17386        fi
17387      fi
17388    fi
17389    if test "x$MSVCR_DLL" = x; then
17390      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17391        # Fallback for 32bit builds, look in the windows directory.
17392        if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17393          { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17394$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17395          MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17396        fi
17397      fi
17398    fi
17399  fi
17400  if test "x$MSVCR_DLL" = x; then
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17402$as_echo "no" >&6; }
17403    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17404  fi
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17406$as_echo "$MSVCR_DLL" >&6; }
17407
17408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17409
17410  # Input might be given as Windows format, start by converting to
17411  # unix format.
17412  path="$MSVCR_DLL"
17413  new_path=`$CYGPATH -u "$path"`
17414
17415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17418  # "foo.exe" is OK but "foo" is an error.
17419  #
17420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17421  # It is also a way to make sure we got the proper file name for the real test later on.
17422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17423  if test "x$test_shortpath" = x; then
17424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17425$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17426    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17427  fi
17428
17429  # Call helper function which possibly converts this using DOS-style short mode.
17430  # If so, the updated path is stored in $new_path.
17431
17432  input_path="$new_path"
17433  # Check if we need to convert this using DOS-style short mode. If the path
17434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17435  # take no chances and rewrite it.
17436  # Note: m4 eats our [], so we need to use [ and ] instead.
17437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17438  if test "x$has_forbidden_chars" != x; then
17439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17443      # Going to short mode and back again did indeed matter. Since short mode is
17444      # case insensitive, let's make it lowercase to improve readability.
17445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17446      # Now convert it back to Unix-stile (cygpath)
17447      input_path=`$CYGPATH -u "$shortmode_path"`
17448      new_path="$input_path"
17449    fi
17450  fi
17451
17452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17453  if test "x$test_cygdrive_prefix" = x; then
17454    # As a simple fix, exclude /usr/bin since it's not a real path.
17455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17457      # a path prefixed by /cygdrive for fixpath to work.
17458      new_path="$CYGWIN_ROOT_PATH$input_path"
17459    fi
17460  fi
17461
17462
17463  if test "x$path" != "x$new_path"; then
17464    MSVCR_DLL="$new_path"
17465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17466$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17467  fi
17468
17469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17470
17471  path="$MSVCR_DLL"
17472  has_colon=`$ECHO $path | $GREP ^.:`
17473  new_path="$path"
17474  if test "x$has_colon" = x; then
17475    # Not in mixed or Windows style, start by that.
17476    new_path=`cmd //c echo $path`
17477  fi
17478
17479
17480  input_path="$new_path"
17481  # Check if we need to convert this using DOS-style short mode. If the path
17482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17483  # take no chances and rewrite it.
17484  # Note: m4 eats our [], so we need to use [ and ] instead.
17485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17486  if test "x$has_forbidden_chars" != x; then
17487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17489  fi
17490
17491
17492  windows_path="$new_path"
17493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17494    unix_path=`$CYGPATH -u "$windows_path"`
17495    new_path="$unix_path"
17496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17498    new_path="$unix_path"
17499  fi
17500
17501  if test "x$path" != "x$new_path"; then
17502    MSVCR_DLL="$new_path"
17503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17504$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17505  fi
17506
17507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17509
17510  else
17511    # We're on a posix platform. Hooray! :)
17512    path="$MSVCR_DLL"
17513    has_space=`$ECHO "$path" | $GREP " "`
17514    if test "x$has_space" != x; then
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17516$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17517      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17518    fi
17519
17520    # Use eval to expand a potential ~
17521    eval path="$path"
17522    if test ! -f "$path" && test ! -d "$path"; then
17523      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17524    fi
17525
17526    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17527  fi
17528
17529
17530
17531
17532# Check whether --with-dxsdk was given.
17533if test "${with_dxsdk+set}" = set; then :
17534  withval=$with_dxsdk;
17535fi
17536
17537
17538# Check whether --with-dxsdk-lib was given.
17539if test "${with_dxsdk_lib+set}" = set; then :
17540  withval=$with_dxsdk_lib;
17541fi
17542
17543
17544# Check whether --with-dxsdk-include was given.
17545if test "${with_dxsdk_include+set}" = set; then :
17546  withval=$with_dxsdk_include;
17547fi
17548
17549
17550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17551$as_echo_n "checking for DirectX SDK... " >&6; }
17552
17553  if test "x$with_dxsdk" != x; then
17554    dxsdk_path="$with_dxsdk"
17555  elif test "x$DXSDK_DIR" != x; then
17556    dxsdk_path="$DXSDK_DIR"
17557  elif test -d "C:/DXSDK"; then
17558    dxsdk_path="C:/DXSDK"
17559  else
17560    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17561  fi
17562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17563$as_echo "$dxsdk_path" >&6; }
17564
17565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17566
17567  # Input might be given as Windows format, start by converting to
17568  # unix format.
17569  path="$dxsdk_path"
17570  new_path=`$CYGPATH -u "$path"`
17571
17572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17575  # "foo.exe" is OK but "foo" is an error.
17576  #
17577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17578  # It is also a way to make sure we got the proper file name for the real test later on.
17579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17580  if test "x$test_shortpath" = x; then
17581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17582$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17583    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17584  fi
17585
17586  # Call helper function which possibly converts this using DOS-style short mode.
17587  # If so, the updated path is stored in $new_path.
17588
17589  input_path="$new_path"
17590  # Check if we need to convert this using DOS-style short mode. If the path
17591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17592  # take no chances and rewrite it.
17593  # Note: m4 eats our [], so we need to use [ and ] instead.
17594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17595  if test "x$has_forbidden_chars" != x; then
17596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17600      # Going to short mode and back again did indeed matter. Since short mode is
17601      # case insensitive, let's make it lowercase to improve readability.
17602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17603      # Now convert it back to Unix-stile (cygpath)
17604      input_path=`$CYGPATH -u "$shortmode_path"`
17605      new_path="$input_path"
17606    fi
17607  fi
17608
17609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17610  if test "x$test_cygdrive_prefix" = x; then
17611    # As a simple fix, exclude /usr/bin since it's not a real path.
17612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17614      # a path prefixed by /cygdrive for fixpath to work.
17615      new_path="$CYGWIN_ROOT_PATH$input_path"
17616    fi
17617  fi
17618
17619
17620  if test "x$path" != "x$new_path"; then
17621    dxsdk_path="$new_path"
17622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17623$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17624  fi
17625
17626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17627
17628  path="$dxsdk_path"
17629  has_colon=`$ECHO $path | $GREP ^.:`
17630  new_path="$path"
17631  if test "x$has_colon" = x; then
17632    # Not in mixed or Windows style, start by that.
17633    new_path=`cmd //c echo $path`
17634  fi
17635
17636
17637  input_path="$new_path"
17638  # Check if we need to convert this using DOS-style short mode. If the path
17639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17640  # take no chances and rewrite it.
17641  # Note: m4 eats our [], so we need to use [ and ] instead.
17642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17643  if test "x$has_forbidden_chars" != x; then
17644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17646  fi
17647
17648
17649  windows_path="$new_path"
17650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17651    unix_path=`$CYGPATH -u "$windows_path"`
17652    new_path="$unix_path"
17653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17655    new_path="$unix_path"
17656  fi
17657
17658  if test "x$path" != "x$new_path"; then
17659    dxsdk_path="$new_path"
17660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17661$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17662  fi
17663
17664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17666
17667  else
17668    # We're on a posix platform. Hooray! :)
17669    path="$dxsdk_path"
17670    has_space=`$ECHO "$path" | $GREP " "`
17671    if test "x$has_space" != x; then
17672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17673$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17674      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17675    fi
17676
17677    # Use eval to expand a potential ~
17678    eval path="$path"
17679    if test ! -f "$path" && test ! -d "$path"; then
17680      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17681    fi
17682
17683    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17684  fi
17685
17686
17687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17688$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17689  if test "x$with_dxsdk_lib" != x; then
17690    DXSDK_LIB_PATH="$with_dxsdk_lib"
17691  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17692    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17693  else
17694    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17695  fi
17696  # dsound.lib is linked to in jsoundds
17697  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17698    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17699  fi
17700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17701$as_echo "$DXSDK_LIB_PATH" >&6; }
17702
17703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17704
17705  # Input might be given as Windows format, start by converting to
17706  # unix format.
17707  path="$DXSDK_LIB_PATH"
17708  new_path=`$CYGPATH -u "$path"`
17709
17710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17713  # "foo.exe" is OK but "foo" is an error.
17714  #
17715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17716  # It is also a way to make sure we got the proper file name for the real test later on.
17717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17718  if test "x$test_shortpath" = x; then
17719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17720$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17721    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17722  fi
17723
17724  # Call helper function which possibly converts this using DOS-style short mode.
17725  # If so, the updated path is stored in $new_path.
17726
17727  input_path="$new_path"
17728  # Check if we need to convert this using DOS-style short mode. If the path
17729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17730  # take no chances and rewrite it.
17731  # Note: m4 eats our [], so we need to use [ and ] instead.
17732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17733  if test "x$has_forbidden_chars" != x; then
17734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17738      # Going to short mode and back again did indeed matter. Since short mode is
17739      # case insensitive, let's make it lowercase to improve readability.
17740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17741      # Now convert it back to Unix-stile (cygpath)
17742      input_path=`$CYGPATH -u "$shortmode_path"`
17743      new_path="$input_path"
17744    fi
17745  fi
17746
17747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17748  if test "x$test_cygdrive_prefix" = x; then
17749    # As a simple fix, exclude /usr/bin since it's not a real path.
17750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17752      # a path prefixed by /cygdrive for fixpath to work.
17753      new_path="$CYGWIN_ROOT_PATH$input_path"
17754    fi
17755  fi
17756
17757
17758  if test "x$path" != "x$new_path"; then
17759    DXSDK_LIB_PATH="$new_path"
17760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17761$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17762  fi
17763
17764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17765
17766  path="$DXSDK_LIB_PATH"
17767  has_colon=`$ECHO $path | $GREP ^.:`
17768  new_path="$path"
17769  if test "x$has_colon" = x; then
17770    # Not in mixed or Windows style, start by that.
17771    new_path=`cmd //c echo $path`
17772  fi
17773
17774
17775  input_path="$new_path"
17776  # Check if we need to convert this using DOS-style short mode. If the path
17777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17778  # take no chances and rewrite it.
17779  # Note: m4 eats our [], so we need to use [ and ] instead.
17780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17781  if test "x$has_forbidden_chars" != x; then
17782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17784  fi
17785
17786
17787  windows_path="$new_path"
17788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789    unix_path=`$CYGPATH -u "$windows_path"`
17790    new_path="$unix_path"
17791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17793    new_path="$unix_path"
17794  fi
17795
17796  if test "x$path" != "x$new_path"; then
17797    DXSDK_LIB_PATH="$new_path"
17798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17799$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17800  fi
17801
17802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17804
17805  else
17806    # We're on a posix platform. Hooray! :)
17807    path="$DXSDK_LIB_PATH"
17808    has_space=`$ECHO "$path" | $GREP " "`
17809    if test "x$has_space" != x; then
17810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17811$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17812      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17813    fi
17814
17815    # Use eval to expand a potential ~
17816    eval path="$path"
17817    if test ! -f "$path" && test ! -d "$path"; then
17818      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17819    fi
17820
17821    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17822  fi
17823
17824
17825  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17826$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17827  if test "x$with_dxsdk_include" != x; then
17828    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17829  else
17830    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17831  fi
17832  # dsound.h is included in jsoundds
17833  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17834    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17835  fi
17836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17837$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17838
17839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17840
17841  # Input might be given as Windows format, start by converting to
17842  # unix format.
17843  path="$DXSDK_INCLUDE_PATH"
17844  new_path=`$CYGPATH -u "$path"`
17845
17846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17849  # "foo.exe" is OK but "foo" is an error.
17850  #
17851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17852  # It is also a way to make sure we got the proper file name for the real test later on.
17853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17854  if test "x$test_shortpath" = x; then
17855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17856$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17857    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17858  fi
17859
17860  # Call helper function which possibly converts this using DOS-style short mode.
17861  # If so, the updated path is stored in $new_path.
17862
17863  input_path="$new_path"
17864  # Check if we need to convert this using DOS-style short mode. If the path
17865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17866  # take no chances and rewrite it.
17867  # Note: m4 eats our [], so we need to use [ and ] instead.
17868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17869  if test "x$has_forbidden_chars" != x; then
17870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17874      # Going to short mode and back again did indeed matter. Since short mode is
17875      # case insensitive, let's make it lowercase to improve readability.
17876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17877      # Now convert it back to Unix-stile (cygpath)
17878      input_path=`$CYGPATH -u "$shortmode_path"`
17879      new_path="$input_path"
17880    fi
17881  fi
17882
17883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17884  if test "x$test_cygdrive_prefix" = x; then
17885    # As a simple fix, exclude /usr/bin since it's not a real path.
17886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17888      # a path prefixed by /cygdrive for fixpath to work.
17889      new_path="$CYGWIN_ROOT_PATH$input_path"
17890    fi
17891  fi
17892
17893
17894  if test "x$path" != "x$new_path"; then
17895    DXSDK_INCLUDE_PATH="$new_path"
17896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17897$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17898  fi
17899
17900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17901
17902  path="$DXSDK_INCLUDE_PATH"
17903  has_colon=`$ECHO $path | $GREP ^.:`
17904  new_path="$path"
17905  if test "x$has_colon" = x; then
17906    # Not in mixed or Windows style, start by that.
17907    new_path=`cmd //c echo $path`
17908  fi
17909
17910
17911  input_path="$new_path"
17912  # Check if we need to convert this using DOS-style short mode. If the path
17913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17914  # take no chances and rewrite it.
17915  # Note: m4 eats our [], so we need to use [ and ] instead.
17916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17917  if test "x$has_forbidden_chars" != x; then
17918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17920  fi
17921
17922
17923  windows_path="$new_path"
17924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17925    unix_path=`$CYGPATH -u "$windows_path"`
17926    new_path="$unix_path"
17927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17929    new_path="$unix_path"
17930  fi
17931
17932  if test "x$path" != "x$new_path"; then
17933    DXSDK_INCLUDE_PATH="$new_path"
17934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17935$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17936  fi
17937
17938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17940
17941  else
17942    # We're on a posix platform. Hooray! :)
17943    path="$DXSDK_INCLUDE_PATH"
17944    has_space=`$ECHO "$path" | $GREP " "`
17945    if test "x$has_space" != x; then
17946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17947$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17948      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17949    fi
17950
17951    # Use eval to expand a potential ~
17952    eval path="$path"
17953    if test ! -f "$path" && test ! -d "$path"; then
17954      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17955    fi
17956
17957    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17958  fi
17959
17960
17961
17962
17963  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17964
17965fi
17966
17967
17968
17969# If --build AND --host is set, then the configure script will find any
17970# cross compilation tools in the PATH. Cross compilation tools
17971# follows the cross compilation standard where they are prefixed with ${host}.
17972# For example the binary i686-sun-solaris2.10-gcc
17973# will cross compile for i686-sun-solaris2.10
17974# If neither of build and host is not set, then build=host and the
17975# default compiler found in the path will be used.
17976# Setting only --host, does not seem to be really supported.
17977# Please set both --build and --host if you want to cross compile.
17978
17979if test "x$COMPILE_TYPE" = "xcross"; then
17980    # Now we to find a C/C++ compiler that can build executables for the build
17981    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17982    # once. Also, we need to do this before adding a tools dir to the path,
17983    # otherwise we might pick up cross-compilers which don't use standard naming.
17984    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17985    # to wait until they are properly discovered.
17986    for ac_prog in cl cc gcc
17987do
17988  # Extract the first word of "$ac_prog", so it can be a program name with args.
17989set dummy $ac_prog; ac_word=$2
17990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17991$as_echo_n "checking for $ac_word... " >&6; }
17992if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17993  $as_echo_n "(cached) " >&6
17994else
17995  case $BUILD_CC in
17996  [\\/]* | ?:[\\/]*)
17997  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17998  ;;
17999  *)
18000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18001for as_dir in $PATH
18002do
18003  IFS=$as_save_IFS
18004  test -z "$as_dir" && as_dir=.
18005    for ac_exec_ext in '' $ac_executable_extensions; do
18006  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18007    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18009    break 2
18010  fi
18011done
18012  done
18013IFS=$as_save_IFS
18014
18015  ;;
18016esac
18017fi
18018BUILD_CC=$ac_cv_path_BUILD_CC
18019if test -n "$BUILD_CC"; then
18020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18021$as_echo "$BUILD_CC" >&6; }
18022else
18023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18024$as_echo "no" >&6; }
18025fi
18026
18027
18028  test -n "$BUILD_CC" && break
18029done
18030
18031
18032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18033
18034  # First separate the path from the arguments. This will split at the first
18035  # space.
18036  complete="$BUILD_CC"
18037  path="${complete%% *}"
18038  tmp="$complete EOL"
18039  arguments="${tmp#* }"
18040
18041  # Input might be given as Windows format, start by converting to
18042  # unix format.
18043  new_path=`$CYGPATH -u "$path"`
18044
18045  # Now try to locate executable using which
18046  new_path=`$WHICH "$new_path" 2> /dev/null`
18047  # bat and cmd files are not always considered executable in cygwin causing which
18048  # to not find them
18049  if test "x$new_path" = x \
18050           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18051           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18052    new_path=`$CYGPATH -u "$path"`
18053  fi
18054  if test "x$new_path" = x; then
18055    # Oops. Which didn't find the executable.
18056    # The splitting of arguments from the executable at a space might have been incorrect,
18057    # since paths with space are more likely in Windows. Give it another try with the whole
18058    # argument.
18059    path="$complete"
18060    arguments="EOL"
18061    new_path=`$CYGPATH -u "$path"`
18062    new_path=`$WHICH "$new_path" 2> /dev/null`
18063    # bat and cmd files are not always considered executable in cygwin causing which
18064    # to not find them
18065    if test "x$new_path" = x \
18066             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18067             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18068      new_path=`$CYGPATH -u "$path"`
18069    fi
18070    if test "x$new_path" = x; then
18071      # It's still not found. Now this is an unrecoverable error.
18072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18073$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18074      has_space=`$ECHO "$complete" | $GREP " "`
18075      if test "x$has_space" != x; then
18076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18078      fi
18079      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18080    fi
18081  fi
18082
18083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18086  # "foo.exe" is OK but "foo" is an error.
18087  #
18088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18089  # It is also a way to make sure we got the proper file name for the real test later on.
18090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18091  if test "x$test_shortpath" = x; then
18092    # Short path failed, file does not exist as specified.
18093    # Try adding .exe or .cmd
18094    if test -f "${new_path}.exe"; then
18095       input_to_shortpath="${new_path}.exe"
18096    elif test -f "${new_path}.cmd"; then
18097       input_to_shortpath="${new_path}.cmd"
18098    else
18099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18100$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18101      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18102$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18103      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18104    fi
18105  else
18106    input_to_shortpath="$new_path"
18107  fi
18108
18109  # Call helper function which possibly converts this using DOS-style short mode.
18110  # If so, the updated path is stored in $new_path.
18111  new_path="$input_to_shortpath"
18112
18113  input_path="$input_to_shortpath"
18114  # Check if we need to convert this using DOS-style short mode. If the path
18115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18116  # take no chances and rewrite it.
18117  # Note: m4 eats our [], so we need to use [ and ] instead.
18118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18119  if test "x$has_forbidden_chars" != x; then
18120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18124      # Going to short mode and back again did indeed matter. Since short mode is
18125      # case insensitive, let's make it lowercase to improve readability.
18126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18127      # Now convert it back to Unix-stile (cygpath)
18128      input_path=`$CYGPATH -u "$shortmode_path"`
18129      new_path="$input_path"
18130    fi
18131  fi
18132
18133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18134  if test "x$test_cygdrive_prefix" = x; then
18135    # As a simple fix, exclude /usr/bin since it's not a real path.
18136    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18138      # a path prefixed by /cygdrive for fixpath to work.
18139      new_path="$CYGWIN_ROOT_PATH$input_path"
18140    fi
18141  fi
18142
18143  # remove trailing .exe if any
18144  new_path="${new_path/%.exe/}"
18145
18146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18147
18148  # First separate the path from the arguments. This will split at the first
18149  # space.
18150  complete="$BUILD_CC"
18151  path="${complete%% *}"
18152  tmp="$complete EOL"
18153  arguments="${tmp#* }"
18154
18155  # Input might be given as Windows format, start by converting to
18156  # unix format.
18157  new_path="$path"
18158
18159  windows_path="$new_path"
18160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18161    unix_path=`$CYGPATH -u "$windows_path"`
18162    new_path="$unix_path"
18163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18165    new_path="$unix_path"
18166  fi
18167
18168
18169  # Now try to locate executable using which
18170  new_path=`$WHICH "$new_path" 2> /dev/null`
18171
18172  if test "x$new_path" = x; then
18173    # Oops. Which didn't find the executable.
18174    # The splitting of arguments from the executable at a space might have been incorrect,
18175    # since paths with space are more likely in Windows. Give it another try with the whole
18176    # argument.
18177    path="$complete"
18178    arguments="EOL"
18179    new_path="$path"
18180
18181  windows_path="$new_path"
18182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18183    unix_path=`$CYGPATH -u "$windows_path"`
18184    new_path="$unix_path"
18185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18187    new_path="$unix_path"
18188  fi
18189
18190
18191    new_path=`$WHICH "$new_path" 2> /dev/null`
18192
18193    if test "x$new_path" = x; then
18194      # It's still not found. Now this is an unrecoverable error.
18195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18196$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18197      has_space=`$ECHO "$complete" | $GREP " "`
18198      if test "x$has_space" != x; then
18199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18201      fi
18202      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18203    fi
18204  fi
18205
18206  # Now new_path has a complete unix path to the binary
18207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18208    # Keep paths in /bin as-is, but remove trailing .exe if any
18209    new_path="${new_path/%.exe/}"
18210    # Do not save /bin paths to all_fixpath_prefixes!
18211  else
18212    # Not in mixed or Windows style, start by that.
18213    new_path=`cmd //c echo $new_path`
18214
18215  input_path="$new_path"
18216  # Check if we need to convert this using DOS-style short mode. If the path
18217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18218  # take no chances and rewrite it.
18219  # Note: m4 eats our [], so we need to use [ and ] instead.
18220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18221  if test "x$has_forbidden_chars" != x; then
18222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18224  fi
18225
18226    # Output is in $new_path
18227
18228  windows_path="$new_path"
18229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18230    unix_path=`$CYGPATH -u "$windows_path"`
18231    new_path="$unix_path"
18232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18234    new_path="$unix_path"
18235  fi
18236
18237    # remove trailing .exe if any
18238    new_path="${new_path/%.exe/}"
18239
18240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18242  fi
18243
18244  else
18245    # We're on a posix platform. Hooray! :)
18246    # First separate the path from the arguments. This will split at the first
18247    # space.
18248    complete="$BUILD_CC"
18249    path="${complete%% *}"
18250    tmp="$complete EOL"
18251    arguments="${tmp#* }"
18252
18253    # Cannot rely on the command "which" here since it doesn't always work.
18254    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18255    if test -z "$is_absolute_path"; then
18256      # Path to executable is not absolute. Find it.
18257      IFS_save="$IFS"
18258      IFS=:
18259      for p in $PATH; do
18260        if test -f "$p/$path" && test -x "$p/$path"; then
18261          new_path="$p/$path"
18262          break
18263        fi
18264      done
18265      IFS="$IFS_save"
18266    else
18267      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18268$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18269      new_path="$path"
18270    fi
18271
18272    if test "x$new_path" = x; then
18273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18274$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18275        has_space=`$ECHO "$complete" | $GREP " "`
18276        if test "x$has_space" != x; then
18277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18279        fi
18280        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18281      fi
18282  fi
18283
18284      # Now join together the path and the arguments once again
18285      if test "x$arguments" != xEOL; then
18286        new_complete="$new_path ${arguments% *}"
18287      else
18288        new_complete="$new_path"
18289      fi
18290
18291  if test "x$complete" != "x$new_complete"; then
18292      BUILD_CC="$new_complete"
18293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18294$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18295    fi
18296
18297    for ac_prog in cl CC g++
18298do
18299  # Extract the first word of "$ac_prog", so it can be a program name with args.
18300set dummy $ac_prog; ac_word=$2
18301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18302$as_echo_n "checking for $ac_word... " >&6; }
18303if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18304  $as_echo_n "(cached) " >&6
18305else
18306  case $BUILD_CXX in
18307  [\\/]* | ?:[\\/]*)
18308  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18309  ;;
18310  *)
18311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18312for as_dir in $PATH
18313do
18314  IFS=$as_save_IFS
18315  test -z "$as_dir" && as_dir=.
18316    for ac_exec_ext in '' $ac_executable_extensions; do
18317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18318    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18320    break 2
18321  fi
18322done
18323  done
18324IFS=$as_save_IFS
18325
18326  ;;
18327esac
18328fi
18329BUILD_CXX=$ac_cv_path_BUILD_CXX
18330if test -n "$BUILD_CXX"; then
18331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18332$as_echo "$BUILD_CXX" >&6; }
18333else
18334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18335$as_echo "no" >&6; }
18336fi
18337
18338
18339  test -n "$BUILD_CXX" && break
18340done
18341
18342
18343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18344
18345  # First separate the path from the arguments. This will split at the first
18346  # space.
18347  complete="$BUILD_CXX"
18348  path="${complete%% *}"
18349  tmp="$complete EOL"
18350  arguments="${tmp#* }"
18351
18352  # Input might be given as Windows format, start by converting to
18353  # unix format.
18354  new_path=`$CYGPATH -u "$path"`
18355
18356  # Now try to locate executable using which
18357  new_path=`$WHICH "$new_path" 2> /dev/null`
18358  # bat and cmd files are not always considered executable in cygwin causing which
18359  # to not find them
18360  if test "x$new_path" = x \
18361           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18362           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18363    new_path=`$CYGPATH -u "$path"`
18364  fi
18365  if test "x$new_path" = x; then
18366    # Oops. Which didn't find the executable.
18367    # The splitting of arguments from the executable at a space might have been incorrect,
18368    # since paths with space are more likely in Windows. Give it another try with the whole
18369    # argument.
18370    path="$complete"
18371    arguments="EOL"
18372    new_path=`$CYGPATH -u "$path"`
18373    new_path=`$WHICH "$new_path" 2> /dev/null`
18374    # bat and cmd files are not always considered executable in cygwin causing which
18375    # to not find them
18376    if test "x$new_path" = x \
18377             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18378             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18379      new_path=`$CYGPATH -u "$path"`
18380    fi
18381    if test "x$new_path" = x; then
18382      # It's still not found. Now this is an unrecoverable error.
18383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18384$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18385      has_space=`$ECHO "$complete" | $GREP " "`
18386      if test "x$has_space" != x; then
18387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18389      fi
18390      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18391    fi
18392  fi
18393
18394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18397  # "foo.exe" is OK but "foo" is an error.
18398  #
18399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18400  # It is also a way to make sure we got the proper file name for the real test later on.
18401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18402  if test "x$test_shortpath" = x; then
18403    # Short path failed, file does not exist as specified.
18404    # Try adding .exe or .cmd
18405    if test -f "${new_path}.exe"; then
18406       input_to_shortpath="${new_path}.exe"
18407    elif test -f "${new_path}.cmd"; then
18408       input_to_shortpath="${new_path}.cmd"
18409    else
18410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18411$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18414      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18415    fi
18416  else
18417    input_to_shortpath="$new_path"
18418  fi
18419
18420  # Call helper function which possibly converts this using DOS-style short mode.
18421  # If so, the updated path is stored in $new_path.
18422  new_path="$input_to_shortpath"
18423
18424  input_path="$input_to_shortpath"
18425  # Check if we need to convert this using DOS-style short mode. If the path
18426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18427  # take no chances and rewrite it.
18428  # Note: m4 eats our [], so we need to use [ and ] instead.
18429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18430  if test "x$has_forbidden_chars" != x; then
18431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18435      # Going to short mode and back again did indeed matter. Since short mode is
18436      # case insensitive, let's make it lowercase to improve readability.
18437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18438      # Now convert it back to Unix-stile (cygpath)
18439      input_path=`$CYGPATH -u "$shortmode_path"`
18440      new_path="$input_path"
18441    fi
18442  fi
18443
18444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18445  if test "x$test_cygdrive_prefix" = x; then
18446    # As a simple fix, exclude /usr/bin since it's not a real path.
18447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18449      # a path prefixed by /cygdrive for fixpath to work.
18450      new_path="$CYGWIN_ROOT_PATH$input_path"
18451    fi
18452  fi
18453
18454  # remove trailing .exe if any
18455  new_path="${new_path/%.exe/}"
18456
18457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18458
18459  # First separate the path from the arguments. This will split at the first
18460  # space.
18461  complete="$BUILD_CXX"
18462  path="${complete%% *}"
18463  tmp="$complete EOL"
18464  arguments="${tmp#* }"
18465
18466  # Input might be given as Windows format, start by converting to
18467  # unix format.
18468  new_path="$path"
18469
18470  windows_path="$new_path"
18471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18472    unix_path=`$CYGPATH -u "$windows_path"`
18473    new_path="$unix_path"
18474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18476    new_path="$unix_path"
18477  fi
18478
18479
18480  # Now try to locate executable using which
18481  new_path=`$WHICH "$new_path" 2> /dev/null`
18482
18483  if test "x$new_path" = x; then
18484    # Oops. Which didn't find the executable.
18485    # The splitting of arguments from the executable at a space might have been incorrect,
18486    # since paths with space are more likely in Windows. Give it another try with the whole
18487    # argument.
18488    path="$complete"
18489    arguments="EOL"
18490    new_path="$path"
18491
18492  windows_path="$new_path"
18493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18494    unix_path=`$CYGPATH -u "$windows_path"`
18495    new_path="$unix_path"
18496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18498    new_path="$unix_path"
18499  fi
18500
18501
18502    new_path=`$WHICH "$new_path" 2> /dev/null`
18503
18504    if test "x$new_path" = x; then
18505      # It's still not found. Now this is an unrecoverable error.
18506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18507$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18508      has_space=`$ECHO "$complete" | $GREP " "`
18509      if test "x$has_space" != x; then
18510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18512      fi
18513      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18514    fi
18515  fi
18516
18517  # Now new_path has a complete unix path to the binary
18518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18519    # Keep paths in /bin as-is, but remove trailing .exe if any
18520    new_path="${new_path/%.exe/}"
18521    # Do not save /bin paths to all_fixpath_prefixes!
18522  else
18523    # Not in mixed or Windows style, start by that.
18524    new_path=`cmd //c echo $new_path`
18525
18526  input_path="$new_path"
18527  # Check if we need to convert this using DOS-style short mode. If the path
18528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18529  # take no chances and rewrite it.
18530  # Note: m4 eats our [], so we need to use [ and ] instead.
18531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18532  if test "x$has_forbidden_chars" != x; then
18533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18535  fi
18536
18537    # Output is in $new_path
18538
18539  windows_path="$new_path"
18540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18541    unix_path=`$CYGPATH -u "$windows_path"`
18542    new_path="$unix_path"
18543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18545    new_path="$unix_path"
18546  fi
18547
18548    # remove trailing .exe if any
18549    new_path="${new_path/%.exe/}"
18550
18551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18553  fi
18554
18555  else
18556    # We're on a posix platform. Hooray! :)
18557    # First separate the path from the arguments. This will split at the first
18558    # space.
18559    complete="$BUILD_CXX"
18560    path="${complete%% *}"
18561    tmp="$complete EOL"
18562    arguments="${tmp#* }"
18563
18564    # Cannot rely on the command "which" here since it doesn't always work.
18565    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18566    if test -z "$is_absolute_path"; then
18567      # Path to executable is not absolute. Find it.
18568      IFS_save="$IFS"
18569      IFS=:
18570      for p in $PATH; do
18571        if test -f "$p/$path" && test -x "$p/$path"; then
18572          new_path="$p/$path"
18573          break
18574        fi
18575      done
18576      IFS="$IFS_save"
18577    else
18578      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18579$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18580      new_path="$path"
18581    fi
18582
18583    if test "x$new_path" = x; then
18584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18585$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18586        has_space=`$ECHO "$complete" | $GREP " "`
18587        if test "x$has_space" != x; then
18588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18590        fi
18591        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18592      fi
18593  fi
18594
18595      # Now join together the path and the arguments once again
18596      if test "x$arguments" != xEOL; then
18597        new_complete="$new_path ${arguments% *}"
18598      else
18599        new_complete="$new_path"
18600      fi
18601
18602  if test "x$complete" != "x$new_complete"; then
18603      BUILD_CXX="$new_complete"
18604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18605$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18606    fi
18607
18608    # Extract the first word of "ld", so it can be a program name with args.
18609set dummy ld; ac_word=$2
18610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18611$as_echo_n "checking for $ac_word... " >&6; }
18612if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18613  $as_echo_n "(cached) " >&6
18614else
18615  case $BUILD_LD in
18616  [\\/]* | ?:[\\/]*)
18617  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18618  ;;
18619  *)
18620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18621for as_dir in $PATH
18622do
18623  IFS=$as_save_IFS
18624  test -z "$as_dir" && as_dir=.
18625    for ac_exec_ext in '' $ac_executable_extensions; do
18626  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18627    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18629    break 2
18630  fi
18631done
18632  done
18633IFS=$as_save_IFS
18634
18635  ;;
18636esac
18637fi
18638BUILD_LD=$ac_cv_path_BUILD_LD
18639if test -n "$BUILD_LD"; then
18640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18641$as_echo "$BUILD_LD" >&6; }
18642else
18643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18644$as_echo "no" >&6; }
18645fi
18646
18647
18648
18649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18650
18651  # First separate the path from the arguments. This will split at the first
18652  # space.
18653  complete="$BUILD_LD"
18654  path="${complete%% *}"
18655  tmp="$complete EOL"
18656  arguments="${tmp#* }"
18657
18658  # Input might be given as Windows format, start by converting to
18659  # unix format.
18660  new_path=`$CYGPATH -u "$path"`
18661
18662  # Now try to locate executable using which
18663  new_path=`$WHICH "$new_path" 2> /dev/null`
18664  # bat and cmd files are not always considered executable in cygwin causing which
18665  # to not find them
18666  if test "x$new_path" = x \
18667           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18668           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18669    new_path=`$CYGPATH -u "$path"`
18670  fi
18671  if test "x$new_path" = x; then
18672    # Oops. Which didn't find the executable.
18673    # The splitting of arguments from the executable at a space might have been incorrect,
18674    # since paths with space are more likely in Windows. Give it another try with the whole
18675    # argument.
18676    path="$complete"
18677    arguments="EOL"
18678    new_path=`$CYGPATH -u "$path"`
18679    new_path=`$WHICH "$new_path" 2> /dev/null`
18680    # bat and cmd files are not always considered executable in cygwin causing which
18681    # to not find them
18682    if test "x$new_path" = x \
18683             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18684             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18685      new_path=`$CYGPATH -u "$path"`
18686    fi
18687    if test "x$new_path" = x; then
18688      # It's still not found. Now this is an unrecoverable error.
18689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18690$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18691      has_space=`$ECHO "$complete" | $GREP " "`
18692      if test "x$has_space" != x; then
18693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18695      fi
18696      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18697    fi
18698  fi
18699
18700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18703  # "foo.exe" is OK but "foo" is an error.
18704  #
18705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18706  # It is also a way to make sure we got the proper file name for the real test later on.
18707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18708  if test "x$test_shortpath" = x; then
18709    # Short path failed, file does not exist as specified.
18710    # Try adding .exe or .cmd
18711    if test -f "${new_path}.exe"; then
18712       input_to_shortpath="${new_path}.exe"
18713    elif test -f "${new_path}.cmd"; then
18714       input_to_shortpath="${new_path}.cmd"
18715    else
18716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18717$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18718      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18719$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18720      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18721    fi
18722  else
18723    input_to_shortpath="$new_path"
18724  fi
18725
18726  # Call helper function which possibly converts this using DOS-style short mode.
18727  # If so, the updated path is stored in $new_path.
18728  new_path="$input_to_shortpath"
18729
18730  input_path="$input_to_shortpath"
18731  # Check if we need to convert this using DOS-style short mode. If the path
18732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18733  # take no chances and rewrite it.
18734  # Note: m4 eats our [], so we need to use [ and ] instead.
18735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18736  if test "x$has_forbidden_chars" != x; then
18737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18741      # Going to short mode and back again did indeed matter. Since short mode is
18742      # case insensitive, let's make it lowercase to improve readability.
18743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18744      # Now convert it back to Unix-stile (cygpath)
18745      input_path=`$CYGPATH -u "$shortmode_path"`
18746      new_path="$input_path"
18747    fi
18748  fi
18749
18750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18751  if test "x$test_cygdrive_prefix" = x; then
18752    # As a simple fix, exclude /usr/bin since it's not a real path.
18753    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18755      # a path prefixed by /cygdrive for fixpath to work.
18756      new_path="$CYGWIN_ROOT_PATH$input_path"
18757    fi
18758  fi
18759
18760  # remove trailing .exe if any
18761  new_path="${new_path/%.exe/}"
18762
18763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18764
18765  # First separate the path from the arguments. This will split at the first
18766  # space.
18767  complete="$BUILD_LD"
18768  path="${complete%% *}"
18769  tmp="$complete EOL"
18770  arguments="${tmp#* }"
18771
18772  # Input might be given as Windows format, start by converting to
18773  # unix format.
18774  new_path="$path"
18775
18776  windows_path="$new_path"
18777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18778    unix_path=`$CYGPATH -u "$windows_path"`
18779    new_path="$unix_path"
18780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18782    new_path="$unix_path"
18783  fi
18784
18785
18786  # Now try to locate executable using which
18787  new_path=`$WHICH "$new_path" 2> /dev/null`
18788
18789  if test "x$new_path" = x; then
18790    # Oops. Which didn't find the executable.
18791    # The splitting of arguments from the executable at a space might have been incorrect,
18792    # since paths with space are more likely in Windows. Give it another try with the whole
18793    # argument.
18794    path="$complete"
18795    arguments="EOL"
18796    new_path="$path"
18797
18798  windows_path="$new_path"
18799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18800    unix_path=`$CYGPATH -u "$windows_path"`
18801    new_path="$unix_path"
18802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18804    new_path="$unix_path"
18805  fi
18806
18807
18808    new_path=`$WHICH "$new_path" 2> /dev/null`
18809
18810    if test "x$new_path" = x; then
18811      # It's still not found. Now this is an unrecoverable error.
18812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18813$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18814      has_space=`$ECHO "$complete" | $GREP " "`
18815      if test "x$has_space" != x; then
18816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18818      fi
18819      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18820    fi
18821  fi
18822
18823  # Now new_path has a complete unix path to the binary
18824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18825    # Keep paths in /bin as-is, but remove trailing .exe if any
18826    new_path="${new_path/%.exe/}"
18827    # Do not save /bin paths to all_fixpath_prefixes!
18828  else
18829    # Not in mixed or Windows style, start by that.
18830    new_path=`cmd //c echo $new_path`
18831
18832  input_path="$new_path"
18833  # Check if we need to convert this using DOS-style short mode. If the path
18834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18835  # take no chances and rewrite it.
18836  # Note: m4 eats our [], so we need to use [ and ] instead.
18837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18838  if test "x$has_forbidden_chars" != x; then
18839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18841  fi
18842
18843    # Output is in $new_path
18844
18845  windows_path="$new_path"
18846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18847    unix_path=`$CYGPATH -u "$windows_path"`
18848    new_path="$unix_path"
18849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18851    new_path="$unix_path"
18852  fi
18853
18854    # remove trailing .exe if any
18855    new_path="${new_path/%.exe/}"
18856
18857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18859  fi
18860
18861  else
18862    # We're on a posix platform. Hooray! :)
18863    # First separate the path from the arguments. This will split at the first
18864    # space.
18865    complete="$BUILD_LD"
18866    path="${complete%% *}"
18867    tmp="$complete EOL"
18868    arguments="${tmp#* }"
18869
18870    # Cannot rely on the command "which" here since it doesn't always work.
18871    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18872    if test -z "$is_absolute_path"; then
18873      # Path to executable is not absolute. Find it.
18874      IFS_save="$IFS"
18875      IFS=:
18876      for p in $PATH; do
18877        if test -f "$p/$path" && test -x "$p/$path"; then
18878          new_path="$p/$path"
18879          break
18880        fi
18881      done
18882      IFS="$IFS_save"
18883    else
18884      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18885$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18886      new_path="$path"
18887    fi
18888
18889    if test "x$new_path" = x; then
18890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18891$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18892        has_space=`$ECHO "$complete" | $GREP " "`
18893        if test "x$has_space" != x; then
18894          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18896        fi
18897        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18898      fi
18899  fi
18900
18901      # Now join together the path and the arguments once again
18902      if test "x$arguments" != xEOL; then
18903        new_complete="$new_path ${arguments% *}"
18904      else
18905        new_complete="$new_path"
18906      fi
18907
18908  if test "x$complete" != "x$new_complete"; then
18909      BUILD_LD="$new_complete"
18910      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18911$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18912    fi
18913
18914fi
18915
18916
18917
18918
18919# If a devkit is found on the builddeps server, then prepend its path to the
18920# PATH variable. If there are cross compilers available in the devkit, these
18921# will be found by AC_PROG_CC et al.
18922DEVKIT=
18923
18924
18925    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18926        # Source the builddeps file again, to make sure it uses the latest variables!
18927        . $builddepsfile
18928        # Look for a target and build machine specific resource!
18929        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18930        if test "x$resource" = x; then
18931            # Ok, lets instead look for a target specific resource
18932            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18933        fi
18934        if test "x$resource" = x; then
18935            # Ok, lets instead look for a build specific resource
18936            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18937        fi
18938        if test "x$resource" = x; then
18939            # Ok, lets instead look for a generic resource
18940            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18941            resource=${builddep_devkit}
18942        fi
18943        if test "x$resource" != x; then
18944            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18945$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18946	    # If the resource in the builddeps.conf file is an existing directory,
18947	    # for example /java/linux/cups
18948	    if test -d ${resource}; then
18949	       depdir=${resource}
18950	    else
18951
18952# devkit is for example mymodule
18953# $resource is for example libs/general/libmymod_1_2_3.zip
18954# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18955# $with_builddeps_dir is for example /localhome/builddeps
18956# depdir is the name of the variable into which we store the depdir, eg MYMOD
18957# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18958# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18959    filename=`basename $resource`
18960    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18961    filebase=${filename%%.*}
18962    extension=${filename#*.}
18963    installdir=$with_builddeps_dir/$filebase
18964    if test ! -f $installdir/$filename.unpacked; then
18965        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18966$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18967        if test ! -d $installdir; then
18968            mkdir -p $installdir
18969        fi
18970        if test ! -d $installdir; then
18971            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18972        fi
18973        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18974        touch $tmpfile
18975        if test ! -f $tmpfile; then
18976            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18977        fi
18978
18979    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18980    # $tmpfile is the local file name for the downloaded file.
18981    VALID_TOOL=no
18982    if test "x$BDEPS_FTP" = xwget; then
18983       VALID_TOOL=yes
18984       wget -O $tmpfile $with_builddeps_server/$resource
18985    fi
18986    if test "x$BDEPS_FTP" = xlftp; then
18987       VALID_TOOL=yes
18988       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18989    fi
18990    if test "x$BDEPS_FTP" = xftp; then
18991        VALID_TOOL=yes
18992        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18993        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18994        FTPUSERPWD=${FTPSERVER%%@*}
18995        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18996            FTPUSER=${userpwd%%:*}
18997            FTPPWD=${userpwd#*@}
18998            FTPSERVER=${FTPSERVER#*@}
18999        else
19000            FTPUSER=ftp
19001            FTPPWD=ftp
19002        fi
19003        # the "pass" command does not work on some
19004        # ftp clients (read ftp.exe) but if it works,
19005        # passive mode is better!
19006        (\
19007            echo "user $FTPUSER $FTPPWD"        ;\
19008            echo "pass"                         ;\
19009            echo "bin"                          ;\
19010            echo "get $FTPPATH $tmpfile"              ;\
19011        ) | ftp -in $FTPSERVER
19012    fi
19013    if test "x$VALID_TOOL" != xyes; then
19014       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19015    fi
19016
19017        mv $tmpfile $installdir/$filename
19018        if test ! -s $installdir/$filename; then
19019            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19020        fi
19021        case "$extension" in
19022            zip)  echo "Unzipping $installdir/$filename..."
19023               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19024            ;;
19025            tar.gz) echo "Untaring $installdir/$filename..."
19026               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19027            ;;
19028            tgz) echo "Untaring $installdir/$filename..."
19029               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19030            ;;
19031            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19032            ;;
19033        esac
19034    fi
19035    if test -f $installdir/$filename.unpacked; then
19036        depdir=$installdir
19037    fi
19038
19039	    fi
19040            # Source the builddeps file again, because in the previous command, the depdir
19041            # was updated to point at the current build dependency install directory.
19042            . $builddepsfile
19043            # Now extract variables from the builddeps.conf files.
19044            theroot=${builddep_devkit_ROOT}
19045            thecflags=${builddep_devkit_CFLAGS}
19046            thelibs=${builddep_devkit_LIBS}
19047            if test "x$depdir" = x; then
19048                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19049            fi
19050            DEVKIT=$depdir
19051            if test "x$theroot" != x; then
19052               DEVKIT="$theroot"
19053            fi
19054            if test "x$thecflags" != x; then
19055               DEVKIT_CFLAGS="$thecflags"
19056            fi
19057            if test "x$thelibs" != x; then
19058               DEVKIT_LIBS="$thelibs"
19059            fi
19060            # Found devkit
19061                     PATH="$DEVKIT/bin:$PATH"
19062                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19063                     if test "x$x_includes" = "xNONE"; then
19064                         x_includes="$SYS_ROOT/usr/include/X11"
19065                     fi
19066                     if test "x$x_libraries" = "xNONE"; then
19067                         x_libraries="$SYS_ROOT/usr/lib"
19068                     fi
19069
19070
19071        fi
19072
19073    fi
19074
19075
19076# Store the CFLAGS etal passed to the configure script.
19077ORG_CFLAGS="$CFLAGS"
19078ORG_CXXFLAGS="$CXXFLAGS"
19079ORG_OBJCFLAGS="$OBJCFLAGS"
19080
19081# autoconf magic only relies on PATH, so update it if tools dir is specified
19082OLD_PATH="$PATH"
19083if test "x$TOOLS_DIR" != x; then
19084  PATH=$TOOLS_DIR:$PATH
19085fi
19086
19087
19088### Locate C compiler (CC)
19089
19090# On windows, only cl.exe is supported.
19091# On Solaris, cc is preferred to gcc.
19092# Elsewhere, gcc is preferred to cc.
19093
19094if test "x$CC" != x; then
19095  COMPILER_CHECK_LIST="$CC"
19096elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19097  COMPILER_CHECK_LIST="cl"
19098elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19099  COMPILER_CHECK_LIST="cc gcc"
19100else
19101  COMPILER_CHECK_LIST="gcc cc"
19102fi
19103
19104
19105  COMPILER_NAME=C
19106
19107  CC=
19108  # If TOOLS_DIR is set, check for all compiler names in there first
19109  # before checking the rest of the PATH.
19110  if test -n "$TOOLS_DIR"; then
19111    PATH_save="$PATH"
19112    PATH="$TOOLS_DIR"
19113    for ac_prog in $COMPILER_CHECK_LIST
19114do
19115  # Extract the first word of "$ac_prog", so it can be a program name with args.
19116set dummy $ac_prog; ac_word=$2
19117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19118$as_echo_n "checking for $ac_word... " >&6; }
19119if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
19120  $as_echo_n "(cached) " >&6
19121else
19122  case $TOOLS_DIR_CC in
19123  [\\/]* | ?:[\\/]*)
19124  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19125  ;;
19126  *)
19127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19128for as_dir in $PATH
19129do
19130  IFS=$as_save_IFS
19131  test -z "$as_dir" && as_dir=.
19132    for ac_exec_ext in '' $ac_executable_extensions; do
19133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19134    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19136    break 2
19137  fi
19138done
19139  done
19140IFS=$as_save_IFS
19141
19142  ;;
19143esac
19144fi
19145TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19146if test -n "$TOOLS_DIR_CC"; then
19147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19148$as_echo "$TOOLS_DIR_CC" >&6; }
19149else
19150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19151$as_echo "no" >&6; }
19152fi
19153
19154
19155  test -n "$TOOLS_DIR_CC" && break
19156done
19157
19158    CC=$TOOLS_DIR_CC
19159    PATH="$PATH_save"
19160  fi
19161
19162  # AC_PATH_PROGS can't be run multiple times with the same variable,
19163  # so create a new name for this run.
19164  if test "x$CC" = x; then
19165    for ac_prog in $COMPILER_CHECK_LIST
19166do
19167  # Extract the first word of "$ac_prog", so it can be a program name with args.
19168set dummy $ac_prog; ac_word=$2
19169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19170$as_echo_n "checking for $ac_word... " >&6; }
19171if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19172  $as_echo_n "(cached) " >&6
19173else
19174  case $POTENTIAL_CC in
19175  [\\/]* | ?:[\\/]*)
19176  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19177  ;;
19178  *)
19179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19180for as_dir in $PATH
19181do
19182  IFS=$as_save_IFS
19183  test -z "$as_dir" && as_dir=.
19184    for ac_exec_ext in '' $ac_executable_extensions; do
19185  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19186    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19188    break 2
19189  fi
19190done
19191  done
19192IFS=$as_save_IFS
19193
19194  ;;
19195esac
19196fi
19197POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19198if test -n "$POTENTIAL_CC"; then
19199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19200$as_echo "$POTENTIAL_CC" >&6; }
19201else
19202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19203$as_echo "no" >&6; }
19204fi
19205
19206
19207  test -n "$POTENTIAL_CC" && break
19208done
19209
19210    CC=$POTENTIAL_CC
19211  fi
19212
19213  if test "x$CC" = x; then
19214
19215    # Print a helpful message on how to acquire the necessary build dependency.
19216    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19217    MISSING_DEPENDENCY=devkit
19218    PKGHANDLER_COMMAND=
19219
19220    case $PKGHANDLER in
19221	apt-get)
19222                apt_help     $MISSING_DEPENDENCY ;;
19223    yum)
19224                yum_help     $MISSING_DEPENDENCY ;;
19225	port)
19226                port_help    $MISSING_DEPENDENCY ;;
19227	pkgutil)
19228                pkgutil_help $MISSING_DEPENDENCY ;;
19229	pkgadd)
19230                pkgadd_help  $MISSING_DEPENDENCY ;;
19231    * )
19232      break ;;
19233    esac
19234
19235    if test "x$PKGHANDLER_COMMAND" != x; then
19236        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19237    fi
19238
19239      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19240  fi
19241
19242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19243
19244  # First separate the path from the arguments. This will split at the first
19245  # space.
19246  complete="$CC"
19247  path="${complete%% *}"
19248  tmp="$complete EOL"
19249  arguments="${tmp#* }"
19250
19251  # Input might be given as Windows format, start by converting to
19252  # unix format.
19253  new_path=`$CYGPATH -u "$path"`
19254
19255  # Now try to locate executable using which
19256  new_path=`$WHICH "$new_path" 2> /dev/null`
19257  # bat and cmd files are not always considered executable in cygwin causing which
19258  # to not find them
19259  if test "x$new_path" = x \
19260           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19261           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19262    new_path=`$CYGPATH -u "$path"`
19263  fi
19264  if test "x$new_path" = x; then
19265    # Oops. Which didn't find the executable.
19266    # The splitting of arguments from the executable at a space might have been incorrect,
19267    # since paths with space are more likely in Windows. Give it another try with the whole
19268    # argument.
19269    path="$complete"
19270    arguments="EOL"
19271    new_path=`$CYGPATH -u "$path"`
19272    new_path=`$WHICH "$new_path" 2> /dev/null`
19273    # bat and cmd files are not always considered executable in cygwin causing which
19274    # to not find them
19275    if test "x$new_path" = x \
19276             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19277             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19278      new_path=`$CYGPATH -u "$path"`
19279    fi
19280    if test "x$new_path" = x; then
19281      # It's still not found. Now this is an unrecoverable error.
19282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19283$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19284      has_space=`$ECHO "$complete" | $GREP " "`
19285      if test "x$has_space" != x; then
19286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19288      fi
19289      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19290    fi
19291  fi
19292
19293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19296  # "foo.exe" is OK but "foo" is an error.
19297  #
19298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19299  # It is also a way to make sure we got the proper file name for the real test later on.
19300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19301  if test "x$test_shortpath" = x; then
19302    # Short path failed, file does not exist as specified.
19303    # Try adding .exe or .cmd
19304    if test -f "${new_path}.exe"; then
19305       input_to_shortpath="${new_path}.exe"
19306    elif test -f "${new_path}.cmd"; then
19307       input_to_shortpath="${new_path}.cmd"
19308    else
19309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19310$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19313      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19314    fi
19315  else
19316    input_to_shortpath="$new_path"
19317  fi
19318
19319  # Call helper function which possibly converts this using DOS-style short mode.
19320  # If so, the updated path is stored in $new_path.
19321  new_path="$input_to_shortpath"
19322
19323  input_path="$input_to_shortpath"
19324  # Check if we need to convert this using DOS-style short mode. If the path
19325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19326  # take no chances and rewrite it.
19327  # Note: m4 eats our [], so we need to use [ and ] instead.
19328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19329  if test "x$has_forbidden_chars" != x; then
19330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19334      # Going to short mode and back again did indeed matter. Since short mode is
19335      # case insensitive, let's make it lowercase to improve readability.
19336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19337      # Now convert it back to Unix-stile (cygpath)
19338      input_path=`$CYGPATH -u "$shortmode_path"`
19339      new_path="$input_path"
19340    fi
19341  fi
19342
19343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19344  if test "x$test_cygdrive_prefix" = x; then
19345    # As a simple fix, exclude /usr/bin since it's not a real path.
19346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19348      # a path prefixed by /cygdrive for fixpath to work.
19349      new_path="$CYGWIN_ROOT_PATH$input_path"
19350    fi
19351  fi
19352
19353  # remove trailing .exe if any
19354  new_path="${new_path/%.exe/}"
19355
19356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19357
19358  # First separate the path from the arguments. This will split at the first
19359  # space.
19360  complete="$CC"
19361  path="${complete%% *}"
19362  tmp="$complete EOL"
19363  arguments="${tmp#* }"
19364
19365  # Input might be given as Windows format, start by converting to
19366  # unix format.
19367  new_path="$path"
19368
19369  windows_path="$new_path"
19370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19371    unix_path=`$CYGPATH -u "$windows_path"`
19372    new_path="$unix_path"
19373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19375    new_path="$unix_path"
19376  fi
19377
19378
19379  # Now try to locate executable using which
19380  new_path=`$WHICH "$new_path" 2> /dev/null`
19381
19382  if test "x$new_path" = x; then
19383    # Oops. Which didn't find the executable.
19384    # The splitting of arguments from the executable at a space might have been incorrect,
19385    # since paths with space are more likely in Windows. Give it another try with the whole
19386    # argument.
19387    path="$complete"
19388    arguments="EOL"
19389    new_path="$path"
19390
19391  windows_path="$new_path"
19392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19393    unix_path=`$CYGPATH -u "$windows_path"`
19394    new_path="$unix_path"
19395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19397    new_path="$unix_path"
19398  fi
19399
19400
19401    new_path=`$WHICH "$new_path" 2> /dev/null`
19402
19403    if test "x$new_path" = x; then
19404      # It's still not found. Now this is an unrecoverable error.
19405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19406$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19407      has_space=`$ECHO "$complete" | $GREP " "`
19408      if test "x$has_space" != x; then
19409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19411      fi
19412      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19413    fi
19414  fi
19415
19416  # Now new_path has a complete unix path to the binary
19417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19418    # Keep paths in /bin as-is, but remove trailing .exe if any
19419    new_path="${new_path/%.exe/}"
19420    # Do not save /bin paths to all_fixpath_prefixes!
19421  else
19422    # Not in mixed or Windows style, start by that.
19423    new_path=`cmd //c echo $new_path`
19424
19425  input_path="$new_path"
19426  # Check if we need to convert this using DOS-style short mode. If the path
19427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19428  # take no chances and rewrite it.
19429  # Note: m4 eats our [], so we need to use [ and ] instead.
19430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19431  if test "x$has_forbidden_chars" != x; then
19432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19434  fi
19435
19436    # Output is in $new_path
19437
19438  windows_path="$new_path"
19439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19440    unix_path=`$CYGPATH -u "$windows_path"`
19441    new_path="$unix_path"
19442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19444    new_path="$unix_path"
19445  fi
19446
19447    # remove trailing .exe if any
19448    new_path="${new_path/%.exe/}"
19449
19450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19452  fi
19453
19454  else
19455    # We're on a posix platform. Hooray! :)
19456    # First separate the path from the arguments. This will split at the first
19457    # space.
19458    complete="$CC"
19459    path="${complete%% *}"
19460    tmp="$complete EOL"
19461    arguments="${tmp#* }"
19462
19463    # Cannot rely on the command "which" here since it doesn't always work.
19464    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19465    if test -z "$is_absolute_path"; then
19466      # Path to executable is not absolute. Find it.
19467      IFS_save="$IFS"
19468      IFS=:
19469      for p in $PATH; do
19470        if test -f "$p/$path" && test -x "$p/$path"; then
19471          new_path="$p/$path"
19472          break
19473        fi
19474      done
19475      IFS="$IFS_save"
19476    else
19477      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19478$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19479      new_path="$path"
19480    fi
19481
19482    if test "x$new_path" = x; then
19483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19484$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19485        has_space=`$ECHO "$complete" | $GREP " "`
19486        if test "x$has_space" != x; then
19487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19489        fi
19490        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19491      fi
19492  fi
19493
19494      # Now join together the path and the arguments once again
19495      if test "x$arguments" != xEOL; then
19496        new_complete="$new_path ${arguments% *}"
19497      else
19498        new_complete="$new_path"
19499      fi
19500
19501  if test "x$complete" != "x$new_complete"; then
19502      CC="$new_complete"
19503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19504$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19505    fi
19506
19507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19508$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19509  TEST_COMPILER="$CC"
19510
19511    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19512        # Follow a chain of symbolic links. Use readlink
19513        # where it exists, else fall back to horribly
19514        # complicated shell code.
19515        if test "x$READLINK_TESTED" != yes; then
19516            # On MacOSX there is a readlink tool with a different
19517            # purpose than the GNU readlink tool. Check the found readlink.
19518            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19519            if test "x$ISGNU" = x; then
19520                 # A readlink that we do not know how to use.
19521                 # Are there other non-GNU readlinks out there?
19522                 READLINK_TESTED=yes
19523                 READLINK=
19524            fi
19525        fi
19526
19527        if test "x$READLINK" != x; then
19528            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19529        else
19530            # Save the current directory for restoring afterwards
19531            STARTDIR=$PWD
19532            COUNTER=0
19533            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19534            sym_link_file=`$BASENAME $TEST_COMPILER`
19535            cd $sym_link_dir
19536            # Use -P flag to resolve symlinks in directories.
19537            cd `$THEPWDCMD -P`
19538            sym_link_dir=`$THEPWDCMD -P`
19539            # Resolve file symlinks
19540            while test $COUNTER -lt 20; do
19541                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19542                if test "x$ISLINK" == x; then
19543                    # This is not a symbolic link! We are done!
19544                    break
19545                fi
19546                # Again resolve directory symlinks since the target of the just found
19547                # link could be in a different directory
19548                cd `$DIRNAME $ISLINK`
19549                sym_link_dir=`$THEPWDCMD -P`
19550                sym_link_file=`$BASENAME $ISLINK`
19551                let COUNTER=COUNTER+1
19552            done
19553            cd $STARTDIR
19554            TEST_COMPILER=$sym_link_dir/$sym_link_file
19555        fi
19556    fi
19557
19558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19559$as_echo "$TEST_COMPILER" >&6; }
19560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19561$as_echo_n "checking if CC is disguised ccache... " >&6; }
19562
19563  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19564  if test "x$COMPILER_BASENAME" = "xccache"; then
19565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19566$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19567    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19568    # We want to control ccache invocation ourselves, so ignore this cc and try
19569    # searching again.
19570
19571    # Remove the path to the fake ccache cc from the PATH
19572    RETRY_COMPILER_SAVED_PATH="$PATH"
19573    COMPILER_DIRNAME=`$DIRNAME $CC`
19574    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19575
19576    # Try again looking for our compiler
19577    if test -n "$ac_tool_prefix"; then
19578  for ac_prog in $COMPILER_CHECK_LIST
19579  do
19580    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19581set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19583$as_echo_n "checking for $ac_word... " >&6; }
19584if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19585  $as_echo_n "(cached) " >&6
19586else
19587  if test -n "$PROPER_COMPILER_CC"; then
19588  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19589else
19590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19591for as_dir in $PATH
19592do
19593  IFS=$as_save_IFS
19594  test -z "$as_dir" && as_dir=.
19595    for ac_exec_ext in '' $ac_executable_extensions; do
19596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19597    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19599    break 2
19600  fi
19601done
19602  done
19603IFS=$as_save_IFS
19604
19605fi
19606fi
19607PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19608if test -n "$PROPER_COMPILER_CC"; then
19609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19610$as_echo "$PROPER_COMPILER_CC" >&6; }
19611else
19612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19613$as_echo "no" >&6; }
19614fi
19615
19616
19617    test -n "$PROPER_COMPILER_CC" && break
19618  done
19619fi
19620if test -z "$PROPER_COMPILER_CC"; then
19621  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19622  for ac_prog in $COMPILER_CHECK_LIST
19623do
19624  # Extract the first word of "$ac_prog", so it can be a program name with args.
19625set dummy $ac_prog; ac_word=$2
19626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19627$as_echo_n "checking for $ac_word... " >&6; }
19628if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19629  $as_echo_n "(cached) " >&6
19630else
19631  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19632  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19633else
19634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19635for as_dir in $PATH
19636do
19637  IFS=$as_save_IFS
19638  test -z "$as_dir" && as_dir=.
19639    for ac_exec_ext in '' $ac_executable_extensions; do
19640  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19641    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19643    break 2
19644  fi
19645done
19646  done
19647IFS=$as_save_IFS
19648
19649fi
19650fi
19651ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19652if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19654$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19655else
19656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19657$as_echo "no" >&6; }
19658fi
19659
19660
19661  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19662done
19663
19664  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19665    PROPER_COMPILER_CC=""
19666  else
19667    case $cross_compiling:$ac_tool_warned in
19668yes:)
19669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19671ac_tool_warned=yes ;;
19672esac
19673    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19674  fi
19675fi
19676
19677
19678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19679
19680  # First separate the path from the arguments. This will split at the first
19681  # space.
19682  complete="$PROPER_COMPILER_CC"
19683  path="${complete%% *}"
19684  tmp="$complete EOL"
19685  arguments="${tmp#* }"
19686
19687  # Input might be given as Windows format, start by converting to
19688  # unix format.
19689  new_path=`$CYGPATH -u "$path"`
19690
19691  # Now try to locate executable using which
19692  new_path=`$WHICH "$new_path" 2> /dev/null`
19693  # bat and cmd files are not always considered executable in cygwin causing which
19694  # to not find them
19695  if test "x$new_path" = x \
19696           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19697           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19698    new_path=`$CYGPATH -u "$path"`
19699  fi
19700  if test "x$new_path" = x; then
19701    # Oops. Which didn't find the executable.
19702    # The splitting of arguments from the executable at a space might have been incorrect,
19703    # since paths with space are more likely in Windows. Give it another try with the whole
19704    # argument.
19705    path="$complete"
19706    arguments="EOL"
19707    new_path=`$CYGPATH -u "$path"`
19708    new_path=`$WHICH "$new_path" 2> /dev/null`
19709    # bat and cmd files are not always considered executable in cygwin causing which
19710    # to not find them
19711    if test "x$new_path" = x \
19712             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19713             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19714      new_path=`$CYGPATH -u "$path"`
19715    fi
19716    if test "x$new_path" = x; then
19717      # It's still not found. Now this is an unrecoverable error.
19718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19719$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19720      has_space=`$ECHO "$complete" | $GREP " "`
19721      if test "x$has_space" != x; then
19722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19724      fi
19725      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19726    fi
19727  fi
19728
19729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19732  # "foo.exe" is OK but "foo" is an error.
19733  #
19734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19735  # It is also a way to make sure we got the proper file name for the real test later on.
19736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19737  if test "x$test_shortpath" = x; then
19738    # Short path failed, file does not exist as specified.
19739    # Try adding .exe or .cmd
19740    if test -f "${new_path}.exe"; then
19741       input_to_shortpath="${new_path}.exe"
19742    elif test -f "${new_path}.cmd"; then
19743       input_to_shortpath="${new_path}.cmd"
19744    else
19745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19746$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19749      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19750    fi
19751  else
19752    input_to_shortpath="$new_path"
19753  fi
19754
19755  # Call helper function which possibly converts this using DOS-style short mode.
19756  # If so, the updated path is stored in $new_path.
19757  new_path="$input_to_shortpath"
19758
19759  input_path="$input_to_shortpath"
19760  # Check if we need to convert this using DOS-style short mode. If the path
19761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19762  # take no chances and rewrite it.
19763  # Note: m4 eats our [], so we need to use [ and ] instead.
19764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19765  if test "x$has_forbidden_chars" != x; then
19766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19770      # Going to short mode and back again did indeed matter. Since short mode is
19771      # case insensitive, let's make it lowercase to improve readability.
19772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19773      # Now convert it back to Unix-stile (cygpath)
19774      input_path=`$CYGPATH -u "$shortmode_path"`
19775      new_path="$input_path"
19776    fi
19777  fi
19778
19779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19780  if test "x$test_cygdrive_prefix" = x; then
19781    # As a simple fix, exclude /usr/bin since it's not a real path.
19782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19784      # a path prefixed by /cygdrive for fixpath to work.
19785      new_path="$CYGWIN_ROOT_PATH$input_path"
19786    fi
19787  fi
19788
19789  # remove trailing .exe if any
19790  new_path="${new_path/%.exe/}"
19791
19792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19793
19794  # First separate the path from the arguments. This will split at the first
19795  # space.
19796  complete="$PROPER_COMPILER_CC"
19797  path="${complete%% *}"
19798  tmp="$complete EOL"
19799  arguments="${tmp#* }"
19800
19801  # Input might be given as Windows format, start by converting to
19802  # unix format.
19803  new_path="$path"
19804
19805  windows_path="$new_path"
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    unix_path=`$CYGPATH -u "$windows_path"`
19808    new_path="$unix_path"
19809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19811    new_path="$unix_path"
19812  fi
19813
19814
19815  # Now try to locate executable using which
19816  new_path=`$WHICH "$new_path" 2> /dev/null`
19817
19818  if test "x$new_path" = x; then
19819    # Oops. Which didn't find the executable.
19820    # The splitting of arguments from the executable at a space might have been incorrect,
19821    # since paths with space are more likely in Windows. Give it another try with the whole
19822    # argument.
19823    path="$complete"
19824    arguments="EOL"
19825    new_path="$path"
19826
19827  windows_path="$new_path"
19828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19829    unix_path=`$CYGPATH -u "$windows_path"`
19830    new_path="$unix_path"
19831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19833    new_path="$unix_path"
19834  fi
19835
19836
19837    new_path=`$WHICH "$new_path" 2> /dev/null`
19838
19839    if test "x$new_path" = x; then
19840      # It's still not found. Now this is an unrecoverable error.
19841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19842$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19843      has_space=`$ECHO "$complete" | $GREP " "`
19844      if test "x$has_space" != x; then
19845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19847      fi
19848      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19849    fi
19850  fi
19851
19852  # Now new_path has a complete unix path to the binary
19853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19854    # Keep paths in /bin as-is, but remove trailing .exe if any
19855    new_path="${new_path/%.exe/}"
19856    # Do not save /bin paths to all_fixpath_prefixes!
19857  else
19858    # Not in mixed or Windows style, start by that.
19859    new_path=`cmd //c echo $new_path`
19860
19861  input_path="$new_path"
19862  # Check if we need to convert this using DOS-style short mode. If the path
19863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19864  # take no chances and rewrite it.
19865  # Note: m4 eats our [], so we need to use [ and ] instead.
19866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19867  if test "x$has_forbidden_chars" != x; then
19868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19870  fi
19871
19872    # Output is in $new_path
19873
19874  windows_path="$new_path"
19875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19876    unix_path=`$CYGPATH -u "$windows_path"`
19877    new_path="$unix_path"
19878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19880    new_path="$unix_path"
19881  fi
19882
19883    # remove trailing .exe if any
19884    new_path="${new_path/%.exe/}"
19885
19886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19888  fi
19889
19890  else
19891    # We're on a posix platform. Hooray! :)
19892    # First separate the path from the arguments. This will split at the first
19893    # space.
19894    complete="$PROPER_COMPILER_CC"
19895    path="${complete%% *}"
19896    tmp="$complete EOL"
19897    arguments="${tmp#* }"
19898
19899    # Cannot rely on the command "which" here since it doesn't always work.
19900    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19901    if test -z "$is_absolute_path"; then
19902      # Path to executable is not absolute. Find it.
19903      IFS_save="$IFS"
19904      IFS=:
19905      for p in $PATH; do
19906        if test -f "$p/$path" && test -x "$p/$path"; then
19907          new_path="$p/$path"
19908          break
19909        fi
19910      done
19911      IFS="$IFS_save"
19912    else
19913      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19914$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19915      new_path="$path"
19916    fi
19917
19918    if test "x$new_path" = x; then
19919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19920$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19921        has_space=`$ECHO "$complete" | $GREP " "`
19922        if test "x$has_space" != x; then
19923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19925        fi
19926        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19927      fi
19928  fi
19929
19930      # Now join together the path and the arguments once again
19931      if test "x$arguments" != xEOL; then
19932        new_complete="$new_path ${arguments% *}"
19933      else
19934        new_complete="$new_path"
19935      fi
19936
19937  if test "x$complete" != "x$new_complete"; then
19938      PROPER_COMPILER_CC="$new_complete"
19939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19940$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19941    fi
19942
19943    PATH="$RETRY_COMPILER_SAVED_PATH"
19944
19945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19946$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19947
19948    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19949        # Follow a chain of symbolic links. Use readlink
19950        # where it exists, else fall back to horribly
19951        # complicated shell code.
19952        if test "x$READLINK_TESTED" != yes; then
19953            # On MacOSX there is a readlink tool with a different
19954            # purpose than the GNU readlink tool. Check the found readlink.
19955            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19956            if test "x$ISGNU" = x; then
19957                 # A readlink that we do not know how to use.
19958                 # Are there other non-GNU readlinks out there?
19959                 READLINK_TESTED=yes
19960                 READLINK=
19961            fi
19962        fi
19963
19964        if test "x$READLINK" != x; then
19965            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19966        else
19967            # Save the current directory for restoring afterwards
19968            STARTDIR=$PWD
19969            COUNTER=0
19970            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19971            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19972            cd $sym_link_dir
19973            # Use -P flag to resolve symlinks in directories.
19974            cd `$THEPWDCMD -P`
19975            sym_link_dir=`$THEPWDCMD -P`
19976            # Resolve file symlinks
19977            while test $COUNTER -lt 20; do
19978                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19979                if test "x$ISLINK" == x; then
19980                    # This is not a symbolic link! We are done!
19981                    break
19982                fi
19983                # Again resolve directory symlinks since the target of the just found
19984                # link could be in a different directory
19985                cd `$DIRNAME $ISLINK`
19986                sym_link_dir=`$THEPWDCMD -P`
19987                sym_link_file=`$BASENAME $ISLINK`
19988                let COUNTER=COUNTER+1
19989            done
19990            cd $STARTDIR
19991            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19992        fi
19993    fi
19994
19995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19996$as_echo "$PROPER_COMPILER_CC" >&6; }
19997    CC="$PROPER_COMPILER_CC"
19998  else
19999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20000$as_echo "no, keeping CC" >&6; }
20001    CC="$TEST_COMPILER"
20002  fi
20003
20004  COMPILER=$CC
20005  COMPILER_NAME=$COMPILER_NAME
20006
20007  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20008    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20009    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20010    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20011    if test $? -ne 0; then
20012      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20013
20014      { $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
20015$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20016      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20017$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20018      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20019    else
20020      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20021      COMPILER_VENDOR="Sun Studio"
20022    fi
20023  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20024    # First line typically looks something like:
20025    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20026    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20027    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20028    COMPILER_VENDOR="Microsoft CL.EXE"
20029    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20030    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20031      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20032        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20033      fi
20034    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20035      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20036        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20037      fi
20038    fi
20039  else
20040    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20041    # Check that this is likely to be GCC.
20042    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20043    if test $? -ne 0; then
20044      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20045$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20046      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20047$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20048      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20049    fi
20050
20051    # First line typically looks something like:
20052    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20053    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20054    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20055  fi
20056  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20057  CC_VERSION="$COMPILER_VERSION"
20058  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20059  CC_VENDOR="$COMPILER_VENDOR"
20060
20061  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20062$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20063
20064
20065# Now that we have resolved CC ourself, let autoconf have its go at it
20066ac_ext=c
20067ac_cpp='$CPP $CPPFLAGS'
20068ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20069ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20070ac_compiler_gnu=$ac_cv_c_compiler_gnu
20071if test -n "$ac_tool_prefix"; then
20072  for ac_prog in $CC
20073  do
20074    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20075set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20077$as_echo_n "checking for $ac_word... " >&6; }
20078if test "${ac_cv_prog_CC+set}" = set; then :
20079  $as_echo_n "(cached) " >&6
20080else
20081  if test -n "$CC"; then
20082  ac_cv_prog_CC="$CC" # Let the user override the test.
20083else
20084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20085for as_dir in $PATH
20086do
20087  IFS=$as_save_IFS
20088  test -z "$as_dir" && as_dir=.
20089    for ac_exec_ext in '' $ac_executable_extensions; do
20090  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20091    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20093    break 2
20094  fi
20095done
20096  done
20097IFS=$as_save_IFS
20098
20099fi
20100fi
20101CC=$ac_cv_prog_CC
20102if test -n "$CC"; then
20103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20104$as_echo "$CC" >&6; }
20105else
20106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20107$as_echo "no" >&6; }
20108fi
20109
20110
20111    test -n "$CC" && break
20112  done
20113fi
20114if test -z "$CC"; then
20115  ac_ct_CC=$CC
20116  for ac_prog in $CC
20117do
20118  # Extract the first word of "$ac_prog", so it can be a program name with args.
20119set dummy $ac_prog; ac_word=$2
20120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20121$as_echo_n "checking for $ac_word... " >&6; }
20122if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
20123  $as_echo_n "(cached) " >&6
20124else
20125  if test -n "$ac_ct_CC"; then
20126  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20127else
20128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20129for as_dir in $PATH
20130do
20131  IFS=$as_save_IFS
20132  test -z "$as_dir" && as_dir=.
20133    for ac_exec_ext in '' $ac_executable_extensions; do
20134  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20135    ac_cv_prog_ac_ct_CC="$ac_prog"
20136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20137    break 2
20138  fi
20139done
20140  done
20141IFS=$as_save_IFS
20142
20143fi
20144fi
20145ac_ct_CC=$ac_cv_prog_ac_ct_CC
20146if test -n "$ac_ct_CC"; then
20147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20148$as_echo "$ac_ct_CC" >&6; }
20149else
20150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20151$as_echo "no" >&6; }
20152fi
20153
20154
20155  test -n "$ac_ct_CC" && break
20156done
20157
20158  if test "x$ac_ct_CC" = x; then
20159    CC=""
20160  else
20161    case $cross_compiling:$ac_tool_warned in
20162yes:)
20163{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20165ac_tool_warned=yes ;;
20166esac
20167    CC=$ac_ct_CC
20168  fi
20169fi
20170
20171
20172test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20174as_fn_error $? "no acceptable C compiler found in \$PATH
20175See \`config.log' for more details" "$LINENO" 5 ; }
20176
20177# Provide some information about the compiler.
20178$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20179set X $ac_compile
20180ac_compiler=$2
20181for ac_option in --version -v -V -qversion; do
20182  { { ac_try="$ac_compiler $ac_option >&5"
20183case "(($ac_try" in
20184  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20185  *) ac_try_echo=$ac_try;;
20186esac
20187eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20188$as_echo "$ac_try_echo"; } >&5
20189  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20190  ac_status=$?
20191  if test -s conftest.err; then
20192    sed '10a\
20193... rest of stderr output deleted ...
20194         10q' conftest.err >conftest.er1
20195    cat conftest.er1 >&5
20196  fi
20197  rm -f conftest.er1 conftest.err
20198  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20199  test $ac_status = 0; }
20200done
20201
20202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20203/* end confdefs.h.  */
20204
20205int
20206main ()
20207{
20208
20209  ;
20210  return 0;
20211}
20212_ACEOF
20213ac_clean_files_save=$ac_clean_files
20214ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20215# Try to create an executable without -o first, disregard a.out.
20216# It will help us diagnose broken compilers, and finding out an intuition
20217# of exeext.
20218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20219$as_echo_n "checking whether the C compiler works... " >&6; }
20220ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20221
20222# The possible output files:
20223ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20224
20225ac_rmfiles=
20226for ac_file in $ac_files
20227do
20228  case $ac_file in
20229    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20230    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20231  esac
20232done
20233rm -f $ac_rmfiles
20234
20235if { { ac_try="$ac_link_default"
20236case "(($ac_try" in
20237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20238  *) ac_try_echo=$ac_try;;
20239esac
20240eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20241$as_echo "$ac_try_echo"; } >&5
20242  (eval "$ac_link_default") 2>&5
20243  ac_status=$?
20244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20245  test $ac_status = 0; }; then :
20246  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20247# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20248# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20249# so that the user can short-circuit this test for compilers unknown to
20250# Autoconf.
20251for ac_file in $ac_files ''
20252do
20253  test -f "$ac_file" || continue
20254  case $ac_file in
20255    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20256	;;
20257    [ab].out )
20258	# We found the default executable, but exeext='' is most
20259	# certainly right.
20260	break;;
20261    *.* )
20262	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20263	then :; else
20264	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20265	fi
20266	# We set ac_cv_exeext here because the later test for it is not
20267	# safe: cross compilers may not add the suffix if given an `-o'
20268	# argument, so we may need to know it at that point already.
20269	# Even if this section looks crufty: it has the advantage of
20270	# actually working.
20271	break;;
20272    * )
20273	break;;
20274  esac
20275done
20276test "$ac_cv_exeext" = no && ac_cv_exeext=
20277
20278else
20279  ac_file=''
20280fi
20281if test -z "$ac_file"; then :
20282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20283$as_echo "no" >&6; }
20284$as_echo "$as_me: failed program was:" >&5
20285sed 's/^/| /' conftest.$ac_ext >&5
20286
20287{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20289as_fn_error 77 "C compiler cannot create executables
20290See \`config.log' for more details" "$LINENO" 5 ; }
20291else
20292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20293$as_echo "yes" >&6; }
20294fi
20295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20296$as_echo_n "checking for C compiler default output file name... " >&6; }
20297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20298$as_echo "$ac_file" >&6; }
20299ac_exeext=$ac_cv_exeext
20300
20301rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20302ac_clean_files=$ac_clean_files_save
20303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20304$as_echo_n "checking for suffix of executables... " >&6; }
20305if { { ac_try="$ac_link"
20306case "(($ac_try" in
20307  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20308  *) ac_try_echo=$ac_try;;
20309esac
20310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20311$as_echo "$ac_try_echo"; } >&5
20312  (eval "$ac_link") 2>&5
20313  ac_status=$?
20314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20315  test $ac_status = 0; }; then :
20316  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20317# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20318# work properly (i.e., refer to `conftest.exe'), while it won't with
20319# `rm'.
20320for ac_file in conftest.exe conftest conftest.*; do
20321  test -f "$ac_file" || continue
20322  case $ac_file in
20323    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20324    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20325	  break;;
20326    * ) break;;
20327  esac
20328done
20329else
20330  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20332as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20333See \`config.log' for more details" "$LINENO" 5 ; }
20334fi
20335rm -f conftest conftest$ac_cv_exeext
20336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20337$as_echo "$ac_cv_exeext" >&6; }
20338
20339rm -f conftest.$ac_ext
20340EXEEXT=$ac_cv_exeext
20341ac_exeext=$EXEEXT
20342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20343/* end confdefs.h.  */
20344#include <stdio.h>
20345int
20346main ()
20347{
20348FILE *f = fopen ("conftest.out", "w");
20349 return ferror (f) || fclose (f) != 0;
20350
20351  ;
20352  return 0;
20353}
20354_ACEOF
20355ac_clean_files="$ac_clean_files conftest.out"
20356# Check that the compiler produces executables we can run.  If not, either
20357# the compiler is broken, or we cross compile.
20358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20359$as_echo_n "checking whether we are cross compiling... " >&6; }
20360if test "$cross_compiling" != yes; then
20361  { { ac_try="$ac_link"
20362case "(($ac_try" in
20363  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20364  *) ac_try_echo=$ac_try;;
20365esac
20366eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20367$as_echo "$ac_try_echo"; } >&5
20368  (eval "$ac_link") 2>&5
20369  ac_status=$?
20370  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20371  test $ac_status = 0; }
20372  if { ac_try='./conftest$ac_cv_exeext'
20373  { { case "(($ac_try" in
20374  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20375  *) ac_try_echo=$ac_try;;
20376esac
20377eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20378$as_echo "$ac_try_echo"; } >&5
20379  (eval "$ac_try") 2>&5
20380  ac_status=$?
20381  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20382  test $ac_status = 0; }; }; then
20383    cross_compiling=no
20384  else
20385    if test "$cross_compiling" = maybe; then
20386	cross_compiling=yes
20387    else
20388	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20389$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20390as_fn_error $? "cannot run C compiled programs.
20391If you meant to cross compile, use \`--host'.
20392See \`config.log' for more details" "$LINENO" 5 ; }
20393    fi
20394  fi
20395fi
20396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20397$as_echo "$cross_compiling" >&6; }
20398
20399rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20400ac_clean_files=$ac_clean_files_save
20401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20402$as_echo_n "checking for suffix of object files... " >&6; }
20403if test "${ac_cv_objext+set}" = set; then :
20404  $as_echo_n "(cached) " >&6
20405else
20406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20407/* end confdefs.h.  */
20408
20409int
20410main ()
20411{
20412
20413  ;
20414  return 0;
20415}
20416_ACEOF
20417rm -f conftest.o conftest.obj
20418if { { ac_try="$ac_compile"
20419case "(($ac_try" in
20420  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20421  *) ac_try_echo=$ac_try;;
20422esac
20423eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20424$as_echo "$ac_try_echo"; } >&5
20425  (eval "$ac_compile") 2>&5
20426  ac_status=$?
20427  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20428  test $ac_status = 0; }; then :
20429  for ac_file in conftest.o conftest.obj conftest.*; do
20430  test -f "$ac_file" || continue;
20431  case $ac_file in
20432    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20433    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20434       break;;
20435  esac
20436done
20437else
20438  $as_echo "$as_me: failed program was:" >&5
20439sed 's/^/| /' conftest.$ac_ext >&5
20440
20441{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20442$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20443as_fn_error $? "cannot compute suffix of object files: cannot compile
20444See \`config.log' for more details" "$LINENO" 5 ; }
20445fi
20446rm -f conftest.$ac_cv_objext conftest.$ac_ext
20447fi
20448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20449$as_echo "$ac_cv_objext" >&6; }
20450OBJEXT=$ac_cv_objext
20451ac_objext=$OBJEXT
20452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20453$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20454if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20455  $as_echo_n "(cached) " >&6
20456else
20457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20458/* end confdefs.h.  */
20459
20460int
20461main ()
20462{
20463#ifndef __GNUC__
20464       choke me
20465#endif
20466
20467  ;
20468  return 0;
20469}
20470_ACEOF
20471if ac_fn_c_try_compile "$LINENO"; then :
20472  ac_compiler_gnu=yes
20473else
20474  ac_compiler_gnu=no
20475fi
20476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20477ac_cv_c_compiler_gnu=$ac_compiler_gnu
20478
20479fi
20480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20481$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20482if test $ac_compiler_gnu = yes; then
20483  GCC=yes
20484else
20485  GCC=
20486fi
20487ac_test_CFLAGS=${CFLAGS+set}
20488ac_save_CFLAGS=$CFLAGS
20489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20490$as_echo_n "checking whether $CC accepts -g... " >&6; }
20491if test "${ac_cv_prog_cc_g+set}" = set; then :
20492  $as_echo_n "(cached) " >&6
20493else
20494  ac_save_c_werror_flag=$ac_c_werror_flag
20495   ac_c_werror_flag=yes
20496   ac_cv_prog_cc_g=no
20497   CFLAGS="-g"
20498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20499/* end confdefs.h.  */
20500
20501int
20502main ()
20503{
20504
20505  ;
20506  return 0;
20507}
20508_ACEOF
20509if ac_fn_c_try_compile "$LINENO"; then :
20510  ac_cv_prog_cc_g=yes
20511else
20512  CFLAGS=""
20513      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20514/* end confdefs.h.  */
20515
20516int
20517main ()
20518{
20519
20520  ;
20521  return 0;
20522}
20523_ACEOF
20524if ac_fn_c_try_compile "$LINENO"; then :
20525
20526else
20527  ac_c_werror_flag=$ac_save_c_werror_flag
20528	 CFLAGS="-g"
20529	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20530/* end confdefs.h.  */
20531
20532int
20533main ()
20534{
20535
20536  ;
20537  return 0;
20538}
20539_ACEOF
20540if ac_fn_c_try_compile "$LINENO"; then :
20541  ac_cv_prog_cc_g=yes
20542fi
20543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20544fi
20545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20546fi
20547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20548   ac_c_werror_flag=$ac_save_c_werror_flag
20549fi
20550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20551$as_echo "$ac_cv_prog_cc_g" >&6; }
20552if test "$ac_test_CFLAGS" = set; then
20553  CFLAGS=$ac_save_CFLAGS
20554elif test $ac_cv_prog_cc_g = yes; then
20555  if test "$GCC" = yes; then
20556    CFLAGS="-g -O2"
20557  else
20558    CFLAGS="-g"
20559  fi
20560else
20561  if test "$GCC" = yes; then
20562    CFLAGS="-O2"
20563  else
20564    CFLAGS=
20565  fi
20566fi
20567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20568$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20569if test "${ac_cv_prog_cc_c89+set}" = set; then :
20570  $as_echo_n "(cached) " >&6
20571else
20572  ac_cv_prog_cc_c89=no
20573ac_save_CC=$CC
20574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20575/* end confdefs.h.  */
20576#include <stdarg.h>
20577#include <stdio.h>
20578#include <sys/types.h>
20579#include <sys/stat.h>
20580/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20581struct buf { int x; };
20582FILE * (*rcsopen) (struct buf *, struct stat *, int);
20583static char *e (p, i)
20584     char **p;
20585     int i;
20586{
20587  return p[i];
20588}
20589static char *f (char * (*g) (char **, int), char **p, ...)
20590{
20591  char *s;
20592  va_list v;
20593  va_start (v,p);
20594  s = g (p, va_arg (v,int));
20595  va_end (v);
20596  return s;
20597}
20598
20599/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20600   function prototypes and stuff, but not '\xHH' hex character constants.
20601   These don't provoke an error unfortunately, instead are silently treated
20602   as 'x'.  The following induces an error, until -std is added to get
20603   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20604   array size at least.  It's necessary to write '\x00'==0 to get something
20605   that's true only with -std.  */
20606int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20607
20608/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20609   inside strings and character constants.  */
20610#define FOO(x) 'x'
20611int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20612
20613int test (int i, double x);
20614struct s1 {int (*f) (int a);};
20615struct s2 {int (*f) (double a);};
20616int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20617int argc;
20618char **argv;
20619int
20620main ()
20621{
20622return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20623  ;
20624  return 0;
20625}
20626_ACEOF
20627for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20628	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20629do
20630  CC="$ac_save_CC $ac_arg"
20631  if ac_fn_c_try_compile "$LINENO"; then :
20632  ac_cv_prog_cc_c89=$ac_arg
20633fi
20634rm -f core conftest.err conftest.$ac_objext
20635  test "x$ac_cv_prog_cc_c89" != "xno" && break
20636done
20637rm -f conftest.$ac_ext
20638CC=$ac_save_CC
20639
20640fi
20641# AC_CACHE_VAL
20642case "x$ac_cv_prog_cc_c89" in
20643  x)
20644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20645$as_echo "none needed" >&6; } ;;
20646  xno)
20647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20648$as_echo "unsupported" >&6; } ;;
20649  *)
20650    CC="$CC $ac_cv_prog_cc_c89"
20651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20652$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20653esac
20654if test "x$ac_cv_prog_cc_c89" != xno; then :
20655
20656fi
20657
20658ac_ext=cpp
20659ac_cpp='$CXXCPP $CPPFLAGS'
20660ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20661ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20662ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20663
20664
20665### Locate C++ compiler (CXX)
20666
20667if test "x$CXX" != x; then
20668  COMPILER_CHECK_LIST="$CXX"
20669elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20670  COMPILER_CHECK_LIST="cl"
20671elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20672  COMPILER_CHECK_LIST="CC g++"
20673else
20674  COMPILER_CHECK_LIST="g++ CC"
20675fi
20676
20677
20678  COMPILER_NAME=C++
20679
20680  CXX=
20681  # If TOOLS_DIR is set, check for all compiler names in there first
20682  # before checking the rest of the PATH.
20683  if test -n "$TOOLS_DIR"; then
20684    PATH_save="$PATH"
20685    PATH="$TOOLS_DIR"
20686    for ac_prog in $COMPILER_CHECK_LIST
20687do
20688  # Extract the first word of "$ac_prog", so it can be a program name with args.
20689set dummy $ac_prog; ac_word=$2
20690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20691$as_echo_n "checking for $ac_word... " >&6; }
20692if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20693  $as_echo_n "(cached) " >&6
20694else
20695  case $TOOLS_DIR_CXX in
20696  [\\/]* | ?:[\\/]*)
20697  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20698  ;;
20699  *)
20700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20701for as_dir in $PATH
20702do
20703  IFS=$as_save_IFS
20704  test -z "$as_dir" && as_dir=.
20705    for ac_exec_ext in '' $ac_executable_extensions; do
20706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20707    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20709    break 2
20710  fi
20711done
20712  done
20713IFS=$as_save_IFS
20714
20715  ;;
20716esac
20717fi
20718TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20719if test -n "$TOOLS_DIR_CXX"; then
20720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20721$as_echo "$TOOLS_DIR_CXX" >&6; }
20722else
20723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20724$as_echo "no" >&6; }
20725fi
20726
20727
20728  test -n "$TOOLS_DIR_CXX" && break
20729done
20730
20731    CXX=$TOOLS_DIR_CXX
20732    PATH="$PATH_save"
20733  fi
20734
20735  # AC_PATH_PROGS can't be run multiple times with the same variable,
20736  # so create a new name for this run.
20737  if test "x$CXX" = x; then
20738    for ac_prog in $COMPILER_CHECK_LIST
20739do
20740  # Extract the first word of "$ac_prog", so it can be a program name with args.
20741set dummy $ac_prog; ac_word=$2
20742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20743$as_echo_n "checking for $ac_word... " >&6; }
20744if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20745  $as_echo_n "(cached) " >&6
20746else
20747  case $POTENTIAL_CXX in
20748  [\\/]* | ?:[\\/]*)
20749  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20750  ;;
20751  *)
20752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20753for as_dir in $PATH
20754do
20755  IFS=$as_save_IFS
20756  test -z "$as_dir" && as_dir=.
20757    for ac_exec_ext in '' $ac_executable_extensions; do
20758  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20759    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20761    break 2
20762  fi
20763done
20764  done
20765IFS=$as_save_IFS
20766
20767  ;;
20768esac
20769fi
20770POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20771if test -n "$POTENTIAL_CXX"; then
20772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20773$as_echo "$POTENTIAL_CXX" >&6; }
20774else
20775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20776$as_echo "no" >&6; }
20777fi
20778
20779
20780  test -n "$POTENTIAL_CXX" && break
20781done
20782
20783    CXX=$POTENTIAL_CXX
20784  fi
20785
20786  if test "x$CXX" = x; then
20787
20788    # Print a helpful message on how to acquire the necessary build dependency.
20789    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20790    MISSING_DEPENDENCY=devkit
20791    PKGHANDLER_COMMAND=
20792
20793    case $PKGHANDLER in
20794	apt-get)
20795                apt_help     $MISSING_DEPENDENCY ;;
20796    yum)
20797                yum_help     $MISSING_DEPENDENCY ;;
20798	port)
20799                port_help    $MISSING_DEPENDENCY ;;
20800	pkgutil)
20801                pkgutil_help $MISSING_DEPENDENCY ;;
20802	pkgadd)
20803                pkgadd_help  $MISSING_DEPENDENCY ;;
20804    * )
20805      break ;;
20806    esac
20807
20808    if test "x$PKGHANDLER_COMMAND" != x; then
20809        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20810    fi
20811
20812      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20813  fi
20814
20815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20816
20817  # First separate the path from the arguments. This will split at the first
20818  # space.
20819  complete="$CXX"
20820  path="${complete%% *}"
20821  tmp="$complete EOL"
20822  arguments="${tmp#* }"
20823
20824  # Input might be given as Windows format, start by converting to
20825  # unix format.
20826  new_path=`$CYGPATH -u "$path"`
20827
20828  # Now try to locate executable using which
20829  new_path=`$WHICH "$new_path" 2> /dev/null`
20830  # bat and cmd files are not always considered executable in cygwin causing which
20831  # to not find them
20832  if test "x$new_path" = x \
20833           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20834           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20835    new_path=`$CYGPATH -u "$path"`
20836  fi
20837  if test "x$new_path" = x; then
20838    # Oops. Which didn't find the executable.
20839    # The splitting of arguments from the executable at a space might have been incorrect,
20840    # since paths with space are more likely in Windows. Give it another try with the whole
20841    # argument.
20842    path="$complete"
20843    arguments="EOL"
20844    new_path=`$CYGPATH -u "$path"`
20845    new_path=`$WHICH "$new_path" 2> /dev/null`
20846    # bat and cmd files are not always considered executable in cygwin causing which
20847    # to not find them
20848    if test "x$new_path" = x \
20849             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20850             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20851      new_path=`$CYGPATH -u "$path"`
20852    fi
20853    if test "x$new_path" = x; then
20854      # It's still not found. Now this is an unrecoverable error.
20855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20856$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20857      has_space=`$ECHO "$complete" | $GREP " "`
20858      if test "x$has_space" != x; then
20859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20861      fi
20862      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20863    fi
20864  fi
20865
20866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20869  # "foo.exe" is OK but "foo" is an error.
20870  #
20871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20872  # It is also a way to make sure we got the proper file name for the real test later on.
20873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20874  if test "x$test_shortpath" = x; then
20875    # Short path failed, file does not exist as specified.
20876    # Try adding .exe or .cmd
20877    if test -f "${new_path}.exe"; then
20878       input_to_shortpath="${new_path}.exe"
20879    elif test -f "${new_path}.cmd"; then
20880       input_to_shortpath="${new_path}.cmd"
20881    else
20882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20883$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20884      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20885$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20886      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20887    fi
20888  else
20889    input_to_shortpath="$new_path"
20890  fi
20891
20892  # Call helper function which possibly converts this using DOS-style short mode.
20893  # If so, the updated path is stored in $new_path.
20894  new_path="$input_to_shortpath"
20895
20896  input_path="$input_to_shortpath"
20897  # Check if we need to convert this using DOS-style short mode. If the path
20898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20899  # take no chances and rewrite it.
20900  # Note: m4 eats our [], so we need to use [ and ] instead.
20901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20902  if test "x$has_forbidden_chars" != x; then
20903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20907      # Going to short mode and back again did indeed matter. Since short mode is
20908      # case insensitive, let's make it lowercase to improve readability.
20909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20910      # Now convert it back to Unix-stile (cygpath)
20911      input_path=`$CYGPATH -u "$shortmode_path"`
20912      new_path="$input_path"
20913    fi
20914  fi
20915
20916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20917  if test "x$test_cygdrive_prefix" = x; then
20918    # As a simple fix, exclude /usr/bin since it's not a real path.
20919    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20921      # a path prefixed by /cygdrive for fixpath to work.
20922      new_path="$CYGWIN_ROOT_PATH$input_path"
20923    fi
20924  fi
20925
20926  # remove trailing .exe if any
20927  new_path="${new_path/%.exe/}"
20928
20929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20930
20931  # First separate the path from the arguments. This will split at the first
20932  # space.
20933  complete="$CXX"
20934  path="${complete%% *}"
20935  tmp="$complete EOL"
20936  arguments="${tmp#* }"
20937
20938  # Input might be given as Windows format, start by converting to
20939  # unix format.
20940  new_path="$path"
20941
20942  windows_path="$new_path"
20943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20944    unix_path=`$CYGPATH -u "$windows_path"`
20945    new_path="$unix_path"
20946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20948    new_path="$unix_path"
20949  fi
20950
20951
20952  # Now try to locate executable using which
20953  new_path=`$WHICH "$new_path" 2> /dev/null`
20954
20955  if test "x$new_path" = x; then
20956    # Oops. Which didn't find the executable.
20957    # The splitting of arguments from the executable at a space might have been incorrect,
20958    # since paths with space are more likely in Windows. Give it another try with the whole
20959    # argument.
20960    path="$complete"
20961    arguments="EOL"
20962    new_path="$path"
20963
20964  windows_path="$new_path"
20965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20966    unix_path=`$CYGPATH -u "$windows_path"`
20967    new_path="$unix_path"
20968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20970    new_path="$unix_path"
20971  fi
20972
20973
20974    new_path=`$WHICH "$new_path" 2> /dev/null`
20975
20976    if test "x$new_path" = x; then
20977      # It's still not found. Now this is an unrecoverable error.
20978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20979$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20980      has_space=`$ECHO "$complete" | $GREP " "`
20981      if test "x$has_space" != x; then
20982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20984      fi
20985      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20986    fi
20987  fi
20988
20989  # Now new_path has a complete unix path to the binary
20990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20991    # Keep paths in /bin as-is, but remove trailing .exe if any
20992    new_path="${new_path/%.exe/}"
20993    # Do not save /bin paths to all_fixpath_prefixes!
20994  else
20995    # Not in mixed or Windows style, start by that.
20996    new_path=`cmd //c echo $new_path`
20997
20998  input_path="$new_path"
20999  # Check if we need to convert this using DOS-style short mode. If the path
21000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21001  # take no chances and rewrite it.
21002  # Note: m4 eats our [], so we need to use [ and ] instead.
21003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21004  if test "x$has_forbidden_chars" != x; then
21005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21007  fi
21008
21009    # Output is in $new_path
21010
21011  windows_path="$new_path"
21012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21013    unix_path=`$CYGPATH -u "$windows_path"`
21014    new_path="$unix_path"
21015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21017    new_path="$unix_path"
21018  fi
21019
21020    # remove trailing .exe if any
21021    new_path="${new_path/%.exe/}"
21022
21023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21025  fi
21026
21027  else
21028    # We're on a posix platform. Hooray! :)
21029    # First separate the path from the arguments. This will split at the first
21030    # space.
21031    complete="$CXX"
21032    path="${complete%% *}"
21033    tmp="$complete EOL"
21034    arguments="${tmp#* }"
21035
21036    # Cannot rely on the command "which" here since it doesn't always work.
21037    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21038    if test -z "$is_absolute_path"; then
21039      # Path to executable is not absolute. Find it.
21040      IFS_save="$IFS"
21041      IFS=:
21042      for p in $PATH; do
21043        if test -f "$p/$path" && test -x "$p/$path"; then
21044          new_path="$p/$path"
21045          break
21046        fi
21047      done
21048      IFS="$IFS_save"
21049    else
21050      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21051$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21052      new_path="$path"
21053    fi
21054
21055    if test "x$new_path" = x; then
21056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21057$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21058        has_space=`$ECHO "$complete" | $GREP " "`
21059        if test "x$has_space" != x; then
21060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21062        fi
21063        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21064      fi
21065  fi
21066
21067      # Now join together the path and the arguments once again
21068      if test "x$arguments" != xEOL; then
21069        new_complete="$new_path ${arguments% *}"
21070      else
21071        new_complete="$new_path"
21072      fi
21073
21074  if test "x$complete" != "x$new_complete"; then
21075      CXX="$new_complete"
21076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21077$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21078    fi
21079
21080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21081$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21082  TEST_COMPILER="$CXX"
21083
21084    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21085        # Follow a chain of symbolic links. Use readlink
21086        # where it exists, else fall back to horribly
21087        # complicated shell code.
21088        if test "x$READLINK_TESTED" != yes; then
21089            # On MacOSX there is a readlink tool with a different
21090            # purpose than the GNU readlink tool. Check the found readlink.
21091            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21092            if test "x$ISGNU" = x; then
21093                 # A readlink that we do not know how to use.
21094                 # Are there other non-GNU readlinks out there?
21095                 READLINK_TESTED=yes
21096                 READLINK=
21097            fi
21098        fi
21099
21100        if test "x$READLINK" != x; then
21101            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21102        else
21103            # Save the current directory for restoring afterwards
21104            STARTDIR=$PWD
21105            COUNTER=0
21106            sym_link_dir=`$DIRNAME $TEST_COMPILER`
21107            sym_link_file=`$BASENAME $TEST_COMPILER`
21108            cd $sym_link_dir
21109            # Use -P flag to resolve symlinks in directories.
21110            cd `$THEPWDCMD -P`
21111            sym_link_dir=`$THEPWDCMD -P`
21112            # Resolve file symlinks
21113            while test $COUNTER -lt 20; do
21114                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21115                if test "x$ISLINK" == x; then
21116                    # This is not a symbolic link! We are done!
21117                    break
21118                fi
21119                # Again resolve directory symlinks since the target of the just found
21120                # link could be in a different directory
21121                cd `$DIRNAME $ISLINK`
21122                sym_link_dir=`$THEPWDCMD -P`
21123                sym_link_file=`$BASENAME $ISLINK`
21124                let COUNTER=COUNTER+1
21125            done
21126            cd $STARTDIR
21127            TEST_COMPILER=$sym_link_dir/$sym_link_file
21128        fi
21129    fi
21130
21131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21132$as_echo "$TEST_COMPILER" >&6; }
21133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21134$as_echo_n "checking if CXX is disguised ccache... " >&6; }
21135
21136  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21137  if test "x$COMPILER_BASENAME" = "xccache"; then
21138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21139$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21140    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21141    # We want to control ccache invocation ourselves, so ignore this cc and try
21142    # searching again.
21143
21144    # Remove the path to the fake ccache cc from the PATH
21145    RETRY_COMPILER_SAVED_PATH="$PATH"
21146    COMPILER_DIRNAME=`$DIRNAME $CXX`
21147    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21148
21149    # Try again looking for our compiler
21150    if test -n "$ac_tool_prefix"; then
21151  for ac_prog in $COMPILER_CHECK_LIST
21152  do
21153    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21154set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21156$as_echo_n "checking for $ac_word... " >&6; }
21157if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21158  $as_echo_n "(cached) " >&6
21159else
21160  if test -n "$PROPER_COMPILER_CXX"; then
21161  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21162else
21163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21164for as_dir in $PATH
21165do
21166  IFS=$as_save_IFS
21167  test -z "$as_dir" && as_dir=.
21168    for ac_exec_ext in '' $ac_executable_extensions; do
21169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21170    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21172    break 2
21173  fi
21174done
21175  done
21176IFS=$as_save_IFS
21177
21178fi
21179fi
21180PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21181if test -n "$PROPER_COMPILER_CXX"; then
21182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21183$as_echo "$PROPER_COMPILER_CXX" >&6; }
21184else
21185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21186$as_echo "no" >&6; }
21187fi
21188
21189
21190    test -n "$PROPER_COMPILER_CXX" && break
21191  done
21192fi
21193if test -z "$PROPER_COMPILER_CXX"; then
21194  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21195  for ac_prog in $COMPILER_CHECK_LIST
21196do
21197  # Extract the first word of "$ac_prog", so it can be a program name with args.
21198set dummy $ac_prog; ac_word=$2
21199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21200$as_echo_n "checking for $ac_word... " >&6; }
21201if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21202  $as_echo_n "(cached) " >&6
21203else
21204  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21205  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21206else
21207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21208for as_dir in $PATH
21209do
21210  IFS=$as_save_IFS
21211  test -z "$as_dir" && as_dir=.
21212    for ac_exec_ext in '' $ac_executable_extensions; do
21213  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21214    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21216    break 2
21217  fi
21218done
21219  done
21220IFS=$as_save_IFS
21221
21222fi
21223fi
21224ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21225if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21227$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21228else
21229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21230$as_echo "no" >&6; }
21231fi
21232
21233
21234  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21235done
21236
21237  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21238    PROPER_COMPILER_CXX=""
21239  else
21240    case $cross_compiling:$ac_tool_warned in
21241yes:)
21242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21244ac_tool_warned=yes ;;
21245esac
21246    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21247  fi
21248fi
21249
21250
21251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21252
21253  # First separate the path from the arguments. This will split at the first
21254  # space.
21255  complete="$PROPER_COMPILER_CXX"
21256  path="${complete%% *}"
21257  tmp="$complete EOL"
21258  arguments="${tmp#* }"
21259
21260  # Input might be given as Windows format, start by converting to
21261  # unix format.
21262  new_path=`$CYGPATH -u "$path"`
21263
21264  # Now try to locate executable using which
21265  new_path=`$WHICH "$new_path" 2> /dev/null`
21266  # bat and cmd files are not always considered executable in cygwin causing which
21267  # to not find them
21268  if test "x$new_path" = x \
21269           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21270           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21271    new_path=`$CYGPATH -u "$path"`
21272  fi
21273  if test "x$new_path" = x; then
21274    # Oops. Which didn't find the executable.
21275    # The splitting of arguments from the executable at a space might have been incorrect,
21276    # since paths with space are more likely in Windows. Give it another try with the whole
21277    # argument.
21278    path="$complete"
21279    arguments="EOL"
21280    new_path=`$CYGPATH -u "$path"`
21281    new_path=`$WHICH "$new_path" 2> /dev/null`
21282    # bat and cmd files are not always considered executable in cygwin causing which
21283    # to not find them
21284    if test "x$new_path" = x \
21285             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21286             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21287      new_path=`$CYGPATH -u "$path"`
21288    fi
21289    if test "x$new_path" = x; then
21290      # It's still not found. Now this is an unrecoverable error.
21291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21292$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21293      has_space=`$ECHO "$complete" | $GREP " "`
21294      if test "x$has_space" != x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21297      fi
21298      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21299    fi
21300  fi
21301
21302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21305  # "foo.exe" is OK but "foo" is an error.
21306  #
21307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21308  # It is also a way to make sure we got the proper file name for the real test later on.
21309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21310  if test "x$test_shortpath" = x; then
21311    # Short path failed, file does not exist as specified.
21312    # Try adding .exe or .cmd
21313    if test -f "${new_path}.exe"; then
21314       input_to_shortpath="${new_path}.exe"
21315    elif test -f "${new_path}.cmd"; then
21316       input_to_shortpath="${new_path}.cmd"
21317    else
21318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21319$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21322      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21323    fi
21324  else
21325    input_to_shortpath="$new_path"
21326  fi
21327
21328  # Call helper function which possibly converts this using DOS-style short mode.
21329  # If so, the updated path is stored in $new_path.
21330  new_path="$input_to_shortpath"
21331
21332  input_path="$input_to_shortpath"
21333  # Check if we need to convert this using DOS-style short mode. If the path
21334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21335  # take no chances and rewrite it.
21336  # Note: m4 eats our [], so we need to use [ and ] instead.
21337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21338  if test "x$has_forbidden_chars" != x; then
21339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21343      # Going to short mode and back again did indeed matter. Since short mode is
21344      # case insensitive, let's make it lowercase to improve readability.
21345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21346      # Now convert it back to Unix-stile (cygpath)
21347      input_path=`$CYGPATH -u "$shortmode_path"`
21348      new_path="$input_path"
21349    fi
21350  fi
21351
21352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21353  if test "x$test_cygdrive_prefix" = x; then
21354    # As a simple fix, exclude /usr/bin since it's not a real path.
21355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21357      # a path prefixed by /cygdrive for fixpath to work.
21358      new_path="$CYGWIN_ROOT_PATH$input_path"
21359    fi
21360  fi
21361
21362  # remove trailing .exe if any
21363  new_path="${new_path/%.exe/}"
21364
21365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21366
21367  # First separate the path from the arguments. This will split at the first
21368  # space.
21369  complete="$PROPER_COMPILER_CXX"
21370  path="${complete%% *}"
21371  tmp="$complete EOL"
21372  arguments="${tmp#* }"
21373
21374  # Input might be given as Windows format, start by converting to
21375  # unix format.
21376  new_path="$path"
21377
21378  windows_path="$new_path"
21379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21380    unix_path=`$CYGPATH -u "$windows_path"`
21381    new_path="$unix_path"
21382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21384    new_path="$unix_path"
21385  fi
21386
21387
21388  # Now try to locate executable using which
21389  new_path=`$WHICH "$new_path" 2> /dev/null`
21390
21391  if test "x$new_path" = x; then
21392    # Oops. Which didn't find the executable.
21393    # The splitting of arguments from the executable at a space might have been incorrect,
21394    # since paths with space are more likely in Windows. Give it another try with the whole
21395    # argument.
21396    path="$complete"
21397    arguments="EOL"
21398    new_path="$path"
21399
21400  windows_path="$new_path"
21401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21402    unix_path=`$CYGPATH -u "$windows_path"`
21403    new_path="$unix_path"
21404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21406    new_path="$unix_path"
21407  fi
21408
21409
21410    new_path=`$WHICH "$new_path" 2> /dev/null`
21411
21412    if test "x$new_path" = x; then
21413      # It's still not found. Now this is an unrecoverable error.
21414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21415$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21416      has_space=`$ECHO "$complete" | $GREP " "`
21417      if test "x$has_space" != x; then
21418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21420      fi
21421      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21422    fi
21423  fi
21424
21425  # Now new_path has a complete unix path to the binary
21426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21427    # Keep paths in /bin as-is, but remove trailing .exe if any
21428    new_path="${new_path/%.exe/}"
21429    # Do not save /bin paths to all_fixpath_prefixes!
21430  else
21431    # Not in mixed or Windows style, start by that.
21432    new_path=`cmd //c echo $new_path`
21433
21434  input_path="$new_path"
21435  # Check if we need to convert this using DOS-style short mode. If the path
21436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21437  # take no chances and rewrite it.
21438  # Note: m4 eats our [], so we need to use [ and ] instead.
21439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21440  if test "x$has_forbidden_chars" != x; then
21441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21443  fi
21444
21445    # Output is in $new_path
21446
21447  windows_path="$new_path"
21448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21449    unix_path=`$CYGPATH -u "$windows_path"`
21450    new_path="$unix_path"
21451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21453    new_path="$unix_path"
21454  fi
21455
21456    # remove trailing .exe if any
21457    new_path="${new_path/%.exe/}"
21458
21459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21461  fi
21462
21463  else
21464    # We're on a posix platform. Hooray! :)
21465    # First separate the path from the arguments. This will split at the first
21466    # space.
21467    complete="$PROPER_COMPILER_CXX"
21468    path="${complete%% *}"
21469    tmp="$complete EOL"
21470    arguments="${tmp#* }"
21471
21472    # Cannot rely on the command "which" here since it doesn't always work.
21473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21474    if test -z "$is_absolute_path"; then
21475      # Path to executable is not absolute. Find it.
21476      IFS_save="$IFS"
21477      IFS=:
21478      for p in $PATH; do
21479        if test -f "$p/$path" && test -x "$p/$path"; then
21480          new_path="$p/$path"
21481          break
21482        fi
21483      done
21484      IFS="$IFS_save"
21485    else
21486      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21487$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21488      new_path="$path"
21489    fi
21490
21491    if test "x$new_path" = x; then
21492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21493$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21494        has_space=`$ECHO "$complete" | $GREP " "`
21495        if test "x$has_space" != x; then
21496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21498        fi
21499        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21500      fi
21501  fi
21502
21503      # Now join together the path and the arguments once again
21504      if test "x$arguments" != xEOL; then
21505        new_complete="$new_path ${arguments% *}"
21506      else
21507        new_complete="$new_path"
21508      fi
21509
21510  if test "x$complete" != "x$new_complete"; then
21511      PROPER_COMPILER_CXX="$new_complete"
21512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21513$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21514    fi
21515
21516    PATH="$RETRY_COMPILER_SAVED_PATH"
21517
21518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21519$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21520
21521    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21522        # Follow a chain of symbolic links. Use readlink
21523        # where it exists, else fall back to horribly
21524        # complicated shell code.
21525        if test "x$READLINK_TESTED" != yes; then
21526            # On MacOSX there is a readlink tool with a different
21527            # purpose than the GNU readlink tool. Check the found readlink.
21528            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21529            if test "x$ISGNU" = x; then
21530                 # A readlink that we do not know how to use.
21531                 # Are there other non-GNU readlinks out there?
21532                 READLINK_TESTED=yes
21533                 READLINK=
21534            fi
21535        fi
21536
21537        if test "x$READLINK" != x; then
21538            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21539        else
21540            # Save the current directory for restoring afterwards
21541            STARTDIR=$PWD
21542            COUNTER=0
21543            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21544            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21545            cd $sym_link_dir
21546            # Use -P flag to resolve symlinks in directories.
21547            cd `$THEPWDCMD -P`
21548            sym_link_dir=`$THEPWDCMD -P`
21549            # Resolve file symlinks
21550            while test $COUNTER -lt 20; do
21551                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21552                if test "x$ISLINK" == x; then
21553                    # This is not a symbolic link! We are done!
21554                    break
21555                fi
21556                # Again resolve directory symlinks since the target of the just found
21557                # link could be in a different directory
21558                cd `$DIRNAME $ISLINK`
21559                sym_link_dir=`$THEPWDCMD -P`
21560                sym_link_file=`$BASENAME $ISLINK`
21561                let COUNTER=COUNTER+1
21562            done
21563            cd $STARTDIR
21564            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21565        fi
21566    fi
21567
21568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21569$as_echo "$PROPER_COMPILER_CXX" >&6; }
21570    CXX="$PROPER_COMPILER_CXX"
21571  else
21572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21573$as_echo "no, keeping CXX" >&6; }
21574    CXX="$TEST_COMPILER"
21575  fi
21576
21577  COMPILER=$CXX
21578  COMPILER_NAME=$COMPILER_NAME
21579
21580  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21581    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21582    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21583    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21584    if test $? -ne 0; then
21585      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21586
21587      { $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
21588$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21589      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21590$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21591      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21592    else
21593      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21594      COMPILER_VENDOR="Sun Studio"
21595    fi
21596  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21597    # First line typically looks something like:
21598    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21599    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21600    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21601    COMPILER_VENDOR="Microsoft CL.EXE"
21602    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21603    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21604      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21605        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21606      fi
21607    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21608      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21609        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21610      fi
21611    fi
21612  else
21613    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21614    # Check that this is likely to be GCC.
21615    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21616    if test $? -ne 0; then
21617      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21618$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21619      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21620$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21621      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21622    fi
21623
21624    # First line typically looks something like:
21625    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21626    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21627    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21628  fi
21629  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21630  CXX_VERSION="$COMPILER_VERSION"
21631  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21632  CXX_VENDOR="$COMPILER_VENDOR"
21633
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21635$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21636
21637
21638# Now that we have resolved CXX ourself, let autoconf have its go at it
21639ac_ext=cpp
21640ac_cpp='$CXXCPP $CPPFLAGS'
21641ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21642ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21643ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21644if test -z "$CXX"; then
21645  if test -n "$CCC"; then
21646    CXX=$CCC
21647  else
21648    if test -n "$ac_tool_prefix"; then
21649  for ac_prog in $CXX
21650  do
21651    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21652set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21654$as_echo_n "checking for $ac_word... " >&6; }
21655if test "${ac_cv_prog_CXX+set}" = set; then :
21656  $as_echo_n "(cached) " >&6
21657else
21658  if test -n "$CXX"; then
21659  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21660else
21661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21662for as_dir in $PATH
21663do
21664  IFS=$as_save_IFS
21665  test -z "$as_dir" && as_dir=.
21666    for ac_exec_ext in '' $ac_executable_extensions; do
21667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21668    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21670    break 2
21671  fi
21672done
21673  done
21674IFS=$as_save_IFS
21675
21676fi
21677fi
21678CXX=$ac_cv_prog_CXX
21679if test -n "$CXX"; then
21680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21681$as_echo "$CXX" >&6; }
21682else
21683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21684$as_echo "no" >&6; }
21685fi
21686
21687
21688    test -n "$CXX" && break
21689  done
21690fi
21691if test -z "$CXX"; then
21692  ac_ct_CXX=$CXX
21693  for ac_prog in $CXX
21694do
21695  # Extract the first word of "$ac_prog", so it can be a program name with args.
21696set dummy $ac_prog; ac_word=$2
21697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21698$as_echo_n "checking for $ac_word... " >&6; }
21699if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21700  $as_echo_n "(cached) " >&6
21701else
21702  if test -n "$ac_ct_CXX"; then
21703  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21704else
21705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21706for as_dir in $PATH
21707do
21708  IFS=$as_save_IFS
21709  test -z "$as_dir" && as_dir=.
21710    for ac_exec_ext in '' $ac_executable_extensions; do
21711  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21712    ac_cv_prog_ac_ct_CXX="$ac_prog"
21713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21714    break 2
21715  fi
21716done
21717  done
21718IFS=$as_save_IFS
21719
21720fi
21721fi
21722ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21723if test -n "$ac_ct_CXX"; then
21724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21725$as_echo "$ac_ct_CXX" >&6; }
21726else
21727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21728$as_echo "no" >&6; }
21729fi
21730
21731
21732  test -n "$ac_ct_CXX" && break
21733done
21734
21735  if test "x$ac_ct_CXX" = x; then
21736    CXX="g++"
21737  else
21738    case $cross_compiling:$ac_tool_warned in
21739yes:)
21740{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21741$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21742ac_tool_warned=yes ;;
21743esac
21744    CXX=$ac_ct_CXX
21745  fi
21746fi
21747
21748  fi
21749fi
21750# Provide some information about the compiler.
21751$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21752set X $ac_compile
21753ac_compiler=$2
21754for ac_option in --version -v -V -qversion; do
21755  { { ac_try="$ac_compiler $ac_option >&5"
21756case "(($ac_try" in
21757  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21758  *) ac_try_echo=$ac_try;;
21759esac
21760eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21761$as_echo "$ac_try_echo"; } >&5
21762  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21763  ac_status=$?
21764  if test -s conftest.err; then
21765    sed '10a\
21766... rest of stderr output deleted ...
21767         10q' conftest.err >conftest.er1
21768    cat conftest.er1 >&5
21769  fi
21770  rm -f conftest.er1 conftest.err
21771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21772  test $ac_status = 0; }
21773done
21774
21775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21776$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21777if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21778  $as_echo_n "(cached) " >&6
21779else
21780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21781/* end confdefs.h.  */
21782
21783int
21784main ()
21785{
21786#ifndef __GNUC__
21787       choke me
21788#endif
21789
21790  ;
21791  return 0;
21792}
21793_ACEOF
21794if ac_fn_cxx_try_compile "$LINENO"; then :
21795  ac_compiler_gnu=yes
21796else
21797  ac_compiler_gnu=no
21798fi
21799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21800ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21801
21802fi
21803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21804$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21805if test $ac_compiler_gnu = yes; then
21806  GXX=yes
21807else
21808  GXX=
21809fi
21810ac_test_CXXFLAGS=${CXXFLAGS+set}
21811ac_save_CXXFLAGS=$CXXFLAGS
21812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21813$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21814if test "${ac_cv_prog_cxx_g+set}" = set; then :
21815  $as_echo_n "(cached) " >&6
21816else
21817  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21818   ac_cxx_werror_flag=yes
21819   ac_cv_prog_cxx_g=no
21820   CXXFLAGS="-g"
21821   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21822/* end confdefs.h.  */
21823
21824int
21825main ()
21826{
21827
21828  ;
21829  return 0;
21830}
21831_ACEOF
21832if ac_fn_cxx_try_compile "$LINENO"; then :
21833  ac_cv_prog_cxx_g=yes
21834else
21835  CXXFLAGS=""
21836      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21837/* end confdefs.h.  */
21838
21839int
21840main ()
21841{
21842
21843  ;
21844  return 0;
21845}
21846_ACEOF
21847if ac_fn_cxx_try_compile "$LINENO"; then :
21848
21849else
21850  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21851	 CXXFLAGS="-g"
21852	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21853/* end confdefs.h.  */
21854
21855int
21856main ()
21857{
21858
21859  ;
21860  return 0;
21861}
21862_ACEOF
21863if ac_fn_cxx_try_compile "$LINENO"; then :
21864  ac_cv_prog_cxx_g=yes
21865fi
21866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21867fi
21868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21869fi
21870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21871   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21872fi
21873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21874$as_echo "$ac_cv_prog_cxx_g" >&6; }
21875if test "$ac_test_CXXFLAGS" = set; then
21876  CXXFLAGS=$ac_save_CXXFLAGS
21877elif test $ac_cv_prog_cxx_g = yes; then
21878  if test "$GXX" = yes; then
21879    CXXFLAGS="-g -O2"
21880  else
21881    CXXFLAGS="-g"
21882  fi
21883else
21884  if test "$GXX" = yes; then
21885    CXXFLAGS="-O2"
21886  else
21887    CXXFLAGS=
21888  fi
21889fi
21890ac_ext=cpp
21891ac_cpp='$CXXCPP $CPPFLAGS'
21892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21895
21896
21897### Locate other tools
21898
21899if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21900    ac_ext=m
21901ac_cpp='$OBJCPP $CPPFLAGS'
21902ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21903ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21904ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21905if test -n "$ac_tool_prefix"; then
21906  for ac_prog in gcc objcc objc cc CC
21907  do
21908    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21909set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21911$as_echo_n "checking for $ac_word... " >&6; }
21912if test "${ac_cv_prog_OBJC+set}" = set; then :
21913  $as_echo_n "(cached) " >&6
21914else
21915  if test -n "$OBJC"; then
21916  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21917else
21918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21919for as_dir in $PATH
21920do
21921  IFS=$as_save_IFS
21922  test -z "$as_dir" && as_dir=.
21923    for ac_exec_ext in '' $ac_executable_extensions; do
21924  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21925    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21927    break 2
21928  fi
21929done
21930  done
21931IFS=$as_save_IFS
21932
21933fi
21934fi
21935OBJC=$ac_cv_prog_OBJC
21936if test -n "$OBJC"; then
21937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21938$as_echo "$OBJC" >&6; }
21939else
21940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21941$as_echo "no" >&6; }
21942fi
21943
21944
21945    test -n "$OBJC" && break
21946  done
21947fi
21948if test -z "$OBJC"; then
21949  ac_ct_OBJC=$OBJC
21950  for ac_prog in gcc objcc objc cc CC
21951do
21952  # Extract the first word of "$ac_prog", so it can be a program name with args.
21953set dummy $ac_prog; ac_word=$2
21954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21955$as_echo_n "checking for $ac_word... " >&6; }
21956if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21957  $as_echo_n "(cached) " >&6
21958else
21959  if test -n "$ac_ct_OBJC"; then
21960  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21961else
21962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21963for as_dir in $PATH
21964do
21965  IFS=$as_save_IFS
21966  test -z "$as_dir" && as_dir=.
21967    for ac_exec_ext in '' $ac_executable_extensions; do
21968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21969    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21971    break 2
21972  fi
21973done
21974  done
21975IFS=$as_save_IFS
21976
21977fi
21978fi
21979ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21980if test -n "$ac_ct_OBJC"; then
21981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21982$as_echo "$ac_ct_OBJC" >&6; }
21983else
21984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21985$as_echo "no" >&6; }
21986fi
21987
21988
21989  test -n "$ac_ct_OBJC" && break
21990done
21991
21992  if test "x$ac_ct_OBJC" = x; then
21993    OBJC="gcc"
21994  else
21995    case $cross_compiling:$ac_tool_warned in
21996yes:)
21997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21999ac_tool_warned=yes ;;
22000esac
22001    OBJC=$ac_ct_OBJC
22002  fi
22003fi
22004
22005# Provide some information about the compiler.
22006$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22007set X $ac_compile
22008ac_compiler=$2
22009for ac_option in --version -v -V -qversion; do
22010  { { ac_try="$ac_compiler $ac_option >&5"
22011case "(($ac_try" in
22012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22013  *) ac_try_echo=$ac_try;;
22014esac
22015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22016$as_echo "$ac_try_echo"; } >&5
22017  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22018  ac_status=$?
22019  if test -s conftest.err; then
22020    sed '10a\
22021... rest of stderr output deleted ...
22022         10q' conftest.err >conftest.er1
22023    cat conftest.er1 >&5
22024  fi
22025  rm -f conftest.er1 conftest.err
22026  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22027  test $ac_status = 0; }
22028done
22029
22030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22031$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22032if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
22033  $as_echo_n "(cached) " >&6
22034else
22035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22036/* end confdefs.h.  */
22037
22038int
22039main ()
22040{
22041#ifndef __GNUC__
22042       choke me
22043#endif
22044
22045  ;
22046  return 0;
22047}
22048_ACEOF
22049if ac_fn_objc_try_compile "$LINENO"; then :
22050  ac_compiler_gnu=yes
22051else
22052  ac_compiler_gnu=no
22053fi
22054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22055ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22056
22057fi
22058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22059$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22060if test $ac_compiler_gnu = yes; then
22061  GOBJC=yes
22062else
22063  GOBJC=
22064fi
22065ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22066ac_save_OBJCFLAGS=$OBJCFLAGS
22067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22068$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22069if test "${ac_cv_prog_objc_g+set}" = set; then :
22070  $as_echo_n "(cached) " >&6
22071else
22072  ac_save_objc_werror_flag=$ac_objc_werror_flag
22073   ac_objc_werror_flag=yes
22074   ac_cv_prog_objc_g=no
22075   OBJCFLAGS="-g"
22076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22077/* end confdefs.h.  */
22078
22079int
22080main ()
22081{
22082
22083  ;
22084  return 0;
22085}
22086_ACEOF
22087if ac_fn_objc_try_compile "$LINENO"; then :
22088  ac_cv_prog_objc_g=yes
22089else
22090  OBJCFLAGS=""
22091      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22092/* end confdefs.h.  */
22093
22094int
22095main ()
22096{
22097
22098  ;
22099  return 0;
22100}
22101_ACEOF
22102if ac_fn_objc_try_compile "$LINENO"; then :
22103
22104else
22105  ac_objc_werror_flag=$ac_save_objc_werror_flag
22106	 OBJCFLAGS="-g"
22107	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22108/* end confdefs.h.  */
22109
22110int
22111main ()
22112{
22113
22114  ;
22115  return 0;
22116}
22117_ACEOF
22118if ac_fn_objc_try_compile "$LINENO"; then :
22119  ac_cv_prog_objc_g=yes
22120fi
22121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22122fi
22123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22124fi
22125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22126   ac_objc_werror_flag=$ac_save_objc_werror_flag
22127fi
22128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22129$as_echo "$ac_cv_prog_objc_g" >&6; }
22130if test "$ac_test_OBJCFLAGS" = set; then
22131  OBJCFLAGS=$ac_save_OBJCFLAGS
22132elif test $ac_cv_prog_objc_g = yes; then
22133  if test "$GOBJC" = yes; then
22134    OBJCFLAGS="-g -O2"
22135  else
22136    OBJCFLAGS="-g"
22137  fi
22138else
22139  if test "$GOBJC" = yes; then
22140    OBJCFLAGS="-O2"
22141  else
22142    OBJCFLAGS=
22143  fi
22144fi
22145ac_ext=cpp
22146ac_cpp='$CXXCPP $CPPFLAGS'
22147ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22148ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22149ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22150
22151
22152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22153
22154  # First separate the path from the arguments. This will split at the first
22155  # space.
22156  complete="$OBJC"
22157  path="${complete%% *}"
22158  tmp="$complete EOL"
22159  arguments="${tmp#* }"
22160
22161  # Input might be given as Windows format, start by converting to
22162  # unix format.
22163  new_path=`$CYGPATH -u "$path"`
22164
22165  # Now try to locate executable using which
22166  new_path=`$WHICH "$new_path" 2> /dev/null`
22167  # bat and cmd files are not always considered executable in cygwin causing which
22168  # to not find them
22169  if test "x$new_path" = x \
22170           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22171           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22172    new_path=`$CYGPATH -u "$path"`
22173  fi
22174  if test "x$new_path" = x; then
22175    # Oops. Which didn't find the executable.
22176    # The splitting of arguments from the executable at a space might have been incorrect,
22177    # since paths with space are more likely in Windows. Give it another try with the whole
22178    # argument.
22179    path="$complete"
22180    arguments="EOL"
22181    new_path=`$CYGPATH -u "$path"`
22182    new_path=`$WHICH "$new_path" 2> /dev/null`
22183    # bat and cmd files are not always considered executable in cygwin causing which
22184    # to not find them
22185    if test "x$new_path" = x \
22186             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22187             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22188      new_path=`$CYGPATH -u "$path"`
22189    fi
22190    if test "x$new_path" = x; then
22191      # It's still not found. Now this is an unrecoverable error.
22192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22193$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22194      has_space=`$ECHO "$complete" | $GREP " "`
22195      if test "x$has_space" != x; then
22196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22198      fi
22199      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22200    fi
22201  fi
22202
22203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22206  # "foo.exe" is OK but "foo" is an error.
22207  #
22208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22209  # It is also a way to make sure we got the proper file name for the real test later on.
22210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22211  if test "x$test_shortpath" = x; then
22212    # Short path failed, file does not exist as specified.
22213    # Try adding .exe or .cmd
22214    if test -f "${new_path}.exe"; then
22215       input_to_shortpath="${new_path}.exe"
22216    elif test -f "${new_path}.cmd"; then
22217       input_to_shortpath="${new_path}.cmd"
22218    else
22219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22220$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22221      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22222$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22223      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22224    fi
22225  else
22226    input_to_shortpath="$new_path"
22227  fi
22228
22229  # Call helper function which possibly converts this using DOS-style short mode.
22230  # If so, the updated path is stored in $new_path.
22231  new_path="$input_to_shortpath"
22232
22233  input_path="$input_to_shortpath"
22234  # Check if we need to convert this using DOS-style short mode. If the path
22235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22236  # take no chances and rewrite it.
22237  # Note: m4 eats our [], so we need to use [ and ] instead.
22238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22239  if test "x$has_forbidden_chars" != x; then
22240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22244      # Going to short mode and back again did indeed matter. Since short mode is
22245      # case insensitive, let's make it lowercase to improve readability.
22246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22247      # Now convert it back to Unix-stile (cygpath)
22248      input_path=`$CYGPATH -u "$shortmode_path"`
22249      new_path="$input_path"
22250    fi
22251  fi
22252
22253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22254  if test "x$test_cygdrive_prefix" = x; then
22255    # As a simple fix, exclude /usr/bin since it's not a real path.
22256    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22258      # a path prefixed by /cygdrive for fixpath to work.
22259      new_path="$CYGWIN_ROOT_PATH$input_path"
22260    fi
22261  fi
22262
22263  # remove trailing .exe if any
22264  new_path="${new_path/%.exe/}"
22265
22266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22267
22268  # First separate the path from the arguments. This will split at the first
22269  # space.
22270  complete="$OBJC"
22271  path="${complete%% *}"
22272  tmp="$complete EOL"
22273  arguments="${tmp#* }"
22274
22275  # Input might be given as Windows format, start by converting to
22276  # unix format.
22277  new_path="$path"
22278
22279  windows_path="$new_path"
22280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22281    unix_path=`$CYGPATH -u "$windows_path"`
22282    new_path="$unix_path"
22283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22285    new_path="$unix_path"
22286  fi
22287
22288
22289  # Now try to locate executable using which
22290  new_path=`$WHICH "$new_path" 2> /dev/null`
22291
22292  if test "x$new_path" = x; then
22293    # Oops. Which didn't find the executable.
22294    # The splitting of arguments from the executable at a space might have been incorrect,
22295    # since paths with space are more likely in Windows. Give it another try with the whole
22296    # argument.
22297    path="$complete"
22298    arguments="EOL"
22299    new_path="$path"
22300
22301  windows_path="$new_path"
22302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22303    unix_path=`$CYGPATH -u "$windows_path"`
22304    new_path="$unix_path"
22305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22307    new_path="$unix_path"
22308  fi
22309
22310
22311    new_path=`$WHICH "$new_path" 2> /dev/null`
22312
22313    if test "x$new_path" = x; then
22314      # It's still not found. Now this is an unrecoverable error.
22315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22316$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22317      has_space=`$ECHO "$complete" | $GREP " "`
22318      if test "x$has_space" != x; then
22319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22321      fi
22322      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22323    fi
22324  fi
22325
22326  # Now new_path has a complete unix path to the binary
22327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22328    # Keep paths in /bin as-is, but remove trailing .exe if any
22329    new_path="${new_path/%.exe/}"
22330    # Do not save /bin paths to all_fixpath_prefixes!
22331  else
22332    # Not in mixed or Windows style, start by that.
22333    new_path=`cmd //c echo $new_path`
22334
22335  input_path="$new_path"
22336  # Check if we need to convert this using DOS-style short mode. If the path
22337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22338  # take no chances and rewrite it.
22339  # Note: m4 eats our [], so we need to use [ and ] instead.
22340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22341  if test "x$has_forbidden_chars" != x; then
22342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22344  fi
22345
22346    # Output is in $new_path
22347
22348  windows_path="$new_path"
22349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22350    unix_path=`$CYGPATH -u "$windows_path"`
22351    new_path="$unix_path"
22352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22354    new_path="$unix_path"
22355  fi
22356
22357    # remove trailing .exe if any
22358    new_path="${new_path/%.exe/}"
22359
22360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22362  fi
22363
22364  else
22365    # We're on a posix platform. Hooray! :)
22366    # First separate the path from the arguments. This will split at the first
22367    # space.
22368    complete="$OBJC"
22369    path="${complete%% *}"
22370    tmp="$complete EOL"
22371    arguments="${tmp#* }"
22372
22373    # Cannot rely on the command "which" here since it doesn't always work.
22374    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22375    if test -z "$is_absolute_path"; then
22376      # Path to executable is not absolute. Find it.
22377      IFS_save="$IFS"
22378      IFS=:
22379      for p in $PATH; do
22380        if test -f "$p/$path" && test -x "$p/$path"; then
22381          new_path="$p/$path"
22382          break
22383        fi
22384      done
22385      IFS="$IFS_save"
22386    else
22387      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22388$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22389      new_path="$path"
22390    fi
22391
22392    if test "x$new_path" = x; then
22393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22394$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22395        has_space=`$ECHO "$complete" | $GREP " "`
22396        if test "x$has_space" != x; then
22397          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22398$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22399        fi
22400        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22401      fi
22402  fi
22403
22404      # Now join together the path and the arguments once again
22405      if test "x$arguments" != xEOL; then
22406        new_complete="$new_path ${arguments% *}"
22407      else
22408        new_complete="$new_path"
22409      fi
22410
22411  if test "x$complete" != "x$new_complete"; then
22412      OBJC="$new_complete"
22413      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22414$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22415    fi
22416
22417else
22418    OBJC=
22419fi
22420
22421# Restore the flags to the user specified values.
22422# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22423CFLAGS="$ORG_CFLAGS"
22424CXXFLAGS="$ORG_CXXFLAGS"
22425OBJCFLAGS="$ORG_OBJCFLAGS"
22426
22427LD="$CC"
22428LDEXE="$CC"
22429LDCXX="$CXX"
22430LDEXECXX="$CXX"
22431
22432# LDEXE is the linker to use, when creating executables.
22433
22434# Linking C++ libraries.
22435
22436# Linking C++ executables.
22437
22438
22439if test "x$OPENJDK_TARGET_OS" != xwindows; then
22440    if test -n "$ac_tool_prefix"; then
22441  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22442set dummy ${ac_tool_prefix}ar; ac_word=$2
22443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22444$as_echo_n "checking for $ac_word... " >&6; }
22445if test "${ac_cv_prog_AR+set}" = set; then :
22446  $as_echo_n "(cached) " >&6
22447else
22448  if test -n "$AR"; then
22449  ac_cv_prog_AR="$AR" # Let the user override the test.
22450else
22451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22452for as_dir in $PATH
22453do
22454  IFS=$as_save_IFS
22455  test -z "$as_dir" && as_dir=.
22456    for ac_exec_ext in '' $ac_executable_extensions; do
22457  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22458    ac_cv_prog_AR="${ac_tool_prefix}ar"
22459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22460    break 2
22461  fi
22462done
22463  done
22464IFS=$as_save_IFS
22465
22466fi
22467fi
22468AR=$ac_cv_prog_AR
22469if test -n "$AR"; then
22470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22471$as_echo "$AR" >&6; }
22472else
22473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22474$as_echo "no" >&6; }
22475fi
22476
22477
22478fi
22479if test -z "$ac_cv_prog_AR"; then
22480  ac_ct_AR=$AR
22481  # Extract the first word of "ar", so it can be a program name with args.
22482set dummy ar; ac_word=$2
22483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22484$as_echo_n "checking for $ac_word... " >&6; }
22485if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22486  $as_echo_n "(cached) " >&6
22487else
22488  if test -n "$ac_ct_AR"; then
22489  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22490else
22491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22492for as_dir in $PATH
22493do
22494  IFS=$as_save_IFS
22495  test -z "$as_dir" && as_dir=.
22496    for ac_exec_ext in '' $ac_executable_extensions; do
22497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22498    ac_cv_prog_ac_ct_AR="ar"
22499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22500    break 2
22501  fi
22502done
22503  done
22504IFS=$as_save_IFS
22505
22506fi
22507fi
22508ac_ct_AR=$ac_cv_prog_ac_ct_AR
22509if test -n "$ac_ct_AR"; then
22510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22511$as_echo "$ac_ct_AR" >&6; }
22512else
22513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22514$as_echo "no" >&6; }
22515fi
22516
22517  if test "x$ac_ct_AR" = x; then
22518    AR=""
22519  else
22520    case $cross_compiling:$ac_tool_warned in
22521yes:)
22522{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22523$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22524ac_tool_warned=yes ;;
22525esac
22526    AR=$ac_ct_AR
22527  fi
22528else
22529  AR="$ac_cv_prog_AR"
22530fi
22531
22532
22533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22534
22535  # First separate the path from the arguments. This will split at the first
22536  # space.
22537  complete="$AR"
22538  path="${complete%% *}"
22539  tmp="$complete EOL"
22540  arguments="${tmp#* }"
22541
22542  # Input might be given as Windows format, start by converting to
22543  # unix format.
22544  new_path=`$CYGPATH -u "$path"`
22545
22546  # Now try to locate executable using which
22547  new_path=`$WHICH "$new_path" 2> /dev/null`
22548  # bat and cmd files are not always considered executable in cygwin causing which
22549  # to not find them
22550  if test "x$new_path" = x \
22551           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22552           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22553    new_path=`$CYGPATH -u "$path"`
22554  fi
22555  if test "x$new_path" = x; then
22556    # Oops. Which didn't find the executable.
22557    # The splitting of arguments from the executable at a space might have been incorrect,
22558    # since paths with space are more likely in Windows. Give it another try with the whole
22559    # argument.
22560    path="$complete"
22561    arguments="EOL"
22562    new_path=`$CYGPATH -u "$path"`
22563    new_path=`$WHICH "$new_path" 2> /dev/null`
22564    # bat and cmd files are not always considered executable in cygwin causing which
22565    # to not find them
22566    if test "x$new_path" = x \
22567             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22568             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22569      new_path=`$CYGPATH -u "$path"`
22570    fi
22571    if test "x$new_path" = x; then
22572      # It's still not found. Now this is an unrecoverable error.
22573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22574$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22575      has_space=`$ECHO "$complete" | $GREP " "`
22576      if test "x$has_space" != x; then
22577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22579      fi
22580      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22581    fi
22582  fi
22583
22584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22587  # "foo.exe" is OK but "foo" is an error.
22588  #
22589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22590  # It is also a way to make sure we got the proper file name for the real test later on.
22591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22592  if test "x$test_shortpath" = x; then
22593    # Short path failed, file does not exist as specified.
22594    # Try adding .exe or .cmd
22595    if test -f "${new_path}.exe"; then
22596       input_to_shortpath="${new_path}.exe"
22597    elif test -f "${new_path}.cmd"; then
22598       input_to_shortpath="${new_path}.cmd"
22599    else
22600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22601$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22604      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22605    fi
22606  else
22607    input_to_shortpath="$new_path"
22608  fi
22609
22610  # Call helper function which possibly converts this using DOS-style short mode.
22611  # If so, the updated path is stored in $new_path.
22612  new_path="$input_to_shortpath"
22613
22614  input_path="$input_to_shortpath"
22615  # Check if we need to convert this using DOS-style short mode. If the path
22616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22617  # take no chances and rewrite it.
22618  # Note: m4 eats our [], so we need to use [ and ] instead.
22619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22620  if test "x$has_forbidden_chars" != x; then
22621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22625      # Going to short mode and back again did indeed matter. Since short mode is
22626      # case insensitive, let's make it lowercase to improve readability.
22627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22628      # Now convert it back to Unix-stile (cygpath)
22629      input_path=`$CYGPATH -u "$shortmode_path"`
22630      new_path="$input_path"
22631    fi
22632  fi
22633
22634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22635  if test "x$test_cygdrive_prefix" = x; then
22636    # As a simple fix, exclude /usr/bin since it's not a real path.
22637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22639      # a path prefixed by /cygdrive for fixpath to work.
22640      new_path="$CYGWIN_ROOT_PATH$input_path"
22641    fi
22642  fi
22643
22644  # remove trailing .exe if any
22645  new_path="${new_path/%.exe/}"
22646
22647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22648
22649  # First separate the path from the arguments. This will split at the first
22650  # space.
22651  complete="$AR"
22652  path="${complete%% *}"
22653  tmp="$complete EOL"
22654  arguments="${tmp#* }"
22655
22656  # Input might be given as Windows format, start by converting to
22657  # unix format.
22658  new_path="$path"
22659
22660  windows_path="$new_path"
22661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22662    unix_path=`$CYGPATH -u "$windows_path"`
22663    new_path="$unix_path"
22664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22666    new_path="$unix_path"
22667  fi
22668
22669
22670  # Now try to locate executable using which
22671  new_path=`$WHICH "$new_path" 2> /dev/null`
22672
22673  if test "x$new_path" = x; then
22674    # Oops. Which didn't find the executable.
22675    # The splitting of arguments from the executable at a space might have been incorrect,
22676    # since paths with space are more likely in Windows. Give it another try with the whole
22677    # argument.
22678    path="$complete"
22679    arguments="EOL"
22680    new_path="$path"
22681
22682  windows_path="$new_path"
22683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22684    unix_path=`$CYGPATH -u "$windows_path"`
22685    new_path="$unix_path"
22686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22688    new_path="$unix_path"
22689  fi
22690
22691
22692    new_path=`$WHICH "$new_path" 2> /dev/null`
22693
22694    if test "x$new_path" = x; then
22695      # It's still not found. Now this is an unrecoverable error.
22696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22697$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22698      has_space=`$ECHO "$complete" | $GREP " "`
22699      if test "x$has_space" != x; then
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22702      fi
22703      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22704    fi
22705  fi
22706
22707  # Now new_path has a complete unix path to the binary
22708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22709    # Keep paths in /bin as-is, but remove trailing .exe if any
22710    new_path="${new_path/%.exe/}"
22711    # Do not save /bin paths to all_fixpath_prefixes!
22712  else
22713    # Not in mixed or Windows style, start by that.
22714    new_path=`cmd //c echo $new_path`
22715
22716  input_path="$new_path"
22717  # Check if we need to convert this using DOS-style short mode. If the path
22718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22719  # take no chances and rewrite it.
22720  # Note: m4 eats our [], so we need to use [ and ] instead.
22721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22722  if test "x$has_forbidden_chars" != x; then
22723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22725  fi
22726
22727    # Output is in $new_path
22728
22729  windows_path="$new_path"
22730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22731    unix_path=`$CYGPATH -u "$windows_path"`
22732    new_path="$unix_path"
22733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22735    new_path="$unix_path"
22736  fi
22737
22738    # remove trailing .exe if any
22739    new_path="${new_path/%.exe/}"
22740
22741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22743  fi
22744
22745  else
22746    # We're on a posix platform. Hooray! :)
22747    # First separate the path from the arguments. This will split at the first
22748    # space.
22749    complete="$AR"
22750    path="${complete%% *}"
22751    tmp="$complete EOL"
22752    arguments="${tmp#* }"
22753
22754    # Cannot rely on the command "which" here since it doesn't always work.
22755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22756    if test -z "$is_absolute_path"; then
22757      # Path to executable is not absolute. Find it.
22758      IFS_save="$IFS"
22759      IFS=:
22760      for p in $PATH; do
22761        if test -f "$p/$path" && test -x "$p/$path"; then
22762          new_path="$p/$path"
22763          break
22764        fi
22765      done
22766      IFS="$IFS_save"
22767    else
22768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22769$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22770      new_path="$path"
22771    fi
22772
22773    if test "x$new_path" = x; then
22774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22775$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22776        has_space=`$ECHO "$complete" | $GREP " "`
22777        if test "x$has_space" != x; then
22778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22780        fi
22781        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22782      fi
22783  fi
22784
22785      # Now join together the path and the arguments once again
22786      if test "x$arguments" != xEOL; then
22787        new_complete="$new_path ${arguments% *}"
22788      else
22789        new_complete="$new_path"
22790      fi
22791
22792  if test "x$complete" != "x$new_complete"; then
22793      AR="$new_complete"
22794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22795$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22796    fi
22797
22798fi
22799if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22800    ARFLAGS="-r"
22801else
22802    ARFLAGS=""
22803fi
22804
22805
22806# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22807HOTSPOT_CXX="$CXX"
22808HOTSPOT_LD="$LD"
22809
22810
22811
22812COMPILER_NAME=gcc
22813COMPILER_TYPE=CC
22814if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22815
22816    # For now, assume that we are always compiling using cl.exe.
22817    CC_OUT_OPTION=-Fo
22818    EXE_OUT_OPTION=-out:
22819    LD_OUT_OPTION=-out:
22820    AR_OUT_OPTION=-out:
22821    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22822    # program for something completely different.
22823    # Extract the first word of "link", so it can be a program name with args.
22824set dummy link; ac_word=$2
22825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22826$as_echo_n "checking for $ac_word... " >&6; }
22827if test "${ac_cv_prog_WINLD+set}" = set; then :
22828  $as_echo_n "(cached) " >&6
22829else
22830  if test -n "$WINLD"; then
22831  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22832else
22833  ac_prog_rejected=no
22834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22835for as_dir in $PATH
22836do
22837  IFS=$as_save_IFS
22838  test -z "$as_dir" && as_dir=.
22839    for ac_exec_ext in '' $ac_executable_extensions; do
22840  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22841    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22842       ac_prog_rejected=yes
22843       continue
22844     fi
22845    ac_cv_prog_WINLD="link"
22846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22847    break 2
22848  fi
22849done
22850  done
22851IFS=$as_save_IFS
22852
22853if test $ac_prog_rejected = yes; then
22854  # We found a bogon in the path, so make sure we never use it.
22855  set dummy $ac_cv_prog_WINLD
22856  shift
22857  if test $# != 0; then
22858    # We chose a different compiler from the bogus one.
22859    # However, it has the same basename, so the bogon will be chosen
22860    # first if we set WINLD to just the basename; use the full file name.
22861    shift
22862    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22863  fi
22864fi
22865fi
22866fi
22867WINLD=$ac_cv_prog_WINLD
22868if test -n "$WINLD"; then
22869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22870$as_echo "$WINLD" >&6; }
22871else
22872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22873$as_echo "no" >&6; }
22874fi
22875
22876
22877    # Since we must ignore the first found link, WINLD will contain
22878    # the full path to the link.exe program.
22879
22880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22881
22882  # First separate the path from the arguments. This will split at the first
22883  # space.
22884  complete="$WINLD"
22885  path="${complete%% *}"
22886  tmp="$complete EOL"
22887  arguments="${tmp#* }"
22888
22889  # Input might be given as Windows format, start by converting to
22890  # unix format.
22891  new_path=`$CYGPATH -u "$path"`
22892
22893  # Now try to locate executable using which
22894  new_path=`$WHICH "$new_path" 2> /dev/null`
22895  # bat and cmd files are not always considered executable in cygwin causing which
22896  # to not find them
22897  if test "x$new_path" = x \
22898           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22899           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22900    new_path=`$CYGPATH -u "$path"`
22901  fi
22902  if test "x$new_path" = x; then
22903    # Oops. Which didn't find the executable.
22904    # The splitting of arguments from the executable at a space might have been incorrect,
22905    # since paths with space are more likely in Windows. Give it another try with the whole
22906    # argument.
22907    path="$complete"
22908    arguments="EOL"
22909    new_path=`$CYGPATH -u "$path"`
22910    new_path=`$WHICH "$new_path" 2> /dev/null`
22911    # bat and cmd files are not always considered executable in cygwin causing which
22912    # to not find them
22913    if test "x$new_path" = x \
22914             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22915             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22916      new_path=`$CYGPATH -u "$path"`
22917    fi
22918    if test "x$new_path" = x; then
22919      # It's still not found. Now this is an unrecoverable error.
22920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22921$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22922      has_space=`$ECHO "$complete" | $GREP " "`
22923      if test "x$has_space" != x; then
22924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22926      fi
22927      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22928    fi
22929  fi
22930
22931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22934  # "foo.exe" is OK but "foo" is an error.
22935  #
22936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22937  # It is also a way to make sure we got the proper file name for the real test later on.
22938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22939  if test "x$test_shortpath" = x; then
22940    # Short path failed, file does not exist as specified.
22941    # Try adding .exe or .cmd
22942    if test -f "${new_path}.exe"; then
22943       input_to_shortpath="${new_path}.exe"
22944    elif test -f "${new_path}.cmd"; then
22945       input_to_shortpath="${new_path}.cmd"
22946    else
22947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22948$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22951      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22952    fi
22953  else
22954    input_to_shortpath="$new_path"
22955  fi
22956
22957  # Call helper function which possibly converts this using DOS-style short mode.
22958  # If so, the updated path is stored in $new_path.
22959  new_path="$input_to_shortpath"
22960
22961  input_path="$input_to_shortpath"
22962  # Check if we need to convert this using DOS-style short mode. If the path
22963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22964  # take no chances and rewrite it.
22965  # Note: m4 eats our [], so we need to use [ and ] instead.
22966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22967  if test "x$has_forbidden_chars" != x; then
22968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22972      # Going to short mode and back again did indeed matter. Since short mode is
22973      # case insensitive, let's make it lowercase to improve readability.
22974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22975      # Now convert it back to Unix-stile (cygpath)
22976      input_path=`$CYGPATH -u "$shortmode_path"`
22977      new_path="$input_path"
22978    fi
22979  fi
22980
22981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22982  if test "x$test_cygdrive_prefix" = x; then
22983    # As a simple fix, exclude /usr/bin since it's not a real path.
22984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22986      # a path prefixed by /cygdrive for fixpath to work.
22987      new_path="$CYGWIN_ROOT_PATH$input_path"
22988    fi
22989  fi
22990
22991  # remove trailing .exe if any
22992  new_path="${new_path/%.exe/}"
22993
22994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22995
22996  # First separate the path from the arguments. This will split at the first
22997  # space.
22998  complete="$WINLD"
22999  path="${complete%% *}"
23000  tmp="$complete EOL"
23001  arguments="${tmp#* }"
23002
23003  # Input might be given as Windows format, start by converting to
23004  # unix format.
23005  new_path="$path"
23006
23007  windows_path="$new_path"
23008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23009    unix_path=`$CYGPATH -u "$windows_path"`
23010    new_path="$unix_path"
23011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23013    new_path="$unix_path"
23014  fi
23015
23016
23017  # Now try to locate executable using which
23018  new_path=`$WHICH "$new_path" 2> /dev/null`
23019
23020  if test "x$new_path" = x; then
23021    # Oops. Which didn't find the executable.
23022    # The splitting of arguments from the executable at a space might have been incorrect,
23023    # since paths with space are more likely in Windows. Give it another try with the whole
23024    # argument.
23025    path="$complete"
23026    arguments="EOL"
23027    new_path="$path"
23028
23029  windows_path="$new_path"
23030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23031    unix_path=`$CYGPATH -u "$windows_path"`
23032    new_path="$unix_path"
23033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23035    new_path="$unix_path"
23036  fi
23037
23038
23039    new_path=`$WHICH "$new_path" 2> /dev/null`
23040
23041    if test "x$new_path" = x; then
23042      # It's still not found. Now this is an unrecoverable error.
23043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23044$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23045      has_space=`$ECHO "$complete" | $GREP " "`
23046      if test "x$has_space" != x; then
23047        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23048$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23049      fi
23050      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23051    fi
23052  fi
23053
23054  # Now new_path has a complete unix path to the binary
23055  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23056    # Keep paths in /bin as-is, but remove trailing .exe if any
23057    new_path="${new_path/%.exe/}"
23058    # Do not save /bin paths to all_fixpath_prefixes!
23059  else
23060    # Not in mixed or Windows style, start by that.
23061    new_path=`cmd //c echo $new_path`
23062
23063  input_path="$new_path"
23064  # Check if we need to convert this using DOS-style short mode. If the path
23065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23066  # take no chances and rewrite it.
23067  # Note: m4 eats our [], so we need to use [ and ] instead.
23068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23069  if test "x$has_forbidden_chars" != x; then
23070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23072  fi
23073
23074    # Output is in $new_path
23075
23076  windows_path="$new_path"
23077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23078    unix_path=`$CYGPATH -u "$windows_path"`
23079    new_path="$unix_path"
23080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23082    new_path="$unix_path"
23083  fi
23084
23085    # remove trailing .exe if any
23086    new_path="${new_path/%.exe/}"
23087
23088    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23089    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23090  fi
23091
23092  else
23093    # We're on a posix platform. Hooray! :)
23094    # First separate the path from the arguments. This will split at the first
23095    # space.
23096    complete="$WINLD"
23097    path="${complete%% *}"
23098    tmp="$complete EOL"
23099    arguments="${tmp#* }"
23100
23101    # Cannot rely on the command "which" here since it doesn't always work.
23102    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23103    if test -z "$is_absolute_path"; then
23104      # Path to executable is not absolute. Find it.
23105      IFS_save="$IFS"
23106      IFS=:
23107      for p in $PATH; do
23108        if test -f "$p/$path" && test -x "$p/$path"; then
23109          new_path="$p/$path"
23110          break
23111        fi
23112      done
23113      IFS="$IFS_save"
23114    else
23115      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23116$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23117      new_path="$path"
23118    fi
23119
23120    if test "x$new_path" = x; then
23121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23122$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23123        has_space=`$ECHO "$complete" | $GREP " "`
23124        if test "x$has_space" != x; then
23125          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23126$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23127        fi
23128        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23129      fi
23130  fi
23131
23132      # Now join together the path and the arguments once again
23133      if test "x$arguments" != xEOL; then
23134        new_complete="$new_path ${arguments% *}"
23135      else
23136        new_complete="$new_path"
23137      fi
23138
23139  if test "x$complete" != "x$new_complete"; then
23140      WINLD="$new_complete"
23141      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23142$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23143    fi
23144
23145    printf "Windows linker was found at $WINLD\n"
23146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23147$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23148    "$WINLD" --version > /dev/null
23149    if test $? -eq 0 ; then
23150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23151$as_echo "no" >&6; }
23152      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23153    else
23154      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23155$as_echo "yes" >&6; }
23156    fi
23157    LD="$WINLD"
23158    LDEXE="$WINLD"
23159    LDCXX="$WINLD"
23160    LDEXECXX="$WINLD"
23161
23162    # Extract the first word of "mt", so it can be a program name with args.
23163set dummy mt; ac_word=$2
23164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23165$as_echo_n "checking for $ac_word... " >&6; }
23166if test "${ac_cv_prog_MT+set}" = set; then :
23167  $as_echo_n "(cached) " >&6
23168else
23169  if test -n "$MT"; then
23170  ac_cv_prog_MT="$MT" # Let the user override the test.
23171else
23172  ac_prog_rejected=no
23173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23174for as_dir in $PATH
23175do
23176  IFS=$as_save_IFS
23177  test -z "$as_dir" && as_dir=.
23178    for ac_exec_ext in '' $ac_executable_extensions; do
23179  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23180    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23181       ac_prog_rejected=yes
23182       continue
23183     fi
23184    ac_cv_prog_MT="mt"
23185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23186    break 2
23187  fi
23188done
23189  done
23190IFS=$as_save_IFS
23191
23192if test $ac_prog_rejected = yes; then
23193  # We found a bogon in the path, so make sure we never use it.
23194  set dummy $ac_cv_prog_MT
23195  shift
23196  if test $# != 0; then
23197    # We chose a different compiler from the bogus one.
23198    # However, it has the same basename, so the bogon will be chosen
23199    # first if we set MT to just the basename; use the full file name.
23200    shift
23201    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23202  fi
23203fi
23204fi
23205fi
23206MT=$ac_cv_prog_MT
23207if test -n "$MT"; then
23208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23209$as_echo "$MT" >&6; }
23210else
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23212$as_echo "no" >&6; }
23213fi
23214
23215
23216
23217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23218
23219  # First separate the path from the arguments. This will split at the first
23220  # space.
23221  complete="$MT"
23222  path="${complete%% *}"
23223  tmp="$complete EOL"
23224  arguments="${tmp#* }"
23225
23226  # Input might be given as Windows format, start by converting to
23227  # unix format.
23228  new_path=`$CYGPATH -u "$path"`
23229
23230  # Now try to locate executable using which
23231  new_path=`$WHICH "$new_path" 2> /dev/null`
23232  # bat and cmd files are not always considered executable in cygwin causing which
23233  # to not find them
23234  if test "x$new_path" = x \
23235           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23236           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23237    new_path=`$CYGPATH -u "$path"`
23238  fi
23239  if test "x$new_path" = x; then
23240    # Oops. Which didn't find the executable.
23241    # The splitting of arguments from the executable at a space might have been incorrect,
23242    # since paths with space are more likely in Windows. Give it another try with the whole
23243    # argument.
23244    path="$complete"
23245    arguments="EOL"
23246    new_path=`$CYGPATH -u "$path"`
23247    new_path=`$WHICH "$new_path" 2> /dev/null`
23248    # bat and cmd files are not always considered executable in cygwin causing which
23249    # to not find them
23250    if test "x$new_path" = x \
23251             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23252             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23253      new_path=`$CYGPATH -u "$path"`
23254    fi
23255    if test "x$new_path" = x; then
23256      # It's still not found. Now this is an unrecoverable error.
23257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23258$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23259      has_space=`$ECHO "$complete" | $GREP " "`
23260      if test "x$has_space" != x; then
23261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23263      fi
23264      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23265    fi
23266  fi
23267
23268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23271  # "foo.exe" is OK but "foo" is an error.
23272  #
23273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23274  # It is also a way to make sure we got the proper file name for the real test later on.
23275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23276  if test "x$test_shortpath" = x; then
23277    # Short path failed, file does not exist as specified.
23278    # Try adding .exe or .cmd
23279    if test -f "${new_path}.exe"; then
23280       input_to_shortpath="${new_path}.exe"
23281    elif test -f "${new_path}.cmd"; then
23282       input_to_shortpath="${new_path}.cmd"
23283    else
23284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23285$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23288      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23289    fi
23290  else
23291    input_to_shortpath="$new_path"
23292  fi
23293
23294  # Call helper function which possibly converts this using DOS-style short mode.
23295  # If so, the updated path is stored in $new_path.
23296  new_path="$input_to_shortpath"
23297
23298  input_path="$input_to_shortpath"
23299  # Check if we need to convert this using DOS-style short mode. If the path
23300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23301  # take no chances and rewrite it.
23302  # Note: m4 eats our [], so we need to use [ and ] instead.
23303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23304  if test "x$has_forbidden_chars" != x; then
23305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23309      # Going to short mode and back again did indeed matter. Since short mode is
23310      # case insensitive, let's make it lowercase to improve readability.
23311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23312      # Now convert it back to Unix-stile (cygpath)
23313      input_path=`$CYGPATH -u "$shortmode_path"`
23314      new_path="$input_path"
23315    fi
23316  fi
23317
23318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23319  if test "x$test_cygdrive_prefix" = x; then
23320    # As a simple fix, exclude /usr/bin since it's not a real path.
23321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23323      # a path prefixed by /cygdrive for fixpath to work.
23324      new_path="$CYGWIN_ROOT_PATH$input_path"
23325    fi
23326  fi
23327
23328  # remove trailing .exe if any
23329  new_path="${new_path/%.exe/}"
23330
23331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23332
23333  # First separate the path from the arguments. This will split at the first
23334  # space.
23335  complete="$MT"
23336  path="${complete%% *}"
23337  tmp="$complete EOL"
23338  arguments="${tmp#* }"
23339
23340  # Input might be given as Windows format, start by converting to
23341  # unix format.
23342  new_path="$path"
23343
23344  windows_path="$new_path"
23345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23346    unix_path=`$CYGPATH -u "$windows_path"`
23347    new_path="$unix_path"
23348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23350    new_path="$unix_path"
23351  fi
23352
23353
23354  # Now try to locate executable using which
23355  new_path=`$WHICH "$new_path" 2> /dev/null`
23356
23357  if test "x$new_path" = x; then
23358    # Oops. Which didn't find the executable.
23359    # The splitting of arguments from the executable at a space might have been incorrect,
23360    # since paths with space are more likely in Windows. Give it another try with the whole
23361    # argument.
23362    path="$complete"
23363    arguments="EOL"
23364    new_path="$path"
23365
23366  windows_path="$new_path"
23367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23368    unix_path=`$CYGPATH -u "$windows_path"`
23369    new_path="$unix_path"
23370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23372    new_path="$unix_path"
23373  fi
23374
23375
23376    new_path=`$WHICH "$new_path" 2> /dev/null`
23377
23378    if test "x$new_path" = x; then
23379      # It's still not found. Now this is an unrecoverable error.
23380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23381$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23382      has_space=`$ECHO "$complete" | $GREP " "`
23383      if test "x$has_space" != x; then
23384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23386      fi
23387      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23388    fi
23389  fi
23390
23391  # Now new_path has a complete unix path to the binary
23392  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23393    # Keep paths in /bin as-is, but remove trailing .exe if any
23394    new_path="${new_path/%.exe/}"
23395    # Do not save /bin paths to all_fixpath_prefixes!
23396  else
23397    # Not in mixed or Windows style, start by that.
23398    new_path=`cmd //c echo $new_path`
23399
23400  input_path="$new_path"
23401  # Check if we need to convert this using DOS-style short mode. If the path
23402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23403  # take no chances and rewrite it.
23404  # Note: m4 eats our [], so we need to use [ and ] instead.
23405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23406  if test "x$has_forbidden_chars" != x; then
23407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23409  fi
23410
23411    # Output is in $new_path
23412
23413  windows_path="$new_path"
23414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23415    unix_path=`$CYGPATH -u "$windows_path"`
23416    new_path="$unix_path"
23417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23419    new_path="$unix_path"
23420  fi
23421
23422    # remove trailing .exe if any
23423    new_path="${new_path/%.exe/}"
23424
23425    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23426    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23427  fi
23428
23429  else
23430    # We're on a posix platform. Hooray! :)
23431    # First separate the path from the arguments. This will split at the first
23432    # space.
23433    complete="$MT"
23434    path="${complete%% *}"
23435    tmp="$complete EOL"
23436    arguments="${tmp#* }"
23437
23438    # Cannot rely on the command "which" here since it doesn't always work.
23439    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23440    if test -z "$is_absolute_path"; then
23441      # Path to executable is not absolute. Find it.
23442      IFS_save="$IFS"
23443      IFS=:
23444      for p in $PATH; do
23445        if test -f "$p/$path" && test -x "$p/$path"; then
23446          new_path="$p/$path"
23447          break
23448        fi
23449      done
23450      IFS="$IFS_save"
23451    else
23452      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23453$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23454      new_path="$path"
23455    fi
23456
23457    if test "x$new_path" = x; then
23458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23459$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23460        has_space=`$ECHO "$complete" | $GREP " "`
23461        if test "x$has_space" != x; then
23462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23464        fi
23465        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23466      fi
23467  fi
23468
23469      # Now join together the path and the arguments once again
23470      if test "x$arguments" != xEOL; then
23471        new_complete="$new_path ${arguments% *}"
23472      else
23473        new_complete="$new_path"
23474      fi
23475
23476  if test "x$complete" != "x$new_complete"; then
23477      MT="$new_complete"
23478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23479$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23480    fi
23481
23482    # The resource compiler
23483    # Extract the first word of "rc", so it can be a program name with args.
23484set dummy rc; ac_word=$2
23485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23486$as_echo_n "checking for $ac_word... " >&6; }
23487if test "${ac_cv_prog_RC+set}" = set; then :
23488  $as_echo_n "(cached) " >&6
23489else
23490  if test -n "$RC"; then
23491  ac_cv_prog_RC="$RC" # Let the user override the test.
23492else
23493  ac_prog_rejected=no
23494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23495for as_dir in $PATH
23496do
23497  IFS=$as_save_IFS
23498  test -z "$as_dir" && as_dir=.
23499    for ac_exec_ext in '' $ac_executable_extensions; do
23500  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23501    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23502       ac_prog_rejected=yes
23503       continue
23504     fi
23505    ac_cv_prog_RC="rc"
23506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23507    break 2
23508  fi
23509done
23510  done
23511IFS=$as_save_IFS
23512
23513if test $ac_prog_rejected = yes; then
23514  # We found a bogon in the path, so make sure we never use it.
23515  set dummy $ac_cv_prog_RC
23516  shift
23517  if test $# != 0; then
23518    # We chose a different compiler from the bogus one.
23519    # However, it has the same basename, so the bogon will be chosen
23520    # first if we set RC to just the basename; use the full file name.
23521    shift
23522    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23523  fi
23524fi
23525fi
23526fi
23527RC=$ac_cv_prog_RC
23528if test -n "$RC"; then
23529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23530$as_echo "$RC" >&6; }
23531else
23532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23533$as_echo "no" >&6; }
23534fi
23535
23536
23537
23538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23539
23540  # First separate the path from the arguments. This will split at the first
23541  # space.
23542  complete="$RC"
23543  path="${complete%% *}"
23544  tmp="$complete EOL"
23545  arguments="${tmp#* }"
23546
23547  # Input might be given as Windows format, start by converting to
23548  # unix format.
23549  new_path=`$CYGPATH -u "$path"`
23550
23551  # Now try to locate executable using which
23552  new_path=`$WHICH "$new_path" 2> /dev/null`
23553  # bat and cmd files are not always considered executable in cygwin causing which
23554  # to not find them
23555  if test "x$new_path" = x \
23556           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23557           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23558    new_path=`$CYGPATH -u "$path"`
23559  fi
23560  if test "x$new_path" = x; then
23561    # Oops. Which didn't find the executable.
23562    # The splitting of arguments from the executable at a space might have been incorrect,
23563    # since paths with space are more likely in Windows. Give it another try with the whole
23564    # argument.
23565    path="$complete"
23566    arguments="EOL"
23567    new_path=`$CYGPATH -u "$path"`
23568    new_path=`$WHICH "$new_path" 2> /dev/null`
23569    # bat and cmd files are not always considered executable in cygwin causing which
23570    # to not find them
23571    if test "x$new_path" = x \
23572             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23573             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23574      new_path=`$CYGPATH -u "$path"`
23575    fi
23576    if test "x$new_path" = x; then
23577      # It's still not found. Now this is an unrecoverable error.
23578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23579$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23580      has_space=`$ECHO "$complete" | $GREP " "`
23581      if test "x$has_space" != x; then
23582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23584      fi
23585      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23586    fi
23587  fi
23588
23589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23592  # "foo.exe" is OK but "foo" is an error.
23593  #
23594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23595  # It is also a way to make sure we got the proper file name for the real test later on.
23596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23597  if test "x$test_shortpath" = x; then
23598    # Short path failed, file does not exist as specified.
23599    # Try adding .exe or .cmd
23600    if test -f "${new_path}.exe"; then
23601       input_to_shortpath="${new_path}.exe"
23602    elif test -f "${new_path}.cmd"; then
23603       input_to_shortpath="${new_path}.cmd"
23604    else
23605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23606$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23609      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23610    fi
23611  else
23612    input_to_shortpath="$new_path"
23613  fi
23614
23615  # Call helper function which possibly converts this using DOS-style short mode.
23616  # If so, the updated path is stored in $new_path.
23617  new_path="$input_to_shortpath"
23618
23619  input_path="$input_to_shortpath"
23620  # Check if we need to convert this using DOS-style short mode. If the path
23621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23622  # take no chances and rewrite it.
23623  # Note: m4 eats our [], so we need to use [ and ] instead.
23624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23625  if test "x$has_forbidden_chars" != x; then
23626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23630      # Going to short mode and back again did indeed matter. Since short mode is
23631      # case insensitive, let's make it lowercase to improve readability.
23632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23633      # Now convert it back to Unix-stile (cygpath)
23634      input_path=`$CYGPATH -u "$shortmode_path"`
23635      new_path="$input_path"
23636    fi
23637  fi
23638
23639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23640  if test "x$test_cygdrive_prefix" = x; then
23641    # As a simple fix, exclude /usr/bin since it's not a real path.
23642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23644      # a path prefixed by /cygdrive for fixpath to work.
23645      new_path="$CYGWIN_ROOT_PATH$input_path"
23646    fi
23647  fi
23648
23649  # remove trailing .exe if any
23650  new_path="${new_path/%.exe/}"
23651
23652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23653
23654  # First separate the path from the arguments. This will split at the first
23655  # space.
23656  complete="$RC"
23657  path="${complete%% *}"
23658  tmp="$complete EOL"
23659  arguments="${tmp#* }"
23660
23661  # Input might be given as Windows format, start by converting to
23662  # unix format.
23663  new_path="$path"
23664
23665  windows_path="$new_path"
23666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23667    unix_path=`$CYGPATH -u "$windows_path"`
23668    new_path="$unix_path"
23669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23671    new_path="$unix_path"
23672  fi
23673
23674
23675  # Now try to locate executable using which
23676  new_path=`$WHICH "$new_path" 2> /dev/null`
23677
23678  if test "x$new_path" = x; then
23679    # Oops. Which didn't find the executable.
23680    # The splitting of arguments from the executable at a space might have been incorrect,
23681    # since paths with space are more likely in Windows. Give it another try with the whole
23682    # argument.
23683    path="$complete"
23684    arguments="EOL"
23685    new_path="$path"
23686
23687  windows_path="$new_path"
23688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23689    unix_path=`$CYGPATH -u "$windows_path"`
23690    new_path="$unix_path"
23691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23693    new_path="$unix_path"
23694  fi
23695
23696
23697    new_path=`$WHICH "$new_path" 2> /dev/null`
23698
23699    if test "x$new_path" = x; then
23700      # It's still not found. Now this is an unrecoverable error.
23701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23702$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23703      has_space=`$ECHO "$complete" | $GREP " "`
23704      if test "x$has_space" != x; then
23705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23707      fi
23708      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23709    fi
23710  fi
23711
23712  # Now new_path has a complete unix path to the binary
23713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23714    # Keep paths in /bin as-is, but remove trailing .exe if any
23715    new_path="${new_path/%.exe/}"
23716    # Do not save /bin paths to all_fixpath_prefixes!
23717  else
23718    # Not in mixed or Windows style, start by that.
23719    new_path=`cmd //c echo $new_path`
23720
23721  input_path="$new_path"
23722  # Check if we need to convert this using DOS-style short mode. If the path
23723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23724  # take no chances and rewrite it.
23725  # Note: m4 eats our [], so we need to use [ and ] instead.
23726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23727  if test "x$has_forbidden_chars" != x; then
23728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23730  fi
23731
23732    # Output is in $new_path
23733
23734  windows_path="$new_path"
23735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23736    unix_path=`$CYGPATH -u "$windows_path"`
23737    new_path="$unix_path"
23738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23740    new_path="$unix_path"
23741  fi
23742
23743    # remove trailing .exe if any
23744    new_path="${new_path/%.exe/}"
23745
23746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23748  fi
23749
23750  else
23751    # We're on a posix platform. Hooray! :)
23752    # First separate the path from the arguments. This will split at the first
23753    # space.
23754    complete="$RC"
23755    path="${complete%% *}"
23756    tmp="$complete EOL"
23757    arguments="${tmp#* }"
23758
23759    # Cannot rely on the command "which" here since it doesn't always work.
23760    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23761    if test -z "$is_absolute_path"; then
23762      # Path to executable is not absolute. Find it.
23763      IFS_save="$IFS"
23764      IFS=:
23765      for p in $PATH; do
23766        if test -f "$p/$path" && test -x "$p/$path"; then
23767          new_path="$p/$path"
23768          break
23769        fi
23770      done
23771      IFS="$IFS_save"
23772    else
23773      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23774$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23775      new_path="$path"
23776    fi
23777
23778    if test "x$new_path" = x; then
23779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23780$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23781        has_space=`$ECHO "$complete" | $GREP " "`
23782        if test "x$has_space" != x; then
23783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23785        fi
23786        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23787      fi
23788  fi
23789
23790      # Now join together the path and the arguments once again
23791      if test "x$arguments" != xEOL; then
23792        new_complete="$new_path ${arguments% *}"
23793      else
23794        new_complete="$new_path"
23795      fi
23796
23797  if test "x$complete" != "x$new_complete"; then
23798      RC="$new_complete"
23799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23800$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23801    fi
23802
23803
23804    # For hotspot, we need these in Windows mixed path,
23805    # so rewrite them all. Need added .exe suffix.
23806    HOTSPOT_CXX="$CXX.exe"
23807    HOTSPOT_LD="$LD.exe"
23808    HOTSPOT_MT="$MT.exe"
23809    HOTSPOT_RC="$RC.exe"
23810
23811  unix_path="$HOTSPOT_CXX"
23812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23813    windows_path=`$CYGPATH -m "$unix_path"`
23814    HOTSPOT_CXX="$windows_path"
23815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23816    windows_path=`cmd //c echo $unix_path`
23817    HOTSPOT_CXX="$windows_path"
23818  fi
23819
23820
23821  unix_path="$HOTSPOT_LD"
23822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23823    windows_path=`$CYGPATH -m "$unix_path"`
23824    HOTSPOT_LD="$windows_path"
23825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23826    windows_path=`cmd //c echo $unix_path`
23827    HOTSPOT_LD="$windows_path"
23828  fi
23829
23830
23831  unix_path="$HOTSPOT_MT"
23832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23833    windows_path=`$CYGPATH -m "$unix_path"`
23834    HOTSPOT_MT="$windows_path"
23835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23836    windows_path=`cmd //c echo $unix_path`
23837    HOTSPOT_MT="$windows_path"
23838  fi
23839
23840
23841  unix_path="$HOTSPOT_RC"
23842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23843    windows_path=`$CYGPATH -m "$unix_path"`
23844    HOTSPOT_RC="$windows_path"
23845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23846    windows_path=`cmd //c echo $unix_path`
23847    HOTSPOT_RC="$windows_path"
23848  fi
23849
23850
23851
23852
23853    RC_FLAGS="-nologo -l 0x409 -r"
23854    if test "x$VARIANT" = xOPT; then :
23855
23856        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23857
23858fi
23859
23860    # The version variables used to create RC_FLAGS may be overridden
23861    # in a custom configure script, or possibly the command line.
23862    # Let those variables be expanded at make time in spec.gmk.
23863    # The \$ are escaped to the shell, and the $(...) variables
23864    # are evaluated by make.
23865    RC_FLAGS="$RC_FLAGS \
23866        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23867        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23868        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23869        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23870        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23871        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23872        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23873
23874    # lib.exe is used to create static libraries.
23875    # Extract the first word of "lib", so it can be a program name with args.
23876set dummy lib; ac_word=$2
23877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23878$as_echo_n "checking for $ac_word... " >&6; }
23879if test "${ac_cv_prog_WINAR+set}" = set; then :
23880  $as_echo_n "(cached) " >&6
23881else
23882  if test -n "$WINAR"; then
23883  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23884else
23885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23886for as_dir in $PATH
23887do
23888  IFS=$as_save_IFS
23889  test -z "$as_dir" && as_dir=.
23890    for ac_exec_ext in '' $ac_executable_extensions; do
23891  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23892    ac_cv_prog_WINAR="lib"
23893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23894    break 2
23895  fi
23896done
23897  done
23898IFS=$as_save_IFS
23899
23900fi
23901fi
23902WINAR=$ac_cv_prog_WINAR
23903if test -n "$WINAR"; then
23904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23905$as_echo "$WINAR" >&6; }
23906else
23907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23908$as_echo "no" >&6; }
23909fi
23910
23911
23912
23913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23914
23915  # First separate the path from the arguments. This will split at the first
23916  # space.
23917  complete="$WINAR"
23918  path="${complete%% *}"
23919  tmp="$complete EOL"
23920  arguments="${tmp#* }"
23921
23922  # Input might be given as Windows format, start by converting to
23923  # unix format.
23924  new_path=`$CYGPATH -u "$path"`
23925
23926  # Now try to locate executable using which
23927  new_path=`$WHICH "$new_path" 2> /dev/null`
23928  # bat and cmd files are not always considered executable in cygwin causing which
23929  # to not find them
23930  if test "x$new_path" = x \
23931           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23932           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23933    new_path=`$CYGPATH -u "$path"`
23934  fi
23935  if test "x$new_path" = x; then
23936    # Oops. Which didn't find the executable.
23937    # The splitting of arguments from the executable at a space might have been incorrect,
23938    # since paths with space are more likely in Windows. Give it another try with the whole
23939    # argument.
23940    path="$complete"
23941    arguments="EOL"
23942    new_path=`$CYGPATH -u "$path"`
23943    new_path=`$WHICH "$new_path" 2> /dev/null`
23944    # bat and cmd files are not always considered executable in cygwin causing which
23945    # to not find them
23946    if test "x$new_path" = x \
23947             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23948             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23949      new_path=`$CYGPATH -u "$path"`
23950    fi
23951    if test "x$new_path" = x; then
23952      # It's still not found. Now this is an unrecoverable error.
23953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23954$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23955      has_space=`$ECHO "$complete" | $GREP " "`
23956      if test "x$has_space" != x; then
23957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23959      fi
23960      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23961    fi
23962  fi
23963
23964  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23965  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23966  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23967  # "foo.exe" is OK but "foo" is an error.
23968  #
23969  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23970  # It is also a way to make sure we got the proper file name for the real test later on.
23971  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23972  if test "x$test_shortpath" = x; then
23973    # Short path failed, file does not exist as specified.
23974    # Try adding .exe or .cmd
23975    if test -f "${new_path}.exe"; then
23976       input_to_shortpath="${new_path}.exe"
23977    elif test -f "${new_path}.cmd"; then
23978       input_to_shortpath="${new_path}.cmd"
23979    else
23980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23981$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23982      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23983$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23984      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23985    fi
23986  else
23987    input_to_shortpath="$new_path"
23988  fi
23989
23990  # Call helper function which possibly converts this using DOS-style short mode.
23991  # If so, the updated path is stored in $new_path.
23992  new_path="$input_to_shortpath"
23993
23994  input_path="$input_to_shortpath"
23995  # Check if we need to convert this using DOS-style short mode. If the path
23996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23997  # take no chances and rewrite it.
23998  # Note: m4 eats our [], so we need to use [ and ] instead.
23999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24000  if test "x$has_forbidden_chars" != x; then
24001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24005      # Going to short mode and back again did indeed matter. Since short mode is
24006      # case insensitive, let's make it lowercase to improve readability.
24007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24008      # Now convert it back to Unix-stile (cygpath)
24009      input_path=`$CYGPATH -u "$shortmode_path"`
24010      new_path="$input_path"
24011    fi
24012  fi
24013
24014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24015  if test "x$test_cygdrive_prefix" = x; then
24016    # As a simple fix, exclude /usr/bin since it's not a real path.
24017    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24019      # a path prefixed by /cygdrive for fixpath to work.
24020      new_path="$CYGWIN_ROOT_PATH$input_path"
24021    fi
24022  fi
24023
24024  # remove trailing .exe if any
24025  new_path="${new_path/%.exe/}"
24026
24027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24028
24029  # First separate the path from the arguments. This will split at the first
24030  # space.
24031  complete="$WINAR"
24032  path="${complete%% *}"
24033  tmp="$complete EOL"
24034  arguments="${tmp#* }"
24035
24036  # Input might be given as Windows format, start by converting to
24037  # unix format.
24038  new_path="$path"
24039
24040  windows_path="$new_path"
24041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24042    unix_path=`$CYGPATH -u "$windows_path"`
24043    new_path="$unix_path"
24044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24046    new_path="$unix_path"
24047  fi
24048
24049
24050  # Now try to locate executable using which
24051  new_path=`$WHICH "$new_path" 2> /dev/null`
24052
24053  if test "x$new_path" = x; then
24054    # Oops. Which didn't find the executable.
24055    # The splitting of arguments from the executable at a space might have been incorrect,
24056    # since paths with space are more likely in Windows. Give it another try with the whole
24057    # argument.
24058    path="$complete"
24059    arguments="EOL"
24060    new_path="$path"
24061
24062  windows_path="$new_path"
24063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24064    unix_path=`$CYGPATH -u "$windows_path"`
24065    new_path="$unix_path"
24066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24068    new_path="$unix_path"
24069  fi
24070
24071
24072    new_path=`$WHICH "$new_path" 2> /dev/null`
24073
24074    if test "x$new_path" = x; then
24075      # It's still not found. Now this is an unrecoverable error.
24076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24077$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24078      has_space=`$ECHO "$complete" | $GREP " "`
24079      if test "x$has_space" != x; then
24080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24082      fi
24083      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24084    fi
24085  fi
24086
24087  # Now new_path has a complete unix path to the binary
24088  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24089    # Keep paths in /bin as-is, but remove trailing .exe if any
24090    new_path="${new_path/%.exe/}"
24091    # Do not save /bin paths to all_fixpath_prefixes!
24092  else
24093    # Not in mixed or Windows style, start by that.
24094    new_path=`cmd //c echo $new_path`
24095
24096  input_path="$new_path"
24097  # Check if we need to convert this using DOS-style short mode. If the path
24098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24099  # take no chances and rewrite it.
24100  # Note: m4 eats our [], so we need to use [ and ] instead.
24101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24102  if test "x$has_forbidden_chars" != x; then
24103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24105  fi
24106
24107    # Output is in $new_path
24108
24109  windows_path="$new_path"
24110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24111    unix_path=`$CYGPATH -u "$windows_path"`
24112    new_path="$unix_path"
24113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24115    new_path="$unix_path"
24116  fi
24117
24118    # remove trailing .exe if any
24119    new_path="${new_path/%.exe/}"
24120
24121    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24122    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24123  fi
24124
24125  else
24126    # We're on a posix platform. Hooray! :)
24127    # First separate the path from the arguments. This will split at the first
24128    # space.
24129    complete="$WINAR"
24130    path="${complete%% *}"
24131    tmp="$complete EOL"
24132    arguments="${tmp#* }"
24133
24134    # Cannot rely on the command "which" here since it doesn't always work.
24135    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24136    if test -z "$is_absolute_path"; then
24137      # Path to executable is not absolute. Find it.
24138      IFS_save="$IFS"
24139      IFS=:
24140      for p in $PATH; do
24141        if test -f "$p/$path" && test -x "$p/$path"; then
24142          new_path="$p/$path"
24143          break
24144        fi
24145      done
24146      IFS="$IFS_save"
24147    else
24148      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24149$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24150      new_path="$path"
24151    fi
24152
24153    if test "x$new_path" = x; then
24154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24155$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24156        has_space=`$ECHO "$complete" | $GREP " "`
24157        if test "x$has_space" != x; then
24158          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24159$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24160        fi
24161        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24162      fi
24163  fi
24164
24165      # Now join together the path and the arguments once again
24166      if test "x$arguments" != xEOL; then
24167        new_complete="$new_path ${arguments% *}"
24168      else
24169        new_complete="$new_path"
24170      fi
24171
24172  if test "x$complete" != "x$new_complete"; then
24173      WINAR="$new_complete"
24174      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24175$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24176    fi
24177
24178    AR="$WINAR"
24179    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24180
24181    # Extract the first word of "dumpbin", so it can be a program name with args.
24182set dummy dumpbin; ac_word=$2
24183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24184$as_echo_n "checking for $ac_word... " >&6; }
24185if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24186  $as_echo_n "(cached) " >&6
24187else
24188  if test -n "$DUMPBIN"; then
24189  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24190else
24191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24192for as_dir in $PATH
24193do
24194  IFS=$as_save_IFS
24195  test -z "$as_dir" && as_dir=.
24196    for ac_exec_ext in '' $ac_executable_extensions; do
24197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24198    ac_cv_prog_DUMPBIN="dumpbin"
24199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24200    break 2
24201  fi
24202done
24203  done
24204IFS=$as_save_IFS
24205
24206fi
24207fi
24208DUMPBIN=$ac_cv_prog_DUMPBIN
24209if test -n "$DUMPBIN"; then
24210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24211$as_echo "$DUMPBIN" >&6; }
24212else
24213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24214$as_echo "no" >&6; }
24215fi
24216
24217
24218
24219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24220
24221  # First separate the path from the arguments. This will split at the first
24222  # space.
24223  complete="$DUMPBIN"
24224  path="${complete%% *}"
24225  tmp="$complete EOL"
24226  arguments="${tmp#* }"
24227
24228  # Input might be given as Windows format, start by converting to
24229  # unix format.
24230  new_path=`$CYGPATH -u "$path"`
24231
24232  # Now try to locate executable using which
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    # Oops. Which didn't find the executable.
24243    # The splitting of arguments from the executable at a space might have been incorrect,
24244    # since paths with space are more likely in Windows. Give it another try with the whole
24245    # argument.
24246    path="$complete"
24247    arguments="EOL"
24248    new_path=`$CYGPATH -u "$path"`
24249    new_path=`$WHICH "$new_path" 2> /dev/null`
24250    # bat and cmd files are not always considered executable in cygwin causing which
24251    # to not find them
24252    if test "x$new_path" = x \
24253             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24254             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24255      new_path=`$CYGPATH -u "$path"`
24256    fi
24257    if test "x$new_path" = x; then
24258      # It's still not found. Now this is an unrecoverable error.
24259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24260$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24261      has_space=`$ECHO "$complete" | $GREP " "`
24262      if test "x$has_space" != x; then
24263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24265      fi
24266      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24267    fi
24268  fi
24269
24270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24273  # "foo.exe" is OK but "foo" is an error.
24274  #
24275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24276  # It is also a way to make sure we got the proper file name for the real test later on.
24277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24278  if test "x$test_shortpath" = x; then
24279    # Short path failed, file does not exist as specified.
24280    # Try adding .exe or .cmd
24281    if test -f "${new_path}.exe"; then
24282       input_to_shortpath="${new_path}.exe"
24283    elif test -f "${new_path}.cmd"; then
24284       input_to_shortpath="${new_path}.cmd"
24285    else
24286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24287$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24290      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24291    fi
24292  else
24293    input_to_shortpath="$new_path"
24294  fi
24295
24296  # Call helper function which possibly converts this using DOS-style short mode.
24297  # If so, the updated path is stored in $new_path.
24298  new_path="$input_to_shortpath"
24299
24300  input_path="$input_to_shortpath"
24301  # Check if we need to convert this using DOS-style short mode. If the path
24302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24303  # take no chances and rewrite it.
24304  # Note: m4 eats our [], so we need to use [ and ] instead.
24305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24306  if test "x$has_forbidden_chars" != x; then
24307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24311      # Going to short mode and back again did indeed matter. Since short mode is
24312      # case insensitive, let's make it lowercase to improve readability.
24313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24314      # Now convert it back to Unix-stile (cygpath)
24315      input_path=`$CYGPATH -u "$shortmode_path"`
24316      new_path="$input_path"
24317    fi
24318  fi
24319
24320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24321  if test "x$test_cygdrive_prefix" = x; then
24322    # As a simple fix, exclude /usr/bin since it's not a real path.
24323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24325      # a path prefixed by /cygdrive for fixpath to work.
24326      new_path="$CYGWIN_ROOT_PATH$input_path"
24327    fi
24328  fi
24329
24330  # remove trailing .exe if any
24331  new_path="${new_path/%.exe/}"
24332
24333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24334
24335  # First separate the path from the arguments. This will split at the first
24336  # space.
24337  complete="$DUMPBIN"
24338  path="${complete%% *}"
24339  tmp="$complete EOL"
24340  arguments="${tmp#* }"
24341
24342  # Input might be given as Windows format, start by converting to
24343  # unix format.
24344  new_path="$path"
24345
24346  windows_path="$new_path"
24347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24348    unix_path=`$CYGPATH -u "$windows_path"`
24349    new_path="$unix_path"
24350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24352    new_path="$unix_path"
24353  fi
24354
24355
24356  # Now try to locate executable using which
24357  new_path=`$WHICH "$new_path" 2> /dev/null`
24358
24359  if test "x$new_path" = x; then
24360    # Oops. Which didn't find the executable.
24361    # The splitting of arguments from the executable at a space might have been incorrect,
24362    # since paths with space are more likely in Windows. Give it another try with the whole
24363    # argument.
24364    path="$complete"
24365    arguments="EOL"
24366    new_path="$path"
24367
24368  windows_path="$new_path"
24369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24370    unix_path=`$CYGPATH -u "$windows_path"`
24371    new_path="$unix_path"
24372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24374    new_path="$unix_path"
24375  fi
24376
24377
24378    new_path=`$WHICH "$new_path" 2> /dev/null`
24379
24380    if test "x$new_path" = x; then
24381      # It's still not found. Now this is an unrecoverable error.
24382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24383$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24384      has_space=`$ECHO "$complete" | $GREP " "`
24385      if test "x$has_space" != x; then
24386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24388      fi
24389      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24390    fi
24391  fi
24392
24393  # Now new_path has a complete unix path to the binary
24394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24395    # Keep paths in /bin as-is, but remove trailing .exe if any
24396    new_path="${new_path/%.exe/}"
24397    # Do not save /bin paths to all_fixpath_prefixes!
24398  else
24399    # Not in mixed or Windows style, start by that.
24400    new_path=`cmd //c echo $new_path`
24401
24402  input_path="$new_path"
24403  # Check if we need to convert this using DOS-style short mode. If the path
24404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24405  # take no chances and rewrite it.
24406  # Note: m4 eats our [], so we need to use [ and ] instead.
24407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24408  if test "x$has_forbidden_chars" != x; then
24409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24411  fi
24412
24413    # Output is in $new_path
24414
24415  windows_path="$new_path"
24416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24417    unix_path=`$CYGPATH -u "$windows_path"`
24418    new_path="$unix_path"
24419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24421    new_path="$unix_path"
24422  fi
24423
24424    # remove trailing .exe if any
24425    new_path="${new_path/%.exe/}"
24426
24427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24429  fi
24430
24431  else
24432    # We're on a posix platform. Hooray! :)
24433    # First separate the path from the arguments. This will split at the first
24434    # space.
24435    complete="$DUMPBIN"
24436    path="${complete%% *}"
24437    tmp="$complete EOL"
24438    arguments="${tmp#* }"
24439
24440    # Cannot rely on the command "which" here since it doesn't always work.
24441    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24442    if test -z "$is_absolute_path"; then
24443      # Path to executable is not absolute. Find it.
24444      IFS_save="$IFS"
24445      IFS=:
24446      for p in $PATH; do
24447        if test -f "$p/$path" && test -x "$p/$path"; then
24448          new_path="$p/$path"
24449          break
24450        fi
24451      done
24452      IFS="$IFS_save"
24453    else
24454      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24455$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24456      new_path="$path"
24457    fi
24458
24459    if test "x$new_path" = x; then
24460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24461$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24462        has_space=`$ECHO "$complete" | $GREP " "`
24463        if test "x$has_space" != x; then
24464          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24465$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24466        fi
24467        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24468      fi
24469  fi
24470
24471      # Now join together the path and the arguments once again
24472      if test "x$arguments" != xEOL; then
24473        new_complete="$new_path ${arguments% *}"
24474      else
24475        new_complete="$new_path"
24476      fi
24477
24478  if test "x$complete" != "x$new_complete"; then
24479      DUMPBIN="$new_complete"
24480      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24481$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24482    fi
24483
24484
24485    COMPILER_TYPE=CL
24486    CCXXFLAGS="$CCXXFLAGS -nologo"
24487
24488fi
24489
24490
24491
24492ac_ext=c
24493ac_cpp='$CPP $CPPFLAGS'
24494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24496ac_compiler_gnu=$ac_cv_c_compiler_gnu
24497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24498$as_echo_n "checking how to run the C preprocessor... " >&6; }
24499# On Suns, sometimes $CPP names a directory.
24500if test -n "$CPP" && test -d "$CPP"; then
24501  CPP=
24502fi
24503if test -z "$CPP"; then
24504  if test "${ac_cv_prog_CPP+set}" = set; then :
24505  $as_echo_n "(cached) " >&6
24506else
24507      # Double quotes because CPP needs to be expanded
24508    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24509    do
24510      ac_preproc_ok=false
24511for ac_c_preproc_warn_flag in '' yes
24512do
24513  # Use a header file that comes with gcc, so configuring glibc
24514  # with a fresh cross-compiler works.
24515  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24516  # <limits.h> exists even on freestanding compilers.
24517  # On the NeXT, cc -E runs the code through the compiler's parser,
24518  # not just through cpp. "Syntax error" is here to catch this case.
24519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24520/* end confdefs.h.  */
24521#ifdef __STDC__
24522# include <limits.h>
24523#else
24524# include <assert.h>
24525#endif
24526		     Syntax error
24527_ACEOF
24528if ac_fn_c_try_cpp "$LINENO"; then :
24529
24530else
24531  # Broken: fails on valid input.
24532continue
24533fi
24534rm -f conftest.err conftest.i conftest.$ac_ext
24535
24536  # OK, works on sane cases.  Now check whether nonexistent headers
24537  # can be detected and how.
24538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24539/* end confdefs.h.  */
24540#include <ac_nonexistent.h>
24541_ACEOF
24542if ac_fn_c_try_cpp "$LINENO"; then :
24543  # Broken: success on invalid input.
24544continue
24545else
24546  # Passes both tests.
24547ac_preproc_ok=:
24548break
24549fi
24550rm -f conftest.err conftest.i conftest.$ac_ext
24551
24552done
24553# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24554rm -f conftest.i conftest.err conftest.$ac_ext
24555if $ac_preproc_ok; then :
24556  break
24557fi
24558
24559    done
24560    ac_cv_prog_CPP=$CPP
24561
24562fi
24563  CPP=$ac_cv_prog_CPP
24564else
24565  ac_cv_prog_CPP=$CPP
24566fi
24567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24568$as_echo "$CPP" >&6; }
24569ac_preproc_ok=false
24570for ac_c_preproc_warn_flag in '' yes
24571do
24572  # Use a header file that comes with gcc, so configuring glibc
24573  # with a fresh cross-compiler works.
24574  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24575  # <limits.h> exists even on freestanding compilers.
24576  # On the NeXT, cc -E runs the code through the compiler's parser,
24577  # not just through cpp. "Syntax error" is here to catch this case.
24578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24579/* end confdefs.h.  */
24580#ifdef __STDC__
24581# include <limits.h>
24582#else
24583# include <assert.h>
24584#endif
24585		     Syntax error
24586_ACEOF
24587if ac_fn_c_try_cpp "$LINENO"; then :
24588
24589else
24590  # Broken: fails on valid input.
24591continue
24592fi
24593rm -f conftest.err conftest.i conftest.$ac_ext
24594
24595  # OK, works on sane cases.  Now check whether nonexistent headers
24596  # can be detected and how.
24597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24598/* end confdefs.h.  */
24599#include <ac_nonexistent.h>
24600_ACEOF
24601if ac_fn_c_try_cpp "$LINENO"; then :
24602  # Broken: success on invalid input.
24603continue
24604else
24605  # Passes both tests.
24606ac_preproc_ok=:
24607break
24608fi
24609rm -f conftest.err conftest.i conftest.$ac_ext
24610
24611done
24612# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24613rm -f conftest.i conftest.err conftest.$ac_ext
24614if $ac_preproc_ok; then :
24615
24616else
24617  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24619as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24620See \`config.log' for more details" "$LINENO" 5 ; }
24621fi
24622
24623ac_ext=cpp
24624ac_cpp='$CXXCPP $CPPFLAGS'
24625ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24626ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24627ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24628
24629
24630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24631
24632  # First separate the path from the arguments. This will split at the first
24633  # space.
24634  complete="$CPP"
24635  path="${complete%% *}"
24636  tmp="$complete EOL"
24637  arguments="${tmp#* }"
24638
24639  # Input might be given as Windows format, start by converting to
24640  # unix format.
24641  new_path=`$CYGPATH -u "$path"`
24642
24643  # Now try to locate executable using which
24644  new_path=`$WHICH "$new_path" 2> /dev/null`
24645  # bat and cmd files are not always considered executable in cygwin causing which
24646  # to not find them
24647  if test "x$new_path" = x \
24648           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24649           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24650    new_path=`$CYGPATH -u "$path"`
24651  fi
24652  if test "x$new_path" = x; then
24653    # Oops. Which didn't find the executable.
24654    # The splitting of arguments from the executable at a space might have been incorrect,
24655    # since paths with space are more likely in Windows. Give it another try with the whole
24656    # argument.
24657    path="$complete"
24658    arguments="EOL"
24659    new_path=`$CYGPATH -u "$path"`
24660    new_path=`$WHICH "$new_path" 2> /dev/null`
24661    # bat and cmd files are not always considered executable in cygwin causing which
24662    # to not find them
24663    if test "x$new_path" = x \
24664             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24665             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24666      new_path=`$CYGPATH -u "$path"`
24667    fi
24668    if test "x$new_path" = x; then
24669      # It's still not found. Now this is an unrecoverable error.
24670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24671$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24672      has_space=`$ECHO "$complete" | $GREP " "`
24673      if test "x$has_space" != x; then
24674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24676      fi
24677      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24678    fi
24679  fi
24680
24681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24684  # "foo.exe" is OK but "foo" is an error.
24685  #
24686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24687  # It is also a way to make sure we got the proper file name for the real test later on.
24688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24689  if test "x$test_shortpath" = x; then
24690    # Short path failed, file does not exist as specified.
24691    # Try adding .exe or .cmd
24692    if test -f "${new_path}.exe"; then
24693       input_to_shortpath="${new_path}.exe"
24694    elif test -f "${new_path}.cmd"; then
24695       input_to_shortpath="${new_path}.cmd"
24696    else
24697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24698$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24701      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24702    fi
24703  else
24704    input_to_shortpath="$new_path"
24705  fi
24706
24707  # Call helper function which possibly converts this using DOS-style short mode.
24708  # If so, the updated path is stored in $new_path.
24709  new_path="$input_to_shortpath"
24710
24711  input_path="$input_to_shortpath"
24712  # Check if we need to convert this using DOS-style short mode. If the path
24713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24714  # take no chances and rewrite it.
24715  # Note: m4 eats our [], so we need to use [ and ] instead.
24716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24717  if test "x$has_forbidden_chars" != x; then
24718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24722      # Going to short mode and back again did indeed matter. Since short mode is
24723      # case insensitive, let's make it lowercase to improve readability.
24724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24725      # Now convert it back to Unix-stile (cygpath)
24726      input_path=`$CYGPATH -u "$shortmode_path"`
24727      new_path="$input_path"
24728    fi
24729  fi
24730
24731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24732  if test "x$test_cygdrive_prefix" = x; then
24733    # As a simple fix, exclude /usr/bin since it's not a real path.
24734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24736      # a path prefixed by /cygdrive for fixpath to work.
24737      new_path="$CYGWIN_ROOT_PATH$input_path"
24738    fi
24739  fi
24740
24741  # remove trailing .exe if any
24742  new_path="${new_path/%.exe/}"
24743
24744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24745
24746  # First separate the path from the arguments. This will split at the first
24747  # space.
24748  complete="$CPP"
24749  path="${complete%% *}"
24750  tmp="$complete EOL"
24751  arguments="${tmp#* }"
24752
24753  # Input might be given as Windows format, start by converting to
24754  # unix format.
24755  new_path="$path"
24756
24757  windows_path="$new_path"
24758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24759    unix_path=`$CYGPATH -u "$windows_path"`
24760    new_path="$unix_path"
24761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24763    new_path="$unix_path"
24764  fi
24765
24766
24767  # Now try to locate executable using which
24768  new_path=`$WHICH "$new_path" 2> /dev/null`
24769
24770  if test "x$new_path" = x; then
24771    # Oops. Which didn't find the executable.
24772    # The splitting of arguments from the executable at a space might have been incorrect,
24773    # since paths with space are more likely in Windows. Give it another try with the whole
24774    # argument.
24775    path="$complete"
24776    arguments="EOL"
24777    new_path="$path"
24778
24779  windows_path="$new_path"
24780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24781    unix_path=`$CYGPATH -u "$windows_path"`
24782    new_path="$unix_path"
24783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24785    new_path="$unix_path"
24786  fi
24787
24788
24789    new_path=`$WHICH "$new_path" 2> /dev/null`
24790
24791    if test "x$new_path" = x; then
24792      # It's still not found. Now this is an unrecoverable error.
24793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24794$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24795      has_space=`$ECHO "$complete" | $GREP " "`
24796      if test "x$has_space" != x; then
24797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24799      fi
24800      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24801    fi
24802  fi
24803
24804  # Now new_path has a complete unix path to the binary
24805  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24806    # Keep paths in /bin as-is, but remove trailing .exe if any
24807    new_path="${new_path/%.exe/}"
24808    # Do not save /bin paths to all_fixpath_prefixes!
24809  else
24810    # Not in mixed or Windows style, start by that.
24811    new_path=`cmd //c echo $new_path`
24812
24813  input_path="$new_path"
24814  # Check if we need to convert this using DOS-style short mode. If the path
24815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24816  # take no chances and rewrite it.
24817  # Note: m4 eats our [], so we need to use [ and ] instead.
24818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24819  if test "x$has_forbidden_chars" != x; then
24820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24822  fi
24823
24824    # Output is in $new_path
24825
24826  windows_path="$new_path"
24827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24828    unix_path=`$CYGPATH -u "$windows_path"`
24829    new_path="$unix_path"
24830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24832    new_path="$unix_path"
24833  fi
24834
24835    # remove trailing .exe if any
24836    new_path="${new_path/%.exe/}"
24837
24838    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24839    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24840  fi
24841
24842  else
24843    # We're on a posix platform. Hooray! :)
24844    # First separate the path from the arguments. This will split at the first
24845    # space.
24846    complete="$CPP"
24847    path="${complete%% *}"
24848    tmp="$complete EOL"
24849    arguments="${tmp#* }"
24850
24851    # Cannot rely on the command "which" here since it doesn't always work.
24852    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24853    if test -z "$is_absolute_path"; then
24854      # Path to executable is not absolute. Find it.
24855      IFS_save="$IFS"
24856      IFS=:
24857      for p in $PATH; do
24858        if test -f "$p/$path" && test -x "$p/$path"; then
24859          new_path="$p/$path"
24860          break
24861        fi
24862      done
24863      IFS="$IFS_save"
24864    else
24865      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24866$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24867      new_path="$path"
24868    fi
24869
24870    if test "x$new_path" = x; then
24871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24872$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24873        has_space=`$ECHO "$complete" | $GREP " "`
24874        if test "x$has_space" != x; then
24875          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24877        fi
24878        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24879      fi
24880  fi
24881
24882      # Now join together the path and the arguments once again
24883      if test "x$arguments" != xEOL; then
24884        new_complete="$new_path ${arguments% *}"
24885      else
24886        new_complete="$new_path"
24887      fi
24888
24889  if test "x$complete" != "x$new_complete"; then
24890      CPP="$new_complete"
24891      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24892$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24893    fi
24894
24895
24896ac_ext=cpp
24897ac_cpp='$CXXCPP $CPPFLAGS'
24898ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24899ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24900ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24902$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24903if test -z "$CXXCPP"; then
24904  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24905  $as_echo_n "(cached) " >&6
24906else
24907      # Double quotes because CXXCPP needs to be expanded
24908    for CXXCPP in "$CXX -E" "/lib/cpp"
24909    do
24910      ac_preproc_ok=false
24911for ac_cxx_preproc_warn_flag in '' yes
24912do
24913  # Use a header file that comes with gcc, so configuring glibc
24914  # with a fresh cross-compiler works.
24915  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24916  # <limits.h> exists even on freestanding compilers.
24917  # On the NeXT, cc -E runs the code through the compiler's parser,
24918  # not just through cpp. "Syntax error" is here to catch this case.
24919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24920/* end confdefs.h.  */
24921#ifdef __STDC__
24922# include <limits.h>
24923#else
24924# include <assert.h>
24925#endif
24926		     Syntax error
24927_ACEOF
24928if ac_fn_cxx_try_cpp "$LINENO"; then :
24929
24930else
24931  # Broken: fails on valid input.
24932continue
24933fi
24934rm -f conftest.err conftest.i conftest.$ac_ext
24935
24936  # OK, works on sane cases.  Now check whether nonexistent headers
24937  # can be detected and how.
24938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24939/* end confdefs.h.  */
24940#include <ac_nonexistent.h>
24941_ACEOF
24942if ac_fn_cxx_try_cpp "$LINENO"; then :
24943  # Broken: success on invalid input.
24944continue
24945else
24946  # Passes both tests.
24947ac_preproc_ok=:
24948break
24949fi
24950rm -f conftest.err conftest.i conftest.$ac_ext
24951
24952done
24953# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24954rm -f conftest.i conftest.err conftest.$ac_ext
24955if $ac_preproc_ok; then :
24956  break
24957fi
24958
24959    done
24960    ac_cv_prog_CXXCPP=$CXXCPP
24961
24962fi
24963  CXXCPP=$ac_cv_prog_CXXCPP
24964else
24965  ac_cv_prog_CXXCPP=$CXXCPP
24966fi
24967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24968$as_echo "$CXXCPP" >&6; }
24969ac_preproc_ok=false
24970for ac_cxx_preproc_warn_flag in '' yes
24971do
24972  # Use a header file that comes with gcc, so configuring glibc
24973  # with a fresh cross-compiler works.
24974  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24975  # <limits.h> exists even on freestanding compilers.
24976  # On the NeXT, cc -E runs the code through the compiler's parser,
24977  # not just through cpp. "Syntax error" is here to catch this case.
24978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24979/* end confdefs.h.  */
24980#ifdef __STDC__
24981# include <limits.h>
24982#else
24983# include <assert.h>
24984#endif
24985		     Syntax error
24986_ACEOF
24987if ac_fn_cxx_try_cpp "$LINENO"; then :
24988
24989else
24990  # Broken: fails on valid input.
24991continue
24992fi
24993rm -f conftest.err conftest.i conftest.$ac_ext
24994
24995  # OK, works on sane cases.  Now check whether nonexistent headers
24996  # can be detected and how.
24997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24998/* end confdefs.h.  */
24999#include <ac_nonexistent.h>
25000_ACEOF
25001if ac_fn_cxx_try_cpp "$LINENO"; then :
25002  # Broken: success on invalid input.
25003continue
25004else
25005  # Passes both tests.
25006ac_preproc_ok=:
25007break
25008fi
25009rm -f conftest.err conftest.i conftest.$ac_ext
25010
25011done
25012# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25013rm -f conftest.i conftest.err conftest.$ac_ext
25014if $ac_preproc_ok; then :
25015
25016else
25017  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25019as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25020See \`config.log' for more details" "$LINENO" 5 ; }
25021fi
25022
25023ac_ext=cpp
25024ac_cpp='$CXXCPP $CPPFLAGS'
25025ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25026ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25027ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25028
25029
25030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25031
25032  # First separate the path from the arguments. This will split at the first
25033  # space.
25034  complete="$CXXCPP"
25035  path="${complete%% *}"
25036  tmp="$complete EOL"
25037  arguments="${tmp#* }"
25038
25039  # Input might be given as Windows format, start by converting to
25040  # unix format.
25041  new_path=`$CYGPATH -u "$path"`
25042
25043  # Now try to locate executable using which
25044  new_path=`$WHICH "$new_path" 2> /dev/null`
25045  # bat and cmd files are not always considered executable in cygwin causing which
25046  # to not find them
25047  if test "x$new_path" = x \
25048           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25049           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25050    new_path=`$CYGPATH -u "$path"`
25051  fi
25052  if test "x$new_path" = x; then
25053    # Oops. Which didn't find the executable.
25054    # The splitting of arguments from the executable at a space might have been incorrect,
25055    # since paths with space are more likely in Windows. Give it another try with the whole
25056    # argument.
25057    path="$complete"
25058    arguments="EOL"
25059    new_path=`$CYGPATH -u "$path"`
25060    new_path=`$WHICH "$new_path" 2> /dev/null`
25061    # bat and cmd files are not always considered executable in cygwin causing which
25062    # to not find them
25063    if test "x$new_path" = x \
25064             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25065             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25066      new_path=`$CYGPATH -u "$path"`
25067    fi
25068    if test "x$new_path" = x; then
25069      # It's still not found. Now this is an unrecoverable error.
25070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25071$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25072      has_space=`$ECHO "$complete" | $GREP " "`
25073      if test "x$has_space" != x; then
25074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25076      fi
25077      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25078    fi
25079  fi
25080
25081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25084  # "foo.exe" is OK but "foo" is an error.
25085  #
25086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25087  # It is also a way to make sure we got the proper file name for the real test later on.
25088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25089  if test "x$test_shortpath" = x; then
25090    # Short path failed, file does not exist as specified.
25091    # Try adding .exe or .cmd
25092    if test -f "${new_path}.exe"; then
25093       input_to_shortpath="${new_path}.exe"
25094    elif test -f "${new_path}.cmd"; then
25095       input_to_shortpath="${new_path}.cmd"
25096    else
25097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25098$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25099      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25100$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25101      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25102    fi
25103  else
25104    input_to_shortpath="$new_path"
25105  fi
25106
25107  # Call helper function which possibly converts this using DOS-style short mode.
25108  # If so, the updated path is stored in $new_path.
25109  new_path="$input_to_shortpath"
25110
25111  input_path="$input_to_shortpath"
25112  # Check if we need to convert this using DOS-style short mode. If the path
25113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25114  # take no chances and rewrite it.
25115  # Note: m4 eats our [], so we need to use [ and ] instead.
25116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25117  if test "x$has_forbidden_chars" != x; then
25118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25122      # Going to short mode and back again did indeed matter. Since short mode is
25123      # case insensitive, let's make it lowercase to improve readability.
25124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25125      # Now convert it back to Unix-stile (cygpath)
25126      input_path=`$CYGPATH -u "$shortmode_path"`
25127      new_path="$input_path"
25128    fi
25129  fi
25130
25131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25132  if test "x$test_cygdrive_prefix" = x; then
25133    # As a simple fix, exclude /usr/bin since it's not a real path.
25134    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25136      # a path prefixed by /cygdrive for fixpath to work.
25137      new_path="$CYGWIN_ROOT_PATH$input_path"
25138    fi
25139  fi
25140
25141  # remove trailing .exe if any
25142  new_path="${new_path/%.exe/}"
25143
25144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25145
25146  # First separate the path from the arguments. This will split at the first
25147  # space.
25148  complete="$CXXCPP"
25149  path="${complete%% *}"
25150  tmp="$complete EOL"
25151  arguments="${tmp#* }"
25152
25153  # Input might be given as Windows format, start by converting to
25154  # unix format.
25155  new_path="$path"
25156
25157  windows_path="$new_path"
25158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25159    unix_path=`$CYGPATH -u "$windows_path"`
25160    new_path="$unix_path"
25161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25163    new_path="$unix_path"
25164  fi
25165
25166
25167  # Now try to locate executable using which
25168  new_path=`$WHICH "$new_path" 2> /dev/null`
25169
25170  if test "x$new_path" = x; then
25171    # Oops. Which didn't find the executable.
25172    # The splitting of arguments from the executable at a space might have been incorrect,
25173    # since paths with space are more likely in Windows. Give it another try with the whole
25174    # argument.
25175    path="$complete"
25176    arguments="EOL"
25177    new_path="$path"
25178
25179  windows_path="$new_path"
25180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25181    unix_path=`$CYGPATH -u "$windows_path"`
25182    new_path="$unix_path"
25183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25185    new_path="$unix_path"
25186  fi
25187
25188
25189    new_path=`$WHICH "$new_path" 2> /dev/null`
25190
25191    if test "x$new_path" = x; then
25192      # It's still not found. Now this is an unrecoverable error.
25193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25194$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25195      has_space=`$ECHO "$complete" | $GREP " "`
25196      if test "x$has_space" != x; then
25197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25199      fi
25200      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25201    fi
25202  fi
25203
25204  # Now new_path has a complete unix path to the binary
25205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25206    # Keep paths in /bin as-is, but remove trailing .exe if any
25207    new_path="${new_path/%.exe/}"
25208    # Do not save /bin paths to all_fixpath_prefixes!
25209  else
25210    # Not in mixed or Windows style, start by that.
25211    new_path=`cmd //c echo $new_path`
25212
25213  input_path="$new_path"
25214  # Check if we need to convert this using DOS-style short mode. If the path
25215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25216  # take no chances and rewrite it.
25217  # Note: m4 eats our [], so we need to use [ and ] instead.
25218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25219  if test "x$has_forbidden_chars" != x; then
25220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25222  fi
25223
25224    # Output is in $new_path
25225
25226  windows_path="$new_path"
25227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25228    unix_path=`$CYGPATH -u "$windows_path"`
25229    new_path="$unix_path"
25230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25232    new_path="$unix_path"
25233  fi
25234
25235    # remove trailing .exe if any
25236    new_path="${new_path/%.exe/}"
25237
25238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25240  fi
25241
25242  else
25243    # We're on a posix platform. Hooray! :)
25244    # First separate the path from the arguments. This will split at the first
25245    # space.
25246    complete="$CXXCPP"
25247    path="${complete%% *}"
25248    tmp="$complete EOL"
25249    arguments="${tmp#* }"
25250
25251    # Cannot rely on the command "which" here since it doesn't always work.
25252    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25253    if test -z "$is_absolute_path"; then
25254      # Path to executable is not absolute. Find it.
25255      IFS_save="$IFS"
25256      IFS=:
25257      for p in $PATH; do
25258        if test -f "$p/$path" && test -x "$p/$path"; then
25259          new_path="$p/$path"
25260          break
25261        fi
25262      done
25263      IFS="$IFS_save"
25264    else
25265      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25266$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25267      new_path="$path"
25268    fi
25269
25270    if test "x$new_path" = x; then
25271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25272$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25273        has_space=`$ECHO "$complete" | $GREP " "`
25274        if test "x$has_space" != x; then
25275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25277        fi
25278        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25279      fi
25280  fi
25281
25282      # Now join together the path and the arguments once again
25283      if test "x$arguments" != xEOL; then
25284        new_complete="$new_path ${arguments% *}"
25285      else
25286        new_complete="$new_path"
25287      fi
25288
25289  if test "x$complete" != "x$new_complete"; then
25290      CXXCPP="$new_complete"
25291      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25292$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25293    fi
25294
25295
25296if test "x$COMPILE_TYPE" != "xcross"; then
25297    # If we are not cross compiling, use the same compilers for
25298    # building the build platform executables. The cross-compilation
25299    # case needed to be done earlier, but this can only be done after
25300    # the native tools have been localized.
25301    BUILD_CC="$CC"
25302    BUILD_CXX="$CXX"
25303    BUILD_LD="$LD"
25304fi
25305
25306# for solaris we really need solaris tools, and not gnu equivalent
25307#   these seems to normally reside in /usr/ccs/bin so add that to path before
25308#   starting to probe
25309#
25310#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25311#         so that it can be overriden --with-tools-dir
25312if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25313    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25314fi
25315
25316# Find the right assembler.
25317if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25318    # Extract the first word of "as", so it can be a program name with args.
25319set dummy as; ac_word=$2
25320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25321$as_echo_n "checking for $ac_word... " >&6; }
25322if test "${ac_cv_path_AS+set}" = set; then :
25323  $as_echo_n "(cached) " >&6
25324else
25325  case $AS in
25326  [\\/]* | ?:[\\/]*)
25327  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25328  ;;
25329  *)
25330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25331for as_dir in $PATH
25332do
25333  IFS=$as_save_IFS
25334  test -z "$as_dir" && as_dir=.
25335    for ac_exec_ext in '' $ac_executable_extensions; do
25336  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25337    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25339    break 2
25340  fi
25341done
25342  done
25343IFS=$as_save_IFS
25344
25345  ;;
25346esac
25347fi
25348AS=$ac_cv_path_AS
25349if test -n "$AS"; then
25350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25351$as_echo "$AS" >&6; }
25352else
25353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25354$as_echo "no" >&6; }
25355fi
25356
25357
25358
25359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25360
25361  # First separate the path from the arguments. This will split at the first
25362  # space.
25363  complete="$AS"
25364  path="${complete%% *}"
25365  tmp="$complete EOL"
25366  arguments="${tmp#* }"
25367
25368  # Input might be given as Windows format, start by converting to
25369  # unix format.
25370  new_path=`$CYGPATH -u "$path"`
25371
25372  # Now try to locate executable using which
25373  new_path=`$WHICH "$new_path" 2> /dev/null`
25374  # bat and cmd files are not always considered executable in cygwin causing which
25375  # to not find them
25376  if test "x$new_path" = x \
25377           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25378           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25379    new_path=`$CYGPATH -u "$path"`
25380  fi
25381  if test "x$new_path" = x; then
25382    # Oops. Which didn't find the executable.
25383    # The splitting of arguments from the executable at a space might have been incorrect,
25384    # since paths with space are more likely in Windows. Give it another try with the whole
25385    # argument.
25386    path="$complete"
25387    arguments="EOL"
25388    new_path=`$CYGPATH -u "$path"`
25389    new_path=`$WHICH "$new_path" 2> /dev/null`
25390    # bat and cmd files are not always considered executable in cygwin causing which
25391    # to not find them
25392    if test "x$new_path" = x \
25393             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25394             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25395      new_path=`$CYGPATH -u "$path"`
25396    fi
25397    if test "x$new_path" = x; then
25398      # It's still not found. Now this is an unrecoverable error.
25399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25400$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25401      has_space=`$ECHO "$complete" | $GREP " "`
25402      if test "x$has_space" != x; then
25403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25405      fi
25406      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25407    fi
25408  fi
25409
25410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25413  # "foo.exe" is OK but "foo" is an error.
25414  #
25415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25416  # It is also a way to make sure we got the proper file name for the real test later on.
25417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25418  if test "x$test_shortpath" = x; then
25419    # Short path failed, file does not exist as specified.
25420    # Try adding .exe or .cmd
25421    if test -f "${new_path}.exe"; then
25422       input_to_shortpath="${new_path}.exe"
25423    elif test -f "${new_path}.cmd"; then
25424       input_to_shortpath="${new_path}.cmd"
25425    else
25426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25427$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25428      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25429$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25430      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25431    fi
25432  else
25433    input_to_shortpath="$new_path"
25434  fi
25435
25436  # Call helper function which possibly converts this using DOS-style short mode.
25437  # If so, the updated path is stored in $new_path.
25438  new_path="$input_to_shortpath"
25439
25440  input_path="$input_to_shortpath"
25441  # Check if we need to convert this using DOS-style short mode. If the path
25442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25443  # take no chances and rewrite it.
25444  # Note: m4 eats our [], so we need to use [ and ] instead.
25445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25446  if test "x$has_forbidden_chars" != x; then
25447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25451      # Going to short mode and back again did indeed matter. Since short mode is
25452      # case insensitive, let's make it lowercase to improve readability.
25453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25454      # Now convert it back to Unix-stile (cygpath)
25455      input_path=`$CYGPATH -u "$shortmode_path"`
25456      new_path="$input_path"
25457    fi
25458  fi
25459
25460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25461  if test "x$test_cygdrive_prefix" = x; then
25462    # As a simple fix, exclude /usr/bin since it's not a real path.
25463    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25465      # a path prefixed by /cygdrive for fixpath to work.
25466      new_path="$CYGWIN_ROOT_PATH$input_path"
25467    fi
25468  fi
25469
25470  # remove trailing .exe if any
25471  new_path="${new_path/%.exe/}"
25472
25473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25474
25475  # First separate the path from the arguments. This will split at the first
25476  # space.
25477  complete="$AS"
25478  path="${complete%% *}"
25479  tmp="$complete EOL"
25480  arguments="${tmp#* }"
25481
25482  # Input might be given as Windows format, start by converting to
25483  # unix format.
25484  new_path="$path"
25485
25486  windows_path="$new_path"
25487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25488    unix_path=`$CYGPATH -u "$windows_path"`
25489    new_path="$unix_path"
25490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25492    new_path="$unix_path"
25493  fi
25494
25495
25496  # Now try to locate executable using which
25497  new_path=`$WHICH "$new_path" 2> /dev/null`
25498
25499  if test "x$new_path" = x; then
25500    # Oops. Which didn't find the executable.
25501    # The splitting of arguments from the executable at a space might have been incorrect,
25502    # since paths with space are more likely in Windows. Give it another try with the whole
25503    # argument.
25504    path="$complete"
25505    arguments="EOL"
25506    new_path="$path"
25507
25508  windows_path="$new_path"
25509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25510    unix_path=`$CYGPATH -u "$windows_path"`
25511    new_path="$unix_path"
25512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25514    new_path="$unix_path"
25515  fi
25516
25517
25518    new_path=`$WHICH "$new_path" 2> /dev/null`
25519
25520    if test "x$new_path" = x; then
25521      # It's still not found. Now this is an unrecoverable error.
25522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25523$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25524      has_space=`$ECHO "$complete" | $GREP " "`
25525      if test "x$has_space" != x; then
25526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25528      fi
25529      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25530    fi
25531  fi
25532
25533  # Now new_path has a complete unix path to the binary
25534  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25535    # Keep paths in /bin as-is, but remove trailing .exe if any
25536    new_path="${new_path/%.exe/}"
25537    # Do not save /bin paths to all_fixpath_prefixes!
25538  else
25539    # Not in mixed or Windows style, start by that.
25540    new_path=`cmd //c echo $new_path`
25541
25542  input_path="$new_path"
25543  # Check if we need to convert this using DOS-style short mode. If the path
25544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25545  # take no chances and rewrite it.
25546  # Note: m4 eats our [], so we need to use [ and ] instead.
25547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25548  if test "x$has_forbidden_chars" != x; then
25549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25551  fi
25552
25553    # Output is in $new_path
25554
25555  windows_path="$new_path"
25556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25557    unix_path=`$CYGPATH -u "$windows_path"`
25558    new_path="$unix_path"
25559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25561    new_path="$unix_path"
25562  fi
25563
25564    # remove trailing .exe if any
25565    new_path="${new_path/%.exe/}"
25566
25567    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25568    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25569  fi
25570
25571  else
25572    # We're on a posix platform. Hooray! :)
25573    # First separate the path from the arguments. This will split at the first
25574    # space.
25575    complete="$AS"
25576    path="${complete%% *}"
25577    tmp="$complete EOL"
25578    arguments="${tmp#* }"
25579
25580    # Cannot rely on the command "which" here since it doesn't always work.
25581    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25582    if test -z "$is_absolute_path"; then
25583      # Path to executable is not absolute. Find it.
25584      IFS_save="$IFS"
25585      IFS=:
25586      for p in $PATH; do
25587        if test -f "$p/$path" && test -x "$p/$path"; then
25588          new_path="$p/$path"
25589          break
25590        fi
25591      done
25592      IFS="$IFS_save"
25593    else
25594      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25595$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25596      new_path="$path"
25597    fi
25598
25599    if test "x$new_path" = x; then
25600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25601$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25602        has_space=`$ECHO "$complete" | $GREP " "`
25603        if test "x$has_space" != x; then
25604          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25605$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25606        fi
25607        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25608      fi
25609  fi
25610
25611      # Now join together the path and the arguments once again
25612      if test "x$arguments" != xEOL; then
25613        new_complete="$new_path ${arguments% *}"
25614      else
25615        new_complete="$new_path"
25616      fi
25617
25618  if test "x$complete" != "x$new_complete"; then
25619      AS="$new_complete"
25620      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25621$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25622    fi
25623
25624else
25625    AS="$CC -c"
25626fi
25627
25628
25629if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25630    # Extract the first word of "nm", so it can be a program name with args.
25631set dummy nm; ac_word=$2
25632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25633$as_echo_n "checking for $ac_word... " >&6; }
25634if test "${ac_cv_path_NM+set}" = set; then :
25635  $as_echo_n "(cached) " >&6
25636else
25637  case $NM in
25638  [\\/]* | ?:[\\/]*)
25639  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25640  ;;
25641  *)
25642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25643for as_dir in $PATH
25644do
25645  IFS=$as_save_IFS
25646  test -z "$as_dir" && as_dir=.
25647    for ac_exec_ext in '' $ac_executable_extensions; do
25648  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25649    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25651    break 2
25652  fi
25653done
25654  done
25655IFS=$as_save_IFS
25656
25657  ;;
25658esac
25659fi
25660NM=$ac_cv_path_NM
25661if test -n "$NM"; then
25662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25663$as_echo "$NM" >&6; }
25664else
25665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25666$as_echo "no" >&6; }
25667fi
25668
25669
25670
25671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25672
25673  # First separate the path from the arguments. This will split at the first
25674  # space.
25675  complete="$NM"
25676  path="${complete%% *}"
25677  tmp="$complete EOL"
25678  arguments="${tmp#* }"
25679
25680  # Input might be given as Windows format, start by converting to
25681  # unix format.
25682  new_path=`$CYGPATH -u "$path"`
25683
25684  # Now try to locate executable using which
25685  new_path=`$WHICH "$new_path" 2> /dev/null`
25686  # bat and cmd files are not always considered executable in cygwin causing which
25687  # to not find them
25688  if test "x$new_path" = x \
25689           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25690           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25691    new_path=`$CYGPATH -u "$path"`
25692  fi
25693  if test "x$new_path" = x; then
25694    # Oops. Which didn't find the executable.
25695    # The splitting of arguments from the executable at a space might have been incorrect,
25696    # since paths with space are more likely in Windows. Give it another try with the whole
25697    # argument.
25698    path="$complete"
25699    arguments="EOL"
25700    new_path=`$CYGPATH -u "$path"`
25701    new_path=`$WHICH "$new_path" 2> /dev/null`
25702    # bat and cmd files are not always considered executable in cygwin causing which
25703    # to not find them
25704    if test "x$new_path" = x \
25705             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25706             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25707      new_path=`$CYGPATH -u "$path"`
25708    fi
25709    if test "x$new_path" = x; then
25710      # It's still not found. Now this is an unrecoverable error.
25711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25712$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25713      has_space=`$ECHO "$complete" | $GREP " "`
25714      if test "x$has_space" != x; then
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25717      fi
25718      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25719    fi
25720  fi
25721
25722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25725  # "foo.exe" is OK but "foo" is an error.
25726  #
25727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25728  # It is also a way to make sure we got the proper file name for the real test later on.
25729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25730  if test "x$test_shortpath" = x; then
25731    # Short path failed, file does not exist as specified.
25732    # Try adding .exe or .cmd
25733    if test -f "${new_path}.exe"; then
25734       input_to_shortpath="${new_path}.exe"
25735    elif test -f "${new_path}.cmd"; then
25736       input_to_shortpath="${new_path}.cmd"
25737    else
25738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25739$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25740      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25741$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25742      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25743    fi
25744  else
25745    input_to_shortpath="$new_path"
25746  fi
25747
25748  # Call helper function which possibly converts this using DOS-style short mode.
25749  # If so, the updated path is stored in $new_path.
25750  new_path="$input_to_shortpath"
25751
25752  input_path="$input_to_shortpath"
25753  # Check if we need to convert this using DOS-style short mode. If the path
25754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25755  # take no chances and rewrite it.
25756  # Note: m4 eats our [], so we need to use [ and ] instead.
25757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25758  if test "x$has_forbidden_chars" != x; then
25759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25763      # Going to short mode and back again did indeed matter. Since short mode is
25764      # case insensitive, let's make it lowercase to improve readability.
25765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25766      # Now convert it back to Unix-stile (cygpath)
25767      input_path=`$CYGPATH -u "$shortmode_path"`
25768      new_path="$input_path"
25769    fi
25770  fi
25771
25772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25773  if test "x$test_cygdrive_prefix" = x; then
25774    # As a simple fix, exclude /usr/bin since it's not a real path.
25775    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25777      # a path prefixed by /cygdrive for fixpath to work.
25778      new_path="$CYGWIN_ROOT_PATH$input_path"
25779    fi
25780  fi
25781
25782  # remove trailing .exe if any
25783  new_path="${new_path/%.exe/}"
25784
25785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25786
25787  # First separate the path from the arguments. This will split at the first
25788  # space.
25789  complete="$NM"
25790  path="${complete%% *}"
25791  tmp="$complete EOL"
25792  arguments="${tmp#* }"
25793
25794  # Input might be given as Windows format, start by converting to
25795  # unix format.
25796  new_path="$path"
25797
25798  windows_path="$new_path"
25799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25800    unix_path=`$CYGPATH -u "$windows_path"`
25801    new_path="$unix_path"
25802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25804    new_path="$unix_path"
25805  fi
25806
25807
25808  # Now try to locate executable using which
25809  new_path=`$WHICH "$new_path" 2> /dev/null`
25810
25811  if test "x$new_path" = x; then
25812    # Oops. Which didn't find the executable.
25813    # The splitting of arguments from the executable at a space might have been incorrect,
25814    # since paths with space are more likely in Windows. Give it another try with the whole
25815    # argument.
25816    path="$complete"
25817    arguments="EOL"
25818    new_path="$path"
25819
25820  windows_path="$new_path"
25821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25822    unix_path=`$CYGPATH -u "$windows_path"`
25823    new_path="$unix_path"
25824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25826    new_path="$unix_path"
25827  fi
25828
25829
25830    new_path=`$WHICH "$new_path" 2> /dev/null`
25831
25832    if test "x$new_path" = x; then
25833      # It's still not found. Now this is an unrecoverable error.
25834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25835$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25836      has_space=`$ECHO "$complete" | $GREP " "`
25837      if test "x$has_space" != x; then
25838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25840      fi
25841      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25842    fi
25843  fi
25844
25845  # Now new_path has a complete unix path to the binary
25846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25847    # Keep paths in /bin as-is, but remove trailing .exe if any
25848    new_path="${new_path/%.exe/}"
25849    # Do not save /bin paths to all_fixpath_prefixes!
25850  else
25851    # Not in mixed or Windows style, start by that.
25852    new_path=`cmd //c echo $new_path`
25853
25854  input_path="$new_path"
25855  # Check if we need to convert this using DOS-style short mode. If the path
25856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25857  # take no chances and rewrite it.
25858  # Note: m4 eats our [], so we need to use [ and ] instead.
25859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25860  if test "x$has_forbidden_chars" != x; then
25861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25863  fi
25864
25865    # Output is in $new_path
25866
25867  windows_path="$new_path"
25868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25869    unix_path=`$CYGPATH -u "$windows_path"`
25870    new_path="$unix_path"
25871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25873    new_path="$unix_path"
25874  fi
25875
25876    # remove trailing .exe if any
25877    new_path="${new_path/%.exe/}"
25878
25879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25881  fi
25882
25883  else
25884    # We're on a posix platform. Hooray! :)
25885    # First separate the path from the arguments. This will split at the first
25886    # space.
25887    complete="$NM"
25888    path="${complete%% *}"
25889    tmp="$complete EOL"
25890    arguments="${tmp#* }"
25891
25892    # Cannot rely on the command "which" here since it doesn't always work.
25893    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25894    if test -z "$is_absolute_path"; then
25895      # Path to executable is not absolute. Find it.
25896      IFS_save="$IFS"
25897      IFS=:
25898      for p in $PATH; do
25899        if test -f "$p/$path" && test -x "$p/$path"; then
25900          new_path="$p/$path"
25901          break
25902        fi
25903      done
25904      IFS="$IFS_save"
25905    else
25906      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25907$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25908      new_path="$path"
25909    fi
25910
25911    if test "x$new_path" = x; then
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25913$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25914        has_space=`$ECHO "$complete" | $GREP " "`
25915        if test "x$has_space" != x; then
25916          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25917$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25918        fi
25919        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25920      fi
25921  fi
25922
25923      # Now join together the path and the arguments once again
25924      if test "x$arguments" != xEOL; then
25925        new_complete="$new_path ${arguments% *}"
25926      else
25927        new_complete="$new_path"
25928      fi
25929
25930  if test "x$complete" != "x$new_complete"; then
25931      NM="$new_complete"
25932      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25933$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25934    fi
25935
25936    # Extract the first word of "gnm", so it can be a program name with args.
25937set dummy gnm; ac_word=$2
25938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25939$as_echo_n "checking for $ac_word... " >&6; }
25940if test "${ac_cv_path_GNM+set}" = set; then :
25941  $as_echo_n "(cached) " >&6
25942else
25943  case $GNM in
25944  [\\/]* | ?:[\\/]*)
25945  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25946  ;;
25947  *)
25948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25949for as_dir in $PATH
25950do
25951  IFS=$as_save_IFS
25952  test -z "$as_dir" && as_dir=.
25953    for ac_exec_ext in '' $ac_executable_extensions; do
25954  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25955    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25957    break 2
25958  fi
25959done
25960  done
25961IFS=$as_save_IFS
25962
25963  ;;
25964esac
25965fi
25966GNM=$ac_cv_path_GNM
25967if test -n "$GNM"; then
25968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25969$as_echo "$GNM" >&6; }
25970else
25971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25972$as_echo "no" >&6; }
25973fi
25974
25975
25976
25977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25978
25979  # First separate the path from the arguments. This will split at the first
25980  # space.
25981  complete="$GNM"
25982  path="${complete%% *}"
25983  tmp="$complete EOL"
25984  arguments="${tmp#* }"
25985
25986  # Input might be given as Windows format, start by converting to
25987  # unix format.
25988  new_path=`$CYGPATH -u "$path"`
25989
25990  # Now try to locate executable using which
25991  new_path=`$WHICH "$new_path" 2> /dev/null`
25992  # bat and cmd files are not always considered executable in cygwin causing which
25993  # to not find them
25994  if test "x$new_path" = x \
25995           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25996           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25997    new_path=`$CYGPATH -u "$path"`
25998  fi
25999  if test "x$new_path" = x; then
26000    # Oops. Which didn't find the executable.
26001    # The splitting of arguments from the executable at a space might have been incorrect,
26002    # since paths with space are more likely in Windows. Give it another try with the whole
26003    # argument.
26004    path="$complete"
26005    arguments="EOL"
26006    new_path=`$CYGPATH -u "$path"`
26007    new_path=`$WHICH "$new_path" 2> /dev/null`
26008    # bat and cmd files are not always considered executable in cygwin causing which
26009    # to not find them
26010    if test "x$new_path" = x \
26011             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26012             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26013      new_path=`$CYGPATH -u "$path"`
26014    fi
26015    if test "x$new_path" = x; then
26016      # It's still not found. Now this is an unrecoverable error.
26017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26018$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26019      has_space=`$ECHO "$complete" | $GREP " "`
26020      if test "x$has_space" != x; then
26021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26023      fi
26024      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26025    fi
26026  fi
26027
26028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26031  # "foo.exe" is OK but "foo" is an error.
26032  #
26033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26034  # It is also a way to make sure we got the proper file name for the real test later on.
26035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26036  if test "x$test_shortpath" = x; then
26037    # Short path failed, file does not exist as specified.
26038    # Try adding .exe or .cmd
26039    if test -f "${new_path}.exe"; then
26040       input_to_shortpath="${new_path}.exe"
26041    elif test -f "${new_path}.cmd"; then
26042       input_to_shortpath="${new_path}.cmd"
26043    else
26044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26045$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26046      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26047$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26048      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26049    fi
26050  else
26051    input_to_shortpath="$new_path"
26052  fi
26053
26054  # Call helper function which possibly converts this using DOS-style short mode.
26055  # If so, the updated path is stored in $new_path.
26056  new_path="$input_to_shortpath"
26057
26058  input_path="$input_to_shortpath"
26059  # Check if we need to convert this using DOS-style short mode. If the path
26060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26061  # take no chances and rewrite it.
26062  # Note: m4 eats our [], so we need to use [ and ] instead.
26063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26064  if test "x$has_forbidden_chars" != x; then
26065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26069      # Going to short mode and back again did indeed matter. Since short mode is
26070      # case insensitive, let's make it lowercase to improve readability.
26071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26072      # Now convert it back to Unix-stile (cygpath)
26073      input_path=`$CYGPATH -u "$shortmode_path"`
26074      new_path="$input_path"
26075    fi
26076  fi
26077
26078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26079  if test "x$test_cygdrive_prefix" = x; then
26080    # As a simple fix, exclude /usr/bin since it's not a real path.
26081    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26083      # a path prefixed by /cygdrive for fixpath to work.
26084      new_path="$CYGWIN_ROOT_PATH$input_path"
26085    fi
26086  fi
26087
26088  # remove trailing .exe if any
26089  new_path="${new_path/%.exe/}"
26090
26091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26092
26093  # First separate the path from the arguments. This will split at the first
26094  # space.
26095  complete="$GNM"
26096  path="${complete%% *}"
26097  tmp="$complete EOL"
26098  arguments="${tmp#* }"
26099
26100  # Input might be given as Windows format, start by converting to
26101  # unix format.
26102  new_path="$path"
26103
26104  windows_path="$new_path"
26105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26106    unix_path=`$CYGPATH -u "$windows_path"`
26107    new_path="$unix_path"
26108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26110    new_path="$unix_path"
26111  fi
26112
26113
26114  # Now try to locate executable using which
26115  new_path=`$WHICH "$new_path" 2> /dev/null`
26116
26117  if test "x$new_path" = x; then
26118    # Oops. Which didn't find the executable.
26119    # The splitting of arguments from the executable at a space might have been incorrect,
26120    # since paths with space are more likely in Windows. Give it another try with the whole
26121    # argument.
26122    path="$complete"
26123    arguments="EOL"
26124    new_path="$path"
26125
26126  windows_path="$new_path"
26127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26128    unix_path=`$CYGPATH -u "$windows_path"`
26129    new_path="$unix_path"
26130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26132    new_path="$unix_path"
26133  fi
26134
26135
26136    new_path=`$WHICH "$new_path" 2> /dev/null`
26137
26138    if test "x$new_path" = x; then
26139      # It's still not found. Now this is an unrecoverable error.
26140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26141$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26142      has_space=`$ECHO "$complete" | $GREP " "`
26143      if test "x$has_space" != x; then
26144        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26145$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26146      fi
26147      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26148    fi
26149  fi
26150
26151  # Now new_path has a complete unix path to the binary
26152  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26153    # Keep paths in /bin as-is, but remove trailing .exe if any
26154    new_path="${new_path/%.exe/}"
26155    # Do not save /bin paths to all_fixpath_prefixes!
26156  else
26157    # Not in mixed or Windows style, start by that.
26158    new_path=`cmd //c echo $new_path`
26159
26160  input_path="$new_path"
26161  # Check if we need to convert this using DOS-style short mode. If the path
26162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26163  # take no chances and rewrite it.
26164  # Note: m4 eats our [], so we need to use [ and ] instead.
26165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26166  if test "x$has_forbidden_chars" != x; then
26167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26169  fi
26170
26171    # Output is in $new_path
26172
26173  windows_path="$new_path"
26174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26175    unix_path=`$CYGPATH -u "$windows_path"`
26176    new_path="$unix_path"
26177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26179    new_path="$unix_path"
26180  fi
26181
26182    # remove trailing .exe if any
26183    new_path="${new_path/%.exe/}"
26184
26185    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26186    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26187  fi
26188
26189  else
26190    # We're on a posix platform. Hooray! :)
26191    # First separate the path from the arguments. This will split at the first
26192    # space.
26193    complete="$GNM"
26194    path="${complete%% *}"
26195    tmp="$complete EOL"
26196    arguments="${tmp#* }"
26197
26198    # Cannot rely on the command "which" here since it doesn't always work.
26199    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26200    if test -z "$is_absolute_path"; then
26201      # Path to executable is not absolute. Find it.
26202      IFS_save="$IFS"
26203      IFS=:
26204      for p in $PATH; do
26205        if test -f "$p/$path" && test -x "$p/$path"; then
26206          new_path="$p/$path"
26207          break
26208        fi
26209      done
26210      IFS="$IFS_save"
26211    else
26212      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26213$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26214      new_path="$path"
26215    fi
26216
26217    if test "x$new_path" = x; then
26218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26219$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26220        has_space=`$ECHO "$complete" | $GREP " "`
26221        if test "x$has_space" != x; then
26222          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26223$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26224        fi
26225        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26226      fi
26227  fi
26228
26229      # Now join together the path and the arguments once again
26230      if test "x$arguments" != xEOL; then
26231        new_complete="$new_path ${arguments% *}"
26232      else
26233        new_complete="$new_path"
26234      fi
26235
26236  if test "x$complete" != "x$new_complete"; then
26237      GNM="$new_complete"
26238      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26239$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26240    fi
26241
26242    # Extract the first word of "strip", so it can be a program name with args.
26243set dummy strip; ac_word=$2
26244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26245$as_echo_n "checking for $ac_word... " >&6; }
26246if test "${ac_cv_path_STRIP+set}" = set; then :
26247  $as_echo_n "(cached) " >&6
26248else
26249  case $STRIP in
26250  [\\/]* | ?:[\\/]*)
26251  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26252  ;;
26253  *)
26254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26255for as_dir in $PATH
26256do
26257  IFS=$as_save_IFS
26258  test -z "$as_dir" && as_dir=.
26259    for ac_exec_ext in '' $ac_executable_extensions; do
26260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26261    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26263    break 2
26264  fi
26265done
26266  done
26267IFS=$as_save_IFS
26268
26269  ;;
26270esac
26271fi
26272STRIP=$ac_cv_path_STRIP
26273if test -n "$STRIP"; then
26274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26275$as_echo "$STRIP" >&6; }
26276else
26277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26278$as_echo "no" >&6; }
26279fi
26280
26281
26282
26283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26284
26285  # First separate the path from the arguments. This will split at the first
26286  # space.
26287  complete="$STRIP"
26288  path="${complete%% *}"
26289  tmp="$complete EOL"
26290  arguments="${tmp#* }"
26291
26292  # Input might be given as Windows format, start by converting to
26293  # unix format.
26294  new_path=`$CYGPATH -u "$path"`
26295
26296  # Now try to locate executable using which
26297  new_path=`$WHICH "$new_path" 2> /dev/null`
26298  # bat and cmd files are not always considered executable in cygwin causing which
26299  # to not find them
26300  if test "x$new_path" = x \
26301           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26302           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26303    new_path=`$CYGPATH -u "$path"`
26304  fi
26305  if test "x$new_path" = x; then
26306    # Oops. Which didn't find the executable.
26307    # The splitting of arguments from the executable at a space might have been incorrect,
26308    # since paths with space are more likely in Windows. Give it another try with the whole
26309    # argument.
26310    path="$complete"
26311    arguments="EOL"
26312    new_path=`$CYGPATH -u "$path"`
26313    new_path=`$WHICH "$new_path" 2> /dev/null`
26314    # bat and cmd files are not always considered executable in cygwin causing which
26315    # to not find them
26316    if test "x$new_path" = x \
26317             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26318             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26319      new_path=`$CYGPATH -u "$path"`
26320    fi
26321    if test "x$new_path" = x; then
26322      # It's still not found. Now this is an unrecoverable error.
26323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26324$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26325      has_space=`$ECHO "$complete" | $GREP " "`
26326      if test "x$has_space" != x; then
26327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26329      fi
26330      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26331    fi
26332  fi
26333
26334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26337  # "foo.exe" is OK but "foo" is an error.
26338  #
26339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26340  # It is also a way to make sure we got the proper file name for the real test later on.
26341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26342  if test "x$test_shortpath" = x; then
26343    # Short path failed, file does not exist as specified.
26344    # Try adding .exe or .cmd
26345    if test -f "${new_path}.exe"; then
26346       input_to_shortpath="${new_path}.exe"
26347    elif test -f "${new_path}.cmd"; then
26348       input_to_shortpath="${new_path}.cmd"
26349    else
26350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26351$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26354      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26355    fi
26356  else
26357    input_to_shortpath="$new_path"
26358  fi
26359
26360  # Call helper function which possibly converts this using DOS-style short mode.
26361  # If so, the updated path is stored in $new_path.
26362  new_path="$input_to_shortpath"
26363
26364  input_path="$input_to_shortpath"
26365  # Check if we need to convert this using DOS-style short mode. If the path
26366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26367  # take no chances and rewrite it.
26368  # Note: m4 eats our [], so we need to use [ and ] instead.
26369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26370  if test "x$has_forbidden_chars" != x; then
26371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26375      # Going to short mode and back again did indeed matter. Since short mode is
26376      # case insensitive, let's make it lowercase to improve readability.
26377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26378      # Now convert it back to Unix-stile (cygpath)
26379      input_path=`$CYGPATH -u "$shortmode_path"`
26380      new_path="$input_path"
26381    fi
26382  fi
26383
26384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26385  if test "x$test_cygdrive_prefix" = x; then
26386    # As a simple fix, exclude /usr/bin since it's not a real path.
26387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26389      # a path prefixed by /cygdrive for fixpath to work.
26390      new_path="$CYGWIN_ROOT_PATH$input_path"
26391    fi
26392  fi
26393
26394  # remove trailing .exe if any
26395  new_path="${new_path/%.exe/}"
26396
26397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26398
26399  # First separate the path from the arguments. This will split at the first
26400  # space.
26401  complete="$STRIP"
26402  path="${complete%% *}"
26403  tmp="$complete EOL"
26404  arguments="${tmp#* }"
26405
26406  # Input might be given as Windows format, start by converting to
26407  # unix format.
26408  new_path="$path"
26409
26410  windows_path="$new_path"
26411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26412    unix_path=`$CYGPATH -u "$windows_path"`
26413    new_path="$unix_path"
26414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26416    new_path="$unix_path"
26417  fi
26418
26419
26420  # Now try to locate executable using which
26421  new_path=`$WHICH "$new_path" 2> /dev/null`
26422
26423  if test "x$new_path" = x; then
26424    # Oops. Which didn't find the executable.
26425    # The splitting of arguments from the executable at a space might have been incorrect,
26426    # since paths with space are more likely in Windows. Give it another try with the whole
26427    # argument.
26428    path="$complete"
26429    arguments="EOL"
26430    new_path="$path"
26431
26432  windows_path="$new_path"
26433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434    unix_path=`$CYGPATH -u "$windows_path"`
26435    new_path="$unix_path"
26436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26438    new_path="$unix_path"
26439  fi
26440
26441
26442    new_path=`$WHICH "$new_path" 2> /dev/null`
26443
26444    if test "x$new_path" = x; then
26445      # It's still not found. Now this is an unrecoverable error.
26446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26447$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26448      has_space=`$ECHO "$complete" | $GREP " "`
26449      if test "x$has_space" != x; then
26450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26452      fi
26453      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26454    fi
26455  fi
26456
26457  # Now new_path has a complete unix path to the binary
26458  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26459    # Keep paths in /bin as-is, but remove trailing .exe if any
26460    new_path="${new_path/%.exe/}"
26461    # Do not save /bin paths to all_fixpath_prefixes!
26462  else
26463    # Not in mixed or Windows style, start by that.
26464    new_path=`cmd //c echo $new_path`
26465
26466  input_path="$new_path"
26467  # Check if we need to convert this using DOS-style short mode. If the path
26468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26469  # take no chances and rewrite it.
26470  # Note: m4 eats our [], so we need to use [ and ] instead.
26471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26472  if test "x$has_forbidden_chars" != x; then
26473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26475  fi
26476
26477    # Output is in $new_path
26478
26479  windows_path="$new_path"
26480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26481    unix_path=`$CYGPATH -u "$windows_path"`
26482    new_path="$unix_path"
26483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26485    new_path="$unix_path"
26486  fi
26487
26488    # remove trailing .exe if any
26489    new_path="${new_path/%.exe/}"
26490
26491    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26492    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26493  fi
26494
26495  else
26496    # We're on a posix platform. Hooray! :)
26497    # First separate the path from the arguments. This will split at the first
26498    # space.
26499    complete="$STRIP"
26500    path="${complete%% *}"
26501    tmp="$complete EOL"
26502    arguments="${tmp#* }"
26503
26504    # Cannot rely on the command "which" here since it doesn't always work.
26505    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26506    if test -z "$is_absolute_path"; then
26507      # Path to executable is not absolute. Find it.
26508      IFS_save="$IFS"
26509      IFS=:
26510      for p in $PATH; do
26511        if test -f "$p/$path" && test -x "$p/$path"; then
26512          new_path="$p/$path"
26513          break
26514        fi
26515      done
26516      IFS="$IFS_save"
26517    else
26518      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26519$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26520      new_path="$path"
26521    fi
26522
26523    if test "x$new_path" = x; then
26524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26525$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26526        has_space=`$ECHO "$complete" | $GREP " "`
26527        if test "x$has_space" != x; then
26528          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26529$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26530        fi
26531        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26532      fi
26533  fi
26534
26535      # Now join together the path and the arguments once again
26536      if test "x$arguments" != xEOL; then
26537        new_complete="$new_path ${arguments% *}"
26538      else
26539        new_complete="$new_path"
26540      fi
26541
26542  if test "x$complete" != "x$new_complete"; then
26543      STRIP="$new_complete"
26544      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26545$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26546    fi
26547
26548    # Extract the first word of "mcs", so it can be a program name with args.
26549set dummy mcs; ac_word=$2
26550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26551$as_echo_n "checking for $ac_word... " >&6; }
26552if test "${ac_cv_path_MCS+set}" = set; then :
26553  $as_echo_n "(cached) " >&6
26554else
26555  case $MCS in
26556  [\\/]* | ?:[\\/]*)
26557  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26558  ;;
26559  *)
26560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26561for as_dir in $PATH
26562do
26563  IFS=$as_save_IFS
26564  test -z "$as_dir" && as_dir=.
26565    for ac_exec_ext in '' $ac_executable_extensions; do
26566  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26567    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26569    break 2
26570  fi
26571done
26572  done
26573IFS=$as_save_IFS
26574
26575  ;;
26576esac
26577fi
26578MCS=$ac_cv_path_MCS
26579if test -n "$MCS"; then
26580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26581$as_echo "$MCS" >&6; }
26582else
26583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26584$as_echo "no" >&6; }
26585fi
26586
26587
26588
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590
26591  # First separate the path from the arguments. This will split at the first
26592  # space.
26593  complete="$MCS"
26594  path="${complete%% *}"
26595  tmp="$complete EOL"
26596  arguments="${tmp#* }"
26597
26598  # Input might be given as Windows format, start by converting to
26599  # unix format.
26600  new_path=`$CYGPATH -u "$path"`
26601
26602  # Now try to locate executable using which
26603  new_path=`$WHICH "$new_path" 2> /dev/null`
26604  # bat and cmd files are not always considered executable in cygwin causing which
26605  # to not find them
26606  if test "x$new_path" = x \
26607           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26608           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26609    new_path=`$CYGPATH -u "$path"`
26610  fi
26611  if test "x$new_path" = x; then
26612    # Oops. Which didn't find the executable.
26613    # The splitting of arguments from the executable at a space might have been incorrect,
26614    # since paths with space are more likely in Windows. Give it another try with the whole
26615    # argument.
26616    path="$complete"
26617    arguments="EOL"
26618    new_path=`$CYGPATH -u "$path"`
26619    new_path=`$WHICH "$new_path" 2> /dev/null`
26620    # bat and cmd files are not always considered executable in cygwin causing which
26621    # to not find them
26622    if test "x$new_path" = x \
26623             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26624             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26625      new_path=`$CYGPATH -u "$path"`
26626    fi
26627    if test "x$new_path" = x; then
26628      # It's still not found. Now this is an unrecoverable error.
26629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26630$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26631      has_space=`$ECHO "$complete" | $GREP " "`
26632      if test "x$has_space" != x; then
26633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26635      fi
26636      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26637    fi
26638  fi
26639
26640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26643  # "foo.exe" is OK but "foo" is an error.
26644  #
26645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26646  # It is also a way to make sure we got the proper file name for the real test later on.
26647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26648  if test "x$test_shortpath" = x; then
26649    # Short path failed, file does not exist as specified.
26650    # Try adding .exe or .cmd
26651    if test -f "${new_path}.exe"; then
26652       input_to_shortpath="${new_path}.exe"
26653    elif test -f "${new_path}.cmd"; then
26654       input_to_shortpath="${new_path}.cmd"
26655    else
26656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26657$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26658      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26659$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26660      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26661    fi
26662  else
26663    input_to_shortpath="$new_path"
26664  fi
26665
26666  # Call helper function which possibly converts this using DOS-style short mode.
26667  # If so, the updated path is stored in $new_path.
26668  new_path="$input_to_shortpath"
26669
26670  input_path="$input_to_shortpath"
26671  # Check if we need to convert this using DOS-style short mode. If the path
26672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26673  # take no chances and rewrite it.
26674  # Note: m4 eats our [], so we need to use [ and ] instead.
26675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26676  if test "x$has_forbidden_chars" != x; then
26677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26681      # Going to short mode and back again did indeed matter. Since short mode is
26682      # case insensitive, let's make it lowercase to improve readability.
26683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26684      # Now convert it back to Unix-stile (cygpath)
26685      input_path=`$CYGPATH -u "$shortmode_path"`
26686      new_path="$input_path"
26687    fi
26688  fi
26689
26690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26691  if test "x$test_cygdrive_prefix" = x; then
26692    # As a simple fix, exclude /usr/bin since it's not a real path.
26693    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26695      # a path prefixed by /cygdrive for fixpath to work.
26696      new_path="$CYGWIN_ROOT_PATH$input_path"
26697    fi
26698  fi
26699
26700  # remove trailing .exe if any
26701  new_path="${new_path/%.exe/}"
26702
26703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26704
26705  # First separate the path from the arguments. This will split at the first
26706  # space.
26707  complete="$MCS"
26708  path="${complete%% *}"
26709  tmp="$complete EOL"
26710  arguments="${tmp#* }"
26711
26712  # Input might be given as Windows format, start by converting to
26713  # unix format.
26714  new_path="$path"
26715
26716  windows_path="$new_path"
26717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26718    unix_path=`$CYGPATH -u "$windows_path"`
26719    new_path="$unix_path"
26720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26722    new_path="$unix_path"
26723  fi
26724
26725
26726  # Now try to locate executable using which
26727  new_path=`$WHICH "$new_path" 2> /dev/null`
26728
26729  if test "x$new_path" = x; then
26730    # Oops. Which didn't find the executable.
26731    # The splitting of arguments from the executable at a space might have been incorrect,
26732    # since paths with space are more likely in Windows. Give it another try with the whole
26733    # argument.
26734    path="$complete"
26735    arguments="EOL"
26736    new_path="$path"
26737
26738  windows_path="$new_path"
26739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740    unix_path=`$CYGPATH -u "$windows_path"`
26741    new_path="$unix_path"
26742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26744    new_path="$unix_path"
26745  fi
26746
26747
26748    new_path=`$WHICH "$new_path" 2> /dev/null`
26749
26750    if test "x$new_path" = x; then
26751      # It's still not found. Now this is an unrecoverable error.
26752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26753$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26754      has_space=`$ECHO "$complete" | $GREP " "`
26755      if test "x$has_space" != x; then
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26758      fi
26759      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26760    fi
26761  fi
26762
26763  # Now new_path has a complete unix path to the binary
26764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26765    # Keep paths in /bin as-is, but remove trailing .exe if any
26766    new_path="${new_path/%.exe/}"
26767    # Do not save /bin paths to all_fixpath_prefixes!
26768  else
26769    # Not in mixed or Windows style, start by that.
26770    new_path=`cmd //c echo $new_path`
26771
26772  input_path="$new_path"
26773  # Check if we need to convert this using DOS-style short mode. If the path
26774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26775  # take no chances and rewrite it.
26776  # Note: m4 eats our [], so we need to use [ and ] instead.
26777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26778  if test "x$has_forbidden_chars" != x; then
26779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26781  fi
26782
26783    # Output is in $new_path
26784
26785  windows_path="$new_path"
26786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26787    unix_path=`$CYGPATH -u "$windows_path"`
26788    new_path="$unix_path"
26789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26791    new_path="$unix_path"
26792  fi
26793
26794    # remove trailing .exe if any
26795    new_path="${new_path/%.exe/}"
26796
26797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26799  fi
26800
26801  else
26802    # We're on a posix platform. Hooray! :)
26803    # First separate the path from the arguments. This will split at the first
26804    # space.
26805    complete="$MCS"
26806    path="${complete%% *}"
26807    tmp="$complete EOL"
26808    arguments="${tmp#* }"
26809
26810    # Cannot rely on the command "which" here since it doesn't always work.
26811    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26812    if test -z "$is_absolute_path"; then
26813      # Path to executable is not absolute. Find it.
26814      IFS_save="$IFS"
26815      IFS=:
26816      for p in $PATH; do
26817        if test -f "$p/$path" && test -x "$p/$path"; then
26818          new_path="$p/$path"
26819          break
26820        fi
26821      done
26822      IFS="$IFS_save"
26823    else
26824      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26825$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26826      new_path="$path"
26827    fi
26828
26829    if test "x$new_path" = x; then
26830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26831$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26832        has_space=`$ECHO "$complete" | $GREP " "`
26833        if test "x$has_space" != x; then
26834          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26835$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26836        fi
26837        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26838      fi
26839  fi
26840
26841      # Now join together the path and the arguments once again
26842      if test "x$arguments" != xEOL; then
26843        new_complete="$new_path ${arguments% *}"
26844      else
26845        new_complete="$new_path"
26846      fi
26847
26848  if test "x$complete" != "x$new_complete"; then
26849      MCS="$new_complete"
26850      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26851$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26852    fi
26853
26854elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26855    if test -n "$ac_tool_prefix"; then
26856  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26857set dummy ${ac_tool_prefix}nm; ac_word=$2
26858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26859$as_echo_n "checking for $ac_word... " >&6; }
26860if test "${ac_cv_prog_NM+set}" = set; then :
26861  $as_echo_n "(cached) " >&6
26862else
26863  if test -n "$NM"; then
26864  ac_cv_prog_NM="$NM" # Let the user override the test.
26865else
26866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26867for as_dir in $PATH
26868do
26869  IFS=$as_save_IFS
26870  test -z "$as_dir" && as_dir=.
26871    for ac_exec_ext in '' $ac_executable_extensions; do
26872  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26873    ac_cv_prog_NM="${ac_tool_prefix}nm"
26874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26875    break 2
26876  fi
26877done
26878  done
26879IFS=$as_save_IFS
26880
26881fi
26882fi
26883NM=$ac_cv_prog_NM
26884if test -n "$NM"; then
26885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26886$as_echo "$NM" >&6; }
26887else
26888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26889$as_echo "no" >&6; }
26890fi
26891
26892
26893fi
26894if test -z "$ac_cv_prog_NM"; then
26895  ac_ct_NM=$NM
26896  # Extract the first word of "nm", so it can be a program name with args.
26897set dummy nm; ac_word=$2
26898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26899$as_echo_n "checking for $ac_word... " >&6; }
26900if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26901  $as_echo_n "(cached) " >&6
26902else
26903  if test -n "$ac_ct_NM"; then
26904  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26905else
26906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26907for as_dir in $PATH
26908do
26909  IFS=$as_save_IFS
26910  test -z "$as_dir" && as_dir=.
26911    for ac_exec_ext in '' $ac_executable_extensions; do
26912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26913    ac_cv_prog_ac_ct_NM="nm"
26914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26915    break 2
26916  fi
26917done
26918  done
26919IFS=$as_save_IFS
26920
26921fi
26922fi
26923ac_ct_NM=$ac_cv_prog_ac_ct_NM
26924if test -n "$ac_ct_NM"; then
26925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26926$as_echo "$ac_ct_NM" >&6; }
26927else
26928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26929$as_echo "no" >&6; }
26930fi
26931
26932  if test "x$ac_ct_NM" = x; then
26933    NM=""
26934  else
26935    case $cross_compiling:$ac_tool_warned in
26936yes:)
26937{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26938$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26939ac_tool_warned=yes ;;
26940esac
26941    NM=$ac_ct_NM
26942  fi
26943else
26944  NM="$ac_cv_prog_NM"
26945fi
26946
26947
26948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26949
26950  # First separate the path from the arguments. This will split at the first
26951  # space.
26952  complete="$NM"
26953  path="${complete%% *}"
26954  tmp="$complete EOL"
26955  arguments="${tmp#* }"
26956
26957  # Input might be given as Windows format, start by converting to
26958  # unix format.
26959  new_path=`$CYGPATH -u "$path"`
26960
26961  # Now try to locate executable using which
26962  new_path=`$WHICH "$new_path" 2> /dev/null`
26963  # bat and cmd files are not always considered executable in cygwin causing which
26964  # to not find them
26965  if test "x$new_path" = x \
26966           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26967           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26968    new_path=`$CYGPATH -u "$path"`
26969  fi
26970  if test "x$new_path" = x; then
26971    # Oops. Which didn't find the executable.
26972    # The splitting of arguments from the executable at a space might have been incorrect,
26973    # since paths with space are more likely in Windows. Give it another try with the whole
26974    # argument.
26975    path="$complete"
26976    arguments="EOL"
26977    new_path=`$CYGPATH -u "$path"`
26978    new_path=`$WHICH "$new_path" 2> /dev/null`
26979    # bat and cmd files are not always considered executable in cygwin causing which
26980    # to not find them
26981    if test "x$new_path" = x \
26982             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26983             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26984      new_path=`$CYGPATH -u "$path"`
26985    fi
26986    if test "x$new_path" = x; then
26987      # It's still not found. Now this is an unrecoverable error.
26988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26989$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26990      has_space=`$ECHO "$complete" | $GREP " "`
26991      if test "x$has_space" != x; then
26992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26994      fi
26995      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26996    fi
26997  fi
26998
26999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27002  # "foo.exe" is OK but "foo" is an error.
27003  #
27004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27005  # It is also a way to make sure we got the proper file name for the real test later on.
27006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27007  if test "x$test_shortpath" = x; then
27008    # Short path failed, file does not exist as specified.
27009    # Try adding .exe or .cmd
27010    if test -f "${new_path}.exe"; then
27011       input_to_shortpath="${new_path}.exe"
27012    elif test -f "${new_path}.cmd"; then
27013       input_to_shortpath="${new_path}.cmd"
27014    else
27015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27016$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27017      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27018$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27019      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27020    fi
27021  else
27022    input_to_shortpath="$new_path"
27023  fi
27024
27025  # Call helper function which possibly converts this using DOS-style short mode.
27026  # If so, the updated path is stored in $new_path.
27027  new_path="$input_to_shortpath"
27028
27029  input_path="$input_to_shortpath"
27030  # Check if we need to convert this using DOS-style short mode. If the path
27031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27032  # take no chances and rewrite it.
27033  # Note: m4 eats our [], so we need to use [ and ] instead.
27034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27035  if test "x$has_forbidden_chars" != x; then
27036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27040      # Going to short mode and back again did indeed matter. Since short mode is
27041      # case insensitive, let's make it lowercase to improve readability.
27042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27043      # Now convert it back to Unix-stile (cygpath)
27044      input_path=`$CYGPATH -u "$shortmode_path"`
27045      new_path="$input_path"
27046    fi
27047  fi
27048
27049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27050  if test "x$test_cygdrive_prefix" = x; then
27051    # As a simple fix, exclude /usr/bin since it's not a real path.
27052    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27054      # a path prefixed by /cygdrive for fixpath to work.
27055      new_path="$CYGWIN_ROOT_PATH$input_path"
27056    fi
27057  fi
27058
27059  # remove trailing .exe if any
27060  new_path="${new_path/%.exe/}"
27061
27062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27063
27064  # First separate the path from the arguments. This will split at the first
27065  # space.
27066  complete="$NM"
27067  path="${complete%% *}"
27068  tmp="$complete EOL"
27069  arguments="${tmp#* }"
27070
27071  # Input might be given as Windows format, start by converting to
27072  # unix format.
27073  new_path="$path"
27074
27075  windows_path="$new_path"
27076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27077    unix_path=`$CYGPATH -u "$windows_path"`
27078    new_path="$unix_path"
27079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27081    new_path="$unix_path"
27082  fi
27083
27084
27085  # Now try to locate executable using which
27086  new_path=`$WHICH "$new_path" 2> /dev/null`
27087
27088  if test "x$new_path" = x; then
27089    # Oops. Which didn't find the executable.
27090    # The splitting of arguments from the executable at a space might have been incorrect,
27091    # since paths with space are more likely in Windows. Give it another try with the whole
27092    # argument.
27093    path="$complete"
27094    arguments="EOL"
27095    new_path="$path"
27096
27097  windows_path="$new_path"
27098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27099    unix_path=`$CYGPATH -u "$windows_path"`
27100    new_path="$unix_path"
27101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27103    new_path="$unix_path"
27104  fi
27105
27106
27107    new_path=`$WHICH "$new_path" 2> /dev/null`
27108
27109    if test "x$new_path" = x; then
27110      # It's still not found. Now this is an unrecoverable error.
27111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27112$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27113      has_space=`$ECHO "$complete" | $GREP " "`
27114      if test "x$has_space" != x; then
27115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27117      fi
27118      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27119    fi
27120  fi
27121
27122  # Now new_path has a complete unix path to the binary
27123  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27124    # Keep paths in /bin as-is, but remove trailing .exe if any
27125    new_path="${new_path/%.exe/}"
27126    # Do not save /bin paths to all_fixpath_prefixes!
27127  else
27128    # Not in mixed or Windows style, start by that.
27129    new_path=`cmd //c echo $new_path`
27130
27131  input_path="$new_path"
27132  # Check if we need to convert this using DOS-style short mode. If the path
27133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27134  # take no chances and rewrite it.
27135  # Note: m4 eats our [], so we need to use [ and ] instead.
27136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27137  if test "x$has_forbidden_chars" != x; then
27138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27140  fi
27141
27142    # Output is in $new_path
27143
27144  windows_path="$new_path"
27145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27146    unix_path=`$CYGPATH -u "$windows_path"`
27147    new_path="$unix_path"
27148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27150    new_path="$unix_path"
27151  fi
27152
27153    # remove trailing .exe if any
27154    new_path="${new_path/%.exe/}"
27155
27156    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27157    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27158  fi
27159
27160  else
27161    # We're on a posix platform. Hooray! :)
27162    # First separate the path from the arguments. This will split at the first
27163    # space.
27164    complete="$NM"
27165    path="${complete%% *}"
27166    tmp="$complete EOL"
27167    arguments="${tmp#* }"
27168
27169    # Cannot rely on the command "which" here since it doesn't always work.
27170    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27171    if test -z "$is_absolute_path"; then
27172      # Path to executable is not absolute. Find it.
27173      IFS_save="$IFS"
27174      IFS=:
27175      for p in $PATH; do
27176        if test -f "$p/$path" && test -x "$p/$path"; then
27177          new_path="$p/$path"
27178          break
27179        fi
27180      done
27181      IFS="$IFS_save"
27182    else
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27184$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27185      new_path="$path"
27186    fi
27187
27188    if test "x$new_path" = x; then
27189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27190$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27191        has_space=`$ECHO "$complete" | $GREP " "`
27192        if test "x$has_space" != x; then
27193          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27195        fi
27196        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27197      fi
27198  fi
27199
27200      # Now join together the path and the arguments once again
27201      if test "x$arguments" != xEOL; then
27202        new_complete="$new_path ${arguments% *}"
27203      else
27204        new_complete="$new_path"
27205      fi
27206
27207  if test "x$complete" != "x$new_complete"; then
27208      NM="$new_complete"
27209      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27210$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27211    fi
27212
27213    GNM="$NM"
27214
27215    if test -n "$ac_tool_prefix"; then
27216  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27217set dummy ${ac_tool_prefix}strip; ac_word=$2
27218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27219$as_echo_n "checking for $ac_word... " >&6; }
27220if test "${ac_cv_prog_STRIP+set}" = set; then :
27221  $as_echo_n "(cached) " >&6
27222else
27223  if test -n "$STRIP"; then
27224  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27225else
27226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27227for as_dir in $PATH
27228do
27229  IFS=$as_save_IFS
27230  test -z "$as_dir" && as_dir=.
27231    for ac_exec_ext in '' $ac_executable_extensions; do
27232  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27233    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27235    break 2
27236  fi
27237done
27238  done
27239IFS=$as_save_IFS
27240
27241fi
27242fi
27243STRIP=$ac_cv_prog_STRIP
27244if test -n "$STRIP"; then
27245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27246$as_echo "$STRIP" >&6; }
27247else
27248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27249$as_echo "no" >&6; }
27250fi
27251
27252
27253fi
27254if test -z "$ac_cv_prog_STRIP"; then
27255  ac_ct_STRIP=$STRIP
27256  # Extract the first word of "strip", so it can be a program name with args.
27257set dummy strip; ac_word=$2
27258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27259$as_echo_n "checking for $ac_word... " >&6; }
27260if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27261  $as_echo_n "(cached) " >&6
27262else
27263  if test -n "$ac_ct_STRIP"; then
27264  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27265else
27266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27267for as_dir in $PATH
27268do
27269  IFS=$as_save_IFS
27270  test -z "$as_dir" && as_dir=.
27271    for ac_exec_ext in '' $ac_executable_extensions; do
27272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27273    ac_cv_prog_ac_ct_STRIP="strip"
27274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27275    break 2
27276  fi
27277done
27278  done
27279IFS=$as_save_IFS
27280
27281fi
27282fi
27283ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27284if test -n "$ac_ct_STRIP"; then
27285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27286$as_echo "$ac_ct_STRIP" >&6; }
27287else
27288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27289$as_echo "no" >&6; }
27290fi
27291
27292  if test "x$ac_ct_STRIP" = x; then
27293    STRIP=""
27294  else
27295    case $cross_compiling:$ac_tool_warned in
27296yes:)
27297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27299ac_tool_warned=yes ;;
27300esac
27301    STRIP=$ac_ct_STRIP
27302  fi
27303else
27304  STRIP="$ac_cv_prog_STRIP"
27305fi
27306
27307
27308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27309
27310  # First separate the path from the arguments. This will split at the first
27311  # space.
27312  complete="$STRIP"
27313  path="${complete%% *}"
27314  tmp="$complete EOL"
27315  arguments="${tmp#* }"
27316
27317  # Input might be given as Windows format, start by converting to
27318  # unix format.
27319  new_path=`$CYGPATH -u "$path"`
27320
27321  # Now try to locate executable using which
27322  new_path=`$WHICH "$new_path" 2> /dev/null`
27323  # bat and cmd files are not always considered executable in cygwin causing which
27324  # to not find them
27325  if test "x$new_path" = x \
27326           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27327           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27328    new_path=`$CYGPATH -u "$path"`
27329  fi
27330  if test "x$new_path" = x; then
27331    # Oops. Which didn't find the executable.
27332    # The splitting of arguments from the executable at a space might have been incorrect,
27333    # since paths with space are more likely in Windows. Give it another try with the whole
27334    # argument.
27335    path="$complete"
27336    arguments="EOL"
27337    new_path=`$CYGPATH -u "$path"`
27338    new_path=`$WHICH "$new_path" 2> /dev/null`
27339    # bat and cmd files are not always considered executable in cygwin causing which
27340    # to not find them
27341    if test "x$new_path" = x \
27342             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27343             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27344      new_path=`$CYGPATH -u "$path"`
27345    fi
27346    if test "x$new_path" = x; then
27347      # It's still not found. Now this is an unrecoverable error.
27348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27349$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27350      has_space=`$ECHO "$complete" | $GREP " "`
27351      if test "x$has_space" != x; then
27352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27354      fi
27355      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27356    fi
27357  fi
27358
27359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27362  # "foo.exe" is OK but "foo" is an error.
27363  #
27364  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27365  # It is also a way to make sure we got the proper file name for the real test later on.
27366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27367  if test "x$test_shortpath" = x; then
27368    # Short path failed, file does not exist as specified.
27369    # Try adding .exe or .cmd
27370    if test -f "${new_path}.exe"; then
27371       input_to_shortpath="${new_path}.exe"
27372    elif test -f "${new_path}.cmd"; then
27373       input_to_shortpath="${new_path}.cmd"
27374    else
27375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27376$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27377      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27378$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27379      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27380    fi
27381  else
27382    input_to_shortpath="$new_path"
27383  fi
27384
27385  # Call helper function which possibly converts this using DOS-style short mode.
27386  # If so, the updated path is stored in $new_path.
27387  new_path="$input_to_shortpath"
27388
27389  input_path="$input_to_shortpath"
27390  # Check if we need to convert this using DOS-style short mode. If the path
27391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27392  # take no chances and rewrite it.
27393  # Note: m4 eats our [], so we need to use [ and ] instead.
27394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27395  if test "x$has_forbidden_chars" != x; then
27396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27400      # Going to short mode and back again did indeed matter. Since short mode is
27401      # case insensitive, let's make it lowercase to improve readability.
27402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27403      # Now convert it back to Unix-stile (cygpath)
27404      input_path=`$CYGPATH -u "$shortmode_path"`
27405      new_path="$input_path"
27406    fi
27407  fi
27408
27409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27410  if test "x$test_cygdrive_prefix" = x; then
27411    # As a simple fix, exclude /usr/bin since it's not a real path.
27412    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27414      # a path prefixed by /cygdrive for fixpath to work.
27415      new_path="$CYGWIN_ROOT_PATH$input_path"
27416    fi
27417  fi
27418
27419  # remove trailing .exe if any
27420  new_path="${new_path/%.exe/}"
27421
27422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27423
27424  # First separate the path from the arguments. This will split at the first
27425  # space.
27426  complete="$STRIP"
27427  path="${complete%% *}"
27428  tmp="$complete EOL"
27429  arguments="${tmp#* }"
27430
27431  # Input might be given as Windows format, start by converting to
27432  # unix format.
27433  new_path="$path"
27434
27435  windows_path="$new_path"
27436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27437    unix_path=`$CYGPATH -u "$windows_path"`
27438    new_path="$unix_path"
27439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27441    new_path="$unix_path"
27442  fi
27443
27444
27445  # Now try to locate executable using which
27446  new_path=`$WHICH "$new_path" 2> /dev/null`
27447
27448  if test "x$new_path" = x; then
27449    # Oops. Which didn't find the executable.
27450    # The splitting of arguments from the executable at a space might have been incorrect,
27451    # since paths with space are more likely in Windows. Give it another try with the whole
27452    # argument.
27453    path="$complete"
27454    arguments="EOL"
27455    new_path="$path"
27456
27457  windows_path="$new_path"
27458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27459    unix_path=`$CYGPATH -u "$windows_path"`
27460    new_path="$unix_path"
27461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27463    new_path="$unix_path"
27464  fi
27465
27466
27467    new_path=`$WHICH "$new_path" 2> /dev/null`
27468
27469    if test "x$new_path" = x; then
27470      # It's still not found. Now this is an unrecoverable error.
27471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27472$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27473      has_space=`$ECHO "$complete" | $GREP " "`
27474      if test "x$has_space" != x; then
27475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27477      fi
27478      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27479    fi
27480  fi
27481
27482  # Now new_path has a complete unix path to the binary
27483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27484    # Keep paths in /bin as-is, but remove trailing .exe if any
27485    new_path="${new_path/%.exe/}"
27486    # Do not save /bin paths to all_fixpath_prefixes!
27487  else
27488    # Not in mixed or Windows style, start by that.
27489    new_path=`cmd //c echo $new_path`
27490
27491  input_path="$new_path"
27492  # Check if we need to convert this using DOS-style short mode. If the path
27493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27494  # take no chances and rewrite it.
27495  # Note: m4 eats our [], so we need to use [ and ] instead.
27496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27497  if test "x$has_forbidden_chars" != x; then
27498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27500  fi
27501
27502    # Output is in $new_path
27503
27504  windows_path="$new_path"
27505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27506    unix_path=`$CYGPATH -u "$windows_path"`
27507    new_path="$unix_path"
27508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27510    new_path="$unix_path"
27511  fi
27512
27513    # remove trailing .exe if any
27514    new_path="${new_path/%.exe/}"
27515
27516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27518  fi
27519
27520  else
27521    # We're on a posix platform. Hooray! :)
27522    # First separate the path from the arguments. This will split at the first
27523    # space.
27524    complete="$STRIP"
27525    path="${complete%% *}"
27526    tmp="$complete EOL"
27527    arguments="${tmp#* }"
27528
27529    # Cannot rely on the command "which" here since it doesn't always work.
27530    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27531    if test -z "$is_absolute_path"; then
27532      # Path to executable is not absolute. Find it.
27533      IFS_save="$IFS"
27534      IFS=:
27535      for p in $PATH; do
27536        if test -f "$p/$path" && test -x "$p/$path"; then
27537          new_path="$p/$path"
27538          break
27539        fi
27540      done
27541      IFS="$IFS_save"
27542    else
27543      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27544$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27545      new_path="$path"
27546    fi
27547
27548    if test "x$new_path" = x; then
27549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27550$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27551        has_space=`$ECHO "$complete" | $GREP " "`
27552        if test "x$has_space" != x; then
27553          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27555        fi
27556        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27557      fi
27558  fi
27559
27560      # Now join together the path and the arguments once again
27561      if test "x$arguments" != xEOL; then
27562        new_complete="$new_path ${arguments% *}"
27563      else
27564        new_complete="$new_path"
27565      fi
27566
27567  if test "x$complete" != "x$new_complete"; then
27568      STRIP="$new_complete"
27569      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27570$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27571    fi
27572
27573fi
27574
27575# objcopy is used for moving debug symbols to separate files when
27576# full debug symbols are enabled.
27577if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27578    if test -n "$ac_tool_prefix"; then
27579  for ac_prog in gobjcopy objcopy
27580  do
27581    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27582set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27584$as_echo_n "checking for $ac_word... " >&6; }
27585if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27586  $as_echo_n "(cached) " >&6
27587else
27588  if test -n "$OBJCOPY"; then
27589  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27590else
27591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27592for as_dir in $PATH
27593do
27594  IFS=$as_save_IFS
27595  test -z "$as_dir" && as_dir=.
27596    for ac_exec_ext in '' $ac_executable_extensions; do
27597  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27598    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27600    break 2
27601  fi
27602done
27603  done
27604IFS=$as_save_IFS
27605
27606fi
27607fi
27608OBJCOPY=$ac_cv_prog_OBJCOPY
27609if test -n "$OBJCOPY"; then
27610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27611$as_echo "$OBJCOPY" >&6; }
27612else
27613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27614$as_echo "no" >&6; }
27615fi
27616
27617
27618    test -n "$OBJCOPY" && break
27619  done
27620fi
27621if test -z "$OBJCOPY"; then
27622  ac_ct_OBJCOPY=$OBJCOPY
27623  for ac_prog in gobjcopy objcopy
27624do
27625  # Extract the first word of "$ac_prog", so it can be a program name with args.
27626set dummy $ac_prog; ac_word=$2
27627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27628$as_echo_n "checking for $ac_word... " >&6; }
27629if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27630  $as_echo_n "(cached) " >&6
27631else
27632  if test -n "$ac_ct_OBJCOPY"; then
27633  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27634else
27635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27636for as_dir in $PATH
27637do
27638  IFS=$as_save_IFS
27639  test -z "$as_dir" && as_dir=.
27640    for ac_exec_ext in '' $ac_executable_extensions; do
27641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27642    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27644    break 2
27645  fi
27646done
27647  done
27648IFS=$as_save_IFS
27649
27650fi
27651fi
27652ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27653if test -n "$ac_ct_OBJCOPY"; then
27654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27655$as_echo "$ac_ct_OBJCOPY" >&6; }
27656else
27657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27658$as_echo "no" >&6; }
27659fi
27660
27661
27662  test -n "$ac_ct_OBJCOPY" && break
27663done
27664
27665  if test "x$ac_ct_OBJCOPY" = x; then
27666    OBJCOPY=""
27667  else
27668    case $cross_compiling:$ac_tool_warned in
27669yes:)
27670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27672ac_tool_warned=yes ;;
27673esac
27674    OBJCOPY=$ac_ct_OBJCOPY
27675  fi
27676fi
27677
27678    # Only call fixup if objcopy was found.
27679    if test -n "$OBJCOPY"; then
27680
27681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27682
27683  # First separate the path from the arguments. This will split at the first
27684  # space.
27685  complete="$OBJCOPY"
27686  path="${complete%% *}"
27687  tmp="$complete EOL"
27688  arguments="${tmp#* }"
27689
27690  # Input might be given as Windows format, start by converting to
27691  # unix format.
27692  new_path=`$CYGPATH -u "$path"`
27693
27694  # Now try to locate executable using which
27695  new_path=`$WHICH "$new_path" 2> /dev/null`
27696  # bat and cmd files are not always considered executable in cygwin causing which
27697  # to not find them
27698  if test "x$new_path" = x \
27699           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27700           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27701    new_path=`$CYGPATH -u "$path"`
27702  fi
27703  if test "x$new_path" = x; then
27704    # Oops. Which didn't find the executable.
27705    # The splitting of arguments from the executable at a space might have been incorrect,
27706    # since paths with space are more likely in Windows. Give it another try with the whole
27707    # argument.
27708    path="$complete"
27709    arguments="EOL"
27710    new_path=`$CYGPATH -u "$path"`
27711    new_path=`$WHICH "$new_path" 2> /dev/null`
27712    # bat and cmd files are not always considered executable in cygwin causing which
27713    # to not find them
27714    if test "x$new_path" = x \
27715             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27716             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27717      new_path=`$CYGPATH -u "$path"`
27718    fi
27719    if test "x$new_path" = x; then
27720      # It's still not found. Now this is an unrecoverable error.
27721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27722$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27723      has_space=`$ECHO "$complete" | $GREP " "`
27724      if test "x$has_space" != x; then
27725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27727      fi
27728      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27729    fi
27730  fi
27731
27732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27735  # "foo.exe" is OK but "foo" is an error.
27736  #
27737  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27738  # It is also a way to make sure we got the proper file name for the real test later on.
27739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27740  if test "x$test_shortpath" = x; then
27741    # Short path failed, file does not exist as specified.
27742    # Try adding .exe or .cmd
27743    if test -f "${new_path}.exe"; then
27744       input_to_shortpath="${new_path}.exe"
27745    elif test -f "${new_path}.cmd"; then
27746       input_to_shortpath="${new_path}.cmd"
27747    else
27748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27749$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27752      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27753    fi
27754  else
27755    input_to_shortpath="$new_path"
27756  fi
27757
27758  # Call helper function which possibly converts this using DOS-style short mode.
27759  # If so, the updated path is stored in $new_path.
27760  new_path="$input_to_shortpath"
27761
27762  input_path="$input_to_shortpath"
27763  # Check if we need to convert this using DOS-style short mode. If the path
27764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27765  # take no chances and rewrite it.
27766  # Note: m4 eats our [], so we need to use [ and ] instead.
27767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27768  if test "x$has_forbidden_chars" != x; then
27769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27773      # Going to short mode and back again did indeed matter. Since short mode is
27774      # case insensitive, let's make it lowercase to improve readability.
27775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27776      # Now convert it back to Unix-stile (cygpath)
27777      input_path=`$CYGPATH -u "$shortmode_path"`
27778      new_path="$input_path"
27779    fi
27780  fi
27781
27782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27783  if test "x$test_cygdrive_prefix" = x; then
27784    # As a simple fix, exclude /usr/bin since it's not a real path.
27785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27787      # a path prefixed by /cygdrive for fixpath to work.
27788      new_path="$CYGWIN_ROOT_PATH$input_path"
27789    fi
27790  fi
27791
27792  # remove trailing .exe if any
27793  new_path="${new_path/%.exe/}"
27794
27795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27796
27797  # First separate the path from the arguments. This will split at the first
27798  # space.
27799  complete="$OBJCOPY"
27800  path="${complete%% *}"
27801  tmp="$complete EOL"
27802  arguments="${tmp#* }"
27803
27804  # Input might be given as Windows format, start by converting to
27805  # unix format.
27806  new_path="$path"
27807
27808  windows_path="$new_path"
27809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27810    unix_path=`$CYGPATH -u "$windows_path"`
27811    new_path="$unix_path"
27812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27814    new_path="$unix_path"
27815  fi
27816
27817
27818  # Now try to locate executable using which
27819  new_path=`$WHICH "$new_path" 2> /dev/null`
27820
27821  if test "x$new_path" = x; then
27822    # Oops. Which didn't find the executable.
27823    # The splitting of arguments from the executable at a space might have been incorrect,
27824    # since paths with space are more likely in Windows. Give it another try with the whole
27825    # argument.
27826    path="$complete"
27827    arguments="EOL"
27828    new_path="$path"
27829
27830  windows_path="$new_path"
27831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27832    unix_path=`$CYGPATH -u "$windows_path"`
27833    new_path="$unix_path"
27834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27836    new_path="$unix_path"
27837  fi
27838
27839
27840    new_path=`$WHICH "$new_path" 2> /dev/null`
27841
27842    if test "x$new_path" = x; then
27843      # It's still not found. Now this is an unrecoverable error.
27844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27845$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27846      has_space=`$ECHO "$complete" | $GREP " "`
27847      if test "x$has_space" != x; then
27848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27850      fi
27851      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27852    fi
27853  fi
27854
27855  # Now new_path has a complete unix path to the binary
27856  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27857    # Keep paths in /bin as-is, but remove trailing .exe if any
27858    new_path="${new_path/%.exe/}"
27859    # Do not save /bin paths to all_fixpath_prefixes!
27860  else
27861    # Not in mixed or Windows style, start by that.
27862    new_path=`cmd //c echo $new_path`
27863
27864  input_path="$new_path"
27865  # Check if we need to convert this using DOS-style short mode. If the path
27866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27867  # take no chances and rewrite it.
27868  # Note: m4 eats our [], so we need to use [ and ] instead.
27869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27870  if test "x$has_forbidden_chars" != x; then
27871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27873  fi
27874
27875    # Output is in $new_path
27876
27877  windows_path="$new_path"
27878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27879    unix_path=`$CYGPATH -u "$windows_path"`
27880    new_path="$unix_path"
27881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27883    new_path="$unix_path"
27884  fi
27885
27886    # remove trailing .exe if any
27887    new_path="${new_path/%.exe/}"
27888
27889    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27890    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27891  fi
27892
27893  else
27894    # We're on a posix platform. Hooray! :)
27895    # First separate the path from the arguments. This will split at the first
27896    # space.
27897    complete="$OBJCOPY"
27898    path="${complete%% *}"
27899    tmp="$complete EOL"
27900    arguments="${tmp#* }"
27901
27902    # Cannot rely on the command "which" here since it doesn't always work.
27903    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27904    if test -z "$is_absolute_path"; then
27905      # Path to executable is not absolute. Find it.
27906      IFS_save="$IFS"
27907      IFS=:
27908      for p in $PATH; do
27909        if test -f "$p/$path" && test -x "$p/$path"; then
27910          new_path="$p/$path"
27911          break
27912        fi
27913      done
27914      IFS="$IFS_save"
27915    else
27916      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27917$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27918      new_path="$path"
27919    fi
27920
27921    if test "x$new_path" = x; then
27922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27923$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27924        has_space=`$ECHO "$complete" | $GREP " "`
27925        if test "x$has_space" != x; then
27926          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27928        fi
27929        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27930      fi
27931  fi
27932
27933      # Now join together the path and the arguments once again
27934      if test "x$arguments" != xEOL; then
27935        new_complete="$new_path ${arguments% *}"
27936      else
27937        new_complete="$new_path"
27938      fi
27939
27940  if test "x$complete" != "x$new_complete"; then
27941      OBJCOPY="$new_complete"
27942      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27943$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27944    fi
27945
27946    fi
27947fi
27948
27949if test -n "$ac_tool_prefix"; then
27950  for ac_prog in gobjdump objdump
27951  do
27952    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27953set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27955$as_echo_n "checking for $ac_word... " >&6; }
27956if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27957  $as_echo_n "(cached) " >&6
27958else
27959  if test -n "$OBJDUMP"; then
27960  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27961else
27962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27963for as_dir in $PATH
27964do
27965  IFS=$as_save_IFS
27966  test -z "$as_dir" && as_dir=.
27967    for ac_exec_ext in '' $ac_executable_extensions; do
27968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27969    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27971    break 2
27972  fi
27973done
27974  done
27975IFS=$as_save_IFS
27976
27977fi
27978fi
27979OBJDUMP=$ac_cv_prog_OBJDUMP
27980if test -n "$OBJDUMP"; then
27981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27982$as_echo "$OBJDUMP" >&6; }
27983else
27984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27985$as_echo "no" >&6; }
27986fi
27987
27988
27989    test -n "$OBJDUMP" && break
27990  done
27991fi
27992if test -z "$OBJDUMP"; then
27993  ac_ct_OBJDUMP=$OBJDUMP
27994  for ac_prog in gobjdump objdump
27995do
27996  # Extract the first word of "$ac_prog", so it can be a program name with args.
27997set dummy $ac_prog; ac_word=$2
27998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27999$as_echo_n "checking for $ac_word... " >&6; }
28000if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
28001  $as_echo_n "(cached) " >&6
28002else
28003  if test -n "$ac_ct_OBJDUMP"; then
28004  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28005else
28006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28007for as_dir in $PATH
28008do
28009  IFS=$as_save_IFS
28010  test -z "$as_dir" && as_dir=.
28011    for ac_exec_ext in '' $ac_executable_extensions; do
28012  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28013    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28015    break 2
28016  fi
28017done
28018  done
28019IFS=$as_save_IFS
28020
28021fi
28022fi
28023ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28024if test -n "$ac_ct_OBJDUMP"; then
28025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28026$as_echo "$ac_ct_OBJDUMP" >&6; }
28027else
28028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28029$as_echo "no" >&6; }
28030fi
28031
28032
28033  test -n "$ac_ct_OBJDUMP" && break
28034done
28035
28036  if test "x$ac_ct_OBJDUMP" = x; then
28037    OBJDUMP=""
28038  else
28039    case $cross_compiling:$ac_tool_warned in
28040yes:)
28041{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28042$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28043ac_tool_warned=yes ;;
28044esac
28045    OBJDUMP=$ac_ct_OBJDUMP
28046  fi
28047fi
28048
28049if test "x$OBJDUMP" != x; then
28050  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28051
28052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28053
28054  # First separate the path from the arguments. This will split at the first
28055  # space.
28056  complete="$OBJDUMP"
28057  path="${complete%% *}"
28058  tmp="$complete EOL"
28059  arguments="${tmp#* }"
28060
28061  # Input might be given as Windows format, start by converting to
28062  # unix format.
28063  new_path=`$CYGPATH -u "$path"`
28064
28065  # Now try to locate executable using which
28066  new_path=`$WHICH "$new_path" 2> /dev/null`
28067  # bat and cmd files are not always considered executable in cygwin causing which
28068  # to not find them
28069  if test "x$new_path" = x \
28070           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28071           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28072    new_path=`$CYGPATH -u "$path"`
28073  fi
28074  if test "x$new_path" = x; then
28075    # Oops. Which didn't find the executable.
28076    # The splitting of arguments from the executable at a space might have been incorrect,
28077    # since paths with space are more likely in Windows. Give it another try with the whole
28078    # argument.
28079    path="$complete"
28080    arguments="EOL"
28081    new_path=`$CYGPATH -u "$path"`
28082    new_path=`$WHICH "$new_path" 2> /dev/null`
28083    # bat and cmd files are not always considered executable in cygwin causing which
28084    # to not find them
28085    if test "x$new_path" = x \
28086             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28087             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28088      new_path=`$CYGPATH -u "$path"`
28089    fi
28090    if test "x$new_path" = x; then
28091      # It's still not found. Now this is an unrecoverable error.
28092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28093$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28094      has_space=`$ECHO "$complete" | $GREP " "`
28095      if test "x$has_space" != x; then
28096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28098      fi
28099      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28100    fi
28101  fi
28102
28103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28106  # "foo.exe" is OK but "foo" is an error.
28107  #
28108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28109  # It is also a way to make sure we got the proper file name for the real test later on.
28110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28111  if test "x$test_shortpath" = x; then
28112    # Short path failed, file does not exist as specified.
28113    # Try adding .exe or .cmd
28114    if test -f "${new_path}.exe"; then
28115       input_to_shortpath="${new_path}.exe"
28116    elif test -f "${new_path}.cmd"; then
28117       input_to_shortpath="${new_path}.cmd"
28118    else
28119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28120$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28123      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28124    fi
28125  else
28126    input_to_shortpath="$new_path"
28127  fi
28128
28129  # Call helper function which possibly converts this using DOS-style short mode.
28130  # If so, the updated path is stored in $new_path.
28131  new_path="$input_to_shortpath"
28132
28133  input_path="$input_to_shortpath"
28134  # Check if we need to convert this using DOS-style short mode. If the path
28135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28136  # take no chances and rewrite it.
28137  # Note: m4 eats our [], so we need to use [ and ] instead.
28138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28139  if test "x$has_forbidden_chars" != x; then
28140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28144      # Going to short mode and back again did indeed matter. Since short mode is
28145      # case insensitive, let's make it lowercase to improve readability.
28146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28147      # Now convert it back to Unix-stile (cygpath)
28148      input_path=`$CYGPATH -u "$shortmode_path"`
28149      new_path="$input_path"
28150    fi
28151  fi
28152
28153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28154  if test "x$test_cygdrive_prefix" = x; then
28155    # As a simple fix, exclude /usr/bin since it's not a real path.
28156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28158      # a path prefixed by /cygdrive for fixpath to work.
28159      new_path="$CYGWIN_ROOT_PATH$input_path"
28160    fi
28161  fi
28162
28163  # remove trailing .exe if any
28164  new_path="${new_path/%.exe/}"
28165
28166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28167
28168  # First separate the path from the arguments. This will split at the first
28169  # space.
28170  complete="$OBJDUMP"
28171  path="${complete%% *}"
28172  tmp="$complete EOL"
28173  arguments="${tmp#* }"
28174
28175  # Input might be given as Windows format, start by converting to
28176  # unix format.
28177  new_path="$path"
28178
28179  windows_path="$new_path"
28180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28181    unix_path=`$CYGPATH -u "$windows_path"`
28182    new_path="$unix_path"
28183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28185    new_path="$unix_path"
28186  fi
28187
28188
28189  # Now try to locate executable using which
28190  new_path=`$WHICH "$new_path" 2> /dev/null`
28191
28192  if test "x$new_path" = x; then
28193    # Oops. Which didn't find the executable.
28194    # The splitting of arguments from the executable at a space might have been incorrect,
28195    # since paths with space are more likely in Windows. Give it another try with the whole
28196    # argument.
28197    path="$complete"
28198    arguments="EOL"
28199    new_path="$path"
28200
28201  windows_path="$new_path"
28202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28203    unix_path=`$CYGPATH -u "$windows_path"`
28204    new_path="$unix_path"
28205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28207    new_path="$unix_path"
28208  fi
28209
28210
28211    new_path=`$WHICH "$new_path" 2> /dev/null`
28212
28213    if test "x$new_path" = x; then
28214      # It's still not found. Now this is an unrecoverable error.
28215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28216$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28217      has_space=`$ECHO "$complete" | $GREP " "`
28218      if test "x$has_space" != x; then
28219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28221      fi
28222      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28223    fi
28224  fi
28225
28226  # Now new_path has a complete unix path to the binary
28227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28228    # Keep paths in /bin as-is, but remove trailing .exe if any
28229    new_path="${new_path/%.exe/}"
28230    # Do not save /bin paths to all_fixpath_prefixes!
28231  else
28232    # Not in mixed or Windows style, start by that.
28233    new_path=`cmd //c echo $new_path`
28234
28235  input_path="$new_path"
28236  # Check if we need to convert this using DOS-style short mode. If the path
28237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28238  # take no chances and rewrite it.
28239  # Note: m4 eats our [], so we need to use [ and ] instead.
28240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28241  if test "x$has_forbidden_chars" != x; then
28242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28244  fi
28245
28246    # Output is in $new_path
28247
28248  windows_path="$new_path"
28249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28250    unix_path=`$CYGPATH -u "$windows_path"`
28251    new_path="$unix_path"
28252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28254    new_path="$unix_path"
28255  fi
28256
28257    # remove trailing .exe if any
28258    new_path="${new_path/%.exe/}"
28259
28260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28262  fi
28263
28264  else
28265    # We're on a posix platform. Hooray! :)
28266    # First separate the path from the arguments. This will split at the first
28267    # space.
28268    complete="$OBJDUMP"
28269    path="${complete%% *}"
28270    tmp="$complete EOL"
28271    arguments="${tmp#* }"
28272
28273    # Cannot rely on the command "which" here since it doesn't always work.
28274    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28275    if test -z "$is_absolute_path"; then
28276      # Path to executable is not absolute. Find it.
28277      IFS_save="$IFS"
28278      IFS=:
28279      for p in $PATH; do
28280        if test -f "$p/$path" && test -x "$p/$path"; then
28281          new_path="$p/$path"
28282          break
28283        fi
28284      done
28285      IFS="$IFS_save"
28286    else
28287      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28288$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28289      new_path="$path"
28290    fi
28291
28292    if test "x$new_path" = x; then
28293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28294$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28295        has_space=`$ECHO "$complete" | $GREP " "`
28296        if test "x$has_space" != x; then
28297          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28298$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28299        fi
28300        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28301      fi
28302  fi
28303
28304      # Now join together the path and the arguments once again
28305      if test "x$arguments" != xEOL; then
28306        new_complete="$new_path ${arguments% *}"
28307      else
28308        new_complete="$new_path"
28309      fi
28310
28311  if test "x$complete" != "x$new_complete"; then
28312      OBJDUMP="$new_complete"
28313      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28314$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28315    fi
28316
28317fi
28318
28319if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28320   # Extract the first word of "lipo", so it can be a program name with args.
28321set dummy lipo; ac_word=$2
28322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28323$as_echo_n "checking for $ac_word... " >&6; }
28324if test "${ac_cv_path_LIPO+set}" = set; then :
28325  $as_echo_n "(cached) " >&6
28326else
28327  case $LIPO in
28328  [\\/]* | ?:[\\/]*)
28329  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28330  ;;
28331  *)
28332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28333for as_dir in $PATH
28334do
28335  IFS=$as_save_IFS
28336  test -z "$as_dir" && as_dir=.
28337    for ac_exec_ext in '' $ac_executable_extensions; do
28338  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28339    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28341    break 2
28342  fi
28343done
28344  done
28345IFS=$as_save_IFS
28346
28347  ;;
28348esac
28349fi
28350LIPO=$ac_cv_path_LIPO
28351if test -n "$LIPO"; then
28352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28353$as_echo "$LIPO" >&6; }
28354else
28355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28356$as_echo "no" >&6; }
28357fi
28358
28359
28360
28361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28362
28363  # First separate the path from the arguments. This will split at the first
28364  # space.
28365  complete="$LIPO"
28366  path="${complete%% *}"
28367  tmp="$complete EOL"
28368  arguments="${tmp#* }"
28369
28370  # Input might be given as Windows format, start by converting to
28371  # unix format.
28372  new_path=`$CYGPATH -u "$path"`
28373
28374  # Now try to locate executable using which
28375  new_path=`$WHICH "$new_path" 2> /dev/null`
28376  # bat and cmd files are not always considered executable in cygwin causing which
28377  # to not find them
28378  if test "x$new_path" = x \
28379           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28380           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28381    new_path=`$CYGPATH -u "$path"`
28382  fi
28383  if test "x$new_path" = x; then
28384    # Oops. Which didn't find the executable.
28385    # The splitting of arguments from the executable at a space might have been incorrect,
28386    # since paths with space are more likely in Windows. Give it another try with the whole
28387    # argument.
28388    path="$complete"
28389    arguments="EOL"
28390    new_path=`$CYGPATH -u "$path"`
28391    new_path=`$WHICH "$new_path" 2> /dev/null`
28392    # bat and cmd files are not always considered executable in cygwin causing which
28393    # to not find them
28394    if test "x$new_path" = x \
28395             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28396             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28397      new_path=`$CYGPATH -u "$path"`
28398    fi
28399    if test "x$new_path" = x; then
28400      # It's still not found. Now this is an unrecoverable error.
28401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28402$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28403      has_space=`$ECHO "$complete" | $GREP " "`
28404      if test "x$has_space" != x; then
28405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28407      fi
28408      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28409    fi
28410  fi
28411
28412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28415  # "foo.exe" is OK but "foo" is an error.
28416  #
28417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28418  # It is also a way to make sure we got the proper file name for the real test later on.
28419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28420  if test "x$test_shortpath" = x; then
28421    # Short path failed, file does not exist as specified.
28422    # Try adding .exe or .cmd
28423    if test -f "${new_path}.exe"; then
28424       input_to_shortpath="${new_path}.exe"
28425    elif test -f "${new_path}.cmd"; then
28426       input_to_shortpath="${new_path}.cmd"
28427    else
28428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28429$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28430      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28431$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28432      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28433    fi
28434  else
28435    input_to_shortpath="$new_path"
28436  fi
28437
28438  # Call helper function which possibly converts this using DOS-style short mode.
28439  # If so, the updated path is stored in $new_path.
28440  new_path="$input_to_shortpath"
28441
28442  input_path="$input_to_shortpath"
28443  # Check if we need to convert this using DOS-style short mode. If the path
28444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28445  # take no chances and rewrite it.
28446  # Note: m4 eats our [], so we need to use [ and ] instead.
28447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28448  if test "x$has_forbidden_chars" != x; then
28449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28453      # Going to short mode and back again did indeed matter. Since short mode is
28454      # case insensitive, let's make it lowercase to improve readability.
28455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28456      # Now convert it back to Unix-stile (cygpath)
28457      input_path=`$CYGPATH -u "$shortmode_path"`
28458      new_path="$input_path"
28459    fi
28460  fi
28461
28462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28463  if test "x$test_cygdrive_prefix" = x; then
28464    # As a simple fix, exclude /usr/bin since it's not a real path.
28465    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28467      # a path prefixed by /cygdrive for fixpath to work.
28468      new_path="$CYGWIN_ROOT_PATH$input_path"
28469    fi
28470  fi
28471
28472  # remove trailing .exe if any
28473  new_path="${new_path/%.exe/}"
28474
28475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28476
28477  # First separate the path from the arguments. This will split at the first
28478  # space.
28479  complete="$LIPO"
28480  path="${complete%% *}"
28481  tmp="$complete EOL"
28482  arguments="${tmp#* }"
28483
28484  # Input might be given as Windows format, start by converting to
28485  # unix format.
28486  new_path="$path"
28487
28488  windows_path="$new_path"
28489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28490    unix_path=`$CYGPATH -u "$windows_path"`
28491    new_path="$unix_path"
28492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28494    new_path="$unix_path"
28495  fi
28496
28497
28498  # Now try to locate executable using which
28499  new_path=`$WHICH "$new_path" 2> /dev/null`
28500
28501  if test "x$new_path" = x; then
28502    # Oops. Which didn't find the executable.
28503    # The splitting of arguments from the executable at a space might have been incorrect,
28504    # since paths with space are more likely in Windows. Give it another try with the whole
28505    # argument.
28506    path="$complete"
28507    arguments="EOL"
28508    new_path="$path"
28509
28510  windows_path="$new_path"
28511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28512    unix_path=`$CYGPATH -u "$windows_path"`
28513    new_path="$unix_path"
28514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28516    new_path="$unix_path"
28517  fi
28518
28519
28520    new_path=`$WHICH "$new_path" 2> /dev/null`
28521
28522    if test "x$new_path" = x; then
28523      # It's still not found. Now this is an unrecoverable error.
28524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28525$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28526      has_space=`$ECHO "$complete" | $GREP " "`
28527      if test "x$has_space" != x; then
28528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28530      fi
28531      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28532    fi
28533  fi
28534
28535  # Now new_path has a complete unix path to the binary
28536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28537    # Keep paths in /bin as-is, but remove trailing .exe if any
28538    new_path="${new_path/%.exe/}"
28539    # Do not save /bin paths to all_fixpath_prefixes!
28540  else
28541    # Not in mixed or Windows style, start by that.
28542    new_path=`cmd //c echo $new_path`
28543
28544  input_path="$new_path"
28545  # Check if we need to convert this using DOS-style short mode. If the path
28546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28547  # take no chances and rewrite it.
28548  # Note: m4 eats our [], so we need to use [ and ] instead.
28549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28550  if test "x$has_forbidden_chars" != x; then
28551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28553  fi
28554
28555    # Output is in $new_path
28556
28557  windows_path="$new_path"
28558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28559    unix_path=`$CYGPATH -u "$windows_path"`
28560    new_path="$unix_path"
28561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28563    new_path="$unix_path"
28564  fi
28565
28566    # remove trailing .exe if any
28567    new_path="${new_path/%.exe/}"
28568
28569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28571  fi
28572
28573  else
28574    # We're on a posix platform. Hooray! :)
28575    # First separate the path from the arguments. This will split at the first
28576    # space.
28577    complete="$LIPO"
28578    path="${complete%% *}"
28579    tmp="$complete EOL"
28580    arguments="${tmp#* }"
28581
28582    # Cannot rely on the command "which" here since it doesn't always work.
28583    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28584    if test -z "$is_absolute_path"; then
28585      # Path to executable is not absolute. Find it.
28586      IFS_save="$IFS"
28587      IFS=:
28588      for p in $PATH; do
28589        if test -f "$p/$path" && test -x "$p/$path"; then
28590          new_path="$p/$path"
28591          break
28592        fi
28593      done
28594      IFS="$IFS_save"
28595    else
28596      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28597$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28598      new_path="$path"
28599    fi
28600
28601    if test "x$new_path" = x; then
28602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28603$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28604        has_space=`$ECHO "$complete" | $GREP " "`
28605        if test "x$has_space" != x; then
28606          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28607$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28608        fi
28609        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28610      fi
28611  fi
28612
28613      # Now join together the path and the arguments once again
28614      if test "x$arguments" != xEOL; then
28615        new_complete="$new_path ${arguments% *}"
28616      else
28617        new_complete="$new_path"
28618      fi
28619
28620  if test "x$complete" != "x$new_complete"; then
28621      LIPO="$new_complete"
28622      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28623$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28624    fi
28625
28626fi
28627
28628
28629
28630# Restore old path without tools dir
28631PATH="$OLD_PATH"
28632
28633
28634# FIXME: Currently we must test this after paths but before flags. Fix!
28635
28636# And we can test some aspects on the target using configure macros.
28637
28638
28639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28640$as_echo_n "checking for ANSI C header files... " >&6; }
28641if test "${ac_cv_header_stdc+set}" = set; then :
28642  $as_echo_n "(cached) " >&6
28643else
28644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28645/* end confdefs.h.  */
28646#include <stdlib.h>
28647#include <stdarg.h>
28648#include <string.h>
28649#include <float.h>
28650
28651int
28652main ()
28653{
28654
28655  ;
28656  return 0;
28657}
28658_ACEOF
28659if ac_fn_cxx_try_compile "$LINENO"; then :
28660  ac_cv_header_stdc=yes
28661else
28662  ac_cv_header_stdc=no
28663fi
28664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28665
28666if test $ac_cv_header_stdc = yes; then
28667  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28669/* end confdefs.h.  */
28670#include <string.h>
28671
28672_ACEOF
28673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28674  $EGREP "memchr" >/dev/null 2>&1; then :
28675
28676else
28677  ac_cv_header_stdc=no
28678fi
28679rm -f conftest*
28680
28681fi
28682
28683if test $ac_cv_header_stdc = yes; then
28684  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28686/* end confdefs.h.  */
28687#include <stdlib.h>
28688
28689_ACEOF
28690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28691  $EGREP "free" >/dev/null 2>&1; then :
28692
28693else
28694  ac_cv_header_stdc=no
28695fi
28696rm -f conftest*
28697
28698fi
28699
28700if test $ac_cv_header_stdc = yes; then
28701  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28702  if test "$cross_compiling" = yes; then :
28703  :
28704else
28705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28706/* end confdefs.h.  */
28707#include <ctype.h>
28708#include <stdlib.h>
28709#if ((' ' & 0x0FF) == 0x020)
28710# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28711# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28712#else
28713# define ISLOWER(c) \
28714		   (('a' <= (c) && (c) <= 'i') \
28715		     || ('j' <= (c) && (c) <= 'r') \
28716		     || ('s' <= (c) && (c) <= 'z'))
28717# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28718#endif
28719
28720#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28721int
28722main ()
28723{
28724  int i;
28725  for (i = 0; i < 256; i++)
28726    if (XOR (islower (i), ISLOWER (i))
28727	|| toupper (i) != TOUPPER (i))
28728      return 2;
28729  return 0;
28730}
28731_ACEOF
28732if ac_fn_cxx_try_run "$LINENO"; then :
28733
28734else
28735  ac_cv_header_stdc=no
28736fi
28737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28738  conftest.$ac_objext conftest.beam conftest.$ac_ext
28739fi
28740
28741fi
28742fi
28743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28744$as_echo "$ac_cv_header_stdc" >&6; }
28745if test $ac_cv_header_stdc = yes; then
28746
28747$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28748
28749fi
28750
28751# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28752for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28753		  inttypes.h stdint.h unistd.h
28754do :
28755  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28756ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28757"
28758if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28759  cat >>confdefs.h <<_ACEOF
28760#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28761_ACEOF
28762
28763fi
28764
28765done
28766
28767
28768
28769###############################################################################
28770#
28771# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28772# (The JVM can use 32 or 64 bit Java pointers but that decision
28773# is made at runtime.)
28774#
28775
28776if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28777  # Always specify -m flags on Solaris
28778
28779  # keep track of c/cxx flags that we added outselves...
28780  #   to prevent emitting warning...
28781  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28782
28783
28784  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28785  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28786  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28787
28788  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28789  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28790  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28791
28792elif test "x$COMPILE_TYPE" = xreduced; then
28793  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28794    # Specify -m if running reduced on other Posix platforms
28795
28796  # keep track of c/cxx flags that we added outselves...
28797  #   to prevent emitting warning...
28798  TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28799
28800
28801  CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28802  CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28803  LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28804
28805  CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28806  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28807  LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28808
28809  fi
28810fi
28811
28812# Make compilation sanity check
28813for ac_header in stdio.h
28814do :
28815  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28816if test "x$ac_cv_header_stdio_h" = x""yes; then :
28817  cat >>confdefs.h <<_ACEOF
28818#define HAVE_STDIO_H 1
28819_ACEOF
28820
28821else
28822
28823  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28824$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28825  if test "x$COMPILE_TYPE" = xreduced; then
28826    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28827$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28828  elif test "x$COMPILE_TYPE" = xcross; then
28829    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28830$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28831  fi
28832  as_fn_error $? "Cannot continue." "$LINENO" 5
28833
28834fi
28835
28836done
28837
28838
28839# The cast to long int works around a bug in the HP C Compiler
28840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28842# This bug is HP SR number 8606223364.
28843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28844$as_echo_n "checking size of int *... " >&6; }
28845if test "${ac_cv_sizeof_int_p+set}" = set; then :
28846  $as_echo_n "(cached) " >&6
28847else
28848  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28849
28850else
28851  if test "$ac_cv_type_int_p" = yes; then
28852     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28854as_fn_error 77 "cannot compute sizeof (int *)
28855See \`config.log' for more details" "$LINENO" 5 ; }
28856   else
28857     ac_cv_sizeof_int_p=0
28858   fi
28859fi
28860
28861fi
28862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28863$as_echo "$ac_cv_sizeof_int_p" >&6; }
28864
28865
28866
28867cat >>confdefs.h <<_ACEOF
28868#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28869_ACEOF
28870
28871
28872
28873if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28874  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28875  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28876fi
28877
28878if test "x$SIZEOF_INT_P" = x; then
28879    # The test failed, lets stick to the assumed value.
28880    { $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
28881$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28882else
28883    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28884
28885    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28886        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
28887    fi
28888fi
28889
28890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28891$as_echo_n "checking for target address size... " >&6; }
28892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28893$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28894
28895
28896###############################################################################
28897#
28898# Is the target little of big endian?
28899#
28900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28901$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28902if test "${ac_cv_c_bigendian+set}" = set; then :
28903  $as_echo_n "(cached) " >&6
28904else
28905  ac_cv_c_bigendian=unknown
28906    # See if we're dealing with a universal compiler.
28907    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28908/* end confdefs.h.  */
28909#ifndef __APPLE_CC__
28910	       not a universal capable compiler
28911	     #endif
28912	     typedef int dummy;
28913
28914_ACEOF
28915if ac_fn_cxx_try_compile "$LINENO"; then :
28916
28917	# Check for potential -arch flags.  It is not universal unless
28918	# there are at least two -arch flags with different values.
28919	ac_arch=
28920	ac_prev=
28921	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28922	 if test -n "$ac_prev"; then
28923	   case $ac_word in
28924	     i?86 | x86_64 | ppc | ppc64)
28925	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28926		 ac_arch=$ac_word
28927	       else
28928		 ac_cv_c_bigendian=universal
28929		 break
28930	       fi
28931	       ;;
28932	   esac
28933	   ac_prev=
28934	 elif test "x$ac_word" = "x-arch"; then
28935	   ac_prev=arch
28936	 fi
28937       done
28938fi
28939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28940    if test $ac_cv_c_bigendian = unknown; then
28941      # See if sys/param.h defines the BYTE_ORDER macro.
28942      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28943/* end confdefs.h.  */
28944#include <sys/types.h>
28945	     #include <sys/param.h>
28946
28947int
28948main ()
28949{
28950#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28951		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28952		     && LITTLE_ENDIAN)
28953	      bogus endian macros
28954	     #endif
28955
28956  ;
28957  return 0;
28958}
28959_ACEOF
28960if ac_fn_cxx_try_compile "$LINENO"; then :
28961  # It does; now see whether it defined to BIG_ENDIAN or not.
28962	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28963/* end confdefs.h.  */
28964#include <sys/types.h>
28965		#include <sys/param.h>
28966
28967int
28968main ()
28969{
28970#if BYTE_ORDER != BIG_ENDIAN
28971		 not big endian
28972		#endif
28973
28974  ;
28975  return 0;
28976}
28977_ACEOF
28978if ac_fn_cxx_try_compile "$LINENO"; then :
28979  ac_cv_c_bigendian=yes
28980else
28981  ac_cv_c_bigendian=no
28982fi
28983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28984fi
28985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28986    fi
28987    if test $ac_cv_c_bigendian = unknown; then
28988      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28989      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28990/* end confdefs.h.  */
28991#include <limits.h>
28992
28993int
28994main ()
28995{
28996#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28997	      bogus endian macros
28998	     #endif
28999
29000  ;
29001  return 0;
29002}
29003_ACEOF
29004if ac_fn_cxx_try_compile "$LINENO"; then :
29005  # It does; now see whether it defined to _BIG_ENDIAN or not.
29006	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29007/* end confdefs.h.  */
29008#include <limits.h>
29009
29010int
29011main ()
29012{
29013#ifndef _BIG_ENDIAN
29014		 not big endian
29015		#endif
29016
29017  ;
29018  return 0;
29019}
29020_ACEOF
29021if ac_fn_cxx_try_compile "$LINENO"; then :
29022  ac_cv_c_bigendian=yes
29023else
29024  ac_cv_c_bigendian=no
29025fi
29026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29027fi
29028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29029    fi
29030    if test $ac_cv_c_bigendian = unknown; then
29031      # Compile a test program.
29032      if test "$cross_compiling" = yes; then :
29033  # Try to guess by grepping values from an object file.
29034	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29035/* end confdefs.h.  */
29036short int ascii_mm[] =
29037		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29038		short int ascii_ii[] =
29039		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29040		int use_ascii (int i) {
29041		  return ascii_mm[i] + ascii_ii[i];
29042		}
29043		short int ebcdic_ii[] =
29044		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29045		short int ebcdic_mm[] =
29046		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29047		int use_ebcdic (int i) {
29048		  return ebcdic_mm[i] + ebcdic_ii[i];
29049		}
29050		extern int foo;
29051
29052int
29053main ()
29054{
29055return use_ascii (foo) == use_ebcdic (foo);
29056  ;
29057  return 0;
29058}
29059_ACEOF
29060if ac_fn_cxx_try_compile "$LINENO"; then :
29061  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29062	      ac_cv_c_bigendian=yes
29063	    fi
29064	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29065	      if test "$ac_cv_c_bigendian" = unknown; then
29066		ac_cv_c_bigendian=no
29067	      else
29068		# finding both strings is unlikely to happen, but who knows?
29069		ac_cv_c_bigendian=unknown
29070	      fi
29071	    fi
29072fi
29073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29074else
29075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29076/* end confdefs.h.  */
29077$ac_includes_default
29078int
29079main ()
29080{
29081
29082	     /* Are we little or big endian?  From Harbison&Steele.  */
29083	     union
29084	     {
29085	       long int l;
29086	       char c[sizeof (long int)];
29087	     } u;
29088	     u.l = 1;
29089	     return u.c[sizeof (long int) - 1] == 1;
29090
29091  ;
29092  return 0;
29093}
29094_ACEOF
29095if ac_fn_cxx_try_run "$LINENO"; then :
29096  ac_cv_c_bigendian=no
29097else
29098  ac_cv_c_bigendian=yes
29099fi
29100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29101  conftest.$ac_objext conftest.beam conftest.$ac_ext
29102fi
29103
29104    fi
29105fi
29106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29107$as_echo "$ac_cv_c_bigendian" >&6; }
29108 case $ac_cv_c_bigendian in #(
29109   yes)
29110     ENDIAN="big";; #(
29111   no)
29112     ENDIAN="little" ;; #(
29113   universal)
29114     ENDIAN="universal_endianness"
29115     ;; #(
29116   *)
29117     ENDIAN="unknown" ;;
29118 esac
29119
29120
29121if test "x$ENDIAN" = xuniversal_endianness; then
29122    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29123fi
29124if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29125    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
29126fi
29127
29128
29129# Configure flags for the tools
29130
29131
29132###############################################################################
29133#
29134# How to compile shared libraries.
29135#
29136
29137if test "x$GCC" = xyes; then
29138    COMPILER_NAME=gcc
29139    PICFLAG="-fPIC"
29140    LIBRARY_PREFIX=lib
29141    SHARED_LIBRARY='lib$1.so'
29142    STATIC_LIBRARY='lib$1.a'
29143    SHARED_LIBRARY_FLAGS="-shared"
29144    SHARED_LIBRARY_SUFFIX='.so'
29145    STATIC_LIBRARY_SUFFIX='.a'
29146    OBJ_SUFFIX='.o'
29147    EXE_SUFFIX=''
29148    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29149    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29150    C_FLAG_REORDER=''
29151    CXX_FLAG_REORDER=''
29152    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29153    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29154    LD="$CC"
29155    LDEXE="$CC"
29156    LDCXX="$CXX"
29157    LDEXECXX="$CXX"
29158    POST_STRIP_CMD="$STRIP -g"
29159
29160    # Linking is different on MacOSX
29161    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29162        # Might change in the future to clang.
29163        COMPILER_NAME=gcc
29164        SHARED_LIBRARY='lib$1.dylib'
29165        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29166        SHARED_LIBRARY_SUFFIX='.dylib'
29167        EXE_SUFFIX=''
29168        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29169        SET_SHARED_LIBRARY_MAPFILE=''
29170        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29171        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29172        POST_STRIP_CMD="$STRIP -S"
29173    fi
29174else
29175    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29176        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29177        COMPILER_NAME=ossc
29178        PICFLAG="-KPIC"
29179        LIBRARY_PREFIX=lib
29180        SHARED_LIBRARY='lib$1.so'
29181        STATIC_LIBRARY='lib$1.a'
29182        SHARED_LIBRARY_FLAGS="-G"
29183        SHARED_LIBRARY_SUFFIX='.so'
29184        STATIC_LIBRARY_SUFFIX='.a'
29185        OBJ_SUFFIX='.o'
29186        EXE_SUFFIX=''
29187        SET_SHARED_LIBRARY_NAME=''
29188        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29189	C_FLAG_REORDER='-xF'
29190	CXX_FLAG_REORDER='-xF'
29191        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29192        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29193        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29194        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29195        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29196        POST_STRIP_CMD="$STRIP -x"
29197        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29198    fi
29199    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29200        # If it is not gcc, then assume it is the MS Visual Studio compiler
29201        COMPILER_NAME=cl
29202        PICFLAG=""
29203        LIBRARY_PREFIX=
29204        SHARED_LIBRARY='$1.dll'
29205        STATIC_LIBRARY='$1.lib'
29206        SHARED_LIBRARY_FLAGS="-LD"
29207        SHARED_LIBRARY_SUFFIX='.dll'
29208        STATIC_LIBRARY_SUFFIX='.lib'
29209        OBJ_SUFFIX='.obj'
29210        EXE_SUFFIX='.exe'
29211        SET_SHARED_LIBRARY_NAME=''
29212        SET_SHARED_LIBRARY_MAPFILE=''
29213        SET_SHARED_LIBRARY_ORIGIN=''
29214        SET_EXECUTABLE_ORIGIN=''
29215    fi
29216fi
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236# The (cross) compiler is now configured, we can now test capabilities
29237# of the target platform.
29238
29239
29240
29241###############################################################################
29242#
29243# Setup the opt flags for different compilers
29244# and different operating systems.
29245#
29246
29247#
29248# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29249#
29250if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29251    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29252    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29253    CFLAGS="$CFLAGS -mstackrealign"
29254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29255$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29256    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29257/* end confdefs.h.  */
29258int main() { return 0; }
29259_ACEOF
29260if ac_fn_cxx_try_link "$LINENO"; then :
29261
29262		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29263$as_echo "yes" >&6; }
29264
29265else
29266
29267		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29268$as_echo "no" >&6; }
29269	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29270
29271fi
29272rm -f core conftest.err conftest.$ac_objext \
29273    conftest$ac_exeext conftest.$ac_ext
29274fi
29275
29276C_FLAG_DEPS="-MMD -MF"
29277CXX_FLAG_DEPS="-MMD -MF"
29278
29279case $COMPILER_TYPE in
29280  CC )
29281    case $COMPILER_NAME in
29282      gcc )
29283      	case $OPENJDK_TARGET_OS in
29284	  macosx )
29285	    # On MacOSX we optimize for size, something
29286	    # we should do for all platforms?
29287	    C_O_FLAG_HI="-Os"
29288	    C_O_FLAG_NORM="-Os"
29289	    C_O_FLAG_NONE=""
29290	    ;;
29291	  *)
29292	    C_O_FLAG_HI="-O3"
29293	    C_O_FLAG_NORM="-O2"
29294	    C_O_FLAG_NONE="-O0"
29295	    ;;
29296	esac
29297        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29298        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29299        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29300        CFLAGS_DEBUG_SYMBOLS="-g"
29301        CXXFLAGS_DEBUG_SYMBOLS="-g"
29302        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29303            CFLAGS_DEBUG_SYMBOLS="-g1"
29304            CXXFLAGS_DEBUG_SYMBOLS="-g1"
29305        fi
29306        ;;
29307      ossc )
29308        #
29309        # Forte has different names for this with their C++ compiler...
29310        #
29311        C_FLAG_DEPS="-xMMD -xMF"
29312        CXX_FLAG_DEPS="-xMMD -xMF"
29313
29314        # Extra options used with HIGHEST
29315        #
29316        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29317        #          done with care, there are some assumptions below that need to
29318        #          be understood about the use of pointers, and IEEE behavior.
29319        #
29320        # Use non-standard floating point mode (not IEEE 754)
29321        CC_HIGHEST="$CC_HIGHEST -fns"
29322        # Do some simplification of floating point arithmetic (not IEEE 754)
29323        CC_HIGHEST="$CC_HIGHEST -fsimple"
29324        # Use single precision floating point with 'float'
29325        CC_HIGHEST="$CC_HIGHEST -fsingle"
29326        # Assume memory references via basic pointer types do not alias
29327        #   (Source with excessing pointer casting and data access with mixed
29328        #    pointer types are not recommended)
29329        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29330        # Use intrinsic or inline versions for math/std functions
29331        #   (If you expect perfect errno behavior, do not use this)
29332        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29333        # Loop data dependency optimizations (need -xO3 or higher)
29334        CC_HIGHEST="$CC_HIGHEST -xdepend"
29335        # Pointer parameters to functions do not overlap
29336        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29337        #    If you pass in multiple pointers to the same data, do not use this)
29338        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29339        # Inline some library routines
29340        #   (If you expect perfect errno behavior, do not use this)
29341        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29342        # Use optimized math routines
29343        #   (If you expect perfect errno behavior, do not use this)
29344        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29345        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29346
29347        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29348          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29349          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29350        fi
29351
29352        case $OPENJDK_TARGET_CPU_ARCH in
29353          x86)
29354            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29355            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29356            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29357            C_O_FLAG_NONE="-xregs=no%frameptr"
29358            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29359            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29360            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29361            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29362            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29363               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29364               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29365            fi
29366            ;;
29367          sparc)
29368            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29369            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29370            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29371            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29372            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29373            C_O_FLAG_NONE=""
29374            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29375            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29376            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29377            CXX_O_FLAG_NONE=""
29378            ;;
29379        esac
29380
29381    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29382    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29383    esac
29384    ;;
29385  CL )
29386    C_O_FLAG_HIGHEST="-O2"
29387    C_O_FLAG_HI="-O1"
29388    C_O_FLAG_NORM="-O1"
29389    C_O_FLAG_NONE="-Od"
29390    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29391    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29392    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29393    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29394    ;;
29395esac
29396
29397if test -z "$C_O_FLAG_HIGHEST"; then
29398   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29399fi
29400
29401if test -z "$CXX_O_FLAG_HIGHEST"; then
29402   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29403fi
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29419   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29420$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29421fi
29422
29423if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29424   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29425$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29426fi
29427
29428if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29429   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29430$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29431fi
29432
29433
29434# Check whether --with-extra-cflags was given.
29435if test "${with_extra_cflags+set}" = set; then :
29436  withval=$with_extra_cflags;
29437fi
29438
29439
29440
29441# Check whether --with-extra-cxxflags was given.
29442if test "${with_extra_cxxflags+set}" = set; then :
29443  withval=$with_extra_cxxflags;
29444fi
29445
29446
29447
29448# Check whether --with-extra-ldflags was given.
29449if test "${with_extra_ldflags+set}" = set; then :
29450  withval=$with_extra_ldflags;
29451fi
29452
29453
29454CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29455CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29456LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29457
29458# Hotspot needs these set in their legacy form
29459LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29460LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29461LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29462
29463
29464
29465
29466
29467###############################################################################
29468#
29469# Now setup the CFLAGS and LDFLAGS for the JDK build.
29470# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29471#
29472case $COMPILER_NAME in
29473      gcc )
29474      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29475                          -pipe \
29476                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29477	  case $OPENJDK_TARGET_CPU_ARCH in
29478	  arm )
29479            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29480	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29481	  ;;
29482	  ppc )
29483            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29484	  ;;
29485	  * )
29486	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29487	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29488          ;;
29489	  esac
29490          ;;
29491      ossc )
29492          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29493          case $OPENJDK_TARGET_CPU_ARCH in
29494          x86 )
29495            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29496       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29497          ;;
29498          esac
29499
29500      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29501      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29502
29503          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29504          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29505          ;;
29506      cl )
29507          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29508               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29509	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29510	       -DWIN32 -DIAL"
29511          case $OPENJDK_TARGET_CPU in
29512              x86 )
29513                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29514                  ;;
29515              x86_64 )
29516                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29517                  ;;
29518          esac
29519          ;;
29520esac
29521
29522###############################################################################
29523
29524# Adjust flags according to debug level.
29525case $DEBUG_LEVEL in
29526      fastdebug )
29527              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29528              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29529	      C_O_FLAG_HI="$C_O_FLAG_NORM"
29530	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
29531	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29532	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29533              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29534              ;;
29535      slowdebug )
29536              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29537              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29538	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29539	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29540	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29541	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29542              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29543              ;;
29544esac
29545
29546CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29547
29548# The package path is used only on macosx?
29549PACKAGE_PATH=/opt/local
29550
29551
29552if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29553    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29554    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29555    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29556    #   Note: -Dmacro         is the same as    #define macro 1
29557    #         -Dmacro=	    is the same as    #define macro
29558    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29559        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29560    else
29561        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29562    fi
29563else
29564    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29565fi
29566if test "x$OPENJDK_TARGET_OS" = xlinux; then
29567    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29568fi
29569if test "x$OPENJDK_TARGET_OS" = xwindows; then
29570    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29571fi
29572if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29573    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29574fi
29575if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29576    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29577    # Setting these parameters makes it an error to link to macosx APIs that are
29578    # newer than the given OS version and makes the linked binaries compatible even
29579    # if built on a newer version of the OS.
29580    # The expected format is X.Y.Z
29581    MACOSX_VERSION_MIN=10.7.0
29582
29583    # The macro takes the version with no dots, ex: 1070
29584    # Let the flags variables get resolved in make for easier override on make
29585    # command line.
29586    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29587    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29588fi
29589if test "x$OPENJDK_TARGET_OS" = xbsd; then
29590    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29591fi
29592if test "x$DEBUG_LEVEL" = xrelease; then
29593    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29594    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29595        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29596    fi
29597else
29598    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29599fi
29600
29601CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29602CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29603
29604CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29605        -I${JDK_OUTPUTDIR}/include \
29606        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29607        -I${JDK_TOPDIR}/src/share/javavm/export \
29608        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29609        -I${JDK_TOPDIR}/src/share/native/common \
29610        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29611
29612# The shared libraries are compiled using the picflag.
29613CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29614CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29615
29616# Executable flags
29617CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29618CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29619
29620# Now this is odd. The JDK native libraries have to link against libjvm.so
29621# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29622# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29623# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29624# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29625# libraries will link to whatever is in memory. Yuck.
29626#
29627# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29628if test "x$COMPILER_NAME" = xcl; then
29629    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29630    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29631        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29632    fi
29633    # TODO: make -debug optional "--disable-full-debug-symbols"
29634    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29635    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29636    LDFLAGS_JDKLIB_SUFFIX=""
29637    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29638        LDFLAGS_STACK_SIZE=1048576
29639    else
29640        LDFLAGS_STACK_SIZE=327680
29641    fi
29642    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29643else
29644    if test "x$COMPILER_NAME" = xgcc; then
29645        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29646        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29647        if test -n "$HAS_GNU_HASH"; then
29648            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29649        fi
29650        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29651          # And since we now know that the linker is gnu, then add -z defs, to forbid
29652          # undefined symbols in object files.
29653          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29654          if test "x$DEBUG_LEVEL" = "xrelease"; then
29655              # When building release libraries, tell the linker optimize them.
29656              # Should this be supplied to the OSS linker as well?
29657              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29658          fi
29659        fi
29660    fi
29661    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29662                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29663
29664    # On some platforms (mac) the linker warns about non existing -L dirs.
29665    # Add server first if available. Linking aginst client does not always produce the same results.
29666    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29667    # Default to server for other variants.
29668    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29669        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29670    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29671        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29672    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29673        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29674    else
29675        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29676    fi
29677
29678    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29679    if test "x$COMPILER_NAME" = xossc; then
29680        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29681    fi
29682
29683    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29684    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29685        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29686    fi
29687fi
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703  # Some Zero and Shark settings.
29704  # ZERO_ARCHFLAG tells the compiler which mode to build for
29705  case "${OPENJDK_TARGET_CPU}" in
29706    s390)
29707      ZERO_ARCHFLAG="-m31"
29708      ;;
29709    *)
29710      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29711  esac
29712
29713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29714$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29715  supports=yes
29716
29717  saved_cflags="$CFLAGS"
29718  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29719  ac_ext=c
29720ac_cpp='$CPP $CPPFLAGS'
29721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29723ac_compiler_gnu=$ac_cv_c_compiler_gnu
29724
29725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29726/* end confdefs.h.  */
29727
29728    int i;
29729
29730_ACEOF
29731if ac_fn_c_try_compile "$LINENO"; then :
29732
29733else
29734  supports=no
29735fi
29736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29737  ac_ext=cpp
29738ac_cpp='$CXXCPP $CPPFLAGS'
29739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29742
29743  CFLAGS="$saved_cflags"
29744
29745  saved_cxxflags="$CXXFLAGS"
29746  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29747  ac_ext=cpp
29748ac_cpp='$CXXCPP $CPPFLAGS'
29749ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29750ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29751ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29752
29753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29754/* end confdefs.h.  */
29755
29756    int i;
29757
29758_ACEOF
29759if ac_fn_cxx_try_compile "$LINENO"; then :
29760
29761else
29762  supports=no
29763fi
29764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29765  ac_ext=cpp
29766ac_cpp='$CXXCPP $CPPFLAGS'
29767ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29768ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29769ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29770
29771  CXXFLAGS="$saved_cxxflags"
29772
29773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29774$as_echo "$supports" >&6; }
29775  if test "x$supports" = "xyes" ; then
29776    :
29777  else
29778    ZERO_ARCHFLAG=""
29779  fi
29780
29781
29782
29783  # Check that the compiler supports -mX flags
29784  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29785
29786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29787$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29788  supports=yes
29789
29790  saved_cflags="$CFLAGS"
29791  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29792  ac_ext=c
29793ac_cpp='$CPP $CPPFLAGS'
29794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29796ac_compiler_gnu=$ac_cv_c_compiler_gnu
29797
29798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29799/* end confdefs.h.  */
29800
29801    int i;
29802
29803_ACEOF
29804if ac_fn_c_try_compile "$LINENO"; then :
29805
29806else
29807  supports=no
29808fi
29809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29810  ac_ext=cpp
29811ac_cpp='$CXXCPP $CPPFLAGS'
29812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29815
29816  CFLAGS="$saved_cflags"
29817
29818  saved_cxxflags="$CXXFLAGS"
29819  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29820  ac_ext=cpp
29821ac_cpp='$CXXCPP $CPPFLAGS'
29822ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29823ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29824ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29825
29826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29827/* end confdefs.h.  */
29828
29829    int i;
29830
29831_ACEOF
29832if ac_fn_cxx_try_compile "$LINENO"; then :
29833
29834else
29835  supports=no
29836fi
29837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29838  ac_ext=cpp
29839ac_cpp='$CXXCPP $CPPFLAGS'
29840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29843
29844  CXXFLAGS="$saved_cxxflags"
29845
29846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29847$as_echo "$supports" >&6; }
29848  if test "x$supports" = "xyes" ; then
29849    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29850  else
29851    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29852  fi
29853
29854
29855
29856
29857# Setup debug symbols (need objcopy from the toolchain for that)
29858
29859#
29860# ENABLE_DEBUG_SYMBOLS
29861# This must be done after the toolchain is setup, since we're looking at objcopy.
29862#
29863# Check whether --enable-debug-symbols was given.
29864if test "${enable_debug_symbols+set}" = set; then :
29865  enableval=$enable_debug_symbols;
29866fi
29867
29868
29869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29870$as_echo_n "checking if we should generate debug symbols... " >&6; }
29871
29872if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29873   # explicit enabling of enable-debug-symbols and can't find objcopy
29874   #   this is an error
29875   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29876fi
29877
29878if test "x$enable_debug_symbols" = "xyes"; then
29879  ENABLE_DEBUG_SYMBOLS=true
29880elif test "x$enable_debug_symbols" = "xno"; then
29881  ENABLE_DEBUG_SYMBOLS=false
29882else
29883  # default on macosx is false
29884  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29885    ENABLE_DEBUG_SYMBOLS=false
29886  # Default is on if objcopy is found, otherwise off
29887  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29888    ENABLE_DEBUG_SYMBOLS=true
29889  else
29890    ENABLE_DEBUG_SYMBOLS=false
29891  fi
29892fi
29893
29894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29895$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29896
29897#
29898# ZIP_DEBUGINFO_FILES
29899#
29900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29901$as_echo_n "checking if we should zip debug-info files... " >&6; }
29902# Check whether --enable-zip-debug-info was given.
29903if test "${enable_zip_debug_info+set}" = set; then :
29904  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29905else
29906  enable_zip_debug_info="yes"
29907fi
29908
29909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29910$as_echo "${enable_zip_debug_info}" >&6; }
29911
29912if test "x${enable_zip_debug_info}" = "xno"; then
29913   ZIP_DEBUGINFO_FILES=false
29914else
29915   ZIP_DEBUGINFO_FILES=true
29916fi
29917
29918
29919
29920
29921
29922
29923
29924###############################################################################
29925#
29926# Check dependencies for external and internal libraries.
29927#
29928###############################################################################
29929
29930
29931
29932###############################################################################
29933#
29934# OS specific settings that we never will need to probe.
29935#
29936if test "x$OPENJDK_TARGET_OS" = xlinux; then
29937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29938$as_echo_n "checking what is not needed on Linux?... " >&6; }
29939    PULSE_NOT_NEEDED=yes
29940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29941$as_echo "pulse" >&6; }
29942fi
29943
29944if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29946$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29947    ALSA_NOT_NEEDED=yes
29948    PULSE_NOT_NEEDED=yes
29949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29950$as_echo "alsa pulse" >&6; }
29951fi
29952
29953if test "x$OPENJDK_TARGET_OS" = xwindows; then
29954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29955$as_echo_n "checking what is not needed on Windows?... " >&6; }
29956    CUPS_NOT_NEEDED=yes
29957    ALSA_NOT_NEEDED=yes
29958    PULSE_NOT_NEEDED=yes
29959    X11_NOT_NEEDED=yes
29960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29961$as_echo "alsa cups pulse x11" >&6; }
29962fi
29963
29964if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29966$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29967    ALSA_NOT_NEEDED=yes
29968    PULSE_NOT_NEEDED=yes
29969    X11_NOT_NEEDED=yes
29970    FREETYPE2_NOT_NEEDED=yes
29971    # If the java runtime framework is disabled, then we need X11.
29972    # This will be adjusted below.
29973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29974$as_echo "alsa pulse x11" >&6; }
29975fi
29976
29977if test "x$OPENJDK_TARGET_OS" = xbsd; then
29978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29979$as_echo_n "checking what is not needed on bsd?... " >&6; }
29980    ALSA_NOT_NEEDED=yes
29981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29982$as_echo "alsa" >&6; }
29983fi
29984
29985if test "x$OPENJDK" = "xfalse"; then
29986    FREETYPE2_NOT_NEEDED=yes
29987fi
29988
29989if test "x$SUPPORT_HEADFUL" = xno; then
29990    X11_NOT_NEEDED=yes
29991fi
29992
29993###############################################################################
29994#
29995# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29996# that uses this API.
29997#
29998# Check whether --enable-macosx-runtime-support was given.
29999if test "${enable_macosx_runtime_support+set}" = set; then :
30000  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
30001else
30002  MACOSX_RUNTIME_SUPPORT="no"
30003fi
30004
30005
30006USE_MACOSX_RUNTIME_SUPPORT=no
30007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
30008$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
30009if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30010    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
30011        MACOSX_RUNTIME_SUPPORT=yes
30012        USE_MACOSX_RUNTIME_SUPPORT=yes
30013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
30014$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
30015    else
30016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
30017$as_echo "yes, but explicitly disabled." >&6; }
30018    fi
30019else
30020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30021$as_echo "no" >&6; }
30022fi
30023
30024if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
30025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
30026$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
30027    X11_NOT_NEEDED=
30028    FREETYPE2_NOT_NEEDED=
30029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30030$as_echo "alsa pulse" >&6; }
30031fi
30032
30033
30034
30035###############################################################################
30036#
30037# Check for X Windows
30038#
30039
30040# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30041# Make a simple check for the libraries at the sysroot, and setup --x-includes and
30042# --x-libraries for the sysroot, if that seems to be correct.
30043if test "x$SYS_ROOT" != "x/"; then
30044  if test "x$x_includes" = xNONE; then
30045    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30046      x_includes="$SYS_ROOT/usr/X11R6/include"
30047    elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30048      x_includes="$SYS_ROOT/usr/include"
30049    fi
30050  fi
30051  if test "x$x_libraries" = xNONE; then
30052    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30053      x_libraries="$SYS_ROOT/usr/X11R6/lib"
30054    elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30055      x_libraries="$SYS_ROOT/usr/lib64"
30056    elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30057      x_libraries="$SYS_ROOT/usr/lib"
30058    fi
30059  fi
30060fi
30061
30062# Now let autoconf do it's magic
30063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30064$as_echo_n "checking for X... " >&6; }
30065
30066
30067# Check whether --with-x was given.
30068if test "${with_x+set}" = set; then :
30069  withval=$with_x;
30070fi
30071
30072# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30073if test "x$with_x" = xno; then
30074  # The user explicitly disabled X.
30075  have_x=disabled
30076else
30077  case $x_includes,$x_libraries in #(
30078    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
30079    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
30080  $as_echo_n "(cached) " >&6
30081else
30082  # One or both of the vars are not set, and there is no cached value.
30083ac_x_includes=no ac_x_libraries=no
30084rm -f -r conftest.dir
30085if mkdir conftest.dir; then
30086  cd conftest.dir
30087  cat >Imakefile <<'_ACEOF'
30088incroot:
30089	@echo incroot='${INCROOT}'
30090usrlibdir:
30091	@echo usrlibdir='${USRLIBDIR}'
30092libdir:
30093	@echo libdir='${LIBDIR}'
30094_ACEOF
30095  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30096    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30097    for ac_var in incroot usrlibdir libdir; do
30098      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30099    done
30100    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30101    for ac_extension in a so sl dylib la dll; do
30102      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30103	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
30104	ac_im_usrlibdir=$ac_im_libdir; break
30105      fi
30106    done
30107    # Screen out bogus values from the imake configuration.  They are
30108    # bogus both because they are the default anyway, and because
30109    # using them would break gcc on systems where it needs fixed includes.
30110    case $ac_im_incroot in
30111	/usr/include) ac_x_includes= ;;
30112	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30113    esac
30114    case $ac_im_usrlibdir in
30115	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
30116	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30117    esac
30118  fi
30119  cd ..
30120  rm -f -r conftest.dir
30121fi
30122
30123# Standard set of common directories for X headers.
30124# Check X11 before X11Rn because it is often a symlink to the current release.
30125ac_x_header_dirs='
30126/usr/X11/include
30127/usr/X11R7/include
30128/usr/X11R6/include
30129/usr/X11R5/include
30130/usr/X11R4/include
30131
30132/usr/include/X11
30133/usr/include/X11R7
30134/usr/include/X11R6
30135/usr/include/X11R5
30136/usr/include/X11R4
30137
30138/usr/local/X11/include
30139/usr/local/X11R7/include
30140/usr/local/X11R6/include
30141/usr/local/X11R5/include
30142/usr/local/X11R4/include
30143
30144/usr/local/include/X11
30145/usr/local/include/X11R7
30146/usr/local/include/X11R6
30147/usr/local/include/X11R5
30148/usr/local/include/X11R4
30149
30150/usr/X386/include
30151/usr/x386/include
30152/usr/XFree86/include/X11
30153
30154/usr/include
30155/usr/local/include
30156/usr/unsupported/include
30157/usr/athena/include
30158/usr/local/x11r5/include
30159/usr/lpp/Xamples/include
30160
30161/usr/openwin/include
30162/usr/openwin/share/include'
30163
30164if test "$ac_x_includes" = no; then
30165  # Guess where to find include files, by looking for Xlib.h.
30166  # First, try using that file with no special directory specified.
30167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30168/* end confdefs.h.  */
30169#include <X11/Xlib.h>
30170_ACEOF
30171if ac_fn_cxx_try_cpp "$LINENO"; then :
30172  # We can compile using X headers with no special include directory.
30173ac_x_includes=
30174else
30175  for ac_dir in $ac_x_header_dirs; do
30176  if test -r "$ac_dir/X11/Xlib.h"; then
30177    ac_x_includes=$ac_dir
30178    break
30179  fi
30180done
30181fi
30182rm -f conftest.err conftest.i conftest.$ac_ext
30183fi # $ac_x_includes = no
30184
30185if test "$ac_x_libraries" = no; then
30186  # Check for the libraries.
30187  # See if we find them without any special options.
30188  # Don't add to $LIBS permanently.
30189  ac_save_LIBS=$LIBS
30190  LIBS="-lX11 $LIBS"
30191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30192/* end confdefs.h.  */
30193#include <X11/Xlib.h>
30194int
30195main ()
30196{
30197XrmInitialize ()
30198  ;
30199  return 0;
30200}
30201_ACEOF
30202if ac_fn_cxx_try_link "$LINENO"; then :
30203  LIBS=$ac_save_LIBS
30204# We can link X programs with no special library path.
30205ac_x_libraries=
30206else
30207  LIBS=$ac_save_LIBS
30208for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30209do
30210  # Don't even attempt the hair of trying to link an X program!
30211  for ac_extension in a so sl dylib la dll; do
30212    if test -r "$ac_dir/libX11.$ac_extension"; then
30213      ac_x_libraries=$ac_dir
30214      break 2
30215    fi
30216  done
30217done
30218fi
30219rm -f core conftest.err conftest.$ac_objext \
30220    conftest$ac_exeext conftest.$ac_ext
30221fi # $ac_x_libraries = no
30222
30223case $ac_x_includes,$ac_x_libraries in #(
30224  no,* | *,no | *\'*)
30225    # Didn't find X, or a directory has "'" in its name.
30226    ac_cv_have_x="have_x=no";; #(
30227  *)
30228    # Record where we found X for the cache.
30229    ac_cv_have_x="have_x=yes\
30230	ac_x_includes='$ac_x_includes'\
30231	ac_x_libraries='$ac_x_libraries'"
30232esac
30233fi
30234;; #(
30235    *) have_x=yes;;
30236  esac
30237  eval "$ac_cv_have_x"
30238fi # $with_x != no
30239
30240if test "$have_x" != yes; then
30241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30242$as_echo "$have_x" >&6; }
30243  no_x=yes
30244else
30245  # If each of the values was on the command line, it overrides each guess.
30246  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30247  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30248  # Update the cache value to reflect the command line values.
30249  ac_cv_have_x="have_x=yes\
30250	ac_x_includes='$x_includes'\
30251	ac_x_libraries='$x_libraries'"
30252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30253$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30254fi
30255
30256if test "$no_x" = yes; then
30257  # Not all programs may use this symbol, but it does not hurt to define it.
30258
30259$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30260
30261  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30262else
30263  if test -n "$x_includes"; then
30264    X_CFLAGS="$X_CFLAGS -I$x_includes"
30265  fi
30266
30267  # It would also be nice to do this for all -L options, not just this one.
30268  if test -n "$x_libraries"; then
30269    X_LIBS="$X_LIBS -L$x_libraries"
30270    # For Solaris; some versions of Sun CC require a space after -R and
30271    # others require no space.  Words are not sufficient . . . .
30272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30273$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30274    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30275    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30276    ac_cxx_werror_flag=yes
30277    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30278/* end confdefs.h.  */
30279
30280int
30281main ()
30282{
30283
30284  ;
30285  return 0;
30286}
30287_ACEOF
30288if ac_fn_cxx_try_link "$LINENO"; then :
30289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30290$as_echo "no" >&6; }
30291       X_LIBS="$X_LIBS -R$x_libraries"
30292else
30293  LIBS="$ac_xsave_LIBS -R $x_libraries"
30294       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30295/* end confdefs.h.  */
30296
30297int
30298main ()
30299{
30300
30301  ;
30302  return 0;
30303}
30304_ACEOF
30305if ac_fn_cxx_try_link "$LINENO"; then :
30306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30307$as_echo "yes" >&6; }
30308	  X_LIBS="$X_LIBS -R $x_libraries"
30309else
30310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30311$as_echo "neither works" >&6; }
30312fi
30313rm -f core conftest.err conftest.$ac_objext \
30314    conftest$ac_exeext conftest.$ac_ext
30315fi
30316rm -f core conftest.err conftest.$ac_objext \
30317    conftest$ac_exeext conftest.$ac_ext
30318    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30319    LIBS=$ac_xsave_LIBS
30320  fi
30321
30322  # Check for system-dependent libraries X programs must link with.
30323  # Do this before checking for the system-independent R6 libraries
30324  # (-lICE), since we may need -lsocket or whatever for X linking.
30325
30326  if test "$ISC" = yes; then
30327    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30328  else
30329    # Martyn Johnson says this is needed for Ultrix, if the X
30330    # libraries were built with DECnet support.  And Karl Berry says
30331    # the Alpha needs dnet_stub (dnet does not exist).
30332    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30333    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30334/* end confdefs.h.  */
30335
30336/* Override any GCC internal prototype to avoid an error.
30337   Use char because int might match the return type of a GCC
30338   builtin and then its argument prototype would still apply.  */
30339#ifdef __cplusplus
30340extern "C"
30341#endif
30342char XOpenDisplay ();
30343int
30344main ()
30345{
30346return XOpenDisplay ();
30347  ;
30348  return 0;
30349}
30350_ACEOF
30351if ac_fn_cxx_try_link "$LINENO"; then :
30352
30353else
30354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30355$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30356if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30357  $as_echo_n "(cached) " >&6
30358else
30359  ac_check_lib_save_LIBS=$LIBS
30360LIBS="-ldnet  $LIBS"
30361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30362/* end confdefs.h.  */
30363
30364/* Override any GCC internal prototype to avoid an error.
30365   Use char because int might match the return type of a GCC
30366   builtin and then its argument prototype would still apply.  */
30367#ifdef __cplusplus
30368extern "C"
30369#endif
30370char dnet_ntoa ();
30371int
30372main ()
30373{
30374return dnet_ntoa ();
30375  ;
30376  return 0;
30377}
30378_ACEOF
30379if ac_fn_cxx_try_link "$LINENO"; then :
30380  ac_cv_lib_dnet_dnet_ntoa=yes
30381else
30382  ac_cv_lib_dnet_dnet_ntoa=no
30383fi
30384rm -f core conftest.err conftest.$ac_objext \
30385    conftest$ac_exeext conftest.$ac_ext
30386LIBS=$ac_check_lib_save_LIBS
30387fi
30388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30389$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30390if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30391  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30392fi
30393
30394    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30395      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30396$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30397if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30398  $as_echo_n "(cached) " >&6
30399else
30400  ac_check_lib_save_LIBS=$LIBS
30401LIBS="-ldnet_stub  $LIBS"
30402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30403/* end confdefs.h.  */
30404
30405/* Override any GCC internal prototype to avoid an error.
30406   Use char because int might match the return type of a GCC
30407   builtin and then its argument prototype would still apply.  */
30408#ifdef __cplusplus
30409extern "C"
30410#endif
30411char dnet_ntoa ();
30412int
30413main ()
30414{
30415return dnet_ntoa ();
30416  ;
30417  return 0;
30418}
30419_ACEOF
30420if ac_fn_cxx_try_link "$LINENO"; then :
30421  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30422else
30423  ac_cv_lib_dnet_stub_dnet_ntoa=no
30424fi
30425rm -f core conftest.err conftest.$ac_objext \
30426    conftest$ac_exeext conftest.$ac_ext
30427LIBS=$ac_check_lib_save_LIBS
30428fi
30429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30430$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30431if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30432  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30433fi
30434
30435    fi
30436fi
30437rm -f core conftest.err conftest.$ac_objext \
30438    conftest$ac_exeext conftest.$ac_ext
30439    LIBS="$ac_xsave_LIBS"
30440
30441    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30442    # to get the SysV transport functions.
30443    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30444    # needs -lnsl.
30445    # The nsl library prevents programs from opening the X display
30446    # on Irix 5.2, according to T.E. Dickey.
30447    # The functions gethostbyname, getservbyname, and inet_addr are
30448    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30449    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30450if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30451
30452fi
30453
30454    if test $ac_cv_func_gethostbyname = no; then
30455      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30456$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30457if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30458  $as_echo_n "(cached) " >&6
30459else
30460  ac_check_lib_save_LIBS=$LIBS
30461LIBS="-lnsl  $LIBS"
30462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30463/* end confdefs.h.  */
30464
30465/* Override any GCC internal prototype to avoid an error.
30466   Use char because int might match the return type of a GCC
30467   builtin and then its argument prototype would still apply.  */
30468#ifdef __cplusplus
30469extern "C"
30470#endif
30471char gethostbyname ();
30472int
30473main ()
30474{
30475return gethostbyname ();
30476  ;
30477  return 0;
30478}
30479_ACEOF
30480if ac_fn_cxx_try_link "$LINENO"; then :
30481  ac_cv_lib_nsl_gethostbyname=yes
30482else
30483  ac_cv_lib_nsl_gethostbyname=no
30484fi
30485rm -f core conftest.err conftest.$ac_objext \
30486    conftest$ac_exeext conftest.$ac_ext
30487LIBS=$ac_check_lib_save_LIBS
30488fi
30489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30490$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30491if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30492  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30493fi
30494
30495      if test $ac_cv_lib_nsl_gethostbyname = no; then
30496	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30497$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30498if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30499  $as_echo_n "(cached) " >&6
30500else
30501  ac_check_lib_save_LIBS=$LIBS
30502LIBS="-lbsd  $LIBS"
30503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30504/* end confdefs.h.  */
30505
30506/* Override any GCC internal prototype to avoid an error.
30507   Use char because int might match the return type of a GCC
30508   builtin and then its argument prototype would still apply.  */
30509#ifdef __cplusplus
30510extern "C"
30511#endif
30512char gethostbyname ();
30513int
30514main ()
30515{
30516return gethostbyname ();
30517  ;
30518  return 0;
30519}
30520_ACEOF
30521if ac_fn_cxx_try_link "$LINENO"; then :
30522  ac_cv_lib_bsd_gethostbyname=yes
30523else
30524  ac_cv_lib_bsd_gethostbyname=no
30525fi
30526rm -f core conftest.err conftest.$ac_objext \
30527    conftest$ac_exeext conftest.$ac_ext
30528LIBS=$ac_check_lib_save_LIBS
30529fi
30530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30531$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30532if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30533  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30534fi
30535
30536      fi
30537    fi
30538
30539    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30540    # socket/setsockopt and other routines are undefined under SCO ODT
30541    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30542    # on later versions), says Simon Leinen: it contains gethostby*
30543    # variants that don't use the name server (or something).  -lsocket
30544    # must be given before -lnsl if both are needed.  We assume that
30545    # if connect needs -lnsl, so does gethostbyname.
30546    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30547if test "x$ac_cv_func_connect" = x""yes; then :
30548
30549fi
30550
30551    if test $ac_cv_func_connect = no; then
30552      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30553$as_echo_n "checking for connect in -lsocket... " >&6; }
30554if test "${ac_cv_lib_socket_connect+set}" = set; then :
30555  $as_echo_n "(cached) " >&6
30556else
30557  ac_check_lib_save_LIBS=$LIBS
30558LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30560/* end confdefs.h.  */
30561
30562/* Override any GCC internal prototype to avoid an error.
30563   Use char because int might match the return type of a GCC
30564   builtin and then its argument prototype would still apply.  */
30565#ifdef __cplusplus
30566extern "C"
30567#endif
30568char connect ();
30569int
30570main ()
30571{
30572return connect ();
30573  ;
30574  return 0;
30575}
30576_ACEOF
30577if ac_fn_cxx_try_link "$LINENO"; then :
30578  ac_cv_lib_socket_connect=yes
30579else
30580  ac_cv_lib_socket_connect=no
30581fi
30582rm -f core conftest.err conftest.$ac_objext \
30583    conftest$ac_exeext conftest.$ac_ext
30584LIBS=$ac_check_lib_save_LIBS
30585fi
30586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30587$as_echo "$ac_cv_lib_socket_connect" >&6; }
30588if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30589  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30590fi
30591
30592    fi
30593
30594    # Guillermo Gomez says -lposix is necessary on A/UX.
30595    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30596if test "x$ac_cv_func_remove" = x""yes; then :
30597
30598fi
30599
30600    if test $ac_cv_func_remove = no; then
30601      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30602$as_echo_n "checking for remove in -lposix... " >&6; }
30603if test "${ac_cv_lib_posix_remove+set}" = set; then :
30604  $as_echo_n "(cached) " >&6
30605else
30606  ac_check_lib_save_LIBS=$LIBS
30607LIBS="-lposix  $LIBS"
30608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30609/* end confdefs.h.  */
30610
30611/* Override any GCC internal prototype to avoid an error.
30612   Use char because int might match the return type of a GCC
30613   builtin and then its argument prototype would still apply.  */
30614#ifdef __cplusplus
30615extern "C"
30616#endif
30617char remove ();
30618int
30619main ()
30620{
30621return remove ();
30622  ;
30623  return 0;
30624}
30625_ACEOF
30626if ac_fn_cxx_try_link "$LINENO"; then :
30627  ac_cv_lib_posix_remove=yes
30628else
30629  ac_cv_lib_posix_remove=no
30630fi
30631rm -f core conftest.err conftest.$ac_objext \
30632    conftest$ac_exeext conftest.$ac_ext
30633LIBS=$ac_check_lib_save_LIBS
30634fi
30635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30636$as_echo "$ac_cv_lib_posix_remove" >&6; }
30637if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30638  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30639fi
30640
30641    fi
30642
30643    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30644    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30645if test "x$ac_cv_func_shmat" = x""yes; then :
30646
30647fi
30648
30649    if test $ac_cv_func_shmat = no; then
30650      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30651$as_echo_n "checking for shmat in -lipc... " >&6; }
30652if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30653  $as_echo_n "(cached) " >&6
30654else
30655  ac_check_lib_save_LIBS=$LIBS
30656LIBS="-lipc  $LIBS"
30657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30658/* end confdefs.h.  */
30659
30660/* Override any GCC internal prototype to avoid an error.
30661   Use char because int might match the return type of a GCC
30662   builtin and then its argument prototype would still apply.  */
30663#ifdef __cplusplus
30664extern "C"
30665#endif
30666char shmat ();
30667int
30668main ()
30669{
30670return shmat ();
30671  ;
30672  return 0;
30673}
30674_ACEOF
30675if ac_fn_cxx_try_link "$LINENO"; then :
30676  ac_cv_lib_ipc_shmat=yes
30677else
30678  ac_cv_lib_ipc_shmat=no
30679fi
30680rm -f core conftest.err conftest.$ac_objext \
30681    conftest$ac_exeext conftest.$ac_ext
30682LIBS=$ac_check_lib_save_LIBS
30683fi
30684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30685$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30686if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30687  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30688fi
30689
30690    fi
30691  fi
30692
30693  # Check for libraries that X11R6 Xt/Xaw programs need.
30694  ac_save_LDFLAGS=$LDFLAGS
30695  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30696  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30697  # check for ICE first), but we must link in the order -lSM -lICE or
30698  # we get undefined symbols.  So assume we have SM if we have ICE.
30699  # These have to be linked with before -lX11, unlike the other
30700  # libraries we check for below, so use a different variable.
30701  # John Interrante, Karl Berry
30702  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30703$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30704if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30705  $as_echo_n "(cached) " >&6
30706else
30707  ac_check_lib_save_LIBS=$LIBS
30708LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30710/* end confdefs.h.  */
30711
30712/* Override any GCC internal prototype to avoid an error.
30713   Use char because int might match the return type of a GCC
30714   builtin and then its argument prototype would still apply.  */
30715#ifdef __cplusplus
30716extern "C"
30717#endif
30718char IceConnectionNumber ();
30719int
30720main ()
30721{
30722return IceConnectionNumber ();
30723  ;
30724  return 0;
30725}
30726_ACEOF
30727if ac_fn_cxx_try_link "$LINENO"; then :
30728  ac_cv_lib_ICE_IceConnectionNumber=yes
30729else
30730  ac_cv_lib_ICE_IceConnectionNumber=no
30731fi
30732rm -f core conftest.err conftest.$ac_objext \
30733    conftest$ac_exeext conftest.$ac_ext
30734LIBS=$ac_check_lib_save_LIBS
30735fi
30736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30737$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30738if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30739  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30740fi
30741
30742  LDFLAGS=$ac_save_LDFLAGS
30743
30744fi
30745
30746
30747# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30748# this doesn't make sense so we remove it.
30749if test "x$COMPILE_TYPE" = xcross; then
30750  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30751fi
30752
30753if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30754
30755    # Print a helpful message on how to acquire the necessary build dependency.
30756    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30757    MISSING_DEPENDENCY=x11
30758    PKGHANDLER_COMMAND=
30759
30760    case $PKGHANDLER in
30761	apt-get)
30762                apt_help     $MISSING_DEPENDENCY ;;
30763    yum)
30764                yum_help     $MISSING_DEPENDENCY ;;
30765	port)
30766                port_help    $MISSING_DEPENDENCY ;;
30767	pkgutil)
30768                pkgutil_help $MISSING_DEPENDENCY ;;
30769	pkgadd)
30770                pkgadd_help  $MISSING_DEPENDENCY ;;
30771    * )
30772      break ;;
30773    esac
30774
30775    if test "x$PKGHANDLER_COMMAND" != x; then
30776        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30777    fi
30778
30779    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30780fi
30781
30782# Some of the old makefiles require a setting of OPENWIN_HOME
30783# Since the X11R6 directory has disappeared on later Linuxes,
30784# we need to probe for it.
30785if test "x$OPENJDK_TARGET_OS" = xlinux; then
30786    if test -d "$SYS_ROOT/usr/X11R6"; then
30787        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30788    elif test -d "$SYS_ROOT/usr/include/X11"; then
30789        OPENWIN_HOME="$SYS_ROOT/usr"
30790    fi
30791fi
30792if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30793    OPENWIN_HOME="/usr/openwin"
30794fi
30795
30796
30797
30798#
30799# Weird Sol10 something check...TODO change to try compile
30800#
30801if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30802  if test "`uname -r`" = "5.10"; then
30803     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30804     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30805     fi
30806  fi
30807fi
30808
30809ac_ext=c
30810ac_cpp='$CPP $CPPFLAGS'
30811ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30812ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30813ac_compiler_gnu=$ac_cv_c_compiler_gnu
30814
30815OLD_CFLAGS="$CFLAGS"
30816CFLAGS="$CFLAGS $X_CFLAGS"
30817
30818# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30819for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30820do :
30821  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30822ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30823                   # include <X11/Xutil.h>
30824
30825"
30826if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30827  cat >>confdefs.h <<_ACEOF
30828#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30829_ACEOF
30830 X11_A_OK=yes
30831else
30832  X11_A_OK=no; break
30833fi
30834
30835done
30836
30837
30838CFLAGS="$OLD_CFLAGS"
30839ac_ext=cpp
30840ac_cpp='$CXXCPP $CPPFLAGS'
30841ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30842ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30843ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30844
30845
30846if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30847
30848    # Print a helpful message on how to acquire the necessary build dependency.
30849    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30850    MISSING_DEPENDENCY=x11
30851    PKGHANDLER_COMMAND=
30852
30853    case $PKGHANDLER in
30854	apt-get)
30855                apt_help     $MISSING_DEPENDENCY ;;
30856    yum)
30857                yum_help     $MISSING_DEPENDENCY ;;
30858	port)
30859                port_help    $MISSING_DEPENDENCY ;;
30860	pkgutil)
30861                pkgutil_help $MISSING_DEPENDENCY ;;
30862	pkgadd)
30863                pkgadd_help  $MISSING_DEPENDENCY ;;
30864    * )
30865      break ;;
30866    esac
30867
30868    if test "x$PKGHANDLER_COMMAND" != x; then
30869        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30870    fi
30871
30872    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30873fi
30874
30875
30876
30877
30878
30879
30880###############################################################################
30881#
30882# The common unix printing system cups is used to print from java.
30883#
30884
30885# Check whether --with-cups was given.
30886if test "${with_cups+set}" = set; then :
30887  withval=$with_cups;
30888fi
30889
30890
30891# Check whether --with-cups-include was given.
30892if test "${with_cups_include+set}" = set; then :
30893  withval=$with_cups_include;
30894fi
30895
30896
30897if test "x$CUPS_NOT_NEEDED" = xyes; then
30898	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30899		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30900$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30901	fi
30902	CUPS_CFLAGS=
30903else
30904	CUPS_FOUND=no
30905
30906	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30907	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30908	fi
30909
30910	if test "x${with_cups}" != x; then
30911	    CUPS_CFLAGS="-I${with_cups}/include"
30912	    CUPS_FOUND=yes
30913	fi
30914	if test "x${with_cups_include}" != x; then
30915	    CUPS_CFLAGS="-I${with_cups_include}"
30916	    CUPS_FOUND=yes
30917	fi
30918	if test "x$CUPS_FOUND" = xno; then
30919
30920
30921    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30922        # Source the builddeps file again, to make sure it uses the latest variables!
30923        . $builddepsfile
30924        # Look for a target and build machine specific resource!
30925        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30926        if test "x$resource" = x; then
30927            # Ok, lets instead look for a target specific resource
30928            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30929        fi
30930        if test "x$resource" = x; then
30931            # Ok, lets instead look for a build specific resource
30932            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30933        fi
30934        if test "x$resource" = x; then
30935            # Ok, lets instead look for a generic resource
30936            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30937            resource=${builddep_cups}
30938        fi
30939        if test "x$resource" != x; then
30940            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30941$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30942	    # If the resource in the builddeps.conf file is an existing directory,
30943	    # for example /java/linux/cups
30944	    if test -d ${resource}; then
30945	       depdir=${resource}
30946	    else
30947
30948# cups is for example mymodule
30949# $resource is for example libs/general/libmymod_1_2_3.zip
30950# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30951# $with_builddeps_dir is for example /localhome/builddeps
30952# depdir is the name of the variable into which we store the depdir, eg MYMOD
30953# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30954# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30955    filename=`basename $resource`
30956    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30957    filebase=${filename%%.*}
30958    extension=${filename#*.}
30959    installdir=$with_builddeps_dir/$filebase
30960    if test ! -f $installdir/$filename.unpacked; then
30961        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30962$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30963        if test ! -d $installdir; then
30964            mkdir -p $installdir
30965        fi
30966        if test ! -d $installdir; then
30967            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30968        fi
30969        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30970        touch $tmpfile
30971        if test ! -f $tmpfile; then
30972            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30973        fi
30974
30975    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30976    # $tmpfile is the local file name for the downloaded file.
30977    VALID_TOOL=no
30978    if test "x$BDEPS_FTP" = xwget; then
30979       VALID_TOOL=yes
30980       wget -O $tmpfile $with_builddeps_server/$resource
30981    fi
30982    if test "x$BDEPS_FTP" = xlftp; then
30983       VALID_TOOL=yes
30984       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30985    fi
30986    if test "x$BDEPS_FTP" = xftp; then
30987        VALID_TOOL=yes
30988        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30989        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30990        FTPUSERPWD=${FTPSERVER%%@*}
30991        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30992            FTPUSER=${userpwd%%:*}
30993            FTPPWD=${userpwd#*@}
30994            FTPSERVER=${FTPSERVER#*@}
30995        else
30996            FTPUSER=ftp
30997            FTPPWD=ftp
30998        fi
30999        # the "pass" command does not work on some
31000        # ftp clients (read ftp.exe) but if it works,
31001        # passive mode is better!
31002        (\
31003            echo "user $FTPUSER $FTPPWD"        ;\
31004            echo "pass"                         ;\
31005            echo "bin"                          ;\
31006            echo "get $FTPPATH $tmpfile"              ;\
31007        ) | ftp -in $FTPSERVER
31008    fi
31009    if test "x$VALID_TOOL" != xyes; then
31010       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31011    fi
31012
31013        mv $tmpfile $installdir/$filename
31014        if test ! -s $installdir/$filename; then
31015            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31016        fi
31017        case "$extension" in
31018            zip)  echo "Unzipping $installdir/$filename..."
31019               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31020            ;;
31021            tar.gz) echo "Untaring $installdir/$filename..."
31022               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31023            ;;
31024            tgz) echo "Untaring $installdir/$filename..."
31025               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31026            ;;
31027            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31028            ;;
31029        esac
31030    fi
31031    if test -f $installdir/$filename.unpacked; then
31032        depdir=$installdir
31033    fi
31034
31035	    fi
31036            # Source the builddeps file again, because in the previous command, the depdir
31037            # was updated to point at the current build dependency install directory.
31038            . $builddepsfile
31039            # Now extract variables from the builddeps.conf files.
31040            theroot=${builddep_cups_ROOT}
31041            thecflags=${builddep_cups_CFLAGS}
31042            thelibs=${builddep_cups_LIBS}
31043            if test "x$depdir" = x; then
31044                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31045            fi
31046            CUPS=$depdir
31047            if test "x$theroot" != x; then
31048               CUPS="$theroot"
31049            fi
31050            if test "x$thecflags" != x; then
31051               CUPS_CFLAGS="$thecflags"
31052            fi
31053            if test "x$thelibs" != x; then
31054               CUPS_LIBS="$thelibs"
31055            fi
31056            CUPS_FOUND=yes
31057
31058        fi
31059
31060    fi
31061
31062	fi
31063	if test "x$CUPS_FOUND" = xno; then
31064	    # Are the cups headers installed in the default /usr/include location?
31065	    for ac_header in cups/cups.h cups/ppd.h
31066do :
31067  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31068ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31069if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31070  cat >>confdefs.h <<_ACEOF
31071#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31072_ACEOF
31073 CUPS_FOUND=yes
31074	                      CUPS_CFLAGS=
31075	                      DEFAULT_CUPS=yes
31076fi
31077
31078done
31079
31080	fi
31081	if test "x$CUPS_FOUND" = xno; then
31082	    # Getting nervous now? Lets poke around for standard Solaris third-party
31083	    # package installation locations.
31084	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31085$as_echo_n "checking for cups headers... " >&6; }
31086	    if test -s /opt/sfw/cups/include/cups/cups.h; then
31087	       # An SFW package seems to be installed!
31088	       CUPS_FOUND=yes
31089	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
31090	    elif test -s /opt/csw/include/cups/cups.h; then
31091	       # A CSW package seems to be installed!
31092	       CUPS_FOUND=yes
31093	       CUPS_CFLAGS="-I/opt/csw/include"
31094	    fi
31095	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31096$as_echo "$CUPS_FOUND" >&6; }
31097	fi
31098	if test "x$CUPS_FOUND" = xno; then
31099
31100    # Print a helpful message on how to acquire the necessary build dependency.
31101    # cups is the help tag: freetyp2, cups, pulse, alsa etc
31102    MISSING_DEPENDENCY=cups
31103    PKGHANDLER_COMMAND=
31104
31105    case $PKGHANDLER in
31106	apt-get)
31107                apt_help     $MISSING_DEPENDENCY ;;
31108    yum)
31109                yum_help     $MISSING_DEPENDENCY ;;
31110	port)
31111                port_help    $MISSING_DEPENDENCY ;;
31112	pkgutil)
31113                pkgutil_help $MISSING_DEPENDENCY ;;
31114	pkgadd)
31115                pkgadd_help  $MISSING_DEPENDENCY ;;
31116    * )
31117      break ;;
31118    esac
31119
31120    if test "x$PKGHANDLER_COMMAND" != x; then
31121        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31122    fi
31123
31124	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31125	fi
31126fi
31127
31128
31129
31130
31131
31132
31133###############################################################################
31134#
31135# The ubiquitous freetype2 library is used to render fonts.
31136#
31137
31138# Check whether --with-freetype was given.
31139if test "${with_freetype+set}" = set; then :
31140  withval=$with_freetype;
31141fi
31142
31143
31144# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31145USING_SYSTEM_FT_LIB=false
31146
31147if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31148	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31149		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31150$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31151	fi
31152	FREETYPE2_CFLAGS=
31153	FREETYPE2_LIBS=
31154        FREETYPE2_LIB_PATH=
31155else
31156	FREETYPE2_FOUND=no
31157
31158	if test "x$with_freetype" != x; then
31159
31160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31161
31162  # Input might be given as Windows format, start by converting to
31163  # unix format.
31164  path="$with_freetype"
31165  new_path=`$CYGPATH -u "$path"`
31166
31167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31170  # "foo.exe" is OK but "foo" is an error.
31171  #
31172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31173  # It is also a way to make sure we got the proper file name for the real test later on.
31174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31175  if test "x$test_shortpath" = x; then
31176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31177$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31178    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31179  fi
31180
31181  # Call helper function which possibly converts this using DOS-style short mode.
31182  # If so, the updated path is stored in $new_path.
31183
31184  input_path="$new_path"
31185  # Check if we need to convert this using DOS-style short mode. If the path
31186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31187  # take no chances and rewrite it.
31188  # Note: m4 eats our [], so we need to use [ and ] instead.
31189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31190  if test "x$has_forbidden_chars" != x; then
31191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31195      # Going to short mode and back again did indeed matter. Since short mode is
31196      # case insensitive, let's make it lowercase to improve readability.
31197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31198      # Now convert it back to Unix-stile (cygpath)
31199      input_path=`$CYGPATH -u "$shortmode_path"`
31200      new_path="$input_path"
31201    fi
31202  fi
31203
31204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31205  if test "x$test_cygdrive_prefix" = x; then
31206    # As a simple fix, exclude /usr/bin since it's not a real path.
31207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31209      # a path prefixed by /cygdrive for fixpath to work.
31210      new_path="$CYGWIN_ROOT_PATH$input_path"
31211    fi
31212  fi
31213
31214
31215  if test "x$path" != "x$new_path"; then
31216    with_freetype="$new_path"
31217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31218$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31219  fi
31220
31221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31222
31223  path="$with_freetype"
31224  has_colon=`$ECHO $path | $GREP ^.:`
31225  new_path="$path"
31226  if test "x$has_colon" = x; then
31227    # Not in mixed or Windows style, start by that.
31228    new_path=`cmd //c echo $path`
31229  fi
31230
31231
31232  input_path="$new_path"
31233  # Check if we need to convert this using DOS-style short mode. If the path
31234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31235  # take no chances and rewrite it.
31236  # Note: m4 eats our [], so we need to use [ and ] instead.
31237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31238  if test "x$has_forbidden_chars" != x; then
31239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31241  fi
31242
31243
31244  windows_path="$new_path"
31245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31246    unix_path=`$CYGPATH -u "$windows_path"`
31247    new_path="$unix_path"
31248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31250    new_path="$unix_path"
31251  fi
31252
31253  if test "x$path" != "x$new_path"; then
31254    with_freetype="$new_path"
31255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31256$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31257  fi
31258
31259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31261
31262  else
31263    # We're on a posix platform. Hooray! :)
31264    path="$with_freetype"
31265    has_space=`$ECHO "$path" | $GREP " "`
31266    if test "x$has_space" != x; then
31267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31268$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31269      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31270    fi
31271
31272    # Use eval to expand a potential ~
31273    eval path="$path"
31274    if test ! -f "$path" && test ! -d "$path"; then
31275      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31276    fi
31277
31278    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31279  fi
31280
31281	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31282            FREETYPE2_LIB_PATH="$with_freetype/lib"
31283            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31284                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31285                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31286            fi
31287            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31288                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31289            fi
31290	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31291            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31292                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31293            fi
31294 	    FREETYPE2_FOUND=yes
31295   	    if test "x$FREETYPE2_FOUND" = xyes; then
31296	        # Verify that the directories exist
31297                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31298		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31299		fi
31300	        # List the contents of the lib.
31301		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31302                if test "x$FREETYPELIB" = x; then
31303		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31304		fi
31305	        # Check one h-file
31306                if ! test -s "$with_freetype/include/ft2build.h"; then
31307		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31308		fi
31309            fi
31310        fi
31311	if test "x$FREETYPE2_FOUND" = xno; then
31312
31313
31314    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31315        # Source the builddeps file again, to make sure it uses the latest variables!
31316        . $builddepsfile
31317        # Look for a target and build machine specific resource!
31318        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31319        if test "x$resource" = x; then
31320            # Ok, lets instead look for a target specific resource
31321            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31322        fi
31323        if test "x$resource" = x; then
31324            # Ok, lets instead look for a build specific resource
31325            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31326        fi
31327        if test "x$resource" = x; then
31328            # Ok, lets instead look for a generic resource
31329            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31330            resource=${builddep_freetype2}
31331        fi
31332        if test "x$resource" != x; then
31333            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31334$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31335	    # If the resource in the builddeps.conf file is an existing directory,
31336	    # for example /java/linux/cups
31337	    if test -d ${resource}; then
31338	       depdir=${resource}
31339	    else
31340
31341# freetype2 is for example mymodule
31342# $resource is for example libs/general/libmymod_1_2_3.zip
31343# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31344# $with_builddeps_dir is for example /localhome/builddeps
31345# depdir is the name of the variable into which we store the depdir, eg MYMOD
31346# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31347# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31348    filename=`basename $resource`
31349    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31350    filebase=${filename%%.*}
31351    extension=${filename#*.}
31352    installdir=$with_builddeps_dir/$filebase
31353    if test ! -f $installdir/$filename.unpacked; then
31354        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31355$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31356        if test ! -d $installdir; then
31357            mkdir -p $installdir
31358        fi
31359        if test ! -d $installdir; then
31360            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31361        fi
31362        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31363        touch $tmpfile
31364        if test ! -f $tmpfile; then
31365            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31366        fi
31367
31368    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31369    # $tmpfile is the local file name for the downloaded file.
31370    VALID_TOOL=no
31371    if test "x$BDEPS_FTP" = xwget; then
31372       VALID_TOOL=yes
31373       wget -O $tmpfile $with_builddeps_server/$resource
31374    fi
31375    if test "x$BDEPS_FTP" = xlftp; then
31376       VALID_TOOL=yes
31377       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31378    fi
31379    if test "x$BDEPS_FTP" = xftp; then
31380        VALID_TOOL=yes
31381        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31382        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31383        FTPUSERPWD=${FTPSERVER%%@*}
31384        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31385            FTPUSER=${userpwd%%:*}
31386            FTPPWD=${userpwd#*@}
31387            FTPSERVER=${FTPSERVER#*@}
31388        else
31389            FTPUSER=ftp
31390            FTPPWD=ftp
31391        fi
31392        # the "pass" command does not work on some
31393        # ftp clients (read ftp.exe) but if it works,
31394        # passive mode is better!
31395        (\
31396            echo "user $FTPUSER $FTPPWD"        ;\
31397            echo "pass"                         ;\
31398            echo "bin"                          ;\
31399            echo "get $FTPPATH $tmpfile"              ;\
31400        ) | ftp -in $FTPSERVER
31401    fi
31402    if test "x$VALID_TOOL" != xyes; then
31403       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31404    fi
31405
31406        mv $tmpfile $installdir/$filename
31407        if test ! -s $installdir/$filename; then
31408            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31409        fi
31410        case "$extension" in
31411            zip)  echo "Unzipping $installdir/$filename..."
31412               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31413            ;;
31414            tar.gz) echo "Untaring $installdir/$filename..."
31415               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31416            ;;
31417            tgz) echo "Untaring $installdir/$filename..."
31418               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31419            ;;
31420            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31421            ;;
31422        esac
31423    fi
31424    if test -f $installdir/$filename.unpacked; then
31425        depdir=$installdir
31426    fi
31427
31428	    fi
31429            # Source the builddeps file again, because in the previous command, the depdir
31430            # was updated to point at the current build dependency install directory.
31431            . $builddepsfile
31432            # Now extract variables from the builddeps.conf files.
31433            theroot=${builddep_freetype2_ROOT}
31434            thecflags=${builddep_freetype2_CFLAGS}
31435            thelibs=${builddep_freetype2_LIBS}
31436            if test "x$depdir" = x; then
31437                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31438            fi
31439            FREETYPE2=$depdir
31440            if test "x$theroot" != x; then
31441               FREETYPE2="$theroot"
31442            fi
31443            if test "x$thecflags" != x; then
31444               FREETYPE2_CFLAGS="$thecflags"
31445            fi
31446            if test "x$thelibs" != x; then
31447               FREETYPE2_LIBS="$thelibs"
31448            fi
31449            FREETYPE2_FOUND=yes
31450            else FREETYPE2_FOUND=no
31451
31452        fi
31453        else FREETYPE2_FOUND=no
31454
31455    fi
31456
31457            USING_SYSTEM_FT_LIB=true
31458	fi
31459	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31460            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31461
31462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31463
31464  # Input might be given as Windows format, start by converting to
31465  # unix format.
31466  path="$FREETYPELOCATION"
31467  new_path=`$CYGPATH -u "$path"`
31468
31469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31472  # "foo.exe" is OK but "foo" is an error.
31473  #
31474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31475  # It is also a way to make sure we got the proper file name for the real test later on.
31476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31477  if test "x$test_shortpath" = x; then
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31479$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31480    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31481  fi
31482
31483  # Call helper function which possibly converts this using DOS-style short mode.
31484  # If so, the updated path is stored in $new_path.
31485
31486  input_path="$new_path"
31487  # Check if we need to convert this using DOS-style short mode. If the path
31488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31489  # take no chances and rewrite it.
31490  # Note: m4 eats our [], so we need to use [ and ] instead.
31491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31492  if test "x$has_forbidden_chars" != x; then
31493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31497      # Going to short mode and back again did indeed matter. Since short mode is
31498      # case insensitive, let's make it lowercase to improve readability.
31499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31500      # Now convert it back to Unix-stile (cygpath)
31501      input_path=`$CYGPATH -u "$shortmode_path"`
31502      new_path="$input_path"
31503    fi
31504  fi
31505
31506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31507  if test "x$test_cygdrive_prefix" = x; then
31508    # As a simple fix, exclude /usr/bin since it's not a real path.
31509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31511      # a path prefixed by /cygdrive for fixpath to work.
31512      new_path="$CYGWIN_ROOT_PATH$input_path"
31513    fi
31514  fi
31515
31516
31517  if test "x$path" != "x$new_path"; then
31518    FREETYPELOCATION="$new_path"
31519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31520$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31521  fi
31522
31523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31524
31525  path="$FREETYPELOCATION"
31526  has_colon=`$ECHO $path | $GREP ^.:`
31527  new_path="$path"
31528  if test "x$has_colon" = x; then
31529    # Not in mixed or Windows style, start by that.
31530    new_path=`cmd //c echo $path`
31531  fi
31532
31533
31534  input_path="$new_path"
31535  # Check if we need to convert this using DOS-style short mode. If the path
31536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31537  # take no chances and rewrite it.
31538  # Note: m4 eats our [], so we need to use [ and ] instead.
31539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31540  if test "x$has_forbidden_chars" != x; then
31541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31543  fi
31544
31545
31546  windows_path="$new_path"
31547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31548    unix_path=`$CYGPATH -u "$windows_path"`
31549    new_path="$unix_path"
31550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31552    new_path="$unix_path"
31553  fi
31554
31555  if test "x$path" != "x$new_path"; then
31556    FREETYPELOCATION="$new_path"
31557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31558$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31559  fi
31560
31561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31563
31564  else
31565    # We're on a posix platform. Hooray! :)
31566    path="$FREETYPELOCATION"
31567    has_space=`$ECHO "$path" | $GREP " "`
31568    if test "x$has_space" != x; then
31569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31570$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31571      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31572    fi
31573
31574    # Use eval to expand a potential ~
31575    eval path="$path"
31576    if test ! -f "$path" && test ! -d "$path"; then
31577      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31578    fi
31579
31580    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31581  fi
31582
31583	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31584$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31585	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31586	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31587	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31588 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31589                if ! test -s "$FREETYPE2_LIBS"; then
31590		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31591		fi
31592                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31593		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31594		fi
31595                USING_SYSTEM_FT_LIB=true
31596                FREETYPE2_FOUND=yes
31597	    fi
31598	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31599$as_echo "$FREETYPE2_FOUND" >&6; }
31600        fi
31601	if test "x$FREETYPE2_FOUND" = xno; then
31602
31603pkg_failed=no
31604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31605$as_echo_n "checking for FREETYPE2... " >&6; }
31606
31607if test -n "$FREETYPE2_CFLAGS"; then
31608    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31609 elif test -n "$PKG_CONFIG"; then
31610    if test -n "$PKG_CONFIG" && \
31611    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31612  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31613  ac_status=$?
31614  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31615  test $ac_status = 0; }; then
31616  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31617else
31618  pkg_failed=yes
31619fi
31620 else
31621    pkg_failed=untried
31622fi
31623if test -n "$FREETYPE2_LIBS"; then
31624    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31625 elif test -n "$PKG_CONFIG"; then
31626    if test -n "$PKG_CONFIG" && \
31627    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31628  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31629  ac_status=$?
31630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31631  test $ac_status = 0; }; then
31632  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31633else
31634  pkg_failed=yes
31635fi
31636 else
31637    pkg_failed=untried
31638fi
31639
31640
31641
31642if test $pkg_failed = yes; then
31643
31644if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31645        _pkg_short_errors_supported=yes
31646else
31647        _pkg_short_errors_supported=no
31648fi
31649        if test $_pkg_short_errors_supported = yes; then
31650	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31651        else
31652	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31653        fi
31654	# Put the nasty error message in config.log where it belongs
31655	echo "$FREETYPE2_PKG_ERRORS" >&5
31656
31657	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31658$as_echo "no" >&6; }
31659                FREETYPE2_FOUND=no
31660elif test $pkg_failed = untried; then
31661	FREETYPE2_FOUND=no
31662else
31663	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31664	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31666$as_echo "yes" >&6; }
31667	FREETYPE2_FOUND=yes
31668fi
31669            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31670            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31671            USING_SYSTEM_FT_LIB=true
31672            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31673            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31674              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31675            fi
31676	fi
31677	if test "x$FREETYPE2_FOUND" = xno; then
31678	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31679$as_echo_n "checking for freetype in some standard locations... " >&6; }
31680
31681	    if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31682	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31683	        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31684	    fi
31685	    if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31686	        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31687	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31688	    fi
31689
31690	    PREV_CXXCFLAGS="$CXXFLAGS"
31691	    PREV_LDFLAGS="$LDFLAGS"
31692	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31693	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31694	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31695/* end confdefs.h.  */
31696#include<ft2build.h>
31697	                    #include FT_FREETYPE_H
31698	                   int main() { return 0; }
31699
31700_ACEOF
31701if ac_fn_cxx_try_link "$LINENO"; then :
31702
31703	                      # Yes, the default cflags and libs did the trick.
31704	                      FREETYPE2_FOUND=yes
31705	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31706	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31707
31708else
31709
31710	                      FREETYPE2_FOUND=no
31711
31712fi
31713rm -f core conftest.err conftest.$ac_objext \
31714    conftest$ac_exeext conftest.$ac_ext
31715            CXXCFLAGS="$PREV_CXXFLAGS"
31716	    LDFLAGS="$PREV_LDFLAGS"
31717	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31718$as_echo "$FREETYPE2_FOUND" >&6; }
31719            USING_SYSTEM_FT_LIB=true
31720	fi
31721	if test "x$FREETYPE2_FOUND" = xno; then
31722
31723    # Print a helpful message on how to acquire the necessary build dependency.
31724    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31725    MISSING_DEPENDENCY=freetype2
31726    PKGHANDLER_COMMAND=
31727
31728    case $PKGHANDLER in
31729	apt-get)
31730                apt_help     $MISSING_DEPENDENCY ;;
31731    yum)
31732                yum_help     $MISSING_DEPENDENCY ;;
31733	port)
31734                port_help    $MISSING_DEPENDENCY ;;
31735	pkgutil)
31736                pkgutil_help $MISSING_DEPENDENCY ;;
31737	pkgadd)
31738                pkgadd_help  $MISSING_DEPENDENCY ;;
31739    * )
31740      break ;;
31741    esac
31742
31743    if test "x$PKGHANDLER_COMMAND" != x; then
31744        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31745    fi
31746
31747		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31748	fi
31749
31750        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31751            # AC_CHECK_LIB does not support use of cl.exe
31752            PREV_LDFLAGS="$LDFLAGS"
31753            LDFLAGS="$FREETYPE2_LIBS"
31754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31755$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31756if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31757  $as_echo_n "(cached) " >&6
31758else
31759  ac_check_lib_save_LIBS=$LIBS
31760LIBS="-lfreetype  $LIBS"
31761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31762/* end confdefs.h.  */
31763
31764/* Override any GCC internal prototype to avoid an error.
31765   Use char because int might match the return type of a GCC
31766   builtin and then its argument prototype would still apply.  */
31767#ifdef __cplusplus
31768extern "C"
31769#endif
31770char FT_Init_FreeType ();
31771int
31772main ()
31773{
31774return FT_Init_FreeType ();
31775  ;
31776  return 0;
31777}
31778_ACEOF
31779if ac_fn_cxx_try_link "$LINENO"; then :
31780  ac_cv_lib_freetype_FT_Init_FreeType=yes
31781else
31782  ac_cv_lib_freetype_FT_Init_FreeType=no
31783fi
31784rm -f core conftest.err conftest.$ac_objext \
31785    conftest$ac_exeext conftest.$ac_ext
31786LIBS=$ac_check_lib_save_LIBS
31787fi
31788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31789$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31790if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31791  FREETYPE2_FOUND=true
31792else
31793  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31794fi
31795
31796            LDFLAGS="$PREV_LDFLAGS"
31797        fi
31798fi
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808###############################################################################
31809#
31810# Check for alsa headers and libraries. Used on Linux/GNU systems.
31811#
31812
31813# Check whether --with-alsa was given.
31814if test "${with_alsa+set}" = set; then :
31815  withval=$with_alsa;
31816fi
31817
31818
31819# Check whether --with-alsa-include was given.
31820if test "${with_alsa_include+set}" = set; then :
31821  withval=$with_alsa_include;
31822fi
31823
31824
31825# Check whether --with-alsa-lib was given.
31826if test "${with_alsa_lib+set}" = set; then :
31827  withval=$with_alsa_lib;
31828fi
31829
31830
31831if test "x$ALSA_NOT_NEEDED" = xyes; then
31832	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31833		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31834$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31835	fi
31836	ALSA_CFLAGS=
31837	ALSA_LIBS=
31838else
31839	ALSA_FOUND=no
31840
31841	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31842	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31843	fi
31844
31845	if test "x${with_alsa}" != x; then
31846	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31847	    ALSA_CFLAGS="-I${with_alsa}/include"
31848	    ALSA_FOUND=yes
31849	fi
31850	if test "x${with_alsa_include}" != x; then
31851	    ALSA_CFLAGS="-I${with_alsa_include}"
31852	    ALSA_FOUND=yes
31853	fi
31854	if test "x${with_alsa_lib}" != x; then
31855	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31856	    ALSA_FOUND=yes
31857	fi
31858	if test "x$ALSA_FOUND" = xno; then
31859
31860
31861    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31862        # Source the builddeps file again, to make sure it uses the latest variables!
31863        . $builddepsfile
31864        # Look for a target and build machine specific resource!
31865        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31866        if test "x$resource" = x; then
31867            # Ok, lets instead look for a target specific resource
31868            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31869        fi
31870        if test "x$resource" = x; then
31871            # Ok, lets instead look for a build specific resource
31872            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31873        fi
31874        if test "x$resource" = x; then
31875            # Ok, lets instead look for a generic resource
31876            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31877            resource=${builddep_alsa}
31878        fi
31879        if test "x$resource" != x; then
31880            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31881$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31882	    # If the resource in the builddeps.conf file is an existing directory,
31883	    # for example /java/linux/cups
31884	    if test -d ${resource}; then
31885	       depdir=${resource}
31886	    else
31887
31888# alsa is for example mymodule
31889# $resource is for example libs/general/libmymod_1_2_3.zip
31890# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31891# $with_builddeps_dir is for example /localhome/builddeps
31892# depdir is the name of the variable into which we store the depdir, eg MYMOD
31893# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31894# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31895    filename=`basename $resource`
31896    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31897    filebase=${filename%%.*}
31898    extension=${filename#*.}
31899    installdir=$with_builddeps_dir/$filebase
31900    if test ! -f $installdir/$filename.unpacked; then
31901        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31902$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31903        if test ! -d $installdir; then
31904            mkdir -p $installdir
31905        fi
31906        if test ! -d $installdir; then
31907            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31908        fi
31909        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31910        touch $tmpfile
31911        if test ! -f $tmpfile; then
31912            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31913        fi
31914
31915    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31916    # $tmpfile is the local file name for the downloaded file.
31917    VALID_TOOL=no
31918    if test "x$BDEPS_FTP" = xwget; then
31919       VALID_TOOL=yes
31920       wget -O $tmpfile $with_builddeps_server/$resource
31921    fi
31922    if test "x$BDEPS_FTP" = xlftp; then
31923       VALID_TOOL=yes
31924       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31925    fi
31926    if test "x$BDEPS_FTP" = xftp; then
31927        VALID_TOOL=yes
31928        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31929        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31930        FTPUSERPWD=${FTPSERVER%%@*}
31931        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31932            FTPUSER=${userpwd%%:*}
31933            FTPPWD=${userpwd#*@}
31934            FTPSERVER=${FTPSERVER#*@}
31935        else
31936            FTPUSER=ftp
31937            FTPPWD=ftp
31938        fi
31939        # the "pass" command does not work on some
31940        # ftp clients (read ftp.exe) but if it works,
31941        # passive mode is better!
31942        (\
31943            echo "user $FTPUSER $FTPPWD"        ;\
31944            echo "pass"                         ;\
31945            echo "bin"                          ;\
31946            echo "get $FTPPATH $tmpfile"              ;\
31947        ) | ftp -in $FTPSERVER
31948    fi
31949    if test "x$VALID_TOOL" != xyes; then
31950       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31951    fi
31952
31953        mv $tmpfile $installdir/$filename
31954        if test ! -s $installdir/$filename; then
31955            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31956        fi
31957        case "$extension" in
31958            zip)  echo "Unzipping $installdir/$filename..."
31959               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31960            ;;
31961            tar.gz) echo "Untaring $installdir/$filename..."
31962               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31963            ;;
31964            tgz) echo "Untaring $installdir/$filename..."
31965               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31966            ;;
31967            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31968            ;;
31969        esac
31970    fi
31971    if test -f $installdir/$filename.unpacked; then
31972        depdir=$installdir
31973    fi
31974
31975	    fi
31976            # Source the builddeps file again, because in the previous command, the depdir
31977            # was updated to point at the current build dependency install directory.
31978            . $builddepsfile
31979            # Now extract variables from the builddeps.conf files.
31980            theroot=${builddep_alsa_ROOT}
31981            thecflags=${builddep_alsa_CFLAGS}
31982            thelibs=${builddep_alsa_LIBS}
31983            if test "x$depdir" = x; then
31984                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31985            fi
31986            ALSA=$depdir
31987            if test "x$theroot" != x; then
31988               ALSA="$theroot"
31989            fi
31990            if test "x$thecflags" != x; then
31991               ALSA_CFLAGS="$thecflags"
31992            fi
31993            if test "x$thelibs" != x; then
31994               ALSA_LIBS="$thelibs"
31995            fi
31996            ALSA_FOUND=yes
31997            else ALSA_FOUND=no
31998
31999        fi
32000        else ALSA_FOUND=no
32001
32002    fi
32003
32004	fi
32005	if test "x$ALSA_FOUND" = xno; then
32006
32007pkg_failed=no
32008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
32009$as_echo_n "checking for ALSA... " >&6; }
32010
32011if test -n "$ALSA_CFLAGS"; then
32012    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
32013 elif test -n "$PKG_CONFIG"; then
32014    if test -n "$PKG_CONFIG" && \
32015    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32016  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32017  ac_status=$?
32018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32019  test $ac_status = 0; }; then
32020  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
32021else
32022  pkg_failed=yes
32023fi
32024 else
32025    pkg_failed=untried
32026fi
32027if test -n "$ALSA_LIBS"; then
32028    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
32029 elif test -n "$PKG_CONFIG"; then
32030    if test -n "$PKG_CONFIG" && \
32031    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
32032  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
32033  ac_status=$?
32034  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32035  test $ac_status = 0; }; then
32036  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
32037else
32038  pkg_failed=yes
32039fi
32040 else
32041    pkg_failed=untried
32042fi
32043
32044
32045
32046if test $pkg_failed = yes; then
32047
32048if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32049        _pkg_short_errors_supported=yes
32050else
32051        _pkg_short_errors_supported=no
32052fi
32053        if test $_pkg_short_errors_supported = yes; then
32054	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
32055        else
32056	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
32057        fi
32058	# Put the nasty error message in config.log where it belongs
32059	echo "$ALSA_PKG_ERRORS" >&5
32060
32061	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32062$as_echo "no" >&6; }
32063                ALSA_FOUND=no
32064elif test $pkg_failed = untried; then
32065	ALSA_FOUND=no
32066else
32067	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
32068	ALSA_LIBS=$pkg_cv_ALSA_LIBS
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32070$as_echo "yes" >&6; }
32071	ALSA_FOUND=yes
32072fi
32073	fi
32074	if test "x$ALSA_FOUND" = xno; then
32075	    for ac_header in alsa/asoundlib.h
32076do :
32077  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
32078if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
32079  cat >>confdefs.h <<_ACEOF
32080#define HAVE_ALSA_ASOUNDLIB_H 1
32081_ACEOF
32082 ALSA_FOUND=yes
32083	                      ALSA_CFLAGS=-Iignoreme
32084	                      ALSA_LIBS=-lasound
32085	                      DEFAULT_ALSA=yes
32086else
32087  ALSA_FOUND=no
32088fi
32089
32090done
32091
32092	fi
32093	if test "x$ALSA_FOUND" = xno; then
32094
32095    # Print a helpful message on how to acquire the necessary build dependency.
32096    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
32097    MISSING_DEPENDENCY=alsa
32098    PKGHANDLER_COMMAND=
32099
32100    case $PKGHANDLER in
32101	apt-get)
32102                apt_help     $MISSING_DEPENDENCY ;;
32103    yum)
32104                yum_help     $MISSING_DEPENDENCY ;;
32105	port)
32106                port_help    $MISSING_DEPENDENCY ;;
32107	pkgutil)
32108                pkgutil_help $MISSING_DEPENDENCY ;;
32109	pkgadd)
32110                pkgadd_help  $MISSING_DEPENDENCY ;;
32111    * )
32112      break ;;
32113    esac
32114
32115    if test "x$PKGHANDLER_COMMAND" != x; then
32116        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32117    fi
32118
32119	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
32120	fi
32121fi
32122
32123
32124
32125
32126
32127
32128
32129###############################################################################
32130#
32131# Check for the jpeg library
32132#
32133
32134USE_EXTERNAL_LIBJPEG=true
32135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
32136$as_echo_n "checking for main in -ljpeg... " >&6; }
32137if test "${ac_cv_lib_jpeg_main+set}" = set; then :
32138  $as_echo_n "(cached) " >&6
32139else
32140  ac_check_lib_save_LIBS=$LIBS
32141LIBS="-ljpeg  $LIBS"
32142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32143/* end confdefs.h.  */
32144
32145
32146int
32147main ()
32148{
32149return main ();
32150  ;
32151  return 0;
32152}
32153_ACEOF
32154if ac_fn_cxx_try_link "$LINENO"; then :
32155  ac_cv_lib_jpeg_main=yes
32156else
32157  ac_cv_lib_jpeg_main=no
32158fi
32159rm -f core conftest.err conftest.$ac_objext \
32160    conftest$ac_exeext conftest.$ac_ext
32161LIBS=$ac_check_lib_save_LIBS
32162fi
32163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32164$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32165if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32166  cat >>confdefs.h <<_ACEOF
32167#define HAVE_LIBJPEG 1
32168_ACEOF
32169
32170  LIBS="-ljpeg $LIBS"
32171
32172else
32173   USE_EXTERNAL_LIBJPEG=false
32174               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32175$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32176
32177fi
32178
32179
32180
32181###############################################################################
32182#
32183# Check for the gif library
32184#
32185
32186
32187# Check whether --with-giflib was given.
32188if test "${with_giflib+set}" = set; then :
32189  withval=$with_giflib;
32190fi
32191
32192
32193
32194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32195$as_echo_n "checking for which giflib to use... " >&6; }
32196
32197# default is bundled
32198DEFAULT_GIFLIB=bundled
32199
32200#
32201# if user didn't specify, use DEFAULT_GIFLIB
32202#
32203if test "x${with_giflib}" = "x"; then
32204    with_giflib=${DEFAULT_GIFLIB}
32205fi
32206
32207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32208$as_echo "${with_giflib}" >&6; }
32209
32210if test "x${with_giflib}" = "xbundled"; then
32211    USE_EXTERNAL_LIBGIF=false
32212elif test "x${with_giflib}" = "xsystem"; then
32213    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32214if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32215
32216else
32217   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32218fi
32219
32220
32221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32222$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32223if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32224  $as_echo_n "(cached) " >&6
32225else
32226  ac_check_lib_save_LIBS=$LIBS
32227LIBS="-lgif  $LIBS"
32228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32229/* end confdefs.h.  */
32230
32231/* Override any GCC internal prototype to avoid an error.
32232   Use char because int might match the return type of a GCC
32233   builtin and then its argument prototype would still apply.  */
32234#ifdef __cplusplus
32235extern "C"
32236#endif
32237char DGifGetCode ();
32238int
32239main ()
32240{
32241return DGifGetCode ();
32242  ;
32243  return 0;
32244}
32245_ACEOF
32246if ac_fn_cxx_try_link "$LINENO"; then :
32247  ac_cv_lib_gif_DGifGetCode=yes
32248else
32249  ac_cv_lib_gif_DGifGetCode=no
32250fi
32251rm -f core conftest.err conftest.$ac_objext \
32252    conftest$ac_exeext conftest.$ac_ext
32253LIBS=$ac_check_lib_save_LIBS
32254fi
32255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32256$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32257if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32258  cat >>confdefs.h <<_ACEOF
32259#define HAVE_LIBGIF 1
32260_ACEOF
32261
32262  LIBS="-lgif $LIBS"
32263
32264else
32265   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32266fi
32267
32268
32269    USE_EXTERNAL_LIBGIF=true
32270else
32271    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32272fi
32273
32274
32275###############################################################################
32276#
32277# Check for the zlib library
32278#
32279
32280
32281# Check whether --with-zlib was given.
32282if test "${with_zlib+set}" = set; then :
32283  withval=$with_zlib;
32284fi
32285
32286
32287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32288$as_echo_n "checking for compress in -lz... " >&6; }
32289if test "${ac_cv_lib_z_compress+set}" = set; then :
32290  $as_echo_n "(cached) " >&6
32291else
32292  ac_check_lib_save_LIBS=$LIBS
32293LIBS="-lz  $LIBS"
32294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32295/* end confdefs.h.  */
32296
32297/* Override any GCC internal prototype to avoid an error.
32298   Use char because int might match the return type of a GCC
32299   builtin and then its argument prototype would still apply.  */
32300#ifdef __cplusplus
32301extern "C"
32302#endif
32303char compress ();
32304int
32305main ()
32306{
32307return compress ();
32308  ;
32309  return 0;
32310}
32311_ACEOF
32312if ac_fn_cxx_try_link "$LINENO"; then :
32313  ac_cv_lib_z_compress=yes
32314else
32315  ac_cv_lib_z_compress=no
32316fi
32317rm -f core conftest.err conftest.$ac_objext \
32318    conftest$ac_exeext conftest.$ac_ext
32319LIBS=$ac_check_lib_save_LIBS
32320fi
32321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32322$as_echo "$ac_cv_lib_z_compress" >&6; }
32323if test "x$ac_cv_lib_z_compress" = x""yes; then :
32324   ZLIB_FOUND=yes
32325else
32326   ZLIB_FOUND=no
32327fi
32328
32329
32330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32331$as_echo_n "checking for which zlib to use... " >&6; }
32332
32333DEFAULT_ZLIB=bundled
32334if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32335#
32336# On macosx default is system...on others default is
32337#
32338    DEFAULT_ZLIB=system
32339fi
32340
32341if test "x${ZLIB_FOUND}" != "xyes"; then
32342#
32343# If we don't find any system...set default to bundled
32344#
32345    DEFAULT_ZLIB=bundled
32346fi
32347
32348#
32349# If user didn't specify, use DEFAULT_ZLIB
32350#
32351if test "x${with_zlib}" = "x"; then
32352    with_zlib=${DEFAULT_ZLIB}
32353fi
32354
32355if test "x${with_zlib}" = "xbundled"; then
32356    USE_EXTERNAL_LIBZ=false
32357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32358$as_echo "bundled" >&6; }
32359elif test "x${with_zlib}" = "xsystem"; then
32360    if test "x${ZLIB_FOUND}" = "xyes"; then
32361        USE_EXTERNAL_LIBZ=true
32362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32363$as_echo "system" >&6; }
32364    else
32365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32366$as_echo "system not found" >&6; }
32367        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32368    fi
32369else
32370    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32371fi
32372
32373
32374
32375###############################################################################
32376LIBZIP_CAN_USE_MMAP=true
32377
32378
32379
32380###############################################################################
32381#
32382# Check if altzone exists in time.h
32383#
32384
32385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32386/* end confdefs.h.  */
32387#include <time.h>
32388int
32389main ()
32390{
32391return (int)altzone;
32392  ;
32393  return 0;
32394}
32395_ACEOF
32396if ac_fn_cxx_try_link "$LINENO"; then :
32397  has_altzone=yes
32398else
32399  has_altzone=no
32400fi
32401rm -f core conftest.err conftest.$ac_objext \
32402    conftest$ac_exeext conftest.$ac_ext
32403if test "x$has_altzone" = xyes; then
32404
32405$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32406
32407fi
32408
32409###############################################################################
32410#
32411# Check the maths library
32412#
32413
32414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32415$as_echo_n "checking for cos in -lm... " >&6; }
32416if test "${ac_cv_lib_m_cos+set}" = set; then :
32417  $as_echo_n "(cached) " >&6
32418else
32419  ac_check_lib_save_LIBS=$LIBS
32420LIBS="-lm  $LIBS"
32421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32422/* end confdefs.h.  */
32423
32424/* Override any GCC internal prototype to avoid an error.
32425   Use char because int might match the return type of a GCC
32426   builtin and then its argument prototype would still apply.  */
32427#ifdef __cplusplus
32428extern "C"
32429#endif
32430char cos ();
32431int
32432main ()
32433{
32434return cos ();
32435  ;
32436  return 0;
32437}
32438_ACEOF
32439if ac_fn_cxx_try_link "$LINENO"; then :
32440  ac_cv_lib_m_cos=yes
32441else
32442  ac_cv_lib_m_cos=no
32443fi
32444rm -f core conftest.err conftest.$ac_objext \
32445    conftest$ac_exeext conftest.$ac_ext
32446LIBS=$ac_check_lib_save_LIBS
32447fi
32448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32449$as_echo "$ac_cv_lib_m_cos" >&6; }
32450if test "x$ac_cv_lib_m_cos" = x""yes; then :
32451  cat >>confdefs.h <<_ACEOF
32452#define HAVE_LIBM 1
32453_ACEOF
32454
32455  LIBS="-lm $LIBS"
32456
32457else
32458
32459                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32460$as_echo "$as_me: Maths library was not found" >&6;}
32461
32462fi
32463
32464
32465
32466###############################################################################
32467#
32468# Check for libdl.so
32469
32470save_LIBS="$LIBS"
32471LIBS=""
32472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32473$as_echo_n "checking for dlopen in -ldl... " >&6; }
32474if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32475  $as_echo_n "(cached) " >&6
32476else
32477  ac_check_lib_save_LIBS=$LIBS
32478LIBS="-ldl  $LIBS"
32479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32480/* end confdefs.h.  */
32481
32482/* Override any GCC internal prototype to avoid an error.
32483   Use char because int might match the return type of a GCC
32484   builtin and then its argument prototype would still apply.  */
32485#ifdef __cplusplus
32486extern "C"
32487#endif
32488char dlopen ();
32489int
32490main ()
32491{
32492return dlopen ();
32493  ;
32494  return 0;
32495}
32496_ACEOF
32497if ac_fn_cxx_try_link "$LINENO"; then :
32498  ac_cv_lib_dl_dlopen=yes
32499else
32500  ac_cv_lib_dl_dlopen=no
32501fi
32502rm -f core conftest.err conftest.$ac_objext \
32503    conftest$ac_exeext conftest.$ac_ext
32504LIBS=$ac_check_lib_save_LIBS
32505fi
32506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32507$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32508if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32509  cat >>confdefs.h <<_ACEOF
32510#define HAVE_LIBDL 1
32511_ACEOF
32512
32513  LIBS="-ldl $LIBS"
32514
32515fi
32516
32517LIBDL="$LIBS"
32518
32519LIBS="$save_LIBS"
32520
32521
32522
32523###############################################################################
32524#
32525# statically link libstdc++ before C++ ABI is stablized on Linux unless
32526# dynamic build is configured on command line.
32527#
32528
32529# Check whether --with-stdc++lib was given.
32530if test "${with_stdc__lib+set}" = set; then :
32531  withval=$with_stdc__lib;
32532    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32533        && test "x$with_stdc__lib" != xdefault; then
32534      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32535    fi
32536
32537else
32538  with_stdc__lib=default
32539
32540fi
32541
32542
32543if test "x$OPENJDK_TARGET_OS" = xlinux; then
32544    # Test if -lstdc++ works.
32545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32546$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32547    ac_ext=cpp
32548ac_cpp='$CXXCPP $CPPFLAGS'
32549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32552
32553    OLD_CXXFLAGS="$CXXFLAGS"
32554    CXXFLAGS="$CXXFLAGS -lstdc++"
32555    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32556/* end confdefs.h.  */
32557
32558int
32559main ()
32560{
32561return 0;
32562  ;
32563  return 0;
32564}
32565_ACEOF
32566if ac_fn_cxx_try_link "$LINENO"; then :
32567  has_dynamic_libstdcxx=yes
32568else
32569  has_dynamic_libstdcxx=no
32570fi
32571rm -f core conftest.err conftest.$ac_objext \
32572    conftest$ac_exeext conftest.$ac_ext
32573    CXXFLAGS="$OLD_CXXFLAGS"
32574    ac_ext=cpp
32575ac_cpp='$CXXCPP $CPPFLAGS'
32576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32579
32580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32581$as_echo "$has_dynamic_libstdcxx" >&6; }
32582
32583    # Test if stdc++ can be linked statically.
32584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32585$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32586    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32587    ac_ext=cpp
32588ac_cpp='$CXXCPP $CPPFLAGS'
32589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32592
32593    OLD_LIBS="$LIBS"
32594    OLD_CXX="$CXX"
32595    LIBS="$STATIC_STDCXX_FLAGS"
32596    CXX="$CC"
32597    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32598/* end confdefs.h.  */
32599
32600int
32601main ()
32602{
32603return 0;
32604  ;
32605  return 0;
32606}
32607_ACEOF
32608if ac_fn_cxx_try_link "$LINENO"; then :
32609  has_static_libstdcxx=yes
32610else
32611  has_static_libstdcxx=no
32612fi
32613rm -f core conftest.err conftest.$ac_objext \
32614    conftest$ac_exeext conftest.$ac_ext
32615    LIBS="$OLD_LIBS"
32616    CXX="$OLD_CXX"
32617    ac_ext=cpp
32618ac_cpp='$CXXCPP $CPPFLAGS'
32619ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32620ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32621ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32622
32623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32624$as_echo "$has_static_libstdcxx" >&6; }
32625
32626    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32627        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32628    fi
32629
32630    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32631        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32632    fi
32633
32634    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32635        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32636    fi
32637
32638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32639$as_echo_n "checking how to link with libstdc++... " >&6; }
32640    # If dynamic was requested, it's available since it would fail above otherwise.
32641    # If dynamic wasn't requested, go with static unless it isn't available.
32642    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32643        LIBCXX="$LIBCXX -lstdc++"
32644        LDCXX="$CXX"
32645        STATIC_CXX_SETTING="STATIC_CXX=false"
32646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32647$as_echo "dynamic" >&6; }
32648    else
32649        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32650        LDCXX="$CC"
32651        STATIC_CXX_SETTING="STATIC_CXX=true"
32652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32653$as_echo "static" >&6; }
32654    fi
32655fi
32656
32657
32658if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32659    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32660
32661pkg_failed=no
32662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32663$as_echo_n "checking for LIBFFI... " >&6; }
32664
32665if test -n "$LIBFFI_CFLAGS"; then
32666    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32667 elif test -n "$PKG_CONFIG"; then
32668    if test -n "$PKG_CONFIG" && \
32669    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32670  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32671  ac_status=$?
32672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32673  test $ac_status = 0; }; then
32674  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32675else
32676  pkg_failed=yes
32677fi
32678 else
32679    pkg_failed=untried
32680fi
32681if test -n "$LIBFFI_LIBS"; then
32682    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32683 elif test -n "$PKG_CONFIG"; then
32684    if test -n "$PKG_CONFIG" && \
32685    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32686  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32687  ac_status=$?
32688  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32689  test $ac_status = 0; }; then
32690  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32691else
32692  pkg_failed=yes
32693fi
32694 else
32695    pkg_failed=untried
32696fi
32697
32698
32699
32700if test $pkg_failed = yes; then
32701
32702if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32703        _pkg_short_errors_supported=yes
32704else
32705        _pkg_short_errors_supported=no
32706fi
32707        if test $_pkg_short_errors_supported = yes; then
32708	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32709        else
32710	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32711        fi
32712	# Put the nasty error message in config.log where it belongs
32713	echo "$LIBFFI_PKG_ERRORS" >&5
32714
32715	as_fn_error $? "Package requirements (libffi) were not met:
32716
32717$LIBFFI_PKG_ERRORS
32718
32719Consider adjusting the PKG_CONFIG_PATH environment variable if you
32720installed software in a non-standard prefix.
32721
32722Alternatively, you may set the environment variables LIBFFI_CFLAGS
32723and LIBFFI_LIBS to avoid the need to call pkg-config.
32724See the pkg-config man page for more details.
32725" "$LINENO" 5
32726elif test $pkg_failed = untried; then
32727	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32729as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32730is in your PATH or set the PKG_CONFIG environment variable to the full
32731path to pkg-config.
32732
32733Alternatively, you may set the environment variables LIBFFI_CFLAGS
32734and LIBFFI_LIBS to avoid the need to call pkg-config.
32735See the pkg-config man page for more details.
32736
32737To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32738See \`config.log' for more details" "$LINENO" 5 ; }
32739else
32740	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32741	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32743$as_echo "yes" >&6; }
32744	:
32745fi
32746
32747fi
32748
32749if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32750    # Extract the first word of "llvm-config", so it can be a program name with args.
32751set dummy llvm-config; ac_word=$2
32752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32753$as_echo_n "checking for $ac_word... " >&6; }
32754if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32755  $as_echo_n "(cached) " >&6
32756else
32757  if test -n "$LLVM_CONFIG"; then
32758  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32759else
32760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32761for as_dir in $PATH
32762do
32763  IFS=$as_save_IFS
32764  test -z "$as_dir" && as_dir=.
32765    for ac_exec_ext in '' $ac_executable_extensions; do
32766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32767    ac_cv_prog_LLVM_CONFIG="llvm-config"
32768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32769    break 2
32770  fi
32771done
32772  done
32773IFS=$as_save_IFS
32774
32775fi
32776fi
32777LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32778if test -n "$LLVM_CONFIG"; then
32779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32780$as_echo "$LLVM_CONFIG" >&6; }
32781else
32782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32783$as_echo "no" >&6; }
32784fi
32785
32786
32787
32788    if test "x$LLVM_CONFIG" != xllvm-config; then
32789        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32790    fi
32791
32792    llvm_components="jit mcjit engine nativecodegen native"
32793    unset LLVM_CFLAGS
32794    for flag in $("$LLVM_CONFIG" --cxxflags); do
32795      if echo "${flag}" | grep -q '^-[ID]'; then
32796        if test "${flag}" != "-D_DEBUG" ; then
32797          if test "${LLVM_CFLAGS}" != "" ; then
32798            LLVM_CFLAGS="${LLVM_CFLAGS} "
32799          fi
32800          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32801        fi
32802      fi
32803    done
32804    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32805    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32806
32807    unset LLVM_LDFLAGS
32808    for flag in $("${LLVM_CONFIG}" --ldflags); do
32809      if echo "${flag}" | grep -q '^-L'; then
32810        if test "${LLVM_LDFLAGS}" != ""; then
32811          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32812        fi
32813        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32814      fi
32815    done
32816
32817    unset LLVM_LIBS
32818    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32819      if echo "${flag}" | grep -q '^-l'; then
32820        if test "${LLVM_LIBS}" != ""; then
32821          LLVM_LIBS="${LLVM_LIBS} "
32822        fi
32823        LLVM_LIBS="${LLVM_LIBS}${flag}"
32824      fi
32825    done
32826
32827
32828
32829
32830fi
32831
32832# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32833if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32834    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32835fi
32836
32837# TODO better (platform agnostic) test
32838if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32839    LIBCXX="-lstdc++"
32840fi
32841
32842
32843
32844
32845
32846# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32847
32848# When using cygwin or msys, we need a wrapper binary that renames
32849# /cygdrive/c/ arguments into c:/ arguments and peeks into
32850# @files and rewrites these too! This wrapper binary is
32851# called fixpath.
32852FIXPATH=
32853if test "x$OPENJDK_BUILD_OS" = xwindows; then
32854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32855$as_echo_n "checking if fixpath can be created... " >&6; }
32856    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32857    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32858    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32859      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32860      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32861      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32862      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32863    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32864      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32865      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32866
32867      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32868      # @ was chosen as separator to minimize risk of other tools messing around with it
32869      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32870      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32871
32872      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32873    fi
32874    rm -f $OUTPUT_ROOT/fixpath*
32875    cd $OUTPUT_ROOT
32876    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32877    cd $CURDIR
32878
32879    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32881$as_echo "no" >&6; }
32882        cat $OUTPUT_ROOT/fixpath1.log
32883        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32884    fi
32885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32886$as_echo "yes" >&6; }
32887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32888$as_echo_n "checking if fixpath.exe works... " >&6; }
32889    cd $OUTPUT_ROOT
32890    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32891    cd $CURDIR
32892    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32894$as_echo "no" >&6; }
32895        cat $OUTPUT_ROOT/fixpath2.log
32896        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32897    fi
32898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32899$as_echo "yes" >&6; }
32900    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32901fi
32902
32903
32904
32905
32906###############################################################################
32907#
32908# We need to do some final tweaking, when everything else is done.
32909#
32910###############################################################################
32911
32912
32913HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32914
32915
32916# The name of the Service Agent jar.
32917SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32918if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32919  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32920fi
32921
32922
32923
32924
32925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32926$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32927
32928if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32929    ENABLE_INTREE_EC=yes
32930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32931$as_echo "yes" >&6; }
32932else
32933    ENABLE_INTREE_EC=no
32934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32935$as_echo "no" >&6; }
32936fi
32937
32938
32939
32940
32941###############################################################################
32942#
32943# Configure parts of the build that only affect the build performance,
32944# not the result.
32945#
32946###############################################################################
32947
32948
32949  # How many cores do we have on this build system?
32950
32951# Check whether --with-num-cores was given.
32952if test "${with_num_cores+set}" = set; then :
32953  withval=$with_num_cores;
32954fi
32955
32956  if test "x$with_num_cores" = x; then
32957    # The number of cores were not specified, try to probe them.
32958
32959    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32960$as_echo_n "checking for number of cores... " >&6; }
32961    NUM_CORES=1
32962    FOUND_CORES=no
32963
32964    if test -f /proc/cpuinfo; then
32965        # Looks like a Linux (or cygwin) system
32966        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32967        FOUND_CORES=yes
32968    elif test -x /usr/sbin/psrinfo; then
32969        # Looks like a Solaris system
32970        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32971        FOUND_CORES=yes
32972    elif test -x /usr/sbin/system_profiler; then
32973        # Looks like a MacOSX system
32974        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32975        FOUND_CORES=yes
32976    elif test -n "$NUMBER_OF_PROCESSORS"; then
32977        # On windows, look in the env
32978        NUM_CORES=$NUMBER_OF_PROCESSORS
32979        FOUND_CORES=yes
32980    fi
32981
32982    if test "x$FOUND_CORES" = xyes; then
32983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32984$as_echo "$NUM_CORES" >&6; }
32985    else
32986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32987$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32989$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32990    fi
32991
32992
32993  else
32994    NUM_CORES=$with_num_cores
32995  fi
32996
32997
32998
32999  # How much memory do we have on this build system?
33000
33001# Check whether --with-memory-size was given.
33002if test "${with_memory_size+set}" = set; then :
33003  withval=$with_memory_size;
33004fi
33005
33006  if test "x$with_memory_size" = x; then
33007    # The memory size was not specified, try to probe it.
33008
33009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
33010$as_echo_n "checking for memory size... " >&6; }
33011    # Default to 1024 MB
33012    MEMORY_SIZE=1024
33013    FOUND_MEM=no
33014
33015    if test -f /proc/meminfo; then
33016        # Looks like a Linux (or cygwin) system
33017        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
33018        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
33019        FOUND_MEM=yes
33020    elif test -x /usr/sbin/prtconf; then
33021        # Looks like a Solaris system
33022        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
33023        FOUND_MEM=yes
33024    elif test -x /usr/sbin/system_profiler; then
33025        # Looks like a MacOSX system
33026        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
33027        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
33028        FOUND_MEM=yes
33029    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
33030        # Windows, but without cygwin
33031        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
33032        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
33033        FOUND_MEM=yes
33034    fi
33035
33036    if test "x$FOUND_MEM" = xyes; then
33037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
33038$as_echo "$MEMORY_SIZE MB" >&6; }
33039    else
33040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
33041$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
33042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
33043$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
33044    fi
33045
33046  else
33047    MEMORY_SIZE=$with_memory_size
33048  fi
33049
33050
33051
33052  # Provide a decent default number of parallel jobs for make depending on
33053  # number of cores, amount of memory and machine architecture.
33054
33055# Check whether --with-jobs was given.
33056if test "${with_jobs+set}" = set; then :
33057  withval=$with_jobs;
33058fi
33059
33060  if test "x$with_jobs" = x; then
33061    # Number of jobs was not specified, calculate.
33062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
33063$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
33064    # Approximate memory in GB, rounding up a bit.
33065    memory_gb=`expr $MEMORY_SIZE / 1100`
33066    # Pick the lowest of memory in gb and number of cores.
33067    if test "$memory_gb" -lt "$NUM_CORES"; then
33068      JOBS="$memory_gb"
33069    else
33070      JOBS="$NUM_CORES"
33071      # On bigger machines, leave some room for other processes to run
33072      if test "$JOBS" -gt "4"; then
33073        JOBS=`expr $JOBS '*' 90 / 100`
33074      fi
33075    fi
33076    # Cap number of jobs to 16
33077    if test "$JOBS" -gt "16"; then
33078      JOBS=16
33079    fi
33080    if test "$JOBS" -eq "0"; then
33081      JOBS=1
33082    fi
33083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
33084$as_echo "$JOBS" >&6; }
33085  else
33086    JOBS=$with_jobs
33087  fi
33088
33089
33090
33091# Setup smart javac (after cores and memory have been setup)
33092
33093
33094# Check whether --with-sjavac-server-java was given.
33095if test "${with_sjavac_server_java+set}" = set; then :
33096  withval=$with_sjavac_server_java;
33097fi
33098
33099
33100if test "x$with_sjavac_server_java" != x; then
33101    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
33102    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
33103    if test "x$FOUND_VERSION" = x; then
33104        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
33105    fi
33106else
33107    SJAVAC_SERVER_JAVA=""
33108    # Hotspot specific options.
33109
33110    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
33111    $ECHO "Command: $JAVA -verbosegc -version" >&5
33112    OUTPUT=`$JAVA -verbosegc -version 2>&1`
33113    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33114    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33115    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33116        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
33117	JVM_ARG_OK=true
33118    else
33119	$ECHO "Arg failed:" >&5
33120	$ECHO "$OUTPUT" >&5
33121	JVM_ARG_OK=false
33122    fi
33123
33124    # JRockit specific options.
33125
33126    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
33127    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
33128    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
33129    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33130    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33131    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33132        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
33133	JVM_ARG_OK=true
33134    else
33135	$ECHO "Arg failed:" >&5
33136	$ECHO "$OUTPUT" >&5
33137	JVM_ARG_OK=false
33138    fi
33139
33140    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
33141fi
33142
33143
33144if test "$MEMORY_SIZE" -gt "2500"; then
33145
33146    $ECHO "Check if jvm arg is ok: -d64" >&5
33147    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33148    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33149    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33150    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33151    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33152        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33153	JVM_ARG_OK=true
33154    else
33155	$ECHO "Arg failed:" >&5
33156	$ECHO "$OUTPUT" >&5
33157	JVM_ARG_OK=false
33158    fi
33159
33160    if test "$JVM_ARG_OK" = true; then
33161        JVM_64BIT=true
33162	JVM_ARG_OK=false
33163    fi
33164    fi
33165
33166if test "$JVM_64BIT" = true; then
33167    if test "$MEMORY_SIZE" -gt "17000"; then
33168
33169    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33170    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33171    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33172    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33173    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33174    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33175        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33176	JVM_ARG_OK=true
33177    else
33178	$ECHO "Arg failed:" >&5
33179	$ECHO "$OUTPUT" >&5
33180	JVM_ARG_OK=false
33181    fi
33182
33183    fi
33184    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33185
33186    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33187    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33188    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33189    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33190    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33191    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33192        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33193	JVM_ARG_OK=true
33194    else
33195	$ECHO "Arg failed:" >&5
33196	$ECHO "$OUTPUT" >&5
33197	JVM_ARG_OK=false
33198    fi
33199
33200    fi
33201    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33202
33203    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33204    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33205    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33206    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33207    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33208    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33209        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33210	JVM_ARG_OK=true
33211    else
33212	$ECHO "Arg failed:" >&5
33213	$ECHO "$OUTPUT" >&5
33214	JVM_ARG_OK=false
33215    fi
33216
33217    fi
33218    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33219
33220    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33221    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33222    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33223    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33224    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33225    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33226        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33227	JVM_ARG_OK=true
33228    else
33229	$ECHO "Arg failed:" >&5
33230	$ECHO "$OUTPUT" >&5
33231	JVM_ARG_OK=false
33232    fi
33233
33234    fi
33235fi
33236if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33237
33238    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33239    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33240    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33241    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33242    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33243    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33244        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33245	JVM_ARG_OK=true
33246    else
33247	$ECHO "Arg failed:" >&5
33248	$ECHO "$OUTPUT" >&5
33249	JVM_ARG_OK=false
33250    fi
33251
33252fi
33253if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33254
33255    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33256    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33257    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33258    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33259    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33260    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33261        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33262	JVM_ARG_OK=true
33263    else
33264	$ECHO "Arg failed:" >&5
33265	$ECHO "$OUTPUT" >&5
33266	JVM_ARG_OK=false
33267    fi
33268
33269fi
33270if test "$JVM_ARG_OK" = false; then
33271
33272    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33273    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33274    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33275    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33276    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33277    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33278        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33279	JVM_ARG_OK=true
33280    else
33281	$ECHO "Arg failed:" >&5
33282	$ECHO "$OUTPUT" >&5
33283	JVM_ARG_OK=false
33284    fi
33285
33286fi
33287
33288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33289$as_echo_n "checking whether to use sjavac... " >&6; }
33290# Check whether --enable-sjavac was given.
33291if test "${enable_sjavac+set}" = set; then :
33292  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33293else
33294  ENABLE_SJAVAC='no'
33295fi
33296
33297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33298$as_echo "$ENABLE_SJAVAC" >&6; }
33299
33300
33301if test "x$ENABLE_SJAVAC" = xyes; then
33302    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33303else
33304    SJAVAC_SERVER_DIR=
33305fi
33306
33307
33308
33309
33310# Can the C/C++ compiler use precompiled headers?
33311
33312
33313###############################################################################
33314#
33315# Can the C/C++ compiler use precompiled headers?
33316#
33317# Check whether --enable-precompiled-headers was given.
33318if test "${enable_precompiled_headers+set}" = set; then :
33319  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33320else
33321  ENABLE_PRECOMPH=yes
33322fi
33323
33324
33325USE_PRECOMPILED_HEADER=1
33326if test "x$ENABLE_PRECOMPH" = xno; then
33327    USE_PRECOMPILED_HEADER=0
33328fi
33329
33330if test "x$ENABLE_PRECOMPH" = xyes; then
33331    # Check that the compiler actually supports precomp headers.
33332    if test "x$GCC" = xyes; then
33333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33334$as_echo_n "checking that precompiled headers work... " >&6; }
33335         echo "int alfa();" > conftest.h
33336         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33337         if test ! -f conftest.hpp.gch; then
33338             USE_PRECOMPILED_HEADER=0
33339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33340$as_echo "no" >&6; }
33341         else
33342             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33343$as_echo "yes" >&6; }
33344         fi
33345         rm -f conftest.h conftest.hpp.gch
33346    fi
33347fi
33348
33349
33350
33351
33352# Setup use of ccache, if available
33353
33354    # Check whether --enable-ccache was given.
33355if test "${enable_ccache+set}" = set; then :
33356  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33357else
33358  ENABLE_CCACHE=yes
33359fi
33360
33361    if test "x$ENABLE_CCACHE" = xyes; then
33362        OLD_PATH="$PATH"
33363        if test "x$TOOLS_DIR" != x; then
33364          PATH=$TOOLS_DIR:$PATH
33365        fi
33366        # Extract the first word of "ccache", so it can be a program name with args.
33367set dummy ccache; ac_word=$2
33368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33369$as_echo_n "checking for $ac_word... " >&6; }
33370if test "${ac_cv_path_CCACHE+set}" = set; then :
33371  $as_echo_n "(cached) " >&6
33372else
33373  case $CCACHE in
33374  [\\/]* | ?:[\\/]*)
33375  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33376  ;;
33377  *)
33378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33379for as_dir in $PATH
33380do
33381  IFS=$as_save_IFS
33382  test -z "$as_dir" && as_dir=.
33383    for ac_exec_ext in '' $ac_executable_extensions; do
33384  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33385    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33387    break 2
33388  fi
33389done
33390  done
33391IFS=$as_save_IFS
33392
33393  ;;
33394esac
33395fi
33396CCACHE=$ac_cv_path_CCACHE
33397if test -n "$CCACHE"; then
33398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33399$as_echo "$CCACHE" >&6; }
33400else
33401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33402$as_echo "no" >&6; }
33403fi
33404
33405
33406        PATH="$OLD_PATH"
33407    else
33408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33409$as_echo_n "checking for ccache... " >&6; }
33410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33411$as_echo "explicitly disabled" >&6; }
33412        CCACHE=
33413    fi
33414
33415
33416
33417# Check whether --with-ccache-dir was given.
33418if test "${with_ccache_dir+set}" = set; then :
33419  withval=$with_ccache_dir;
33420fi
33421
33422
33423    if test "x$with_ccache_dir" != x; then
33424        # When using a non home ccache directory, assume the use is to share ccache files
33425        # with other users. Thus change the umask.
33426        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33427    fi
33428    CCACHE_FOUND=""
33429    if test "x$CCACHE" != x; then
33430
33431    if test "x$CCACHE" != x; then
33432        CCACHE_FOUND="true"
33433        # Only use ccache if it is 3.1.4 or later, which supports
33434        # precompiled headers.
33435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33436$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33437        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33438        if test "x$HAS_GOOD_CCACHE" = x; then
33439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33440$as_echo "no, disabling ccache" >&6; }
33441            CCACHE=
33442        else
33443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33444$as_echo "yes" >&6; }
33445            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33446$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33447            PUSHED_FLAGS="$CXXFLAGS"
33448            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33449            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33450/* end confdefs.h.  */
33451
33452int
33453main ()
33454{
33455
33456  ;
33457  return 0;
33458}
33459_ACEOF
33460if ac_fn_cxx_try_compile "$LINENO"; then :
33461  CC_KNOWS_CCACHE_TRICK=yes
33462else
33463  CC_KNOWS_CCACHE_TRICK=no
33464fi
33465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33466            CXXFLAGS="$PUSHED_FLAGS"
33467            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33468                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33469$as_echo "yes" >&6; }
33470            else
33471                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33472$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33473                CCACHE=
33474            fi
33475        fi
33476    fi
33477
33478    if test "x$CCACHE" != x; then
33479        CCACHE_SLOPPINESS=time_macros
33480        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33481        CCACHE_FLAGS=-fpch-preprocess
33482
33483        if test "x$SET_CCACHE_DIR" != x; then
33484            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33485	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33486        fi
33487    fi
33488
33489    fi
33490
33491
33492###############################################################################
33493#
33494# And now the finish...
33495#
33496###############################################################################
33497
33498# Check for some common pitfalls
33499
33500  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33501    file_to_test="$SRC_ROOT/LICENSE"
33502    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33503      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
33504    fi
33505  fi
33506
33507
33508
33509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33510$as_echo_n "checking if build directory is on local disk... " >&6; }
33511
33512	# df -l lists only local disks; if the given directory is not found then
33513	# a non-zero exit code is given
33514  if test "x$DF" = x; then
33515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33516      # msys does not have df; use Windows "net use" instead.
33517      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33518      if test "x$IS_NETWORK_DISK" = x; then
33519        OUTPUT_DIR_IS_LOCAL="yes"
33520      else
33521        OUTPUT_DIR_IS_LOCAL="no"
33522      fi
33523    else
33524      # No df here, say it's local
33525      OUTPUT_DIR_IS_LOCAL="yes"
33526    fi
33527  else
33528    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33529      OUTPUT_DIR_IS_LOCAL="yes"
33530    else
33531      OUTPUT_DIR_IS_LOCAL="no"
33532    fi
33533  fi
33534
33535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33536$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33537
33538
33539
33540# Check if the user has any old-style ALT_ variables set.
33541FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33542
33543# Before generating output files, test if they exist. If they do, this is a reconfigure.
33544# Since we can't properly handle the dependencies for this, warn the user about the situation
33545if test -e $OUTPUT_ROOT/spec.gmk; then
33546  IS_RECONFIGURE=yes
33547else
33548  IS_RECONFIGURE=no
33549fi
33550
33551if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33552  HIDE_PERFORMANCE_HINTS=yes
33553else
33554  HIDE_PERFORMANCE_HINTS=no
33555  # Hide it the next time around...
33556  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33557fi
33558
33559
33560
33561# At the end, call the custom hook. (Dummy macro if no custom sources available)
33562
33563
33564# We're messing a bit with internal autoconf variables to put the config.status
33565# in the output directory instead of the current directory.
33566CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33567# Create the actual output files. Now the main work of configure is done.
33568cat >confcache <<\_ACEOF
33569# This file is a shell script that caches the results of configure
33570# tests run on this system so they can be shared between configure
33571# scripts and configure runs, see configure's option --config-cache.
33572# It is not useful on other systems.  If it contains results you don't
33573# want to keep, you may remove or edit it.
33574#
33575# config.status only pays attention to the cache file if you give it
33576# the --recheck option to rerun configure.
33577#
33578# `ac_cv_env_foo' variables (set or unset) will be overridden when
33579# loading this file, other *unset* `ac_cv_foo' will be assigned the
33580# following values.
33581
33582_ACEOF
33583
33584# The following way of writing the cache mishandles newlines in values,
33585# but we know of no workaround that is simple, portable, and efficient.
33586# So, we kill variables containing newlines.
33587# Ultrix sh set writes to stderr and can't be redirected directly,
33588# and sets the high bit in the cache file unless we assign to the vars.
33589(
33590  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33591    eval ac_val=\$$ac_var
33592    case $ac_val in #(
33593    *${as_nl}*)
33594      case $ac_var in #(
33595      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33596$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33597      esac
33598      case $ac_var in #(
33599      _ | IFS | as_nl) ;; #(
33600      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33601      *) { eval $ac_var=; unset $ac_var;} ;;
33602      esac ;;
33603    esac
33604  done
33605
33606  (set) 2>&1 |
33607    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33608    *${as_nl}ac_space=\ *)
33609      # `set' does not quote correctly, so add quotes: double-quote
33610      # substitution turns \\\\ into \\, and sed turns \\ into \.
33611      sed -n \
33612	"s/'/'\\\\''/g;
33613	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33614      ;; #(
33615    *)
33616      # `set' quotes correctly as required by POSIX, so do not add quotes.
33617      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33618      ;;
33619    esac |
33620    sort
33621) |
33622  sed '
33623     /^ac_cv_env_/b end
33624     t clear
33625     :clear
33626     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33627     t end
33628     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33629     :end' >>confcache
33630if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33631  if test -w "$cache_file"; then
33632    test "x$cache_file" != "x/dev/null" &&
33633      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33634$as_echo "$as_me: updating cache $cache_file" >&6;}
33635    cat confcache >$cache_file
33636  else
33637    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33638$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33639  fi
33640fi
33641rm -f confcache
33642
33643test "x$prefix" = xNONE && prefix=$ac_default_prefix
33644# Let make expand exec_prefix.
33645test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33646
33647DEFS=-DHAVE_CONFIG_H
33648
33649ac_libobjs=
33650ac_ltlibobjs=
33651U=
33652for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33653  # 1. Remove the extension, and $U if already installed.
33654  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33655  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33656  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33657  #    will be set to the directory where LIBOBJS objects are built.
33658  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33659  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33660done
33661LIBOBJS=$ac_libobjs
33662
33663LTLIBOBJS=$ac_ltlibobjs
33664
33665
33666
33667: ${CONFIG_STATUS=./config.status}
33668ac_write_fail=0
33669ac_clean_files_save=$ac_clean_files
33670ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33671{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33672$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33673as_write_fail=0
33674cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33675#! $SHELL
33676# Generated by $as_me.
33677# Run this file to recreate the current configuration.
33678# Compiler output produced by configure, useful for debugging
33679# configure, is in config.log if it exists.
33680
33681debug=false
33682ac_cs_recheck=false
33683ac_cs_silent=false
33684
33685SHELL=\${CONFIG_SHELL-$SHELL}
33686export SHELL
33687_ASEOF
33688cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33689## -------------------- ##
33690## M4sh Initialization. ##
33691## -------------------- ##
33692
33693# Be more Bourne compatible
33694DUALCASE=1; export DUALCASE # for MKS sh
33695if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33696  emulate sh
33697  NULLCMD=:
33698  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33699  # is contrary to our usage.  Disable this feature.
33700  alias -g '${1+"$@"}'='"$@"'
33701  setopt NO_GLOB_SUBST
33702else
33703  case `(set -o) 2>/dev/null` in #(
33704  *posix*) :
33705    set -o posix ;; #(
33706  *) :
33707     ;;
33708esac
33709fi
33710
33711
33712as_nl='
33713'
33714export as_nl
33715# Printing a long string crashes Solaris 7 /usr/bin/printf.
33716as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33717as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33718as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33719# Prefer a ksh shell builtin over an external printf program on Solaris,
33720# but without wasting forks for bash or zsh.
33721if test -z "$BASH_VERSION$ZSH_VERSION" \
33722    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33723  as_echo='print -r --'
33724  as_echo_n='print -rn --'
33725elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33726  as_echo='printf %s\n'
33727  as_echo_n='printf %s'
33728else
33729  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33730    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33731    as_echo_n='/usr/ucb/echo -n'
33732  else
33733    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33734    as_echo_n_body='eval
33735      arg=$1;
33736      case $arg in #(
33737      *"$as_nl"*)
33738	expr "X$arg" : "X\\(.*\\)$as_nl";
33739	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33740      esac;
33741      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33742    '
33743    export as_echo_n_body
33744    as_echo_n='sh -c $as_echo_n_body as_echo'
33745  fi
33746  export as_echo_body
33747  as_echo='sh -c $as_echo_body as_echo'
33748fi
33749
33750# The user is always right.
33751if test "${PATH_SEPARATOR+set}" != set; then
33752  PATH_SEPARATOR=:
33753  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33754    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33755      PATH_SEPARATOR=';'
33756  }
33757fi
33758
33759
33760# IFS
33761# We need space, tab and new line, in precisely that order.  Quoting is
33762# there to prevent editors from complaining about space-tab.
33763# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33764# splitting by setting IFS to empty value.)
33765IFS=" ""	$as_nl"
33766
33767# Find who we are.  Look in the path if we contain no directory separator.
33768case $0 in #((
33769  *[\\/]* ) as_myself=$0 ;;
33770  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33771for as_dir in $PATH
33772do
33773  IFS=$as_save_IFS
33774  test -z "$as_dir" && as_dir=.
33775    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33776  done
33777IFS=$as_save_IFS
33778
33779     ;;
33780esac
33781# We did not find ourselves, most probably we were run as `sh COMMAND'
33782# in which case we are not to be found in the path.
33783if test "x$as_myself" = x; then
33784  as_myself=$0
33785fi
33786if test ! -f "$as_myself"; then
33787  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33788  exit 1
33789fi
33790
33791# Unset variables that we do not need and which cause bugs (e.g. in
33792# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33793# suppresses any "Segmentation fault" message there.  '((' could
33794# trigger a bug in pdksh 5.2.14.
33795for as_var in BASH_ENV ENV MAIL MAILPATH
33796do eval test x\${$as_var+set} = xset \
33797  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33798done
33799PS1='$ '
33800PS2='> '
33801PS4='+ '
33802
33803# NLS nuisances.
33804LC_ALL=C
33805export LC_ALL
33806LANGUAGE=C
33807export LANGUAGE
33808
33809# CDPATH.
33810(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33811
33812
33813# as_fn_error STATUS ERROR [LINENO LOG_FD]
33814# ----------------------------------------
33815# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33816# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33817# script with STATUS, using 1 if that was 0.
33818as_fn_error ()
33819{
33820  as_status=$1; test $as_status -eq 0 && as_status=1
33821  if test "$4"; then
33822    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33823    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33824  fi
33825  $as_echo "$as_me: error: $2" >&2
33826  as_fn_exit $as_status
33827} # as_fn_error
33828
33829
33830# as_fn_set_status STATUS
33831# -----------------------
33832# Set $? to STATUS, without forking.
33833as_fn_set_status ()
33834{
33835  return $1
33836} # as_fn_set_status
33837
33838# as_fn_exit STATUS
33839# -----------------
33840# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33841as_fn_exit ()
33842{
33843  set +e
33844  as_fn_set_status $1
33845  exit $1
33846} # as_fn_exit
33847
33848# as_fn_unset VAR
33849# ---------------
33850# Portably unset VAR.
33851as_fn_unset ()
33852{
33853  { eval $1=; unset $1;}
33854}
33855as_unset=as_fn_unset
33856# as_fn_append VAR VALUE
33857# ----------------------
33858# Append the text in VALUE to the end of the definition contained in VAR. Take
33859# advantage of any shell optimizations that allow amortized linear growth over
33860# repeated appends, instead of the typical quadratic growth present in naive
33861# implementations.
33862if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33863  eval 'as_fn_append ()
33864  {
33865    eval $1+=\$2
33866  }'
33867else
33868  as_fn_append ()
33869  {
33870    eval $1=\$$1\$2
33871  }
33872fi # as_fn_append
33873
33874# as_fn_arith ARG...
33875# ------------------
33876# Perform arithmetic evaluation on the ARGs, and store the result in the
33877# global $as_val. Take advantage of shells that can avoid forks. The arguments
33878# must be portable across $(()) and expr.
33879if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33880  eval 'as_fn_arith ()
33881  {
33882    as_val=$(( $* ))
33883  }'
33884else
33885  as_fn_arith ()
33886  {
33887    as_val=`expr "$@" || test $? -eq 1`
33888  }
33889fi # as_fn_arith
33890
33891
33892if expr a : '\(a\)' >/dev/null 2>&1 &&
33893   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33894  as_expr=expr
33895else
33896  as_expr=false
33897fi
33898
33899if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33900  as_basename=basename
33901else
33902  as_basename=false
33903fi
33904
33905if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33906  as_dirname=dirname
33907else
33908  as_dirname=false
33909fi
33910
33911as_me=`$as_basename -- "$0" ||
33912$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33913	 X"$0" : 'X\(//\)$' \| \
33914	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33915$as_echo X/"$0" |
33916    sed '/^.*\/\([^/][^/]*\)\/*$/{
33917	    s//\1/
33918	    q
33919	  }
33920	  /^X\/\(\/\/\)$/{
33921	    s//\1/
33922	    q
33923	  }
33924	  /^X\/\(\/\).*/{
33925	    s//\1/
33926	    q
33927	  }
33928	  s/.*/./; q'`
33929
33930# Avoid depending upon Character Ranges.
33931as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33932as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33933as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33934as_cr_digits='0123456789'
33935as_cr_alnum=$as_cr_Letters$as_cr_digits
33936
33937ECHO_C= ECHO_N= ECHO_T=
33938case `echo -n x` in #(((((
33939-n*)
33940  case `echo 'xy\c'` in
33941  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33942  xy)  ECHO_C='\c';;
33943  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33944       ECHO_T='	';;
33945  esac;;
33946*)
33947  ECHO_N='-n';;
33948esac
33949
33950rm -f conf$$ conf$$.exe conf$$.file
33951if test -d conf$$.dir; then
33952  rm -f conf$$.dir/conf$$.file
33953else
33954  rm -f conf$$.dir
33955  mkdir conf$$.dir 2>/dev/null
33956fi
33957if (echo >conf$$.file) 2>/dev/null; then
33958  if ln -s conf$$.file conf$$ 2>/dev/null; then
33959    as_ln_s='ln -s'
33960    # ... but there are two gotchas:
33961    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33962    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33963    # In both cases, we have to default to `cp -p'.
33964    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33965      as_ln_s='cp -p'
33966  elif ln conf$$.file conf$$ 2>/dev/null; then
33967    as_ln_s=ln
33968  else
33969    as_ln_s='cp -p'
33970  fi
33971else
33972  as_ln_s='cp -p'
33973fi
33974rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33975rmdir conf$$.dir 2>/dev/null
33976
33977
33978# as_fn_mkdir_p
33979# -------------
33980# Create "$as_dir" as a directory, including parents if necessary.
33981as_fn_mkdir_p ()
33982{
33983
33984  case $as_dir in #(
33985  -*) as_dir=./$as_dir;;
33986  esac
33987  test -d "$as_dir" || eval $as_mkdir_p || {
33988    as_dirs=
33989    while :; do
33990      case $as_dir in #(
33991      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33992      *) as_qdir=$as_dir;;
33993      esac
33994      as_dirs="'$as_qdir' $as_dirs"
33995      as_dir=`$as_dirname -- "$as_dir" ||
33996$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33997	 X"$as_dir" : 'X\(//\)[^/]' \| \
33998	 X"$as_dir" : 'X\(//\)$' \| \
33999	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
34000$as_echo X"$as_dir" |
34001    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34002	    s//\1/
34003	    q
34004	  }
34005	  /^X\(\/\/\)[^/].*/{
34006	    s//\1/
34007	    q
34008	  }
34009	  /^X\(\/\/\)$/{
34010	    s//\1/
34011	    q
34012	  }
34013	  /^X\(\/\).*/{
34014	    s//\1/
34015	    q
34016	  }
34017	  s/.*/./; q'`
34018      test -d "$as_dir" && break
34019    done
34020    test -z "$as_dirs" || eval "mkdir $as_dirs"
34021  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
34022
34023
34024} # as_fn_mkdir_p
34025if mkdir -p . 2>/dev/null; then
34026  as_mkdir_p='mkdir -p "$as_dir"'
34027else
34028  test -d ./-p && rmdir ./-p
34029  as_mkdir_p=false
34030fi
34031
34032if test -x / >/dev/null 2>&1; then
34033  as_test_x='test -x'
34034else
34035  if ls -dL / >/dev/null 2>&1; then
34036    as_ls_L_option=L
34037  else
34038    as_ls_L_option=
34039  fi
34040  as_test_x='
34041    eval sh -c '\''
34042      if test -d "$1"; then
34043	test -d "$1/.";
34044      else
34045	case $1 in #(
34046	-*)set "./$1";;
34047	esac;
34048	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
34049	???[sx]*):;;*)false;;esac;fi
34050    '\'' sh
34051  '
34052fi
34053as_executable_p=$as_test_x
34054
34055# Sed expression to map a string onto a valid CPP name.
34056as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
34057
34058# Sed expression to map a string onto a valid variable name.
34059as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
34060
34061
34062exec 6>&1
34063## ----------------------------------- ##
34064## Main body of $CONFIG_STATUS script. ##
34065## ----------------------------------- ##
34066_ASEOF
34067test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
34068
34069cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34070# Save the log message, to keep $0 and so on meaningful, and to
34071# report actual input values of CONFIG_FILES etc. instead of their
34072# values after options handling.
34073ac_log="
34074This file was extended by OpenJDK $as_me jdk8, which was
34075generated by GNU Autoconf 2.67.  Invocation command line was
34076
34077  CONFIG_FILES    = $CONFIG_FILES
34078  CONFIG_HEADERS  = $CONFIG_HEADERS
34079  CONFIG_LINKS    = $CONFIG_LINKS
34080  CONFIG_COMMANDS = $CONFIG_COMMANDS
34081  $ $0 $@
34082
34083on `(hostname || uname -n) 2>/dev/null | sed 1q`
34084"
34085
34086_ACEOF
34087
34088case $ac_config_files in *"
34089"*) set x $ac_config_files; shift; ac_config_files=$*;;
34090esac
34091
34092case $ac_config_headers in *"
34093"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
34094esac
34095
34096
34097cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34098# Files that config.status was made for.
34099config_files="$ac_config_files"
34100config_headers="$ac_config_headers"
34101
34102_ACEOF
34103
34104cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34105ac_cs_usage="\
34106\`$as_me' instantiates files and other configuration actions
34107from templates according to the current configuration.  Unless the files
34108and actions are specified as TAGs, all are instantiated by default.
34109
34110Usage: $0 [OPTION]... [TAG]...
34111
34112  -h, --help       print this help, then exit
34113  -V, --version    print version number and configuration settings, then exit
34114      --config     print configuration, then exit
34115  -q, --quiet, --silent
34116                   do not print progress messages
34117  -d, --debug      don't remove temporary files
34118      --recheck    update $as_me by reconfiguring in the same conditions
34119      --file=FILE[:TEMPLATE]
34120                   instantiate the configuration file FILE
34121      --header=FILE[:TEMPLATE]
34122                   instantiate the configuration header FILE
34123
34124Configuration files:
34125$config_files
34126
34127Configuration headers:
34128$config_headers
34129
34130Report bugs to <build-dev@openjdk.java.net>.
34131OpenJDK home page: <http://openjdk.java.net>."
34132
34133_ACEOF
34134cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34135ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
34136ac_cs_version="\\
34137OpenJDK config.status jdk8
34138configured by $0, generated by GNU Autoconf 2.67,
34139  with options \\"\$ac_cs_config\\"
34140
34141Copyright (C) 2010 Free Software Foundation, Inc.
34142This config.status script is free software; the Free Software Foundation
34143gives unlimited permission to copy, distribute and modify it."
34144
34145ac_pwd='$ac_pwd'
34146srcdir='$srcdir'
34147AWK='$AWK'
34148test -n "\$AWK" || AWK=awk
34149_ACEOF
34150
34151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34152# The default lists apply if the user does not specify any file.
34153ac_need_defaults=:
34154while test $# != 0
34155do
34156  case $1 in
34157  --*=?*)
34158    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34159    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34160    ac_shift=:
34161    ;;
34162  --*=)
34163    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34164    ac_optarg=
34165    ac_shift=:
34166    ;;
34167  *)
34168    ac_option=$1
34169    ac_optarg=$2
34170    ac_shift=shift
34171    ;;
34172  esac
34173
34174  case $ac_option in
34175  # Handling of the options.
34176  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34177    ac_cs_recheck=: ;;
34178  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34179    $as_echo "$ac_cs_version"; exit ;;
34180  --config | --confi | --conf | --con | --co | --c )
34181    $as_echo "$ac_cs_config"; exit ;;
34182  --debug | --debu | --deb | --de | --d | -d )
34183    debug=: ;;
34184  --file | --fil | --fi | --f )
34185    $ac_shift
34186    case $ac_optarg in
34187    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34188    '') as_fn_error $? "missing file argument" ;;
34189    esac
34190    as_fn_append CONFIG_FILES " '$ac_optarg'"
34191    ac_need_defaults=false;;
34192  --header | --heade | --head | --hea )
34193    $ac_shift
34194    case $ac_optarg in
34195    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34196    esac
34197    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34198    ac_need_defaults=false;;
34199  --he | --h)
34200    # Conflict between --help and --header
34201    as_fn_error $? "ambiguous option: \`$1'
34202Try \`$0 --help' for more information.";;
34203  --help | --hel | -h )
34204    $as_echo "$ac_cs_usage"; exit ;;
34205  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34206  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34207    ac_cs_silent=: ;;
34208
34209  # This is an error.
34210  -*) as_fn_error $? "unrecognized option: \`$1'
34211Try \`$0 --help' for more information." ;;
34212
34213  *) as_fn_append ac_config_targets " $1"
34214     ac_need_defaults=false ;;
34215
34216  esac
34217  shift
34218done
34219
34220ac_configure_extra_args=
34221
34222if $ac_cs_silent; then
34223  exec 6>/dev/null
34224  ac_configure_extra_args="$ac_configure_extra_args --silent"
34225fi
34226
34227_ACEOF
34228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34229if \$ac_cs_recheck; then
34230  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34231  shift
34232  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34233  CONFIG_SHELL='$SHELL'
34234  export CONFIG_SHELL
34235  exec "\$@"
34236fi
34237
34238_ACEOF
34239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34240exec 5>>config.log
34241{
34242  echo
34243  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34244## Running $as_me. ##
34245_ASBOX
34246  $as_echo "$ac_log"
34247} >&5
34248
34249_ACEOF
34250cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34251_ACEOF
34252
34253cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34254
34255# Handling of arguments.
34256for ac_config_target in $ac_config_targets
34257do
34258  case $ac_config_target in
34259    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34260    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34261    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34262    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34263    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34264    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34265    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34266
34267  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34268  esac
34269done
34270
34271
34272# If the user did not use the arguments to specify the items to instantiate,
34273# then the envvar interface is used.  Set only those that are not.
34274# We use the long form for the default assignment because of an extremely
34275# bizarre bug on SunOS 4.1.3.
34276if $ac_need_defaults; then
34277  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34278  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34279fi
34280
34281# Have a temporary directory for convenience.  Make it in the build tree
34282# simply because there is no reason against having it here, and in addition,
34283# creating and moving files from /tmp can sometimes cause problems.
34284# Hook for its removal unless debugging.
34285# Note that there is a small window in which the directory will not be cleaned:
34286# after its creation but before its name has been assigned to `$tmp'.
34287$debug ||
34288{
34289  tmp=
34290  trap 'exit_status=$?
34291  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34292' 0
34293  trap 'as_fn_exit 1' 1 2 13 15
34294}
34295# Create a (secure) tmp directory for tmp files.
34296
34297{
34298  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34299  test -n "$tmp" && test -d "$tmp"
34300}  ||
34301{
34302  tmp=./conf$$-$RANDOM
34303  (umask 077 && mkdir "$tmp")
34304} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34305
34306# Set up the scripts for CONFIG_FILES section.
34307# No need to generate them if there are no CONFIG_FILES.
34308# This happens for instance with `./config.status config.h'.
34309if test -n "$CONFIG_FILES"; then
34310
34311
34312ac_cr=`echo X | tr X '\015'`
34313# On cygwin, bash can eat \r inside `` if the user requested igncr.
34314# But we know of no other shell where ac_cr would be empty at this
34315# point, so we can use a bashism as a fallback.
34316if test "x$ac_cr" = x; then
34317  eval ac_cr=\$\'\\r\'
34318fi
34319ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34320if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34321  ac_cs_awk_cr='\\r'
34322else
34323  ac_cs_awk_cr=$ac_cr
34324fi
34325
34326echo 'BEGIN {' >"$tmp/subs1.awk" &&
34327_ACEOF
34328
34329
34330{
34331  echo "cat >conf$$subs.awk <<_ACEOF" &&
34332  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34333  echo "_ACEOF"
34334} >conf$$subs.sh ||
34335  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34336ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34337ac_delim='%!_!# '
34338for ac_last_try in false false false false false :; do
34339  . ./conf$$subs.sh ||
34340    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34341
34342  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34343  if test $ac_delim_n = $ac_delim_num; then
34344    break
34345  elif $ac_last_try; then
34346    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34347  else
34348    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34349  fi
34350done
34351rm -f conf$$subs.sh
34352
34353cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34354cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34355_ACEOF
34356sed -n '
34357h
34358s/^/S["/; s/!.*/"]=/
34359p
34360g
34361s/^[^!]*!//
34362:repl
34363t repl
34364s/'"$ac_delim"'$//
34365t delim
34366:nl
34367h
34368s/\(.\{148\}\)..*/\1/
34369t more1
34370s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34371p
34372n
34373b repl
34374:more1
34375s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34376p
34377g
34378s/.\{148\}//
34379t nl
34380:delim
34381h
34382s/\(.\{148\}\)..*/\1/
34383t more2
34384s/["\\]/\\&/g; s/^/"/; s/$/"/
34385p
34386b
34387:more2
34388s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34389p
34390g
34391s/.\{148\}//
34392t delim
34393' <conf$$subs.awk | sed '
34394/^[^""]/{
34395  N
34396  s/\n//
34397}
34398' >>$CONFIG_STATUS || ac_write_fail=1
34399rm -f conf$$subs.awk
34400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34401_ACAWK
34402cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34403  for (key in S) S_is_set[key] = 1
34404  FS = ""
34405
34406}
34407{
34408  line = $ 0
34409  nfields = split(line, field, "@")
34410  substed = 0
34411  len = length(field[1])
34412  for (i = 2; i < nfields; i++) {
34413    key = field[i]
34414    keylen = length(key)
34415    if (S_is_set[key]) {
34416      value = S[key]
34417      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34418      len += length(value) + length(field[++i])
34419      substed = 1
34420    } else
34421      len += 1 + keylen
34422  }
34423
34424  print line
34425}
34426
34427_ACAWK
34428_ACEOF
34429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34430if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34431  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34432else
34433  cat
34434fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34435  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34436_ACEOF
34437
34438# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34439# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34440# trailing colons and then remove the whole line if VPATH becomes empty
34441# (actually we leave an empty line to preserve line numbers).
34442if test "x$srcdir" = x.; then
34443  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34444h
34445s///
34446s/^/:/
34447s/[	 ]*$/:/
34448s/:\$(srcdir):/:/g
34449s/:\${srcdir}:/:/g
34450s/:@srcdir@:/:/g
34451s/^:*//
34452s/:*$//
34453x
34454s/\(=[	 ]*\).*/\1/
34455G
34456s/\n//
34457s/^[^=]*=[	 ]*$//
34458}'
34459fi
34460
34461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34462fi # test -n "$CONFIG_FILES"
34463
34464# Set up the scripts for CONFIG_HEADERS section.
34465# No need to generate them if there are no CONFIG_HEADERS.
34466# This happens for instance with `./config.status Makefile'.
34467if test -n "$CONFIG_HEADERS"; then
34468cat >"$tmp/defines.awk" <<\_ACAWK ||
34469BEGIN {
34470_ACEOF
34471
34472# Transform confdefs.h into an awk script `defines.awk', embedded as
34473# here-document in config.status, that substitutes the proper values into
34474# config.h.in to produce config.h.
34475
34476# Create a delimiter string that does not exist in confdefs.h, to ease
34477# handling of long lines.
34478ac_delim='%!_!# '
34479for ac_last_try in false false :; do
34480  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34481  if test -z "$ac_t"; then
34482    break
34483  elif $ac_last_try; then
34484    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34485  else
34486    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34487  fi
34488done
34489
34490# For the awk script, D is an array of macro values keyed by name,
34491# likewise P contains macro parameters if any.  Preserve backslash
34492# newline sequences.
34493
34494ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34495sed -n '
34496s/.\{148\}/&'"$ac_delim"'/g
34497t rset
34498:rset
34499s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34500t def
34501d
34502:def
34503s/\\$//
34504t bsnl
34505s/["\\]/\\&/g
34506s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34507D["\1"]=" \3"/p
34508s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34509d
34510:bsnl
34511s/["\\]/\\&/g
34512s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34513D["\1"]=" \3\\\\\\n"\\/p
34514t cont
34515s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34516t cont
34517d
34518:cont
34519n
34520s/.\{148\}/&'"$ac_delim"'/g
34521t clear
34522:clear
34523s/\\$//
34524t bsnlc
34525s/["\\]/\\&/g; s/^/"/; s/$/"/p
34526d
34527:bsnlc
34528s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34529b cont
34530' <confdefs.h | sed '
34531s/'"$ac_delim"'/"\\\
34532"/g' >>$CONFIG_STATUS || ac_write_fail=1
34533
34534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34535  for (key in D) D_is_set[key] = 1
34536  FS = ""
34537}
34538/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34539  line = \$ 0
34540  split(line, arg, " ")
34541  if (arg[1] == "#") {
34542    defundef = arg[2]
34543    mac1 = arg[3]
34544  } else {
34545    defundef = substr(arg[1], 2)
34546    mac1 = arg[2]
34547  }
34548  split(mac1, mac2, "(") #)
34549  macro = mac2[1]
34550  prefix = substr(line, 1, index(line, defundef) - 1)
34551  if (D_is_set[macro]) {
34552    # Preserve the white space surrounding the "#".
34553    print prefix "define", macro P[macro] D[macro]
34554    next
34555  } else {
34556    # Replace #undef with comments.  This is necessary, for example,
34557    # in the case of _POSIX_SOURCE, which is predefined and required
34558    # on some systems where configure will not decide to define it.
34559    if (defundef == "undef") {
34560      print "/*", prefix defundef, macro, "*/"
34561      next
34562    }
34563  }
34564}
34565{ print }
34566_ACAWK
34567_ACEOF
34568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34569  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34570fi # test -n "$CONFIG_HEADERS"
34571
34572
34573eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34574shift
34575for ac_tag
34576do
34577  case $ac_tag in
34578  :[FHLC]) ac_mode=$ac_tag; continue;;
34579  esac
34580  case $ac_mode$ac_tag in
34581  :[FHL]*:*);;
34582  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34583  :[FH]-) ac_tag=-:-;;
34584  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34585  esac
34586  ac_save_IFS=$IFS
34587  IFS=:
34588  set x $ac_tag
34589  IFS=$ac_save_IFS
34590  shift
34591  ac_file=$1
34592  shift
34593
34594  case $ac_mode in
34595  :L) ac_source=$1;;
34596  :[FH])
34597    ac_file_inputs=
34598    for ac_f
34599    do
34600      case $ac_f in
34601      -) ac_f="$tmp/stdin";;
34602      *) # Look for the file first in the build tree, then in the source tree
34603	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34604	 # because $ac_f cannot contain `:'.
34605	 test -f "$ac_f" ||
34606	   case $ac_f in
34607	   [\\/$]*) false;;
34608	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34609	   esac ||
34610	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34611      esac
34612      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34613      as_fn_append ac_file_inputs " '$ac_f'"
34614    done
34615
34616    # Let's still pretend it is `configure' which instantiates (i.e., don't
34617    # use $as_me), people would be surprised to read:
34618    #    /* config.h.  Generated by config.status.  */
34619    configure_input='Generated from '`
34620	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34621	`' by configure.'
34622    if test x"$ac_file" != x-; then
34623      configure_input="$ac_file.  $configure_input"
34624      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34625$as_echo "$as_me: creating $ac_file" >&6;}
34626    fi
34627    # Neutralize special characters interpreted by sed in replacement strings.
34628    case $configure_input in #(
34629    *\&* | *\|* | *\\* )
34630       ac_sed_conf_input=`$as_echo "$configure_input" |
34631       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34632    *) ac_sed_conf_input=$configure_input;;
34633    esac
34634
34635    case $ac_tag in
34636    *:-:* | *:-) cat >"$tmp/stdin" \
34637      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34638    esac
34639    ;;
34640  esac
34641
34642  ac_dir=`$as_dirname -- "$ac_file" ||
34643$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34644	 X"$ac_file" : 'X\(//\)[^/]' \| \
34645	 X"$ac_file" : 'X\(//\)$' \| \
34646	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34647$as_echo X"$ac_file" |
34648    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34649	    s//\1/
34650	    q
34651	  }
34652	  /^X\(\/\/\)[^/].*/{
34653	    s//\1/
34654	    q
34655	  }
34656	  /^X\(\/\/\)$/{
34657	    s//\1/
34658	    q
34659	  }
34660	  /^X\(\/\).*/{
34661	    s//\1/
34662	    q
34663	  }
34664	  s/.*/./; q'`
34665  as_dir="$ac_dir"; as_fn_mkdir_p
34666  ac_builddir=.
34667
34668case "$ac_dir" in
34669.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34670*)
34671  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34672  # A ".." for each directory in $ac_dir_suffix.
34673  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34674  case $ac_top_builddir_sub in
34675  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34676  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34677  esac ;;
34678esac
34679ac_abs_top_builddir=$ac_pwd
34680ac_abs_builddir=$ac_pwd$ac_dir_suffix
34681# for backward compatibility:
34682ac_top_builddir=$ac_top_build_prefix
34683
34684case $srcdir in
34685  .)  # We are building in place.
34686    ac_srcdir=.
34687    ac_top_srcdir=$ac_top_builddir_sub
34688    ac_abs_top_srcdir=$ac_pwd ;;
34689  [\\/]* | ?:[\\/]* )  # Absolute name.
34690    ac_srcdir=$srcdir$ac_dir_suffix;
34691    ac_top_srcdir=$srcdir
34692    ac_abs_top_srcdir=$srcdir ;;
34693  *) # Relative name.
34694    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34695    ac_top_srcdir=$ac_top_build_prefix$srcdir
34696    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34697esac
34698ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34699
34700
34701  case $ac_mode in
34702  :F)
34703  #
34704  # CONFIG_FILE
34705  #
34706
34707_ACEOF
34708
34709cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34710# If the template does not know about datarootdir, expand it.
34711# FIXME: This hack should be removed a few years after 2.60.
34712ac_datarootdir_hack=; ac_datarootdir_seen=
34713ac_sed_dataroot='
34714/datarootdir/ {
34715  p
34716  q
34717}
34718/@datadir@/p
34719/@docdir@/p
34720/@infodir@/p
34721/@localedir@/p
34722/@mandir@/p'
34723case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34724*datarootdir*) ac_datarootdir_seen=yes;;
34725*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34726  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34727$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34728_ACEOF
34729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34730  ac_datarootdir_hack='
34731  s&@datadir@&$datadir&g
34732  s&@docdir@&$docdir&g
34733  s&@infodir@&$infodir&g
34734  s&@localedir@&$localedir&g
34735  s&@mandir@&$mandir&g
34736  s&\\\${datarootdir}&$datarootdir&g' ;;
34737esac
34738_ACEOF
34739
34740# Neutralize VPATH when `$srcdir' = `.'.
34741# Shell code in configure.ac might set extrasub.
34742# FIXME: do we really want to maintain this feature?
34743cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34744ac_sed_extra="$ac_vpsub
34745$extrasub
34746_ACEOF
34747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34748:t
34749/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34750s|@configure_input@|$ac_sed_conf_input|;t t
34751s&@top_builddir@&$ac_top_builddir_sub&;t t
34752s&@top_build_prefix@&$ac_top_build_prefix&;t t
34753s&@srcdir@&$ac_srcdir&;t t
34754s&@abs_srcdir@&$ac_abs_srcdir&;t t
34755s&@top_srcdir@&$ac_top_srcdir&;t t
34756s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34757s&@builddir@&$ac_builddir&;t t
34758s&@abs_builddir@&$ac_abs_builddir&;t t
34759s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34760$ac_datarootdir_hack
34761"
34762eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34763  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34764
34765test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34766  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34767  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34768  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34769which seems to be undefined.  Please make sure it is defined" >&5
34770$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34771which seems to be undefined.  Please make sure it is defined" >&2;}
34772
34773  rm -f "$tmp/stdin"
34774  case $ac_file in
34775  -) cat "$tmp/out" && rm -f "$tmp/out";;
34776  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34777  esac \
34778  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34779 ;;
34780  :H)
34781  #
34782  # CONFIG_HEADER
34783  #
34784  if test x"$ac_file" != x-; then
34785    {
34786      $as_echo "/* $configure_input  */" \
34787      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34788    } >"$tmp/config.h" \
34789      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34790    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34791      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34792$as_echo "$as_me: $ac_file is unchanged" >&6;}
34793    else
34794      rm -f "$ac_file"
34795      mv "$tmp/config.h" "$ac_file" \
34796	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34797    fi
34798  else
34799    $as_echo "/* $configure_input  */" \
34800      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34801      || as_fn_error $? "could not create -" "$LINENO" 5
34802  fi
34803 ;;
34804
34805
34806  esac
34807
34808done # for ac_tag
34809
34810
34811as_fn_exit 0
34812_ACEOF
34813ac_clean_files=$ac_clean_files_save
34814
34815test $ac_write_fail = 0 ||
34816  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34817
34818
34819# configure is writing to config.log, and then calls config.status.
34820# config.status does its own redirection, appending to config.log.
34821# Unfortunately, on DOS this fails, as config.log is still kept open
34822# by configure, so config.status won't be able to write to it; its
34823# output is simply discarded.  So we exec the FD to /dev/null,
34824# effectively closing config.log, so it can be properly (re)opened and
34825# appended to by config.status.  When coming back to configure, we
34826# need to make the FD available again.
34827if test "$no_create" != yes; then
34828  ac_cs_success=:
34829  ac_config_status_args=
34830  test "$silent" = yes &&
34831    ac_config_status_args="$ac_config_status_args --quiet"
34832  exec 5>/dev/null
34833  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34834  exec 5>>config.log
34835  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34836  # would make configure fail if this is the last instruction.
34837  $ac_cs_success || as_fn_exit 1
34838fi
34839if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34840  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34841$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34842fi
34843
34844
34845# Make the compare script executable
34846$CHMOD +x $OUTPUT_ROOT/compare.sh
34847
34848# Finally output some useful information to the user
34849
34850# Finally output some useful information to the user
34851
34852if test "x$CCACHE_FOUND" != x; then
34853	if  test "x$HAS_GOOD_CCACHE" = x; then
34854		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34855		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34856	else
34857		CCACHE_STATUS="installed and in use"
34858	fi
34859else
34860	if test "x$GCC" = xyes; then
34861		CCACHE_STATUS="not installed (consider installing)"
34862		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34863	else
34864		CCACHE_STATUS="not available for your system"
34865	fi
34866fi
34867
34868printf "\n"
34869printf "====================================================\n"
34870printf "A new configuration has been successfully created in\n"
34871printf "$OUTPUT_ROOT\n"
34872if test "x$CONFIGURE_COMMAND_LINE" != x; then
34873	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34874else
34875	printf "using default settings.\n"
34876fi
34877
34878printf "\n"
34879printf "Configuration summary:\n"
34880printf "* Debug level:    $DEBUG_LEVEL\n"
34881printf "* JDK variant:    $JDK_VARIANT\n"
34882printf "* JVM variants:   $with_jvm_variants\n"
34883printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34884
34885printf "\n"
34886printf "Tools summary:\n"
34887if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34888  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34889fi
34890printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34891printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34892printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34893
34894printf "\n"
34895printf "Build performance summary:\n"
34896printf "* Cores to use:   $JOBS\n"
34897printf "* Memory limit:   $MEMORY_SIZE MB\n"
34898printf "* ccache status:  $CCACHE_STATUS\n"
34899printf "\n"
34900
34901if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34902	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34903	printf "$CCACHE_HELP_MSG\n"
34904
34905    # Print a helpful message on how to acquire the necessary build dependency.
34906    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34907    MISSING_DEPENDENCY=ccache
34908    PKGHANDLER_COMMAND=
34909
34910    case $PKGHANDLER in
34911	apt-get)
34912                apt_help     $MISSING_DEPENDENCY ;;
34913    yum)
34914                yum_help     $MISSING_DEPENDENCY ;;
34915	port)
34916                port_help    $MISSING_DEPENDENCY ;;
34917	pkgutil)
34918                pkgutil_help $MISSING_DEPENDENCY ;;
34919	pkgadd)
34920                pkgadd_help  $MISSING_DEPENDENCY ;;
34921    * )
34922      break ;;
34923    esac
34924
34925    if test "x$PKGHANDLER_COMMAND" != x; then
34926        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34927    fi
34928
34929	printf "$HELP_MSG\n"
34930	printf "\n"
34931fi
34932
34933if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34934	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34935	printf "will result in longer build times.\n"
34936	printf "\n"
34937fi
34938
34939if test "x$FOUND_ALT_VARIABLES" != "x"; then
34940	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34941	printf "These are not respected, and will be ignored. It is recommended\n"
34942	printf "that you clean your environment. The following variables are set:\n"
34943	printf "$FOUND_ALT_VARIABLES\n"
34944	printf "\n"
34945fi
34946
34947if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34948	printf "WARNING: Your build output directory is not on a local disk.\n"
34949	printf "This will severely degrade build performance!\n"
34950	printf "It is recommended that you create an output directory on a local disk,\n"
34951	printf "and run the configure script again from that directory.\n"
34952	printf "\n"
34953fi
34954
34955if test "x$IS_RECONFIGURE" = "xyes"; then
34956	printf "WARNING: The result of this configuration has overridden an older\n"
34957	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34958	printf "proper build. Failure to do so might result in strange build problems.\n"
34959	printf "\n"
34960fi
34961
34962