generated-configure.sh revision 523:bd32ef0789ca
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718ac_ct_PROPER_COMPILER_CC
719PROPER_COMPILER_CC
720POTENTIAL_CC
721BUILD_LD
722BUILD_CXX
723BUILD_CC
724MSVCR_DLL
725VS_PATH
726VS_LIB
727VS_INCLUDE
728CYGWIN_LINK
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733BUILD_HOTSPOT
734HOTSPOT_DIST
735BUILD_OUTPUT
736OVERRIDE_SRC_ROOT
737ADD_SRC_ROOT
738JDK_TOPDIR
739HOTSPOT_TOPDIR
740JAXWS_TOPDIR
741JAXP_TOPDIR
742CORBA_TOPDIR
743LANGTOOLS_TOPDIR
744BOOT_JDK_JVMARGS
745JAVAC_FLAGS
746BOOT_JDK_SOURCETARGET
747BOOT_JDK
748BOOT_TOOLSJAR
749BOOT_RTJAR
750JAVA_CHECK
751JAVAC_CHECK
752COOKED_BUILD_NUMBER
753FULL_VERSION
754RELEASE
755JDK_VERSION
756RUNTIME_NAME
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778SET_OPENJDK
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785COMM
786TIME
787STAT
788HG
789READELF
790OTOOL
791LDD
792ZIP
793UNZIP
794FIND_DELETE
795MAKE
796CHECK_TOOLSDIR_MAKE
797CHECK_TOOLSDIR_GMAKE
798CHECK_MAKE
799CHECK_GMAKE
800PKGHANDLER
801OUTPUT_ROOT
802CONF_NAME
803SPEC
804BUILD_VARIANT_RELEASE
805DEBUG_CLASSFILES
806FASTDEBUG
807VARIANT
808DEBUG_LEVEL
809MACOSX_UNIVERSAL
810JVM_VARIANT_ZEROSHARK
811JVM_VARIANT_ZERO
812JVM_VARIANT_KERNEL
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CP
901CMP
902CHMOD
903CAT
904BASH
905BASENAME
906DATE_WHEN_CONFIGURED
907CONFIGURE_COMMAND_LINE
908CUSTOM_MAKE_DIR
909target_alias
910host_alias
911build_alias
912LIBS
913ECHO_T
914ECHO_N
915ECHO_C
916DEFS
917mandir
918localedir
919libdir
920psdir
921pdfdir
922dvidir
923htmldir
924infodir
925docdir
926oldincludedir
927includedir
928localstatedir
929sharedstatedir
930sysconfdir
931datadir
932datarootdir
933libexecdir
934sbindir
935bindir
936program_transform_name
937prefix
938exec_prefix
939PACKAGE_URL
940PACKAGE_BUGREPORT
941PACKAGE_STRING
942PACKAGE_VERSION
943PACKAGE_TARNAME
944PACKAGE_NAME
945PATH_SEPARATOR
946SHELL'
947ac_subst_files=''
948ac_user_opts='
949enable_option_checking
950with_custom_make_dir
951with_target_bits
952with_sys_root
953with_tools_dir
954with_devkit
955with_jdk_variant
956with_jvm_variants
957enable_debug
958with_debug_level
959with_conf_name
960with_builddeps_conf
961with_builddeps_server
962with_builddeps_dir
963with_builddeps_group
964enable_openjdk_only
965enable_headful
966enable_hotspot_test_in_build
967with_cacerts_file
968enable_unlimited_crypto
969with_boot_jdk
970with_boot_jdk_jvmargs
971with_add_source_root
972with_override_source_root
973with_adds_and_overrides
974with_override_langtools
975with_override_corba
976with_override_jaxp
977with_override_jaxws
978with_override_hotspot
979with_override_jdk
980with_import_hotspot
981with_msvcr_dll
982with_extra_cflags
983with_extra_cxxflags
984with_extra_ldflags
985enable_debug_symbols
986enable_zip_debug_info
987enable_macosx_runtime_support
988with_x
989with_cups
990with_cups_include
991with_freetype
992with_alsa
993with_alsa_include
994with_alsa_lib
995with_zlib
996with_stdc__lib
997with_num_cores
998with_memory_size
999with_sjavac_server_java
1000with_sjavac_server_cores
1001enable_sjavac
1002enable_precompiled_headers
1003enable_ccache
1004with_ccache_dir
1005'
1006      ac_precious_vars='build_alias
1007host_alias
1008target_alias
1009PKG_CONFIG
1010CC
1011CFLAGS
1012LDFLAGS
1013LIBS
1014CPPFLAGS
1015CXX
1016CXXFLAGS
1017CCC
1018OBJC
1019OBJCFLAGS
1020CPP
1021CXXCPP
1022XMKMF
1023FREETYPE2_CFLAGS
1024FREETYPE2_LIBS
1025ALSA_CFLAGS
1026ALSA_LIBS'
1027
1028
1029# Initialize some variables set by options.
1030ac_init_help=
1031ac_init_version=false
1032ac_unrecognized_opts=
1033ac_unrecognized_sep=
1034# The variables have the same names as the options, with
1035# dashes changed to underlines.
1036cache_file=/dev/null
1037exec_prefix=NONE
1038no_create=
1039no_recursion=
1040prefix=NONE
1041program_prefix=NONE
1042program_suffix=NONE
1043program_transform_name=s,x,x,
1044silent=
1045site=
1046srcdir=
1047verbose=
1048x_includes=NONE
1049x_libraries=NONE
1050
1051# Installation directory options.
1052# These are left unexpanded so users can "make install exec_prefix=/foo"
1053# and all the variables that are supposed to be based on exec_prefix
1054# by default will actually change.
1055# Use braces instead of parens because sh, perl, etc. also accept them.
1056# (The list follows the same order as the GNU Coding Standards.)
1057bindir='${exec_prefix}/bin'
1058sbindir='${exec_prefix}/sbin'
1059libexecdir='${exec_prefix}/libexec'
1060datarootdir='${prefix}/share'
1061datadir='${datarootdir}'
1062sysconfdir='${prefix}/etc'
1063sharedstatedir='${prefix}/com'
1064localstatedir='${prefix}/var'
1065includedir='${prefix}/include'
1066oldincludedir='/usr/include'
1067docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1068infodir='${datarootdir}/info'
1069htmldir='${docdir}'
1070dvidir='${docdir}'
1071pdfdir='${docdir}'
1072psdir='${docdir}'
1073libdir='${exec_prefix}/lib'
1074localedir='${datarootdir}/locale'
1075mandir='${datarootdir}/man'
1076
1077ac_prev=
1078ac_dashdash=
1079for ac_option
1080do
1081  # If the previous option needs an argument, assign it.
1082  if test -n "$ac_prev"; then
1083    eval $ac_prev=\$ac_option
1084    ac_prev=
1085    continue
1086  fi
1087
1088  case $ac_option in
1089  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1090  *=)   ac_optarg= ;;
1091  *)    ac_optarg=yes ;;
1092  esac
1093
1094  # Accept the important Cygnus configure options, so we can diagnose typos.
1095
1096  case $ac_dashdash$ac_option in
1097  --)
1098    ac_dashdash=yes ;;
1099
1100  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1101    ac_prev=bindir ;;
1102  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1103    bindir=$ac_optarg ;;
1104
1105  -build | --build | --buil | --bui | --bu)
1106    ac_prev=build_alias ;;
1107  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1108    build_alias=$ac_optarg ;;
1109
1110  -cache-file | --cache-file | --cache-fil | --cache-fi \
1111  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1112    ac_prev=cache_file ;;
1113  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1114  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1115    cache_file=$ac_optarg ;;
1116
1117  --config-cache | -C)
1118    cache_file=config.cache ;;
1119
1120  -datadir | --datadir | --datadi | --datad)
1121    ac_prev=datadir ;;
1122  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1123    datadir=$ac_optarg ;;
1124
1125  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1126  | --dataroo | --dataro | --datar)
1127    ac_prev=datarootdir ;;
1128  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1129  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1130    datarootdir=$ac_optarg ;;
1131
1132  -disable-* | --disable-*)
1133    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1134    # Reject names that are not valid shell variable names.
1135    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1136      as_fn_error $? "invalid feature name: $ac_useropt"
1137    ac_useropt_orig=$ac_useropt
1138    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139    case $ac_user_opts in
1140      *"
1141"enable_$ac_useropt"
1142"*) ;;
1143      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1144	 ac_unrecognized_sep=', ';;
1145    esac
1146    eval enable_$ac_useropt=no ;;
1147
1148  -docdir | --docdir | --docdi | --doc | --do)
1149    ac_prev=docdir ;;
1150  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1151    docdir=$ac_optarg ;;
1152
1153  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1154    ac_prev=dvidir ;;
1155  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1156    dvidir=$ac_optarg ;;
1157
1158  -enable-* | --enable-*)
1159    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1160    # Reject names that are not valid shell variable names.
1161    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1162      as_fn_error $? "invalid feature name: $ac_useropt"
1163    ac_useropt_orig=$ac_useropt
1164    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1165    case $ac_user_opts in
1166      *"
1167"enable_$ac_useropt"
1168"*) ;;
1169      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1170	 ac_unrecognized_sep=', ';;
1171    esac
1172    eval enable_$ac_useropt=\$ac_optarg ;;
1173
1174  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1175  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1176  | --exec | --exe | --ex)
1177    ac_prev=exec_prefix ;;
1178  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1179  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1180  | --exec=* | --exe=* | --ex=*)
1181    exec_prefix=$ac_optarg ;;
1182
1183  -gas | --gas | --ga | --g)
1184    # Obsolete; use --with-gas.
1185    with_gas=yes ;;
1186
1187  -help | --help | --hel | --he | -h)
1188    ac_init_help=long ;;
1189  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1190    ac_init_help=recursive ;;
1191  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1192    ac_init_help=short ;;
1193
1194  -host | --host | --hos | --ho)
1195    ac_prev=host_alias ;;
1196  -host=* | --host=* | --hos=* | --ho=*)
1197    host_alias=$ac_optarg ;;
1198
1199  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1200    ac_prev=htmldir ;;
1201  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1202  | --ht=*)
1203    htmldir=$ac_optarg ;;
1204
1205  -includedir | --includedir | --includedi | --included | --include \
1206  | --includ | --inclu | --incl | --inc)
1207    ac_prev=includedir ;;
1208  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1209  | --includ=* | --inclu=* | --incl=* | --inc=*)
1210    includedir=$ac_optarg ;;
1211
1212  -infodir | --infodir | --infodi | --infod | --info | --inf)
1213    ac_prev=infodir ;;
1214  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1215    infodir=$ac_optarg ;;
1216
1217  -libdir | --libdir | --libdi | --libd)
1218    ac_prev=libdir ;;
1219  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1220    libdir=$ac_optarg ;;
1221
1222  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1223  | --libexe | --libex | --libe)
1224    ac_prev=libexecdir ;;
1225  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1226  | --libexe=* | --libex=* | --libe=*)
1227    libexecdir=$ac_optarg ;;
1228
1229  -localedir | --localedir | --localedi | --localed | --locale)
1230    ac_prev=localedir ;;
1231  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1232    localedir=$ac_optarg ;;
1233
1234  -localstatedir | --localstatedir | --localstatedi | --localstated \
1235  | --localstate | --localstat | --localsta | --localst | --locals)
1236    ac_prev=localstatedir ;;
1237  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1238  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1239    localstatedir=$ac_optarg ;;
1240
1241  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1242    ac_prev=mandir ;;
1243  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1244    mandir=$ac_optarg ;;
1245
1246  -nfp | --nfp | --nf)
1247    # Obsolete; use --without-fp.
1248    with_fp=no ;;
1249
1250  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1251  | --no-cr | --no-c | -n)
1252    no_create=yes ;;
1253
1254  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1255  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1256    no_recursion=yes ;;
1257
1258  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1259  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1260  | --oldin | --oldi | --old | --ol | --o)
1261    ac_prev=oldincludedir ;;
1262  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1263  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1264  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1265    oldincludedir=$ac_optarg ;;
1266
1267  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1268    ac_prev=prefix ;;
1269  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1270    prefix=$ac_optarg ;;
1271
1272  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1273  | --program-pre | --program-pr | --program-p)
1274    ac_prev=program_prefix ;;
1275  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1276  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1277    program_prefix=$ac_optarg ;;
1278
1279  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1280  | --program-suf | --program-su | --program-s)
1281    ac_prev=program_suffix ;;
1282  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1283  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1284    program_suffix=$ac_optarg ;;
1285
1286  -program-transform-name | --program-transform-name \
1287  | --program-transform-nam | --program-transform-na \
1288  | --program-transform-n | --program-transform- \
1289  | --program-transform | --program-transfor \
1290  | --program-transfo | --program-transf \
1291  | --program-trans | --program-tran \
1292  | --progr-tra | --program-tr | --program-t)
1293    ac_prev=program_transform_name ;;
1294  -program-transform-name=* | --program-transform-name=* \
1295  | --program-transform-nam=* | --program-transform-na=* \
1296  | --program-transform-n=* | --program-transform-=* \
1297  | --program-transform=* | --program-transfor=* \
1298  | --program-transfo=* | --program-transf=* \
1299  | --program-trans=* | --program-tran=* \
1300  | --progr-tra=* | --program-tr=* | --program-t=*)
1301    program_transform_name=$ac_optarg ;;
1302
1303  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1304    ac_prev=pdfdir ;;
1305  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1306    pdfdir=$ac_optarg ;;
1307
1308  -psdir | --psdir | --psdi | --psd | --ps)
1309    ac_prev=psdir ;;
1310  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1311    psdir=$ac_optarg ;;
1312
1313  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1314  | -silent | --silent | --silen | --sile | --sil)
1315    silent=yes ;;
1316
1317  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1318    ac_prev=sbindir ;;
1319  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1320  | --sbi=* | --sb=*)
1321    sbindir=$ac_optarg ;;
1322
1323  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1324  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1325  | --sharedst | --shareds | --shared | --share | --shar \
1326  | --sha | --sh)
1327    ac_prev=sharedstatedir ;;
1328  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1329  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1330  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1331  | --sha=* | --sh=*)
1332    sharedstatedir=$ac_optarg ;;
1333
1334  -site | --site | --sit)
1335    ac_prev=site ;;
1336  -site=* | --site=* | --sit=*)
1337    site=$ac_optarg ;;
1338
1339  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1340    ac_prev=srcdir ;;
1341  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1342    srcdir=$ac_optarg ;;
1343
1344  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1345  | --syscon | --sysco | --sysc | --sys | --sy)
1346    ac_prev=sysconfdir ;;
1347  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1348  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1349    sysconfdir=$ac_optarg ;;
1350
1351  -target | --target | --targe | --targ | --tar | --ta | --t)
1352    ac_prev=target_alias ;;
1353  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1354    target_alias=$ac_optarg ;;
1355
1356  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1357    verbose=yes ;;
1358
1359  -version | --version | --versio | --versi | --vers | -V)
1360    ac_init_version=: ;;
1361
1362  -with-* | --with-*)
1363    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1364    # Reject names that are not valid shell variable names.
1365    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1366      as_fn_error $? "invalid package name: $ac_useropt"
1367    ac_useropt_orig=$ac_useropt
1368    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369    case $ac_user_opts in
1370      *"
1371"with_$ac_useropt"
1372"*) ;;
1373      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1374	 ac_unrecognized_sep=', ';;
1375    esac
1376    eval with_$ac_useropt=\$ac_optarg ;;
1377
1378  -without-* | --without-*)
1379    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1380    # Reject names that are not valid shell variable names.
1381    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1382      as_fn_error $? "invalid package name: $ac_useropt"
1383    ac_useropt_orig=$ac_useropt
1384    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1385    case $ac_user_opts in
1386      *"
1387"with_$ac_useropt"
1388"*) ;;
1389      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1390	 ac_unrecognized_sep=', ';;
1391    esac
1392    eval with_$ac_useropt=no ;;
1393
1394  --x)
1395    # Obsolete; use --with-x.
1396    with_x=yes ;;
1397
1398  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1399  | --x-incl | --x-inc | --x-in | --x-i)
1400    ac_prev=x_includes ;;
1401  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1402  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1403    x_includes=$ac_optarg ;;
1404
1405  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1406  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1407    ac_prev=x_libraries ;;
1408  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1409  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1410    x_libraries=$ac_optarg ;;
1411
1412  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1413Try \`$0 --help' for more information"
1414    ;;
1415
1416  *=*)
1417    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1418    # Reject names that are not valid shell variable names.
1419    case $ac_envvar in #(
1420      '' | [0-9]* | *[!_$as_cr_alnum]* )
1421      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1422    esac
1423    eval $ac_envvar=\$ac_optarg
1424    export $ac_envvar ;;
1425
1426  *)
1427    # FIXME: should be removed in autoconf 3.0.
1428    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1429    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1430      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1431    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1432    ;;
1433
1434  esac
1435done
1436
1437if test -n "$ac_prev"; then
1438  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1439  as_fn_error $? "missing argument to $ac_option"
1440fi
1441
1442if test -n "$ac_unrecognized_opts"; then
1443  case $enable_option_checking in
1444    no) ;;
1445    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1446    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1447  esac
1448fi
1449
1450# Check all directory arguments for consistency.
1451for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1452		datadir sysconfdir sharedstatedir localstatedir includedir \
1453		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1454		libdir localedir mandir
1455do
1456  eval ac_val=\$$ac_var
1457  # Remove trailing slashes.
1458  case $ac_val in
1459    */ )
1460      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1461      eval $ac_var=\$ac_val;;
1462  esac
1463  # Be sure to have absolute directory names.
1464  case $ac_val in
1465    [\\/$]* | ?:[\\/]* )  continue;;
1466    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1467  esac
1468  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1469done
1470
1471# There might be people who depend on the old broken behavior: `$host'
1472# used to hold the argument of --host etc.
1473# FIXME: To remove some day.
1474build=$build_alias
1475host=$host_alias
1476target=$target_alias
1477
1478# FIXME: To remove some day.
1479if test "x$host_alias" != x; then
1480  if test "x$build_alias" = x; then
1481    cross_compiling=maybe
1482    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1483    If a cross compiler is detected then cross compile mode will be used" >&2
1484  elif test "x$build_alias" != "x$host_alias"; then
1485    cross_compiling=yes
1486  fi
1487fi
1488
1489ac_tool_prefix=
1490test -n "$host_alias" && ac_tool_prefix=$host_alias-
1491
1492test "$silent" = yes && exec 6>/dev/null
1493
1494
1495ac_pwd=`pwd` && test -n "$ac_pwd" &&
1496ac_ls_di=`ls -di .` &&
1497ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1498  as_fn_error $? "working directory cannot be determined"
1499test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1500  as_fn_error $? "pwd does not report name of working directory"
1501
1502
1503# Find the source files, if location was not specified.
1504if test -z "$srcdir"; then
1505  ac_srcdir_defaulted=yes
1506  # Try the directory containing this script, then the parent directory.
1507  ac_confdir=`$as_dirname -- "$as_myself" ||
1508$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1509	 X"$as_myself" : 'X\(//\)[^/]' \| \
1510	 X"$as_myself" : 'X\(//\)$' \| \
1511	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1512$as_echo X"$as_myself" |
1513    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1514	    s//\1/
1515	    q
1516	  }
1517	  /^X\(\/\/\)[^/].*/{
1518	    s//\1/
1519	    q
1520	  }
1521	  /^X\(\/\/\)$/{
1522	    s//\1/
1523	    q
1524	  }
1525	  /^X\(\/\).*/{
1526	    s//\1/
1527	    q
1528	  }
1529	  s/.*/./; q'`
1530  srcdir=$ac_confdir
1531  if test ! -r "$srcdir/$ac_unique_file"; then
1532    srcdir=..
1533  fi
1534else
1535  ac_srcdir_defaulted=no
1536fi
1537if test ! -r "$srcdir/$ac_unique_file"; then
1538  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1539  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1540fi
1541ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1542ac_abs_confdir=`(
1543	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1544	pwd)`
1545# When building in place, set srcdir=.
1546if test "$ac_abs_confdir" = "$ac_pwd"; then
1547  srcdir=.
1548fi
1549# Remove unnecessary trailing slashes from srcdir.
1550# Double slashes in file names in object file debugging info
1551# mess up M-x gdb in Emacs.
1552case $srcdir in
1553*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1554esac
1555for ac_var in $ac_precious_vars; do
1556  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1557  eval ac_env_${ac_var}_value=\$${ac_var}
1558  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1559  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1560done
1561
1562#
1563# Report the --help message.
1564#
1565if test "$ac_init_help" = "long"; then
1566  # Omit some internal or obsolete options to make the list less imposing.
1567  # This message is too long to be a string in the A/UX 3.1 sh.
1568  cat <<_ACEOF
1569\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1570
1571Usage: $0 [OPTION]... [VAR=VALUE]...
1572
1573To assign environment variables (e.g., CC, CFLAGS...), specify them as
1574VAR=VALUE.  See below for descriptions of some of the useful variables.
1575
1576Defaults for the options are specified in brackets.
1577
1578Configuration:
1579  -h, --help              display this help and exit
1580      --help=short        display options specific to this package
1581      --help=recursive    display the short help of all the included packages
1582  -V, --version           display version information and exit
1583  -q, --quiet, --silent   do not print \`checking ...' messages
1584      --cache-file=FILE   cache test results in FILE [disabled]
1585  -C, --config-cache      alias for \`--cache-file=config.cache'
1586  -n, --no-create         do not create output files
1587      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1588
1589Installation directories:
1590  --prefix=PREFIX         install architecture-independent files in PREFIX
1591                          [$ac_default_prefix]
1592  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1593                          [PREFIX]
1594
1595By default, \`make install' will install all the files in
1596\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1597an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1598for instance \`--prefix=\$HOME'.
1599
1600For better control, use the options below.
1601
1602Fine tuning of the installation directories:
1603  --bindir=DIR            user executables [EPREFIX/bin]
1604  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1605  --libexecdir=DIR        program executables [EPREFIX/libexec]
1606  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1607  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1608  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1609  --libdir=DIR            object code libraries [EPREFIX/lib]
1610  --includedir=DIR        C header files [PREFIX/include]
1611  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1612  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1613  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1614  --infodir=DIR           info documentation [DATAROOTDIR/info]
1615  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1616  --mandir=DIR            man documentation [DATAROOTDIR/man]
1617  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1618  --htmldir=DIR           html documentation [DOCDIR]
1619  --dvidir=DIR            dvi documentation [DOCDIR]
1620  --pdfdir=DIR            pdf documentation [DOCDIR]
1621  --psdir=DIR             ps documentation [DOCDIR]
1622_ACEOF
1623
1624  cat <<\_ACEOF
1625
1626X features:
1627  --x-includes=DIR    X include files are in DIR
1628  --x-libraries=DIR   X library files are in DIR
1629
1630System types:
1631  --build=BUILD     configure for building on BUILD [guessed]
1632  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1633  --target=TARGET   configure for building compilers for TARGET [HOST]
1634_ACEOF
1635fi
1636
1637if test -n "$ac_init_help"; then
1638  case $ac_init_help in
1639     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1640   esac
1641  cat <<\_ACEOF
1642
1643Optional Features:
1644  --disable-option-checking  ignore unrecognized --enable/--with options
1645  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1646  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1647  --enable-debug          set the debug level to fastdebug (shorthand for
1648                          --with-debug-level=fastdebug) [disabled]
1649  --enable-openjdk-only   supress building closed source even if present
1650                          [disabled]
1651  --disable-headful       disable building headful support (graphical UI
1652                          support) [enabled]
1653  --enable-hotspot-test-in-build
1654                          run the Queens test after Hotspot build [disabled]
1655  --enable-unlimited-crypto
1656                          Enable unlimited crypto policy [disabled]
1657  --disable-debug-symbols disable generation of debug symbols [enabled]
1658  --disable-zip-debug-info
1659                          disable zipping of debug-info files [enabled]
1660  --disable-macosx-runtime-support
1661                          disable the use of MacOSX Java runtime support
1662                          framework [enabled]
1663  --enable-sjavac         use sjavac to do fast incremental compiles
1664                          [disabled]
1665  --disable-precompiled-headers
1666                          disable using precompiled headers when compiling C++
1667                          [enabled]
1668  --disable-ccache        disable using ccache to speed up recompilations
1669                          [enabled]
1670
1671Optional Packages:
1672  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1673  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1674  --with-custom-make-dir  use this directory for custom build/make files
1675  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1676                          support it), e.g. --with-target-bits=32 [guessed]
1677  --with-sys-root         pass this sys-root to the compilers and tools (for
1678                          cross-compiling)
1679  --with-tools-dir        search this directory for compilers and tools (for
1680                          cross-compiling)
1681  --with-devkit           use this directory as base for tools-dir and
1682                          sys-root (for cross-compiling)
1683  --with-jdk-variant      JDK variant to build (normal) [normal]
1684  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1685                          client, kernel, zero, zeroshark) [server]
1686  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1687                          [release]
1688  --with-conf-name        use this as the name of the configuration [generated
1689                          from important configuration options]
1690  --with-builddeps-conf   use this configuration file for the builddeps
1691  --with-builddeps-server download and use build dependencies from this server
1692                          url
1693  --with-builddeps-dir    store downloaded build dependencies here
1694                          [/localhome/builddeps]
1695  --with-builddeps-group  chgrp the downloaded build dependencies to this
1696                          group
1697  --with-cacerts-file     specify alternative cacerts file
1698  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1699  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1700                          invocations of the Boot JDK, overriding the default
1701                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1702                          -enableassertions"
1703  --with-add-source-root  for each and every source directory, look in this
1704                          additional source root for the same directory; if it
1705                          exists and have files in it, include it in the build
1706  --with-override-source-root
1707                          for each and every source directory, look in this
1708                          override source root for the same directory; if it
1709                          exists, use that directory instead and ignore the
1710                          directory in the original source root
1711  --with-adds-and-overrides
1712                          use the subdirs 'adds' and 'overrides' in the
1713                          specified directory as add-source-root and
1714                          override-source-root
1715  --with-override-langtools
1716                          use this langtools dir for the build
1717  --with-override-corba   use this corba dir for the build
1718  --with-override-jaxp    use this jaxp dir for the build
1719  --with-override-jaxws   use this jaxws dir for the build
1720  --with-override-hotspot use this hotspot dir for the build
1721  --with-override-jdk     use this jdk dir for the build
1722  --with-import-hotspot   import hotspot binaries from this jdk image or
1723                          hotspot build dist dir instead of building from
1724                          source
1725  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1726                          only) [probed]
1727  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1728  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1729  --with-extra-ldflags    extra flags to be used when linking jdk
1730  --with-x                use the X Window System
1731  --with-cups             specify prefix directory for the cups package
1732                          (expecting the headers under PATH/include)
1733  --with-cups-include     specify directory for the cups include files
1734  --with-freetype         specify prefix directory for the freetype2 package
1735                          (expecting the libraries under PATH/lib and the
1736                          headers under PATH/include)
1737  --with-alsa             specify prefix directory for the alsa package
1738                          (expecting the libraries under PATH/lib and the
1739                          headers under PATH/include)
1740  --with-alsa-include     specify directory for the alsa include files
1741  --with-alsa-lib         specify directory for the alsa library
1742  --with-zlib             use zlib from build system or OpenJDK source
1743                          (system, bundled) [bundled]
1744  --with-stdc++lib=<static>,<dynamic>,<default>
1745                          force linking of the C++ runtime on Linux to either
1746                          static or dynamic, default is static with dynamic as
1747                          fallback
1748  --with-num-cores        number of cores in the build system, e.g.
1749                          --with-num-cores=8 [probed]
1750  --with-memory-size      memory (in MB) available in the build system, e.g.
1751                          --with-memory-size=1024 [probed]
1752  --with-sjavac-server-java
1753                          use this java binary for running the sjavac
1754                          background server [Boot JDK java]
1755  --with-sjavac-server-cores
1756                          use at most this number of concurrent threads on the
1757                          sjavac server [probed]
1758  --with-ccache-dir       where to store ccache files [~/.ccache]
1759
1760Some influential environment variables:
1761  PKG_CONFIG  path to pkg-config utility
1762  CC          C compiler command
1763  CFLAGS      C compiler flags
1764  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1765              nonstandard directory <lib dir>
1766  LIBS        libraries to pass to the linker, e.g. -l<library>
1767  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1768              you have headers in a nonstandard directory <include dir>
1769  CXX         C++ compiler command
1770  CXXFLAGS    C++ compiler flags
1771  OBJC        Objective C compiler command
1772  OBJCFLAGS   Objective C compiler flags
1773  CPP         C preprocessor
1774  CXXCPP      C++ preprocessor
1775  XMKMF       Path to xmkmf, Makefile generator for X Window System
1776  FREETYPE2_CFLAGS
1777              C compiler flags for FREETYPE2, overriding pkg-config
1778  FREETYPE2_LIBS
1779              linker flags for FREETYPE2, overriding pkg-config
1780  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1781  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1782
1783Use these variables to override the choices made by `configure' or to help
1784it to find libraries and programs with nonstandard names/locations.
1785
1786Report bugs to <build-dev@openjdk.java.net>.
1787OpenJDK home page: <http://openjdk.java.net>.
1788_ACEOF
1789ac_status=$?
1790fi
1791
1792if test "$ac_init_help" = "recursive"; then
1793  # If there are subdirs, report their specific --help.
1794  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1795    test -d "$ac_dir" ||
1796      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1797      continue
1798    ac_builddir=.
1799
1800case "$ac_dir" in
1801.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1802*)
1803  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1804  # A ".." for each directory in $ac_dir_suffix.
1805  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1806  case $ac_top_builddir_sub in
1807  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1808  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1809  esac ;;
1810esac
1811ac_abs_top_builddir=$ac_pwd
1812ac_abs_builddir=$ac_pwd$ac_dir_suffix
1813# for backward compatibility:
1814ac_top_builddir=$ac_top_build_prefix
1815
1816case $srcdir in
1817  .)  # We are building in place.
1818    ac_srcdir=.
1819    ac_top_srcdir=$ac_top_builddir_sub
1820    ac_abs_top_srcdir=$ac_pwd ;;
1821  [\\/]* | ?:[\\/]* )  # Absolute name.
1822    ac_srcdir=$srcdir$ac_dir_suffix;
1823    ac_top_srcdir=$srcdir
1824    ac_abs_top_srcdir=$srcdir ;;
1825  *) # Relative name.
1826    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1827    ac_top_srcdir=$ac_top_build_prefix$srcdir
1828    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1829esac
1830ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1831
1832    cd "$ac_dir" || { ac_status=$?; continue; }
1833    # Check for guested configure.
1834    if test -f "$ac_srcdir/configure.gnu"; then
1835      echo &&
1836      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1837    elif test -f "$ac_srcdir/configure"; then
1838      echo &&
1839      $SHELL "$ac_srcdir/configure" --help=recursive
1840    else
1841      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1842    fi || ac_status=$?
1843    cd "$ac_pwd" || { ac_status=$?; break; }
1844  done
1845fi
1846
1847test -n "$ac_init_help" && exit $ac_status
1848if $ac_init_version; then
1849  cat <<\_ACEOF
1850OpenJDK configure jdk8
1851generated by GNU Autoconf 2.67
1852
1853Copyright (C) 2010 Free Software Foundation, Inc.
1854This configure script is free software; the Free Software Foundation
1855gives unlimited permission to copy, distribute and modify it.
1856_ACEOF
1857  exit
1858fi
1859
1860## ------------------------ ##
1861## Autoconf initialization. ##
1862## ------------------------ ##
1863
1864# ac_fn_c_try_compile LINENO
1865# --------------------------
1866# Try to compile conftest.$ac_ext, and return whether this succeeded.
1867ac_fn_c_try_compile ()
1868{
1869  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870  rm -f conftest.$ac_objext
1871  if { { ac_try="$ac_compile"
1872case "(($ac_try" in
1873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874  *) ac_try_echo=$ac_try;;
1875esac
1876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877$as_echo "$ac_try_echo"; } >&5
1878  (eval "$ac_compile") 2>conftest.err
1879  ac_status=$?
1880  if test -s conftest.err; then
1881    grep -v '^ *+' conftest.err >conftest.er1
1882    cat conftest.er1 >&5
1883    mv -f conftest.er1 conftest.err
1884  fi
1885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886  test $ac_status = 0; } && {
1887	 test -z "$ac_c_werror_flag" ||
1888	 test ! -s conftest.err
1889       } && test -s conftest.$ac_objext; then :
1890  ac_retval=0
1891else
1892  $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895	ac_retval=1
1896fi
1897  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1898  as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_compile
1901
1902# ac_fn_cxx_try_compile LINENO
1903# ----------------------------
1904# Try to compile conftest.$ac_ext, and return whether this succeeded.
1905ac_fn_cxx_try_compile ()
1906{
1907  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908  rm -f conftest.$ac_objext
1909  if { { ac_try="$ac_compile"
1910case "(($ac_try" in
1911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1912  *) ac_try_echo=$ac_try;;
1913esac
1914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1915$as_echo "$ac_try_echo"; } >&5
1916  (eval "$ac_compile") 2>conftest.err
1917  ac_status=$?
1918  if test -s conftest.err; then
1919    grep -v '^ *+' conftest.err >conftest.er1
1920    cat conftest.er1 >&5
1921    mv -f conftest.er1 conftest.err
1922  fi
1923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924  test $ac_status = 0; } && {
1925	 test -z "$ac_cxx_werror_flag" ||
1926	 test ! -s conftest.err
1927       } && test -s conftest.$ac_objext; then :
1928  ac_retval=0
1929else
1930  $as_echo "$as_me: failed program was:" >&5
1931sed 's/^/| /' conftest.$ac_ext >&5
1932
1933	ac_retval=1
1934fi
1935  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1936  as_fn_set_status $ac_retval
1937
1938} # ac_fn_cxx_try_compile
1939
1940# ac_fn_objc_try_compile LINENO
1941# -----------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_objc_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_objc_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_objc_try_compile
1977
1978# ac_fn_c_try_cpp LINENO
1979# ----------------------
1980# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_c_try_cpp ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  if { { ac_try="$ac_cpp conftest.$ac_ext"
1985case "(($ac_try" in
1986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1987  *) ac_try_echo=$ac_try;;
1988esac
1989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1990$as_echo "$ac_try_echo"; } >&5
1991  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1992  ac_status=$?
1993  if test -s conftest.err; then
1994    grep -v '^ *+' conftest.err >conftest.er1
1995    cat conftest.er1 >&5
1996    mv -f conftest.er1 conftest.err
1997  fi
1998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1999  test $ac_status = 0; } > conftest.i && {
2000	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2001	 test ! -s conftest.err
2002       }; then :
2003  ac_retval=0
2004else
2005  $as_echo "$as_me: failed program was:" >&5
2006sed 's/^/| /' conftest.$ac_ext >&5
2007
2008    ac_retval=1
2009fi
2010  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2011  as_fn_set_status $ac_retval
2012
2013} # ac_fn_c_try_cpp
2014
2015# ac_fn_cxx_try_cpp LINENO
2016# ------------------------
2017# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2018ac_fn_cxx_try_cpp ()
2019{
2020  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021  if { { ac_try="$ac_cpp conftest.$ac_ext"
2022case "(($ac_try" in
2023  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2024  *) ac_try_echo=$ac_try;;
2025esac
2026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2027$as_echo "$ac_try_echo"; } >&5
2028  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2029  ac_status=$?
2030  if test -s conftest.err; then
2031    grep -v '^ *+' conftest.err >conftest.er1
2032    cat conftest.er1 >&5
2033    mv -f conftest.er1 conftest.err
2034  fi
2035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2036  test $ac_status = 0; } > conftest.i && {
2037	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2038	 test ! -s conftest.err
2039       }; then :
2040  ac_retval=0
2041else
2042  $as_echo "$as_me: failed program was:" >&5
2043sed 's/^/| /' conftest.$ac_ext >&5
2044
2045    ac_retval=1
2046fi
2047  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2048  as_fn_set_status $ac_retval
2049
2050} # ac_fn_cxx_try_cpp
2051
2052# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2053# ---------------------------------------------------------
2054# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2055# the include files in INCLUDES and setting the cache variable VAR
2056# accordingly.
2057ac_fn_cxx_check_header_mongrel ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if eval "test \"\${$3+set}\"" = set; then :
2061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2062$as_echo_n "checking for $2... " >&6; }
2063if eval "test \"\${$3+set}\"" = set; then :
2064  $as_echo_n "(cached) " >&6
2065fi
2066eval ac_res=\$$3
2067	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2068$as_echo "$ac_res" >&6; }
2069else
2070  # Is the header compilable?
2071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2072$as_echo_n "checking $2 usability... " >&6; }
2073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h.  */
2075$4
2076#include <$2>
2077_ACEOF
2078if ac_fn_cxx_try_compile "$LINENO"; then :
2079  ac_header_compiler=yes
2080else
2081  ac_header_compiler=no
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2085$as_echo "$ac_header_compiler" >&6; }
2086
2087# Is the header present?
2088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2089$as_echo_n "checking $2 presence... " >&6; }
2090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h.  */
2092#include <$2>
2093_ACEOF
2094if ac_fn_cxx_try_cpp "$LINENO"; then :
2095  ac_header_preproc=yes
2096else
2097  ac_header_preproc=no
2098fi
2099rm -f conftest.err conftest.i conftest.$ac_ext
2100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2101$as_echo "$ac_header_preproc" >&6; }
2102
2103# So?  What about this header?
2104case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2105  yes:no: )
2106    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2107$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2108    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2109$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2110    ;;
2111  no:yes:* )
2112    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2113$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2115$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2117$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2119$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2121$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2122( $as_echo "## ----------------------------------------- ##
2123## Report this to build-dev@openjdk.java.net ##
2124## ----------------------------------------- ##"
2125     ) | sed "s/^/$as_me: WARNING:     /" >&2
2126    ;;
2127esac
2128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129$as_echo_n "checking for $2... " >&6; }
2130if eval "test \"\${$3+set}\"" = set; then :
2131  $as_echo_n "(cached) " >&6
2132else
2133  eval "$3=\$ac_header_compiler"
2134fi
2135eval ac_res=\$$3
2136	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138fi
2139  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2140
2141} # ac_fn_cxx_check_header_mongrel
2142
2143# ac_fn_cxx_try_run LINENO
2144# ------------------------
2145# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2146# that executables *can* be run.
2147ac_fn_cxx_try_run ()
2148{
2149  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2150  if { { ac_try="$ac_link"
2151case "(($ac_try" in
2152  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2153  *) ac_try_echo=$ac_try;;
2154esac
2155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2156$as_echo "$ac_try_echo"; } >&5
2157  (eval "$ac_link") 2>&5
2158  ac_status=$?
2159  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2160  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2161  { { case "(($ac_try" in
2162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163  *) ac_try_echo=$ac_try;;
2164esac
2165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166$as_echo "$ac_try_echo"; } >&5
2167  (eval "$ac_try") 2>&5
2168  ac_status=$?
2169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2170  test $ac_status = 0; }; }; then :
2171  ac_retval=0
2172else
2173  $as_echo "$as_me: program exited with status $ac_status" >&5
2174       $as_echo "$as_me: failed program was:" >&5
2175sed 's/^/| /' conftest.$ac_ext >&5
2176
2177       ac_retval=$ac_status
2178fi
2179  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2180  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2181  as_fn_set_status $ac_retval
2182
2183} # ac_fn_cxx_try_run
2184
2185# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2186# ---------------------------------------------------------
2187# Tests whether HEADER exists and can be compiled using the include files in
2188# INCLUDES, setting the cache variable VAR accordingly.
2189ac_fn_cxx_check_header_compile ()
2190{
2191  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2193$as_echo_n "checking for $2... " >&6; }
2194if eval "test \"\${$3+set}\"" = set; then :
2195  $as_echo_n "(cached) " >&6
2196else
2197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h.  */
2199$4
2200#include <$2>
2201_ACEOF
2202if ac_fn_cxx_try_compile "$LINENO"; then :
2203  eval "$3=yes"
2204else
2205  eval "$3=no"
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209eval ac_res=\$$3
2210	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2211$as_echo "$ac_res" >&6; }
2212  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2213
2214} # ac_fn_cxx_check_header_compile
2215
2216# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2217# ----------------------------------------------
2218# Tries to find the compile-time value of EXPR in a program that includes
2219# INCLUDES, setting VAR accordingly. Returns whether the value could be
2220# computed
2221ac_fn_cxx_compute_int ()
2222{
2223  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224  if test "$cross_compiling" = yes; then
2225    # Depending upon the size, compute the lo and hi bounds.
2226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h.  */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) >= 0)];
2233test_array [0] = 0
2234
2235  ;
2236  return 0;
2237}
2238_ACEOF
2239if ac_fn_cxx_try_compile "$LINENO"; then :
2240  ac_lo=0 ac_mid=0
2241  while :; do
2242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h.  */
2244$4
2245int
2246main ()
2247{
2248static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2249test_array [0] = 0
2250
2251  ;
2252  return 0;
2253}
2254_ACEOF
2255if ac_fn_cxx_try_compile "$LINENO"; then :
2256  ac_hi=$ac_mid; break
2257else
2258  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2259			if test $ac_lo -le $ac_mid; then
2260			  ac_lo= ac_hi=
2261			  break
2262			fi
2263			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266  done
2267else
2268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) < 0)];
2275test_array [0] = 0
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_cxx_try_compile "$LINENO"; then :
2282  ac_hi=-1 ac_mid=-1
2283  while :; do
2284    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h.  */
2286$4
2287int
2288main ()
2289{
2290static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2291test_array [0] = 0
2292
2293  ;
2294  return 0;
2295}
2296_ACEOF
2297if ac_fn_cxx_try_compile "$LINENO"; then :
2298  ac_lo=$ac_mid; break
2299else
2300  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2301			if test $ac_mid -le $ac_hi; then
2302			  ac_lo= ac_hi=
2303			  break
2304			fi
2305			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308  done
2309else
2310  ac_lo= ac_hi=
2311fi
2312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315# Binary search between lo and hi bounds.
2316while test "x$ac_lo" != "x$ac_hi"; do
2317  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h.  */
2320$4
2321int
2322main ()
2323{
2324static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2325test_array [0] = 0
2326
2327  ;
2328  return 0;
2329}
2330_ACEOF
2331if ac_fn_cxx_try_compile "$LINENO"; then :
2332  ac_hi=$ac_mid
2333else
2334  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337done
2338case $ac_lo in #((
2339?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2340'') ac_retval=1 ;;
2341esac
2342  else
2343    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h.  */
2345$4
2346static long int longval () { return $2; }
2347static unsigned long int ulongval () { return $2; }
2348#include <stdio.h>
2349#include <stdlib.h>
2350int
2351main ()
2352{
2353
2354  FILE *f = fopen ("conftest.val", "w");
2355  if (! f)
2356    return 1;
2357  if (($2) < 0)
2358    {
2359      long int i = longval ();
2360      if (i != ($2))
2361	return 1;
2362      fprintf (f, "%ld", i);
2363    }
2364  else
2365    {
2366      unsigned long int i = ulongval ();
2367      if (i != ($2))
2368	return 1;
2369      fprintf (f, "%lu", i);
2370    }
2371  /* Do not output a trailing newline, as this causes \r\n confusion
2372     on some platforms.  */
2373  return ferror (f) || fclose (f) != 0;
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_run "$LINENO"; then :
2380  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2381else
2382  ac_retval=1
2383fi
2384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2385  conftest.$ac_objext conftest.beam conftest.$ac_ext
2386rm -f conftest.val
2387
2388  fi
2389  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2390  as_fn_set_status $ac_retval
2391
2392} # ac_fn_cxx_compute_int
2393
2394# ac_fn_cxx_try_link LINENO
2395# -------------------------
2396# Try to link conftest.$ac_ext, and return whether this succeeded.
2397ac_fn_cxx_try_link ()
2398{
2399  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400  rm -f conftest.$ac_objext conftest$ac_exeext
2401  if { { ac_try="$ac_link"
2402case "(($ac_try" in
2403  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404  *) ac_try_echo=$ac_try;;
2405esac
2406eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407$as_echo "$ac_try_echo"; } >&5
2408  (eval "$ac_link") 2>conftest.err
2409  ac_status=$?
2410  if test -s conftest.err; then
2411    grep -v '^ *+' conftest.err >conftest.er1
2412    cat conftest.er1 >&5
2413    mv -f conftest.er1 conftest.err
2414  fi
2415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2416  test $ac_status = 0; } && {
2417	 test -z "$ac_cxx_werror_flag" ||
2418	 test ! -s conftest.err
2419       } && test -s conftest$ac_exeext && {
2420	 test "$cross_compiling" = yes ||
2421	 $as_test_x conftest$ac_exeext
2422       }; then :
2423  ac_retval=0
2424else
2425  $as_echo "$as_me: failed program was:" >&5
2426sed 's/^/| /' conftest.$ac_ext >&5
2427
2428	ac_retval=1
2429fi
2430  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2431  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2432  # interfere with the next link command; also delete a directory that is
2433  # left behind by Apple's compiler.  We do this before executing the actions.
2434  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2435  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_try_link
2439
2440# ac_fn_cxx_check_func LINENO FUNC VAR
2441# ------------------------------------
2442# Tests whether FUNC exists, setting the cache variable VAR accordingly
2443ac_fn_cxx_check_func ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2447$as_echo_n "checking for $2... " >&6; }
2448if eval "test \"\${$3+set}\"" = set; then :
2449  $as_echo_n "(cached) " >&6
2450else
2451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2452/* end confdefs.h.  */
2453/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2454   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2455#define $2 innocuous_$2
2456
2457/* System header to define __stub macros and hopefully few prototypes,
2458    which can conflict with char $2 (); below.
2459    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2460    <limits.h> exists even on freestanding compilers.  */
2461
2462#ifdef __STDC__
2463# include <limits.h>
2464#else
2465# include <assert.h>
2466#endif
2467
2468#undef $2
2469
2470/* Override any GCC internal prototype to avoid an error.
2471   Use char because int might match the return type of a GCC
2472   builtin and then its argument prototype would still apply.  */
2473#ifdef __cplusplus
2474extern "C"
2475#endif
2476char $2 ();
2477/* The GNU C library defines this for functions which it implements
2478    to always fail with ENOSYS.  Some functions are actually named
2479    something starting with __ and the normal name is an alias.  */
2480#if defined __stub_$2 || defined __stub___$2
2481choke me
2482#endif
2483
2484int
2485main ()
2486{
2487return $2 ();
2488  ;
2489  return 0;
2490}
2491_ACEOF
2492if ac_fn_cxx_try_link "$LINENO"; then :
2493  eval "$3=yes"
2494else
2495  eval "$3=no"
2496fi
2497rm -f core conftest.err conftest.$ac_objext \
2498    conftest$ac_exeext conftest.$ac_ext
2499fi
2500eval ac_res=\$$3
2501	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2502$as_echo "$ac_res" >&6; }
2503  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2504
2505} # ac_fn_cxx_check_func
2506
2507# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2508# -------------------------------------------------------
2509# Tests whether HEADER exists and can be compiled using the include files in
2510# INCLUDES, setting the cache variable VAR accordingly.
2511ac_fn_c_check_header_compile ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2515$as_echo_n "checking for $2... " >&6; }
2516if eval "test \"\${$3+set}\"" = set; then :
2517  $as_echo_n "(cached) " >&6
2518else
2519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2520/* end confdefs.h.  */
2521$4
2522#include <$2>
2523_ACEOF
2524if ac_fn_c_try_compile "$LINENO"; then :
2525  eval "$3=yes"
2526else
2527  eval "$3=no"
2528fi
2529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2530fi
2531eval ac_res=\$$3
2532	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533$as_echo "$ac_res" >&6; }
2534  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2535
2536} # ac_fn_c_check_header_compile
2537cat >config.log <<_ACEOF
2538This file contains any messages produced by compilers while
2539running configure, to aid debugging if configure makes a mistake.
2540
2541It was created by OpenJDK $as_me jdk8, which was
2542generated by GNU Autoconf 2.67.  Invocation command line was
2543
2544  $ $0 $@
2545
2546_ACEOF
2547exec 5>>config.log
2548{
2549cat <<_ASUNAME
2550## --------- ##
2551## Platform. ##
2552## --------- ##
2553
2554hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2555uname -m = `(uname -m) 2>/dev/null || echo unknown`
2556uname -r = `(uname -r) 2>/dev/null || echo unknown`
2557uname -s = `(uname -s) 2>/dev/null || echo unknown`
2558uname -v = `(uname -v) 2>/dev/null || echo unknown`
2559
2560/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2561/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2562
2563/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2564/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2565/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2566/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2567/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2568/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2569/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2570
2571_ASUNAME
2572
2573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574for as_dir in $PATH
2575do
2576  IFS=$as_save_IFS
2577  test -z "$as_dir" && as_dir=.
2578    $as_echo "PATH: $as_dir"
2579  done
2580IFS=$as_save_IFS
2581
2582} >&5
2583
2584cat >&5 <<_ACEOF
2585
2586
2587## ----------- ##
2588## Core tests. ##
2589## ----------- ##
2590
2591_ACEOF
2592
2593
2594# Keep a trace of the command line.
2595# Strip out --no-create and --no-recursion so they do not pile up.
2596# Strip out --silent because we don't want to record it for future runs.
2597# Also quote any args containing shell meta-characters.
2598# Make two passes to allow for proper duplicate-argument suppression.
2599ac_configure_args=
2600ac_configure_args0=
2601ac_configure_args1=
2602ac_must_keep_next=false
2603for ac_pass in 1 2
2604do
2605  for ac_arg
2606  do
2607    case $ac_arg in
2608    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2609    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2610    | -silent | --silent | --silen | --sile | --sil)
2611      continue ;;
2612    *\'*)
2613      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2614    esac
2615    case $ac_pass in
2616    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2617    2)
2618      as_fn_append ac_configure_args1 " '$ac_arg'"
2619      if test $ac_must_keep_next = true; then
2620	ac_must_keep_next=false # Got value, back to normal.
2621      else
2622	case $ac_arg in
2623	  *=* | --config-cache | -C | -disable-* | --disable-* \
2624	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2625	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2626	  | -with-* | --with-* | -without-* | --without-* | --x)
2627	    case "$ac_configure_args0 " in
2628	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2629	    esac
2630	    ;;
2631	  -* ) ac_must_keep_next=true ;;
2632	esac
2633      fi
2634      as_fn_append ac_configure_args " '$ac_arg'"
2635      ;;
2636    esac
2637  done
2638done
2639{ ac_configure_args0=; unset ac_configure_args0;}
2640{ ac_configure_args1=; unset ac_configure_args1;}
2641
2642# When interrupted or exit'd, cleanup temporary files, and complete
2643# config.log.  We remove comments because anyway the quotes in there
2644# would cause problems or look ugly.
2645# WARNING: Use '\'' to represent an apostrophe within the trap.
2646# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2647trap 'exit_status=$?
2648  # Save into config.log some information that might help in debugging.
2649  {
2650    echo
2651
2652    $as_echo "## ---------------- ##
2653## Cache variables. ##
2654## ---------------- ##"
2655    echo
2656    # The following way of writing the cache mishandles newlines in values,
2657(
2658  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2659    eval ac_val=\$$ac_var
2660    case $ac_val in #(
2661    *${as_nl}*)
2662      case $ac_var in #(
2663      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2664$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2665      esac
2666      case $ac_var in #(
2667      _ | IFS | as_nl) ;; #(
2668      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2669      *) { eval $ac_var=; unset $ac_var;} ;;
2670      esac ;;
2671    esac
2672  done
2673  (set) 2>&1 |
2674    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2675    *${as_nl}ac_space=\ *)
2676      sed -n \
2677	"s/'\''/'\''\\\\'\'''\''/g;
2678	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2679      ;; #(
2680    *)
2681      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2682      ;;
2683    esac |
2684    sort
2685)
2686    echo
2687
2688    $as_echo "## ----------------- ##
2689## Output variables. ##
2690## ----------------- ##"
2691    echo
2692    for ac_var in $ac_subst_vars
2693    do
2694      eval ac_val=\$$ac_var
2695      case $ac_val in
2696      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2697      esac
2698      $as_echo "$ac_var='\''$ac_val'\''"
2699    done | sort
2700    echo
2701
2702    if test -n "$ac_subst_files"; then
2703      $as_echo "## ------------------- ##
2704## File substitutions. ##
2705## ------------------- ##"
2706      echo
2707      for ac_var in $ac_subst_files
2708      do
2709	eval ac_val=\$$ac_var
2710	case $ac_val in
2711	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2712	esac
2713	$as_echo "$ac_var='\''$ac_val'\''"
2714      done | sort
2715      echo
2716    fi
2717
2718    if test -s confdefs.h; then
2719      $as_echo "## ----------- ##
2720## confdefs.h. ##
2721## ----------- ##"
2722      echo
2723      cat confdefs.h
2724      echo
2725    fi
2726    test "$ac_signal" != 0 &&
2727      $as_echo "$as_me: caught signal $ac_signal"
2728    $as_echo "$as_me: exit $exit_status"
2729  } >&5
2730  rm -f core *.core core.conftest.* &&
2731    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2732    exit $exit_status
2733' 0
2734for ac_signal in 1 2 13 15; do
2735  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2736done
2737ac_signal=0
2738
2739# confdefs.h avoids OS command line length limits that DEFS can exceed.
2740rm -f -r conftest* confdefs.h
2741
2742$as_echo "/* confdefs.h */" > confdefs.h
2743
2744# Predefined preprocessor variables.
2745
2746cat >>confdefs.h <<_ACEOF
2747#define PACKAGE_NAME "$PACKAGE_NAME"
2748_ACEOF
2749
2750cat >>confdefs.h <<_ACEOF
2751#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2752_ACEOF
2753
2754cat >>confdefs.h <<_ACEOF
2755#define PACKAGE_VERSION "$PACKAGE_VERSION"
2756_ACEOF
2757
2758cat >>confdefs.h <<_ACEOF
2759#define PACKAGE_STRING "$PACKAGE_STRING"
2760_ACEOF
2761
2762cat >>confdefs.h <<_ACEOF
2763#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2764_ACEOF
2765
2766cat >>confdefs.h <<_ACEOF
2767#define PACKAGE_URL "$PACKAGE_URL"
2768_ACEOF
2769
2770
2771# Let the site file select an alternate cache file if it wants to.
2772# Prefer an explicitly selected file to automatically selected ones.
2773ac_site_file1=NONE
2774ac_site_file2=NONE
2775if test -n "$CONFIG_SITE"; then
2776  # We do not want a PATH search for config.site.
2777  case $CONFIG_SITE in #((
2778    -*)  ac_site_file1=./$CONFIG_SITE;;
2779    */*) ac_site_file1=$CONFIG_SITE;;
2780    *)   ac_site_file1=./$CONFIG_SITE;;
2781  esac
2782elif test "x$prefix" != xNONE; then
2783  ac_site_file1=$prefix/share/config.site
2784  ac_site_file2=$prefix/etc/config.site
2785else
2786  ac_site_file1=$ac_default_prefix/share/config.site
2787  ac_site_file2=$ac_default_prefix/etc/config.site
2788fi
2789for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2790do
2791  test "x$ac_site_file" = xNONE && continue
2792  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2793    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2794$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2795    sed 's/^/| /' "$ac_site_file" >&5
2796    . "$ac_site_file" \
2797      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2799as_fn_error $? "failed to load site script $ac_site_file
2800See \`config.log' for more details" "$LINENO" 5 ; }
2801  fi
2802done
2803
2804if test -r "$cache_file"; then
2805  # Some versions of bash will fail to source /dev/null (special files
2806  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2807  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2808    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2809$as_echo "$as_me: loading cache $cache_file" >&6;}
2810    case $cache_file in
2811      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2812      *)                      . "./$cache_file";;
2813    esac
2814  fi
2815else
2816  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2817$as_echo "$as_me: creating cache $cache_file" >&6;}
2818  >$cache_file
2819fi
2820
2821# Check that the precious variables saved in the cache have kept the same
2822# value.
2823ac_cache_corrupted=false
2824for ac_var in $ac_precious_vars; do
2825  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2826  eval ac_new_set=\$ac_env_${ac_var}_set
2827  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2828  eval ac_new_val=\$ac_env_${ac_var}_value
2829  case $ac_old_set,$ac_new_set in
2830    set,)
2831      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2832$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2833      ac_cache_corrupted=: ;;
2834    ,set)
2835      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2836$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2837      ac_cache_corrupted=: ;;
2838    ,);;
2839    *)
2840      if test "x$ac_old_val" != "x$ac_new_val"; then
2841	# differences in whitespace do not lead to failure.
2842	ac_old_val_w=`echo x $ac_old_val`
2843	ac_new_val_w=`echo x $ac_new_val`
2844	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2845	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2846$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2847	  ac_cache_corrupted=:
2848	else
2849	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2850$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2851	  eval $ac_var=\$ac_old_val
2852	fi
2853	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2854$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2855	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2856$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2857      fi;;
2858  esac
2859  # Pass precious variables to config.status.
2860  if test "$ac_new_set" = set; then
2861    case $ac_new_val in
2862    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2863    *) ac_arg=$ac_var=$ac_new_val ;;
2864    esac
2865    case " $ac_configure_args " in
2866      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2867      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2868    esac
2869  fi
2870done
2871if $ac_cache_corrupted; then
2872  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2874  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2875$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2876  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2877fi
2878## -------------------- ##
2879## Main body of script. ##
2880## -------------------- ##
2881
2882ac_ext=c
2883ac_cpp='$CPP $CPPFLAGS'
2884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2886ac_compiler_gnu=$ac_cv_c_compiler_gnu
2887
2888
2889
2890ac_aux_dir=
2891for ac_dir in build-aux "$srcdir"/build-aux; do
2892  if test -f "$ac_dir/install-sh"; then
2893    ac_aux_dir=$ac_dir
2894    ac_install_sh="$ac_aux_dir/install-sh -c"
2895    break
2896  elif test -f "$ac_dir/install.sh"; then
2897    ac_aux_dir=$ac_dir
2898    ac_install_sh="$ac_aux_dir/install.sh -c"
2899    break
2900  elif test -f "$ac_dir/shtool"; then
2901    ac_aux_dir=$ac_dir
2902    ac_install_sh="$ac_aux_dir/shtool install -c"
2903    break
2904  fi
2905done
2906if test -z "$ac_aux_dir"; then
2907  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2917
2918
2919# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2920#
2921# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2922#
2923# This program is free software; you can redistribute it and/or modify
2924# it under the terms of the GNU General Public License as published by
2925# the Free Software Foundation; either version 2 of the License, or
2926# (at your option) any later version.
2927#
2928# This program is distributed in the hope that it will be useful, but
2929# WITHOUT ANY WARRANTY; without even the implied warranty of
2930# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2931# General Public License for more details.
2932#
2933# You should have received a copy of the GNU General Public License
2934# along with this program; if not, write to the Free Software
2935# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2936#
2937# As a special exception to the GNU General Public License, if you
2938# distribute this file as part of a program that contains a
2939# configuration script generated by Autoconf, you may include it under
2940# the same distribution terms that you use for the rest of that program.
2941
2942# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2943# ----------------------------------
2944# PKG_PROG_PKG_CONFIG
2945
2946# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2947#
2948# Check to see whether a particular set of modules exists.  Similar
2949# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2950#
2951#
2952# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2953# this or PKG_CHECK_MODULES is called, or make sure to call
2954# PKG_CHECK_EXISTS manually
2955# --------------------------------------------------------------
2956
2957
2958
2959# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2960# ---------------------------------------------
2961# _PKG_CONFIG
2962
2963# _PKG_SHORT_ERRORS_SUPPORTED
2964# -----------------------------
2965# _PKG_SHORT_ERRORS_SUPPORTED
2966
2967
2968# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2969# [ACTION-IF-NOT-FOUND])
2970#
2971#
2972# Note that if there is a possibility the first call to
2973# PKG_CHECK_MODULES might not happen, you should be sure to include an
2974# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2975#
2976#
2977# --------------------------------------------------------------
2978# PKG_CHECK_MODULES
2979
2980
2981# Include these first...
2982#
2983# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2984# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2985#
2986# This code is free software; you can redistribute it and/or modify it
2987# under the terms of the GNU General Public License version 2 only, as
2988# published by the Free Software Foundation.  Oracle designates this
2989# particular file as subject to the "Classpath" exception as provided
2990# by Oracle in the LICENSE file that accompanied this code.
2991#
2992# This code is distributed in the hope that it will be useful, but WITHOUT
2993# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2994# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2995# version 2 for more details (a copy is included in the LICENSE file that
2996# accompanied this code).
2997#
2998# You should have received a copy of the GNU General Public License version
2999# 2 along with this work; if not, write to the Free Software Foundation,
3000# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3001#
3002# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3003# or visit www.oracle.com if you need additional information or have any
3004# questions.
3005#
3006
3007
3008
3009# This will make sure the given variable points to a full and proper
3010# path. This means:
3011# 1) There will be no spaces in the path. On posix platforms,
3012#    spaces in the path will result in an error. On Windows,
3013#    the path will be rewritten using short-style to be space-free.
3014# 2) The path will be absolute, and it will be in unix-style (on
3015#     cygwin).
3016# $1: The name of the variable to fix
3017
3018
3019# This will make sure the given variable points to a executable
3020# with a full and proper path. This means:
3021# 1) There will be no spaces in the path. On posix platforms,
3022#    spaces in the path will result in an error. On Windows,
3023#    the path will be rewritten using short-style to be space-free.
3024# 2) The path will be absolute, and it will be in unix-style (on
3025#     cygwin).
3026# Any arguments given to the executable is preserved.
3027# If the input variable does not have a directory specification, then
3028# it need to be in the PATH.
3029# $1: The name of the variable to fix
3030
3031
3032
3033
3034
3035
3036# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3037# $1: variable to check
3038# $2: executable name to print in warning (optional)
3039
3040
3041# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3042# Arguments as AC_PATH_PROG:
3043# $1: variable to set
3044# $2: executable name to look for
3045
3046
3047# Setup the most fundamental tools that relies on not much else to set up,
3048# but is used by much of the early bootstrap code.
3049
3050
3051# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3052
3053
3054
3055
3056
3057
3058
3059#%%% Simple tools %%%
3060
3061# Check if we have found a usable version of make
3062# $1: the path to a potential make binary (or empty)
3063# $2: the description on how we found this
3064
3065
3066# Goes looking for a usable version of GNU make.
3067
3068
3069
3070
3071
3072
3073# Check if build directory is on local disk. If not possible to determine,
3074# we prefer to claim it's local.
3075# Argument 1: directory to test
3076# Argument 2: what to do if it is on local disk
3077# Argument 3: what to do otherwise (remote disk or failure)
3078
3079
3080
3081
3082#
3083# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3084# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3085#
3086# This code is free software; you can redistribute it and/or modify it
3087# under the terms of the GNU General Public License version 2 only, as
3088# published by the Free Software Foundation.  Oracle designates this
3089# particular file as subject to the "Classpath" exception as provided
3090# by Oracle in the LICENSE file that accompanied this code.
3091#
3092# This code is distributed in the hope that it will be useful, but WITHOUT
3093# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3094# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3095# version 2 for more details (a copy is included in the LICENSE file that
3096# accompanied this code).
3097#
3098# You should have received a copy of the GNU General Public License version
3099# 2 along with this work; if not, write to the Free Software Foundation,
3100# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3101#
3102# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3103# or visit www.oracle.com if you need additional information or have any
3104# questions.
3105#
3106
3107
3108
3109
3110
3111# Helper function which possibly converts a path using DOS-style short mode.
3112# If so, the updated path is stored in $new_path.
3113# $1: The path to check
3114
3115
3116# Helper function which possibly converts a path using DOS-style short mode.
3117# If so, the updated path is stored in $new_path.
3118# $1: The path to check
3119
3120
3121# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3122# and could probably be heavily simplified. However, all changes in this
3123# area tend to need lot of testing in different scenarios, and in lack of
3124# proper unit testing, cleaning this up has not been deemed worth the effort
3125# at the moment.
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3136
3137
3138
3139
3140#
3141# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3142# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3143#
3144# This code is free software; you can redistribute it and/or modify it
3145# under the terms of the GNU General Public License version 2 only, as
3146# published by the Free Software Foundation.  Oracle designates this
3147# particular file as subject to the "Classpath" exception as provided
3148# by Oracle in the LICENSE file that accompanied this code.
3149#
3150# This code is distributed in the hope that it will be useful, but WITHOUT
3151# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3152# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3153# version 2 for more details (a copy is included in the LICENSE file that
3154# accompanied this code).
3155#
3156# You should have received a copy of the GNU General Public License version
3157# 2 along with this work; if not, write to the Free Software Foundation,
3158# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3159#
3160# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3161# or visit www.oracle.com if you need additional information or have any
3162# questions.
3163#
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175# ... then the rest
3176#
3177# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3178# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3179#
3180# This code is free software; you can redistribute it and/or modify it
3181# under the terms of the GNU General Public License version 2 only, as
3182# published by the Free Software Foundation.  Oracle designates this
3183# particular file as subject to the "Classpath" exception as provided
3184# by Oracle in the LICENSE file that accompanied this code.
3185#
3186# This code is distributed in the hope that it will be useful, but WITHOUT
3187# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3188# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3189# version 2 for more details (a copy is included in the LICENSE file that
3190# accompanied this code).
3191#
3192# You should have received a copy of the GNU General Public License version
3193# 2 along with this work; if not, write to the Free Software Foundation,
3194# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3195#
3196# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3197# or visit www.oracle.com if you need additional information or have any
3198# questions.
3199#
3200
3201# Execute the check given as argument, and verify the result
3202# If the Boot JDK was previously found, do nothing
3203# $1 A command line (typically autoconf macro) to execute
3204
3205
3206# Test: Is bootjdk explicitely set by command line arguments?
3207
3208
3209# Test: Is bootjdk available from builddeps?
3210
3211
3212# Test: Is $JAVA_HOME set?
3213
3214
3215# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3216
3217
3218# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3219
3220
3221# Look for a jdk in the given path. If there are multiple, try to select the newest.
3222# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3223# $1 = Path to directory containing jdk installations.
3224# $2 = String to append to the found JDK directory to get the proper JDK home
3225
3226
3227# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3228# environmental variable as base for where to look.
3229# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3230
3231
3232# Test: Is there a JDK installed in default, well-known locations?
3233
3234
3235# Check that a command-line tool in the Boot JDK is correct
3236# $1 = name of variable to assign
3237# $2 = name of binary
3238
3239
3240###############################################################################
3241#
3242# We need a Boot JDK to bootstrap the build.
3243#
3244
3245
3246
3247
3248
3249#
3250# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3251# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3252#
3253# This code is free software; you can redistribute it and/or modify it
3254# under the terms of the GNU General Public License version 2 only, as
3255# published by the Free Software Foundation.  Oracle designates this
3256# particular file as subject to the "Classpath" exception as provided
3257# by Oracle in the LICENSE file that accompanied this code.
3258#
3259# This code is distributed in the hope that it will be useful, but WITHOUT
3260# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3261# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3262# version 2 for more details (a copy is included in the LICENSE file that
3263# accompanied this code).
3264#
3265# You should have received a copy of the GNU General Public License version
3266# 2 along with this work; if not, write to the Free Software Foundation,
3267# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3268#
3269# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3270# or visit www.oracle.com if you need additional information or have any
3271# questions.
3272#
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291#
3292# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3294#
3295# This code is free software; you can redistribute it and/or modify it
3296# under the terms of the GNU General Public License version 2 only, as
3297# published by the Free Software Foundation.  Oracle designates this
3298# particular file as subject to the "Classpath" exception as provided
3299# by Oracle in the LICENSE file that accompanied this code.
3300#
3301# This code is distributed in the hope that it will be useful, but WITHOUT
3302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3304# version 2 for more details (a copy is included in the LICENSE file that
3305# accompanied this code).
3306#
3307# You should have received a copy of the GNU General Public License version
3308# 2 along with this work; if not, write to the Free Software Foundation,
3309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3310#
3311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3312# or visit www.oracle.com if you need additional information or have any
3313# questions.
3314#
3315
3316
3317
3318
3319
3320cygwin_help() {
3321    case $1 in
3322    unzip)
3323        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3324    zip)
3325        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3326    make)
3327        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3328    * )
3329       break ;;
3330    esac
3331}
3332
3333apt_help() {
3334    case $1 in
3335    devkit)
3336        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3337    openjdk)
3338        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3339    alsa)
3340        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3341    cups)
3342        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3343    freetype2)
3344        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3345    pulse)
3346        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3347    x11)
3348        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3349    ccache)
3350        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3351    * )
3352       break ;;
3353    esac
3354}
3355
3356yum_help() {
3357    case $1 in
3358    devkit)
3359        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3360    openjdk)
3361        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3362    alsa)
3363        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3364    cups)
3365        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3366    freetype2)
3367        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3368    pulse)
3369        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3370    x11)
3371        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3372    ccache)
3373        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3374    * )
3375       break ;;
3376    esac
3377}
3378
3379port_help() {
3380    PKGHANDLER_COMMAND=""
3381}
3382
3383pkgutil_help() {
3384    PKGHANDLER_COMMAND=""
3385}
3386
3387pkgadd_help() {
3388    PKGHANDLER_COMMAND=""
3389}
3390
3391
3392
3393#
3394# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3395# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3396#
3397# This code is free software; you can redistribute it and/or modify it
3398# under the terms of the GNU General Public License version 2 only, as
3399# published by the Free Software Foundation.  Oracle designates this
3400# particular file as subject to the "Classpath" exception as provided
3401# by Oracle in the LICENSE file that accompanied this code.
3402#
3403# This code is distributed in the hope that it will be useful, but WITHOUT
3404# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3405# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3406# version 2 for more details (a copy is included in the LICENSE file that
3407# accompanied this code).
3408#
3409# You should have received a copy of the GNU General Public License version
3410# 2 along with this work; if not, write to the Free Software Foundation,
3411# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3412#
3413# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3414# or visit www.oracle.com if you need additional information or have any
3415# questions.
3416#
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432# Support for customization of the build process. Some build files
3433# will include counterparts from this location, if they exist. This allows
3434# for a degree of customization of the build targets and the rules/recipes
3435# to create them
3436
3437# Check whether --with-custom-make-dir was given.
3438if test "${with_custom_make_dir+set}" = set; then :
3439  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3440fi
3441
3442
3443
3444#
3445# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3446# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3447#
3448# This code is free software; you can redistribute it and/or modify it
3449# under the terms of the GNU General Public License version 2 only, as
3450# published by the Free Software Foundation.  Oracle designates this
3451# particular file as subject to the "Classpath" exception as provided
3452# by Oracle in the LICENSE file that accompanied this code.
3453#
3454# This code is distributed in the hope that it will be useful, but WITHOUT
3455# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3456# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3457# version 2 for more details (a copy is included in the LICENSE file that
3458# accompanied this code).
3459#
3460# You should have received a copy of the GNU General Public License version
3461# 2 along with this work; if not, write to the Free Software Foundation,
3462# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3463#
3464# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3465# or visit www.oracle.com if you need additional information or have any
3466# questions.
3467#
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483#
3484# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3509# Converts autoconf style CPU name to OpenJDK style, into
3510# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3511
3512
3513# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3514# Converts autoconf style OS name to OpenJDK style, into
3515# VAR_OS and VAR_OS_API.
3516
3517
3518# Expects $host_os $host_cpu $build_os and $build_cpu
3519# and $with_target_bits to have been setup!
3520#
3521# Translate the standard triplet(quadruplet) definition
3522# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3523# OPENJDK_BUILD_OS, etc.
3524
3525
3526# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3527# accordingly. Must be done after setting up build and target system, but before
3528# doing anything else with these values.
3529
3530
3531    # Setup the legacy variables, for controlling the old makefiles.
3532    #
3533
3534
3535
3536
3537#%%% Build and target systems %%%
3538
3539
3540
3541
3542# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3543# Add -mX to various FLAGS variables.
3544
3545
3546
3547
3548
3549
3550#
3551# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
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# $1 = compiler to test (CC or CXX)
3608# $2 = human readable name of compiler (C or C++)
3609
3610
3611
3612
3613
3614# $1 = compiler to test (CC or CXX)
3615# $2 = human readable name of compiler (C or C++)
3616# $3 = list of compiler names to search for
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629#
3630# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3631# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3632#
3633# This code is free software; you can redistribute it and/or modify it
3634# under the terms of the GNU General Public License version 2 only, as
3635# published by the Free Software Foundation.  Oracle designates this
3636# particular file as subject to the "Classpath" exception as provided
3637# by Oracle in the LICENSE file that accompanied this code.
3638#
3639# This code is distributed in the hope that it will be useful, but WITHOUT
3640# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3641# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3642# version 2 for more details (a copy is included in the LICENSE file that
3643# accompanied this code).
3644#
3645# You should have received a copy of the GNU General Public License version
3646# 2 along with this work; if not, write to the Free Software Foundation,
3647# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3648#
3649# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3650# or visit www.oracle.com if you need additional information or have any
3651# questions.
3652#
3653
3654
3655
3656
3657
3658
3659
3660# Check if the VS env variables were setup prior to running configure.
3661# If not, then find vcvarsall.bat and run it automatically, and integrate
3662# the set env variables into the spec file.
3663
3664
3665
3666
3667
3668
3669# This line needs to be here, verbatim, after all includes and the dummy hook
3670# definitions. It is replaced with custom functionality when building
3671# custom sources.
3672#CUSTOM_AUTOCONF_INCLUDE
3673
3674# Do not change or remove the following line, it is needed for consistency checks:
3675DATE_WHEN_GENERATED=1354721616
3676
3677###############################################################################
3678#
3679# Initialization / Boot-strapping
3680#
3681# The bootstrapping process needs to solve the "chicken or the egg" problem,
3682# thus it jumps back and forth, each time gaining something needed later on.
3683#
3684###############################################################################
3685
3686# Basic initialization that must happen first of all
3687
3688# Save the original command line. This is passed to us by the wrapper configure script.
3689
3690DATE_WHEN_CONFIGURED=`LANG=C date`
3691
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3693$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3695$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3696
3697
3698
3699# Start with tools that do not need have cross compilation support
3700# and can be expected to be found in the default PATH. These tools are
3701# used by configure. Nor are these tools expected to be found in the
3702# devkit from the builddeps server either, since they are
3703# needed to download the devkit.
3704
3705# First are all the simple required tools.
3706
3707    for ac_prog in basename
3708do
3709  # Extract the first word of "$ac_prog", so it can be a program name with args.
3710set dummy $ac_prog; ac_word=$2
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
3713if test "${ac_cv_path_BASENAME+set}" = set; then :
3714  $as_echo_n "(cached) " >&6
3715else
3716  case $BASENAME in
3717  [\\/]* | ?:[\\/]*)
3718  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3719  ;;
3720  *)
3721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724  IFS=$as_save_IFS
3725  test -z "$as_dir" && as_dir=.
3726    for ac_exec_ext in '' $ac_executable_extensions; do
3727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3728    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3730    break 2
3731  fi
3732done
3733  done
3734IFS=$as_save_IFS
3735
3736  ;;
3737esac
3738fi
3739BASENAME=$ac_cv_path_BASENAME
3740if test -n "$BASENAME"; then
3741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3742$as_echo "$BASENAME" >&6; }
3743else
3744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
3746fi
3747
3748
3749  test -n "$BASENAME" && break
3750done
3751
3752
3753    if test "x$BASENAME" = x; then
3754        if test "xbasename" = x; then
3755          PROG_NAME=basename
3756        else
3757          PROG_NAME=basename
3758        fi
3759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3760$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3761        as_fn_error $? "Cannot continue" "$LINENO" 5
3762    fi
3763
3764
3765
3766    for ac_prog in bash
3767do
3768  # Extract the first word of "$ac_prog", so it can be a program name with args.
3769set dummy $ac_prog; ac_word=$2
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
3772if test "${ac_cv_path_BASH+set}" = set; then :
3773  $as_echo_n "(cached) " >&6
3774else
3775  case $BASH in
3776  [\\/]* | ?:[\\/]*)
3777  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3778  ;;
3779  *)
3780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783  IFS=$as_save_IFS
3784  test -z "$as_dir" && as_dir=.
3785    for ac_exec_ext in '' $ac_executable_extensions; do
3786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3787    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3789    break 2
3790  fi
3791done
3792  done
3793IFS=$as_save_IFS
3794
3795  ;;
3796esac
3797fi
3798BASH=$ac_cv_path_BASH
3799if test -n "$BASH"; then
3800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3801$as_echo "$BASH" >&6; }
3802else
3803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
3805fi
3806
3807
3808  test -n "$BASH" && break
3809done
3810
3811
3812    if test "x$BASH" = x; then
3813        if test "xbash" = x; then
3814          PROG_NAME=bash
3815        else
3816          PROG_NAME=bash
3817        fi
3818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3820        as_fn_error $? "Cannot continue" "$LINENO" 5
3821    fi
3822
3823
3824
3825    for ac_prog in cat
3826do
3827  # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
3831if test "${ac_cv_path_CAT+set}" = set; then :
3832  $as_echo_n "(cached) " >&6
3833else
3834  case $CAT in
3835  [\\/]* | ?:[\\/]*)
3836  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3837  ;;
3838  *)
3839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842  IFS=$as_save_IFS
3843  test -z "$as_dir" && as_dir=.
3844    for ac_exec_ext in '' $ac_executable_extensions; do
3845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3846    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848    break 2
3849  fi
3850done
3851  done
3852IFS=$as_save_IFS
3853
3854  ;;
3855esac
3856fi
3857CAT=$ac_cv_path_CAT
3858if test -n "$CAT"; then
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3860$as_echo "$CAT" >&6; }
3861else
3862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3863$as_echo "no" >&6; }
3864fi
3865
3866
3867  test -n "$CAT" && break
3868done
3869
3870
3871    if test "x$CAT" = x; then
3872        if test "xcat" = x; then
3873          PROG_NAME=cat
3874        else
3875          PROG_NAME=cat
3876        fi
3877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3879        as_fn_error $? "Cannot continue" "$LINENO" 5
3880    fi
3881
3882
3883
3884    for ac_prog in chmod
3885do
3886  # Extract the first word of "$ac_prog", so it can be a program name with args.
3887set dummy $ac_prog; ac_word=$2
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889$as_echo_n "checking for $ac_word... " >&6; }
3890if test "${ac_cv_path_CHMOD+set}" = set; then :
3891  $as_echo_n "(cached) " >&6
3892else
3893  case $CHMOD in
3894  [\\/]* | ?:[\\/]*)
3895  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3896  ;;
3897  *)
3898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899for as_dir in $PATH
3900do
3901  IFS=$as_save_IFS
3902  test -z "$as_dir" && as_dir=.
3903    for ac_exec_ext in '' $ac_executable_extensions; do
3904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3905    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907    break 2
3908  fi
3909done
3910  done
3911IFS=$as_save_IFS
3912
3913  ;;
3914esac
3915fi
3916CHMOD=$ac_cv_path_CHMOD
3917if test -n "$CHMOD"; then
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3919$as_echo "$CHMOD" >&6; }
3920else
3921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922$as_echo "no" >&6; }
3923fi
3924
3925
3926  test -n "$CHMOD" && break
3927done
3928
3929
3930    if test "x$CHMOD" = x; then
3931        if test "xchmod" = x; then
3932          PROG_NAME=chmod
3933        else
3934          PROG_NAME=chmod
3935        fi
3936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3938        as_fn_error $? "Cannot continue" "$LINENO" 5
3939    fi
3940
3941
3942
3943    for ac_prog in cmp
3944do
3945  # Extract the first word of "$ac_prog", so it can be a program name with args.
3946set dummy $ac_prog; ac_word=$2
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948$as_echo_n "checking for $ac_word... " >&6; }
3949if test "${ac_cv_path_CMP+set}" = set; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  case $CMP in
3953  [\\/]* | ?:[\\/]*)
3954  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3955  ;;
3956  *)
3957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH
3959do
3960  IFS=$as_save_IFS
3961  test -z "$as_dir" && as_dir=.
3962    for ac_exec_ext in '' $ac_executable_extensions; do
3963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3964    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3966    break 2
3967  fi
3968done
3969  done
3970IFS=$as_save_IFS
3971
3972  ;;
3973esac
3974fi
3975CMP=$ac_cv_path_CMP
3976if test -n "$CMP"; then
3977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3978$as_echo "$CMP" >&6; }
3979else
3980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982fi
3983
3984
3985  test -n "$CMP" && break
3986done
3987
3988
3989    if test "x$CMP" = x; then
3990        if test "xcmp" = x; then
3991          PROG_NAME=cmp
3992        else
3993          PROG_NAME=cmp
3994        fi
3995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3997        as_fn_error $? "Cannot continue" "$LINENO" 5
3998    fi
3999
4000
4001
4002    for ac_prog in cp
4003do
4004  # Extract the first word of "$ac_prog", so it can be a program name with args.
4005set dummy $ac_prog; ac_word=$2
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4007$as_echo_n "checking for $ac_word... " >&6; }
4008if test "${ac_cv_path_CP+set}" = set; then :
4009  $as_echo_n "(cached) " >&6
4010else
4011  case $CP in
4012  [\\/]* | ?:[\\/]*)
4013  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4014  ;;
4015  *)
4016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019  IFS=$as_save_IFS
4020  test -z "$as_dir" && as_dir=.
4021    for ac_exec_ext in '' $ac_executable_extensions; do
4022  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4023    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025    break 2
4026  fi
4027done
4028  done
4029IFS=$as_save_IFS
4030
4031  ;;
4032esac
4033fi
4034CP=$ac_cv_path_CP
4035if test -n "$CP"; then
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4037$as_echo "$CP" >&6; }
4038else
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041fi
4042
4043
4044  test -n "$CP" && break
4045done
4046
4047
4048    if test "x$CP" = x; then
4049        if test "xcp" = x; then
4050          PROG_NAME=cp
4051        else
4052          PROG_NAME=cp
4053        fi
4054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4055$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4056        as_fn_error $? "Cannot continue" "$LINENO" 5
4057    fi
4058
4059
4060
4061    for ac_prog in cut
4062do
4063  # Extract the first word of "$ac_prog", so it can be a program name with args.
4064set dummy $ac_prog; ac_word=$2
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
4067if test "${ac_cv_path_CUT+set}" = set; then :
4068  $as_echo_n "(cached) " >&6
4069else
4070  case $CUT in
4071  [\\/]* | ?:[\\/]*)
4072  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4073  ;;
4074  *)
4075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in $PATH
4077do
4078  IFS=$as_save_IFS
4079  test -z "$as_dir" && as_dir=.
4080    for ac_exec_ext in '' $ac_executable_extensions; do
4081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4082    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4084    break 2
4085  fi
4086done
4087  done
4088IFS=$as_save_IFS
4089
4090  ;;
4091esac
4092fi
4093CUT=$ac_cv_path_CUT
4094if test -n "$CUT"; then
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4096$as_echo "$CUT" >&6; }
4097else
4098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
4103  test -n "$CUT" && break
4104done
4105
4106
4107    if test "x$CUT" = x; then
4108        if test "xcut" = x; then
4109          PROG_NAME=cut
4110        else
4111          PROG_NAME=cut
4112        fi
4113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4115        as_fn_error $? "Cannot continue" "$LINENO" 5
4116    fi
4117
4118
4119
4120    for ac_prog in date
4121do
4122  # Extract the first word of "$ac_prog", so it can be a program name with args.
4123set dummy $ac_prog; ac_word=$2
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4125$as_echo_n "checking for $ac_word... " >&6; }
4126if test "${ac_cv_path_DATE+set}" = set; then :
4127  $as_echo_n "(cached) " >&6
4128else
4129  case $DATE in
4130  [\\/]* | ?:[\\/]*)
4131  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4132  ;;
4133  *)
4134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135for as_dir in $PATH
4136do
4137  IFS=$as_save_IFS
4138  test -z "$as_dir" && as_dir=.
4139    for ac_exec_ext in '' $ac_executable_extensions; do
4140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4141    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4143    break 2
4144  fi
4145done
4146  done
4147IFS=$as_save_IFS
4148
4149  ;;
4150esac
4151fi
4152DATE=$ac_cv_path_DATE
4153if test -n "$DATE"; then
4154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4155$as_echo "$DATE" >&6; }
4156else
4157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4158$as_echo "no" >&6; }
4159fi
4160
4161
4162  test -n "$DATE" && break
4163done
4164
4165
4166    if test "x$DATE" = x; then
4167        if test "xdate" = x; then
4168          PROG_NAME=date
4169        else
4170          PROG_NAME=date
4171        fi
4172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4174        as_fn_error $? "Cannot continue" "$LINENO" 5
4175    fi
4176
4177
4178
4179    for ac_prog in gdiff diff
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4184$as_echo_n "checking for $ac_word... " >&6; }
4185if test "${ac_cv_path_DIFF+set}" = set; then :
4186  $as_echo_n "(cached) " >&6
4187else
4188  case $DIFF in
4189  [\\/]* | ?:[\\/]*)
4190  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4191  ;;
4192  *)
4193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196  IFS=$as_save_IFS
4197  test -z "$as_dir" && as_dir=.
4198    for ac_exec_ext in '' $ac_executable_extensions; do
4199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4200    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202    break 2
4203  fi
4204done
4205  done
4206IFS=$as_save_IFS
4207
4208  ;;
4209esac
4210fi
4211DIFF=$ac_cv_path_DIFF
4212if test -n "$DIFF"; then
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4214$as_echo "$DIFF" >&6; }
4215else
4216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
4219
4220
4221  test -n "$DIFF" && break
4222done
4223
4224
4225    if test "x$DIFF" = x; then
4226        if test "xgdiff diff" = x; then
4227          PROG_NAME=diff
4228        else
4229          PROG_NAME=gdiff diff
4230        fi
4231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4233        as_fn_error $? "Cannot continue" "$LINENO" 5
4234    fi
4235
4236
4237
4238    for ac_prog in dirname
4239do
4240  # Extract the first word of "$ac_prog", so it can be a program name with args.
4241set dummy $ac_prog; ac_word=$2
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243$as_echo_n "checking for $ac_word... " >&6; }
4244if test "${ac_cv_path_DIRNAME+set}" = set; then :
4245  $as_echo_n "(cached) " >&6
4246else
4247  case $DIRNAME in
4248  [\\/]* | ?:[\\/]*)
4249  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4250  ;;
4251  *)
4252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255  IFS=$as_save_IFS
4256  test -z "$as_dir" && as_dir=.
4257    for ac_exec_ext in '' $ac_executable_extensions; do
4258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4261    break 2
4262  fi
4263done
4264  done
4265IFS=$as_save_IFS
4266
4267  ;;
4268esac
4269fi
4270DIRNAME=$ac_cv_path_DIRNAME
4271if test -n "$DIRNAME"; then
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4273$as_echo "$DIRNAME" >&6; }
4274else
4275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4276$as_echo "no" >&6; }
4277fi
4278
4279
4280  test -n "$DIRNAME" && break
4281done
4282
4283
4284    if test "x$DIRNAME" = x; then
4285        if test "xdirname" = x; then
4286          PROG_NAME=dirname
4287        else
4288          PROG_NAME=dirname
4289        fi
4290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4292        as_fn_error $? "Cannot continue" "$LINENO" 5
4293    fi
4294
4295
4296
4297    for ac_prog in echo
4298do
4299  # Extract the first word of "$ac_prog", so it can be a program name with args.
4300set dummy $ac_prog; ac_word=$2
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4302$as_echo_n "checking for $ac_word... " >&6; }
4303if test "${ac_cv_path_ECHO+set}" = set; then :
4304  $as_echo_n "(cached) " >&6
4305else
4306  case $ECHO in
4307  [\\/]* | ?:[\\/]*)
4308  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4309  ;;
4310  *)
4311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314  IFS=$as_save_IFS
4315  test -z "$as_dir" && as_dir=.
4316    for ac_exec_ext in '' $ac_executable_extensions; do
4317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4318    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4320    break 2
4321  fi
4322done
4323  done
4324IFS=$as_save_IFS
4325
4326  ;;
4327esac
4328fi
4329ECHO=$ac_cv_path_ECHO
4330if test -n "$ECHO"; then
4331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4332$as_echo "$ECHO" >&6; }
4333else
4334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335$as_echo "no" >&6; }
4336fi
4337
4338
4339  test -n "$ECHO" && break
4340done
4341
4342
4343    if test "x$ECHO" = x; then
4344        if test "xecho" = x; then
4345          PROG_NAME=echo
4346        else
4347          PROG_NAME=echo
4348        fi
4349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4351        as_fn_error $? "Cannot continue" "$LINENO" 5
4352    fi
4353
4354
4355
4356    for ac_prog in expr
4357do
4358  # Extract the first word of "$ac_prog", so it can be a program name with args.
4359set dummy $ac_prog; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if test "${ac_cv_path_EXPR+set}" = set; then :
4363  $as_echo_n "(cached) " >&6
4364else
4365  case $EXPR in
4366  [\\/]* | ?:[\\/]*)
4367  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4368  ;;
4369  *)
4370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373  IFS=$as_save_IFS
4374  test -z "$as_dir" && as_dir=.
4375    for ac_exec_ext in '' $ac_executable_extensions; do
4376  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4377    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379    break 2
4380  fi
4381done
4382  done
4383IFS=$as_save_IFS
4384
4385  ;;
4386esac
4387fi
4388EXPR=$ac_cv_path_EXPR
4389if test -n "$EXPR"; then
4390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4391$as_echo "$EXPR" >&6; }
4392else
4393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397
4398  test -n "$EXPR" && break
4399done
4400
4401
4402    if test "x$EXPR" = x; then
4403        if test "xexpr" = x; then
4404          PROG_NAME=expr
4405        else
4406          PROG_NAME=expr
4407        fi
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4409$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4410        as_fn_error $? "Cannot continue" "$LINENO" 5
4411    fi
4412
4413
4414
4415    for ac_prog in file
4416do
4417  # Extract the first word of "$ac_prog", so it can be a program name with args.
4418set dummy $ac_prog; ac_word=$2
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4420$as_echo_n "checking for $ac_word... " >&6; }
4421if test "${ac_cv_path_FILE+set}" = set; then :
4422  $as_echo_n "(cached) " >&6
4423else
4424  case $FILE in
4425  [\\/]* | ?:[\\/]*)
4426  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4427  ;;
4428  *)
4429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432  IFS=$as_save_IFS
4433  test -z "$as_dir" && as_dir=.
4434    for ac_exec_ext in '' $ac_executable_extensions; do
4435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4436    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4438    break 2
4439  fi
4440done
4441  done
4442IFS=$as_save_IFS
4443
4444  ;;
4445esac
4446fi
4447FILE=$ac_cv_path_FILE
4448if test -n "$FILE"; then
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4450$as_echo "$FILE" >&6; }
4451else
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4453$as_echo "no" >&6; }
4454fi
4455
4456
4457  test -n "$FILE" && break
4458done
4459
4460
4461    if test "x$FILE" = x; then
4462        if test "xfile" = x; then
4463          PROG_NAME=file
4464        else
4465          PROG_NAME=file
4466        fi
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4468$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4469        as_fn_error $? "Cannot continue" "$LINENO" 5
4470    fi
4471
4472
4473
4474    for ac_prog in find
4475do
4476  # Extract the first word of "$ac_prog", so it can be a program name with args.
4477set dummy $ac_prog; ac_word=$2
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
4480if test "${ac_cv_path_FIND+set}" = set; then :
4481  $as_echo_n "(cached) " >&6
4482else
4483  case $FIND in
4484  [\\/]* | ?:[\\/]*)
4485  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4486  ;;
4487  *)
4488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in $PATH
4490do
4491  IFS=$as_save_IFS
4492  test -z "$as_dir" && as_dir=.
4493    for ac_exec_ext in '' $ac_executable_extensions; do
4494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4495    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497    break 2
4498  fi
4499done
4500  done
4501IFS=$as_save_IFS
4502
4503  ;;
4504esac
4505fi
4506FIND=$ac_cv_path_FIND
4507if test -n "$FIND"; then
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4509$as_echo "$FIND" >&6; }
4510else
4511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515
4516  test -n "$FIND" && break
4517done
4518
4519
4520    if test "x$FIND" = x; then
4521        if test "xfind" = x; then
4522          PROG_NAME=find
4523        else
4524          PROG_NAME=find
4525        fi
4526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4528        as_fn_error $? "Cannot continue" "$LINENO" 5
4529    fi
4530
4531
4532
4533    for ac_prog in head
4534do
4535  # Extract the first word of "$ac_prog", so it can be a program name with args.
4536set dummy $ac_prog; ac_word=$2
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538$as_echo_n "checking for $ac_word... " >&6; }
4539if test "${ac_cv_path_HEAD+set}" = set; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  case $HEAD in
4543  [\\/]* | ?:[\\/]*)
4544  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4545  ;;
4546  *)
4547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550  IFS=$as_save_IFS
4551  test -z "$as_dir" && as_dir=.
4552    for ac_exec_ext in '' $ac_executable_extensions; do
4553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4554    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4556    break 2
4557  fi
4558done
4559  done
4560IFS=$as_save_IFS
4561
4562  ;;
4563esac
4564fi
4565HEAD=$ac_cv_path_HEAD
4566if test -n "$HEAD"; then
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4568$as_echo "$HEAD" >&6; }
4569else
4570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
4572fi
4573
4574
4575  test -n "$HEAD" && break
4576done
4577
4578
4579    if test "x$HEAD" = x; then
4580        if test "xhead" = x; then
4581          PROG_NAME=head
4582        else
4583          PROG_NAME=head
4584        fi
4585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4587        as_fn_error $? "Cannot continue" "$LINENO" 5
4588    fi
4589
4590
4591
4592    for ac_prog in ln
4593do
4594  # Extract the first word of "$ac_prog", so it can be a program name with args.
4595set dummy $ac_prog; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if test "${ac_cv_path_LN+set}" = set; then :
4599  $as_echo_n "(cached) " >&6
4600else
4601  case $LN in
4602  [\\/]* | ?:[\\/]*)
4603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4604  ;;
4605  *)
4606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609  IFS=$as_save_IFS
4610  test -z "$as_dir" && as_dir=.
4611    for ac_exec_ext in '' $ac_executable_extensions; do
4612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615    break 2
4616  fi
4617done
4618  done
4619IFS=$as_save_IFS
4620
4621  ;;
4622esac
4623fi
4624LN=$ac_cv_path_LN
4625if test -n "$LN"; then
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4627$as_echo "$LN" >&6; }
4628else
4629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633
4634  test -n "$LN" && break
4635done
4636
4637
4638    if test "x$LN" = x; then
4639        if test "xln" = x; then
4640          PROG_NAME=ln
4641        else
4642          PROG_NAME=ln
4643        fi
4644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4645$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4646        as_fn_error $? "Cannot continue" "$LINENO" 5
4647    fi
4648
4649
4650
4651    for ac_prog in ls
4652do
4653  # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if test "${ac_cv_path_LS+set}" = set; then :
4658  $as_echo_n "(cached) " >&6
4659else
4660  case $LS in
4661  [\\/]* | ?:[\\/]*)
4662  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4663  ;;
4664  *)
4665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4666for as_dir in $PATH
4667do
4668  IFS=$as_save_IFS
4669  test -z "$as_dir" && as_dir=.
4670    for ac_exec_ext in '' $ac_executable_extensions; do
4671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4672    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4674    break 2
4675  fi
4676done
4677  done
4678IFS=$as_save_IFS
4679
4680  ;;
4681esac
4682fi
4683LS=$ac_cv_path_LS
4684if test -n "$LS"; then
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4686$as_echo "$LS" >&6; }
4687else
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4689$as_echo "no" >&6; }
4690fi
4691
4692
4693  test -n "$LS" && break
4694done
4695
4696
4697    if test "x$LS" = x; then
4698        if test "xls" = x; then
4699          PROG_NAME=ls
4700        else
4701          PROG_NAME=ls
4702        fi
4703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4705        as_fn_error $? "Cannot continue" "$LINENO" 5
4706    fi
4707
4708
4709
4710    for ac_prog in mkdir
4711do
4712  # Extract the first word of "$ac_prog", so it can be a program name with args.
4713set dummy $ac_prog; ac_word=$2
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
4716if test "${ac_cv_path_MKDIR+set}" = set; then :
4717  $as_echo_n "(cached) " >&6
4718else
4719  case $MKDIR in
4720  [\\/]* | ?:[\\/]*)
4721  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4722  ;;
4723  *)
4724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in $PATH
4726do
4727  IFS=$as_save_IFS
4728  test -z "$as_dir" && as_dir=.
4729    for ac_exec_ext in '' $ac_executable_extensions; do
4730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4731    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733    break 2
4734  fi
4735done
4736  done
4737IFS=$as_save_IFS
4738
4739  ;;
4740esac
4741fi
4742MKDIR=$ac_cv_path_MKDIR
4743if test -n "$MKDIR"; then
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4745$as_echo "$MKDIR" >&6; }
4746else
4747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751
4752  test -n "$MKDIR" && break
4753done
4754
4755
4756    if test "x$MKDIR" = x; then
4757        if test "xmkdir" = x; then
4758          PROG_NAME=mkdir
4759        else
4760          PROG_NAME=mkdir
4761        fi
4762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4763$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4764        as_fn_error $? "Cannot continue" "$LINENO" 5
4765    fi
4766
4767
4768
4769    for ac_prog in mktemp
4770do
4771  # Extract the first word of "$ac_prog", so it can be a program name with args.
4772set dummy $ac_prog; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
4775if test "${ac_cv_path_MKTEMP+set}" = set; then :
4776  $as_echo_n "(cached) " >&6
4777else
4778  case $MKTEMP in
4779  [\\/]* | ?:[\\/]*)
4780  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4781  ;;
4782  *)
4783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786  IFS=$as_save_IFS
4787  test -z "$as_dir" && as_dir=.
4788    for ac_exec_ext in '' $ac_executable_extensions; do
4789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4790    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792    break 2
4793  fi
4794done
4795  done
4796IFS=$as_save_IFS
4797
4798  ;;
4799esac
4800fi
4801MKTEMP=$ac_cv_path_MKTEMP
4802if test -n "$MKTEMP"; then
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4804$as_echo "$MKTEMP" >&6; }
4805else
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811  test -n "$MKTEMP" && break
4812done
4813
4814
4815    if test "x$MKTEMP" = x; then
4816        if test "xmktemp" = x; then
4817          PROG_NAME=mktemp
4818        else
4819          PROG_NAME=mktemp
4820        fi
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4822$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4823        as_fn_error $? "Cannot continue" "$LINENO" 5
4824    fi
4825
4826
4827
4828    for ac_prog in mv
4829do
4830  # Extract the first word of "$ac_prog", so it can be a program name with args.
4831set dummy $ac_prog; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if test "${ac_cv_path_MV+set}" = set; then :
4835  $as_echo_n "(cached) " >&6
4836else
4837  case $MV in
4838  [\\/]* | ?:[\\/]*)
4839  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4840  ;;
4841  *)
4842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in $PATH
4844do
4845  IFS=$as_save_IFS
4846  test -z "$as_dir" && as_dir=.
4847    for ac_exec_ext in '' $ac_executable_extensions; do
4848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4849    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851    break 2
4852  fi
4853done
4854  done
4855IFS=$as_save_IFS
4856
4857  ;;
4858esac
4859fi
4860MV=$ac_cv_path_MV
4861if test -n "$MV"; then
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4863$as_echo "$MV" >&6; }
4864else
4865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
4869
4870  test -n "$MV" && break
4871done
4872
4873
4874    if test "x$MV" = x; then
4875        if test "xmv" = x; then
4876          PROG_NAME=mv
4877        else
4878          PROG_NAME=mv
4879        fi
4880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4882        as_fn_error $? "Cannot continue" "$LINENO" 5
4883    fi
4884
4885
4886
4887    for ac_prog in printf
4888do
4889  # Extract the first word of "$ac_prog", so it can be a program name with args.
4890set dummy $ac_prog; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
4893if test "${ac_cv_path_PRINTF+set}" = set; then :
4894  $as_echo_n "(cached) " >&6
4895else
4896  case $PRINTF in
4897  [\\/]* | ?:[\\/]*)
4898  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4899  ;;
4900  *)
4901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in $PATH
4903do
4904  IFS=$as_save_IFS
4905  test -z "$as_dir" && as_dir=.
4906    for ac_exec_ext in '' $ac_executable_extensions; do
4907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4908    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910    break 2
4911  fi
4912done
4913  done
4914IFS=$as_save_IFS
4915
4916  ;;
4917esac
4918fi
4919PRINTF=$ac_cv_path_PRINTF
4920if test -n "$PRINTF"; then
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4922$as_echo "$PRINTF" >&6; }
4923else
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925$as_echo "no" >&6; }
4926fi
4927
4928
4929  test -n "$PRINTF" && break
4930done
4931
4932
4933    if test "x$PRINTF" = x; then
4934        if test "xprintf" = x; then
4935          PROG_NAME=printf
4936        else
4937          PROG_NAME=printf
4938        fi
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4941        as_fn_error $? "Cannot continue" "$LINENO" 5
4942    fi
4943
4944
4945
4946    for ac_prog in pwd
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $THEPWDCMD in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978THEPWDCMD=$ac_cv_path_THEPWDCMD
4979if test -n "$THEPWDCMD"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4981$as_echo "$THEPWDCMD" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$THEPWDCMD" && break
4989done
4990
4991
4992    if test "x$THEPWDCMD" = x; then
4993        if test "xpwd" = x; then
4994          PROG_NAME=thepwdcmd
4995        else
4996          PROG_NAME=pwd
4997        fi
4998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5000        as_fn_error $? "Cannot continue" "$LINENO" 5
5001    fi
5002
5003
5004
5005    for ac_prog in rm
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if test "${ac_cv_path_RM+set}" = set; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $RM in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037RM=$ac_cv_path_RM
5038if test -n "$RM"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5040$as_echo "$RM" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$RM" && break
5048done
5049
5050
5051    if test "x$RM" = x; then
5052        if test "xrm" = x; then
5053          PROG_NAME=rm
5054        else
5055          PROG_NAME=rm
5056        fi
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5059        as_fn_error $? "Cannot continue" "$LINENO" 5
5060    fi
5061
5062
5063
5064    for ac_prog in sh
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if test "${ac_cv_path_SH+set}" = set; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $SH in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096SH=$ac_cv_path_SH
5097if test -n "$SH"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5099$as_echo "$SH" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$SH" && break
5107done
5108
5109
5110    if test "x$SH" = x; then
5111        if test "xsh" = x; then
5112          PROG_NAME=sh
5113        else
5114          PROG_NAME=sh
5115        fi
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5118        as_fn_error $? "Cannot continue" "$LINENO" 5
5119    fi
5120
5121
5122
5123    for ac_prog in sort
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if test "${ac_cv_path_SORT+set}" = set; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $SORT in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155SORT=$ac_cv_path_SORT
5156if test -n "$SORT"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5158$as_echo "$SORT" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$SORT" && break
5166done
5167
5168
5169    if test "x$SORT" = x; then
5170        if test "xsort" = x; then
5171          PROG_NAME=sort
5172        else
5173          PROG_NAME=sort
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5176$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5177        as_fn_error $? "Cannot continue" "$LINENO" 5
5178    fi
5179
5180
5181
5182    for ac_prog in tail
5183do
5184  # Extract the first word of "$ac_prog", so it can be a program name with args.
5185set dummy $ac_prog; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5187$as_echo_n "checking for $ac_word... " >&6; }
5188if test "${ac_cv_path_TAIL+set}" = set; then :
5189  $as_echo_n "(cached) " >&6
5190else
5191  case $TAIL in
5192  [\\/]* | ?:[\\/]*)
5193  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5194  ;;
5195  *)
5196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5197for as_dir in $PATH
5198do
5199  IFS=$as_save_IFS
5200  test -z "$as_dir" && as_dir=.
5201    for ac_exec_ext in '' $ac_executable_extensions; do
5202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5203    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5205    break 2
5206  fi
5207done
5208  done
5209IFS=$as_save_IFS
5210
5211  ;;
5212esac
5213fi
5214TAIL=$ac_cv_path_TAIL
5215if test -n "$TAIL"; then
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5217$as_echo "$TAIL" >&6; }
5218else
5219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220$as_echo "no" >&6; }
5221fi
5222
5223
5224  test -n "$TAIL" && break
5225done
5226
5227
5228    if test "x$TAIL" = x; then
5229        if test "xtail" = x; then
5230          PROG_NAME=tail
5231        else
5232          PROG_NAME=tail
5233        fi
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5235$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5236        as_fn_error $? "Cannot continue" "$LINENO" 5
5237    fi
5238
5239
5240
5241    for ac_prog in tar
5242do
5243  # Extract the first word of "$ac_prog", so it can be a program name with args.
5244set dummy $ac_prog; ac_word=$2
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5246$as_echo_n "checking for $ac_word... " >&6; }
5247if test "${ac_cv_path_TAR+set}" = set; then :
5248  $as_echo_n "(cached) " >&6
5249else
5250  case $TAR in
5251  [\\/]* | ?:[\\/]*)
5252  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5253  ;;
5254  *)
5255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
5258  IFS=$as_save_IFS
5259  test -z "$as_dir" && as_dir=.
5260    for ac_exec_ext in '' $ac_executable_extensions; do
5261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5262    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264    break 2
5265  fi
5266done
5267  done
5268IFS=$as_save_IFS
5269
5270  ;;
5271esac
5272fi
5273TAR=$ac_cv_path_TAR
5274if test -n "$TAR"; then
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5276$as_echo "$TAR" >&6; }
5277else
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5279$as_echo "no" >&6; }
5280fi
5281
5282
5283  test -n "$TAR" && break
5284done
5285
5286
5287    if test "x$TAR" = x; then
5288        if test "xtar" = x; then
5289          PROG_NAME=tar
5290        else
5291          PROG_NAME=tar
5292        fi
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5294$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5295        as_fn_error $? "Cannot continue" "$LINENO" 5
5296    fi
5297
5298
5299
5300    for ac_prog in tee
5301do
5302  # Extract the first word of "$ac_prog", so it can be a program name with args.
5303set dummy $ac_prog; ac_word=$2
5304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5305$as_echo_n "checking for $ac_word... " >&6; }
5306if test "${ac_cv_path_TEE+set}" = set; then :
5307  $as_echo_n "(cached) " >&6
5308else
5309  case $TEE in
5310  [\\/]* | ?:[\\/]*)
5311  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5312  ;;
5313  *)
5314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317  IFS=$as_save_IFS
5318  test -z "$as_dir" && as_dir=.
5319    for ac_exec_ext in '' $ac_executable_extensions; do
5320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5321    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5323    break 2
5324  fi
5325done
5326  done
5327IFS=$as_save_IFS
5328
5329  ;;
5330esac
5331fi
5332TEE=$ac_cv_path_TEE
5333if test -n "$TEE"; then
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5335$as_echo "$TEE" >&6; }
5336else
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340
5341
5342  test -n "$TEE" && break
5343done
5344
5345
5346    if test "x$TEE" = x; then
5347        if test "xtee" = x; then
5348          PROG_NAME=tee
5349        else
5350          PROG_NAME=tee
5351        fi
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5353$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5354        as_fn_error $? "Cannot continue" "$LINENO" 5
5355    fi
5356
5357
5358
5359    for ac_prog in touch
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if test "${ac_cv_path_TOUCH+set}" = set; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $TOUCH in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5380    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391TOUCH=$ac_cv_path_TOUCH
5392if test -n "$TOUCH"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5394$as_echo "$TOUCH" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$TOUCH" && break
5402done
5403
5404
5405    if test "x$TOUCH" = x; then
5406        if test "xtouch" = x; then
5407          PROG_NAME=touch
5408        else
5409          PROG_NAME=touch
5410        fi
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5412$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5413        as_fn_error $? "Cannot continue" "$LINENO" 5
5414    fi
5415
5416
5417
5418    for ac_prog in tr
5419do
5420  # Extract the first word of "$ac_prog", so it can be a program name with args.
5421set dummy $ac_prog; ac_word=$2
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5423$as_echo_n "checking for $ac_word... " >&6; }
5424if test "${ac_cv_path_TR+set}" = set; then :
5425  $as_echo_n "(cached) " >&6
5426else
5427  case $TR in
5428  [\\/]* | ?:[\\/]*)
5429  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5430  ;;
5431  *)
5432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435  IFS=$as_save_IFS
5436  test -z "$as_dir" && as_dir=.
5437    for ac_exec_ext in '' $ac_executable_extensions; do
5438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441    break 2
5442  fi
5443done
5444  done
5445IFS=$as_save_IFS
5446
5447  ;;
5448esac
5449fi
5450TR=$ac_cv_path_TR
5451if test -n "$TR"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5453$as_echo "$TR" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460  test -n "$TR" && break
5461done
5462
5463
5464    if test "x$TR" = x; then
5465        if test "xtr" = x; then
5466          PROG_NAME=tr
5467        else
5468          PROG_NAME=tr
5469        fi
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5471$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5472        as_fn_error $? "Cannot continue" "$LINENO" 5
5473    fi
5474
5475
5476
5477    for ac_prog in uname
5478do
5479  # Extract the first word of "$ac_prog", so it can be a program name with args.
5480set dummy $ac_prog; ac_word=$2
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482$as_echo_n "checking for $ac_word... " >&6; }
5483if test "${ac_cv_path_UNAME+set}" = set; then :
5484  $as_echo_n "(cached) " >&6
5485else
5486  case $UNAME in
5487  [\\/]* | ?:[\\/]*)
5488  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5489  ;;
5490  *)
5491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494  IFS=$as_save_IFS
5495  test -z "$as_dir" && as_dir=.
5496    for ac_exec_ext in '' $ac_executable_extensions; do
5497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5498    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500    break 2
5501  fi
5502done
5503  done
5504IFS=$as_save_IFS
5505
5506  ;;
5507esac
5508fi
5509UNAME=$ac_cv_path_UNAME
5510if test -n "$UNAME"; then
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5512$as_echo "$UNAME" >&6; }
5513else
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519  test -n "$UNAME" && break
5520done
5521
5522
5523    if test "x$UNAME" = x; then
5524        if test "xuname" = x; then
5525          PROG_NAME=uname
5526        else
5527          PROG_NAME=uname
5528        fi
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5530$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5531        as_fn_error $? "Cannot continue" "$LINENO" 5
5532    fi
5533
5534
5535
5536    for ac_prog in uniq
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if test "${ac_cv_path_UNIQ+set}" = set; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $UNIQ in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5557    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568UNIQ=$ac_cv_path_UNIQ
5569if test -n "$UNIQ"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5571$as_echo "$UNIQ" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$UNIQ" && break
5579done
5580
5581
5582    if test "x$UNIQ" = x; then
5583        if test "xuniq" = x; then
5584          PROG_NAME=uniq
5585        else
5586          PROG_NAME=uniq
5587        fi
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5589$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5590        as_fn_error $? "Cannot continue" "$LINENO" 5
5591    fi
5592
5593
5594
5595    for ac_prog in wc
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if test "${ac_cv_path_WC+set}" = set; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $WC in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5616    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627WC=$ac_cv_path_WC
5628if test -n "$WC"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5630$as_echo "$WC" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$WC" && break
5638done
5639
5640
5641    if test "x$WC" = x; then
5642        if test "xwc" = x; then
5643          PROG_NAME=wc
5644        else
5645          PROG_NAME=wc
5646        fi
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5648$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5649        as_fn_error $? "Cannot continue" "$LINENO" 5
5650    fi
5651
5652
5653
5654    for ac_prog in which
5655do
5656  # Extract the first word of "$ac_prog", so it can be a program name with args.
5657set dummy $ac_prog; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if test "${ac_cv_path_WHICH+set}" = set; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $WHICH in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5675    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686WHICH=$ac_cv_path_WHICH
5687if test -n "$WHICH"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5689$as_echo "$WHICH" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$WHICH" && break
5697done
5698
5699
5700    if test "x$WHICH" = x; then
5701        if test "xwhich" = x; then
5702          PROG_NAME=which
5703        else
5704          PROG_NAME=which
5705        fi
5706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5707$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5708        as_fn_error $? "Cannot continue" "$LINENO" 5
5709    fi
5710
5711
5712
5713    for ac_prog in xargs
5714do
5715  # Extract the first word of "$ac_prog", so it can be a program name with args.
5716set dummy $ac_prog; ac_word=$2
5717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5718$as_echo_n "checking for $ac_word... " >&6; }
5719if test "${ac_cv_path_XARGS+set}" = set; then :
5720  $as_echo_n "(cached) " >&6
5721else
5722  case $XARGS in
5723  [\\/]* | ?:[\\/]*)
5724  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5725  ;;
5726  *)
5727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730  IFS=$as_save_IFS
5731  test -z "$as_dir" && as_dir=.
5732    for ac_exec_ext in '' $ac_executable_extensions; do
5733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5734    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736    break 2
5737  fi
5738done
5739  done
5740IFS=$as_save_IFS
5741
5742  ;;
5743esac
5744fi
5745XARGS=$ac_cv_path_XARGS
5746if test -n "$XARGS"; then
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5748$as_echo "$XARGS" >&6; }
5749else
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5751$as_echo "no" >&6; }
5752fi
5753
5754
5755  test -n "$XARGS" && break
5756done
5757
5758
5759    if test "x$XARGS" = x; then
5760        if test "xxargs" = x; then
5761          PROG_NAME=xargs
5762        else
5763          PROG_NAME=xargs
5764        fi
5765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5766$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5767        as_fn_error $? "Cannot continue" "$LINENO" 5
5768    fi
5769
5770
5771
5772# Then required tools that require some special treatment.
5773for ac_prog in gawk mawk nawk awk
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if test "${ac_cv_prog_AWK+set}" = set; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  if test -n "$AWK"; then
5783  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5784else
5785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5786for as_dir in $PATH
5787do
5788  IFS=$as_save_IFS
5789  test -z "$as_dir" && as_dir=.
5790    for ac_exec_ext in '' $ac_executable_extensions; do
5791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5792    ac_cv_prog_AWK="$ac_prog"
5793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5794    break 2
5795  fi
5796done
5797  done
5798IFS=$as_save_IFS
5799
5800fi
5801fi
5802AWK=$ac_cv_prog_AWK
5803if test -n "$AWK"; then
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5805$as_echo "$AWK" >&6; }
5806else
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809fi
5810
5811
5812  test -n "$AWK" && break
5813done
5814
5815
5816    if test "x$AWK" = x; then
5817        if test "x" = x; then
5818          PROG_NAME=awk
5819        else
5820          PROG_NAME=
5821        fi
5822        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5823$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5824        as_fn_error $? "Cannot continue" "$LINENO" 5
5825    fi
5826
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5828$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5829if test "${ac_cv_path_GREP+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  if test -z "$GREP"; then
5833  ac_path_GREP_found=false
5834  # Loop through the user's path and test for each of PROGNAME-LIST
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_prog in grep ggrep; do
5841    for ac_exec_ext in '' $ac_executable_extensions; do
5842      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5843      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5844# Check for GNU ac_path_GREP and select it if it is found.
5845  # Check for GNU $ac_path_GREP
5846case `"$ac_path_GREP" --version 2>&1` in
5847*GNU*)
5848  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5849*)
5850  ac_count=0
5851  $as_echo_n 0123456789 >"conftest.in"
5852  while :
5853  do
5854    cat "conftest.in" "conftest.in" >"conftest.tmp"
5855    mv "conftest.tmp" "conftest.in"
5856    cp "conftest.in" "conftest.nl"
5857    $as_echo 'GREP' >> "conftest.nl"
5858    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5859    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5860    as_fn_arith $ac_count + 1 && ac_count=$as_val
5861    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5862      # Best one so far, save it but keep looking for a better one
5863      ac_cv_path_GREP="$ac_path_GREP"
5864      ac_path_GREP_max=$ac_count
5865    fi
5866    # 10*(2^10) chars as input seems more than enough
5867    test $ac_count -gt 10 && break
5868  done
5869  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5870esac
5871
5872      $ac_path_GREP_found && break 3
5873    done
5874  done
5875  done
5876IFS=$as_save_IFS
5877  if test -z "$ac_cv_path_GREP"; then
5878    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5879  fi
5880else
5881  ac_cv_path_GREP=$GREP
5882fi
5883
5884fi
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5886$as_echo "$ac_cv_path_GREP" >&6; }
5887 GREP="$ac_cv_path_GREP"
5888
5889
5890
5891    if test "x$GREP" = x; then
5892        if test "x" = x; then
5893          PROG_NAME=grep
5894        else
5895          PROG_NAME=
5896        fi
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5898$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5899        as_fn_error $? "Cannot continue" "$LINENO" 5
5900    fi
5901
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5903$as_echo_n "checking for egrep... " >&6; }
5904if test "${ac_cv_path_EGREP+set}" = set; then :
5905  $as_echo_n "(cached) " >&6
5906else
5907  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5908   then ac_cv_path_EGREP="$GREP -E"
5909   else
5910     if test -z "$EGREP"; then
5911  ac_path_EGREP_found=false
5912  # Loop through the user's path and test for each of PROGNAME-LIST
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_prog in egrep; do
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5921      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5922# Check for GNU ac_path_EGREP and select it if it is found.
5923  # Check for GNU $ac_path_EGREP
5924case `"$ac_path_EGREP" --version 2>&1` in
5925*GNU*)
5926  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5927*)
5928  ac_count=0
5929  $as_echo_n 0123456789 >"conftest.in"
5930  while :
5931  do
5932    cat "conftest.in" "conftest.in" >"conftest.tmp"
5933    mv "conftest.tmp" "conftest.in"
5934    cp "conftest.in" "conftest.nl"
5935    $as_echo 'EGREP' >> "conftest.nl"
5936    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5937    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5938    as_fn_arith $ac_count + 1 && ac_count=$as_val
5939    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5940      # Best one so far, save it but keep looking for a better one
5941      ac_cv_path_EGREP="$ac_path_EGREP"
5942      ac_path_EGREP_max=$ac_count
5943    fi
5944    # 10*(2^10) chars as input seems more than enough
5945    test $ac_count -gt 10 && break
5946  done
5947  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5948esac
5949
5950      $ac_path_EGREP_found && break 3
5951    done
5952  done
5953  done
5954IFS=$as_save_IFS
5955  if test -z "$ac_cv_path_EGREP"; then
5956    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5957  fi
5958else
5959  ac_cv_path_EGREP=$EGREP
5960fi
5961
5962   fi
5963fi
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5965$as_echo "$ac_cv_path_EGREP" >&6; }
5966 EGREP="$ac_cv_path_EGREP"
5967
5968
5969
5970    if test "x$EGREP" = x; then
5971        if test "x" = x; then
5972          PROG_NAME=egrep
5973        else
5974          PROG_NAME=
5975        fi
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5977$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5978        as_fn_error $? "Cannot continue" "$LINENO" 5
5979    fi
5980
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5982$as_echo_n "checking for fgrep... " >&6; }
5983if test "${ac_cv_path_FGREP+set}" = set; then :
5984  $as_echo_n "(cached) " >&6
5985else
5986  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5987   then ac_cv_path_FGREP="$GREP -F"
5988   else
5989     if test -z "$FGREP"; then
5990  ac_path_FGREP_found=false
5991  # Loop through the user's path and test for each of PROGNAME-LIST
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_prog in fgrep; do
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6000      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6001# Check for GNU ac_path_FGREP and select it if it is found.
6002  # Check for GNU $ac_path_FGREP
6003case `"$ac_path_FGREP" --version 2>&1` in
6004*GNU*)
6005  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6006*)
6007  ac_count=0
6008  $as_echo_n 0123456789 >"conftest.in"
6009  while :
6010  do
6011    cat "conftest.in" "conftest.in" >"conftest.tmp"
6012    mv "conftest.tmp" "conftest.in"
6013    cp "conftest.in" "conftest.nl"
6014    $as_echo 'FGREP' >> "conftest.nl"
6015    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6016    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6017    as_fn_arith $ac_count + 1 && ac_count=$as_val
6018    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6019      # Best one so far, save it but keep looking for a better one
6020      ac_cv_path_FGREP="$ac_path_FGREP"
6021      ac_path_FGREP_max=$ac_count
6022    fi
6023    # 10*(2^10) chars as input seems more than enough
6024    test $ac_count -gt 10 && break
6025  done
6026  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6027esac
6028
6029      $ac_path_FGREP_found && break 3
6030    done
6031  done
6032  done
6033IFS=$as_save_IFS
6034  if test -z "$ac_cv_path_FGREP"; then
6035    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6036  fi
6037else
6038  ac_cv_path_FGREP=$FGREP
6039fi
6040
6041   fi
6042fi
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6044$as_echo "$ac_cv_path_FGREP" >&6; }
6045 FGREP="$ac_cv_path_FGREP"
6046
6047
6048
6049    if test "x$FGREP" = x; then
6050        if test "x" = x; then
6051          PROG_NAME=fgrep
6052        else
6053          PROG_NAME=
6054        fi
6055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6056$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6057        as_fn_error $? "Cannot continue" "$LINENO" 5
6058    fi
6059
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6061$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6062if test "${ac_cv_path_SED+set}" = set; then :
6063  $as_echo_n "(cached) " >&6
6064else
6065            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6066     for ac_i in 1 2 3 4 5 6 7; do
6067       ac_script="$ac_script$as_nl$ac_script"
6068     done
6069     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6070     { ac_script=; unset ac_script;}
6071     if test -z "$SED"; then
6072  ac_path_SED_found=false
6073  # Loop through the user's path and test for each of PROGNAME-LIST
6074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077  IFS=$as_save_IFS
6078  test -z "$as_dir" && as_dir=.
6079    for ac_prog in sed gsed; do
6080    for ac_exec_ext in '' $ac_executable_extensions; do
6081      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6082      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6083# Check for GNU ac_path_SED and select it if it is found.
6084  # Check for GNU $ac_path_SED
6085case `"$ac_path_SED" --version 2>&1` in
6086*GNU*)
6087  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6088*)
6089  ac_count=0
6090  $as_echo_n 0123456789 >"conftest.in"
6091  while :
6092  do
6093    cat "conftest.in" "conftest.in" >"conftest.tmp"
6094    mv "conftest.tmp" "conftest.in"
6095    cp "conftest.in" "conftest.nl"
6096    $as_echo '' >> "conftest.nl"
6097    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6098    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6099    as_fn_arith $ac_count + 1 && ac_count=$as_val
6100    if test $ac_count -gt ${ac_path_SED_max-0}; then
6101      # Best one so far, save it but keep looking for a better one
6102      ac_cv_path_SED="$ac_path_SED"
6103      ac_path_SED_max=$ac_count
6104    fi
6105    # 10*(2^10) chars as input seems more than enough
6106    test $ac_count -gt 10 && break
6107  done
6108  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6109esac
6110
6111      $ac_path_SED_found && break 3
6112    done
6113  done
6114  done
6115IFS=$as_save_IFS
6116  if test -z "$ac_cv_path_SED"; then
6117    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6118  fi
6119else
6120  ac_cv_path_SED=$SED
6121fi
6122
6123fi
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6125$as_echo "$ac_cv_path_SED" >&6; }
6126 SED="$ac_cv_path_SED"
6127  rm -f conftest.sed
6128
6129
6130    if test "x$SED" = x; then
6131        if test "x" = x; then
6132          PROG_NAME=sed
6133        else
6134          PROG_NAME=
6135        fi
6136        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6137$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6138        as_fn_error $? "Cannot continue" "$LINENO" 5
6139    fi
6140
6141
6142for ac_prog in nawk gawk awk
6143do
6144  # Extract the first word of "$ac_prog", so it can be a program name with args.
6145set dummy $ac_prog; ac_word=$2
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6147$as_echo_n "checking for $ac_word... " >&6; }
6148if test "${ac_cv_path_NAWK+set}" = set; then :
6149  $as_echo_n "(cached) " >&6
6150else
6151  case $NAWK in
6152  [\\/]* | ?:[\\/]*)
6153  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6154  ;;
6155  *)
6156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159  IFS=$as_save_IFS
6160  test -z "$as_dir" && as_dir=.
6161    for ac_exec_ext in '' $ac_executable_extensions; do
6162  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6163    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165    break 2
6166  fi
6167done
6168  done
6169IFS=$as_save_IFS
6170
6171  ;;
6172esac
6173fi
6174NAWK=$ac_cv_path_NAWK
6175if test -n "$NAWK"; then
6176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6177$as_echo "$NAWK" >&6; }
6178else
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180$as_echo "no" >&6; }
6181fi
6182
6183
6184  test -n "$NAWK" && break
6185done
6186
6187
6188    if test "x$NAWK" = x; then
6189        if test "x" = x; then
6190          PROG_NAME=nawk
6191        else
6192          PROG_NAME=
6193        fi
6194        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6196        as_fn_error $? "Cannot continue" "$LINENO" 5
6197    fi
6198
6199
6200# Always force rm.
6201RM="$RM -f"
6202
6203# These are not required on all platforms
6204# Extract the first word of "cygpath", so it can be a program name with args.
6205set dummy cygpath; ac_word=$2
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6207$as_echo_n "checking for $ac_word... " >&6; }
6208if test "${ac_cv_path_CYGPATH+set}" = set; then :
6209  $as_echo_n "(cached) " >&6
6210else
6211  case $CYGPATH in
6212  [\\/]* | ?:[\\/]*)
6213  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6214  ;;
6215  *)
6216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217for as_dir in $PATH
6218do
6219  IFS=$as_save_IFS
6220  test -z "$as_dir" && as_dir=.
6221    for ac_exec_ext in '' $ac_executable_extensions; do
6222  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6223    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6225    break 2
6226  fi
6227done
6228  done
6229IFS=$as_save_IFS
6230
6231  ;;
6232esac
6233fi
6234CYGPATH=$ac_cv_path_CYGPATH
6235if test -n "$CYGPATH"; then
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6237$as_echo "$CYGPATH" >&6; }
6238else
6239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6240$as_echo "no" >&6; }
6241fi
6242
6243
6244# Extract the first word of "readlink", so it can be a program name with args.
6245set dummy readlink; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if test "${ac_cv_path_READLINK+set}" = set; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $READLINK in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6263    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274READLINK=$ac_cv_path_READLINK
6275if test -n "$READLINK"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6277$as_echo "$READLINK" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284# Extract the first word of "df", so it can be a program name with args.
6285set dummy df; ac_word=$2
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6287$as_echo_n "checking for $ac_word... " >&6; }
6288if test "${ac_cv_path_DF+set}" = set; then :
6289  $as_echo_n "(cached) " >&6
6290else
6291  case $DF in
6292  [\\/]* | ?:[\\/]*)
6293  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6294  ;;
6295  *)
6296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299  IFS=$as_save_IFS
6300  test -z "$as_dir" && as_dir=.
6301    for ac_exec_ext in '' $ac_executable_extensions; do
6302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6303    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305    break 2
6306  fi
6307done
6308  done
6309IFS=$as_save_IFS
6310
6311  ;;
6312esac
6313fi
6314DF=$ac_cv_path_DF
6315if test -n "$DF"; then
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6317$as_echo "$DF" >&6; }
6318else
6319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320$as_echo "no" >&6; }
6321fi
6322
6323
6324# Extract the first word of "SetFile", so it can be a program name with args.
6325set dummy SetFile; ac_word=$2
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6327$as_echo_n "checking for $ac_word... " >&6; }
6328if test "${ac_cv_path_SETFILE+set}" = set; then :
6329  $as_echo_n "(cached) " >&6
6330else
6331  case $SETFILE in
6332  [\\/]* | ?:[\\/]*)
6333  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6334  ;;
6335  *)
6336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6337for as_dir in $PATH
6338do
6339  IFS=$as_save_IFS
6340  test -z "$as_dir" && as_dir=.
6341    for ac_exec_ext in '' $ac_executable_extensions; do
6342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6343    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6345    break 2
6346  fi
6347done
6348  done
6349IFS=$as_save_IFS
6350
6351  ;;
6352esac
6353fi
6354SETFILE=$ac_cv_path_SETFILE
6355if test -n "$SETFILE"; then
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6357$as_echo "$SETFILE" >&6; }
6358else
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360$as_echo "no" >&6; }
6361fi
6362
6363
6364
6365
6366# Now we can determine OpenJDK build and target platforms. This is required to
6367# have early on.
6368# Make sure we can run config.sub.
6369$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6370  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6371
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6373$as_echo_n "checking build system type... " >&6; }
6374if test "${ac_cv_build+set}" = set; then :
6375  $as_echo_n "(cached) " >&6
6376else
6377  ac_build_alias=$build_alias
6378test "x$ac_build_alias" = x &&
6379  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6380test "x$ac_build_alias" = x &&
6381  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6382ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6383  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6384
6385fi
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6387$as_echo "$ac_cv_build" >&6; }
6388case $ac_cv_build in
6389*-*-*) ;;
6390*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6391esac
6392build=$ac_cv_build
6393ac_save_IFS=$IFS; IFS='-'
6394set x $ac_cv_build
6395shift
6396build_cpu=$1
6397build_vendor=$2
6398shift; shift
6399# Remember, the first character of IFS is used to create $*,
6400# except with old shells:
6401build_os=$*
6402IFS=$ac_save_IFS
6403case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6404
6405
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6407$as_echo_n "checking host system type... " >&6; }
6408if test "${ac_cv_host+set}" = set; then :
6409  $as_echo_n "(cached) " >&6
6410else
6411  if test "x$host_alias" = x; then
6412  ac_cv_host=$ac_cv_build
6413else
6414  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6415    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6416fi
6417
6418fi
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6420$as_echo "$ac_cv_host" >&6; }
6421case $ac_cv_host in
6422*-*-*) ;;
6423*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6424esac
6425host=$ac_cv_host
6426ac_save_IFS=$IFS; IFS='-'
6427set x $ac_cv_host
6428shift
6429host_cpu=$1
6430host_vendor=$2
6431shift; shift
6432# Remember, the first character of IFS is used to create $*,
6433# except with old shells:
6434host_os=$*
6435IFS=$ac_save_IFS
6436case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6437
6438
6439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6440$as_echo_n "checking target system type... " >&6; }
6441if test "${ac_cv_target+set}" = set; then :
6442  $as_echo_n "(cached) " >&6
6443else
6444  if test "x$target_alias" = x; then
6445  ac_cv_target=$ac_cv_host
6446else
6447  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6448    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6449fi
6450
6451fi
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6453$as_echo "$ac_cv_target" >&6; }
6454case $ac_cv_target in
6455*-*-*) ;;
6456*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6457esac
6458target=$ac_cv_target
6459ac_save_IFS=$IFS; IFS='-'
6460set x $ac_cv_target
6461shift
6462target_cpu=$1
6463target_vendor=$2
6464shift; shift
6465# Remember, the first character of IFS is used to create $*,
6466# except with old shells:
6467target_os=$*
6468IFS=$ac_save_IFS
6469case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6470
6471
6472# The aliases save the names the user supplied, while $host etc.
6473# will get canonicalized.
6474test -n "$target_alias" &&
6475  test "$program_prefix$program_suffix$program_transform_name" = \
6476    NONENONEs,x,x, &&
6477  program_prefix=${target_alias}-
6478
6479# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6480# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6481# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6482# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6483# to use the configure naming style.
6484
6485
6486
6487
6488
6489    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6490    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6491    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6492    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6493    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6494    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6495
6496
6497
6498    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6499
6500  case "$build_os" in
6501    *linux*)
6502      VAR_OS=linux
6503      VAR_OS_API=posix
6504      VAR_OS_ENV=linux
6505      ;;
6506    *solaris*)
6507      VAR_OS=solaris
6508      VAR_OS_API=posix
6509      VAR_OS_ENV=solaris
6510      ;;
6511    *darwin*)
6512      VAR_OS=macosx
6513      VAR_OS_API=posix
6514      VAR_OS_ENV=macosx
6515      ;;
6516    *bsd*)
6517      VAR_OS=bsd
6518      VAR_OS_API=posix
6519      VAR_OS_ENV=bsd
6520      ;;
6521    *cygwin*)
6522      VAR_OS=windows
6523      VAR_OS_API=winapi
6524      VAR_OS_ENV=windows.cygwin
6525      ;;
6526    *mingw*)
6527      VAR_OS=windows
6528      VAR_OS_API=winapi
6529      VAR_OS_ENV=windows.msys
6530      ;;
6531    *)
6532      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6533      ;;
6534  esac
6535
6536
6537  # First argument is the cpu name from the trip/quad
6538  case "$build_cpu" in
6539    x86_64)
6540      VAR_CPU=x86_64
6541      VAR_CPU_ARCH=x86
6542      VAR_CPU_BITS=64
6543      VAR_CPU_ENDIAN=little
6544      ;;
6545    i?86)
6546      VAR_CPU=x86
6547      VAR_CPU_ARCH=x86
6548      VAR_CPU_BITS=32
6549      VAR_CPU_ENDIAN=little
6550      ;;
6551    arm*)
6552      VAR_CPU=arm
6553      VAR_CPU_ARCH=arm
6554      VAR_CPU_BITS=32
6555      VAR_CPU_ENDIAN=little
6556      ;;
6557    powerpc)
6558      VAR_CPU=ppc
6559      VAR_CPU_ARCH=ppc
6560      VAR_CPU_BITS=32
6561      VAR_CPU_ENDIAN=big
6562       ;;
6563    powerpc64)
6564      VAR_CPU=ppc64
6565      VAR_CPU_ARCH=ppc
6566      VAR_CPU_BITS=64
6567      VAR_CPU_ENDIAN=big
6568       ;;
6569    sparc)
6570      VAR_CPU=sparc
6571      VAR_CPU_ARCH=sparc
6572      VAR_CPU_BITS=32
6573      VAR_CPU_ENDIAN=big
6574       ;;
6575    sparcv9)
6576      VAR_CPU=sparcv9
6577      VAR_CPU_ARCH=sparc
6578      VAR_CPU_BITS=64
6579      VAR_CPU_ENDIAN=big
6580       ;;
6581    *)
6582      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6583      ;;
6584  esac
6585
6586    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6587    OPENJDK_BUILD_OS="$VAR_OS"
6588    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6589    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6590    OPENJDK_BUILD_CPU="$VAR_CPU"
6591    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6592    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6593    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6594
6595
6596
6597
6598
6599
6600
6601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6602$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6604$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6605
6606    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6607
6608  case "$host_os" in
6609    *linux*)
6610      VAR_OS=linux
6611      VAR_OS_API=posix
6612      VAR_OS_ENV=linux
6613      ;;
6614    *solaris*)
6615      VAR_OS=solaris
6616      VAR_OS_API=posix
6617      VAR_OS_ENV=solaris
6618      ;;
6619    *darwin*)
6620      VAR_OS=macosx
6621      VAR_OS_API=posix
6622      VAR_OS_ENV=macosx
6623      ;;
6624    *bsd*)
6625      VAR_OS=bsd
6626      VAR_OS_API=posix
6627      VAR_OS_ENV=bsd
6628      ;;
6629    *cygwin*)
6630      VAR_OS=windows
6631      VAR_OS_API=winapi
6632      VAR_OS_ENV=windows.cygwin
6633      ;;
6634    *mingw*)
6635      VAR_OS=windows
6636      VAR_OS_API=winapi
6637      VAR_OS_ENV=windows.msys
6638      ;;
6639    *)
6640      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6641      ;;
6642  esac
6643
6644
6645  # First argument is the cpu name from the trip/quad
6646  case "$host_cpu" in
6647    x86_64)
6648      VAR_CPU=x86_64
6649      VAR_CPU_ARCH=x86
6650      VAR_CPU_BITS=64
6651      VAR_CPU_ENDIAN=little
6652      ;;
6653    i?86)
6654      VAR_CPU=x86
6655      VAR_CPU_ARCH=x86
6656      VAR_CPU_BITS=32
6657      VAR_CPU_ENDIAN=little
6658      ;;
6659    arm*)
6660      VAR_CPU=arm
6661      VAR_CPU_ARCH=arm
6662      VAR_CPU_BITS=32
6663      VAR_CPU_ENDIAN=little
6664      ;;
6665    powerpc)
6666      VAR_CPU=ppc
6667      VAR_CPU_ARCH=ppc
6668      VAR_CPU_BITS=32
6669      VAR_CPU_ENDIAN=big
6670       ;;
6671    powerpc64)
6672      VAR_CPU=ppc64
6673      VAR_CPU_ARCH=ppc
6674      VAR_CPU_BITS=64
6675      VAR_CPU_ENDIAN=big
6676       ;;
6677    sparc)
6678      VAR_CPU=sparc
6679      VAR_CPU_ARCH=sparc
6680      VAR_CPU_BITS=32
6681      VAR_CPU_ENDIAN=big
6682       ;;
6683    sparcv9)
6684      VAR_CPU=sparcv9
6685      VAR_CPU_ARCH=sparc
6686      VAR_CPU_BITS=64
6687      VAR_CPU_ENDIAN=big
6688       ;;
6689    *)
6690      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6691      ;;
6692  esac
6693
6694    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6695    OPENJDK_TARGET_OS="$VAR_OS"
6696    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6697    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6698    OPENJDK_TARGET_CPU="$VAR_CPU"
6699    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6700    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6701    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6702
6703
6704
6705
6706
6707
6708
6709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6710$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6712$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6713
6714
6715
6716# Check whether --with-target-bits was given.
6717if test "${with_target_bits+set}" = set; then :
6718  withval=$with_target_bits;
6719fi
6720
6721
6722  # We have three types of compiles:
6723  # native  == normal compilation, target system == build system
6724  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6725  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6726  #
6727  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6728    # We're doing a proper cross-compilation
6729    COMPILE_TYPE="cross"
6730  else
6731    COMPILE_TYPE="native"
6732  fi
6733
6734  if test "x$with_target_bits" != x; then
6735    if test "x$COMPILE_TYPE" = "xcross"; then
6736      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6737    fi
6738
6739    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6740      # A reduced build is requested
6741      COMPILE_TYPE="reduced"
6742      OPENJDK_TARGET_CPU_BITS=32
6743      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6744        OPENJDK_TARGET_CPU=x86
6745      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6746        OPENJDK_TARGET_CPU=sparc
6747      else
6748        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6749      fi
6750    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6751      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
6752    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6753      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6754$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6755    else
6756      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6757    fi
6758  fi
6759
6760
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6762$as_echo_n "checking compilation type... " >&6; }
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6764$as_echo "$COMPILE_TYPE" >&6; }
6765
6766
6767    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6768       REQUIRED_OS_NAME=SunOS
6769       REQUIRED_OS_VERSION=5.10
6770    fi
6771    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6772       REQUIRED_OS_NAME=Linux
6773       REQUIRED_OS_VERSION=2.6
6774    fi
6775    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6776        REQUIRED_OS_NAME=Windows
6777        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6778            REQUIRED_OS_VERSION=5.2
6779        else
6780            REQUIRED_OS_VERSION=5.1
6781        fi
6782    fi
6783    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6784        REQUIRED_OS_NAME=Darwin
6785        REQUIRED_OS_VERSION=11.2
6786    fi
6787
6788
6789
6790
6791
6792    # Also store the legacy naming of the cpu.
6793    # Ie i586 and amd64 instead of x86 and x86_64
6794    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6795    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6796      OPENJDK_TARGET_CPU_LEGACY="i586"
6797    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6798      # On all platforms except MacOSX replace x86_64 with amd64.
6799      OPENJDK_TARGET_CPU_LEGACY="amd64"
6800    fi
6801
6802
6803    # And the second legacy naming of the cpu.
6804    # Ie i386 and amd64 instead of x86 and x86_64.
6805    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6806    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6807      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6808    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6809      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6810    fi
6811
6812
6813    # This is the name of the cpu (but using i386 and amd64 instead of
6814    # x86 and x86_64, respectively), preceeded by a /, to be used when
6815    # locating libraries. On macosx, it's empty, though.
6816    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6817    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6818        OPENJDK_TARGET_CPU_LIBDIR=""
6819    fi
6820
6821
6822    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6823    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6824    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6825    OPENJDK_TARGET_CPU_ISADIR=""
6826    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6827      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6828          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6829      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6830          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6831      fi
6832    fi
6833
6834
6835    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6836    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6837    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6838      # On linux only, we replace x86 with i386.
6839      OPENJDK_TARGET_CPU_OSARCH="i386"
6840    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6841      # On all platforms except macosx, we replace x86_64 with amd64.
6842      OPENJDK_TARGET_CPU_OSARCH="amd64"
6843    fi
6844
6845
6846    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6847    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6848      OPENJDK_TARGET_CPU_JLI="i386"
6849    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6850      # On all platforms except macosx, we replace x86_64 with amd64.
6851      OPENJDK_TARGET_CPU_JLI="amd64"
6852    fi
6853    # Now setup the -D flags for building libjli.
6854    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6855    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6856      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6857        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6858      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6859        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6860      fi
6861    fi
6862
6863
6864    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6865    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6866        OPENJDK_TARGET_OS_API_DIR="solaris"
6867    fi
6868    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6869        OPENJDK_TARGET_OS_API_DIR="windows"
6870    fi
6871
6872
6873    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6874        A_LP64="LP64:="
6875        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6876        # unpack200.exe
6877        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6878            ADD_LP64="-D_LP64=1"
6879        fi
6880    fi
6881    LP64=$A_LP64
6882
6883
6884    if test "x$COMPILE_TYPE" = "xcross"; then
6885      # FIXME: ... or should this include reduced builds..?
6886      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6887    else
6888      DEFINE_CROSS_COMPILE_ARCH=""
6889    fi
6890
6891
6892
6893
6894# Continue setting up basic stuff. Most remaining code require fundamental tools.
6895
6896# Locate the directory of this script.
6897SCRIPT="$0"
6898
6899    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6900        # Follow a chain of symbolic links. Use readlink
6901        # where it exists, else fall back to horribly
6902        # complicated shell code.
6903        if test "x$READLINK_TESTED" != yes; then
6904            # On MacOSX there is a readlink tool with a different
6905            # purpose than the GNU readlink tool. Check the found readlink.
6906            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
6907            if test "x$ISGNU" = x; then
6908                 # A readlink that we do not know how to use.
6909                 # Are there other non-GNU readlinks out there?
6910                 READLINK_TESTED=yes
6911                 READLINK=
6912            fi
6913        fi
6914
6915        if test "x$READLINK" != x; then
6916            SCRIPT=`$READLINK -f $SCRIPT`
6917        else
6918            # Save the current directory for restoring afterwards
6919            STARTDIR=$PWD
6920            COUNTER=0
6921            sym_link_dir=`$DIRNAME $SCRIPT`
6922            sym_link_file=`$BASENAME $SCRIPT`
6923            # Use the system pwd and not the shell builtin to resolve directory symlinks
6924            cd $sym_link_dir
6925            cd `$THEPWDCMD`
6926            sym_link_dir=`$THEPWDCMD`
6927            # Resolve file symlinks
6928            while test $COUNTER -lt 20; do
6929                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6930                if test "x$ISLINK" == x; then
6931                    # This is not a symbolic link! We are done!
6932                    break
6933                fi
6934                # Again resolve directory symlinks since the target of the just found
6935                # link could be in a different directory
6936                cd `$DIRNAME $ISLINK`
6937                sym_link_dir=`$THEPWDCMD`
6938                sym_link_file=`$BASENAME $ISLINK`
6939                let COUNTER=COUNTER+1
6940            done
6941            cd $STARTDIR
6942            SCRIPT=$sym_link_dir/$sym_link_file
6943        fi
6944    fi
6945
6946AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6947
6948# Where is the source? It is located two levels above the configure script.
6949CURDIR="$PWD"
6950cd "$AUTOCONF_DIR/../.."
6951SRC_ROOT="`$THEPWDCMD`"
6952
6953if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6954  PATH_SEP=";"
6955
6956  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6957  if test $SRC_ROOT_LENGTH -gt 100; then
6958      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6959  fi
6960
6961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6963$as_echo_n "checking cygwin release... " >&6; }
6964    CYGWIN_VERSION=`$UNAME -r`
6965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6966$as_echo "$CYGWIN_VERSION" >&6; }
6967    WINDOWS_ENV_VENDOR='cygwin'
6968    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6969
6970    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6971    if test "x$CYGWIN_VERSION_OK" = x; then
6972      { $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
6973$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;}
6974      as_fn_error $? "Cannot continue" "$LINENO" 5
6975    fi
6976    if test "x$CYGPATH" = x; then
6977        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6978    fi
6979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6980$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6981    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6982    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6983    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6984    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6986$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6987    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6988    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6989    if test "x$test_cygdrive_prefix" = x; then
6990        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6991    fi
6992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6994$as_echo_n "checking msys release... " >&6; }
6995    MSYS_VERSION=`$UNAME -r`
6996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6997$as_echo "$MSYS_VERSION" >&6; }
6998
6999    WINDOWS_ENV_VENDOR='msys'
7000    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7001
7002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7003$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7004    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7005    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7006
7007  windows_path="$MSYS_ROOT_PATH"
7008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7009    unix_path=`$CYGPATH -u "$windows_path"`
7010    MSYS_ROOT_PATH="$unix_path"
7011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7013    MSYS_ROOT_PATH="$unix_path"
7014  fi
7015
7016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7017$as_echo "$MSYS_ROOT_PATH" >&6; }
7018    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7019  else
7020    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7021  fi
7022
7023  # Test if windows or unix (cygwin/msys) find is first in path.
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7025$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7026  FIND_BINARY_OUTPUT=`find --version 2>&1`
7027  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7029$as_echo "unix style" >&6; }
7030  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7032$as_echo "Windows" >&6; }
7033    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7034$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7035    { $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
7036$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7037    as_fn_error $? "Cannot continue" "$LINENO" 5
7038  else
7039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7040$as_echo "unknown" >&6; }
7041    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7042$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7043  fi
7044
7045else
7046  PATH_SEP=":"
7047fi
7048
7049
7050
7051cd "$CURDIR"
7052
7053
7054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7055
7056  # Input might be given as Windows format, start by converting to
7057  # unix format.
7058  path="$SRC_ROOT"
7059  new_path=`$CYGPATH -u "$path"`
7060
7061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7064  # "foo.exe" is OK but "foo" is an error.
7065  #
7066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7067  # It is also a way to make sure we got the proper file name for the real test later on.
7068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7069  if test "x$test_shortpath" = x; then
7070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7071$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7072    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7073  fi
7074
7075  # Call helper function which possibly converts this using DOS-style short mode.
7076  # If so, the updated path is stored in $new_path.
7077
7078  input_path="$new_path"
7079  # Check if we need to convert this using DOS-style short mode. If the path
7080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7081  # take no chances and rewrite it.
7082  # Note: m4 eats our [], so we need to use [ and ] instead.
7083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7084  if test "x$has_forbidden_chars" != x; then
7085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7089      # Going to short mode and back again did indeed matter. Since short mode is
7090      # case insensitive, let's make it lowercase to improve readability.
7091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7092      # Now convert it back to Unix-stile (cygpath)
7093      input_path=`$CYGPATH -u "$shortmode_path"`
7094      new_path="$input_path"
7095    fi
7096  fi
7097
7098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7099  if test "x$test_cygdrive_prefix" = x; then
7100    # As a simple fix, exclude /usr/bin since it's not a real path.
7101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7103      # a path prefixed by /cygdrive for fixpath to work.
7104      new_path="$CYGWIN_ROOT_PATH$input_path"
7105    fi
7106  fi
7107
7108
7109  if test "x$path" != "x$new_path"; then
7110    SRC_ROOT="$new_path"
7111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7112$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7113  fi
7114
7115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7116
7117  path="$SRC_ROOT"
7118  has_colon=`$ECHO $path | $GREP ^.:`
7119  new_path="$path"
7120  if test "x$has_colon" = x; then
7121    # Not in mixed or Windows style, start by that.
7122    new_path=`cmd //c echo $path`
7123  fi
7124
7125
7126  input_path="$new_path"
7127  # Check if we need to convert this using DOS-style short mode. If the path
7128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7129  # take no chances and rewrite it.
7130  # Note: m4 eats our [], so we need to use [ and ] instead.
7131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7132  if test "x$has_forbidden_chars" != x; then
7133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7135  fi
7136
7137
7138  windows_path="$new_path"
7139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7140    unix_path=`$CYGPATH -u "$windows_path"`
7141    new_path="$unix_path"
7142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7144    new_path="$unix_path"
7145  fi
7146
7147  if test "x$path" != "x$new_path"; then
7148    SRC_ROOT="$new_path"
7149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7150$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7151  fi
7152
7153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7155
7156  else
7157    # We're on a posix platform. Hooray! :)
7158    path="$SRC_ROOT"
7159
7160    if test ! -f "$path" && test ! -d "$path"; then
7161      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7162    fi
7163
7164    has_space=`$ECHO "$path" | $GREP " "`
7165    if test "x$has_space" != x; then
7166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7167$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7168      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7169    fi
7170  fi
7171
7172
7173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7174
7175  # Input might be given as Windows format, start by converting to
7176  # unix format.
7177  path="$CURDIR"
7178  new_path=`$CYGPATH -u "$path"`
7179
7180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7183  # "foo.exe" is OK but "foo" is an error.
7184  #
7185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7186  # It is also a way to make sure we got the proper file name for the real test later on.
7187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7188  if test "x$test_shortpath" = x; then
7189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7190$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7191    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7192  fi
7193
7194  # Call helper function which possibly converts this using DOS-style short mode.
7195  # If so, the updated path is stored in $new_path.
7196
7197  input_path="$new_path"
7198  # Check if we need to convert this using DOS-style short mode. If the path
7199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7200  # take no chances and rewrite it.
7201  # Note: m4 eats our [], so we need to use [ and ] instead.
7202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7203  if test "x$has_forbidden_chars" != x; then
7204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7208      # Going to short mode and back again did indeed matter. Since short mode is
7209      # case insensitive, let's make it lowercase to improve readability.
7210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7211      # Now convert it back to Unix-stile (cygpath)
7212      input_path=`$CYGPATH -u "$shortmode_path"`
7213      new_path="$input_path"
7214    fi
7215  fi
7216
7217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7218  if test "x$test_cygdrive_prefix" = x; then
7219    # As a simple fix, exclude /usr/bin since it's not a real path.
7220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7222      # a path prefixed by /cygdrive for fixpath to work.
7223      new_path="$CYGWIN_ROOT_PATH$input_path"
7224    fi
7225  fi
7226
7227
7228  if test "x$path" != "x$new_path"; then
7229    CURDIR="$new_path"
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7231$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7232  fi
7233
7234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7235
7236  path="$CURDIR"
7237  has_colon=`$ECHO $path | $GREP ^.:`
7238  new_path="$path"
7239  if test "x$has_colon" = x; then
7240    # Not in mixed or Windows style, start by that.
7241    new_path=`cmd //c echo $path`
7242  fi
7243
7244
7245  input_path="$new_path"
7246  # Check if we need to convert this using DOS-style short mode. If the path
7247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7248  # take no chances and rewrite it.
7249  # Note: m4 eats our [], so we need to use [ and ] instead.
7250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7251  if test "x$has_forbidden_chars" != x; then
7252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7254  fi
7255
7256
7257  windows_path="$new_path"
7258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7259    unix_path=`$CYGPATH -u "$windows_path"`
7260    new_path="$unix_path"
7261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7263    new_path="$unix_path"
7264  fi
7265
7266  if test "x$path" != "x$new_path"; then
7267    CURDIR="$new_path"
7268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7269$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7270  fi
7271
7272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7274
7275  else
7276    # We're on a posix platform. Hooray! :)
7277    path="$CURDIR"
7278
7279    if test ! -f "$path" && test ! -d "$path"; then
7280      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7281    fi
7282
7283    has_space=`$ECHO "$path" | $GREP " "`
7284    if test "x$has_space" != x; then
7285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7286$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7288    fi
7289  fi
7290
7291
7292if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7293    # Add extra search paths on solaris for utilities like ar and as etc...
7294    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7295fi
7296
7297# You can force the sys-root if the sys-root encoded into the cross compiler tools
7298# is not correct.
7299
7300# Check whether --with-sys-root was given.
7301if test "${with_sys_root+set}" = set; then :
7302  withval=$with_sys_root;
7303fi
7304
7305
7306if test "x$with_sys_root" != x; then
7307  SYS_ROOT=$with_sys_root
7308else
7309  SYS_ROOT=/
7310fi
7311
7312
7313
7314# Check whether --with-tools-dir was given.
7315if test "${with_tools_dir+set}" = set; then :
7316  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7317fi
7318
7319
7320
7321# Check whether --with-devkit was given.
7322if test "${with_devkit+set}" = set; then :
7323  withval=$with_devkit;
7324    if test "x$with_sys_root" != x; then
7325      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7326    fi
7327    if test "x$with_tools_dir" != x; then
7328      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7329    fi
7330    TOOLS_DIR=$with_devkit/bin
7331    SYS_ROOT=$with_devkit/$host_alias/libc
7332
7333fi
7334
7335
7336
7337
7338# Setup default logging of stdout and stderr to build.log in the output root.
7339BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7340BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7341BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7342
7343
7344
7345
7346
7347# These are needed to be able to create a configuration name (and thus the output directory)
7348
7349###############################################################################
7350#
7351# Check which variant of the JDK that we want to build.
7352# Currently we have:
7353#    normal:   standard edition
7354# but the custom make system may add other variants
7355#
7356# Effectively the JDK variant gives a name to a specific set of
7357# modules to compile into the JDK. In the future, these modules
7358# might even be Jigsaw modules.
7359#
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7361$as_echo_n "checking which variant of the JDK to build... " >&6; }
7362
7363# Check whether --with-jdk-variant was given.
7364if test "${with_jdk_variant+set}" = set; then :
7365  withval=$with_jdk_variant;
7366fi
7367
7368
7369if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7370    JDK_VARIANT="normal"
7371else
7372    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7373fi
7374
7375
7376
7377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7378$as_echo "$JDK_VARIANT" >&6; }
7379
7380
7381
7382###############################################################################
7383#
7384# Check which variants of the JVM that we want to build.
7385# Currently we have:
7386#    server: normal interpreter and a tiered C1/C2 compiler
7387#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7388#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7389#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7390#    zero: no machine code interpreter, no compiler
7391#    zeroshark: zero interpreter and shark/llvm compiler backend
7392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7393$as_echo_n "checking which variants of the JVM to build... " >&6; }
7394
7395# Check whether --with-jvm-variants was given.
7396if test "${with_jvm_variants+set}" = set; then :
7397  withval=$with_jvm_variants;
7398fi
7399
7400
7401if test "x$with_jvm_variants" = x; then
7402     with_jvm_variants="server"
7403fi
7404
7405JVM_VARIANTS=",$with_jvm_variants,"
7406TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7407
7408if test "x$TEST_VARIANTS" != "x,"; then
7409   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7410fi
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7412$as_echo "$with_jvm_variants" >&6; }
7413
7414JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7415JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7416JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7417JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7418JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7419
7420if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7421    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7422        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7423    fi
7424fi
7425if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7426    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7427        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7428    fi
7429fi
7430
7431# Replace the commas with AND for use in the build directory name.
7432ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7433COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7434if test "x$COUNT_VARIANTS" != "x,1"; then
7435    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7436else
7437    BUILDING_MULTIPLE_JVM_VARIANTS=no
7438fi
7439
7440
7441
7442
7443
7444
7445
7446
7447if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7448   MACOSX_UNIVERSAL="true"
7449fi
7450
7451
7452
7453
7454
7455###############################################################################
7456#
7457# Set the debug level
7458#    release: no debug information, all optimizations, no asserts.
7459#    fastdebug: debug information (-g), all optimizations, all asserts
7460#    slowdebug: debug information (-g), no optimizations, all asserts
7461#
7462DEBUG_LEVEL="release"
7463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7464$as_echo_n "checking which debug level to use... " >&6; }
7465# Check whether --enable-debug was given.
7466if test "${enable_debug+set}" = set; then :
7467  enableval=$enable_debug;
7468        ENABLE_DEBUG="${enableval}"
7469        DEBUG_LEVEL="fastdebug"
7470
7471else
7472  ENABLE_DEBUG="no"
7473fi
7474
7475
7476
7477# Check whether --with-debug-level was given.
7478if test "${with_debug_level+set}" = set; then :
7479  withval=$with_debug_level;
7480        DEBUG_LEVEL="${withval}"
7481        if test "x$ENABLE_DEBUG" = xyes; then
7482			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7483        fi
7484
7485fi
7486
7487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7488$as_echo "$DEBUG_LEVEL" >&6; }
7489
7490if test "x$DEBUG_LEVEL" != xrelease && \
7491   test "x$DEBUG_LEVEL" != xfastdebug && \
7492   test "x$DEBUG_LEVEL" != xslowdebug; then
7493   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7494fi
7495
7496
7497###############################################################################
7498#
7499# Setup legacy vars/targets and new vars to deal with different debug levels.
7500#
7501
7502case $DEBUG_LEVEL in
7503      release )
7504          VARIANT="OPT"
7505          FASTDEBUG="false"
7506          DEBUG_CLASSFILES="false"
7507          BUILD_VARIANT_RELEASE=""
7508          HOTSPOT_DEBUG_LEVEL="product"
7509          HOTSPOT_EXPORT="product"
7510           ;;
7511      fastdebug )
7512          VARIANT="DBG"
7513          FASTDEBUG="true"
7514          DEBUG_CLASSFILES="true"
7515          BUILD_VARIANT_RELEASE="-fastdebug"
7516          HOTSPOT_DEBUG_LEVEL="fastdebug"
7517          HOTSPOT_EXPORT="fastdebug"
7518           ;;
7519      slowdebug )
7520          VARIANT="DBG"
7521          FASTDEBUG="false"
7522          DEBUG_CLASSFILES="true"
7523          BUILD_VARIANT_RELEASE="-debug"
7524          HOTSPOT_DEBUG_LEVEL="jvmg"
7525          HOTSPOT_EXPORT="debug"
7526           ;;
7527esac
7528
7529#####
7530# Generate the legacy makefile targets for hotspot.
7531# The hotspot api for selecting the build artifacts, really, needs to be improved.
7532#
7533HOTSPOT_TARGET=""
7534
7535if test "x$JVM_VARIANT_SERVER" = xtrue; then
7536    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7537fi
7538
7539if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7540    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7541fi
7542
7543if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7544    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7545fi
7546
7547if test "x$JVM_VARIANT_ZERO" = xtrue; then
7548    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7549fi
7550
7551if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7552    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7553fi
7554
7555HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7556
7557# On Macosx universal binaries are produced, but they only contain
7558# 64 bit intel. This invalidates control of which jvms are built
7559# from configure, but only server is valid anyway. Fix this
7560# when hotspot makefiles are rewritten.
7561if test "x$MACOSX_UNIVERSAL" = xtrue; then
7562    HOTSPOT_TARGET=universal_product
7563fi
7564
7565#####
7566
7567
7568
7569
7570
7571
7572
7573
7574# With basic setup done, call the custom early hook.
7575
7576
7577# To properly create a configuration name, we need to have the OpenJDK target
7578# and options (variants and debug level) parsed.
7579
7580
7581
7582# Check whether --with-conf-name was given.
7583if test "${with_conf_name+set}" = set; then :
7584  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7585fi
7586
7587
7588# Test from where we are running configure, in or outside of src root.
7589# To enable comparison of directories, CURDIR needs to be symlink free
7590# just like SRC_ROOT already is
7591NOSYM_CURDIR="$CURDIR"
7592
7593    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7594        # Follow a chain of symbolic links. Use readlink
7595        # where it exists, else fall back to horribly
7596        # complicated shell code.
7597        if test "x$READLINK_TESTED" != yes; then
7598            # On MacOSX there is a readlink tool with a different
7599            # purpose than the GNU readlink tool. Check the found readlink.
7600            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7601            if test "x$ISGNU" = x; then
7602                 # A readlink that we do not know how to use.
7603                 # Are there other non-GNU readlinks out there?
7604                 READLINK_TESTED=yes
7605                 READLINK=
7606            fi
7607        fi
7608
7609        if test "x$READLINK" != x; then
7610            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7611        else
7612            # Save the current directory for restoring afterwards
7613            STARTDIR=$PWD
7614            COUNTER=0
7615            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7616            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7617            # Use the system pwd and not the shell builtin to resolve directory symlinks
7618            cd $sym_link_dir
7619            cd `$THEPWDCMD`
7620            sym_link_dir=`$THEPWDCMD`
7621            # Resolve file symlinks
7622            while test $COUNTER -lt 20; do
7623                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7624                if test "x$ISLINK" == x; then
7625                    # This is not a symbolic link! We are done!
7626                    break
7627                fi
7628                # Again resolve directory symlinks since the target of the just found
7629                # link could be in a different directory
7630                cd `$DIRNAME $ISLINK`
7631                sym_link_dir=`$THEPWDCMD`
7632                sym_link_file=`$BASENAME $ISLINK`
7633                let COUNTER=COUNTER+1
7634            done
7635            cd $STARTDIR
7636            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7637        fi
7638    fi
7639
7640if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7641        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7642        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7643    # We are running configure from the src root.
7644    # Create a default ./build/target-variant-debuglevel output root.
7645    if test "x${CONF_NAME}" = x; then
7646        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7647    fi
7648    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7649    $MKDIR -p "$OUTPUT_ROOT"
7650    if test ! -d "$OUTPUT_ROOT"; then
7651        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7652    fi
7653else
7654    # We are running configure from outside of the src dir.
7655    # Then use the current directory as output dir!
7656    # If configuration is situated in normal build directory, just use the build
7657    # directory name as configuration name, otherwise use the complete path.
7658    if test "x${CONF_NAME}" = x; then
7659        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7660    fi
7661    OUTPUT_ROOT="$CURDIR"
7662
7663    # WARNING: This might be a bad thing to do. You need to be sure you want to
7664    # have a configuration in this directory. Do some sanity checks!
7665
7666    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7667      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7668      # other files
7669      files_present=`$LS $OUTPUT_ROOT`
7670      # Configure has already touched config.log and confdefs.h in the current dir when this check
7671      # is performed.
7672      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7673                                             | $TR -d '\n'`
7674      if test "x$filtered_files" != x; then
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7676$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7678$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7680$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7682$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7683        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7684$as_echo "$as_me: seriously mess up just about everything." >&6;}
7685        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7686$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7687        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7688$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7689        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7690      fi
7691    fi
7692fi
7693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7694$as_echo_n "checking what configuration name to use... " >&6; }
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7696$as_echo "$CONF_NAME" >&6; }
7697
7698
7699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7700
7701  # Input might be given as Windows format, start by converting to
7702  # unix format.
7703  path="$OUTPUT_ROOT"
7704  new_path=`$CYGPATH -u "$path"`
7705
7706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7709  # "foo.exe" is OK but "foo" is an error.
7710  #
7711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7712  # It is also a way to make sure we got the proper file name for the real test later on.
7713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7714  if test "x$test_shortpath" = x; then
7715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7716$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7717    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7718  fi
7719
7720  # Call helper function which possibly converts this using DOS-style short mode.
7721  # If so, the updated path is stored in $new_path.
7722
7723  input_path="$new_path"
7724  # Check if we need to convert this using DOS-style short mode. If the path
7725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7726  # take no chances and rewrite it.
7727  # Note: m4 eats our [], so we need to use [ and ] instead.
7728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7729  if test "x$has_forbidden_chars" != x; then
7730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7734      # Going to short mode and back again did indeed matter. Since short mode is
7735      # case insensitive, let's make it lowercase to improve readability.
7736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7737      # Now convert it back to Unix-stile (cygpath)
7738      input_path=`$CYGPATH -u "$shortmode_path"`
7739      new_path="$input_path"
7740    fi
7741  fi
7742
7743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7744  if test "x$test_cygdrive_prefix" = x; then
7745    # As a simple fix, exclude /usr/bin since it's not a real path.
7746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7748      # a path prefixed by /cygdrive for fixpath to work.
7749      new_path="$CYGWIN_ROOT_PATH$input_path"
7750    fi
7751  fi
7752
7753
7754  if test "x$path" != "x$new_path"; then
7755    OUTPUT_ROOT="$new_path"
7756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7757$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7758  fi
7759
7760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7761
7762  path="$OUTPUT_ROOT"
7763  has_colon=`$ECHO $path | $GREP ^.:`
7764  new_path="$path"
7765  if test "x$has_colon" = x; then
7766    # Not in mixed or Windows style, start by that.
7767    new_path=`cmd //c echo $path`
7768  fi
7769
7770
7771  input_path="$new_path"
7772  # Check if we need to convert this using DOS-style short mode. If the path
7773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7774  # take no chances and rewrite it.
7775  # Note: m4 eats our [], so we need to use [ and ] instead.
7776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7777  if test "x$has_forbidden_chars" != x; then
7778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7780  fi
7781
7782
7783  windows_path="$new_path"
7784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7785    unix_path=`$CYGPATH -u "$windows_path"`
7786    new_path="$unix_path"
7787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7789    new_path="$unix_path"
7790  fi
7791
7792  if test "x$path" != "x$new_path"; then
7793    OUTPUT_ROOT="$new_path"
7794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7795$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7796  fi
7797
7798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7800
7801  else
7802    # We're on a posix platform. Hooray! :)
7803    path="$OUTPUT_ROOT"
7804
7805    if test ! -f "$path" && test ! -d "$path"; then
7806      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7807    fi
7808
7809    has_space=`$ECHO "$path" | $GREP " "`
7810    if test "x$has_space" != x; then
7811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7812$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7813      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7814    fi
7815  fi
7816
7817
7818SPEC=$OUTPUT_ROOT/spec.gmk
7819
7820CONF_NAME=$CONF_NAME
7821
7822OUTPUT_ROOT=$OUTPUT_ROOT
7823
7824
7825# Most of the probed defines are put into config.h
7826ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7827
7828# The spec.gmk file contains all variables for the make system.
7829ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7830
7831# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7832ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7833
7834# The bootcycle-spec.gmk file contains support for boot cycle builds.
7835ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7836
7837# The compare.sh is used to compare the build output to other builds.
7838ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7839
7840# Spec.sh is currently used by compare-objects.sh
7841ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7842
7843# The generated Makefile knows where the spec.gmk is and where the source is.
7844# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7845# which will look for generated configurations
7846ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7847
7848
7849# Save the arguments given to us
7850echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7851
7852
7853# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7854
7855    for ac_prog in apt-get yum port pkgutil pkgadd
7856do
7857  # Extract the first word of "$ac_prog", so it can be a program name with args.
7858set dummy $ac_prog; ac_word=$2
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7860$as_echo_n "checking for $ac_word... " >&6; }
7861if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7862  $as_echo_n "(cached) " >&6
7863else
7864  if test -n "$PKGHANDLER"; then
7865  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7866else
7867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7868for as_dir in $PATH
7869do
7870  IFS=$as_save_IFS
7871  test -z "$as_dir" && as_dir=.
7872    for ac_exec_ext in '' $ac_executable_extensions; do
7873  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7874    ac_cv_prog_PKGHANDLER="$ac_prog"
7875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7876    break 2
7877  fi
7878done
7879  done
7880IFS=$as_save_IFS
7881
7882fi
7883fi
7884PKGHANDLER=$ac_cv_prog_PKGHANDLER
7885if test -n "$PKGHANDLER"; then
7886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7887$as_echo "$PKGHANDLER" >&6; }
7888else
7889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890$as_echo "no" >&6; }
7891fi
7892
7893
7894  test -n "$PKGHANDLER" && break
7895done
7896
7897
7898
7899# Setup tools that requires more complex handling, or that is not needed by the configure script.
7900
7901
7902  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7903  if test "x$MAKE" != x; then
7904    # User has supplied a make, test it.
7905    if test ! -f "$MAKE"; then
7906      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7907    fi
7908
7909  MAKE_CANDIDATE=""$MAKE""
7910  DESCRIPTION="user supplied MAKE=$MAKE"
7911  if test "x$MAKE_CANDIDATE" != x; then
7912    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7913$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7914    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7915    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7916    if test "x$IS_GNU_MAKE" = x; then
7917      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7918$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7919    else
7920      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7921      if test "x$IS_MODERN_MAKE" = x; then
7922        { $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
7923$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;}
7924      else
7925        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7926          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7927            MAKE_EXPECTED_ENV='cygwin'
7928          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7929            MAKE_EXPECTED_ENV='msys'
7930          else
7931            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7932          fi
7933          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7934          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7935        else
7936          # Not relevant for non-Windows
7937          IS_MAKE_CORRECT_ENV=true
7938        fi
7939        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7940          { $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
7941$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;}
7942        else
7943          FOUND_MAKE=$MAKE_CANDIDATE
7944
7945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7946
7947  # First separate the path from the arguments. This will split at the first
7948  # space.
7949  complete="$FOUND_MAKE"
7950  path="${complete%% *}"
7951  tmp="$complete EOL"
7952  arguments="${tmp#* }"
7953
7954  # Input might be given as Windows format, start by converting to
7955  # unix format.
7956  new_path=`$CYGPATH -u "$path"`
7957
7958  # Now try to locate executable using which
7959  new_path=`$WHICH "$new_path" 2> /dev/null`
7960  # bat and cmd files are not always considered executable in cygwin causing which
7961  # to not find them
7962  if test "x$new_path" = x \
7963           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7964           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7965    new_path=`$CYGPATH -u "$path"`
7966  fi
7967  if test "x$new_path" = x; then
7968    # Oops. Which didn't find the executable.
7969    # The splitting of arguments from the executable at a space might have been incorrect,
7970    # since paths with space are more likely in Windows. Give it another try with the whole
7971    # argument.
7972    path="$complete"
7973    arguments="EOL"
7974    new_path=`$CYGPATH -u "$path"`
7975    new_path=`$WHICH "$new_path" 2> /dev/null`
7976    # bat and cmd files are not always considered executable in cygwin causing which
7977    # to not find them
7978    if test "x$new_path" = x \
7979             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7980             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7981      new_path=`$CYGPATH -u "$path"`
7982    fi
7983    if test "x$new_path" = x; then
7984      # It's still not found. Now this is an unrecoverable error.
7985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7986$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7987      has_space=`$ECHO "$complete" | $GREP " "`
7988      if test "x$has_space" != x; then
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7991      fi
7992      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7993    fi
7994  fi
7995
7996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7999  # "foo.exe" is OK but "foo" is an error.
8000  #
8001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8002  # It is also a way to make sure we got the proper file name for the real test later on.
8003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8004  if test "x$test_shortpath" = x; then
8005    # Short path failed, file does not exist as specified.
8006    # Try adding .exe or .cmd
8007    if test -f "${new_path}.exe"; then
8008       input_to_shortpath="${new_path}.exe"
8009    elif test -f "${new_path}.cmd"; then
8010       input_to_shortpath="${new_path}.cmd"
8011    else
8012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8013$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8016      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8017    fi
8018  else
8019    input_to_shortpath="$new_path"
8020  fi
8021
8022  # Call helper function which possibly converts this using DOS-style short mode.
8023  # If so, the updated path is stored in $new_path.
8024  new_path="$input_to_shortpath"
8025
8026  input_path="$input_to_shortpath"
8027  # Check if we need to convert this using DOS-style short mode. If the path
8028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8029  # take no chances and rewrite it.
8030  # Note: m4 eats our [], so we need to use [ and ] instead.
8031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8032  if test "x$has_forbidden_chars" != x; then
8033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8037      # Going to short mode and back again did indeed matter. Since short mode is
8038      # case insensitive, let's make it lowercase to improve readability.
8039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8040      # Now convert it back to Unix-stile (cygpath)
8041      input_path=`$CYGPATH -u "$shortmode_path"`
8042      new_path="$input_path"
8043    fi
8044  fi
8045
8046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8047  if test "x$test_cygdrive_prefix" = x; then
8048    # As a simple fix, exclude /usr/bin since it's not a real path.
8049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8051      # a path prefixed by /cygdrive for fixpath to work.
8052      new_path="$CYGWIN_ROOT_PATH$input_path"
8053    fi
8054  fi
8055
8056  # remove trailing .exe if any
8057  new_path="${new_path/%.exe/}"
8058
8059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8060
8061  # First separate the path from the arguments. This will split at the first
8062  # space.
8063  complete="$FOUND_MAKE"
8064  path="${complete%% *}"
8065  tmp="$complete EOL"
8066  arguments="${tmp#* }"
8067
8068  # Input might be given as Windows format, start by converting to
8069  # unix format.
8070  new_path="$path"
8071
8072  windows_path="$new_path"
8073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8074    unix_path=`$CYGPATH -u "$windows_path"`
8075    new_path="$unix_path"
8076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8078    new_path="$unix_path"
8079  fi
8080
8081
8082  # Now try to locate executable using which
8083  new_path=`$WHICH "$new_path" 2> /dev/null`
8084
8085  if test "x$new_path" = x; then
8086    # Oops. Which didn't find the executable.
8087    # The splitting of arguments from the executable at a space might have been incorrect,
8088    # since paths with space are more likely in Windows. Give it another try with the whole
8089    # argument.
8090    path="$complete"
8091    arguments="EOL"
8092    new_path="$path"
8093
8094  windows_path="$new_path"
8095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8096    unix_path=`$CYGPATH -u "$windows_path"`
8097    new_path="$unix_path"
8098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8100    new_path="$unix_path"
8101  fi
8102
8103
8104    new_path=`$WHICH "$new_path" 2> /dev/null`
8105
8106    if test "x$new_path" = x; then
8107      # It's still not found. Now this is an unrecoverable error.
8108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8110      has_space=`$ECHO "$complete" | $GREP " "`
8111      if test "x$has_space" != x; then
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8114      fi
8115      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8116    fi
8117  fi
8118
8119  # Now new_path has a complete unix path to the binary
8120  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8121    # Keep paths in /bin as-is, but remove trailing .exe if any
8122    new_path="${new_path/%.exe/}"
8123    # Do not save /bin paths to all_fixpath_prefixes!
8124  else
8125    # Not in mixed or Windows style, start by that.
8126    new_path=`cmd //c echo $new_path`
8127
8128  input_path="$new_path"
8129  # Check if we need to convert this using DOS-style short mode. If the path
8130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8131  # take no chances and rewrite it.
8132  # Note: m4 eats our [], so we need to use [ and ] instead.
8133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8134  if test "x$has_forbidden_chars" != x; then
8135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8137  fi
8138
8139    # Output is in $new_path
8140
8141  windows_path="$new_path"
8142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8143    unix_path=`$CYGPATH -u "$windows_path"`
8144    new_path="$unix_path"
8145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8147    new_path="$unix_path"
8148  fi
8149
8150    # remove trailing .exe if any
8151    new_path="${new_path/%.exe/}"
8152
8153    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8154    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8155  fi
8156
8157  else
8158    # We're on a posix platform. Hooray! :)
8159    # First separate the path from the arguments. This will split at the first
8160    # space.
8161    complete="$FOUND_MAKE"
8162    path="${complete%% *}"
8163    tmp="$complete EOL"
8164    arguments="${tmp#* }"
8165
8166    new_path=`$WHICH $path 2> /dev/null`
8167    if test "x$new_path" = x; then
8168      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8169      if test "x$is_absolute_path" != x; then
8170        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8171$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8172        new_path="$path"
8173      else
8174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8175$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8176        has_space=`$ECHO "$complete" | $GREP " "`
8177        if test "x$has_space" != x; then
8178          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8180        fi
8181        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8182      fi
8183    fi
8184  fi
8185
8186  # Now join together the path and the arguments once again
8187  if test "x$arguments" != xEOL; then
8188      new_complete="$new_path ${arguments% *}"
8189  else
8190      new_complete="$new_path"
8191  fi
8192
8193  if test "x$complete" != "x$new_complete"; then
8194    FOUND_MAKE="$new_complete"
8195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8196$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8197  fi
8198
8199        fi
8200      fi
8201    fi
8202  fi
8203
8204    if test "x$FOUND_MAKE" = x; then
8205      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8206    fi
8207  else
8208    # Try our hardest to locate a correct version of GNU make
8209    for ac_prog in gmake
8210do
8211  # Extract the first word of "$ac_prog", so it can be a program name with args.
8212set dummy $ac_prog; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  case $CHECK_GMAKE in
8219  [\\/]* | ?:[\\/]*)
8220  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8221  ;;
8222  *)
8223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8230    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238  ;;
8239esac
8240fi
8241CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8242if test -n "$CHECK_GMAKE"; then
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8244$as_echo "$CHECK_GMAKE" >&6; }
8245else
8246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
8248fi
8249
8250
8251  test -n "$CHECK_GMAKE" && break
8252done
8253
8254
8255  MAKE_CANDIDATE=""$CHECK_GMAKE""
8256  DESCRIPTION="gmake in PATH"
8257  if test "x$MAKE_CANDIDATE" != x; then
8258    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8259$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8260    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8261    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8262    if test "x$IS_GNU_MAKE" = x; then
8263      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8264$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8265    else
8266      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8267      if test "x$IS_MODERN_MAKE" = x; then
8268        { $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
8269$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;}
8270      else
8271        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8272          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8273            MAKE_EXPECTED_ENV='cygwin'
8274          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8275            MAKE_EXPECTED_ENV='msys'
8276          else
8277            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8278          fi
8279          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8280          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8281        else
8282          # Not relevant for non-Windows
8283          IS_MAKE_CORRECT_ENV=true
8284        fi
8285        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8286          { $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
8287$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;}
8288        else
8289          FOUND_MAKE=$MAKE_CANDIDATE
8290
8291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8292
8293  # First separate the path from the arguments. This will split at the first
8294  # space.
8295  complete="$FOUND_MAKE"
8296  path="${complete%% *}"
8297  tmp="$complete EOL"
8298  arguments="${tmp#* }"
8299
8300  # Input might be given as Windows format, start by converting to
8301  # unix format.
8302  new_path=`$CYGPATH -u "$path"`
8303
8304  # Now try to locate executable using which
8305  new_path=`$WHICH "$new_path" 2> /dev/null`
8306  # bat and cmd files are not always considered executable in cygwin causing which
8307  # to not find them
8308  if test "x$new_path" = x \
8309           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8310           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8311    new_path=`$CYGPATH -u "$path"`
8312  fi
8313  if test "x$new_path" = x; then
8314    # Oops. Which didn't find the executable.
8315    # The splitting of arguments from the executable at a space might have been incorrect,
8316    # since paths with space are more likely in Windows. Give it another try with the whole
8317    # argument.
8318    path="$complete"
8319    arguments="EOL"
8320    new_path=`$CYGPATH -u "$path"`
8321    new_path=`$WHICH "$new_path" 2> /dev/null`
8322    # bat and cmd files are not always considered executable in cygwin causing which
8323    # to not find them
8324    if test "x$new_path" = x \
8325             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8326             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8327      new_path=`$CYGPATH -u "$path"`
8328    fi
8329    if test "x$new_path" = x; then
8330      # It's still not found. Now this is an unrecoverable error.
8331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8332$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8333      has_space=`$ECHO "$complete" | $GREP " "`
8334      if test "x$has_space" != x; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8337      fi
8338      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8339    fi
8340  fi
8341
8342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8345  # "foo.exe" is OK but "foo" is an error.
8346  #
8347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8348  # It is also a way to make sure we got the proper file name for the real test later on.
8349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8350  if test "x$test_shortpath" = x; then
8351    # Short path failed, file does not exist as specified.
8352    # Try adding .exe or .cmd
8353    if test -f "${new_path}.exe"; then
8354       input_to_shortpath="${new_path}.exe"
8355    elif test -f "${new_path}.cmd"; then
8356       input_to_shortpath="${new_path}.cmd"
8357    else
8358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8362      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8363    fi
8364  else
8365    input_to_shortpath="$new_path"
8366  fi
8367
8368  # Call helper function which possibly converts this using DOS-style short mode.
8369  # If so, the updated path is stored in $new_path.
8370  new_path="$input_to_shortpath"
8371
8372  input_path="$input_to_shortpath"
8373  # Check if we need to convert this using DOS-style short mode. If the path
8374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8375  # take no chances and rewrite it.
8376  # Note: m4 eats our [], so we need to use [ and ] instead.
8377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8378  if test "x$has_forbidden_chars" != x; then
8379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8383      # Going to short mode and back again did indeed matter. Since short mode is
8384      # case insensitive, let's make it lowercase to improve readability.
8385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8386      # Now convert it back to Unix-stile (cygpath)
8387      input_path=`$CYGPATH -u "$shortmode_path"`
8388      new_path="$input_path"
8389    fi
8390  fi
8391
8392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8393  if test "x$test_cygdrive_prefix" = x; then
8394    # As a simple fix, exclude /usr/bin since it's not a real path.
8395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8397      # a path prefixed by /cygdrive for fixpath to work.
8398      new_path="$CYGWIN_ROOT_PATH$input_path"
8399    fi
8400  fi
8401
8402  # remove trailing .exe if any
8403  new_path="${new_path/%.exe/}"
8404
8405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8406
8407  # First separate the path from the arguments. This will split at the first
8408  # space.
8409  complete="$FOUND_MAKE"
8410  path="${complete%% *}"
8411  tmp="$complete EOL"
8412  arguments="${tmp#* }"
8413
8414  # Input might be given as Windows format, start by converting to
8415  # unix format.
8416  new_path="$path"
8417
8418  windows_path="$new_path"
8419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8420    unix_path=`$CYGPATH -u "$windows_path"`
8421    new_path="$unix_path"
8422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8424    new_path="$unix_path"
8425  fi
8426
8427
8428  # Now try to locate executable using which
8429  new_path=`$WHICH "$new_path" 2> /dev/null`
8430
8431  if test "x$new_path" = x; then
8432    # Oops. Which didn't find the executable.
8433    # The splitting of arguments from the executable at a space might have been incorrect,
8434    # since paths with space are more likely in Windows. Give it another try with the whole
8435    # argument.
8436    path="$complete"
8437    arguments="EOL"
8438    new_path="$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
8450    new_path=`$WHICH "$new_path" 2> /dev/null`
8451
8452    if test "x$new_path" = x; then
8453      # It's still not found. Now this is an unrecoverable error.
8454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8455$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8456      has_space=`$ECHO "$complete" | $GREP " "`
8457      if test "x$has_space" != x; then
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8460      fi
8461      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8462    fi
8463  fi
8464
8465  # Now new_path has a complete unix path to the binary
8466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8467    # Keep paths in /bin as-is, but remove trailing .exe if any
8468    new_path="${new_path/%.exe/}"
8469    # Do not save /bin paths to all_fixpath_prefixes!
8470  else
8471    # Not in mixed or Windows style, start by that.
8472    new_path=`cmd //c echo $new_path`
8473
8474  input_path="$new_path"
8475  # Check if we need to convert this using DOS-style short mode. If the path
8476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8477  # take no chances and rewrite it.
8478  # Note: m4 eats our [], so we need to use [ and ] instead.
8479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8480  if test "x$has_forbidden_chars" != x; then
8481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8483  fi
8484
8485    # Output is in $new_path
8486
8487  windows_path="$new_path"
8488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8489    unix_path=`$CYGPATH -u "$windows_path"`
8490    new_path="$unix_path"
8491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8493    new_path="$unix_path"
8494  fi
8495
8496    # remove trailing .exe if any
8497    new_path="${new_path/%.exe/}"
8498
8499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8501  fi
8502
8503  else
8504    # We're on a posix platform. Hooray! :)
8505    # First separate the path from the arguments. This will split at the first
8506    # space.
8507    complete="$FOUND_MAKE"
8508    path="${complete%% *}"
8509    tmp="$complete EOL"
8510    arguments="${tmp#* }"
8511
8512    new_path=`$WHICH $path 2> /dev/null`
8513    if test "x$new_path" = x; then
8514      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8515      if test "x$is_absolute_path" != x; then
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8517$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8518        new_path="$path"
8519      else
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8521$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8522        has_space=`$ECHO "$complete" | $GREP " "`
8523        if test "x$has_space" != x; then
8524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8526        fi
8527        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8528      fi
8529    fi
8530  fi
8531
8532  # Now join together the path and the arguments once again
8533  if test "x$arguments" != xEOL; then
8534      new_complete="$new_path ${arguments% *}"
8535  else
8536      new_complete="$new_path"
8537  fi
8538
8539  if test "x$complete" != "x$new_complete"; then
8540    FOUND_MAKE="$new_complete"
8541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8542$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8543  fi
8544
8545        fi
8546      fi
8547    fi
8548  fi
8549
8550
8551    if test "x$FOUND_MAKE" = x; then
8552      for ac_prog in make
8553do
8554  # Extract the first word of "$ac_prog", so it can be a program name with args.
8555set dummy $ac_prog; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $CHECK_MAKE in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8573    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8585if test -n "$CHECK_MAKE"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8587$as_echo "$CHECK_MAKE" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594  test -n "$CHECK_MAKE" && break
8595done
8596
8597
8598  MAKE_CANDIDATE=""$CHECK_MAKE""
8599  DESCRIPTION="make in PATH"
8600  if test "x$MAKE_CANDIDATE" != x; then
8601    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8602$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8603    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8604    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8605    if test "x$IS_GNU_MAKE" = x; then
8606      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8607$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8608    else
8609      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8610      if test "x$IS_MODERN_MAKE" = x; then
8611        { $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
8612$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;}
8613      else
8614        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8615          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8616            MAKE_EXPECTED_ENV='cygwin'
8617          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8618            MAKE_EXPECTED_ENV='msys'
8619          else
8620            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8621          fi
8622          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8623          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8624        else
8625          # Not relevant for non-Windows
8626          IS_MAKE_CORRECT_ENV=true
8627        fi
8628        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8629          { $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
8630$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;}
8631        else
8632          FOUND_MAKE=$MAKE_CANDIDATE
8633
8634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8635
8636  # First separate the path from the arguments. This will split at the first
8637  # space.
8638  complete="$FOUND_MAKE"
8639  path="${complete%% *}"
8640  tmp="$complete EOL"
8641  arguments="${tmp#* }"
8642
8643  # Input might be given as Windows format, start by converting to
8644  # unix format.
8645  new_path=`$CYGPATH -u "$path"`
8646
8647  # Now try to locate executable using which
8648  new_path=`$WHICH "$new_path" 2> /dev/null`
8649  # bat and cmd files are not always considered executable in cygwin causing which
8650  # to not find them
8651  if test "x$new_path" = x \
8652           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8653           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8654    new_path=`$CYGPATH -u "$path"`
8655  fi
8656  if test "x$new_path" = x; then
8657    # Oops. Which didn't find the executable.
8658    # The splitting of arguments from the executable at a space might have been incorrect,
8659    # since paths with space are more likely in Windows. Give it another try with the whole
8660    # argument.
8661    path="$complete"
8662    arguments="EOL"
8663    new_path=`$CYGPATH -u "$path"`
8664    new_path=`$WHICH "$new_path" 2> /dev/null`
8665    # bat and cmd files are not always considered executable in cygwin causing which
8666    # to not find them
8667    if test "x$new_path" = x \
8668             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8669             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8670      new_path=`$CYGPATH -u "$path"`
8671    fi
8672    if test "x$new_path" = x; then
8673      # It's still not found. Now this is an unrecoverable error.
8674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8675$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8676      has_space=`$ECHO "$complete" | $GREP " "`
8677      if test "x$has_space" != x; then
8678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8680      fi
8681      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8682    fi
8683  fi
8684
8685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8688  # "foo.exe" is OK but "foo" is an error.
8689  #
8690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8691  # It is also a way to make sure we got the proper file name for the real test later on.
8692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8693  if test "x$test_shortpath" = x; then
8694    # Short path failed, file does not exist as specified.
8695    # Try adding .exe or .cmd
8696    if test -f "${new_path}.exe"; then
8697       input_to_shortpath="${new_path}.exe"
8698    elif test -f "${new_path}.cmd"; then
8699       input_to_shortpath="${new_path}.cmd"
8700    else
8701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8702$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8703      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8704$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8706    fi
8707  else
8708    input_to_shortpath="$new_path"
8709  fi
8710
8711  # Call helper function which possibly converts this using DOS-style short mode.
8712  # If so, the updated path is stored in $new_path.
8713  new_path="$input_to_shortpath"
8714
8715  input_path="$input_to_shortpath"
8716  # Check if we need to convert this using DOS-style short mode. If the path
8717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8718  # take no chances and rewrite it.
8719  # Note: m4 eats our [], so we need to use [ and ] instead.
8720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8721  if test "x$has_forbidden_chars" != x; then
8722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8726      # Going to short mode and back again did indeed matter. Since short mode is
8727      # case insensitive, let's make it lowercase to improve readability.
8728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8729      # Now convert it back to Unix-stile (cygpath)
8730      input_path=`$CYGPATH -u "$shortmode_path"`
8731      new_path="$input_path"
8732    fi
8733  fi
8734
8735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8736  if test "x$test_cygdrive_prefix" = x; then
8737    # As a simple fix, exclude /usr/bin since it's not a real path.
8738    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8740      # a path prefixed by /cygdrive for fixpath to work.
8741      new_path="$CYGWIN_ROOT_PATH$input_path"
8742    fi
8743  fi
8744
8745  # remove trailing .exe if any
8746  new_path="${new_path/%.exe/}"
8747
8748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8749
8750  # First separate the path from the arguments. This will split at the first
8751  # space.
8752  complete="$FOUND_MAKE"
8753  path="${complete%% *}"
8754  tmp="$complete EOL"
8755  arguments="${tmp#* }"
8756
8757  # Input might be given as Windows format, start by converting to
8758  # unix format.
8759  new_path="$path"
8760
8761  windows_path="$new_path"
8762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8763    unix_path=`$CYGPATH -u "$windows_path"`
8764    new_path="$unix_path"
8765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8767    new_path="$unix_path"
8768  fi
8769
8770
8771  # Now try to locate executable using which
8772  new_path=`$WHICH "$new_path" 2> /dev/null`
8773
8774  if test "x$new_path" = x; then
8775    # Oops. Which didn't find the executable.
8776    # The splitting of arguments from the executable at a space might have been incorrect,
8777    # since paths with space are more likely in Windows. Give it another try with the whole
8778    # argument.
8779    path="$complete"
8780    arguments="EOL"
8781    new_path="$path"
8782
8783  windows_path="$new_path"
8784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8785    unix_path=`$CYGPATH -u "$windows_path"`
8786    new_path="$unix_path"
8787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8789    new_path="$unix_path"
8790  fi
8791
8792
8793    new_path=`$WHICH "$new_path" 2> /dev/null`
8794
8795    if test "x$new_path" = x; then
8796      # It's still not found. Now this is an unrecoverable error.
8797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8798$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8799      has_space=`$ECHO "$complete" | $GREP " "`
8800      if test "x$has_space" != x; then
8801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8803      fi
8804      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8805    fi
8806  fi
8807
8808  # Now new_path has a complete unix path to the binary
8809  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8810    # Keep paths in /bin as-is, but remove trailing .exe if any
8811    new_path="${new_path/%.exe/}"
8812    # Do not save /bin paths to all_fixpath_prefixes!
8813  else
8814    # Not in mixed or Windows style, start by that.
8815    new_path=`cmd //c echo $new_path`
8816
8817  input_path="$new_path"
8818  # Check if we need to convert this using DOS-style short mode. If the path
8819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8820  # take no chances and rewrite it.
8821  # Note: m4 eats our [], so we need to use [ and ] instead.
8822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8823  if test "x$has_forbidden_chars" != x; then
8824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8826  fi
8827
8828    # Output is in $new_path
8829
8830  windows_path="$new_path"
8831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8832    unix_path=`$CYGPATH -u "$windows_path"`
8833    new_path="$unix_path"
8834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8836    new_path="$unix_path"
8837  fi
8838
8839    # remove trailing .exe if any
8840    new_path="${new_path/%.exe/}"
8841
8842    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8843    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8844  fi
8845
8846  else
8847    # We're on a posix platform. Hooray! :)
8848    # First separate the path from the arguments. This will split at the first
8849    # space.
8850    complete="$FOUND_MAKE"
8851    path="${complete%% *}"
8852    tmp="$complete EOL"
8853    arguments="${tmp#* }"
8854
8855    new_path=`$WHICH $path 2> /dev/null`
8856    if test "x$new_path" = x; then
8857      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8858      if test "x$is_absolute_path" != x; then
8859        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8860$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8861        new_path="$path"
8862      else
8863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8864$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8865        has_space=`$ECHO "$complete" | $GREP " "`
8866        if test "x$has_space" != x; then
8867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8869        fi
8870        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8871      fi
8872    fi
8873  fi
8874
8875  # Now join together the path and the arguments once again
8876  if test "x$arguments" != xEOL; then
8877      new_complete="$new_path ${arguments% *}"
8878  else
8879      new_complete="$new_path"
8880  fi
8881
8882  if test "x$complete" != "x$new_complete"; then
8883    FOUND_MAKE="$new_complete"
8884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8885$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8886  fi
8887
8888        fi
8889      fi
8890    fi
8891  fi
8892
8893    fi
8894
8895    if test "x$FOUND_MAKE" = x; then
8896      if test "x$TOOLS_DIR" != x; then
8897        # We have a tools-dir, check that as well before giving up.
8898        OLD_PATH=$PATH
8899        PATH=$TOOLS_DIR:$PATH
8900        for ac_prog in gmake
8901do
8902  # Extract the first word of "$ac_prog", so it can be a program name with args.
8903set dummy $ac_prog; ac_word=$2
8904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8905$as_echo_n "checking for $ac_word... " >&6; }
8906if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8907  $as_echo_n "(cached) " >&6
8908else
8909  case $CHECK_TOOLSDIR_GMAKE in
8910  [\\/]* | ?:[\\/]*)
8911  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8912  ;;
8913  *)
8914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8915for as_dir in $PATH
8916do
8917  IFS=$as_save_IFS
8918  test -z "$as_dir" && as_dir=.
8919    for ac_exec_ext in '' $ac_executable_extensions; do
8920  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8921    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8923    break 2
8924  fi
8925done
8926  done
8927IFS=$as_save_IFS
8928
8929  ;;
8930esac
8931fi
8932CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8933if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8935$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8936else
8937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8938$as_echo "no" >&6; }
8939fi
8940
8941
8942  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8943done
8944
8945
8946  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8947  DESCRIPTION="gmake in tools-dir"
8948  if test "x$MAKE_CANDIDATE" != x; then
8949    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8950$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8951    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8952    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8953    if test "x$IS_GNU_MAKE" = x; then
8954      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8955$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8956    else
8957      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8958      if test "x$IS_MODERN_MAKE" = x; then
8959        { $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
8960$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;}
8961      else
8962        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8963          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8964            MAKE_EXPECTED_ENV='cygwin'
8965          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8966            MAKE_EXPECTED_ENV='msys'
8967          else
8968            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8969          fi
8970          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8971          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8972        else
8973          # Not relevant for non-Windows
8974          IS_MAKE_CORRECT_ENV=true
8975        fi
8976        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8977          { $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
8978$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;}
8979        else
8980          FOUND_MAKE=$MAKE_CANDIDATE
8981
8982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8983
8984  # First separate the path from the arguments. This will split at the first
8985  # space.
8986  complete="$FOUND_MAKE"
8987  path="${complete%% *}"
8988  tmp="$complete EOL"
8989  arguments="${tmp#* }"
8990
8991  # Input might be given as Windows format, start by converting to
8992  # unix format.
8993  new_path=`$CYGPATH -u "$path"`
8994
8995  # Now try to locate executable using which
8996  new_path=`$WHICH "$new_path" 2> /dev/null`
8997  # bat and cmd files are not always considered executable in cygwin causing which
8998  # to not find them
8999  if test "x$new_path" = x \
9000           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9001           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9002    new_path=`$CYGPATH -u "$path"`
9003  fi
9004  if test "x$new_path" = x; then
9005    # Oops. Which didn't find the executable.
9006    # The splitting of arguments from the executable at a space might have been incorrect,
9007    # since paths with space are more likely in Windows. Give it another try with the whole
9008    # argument.
9009    path="$complete"
9010    arguments="EOL"
9011    new_path=`$CYGPATH -u "$path"`
9012    new_path=`$WHICH "$new_path" 2> /dev/null`
9013    # bat and cmd files are not always considered executable in cygwin causing which
9014    # to not find them
9015    if test "x$new_path" = x \
9016             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9017             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9018      new_path=`$CYGPATH -u "$path"`
9019    fi
9020    if test "x$new_path" = x; then
9021      # It's still not found. Now this is an unrecoverable error.
9022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9023$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9024      has_space=`$ECHO "$complete" | $GREP " "`
9025      if test "x$has_space" != x; then
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9028      fi
9029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9030    fi
9031  fi
9032
9033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9036  # "foo.exe" is OK but "foo" is an error.
9037  #
9038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9039  # It is also a way to make sure we got the proper file name for the real test later on.
9040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9041  if test "x$test_shortpath" = x; then
9042    # Short path failed, file does not exist as specified.
9043    # Try adding .exe or .cmd
9044    if test -f "${new_path}.exe"; then
9045       input_to_shortpath="${new_path}.exe"
9046    elif test -f "${new_path}.cmd"; then
9047       input_to_shortpath="${new_path}.cmd"
9048    else
9049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9054    fi
9055  else
9056    input_to_shortpath="$new_path"
9057  fi
9058
9059  # Call helper function which possibly converts this using DOS-style short mode.
9060  # If so, the updated path is stored in $new_path.
9061  new_path="$input_to_shortpath"
9062
9063  input_path="$input_to_shortpath"
9064  # Check if we need to convert this using DOS-style short mode. If the path
9065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9066  # take no chances and rewrite it.
9067  # Note: m4 eats our [], so we need to use [ and ] instead.
9068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9069  if test "x$has_forbidden_chars" != x; then
9070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9074      # Going to short mode and back again did indeed matter. Since short mode is
9075      # case insensitive, let's make it lowercase to improve readability.
9076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9077      # Now convert it back to Unix-stile (cygpath)
9078      input_path=`$CYGPATH -u "$shortmode_path"`
9079      new_path="$input_path"
9080    fi
9081  fi
9082
9083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9084  if test "x$test_cygdrive_prefix" = x; then
9085    # As a simple fix, exclude /usr/bin since it's not a real path.
9086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9088      # a path prefixed by /cygdrive for fixpath to work.
9089      new_path="$CYGWIN_ROOT_PATH$input_path"
9090    fi
9091  fi
9092
9093  # remove trailing .exe if any
9094  new_path="${new_path/%.exe/}"
9095
9096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9097
9098  # First separate the path from the arguments. This will split at the first
9099  # space.
9100  complete="$FOUND_MAKE"
9101  path="${complete%% *}"
9102  tmp="$complete EOL"
9103  arguments="${tmp#* }"
9104
9105  # Input might be given as Windows format, start by converting to
9106  # unix format.
9107  new_path="$path"
9108
9109  windows_path="$new_path"
9110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9111    unix_path=`$CYGPATH -u "$windows_path"`
9112    new_path="$unix_path"
9113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9115    new_path="$unix_path"
9116  fi
9117
9118
9119  # Now try to locate executable using which
9120  new_path=`$WHICH "$new_path" 2> /dev/null`
9121
9122  if test "x$new_path" = x; then
9123    # Oops. Which didn't find the executable.
9124    # The splitting of arguments from the executable at a space might have been incorrect,
9125    # since paths with space are more likely in Windows. Give it another try with the whole
9126    # argument.
9127    path="$complete"
9128    arguments="EOL"
9129    new_path="$path"
9130
9131  windows_path="$new_path"
9132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9133    unix_path=`$CYGPATH -u "$windows_path"`
9134    new_path="$unix_path"
9135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9137    new_path="$unix_path"
9138  fi
9139
9140
9141    new_path=`$WHICH "$new_path" 2> /dev/null`
9142
9143    if test "x$new_path" = x; then
9144      # It's still not found. Now this is an unrecoverable error.
9145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9146$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9147      has_space=`$ECHO "$complete" | $GREP " "`
9148      if test "x$has_space" != x; then
9149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9151      fi
9152      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9153    fi
9154  fi
9155
9156  # Now new_path has a complete unix path to the binary
9157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9158    # Keep paths in /bin as-is, but remove trailing .exe if any
9159    new_path="${new_path/%.exe/}"
9160    # Do not save /bin paths to all_fixpath_prefixes!
9161  else
9162    # Not in mixed or Windows style, start by that.
9163    new_path=`cmd //c echo $new_path`
9164
9165  input_path="$new_path"
9166  # Check if we need to convert this using DOS-style short mode. If the path
9167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9168  # take no chances and rewrite it.
9169  # Note: m4 eats our [], so we need to use [ and ] instead.
9170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9171  if test "x$has_forbidden_chars" != x; then
9172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9174  fi
9175
9176    # Output is in $new_path
9177
9178  windows_path="$new_path"
9179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9180    unix_path=`$CYGPATH -u "$windows_path"`
9181    new_path="$unix_path"
9182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9184    new_path="$unix_path"
9185  fi
9186
9187    # remove trailing .exe if any
9188    new_path="${new_path/%.exe/}"
9189
9190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9192  fi
9193
9194  else
9195    # We're on a posix platform. Hooray! :)
9196    # First separate the path from the arguments. This will split at the first
9197    # space.
9198    complete="$FOUND_MAKE"
9199    path="${complete%% *}"
9200    tmp="$complete EOL"
9201    arguments="${tmp#* }"
9202
9203    new_path=`$WHICH $path 2> /dev/null`
9204    if test "x$new_path" = x; then
9205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9206      if test "x$is_absolute_path" != x; then
9207        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9208$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9209        new_path="$path"
9210      else
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9213        has_space=`$ECHO "$complete" | $GREP " "`
9214        if test "x$has_space" != x; then
9215          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9217        fi
9218        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9219      fi
9220    fi
9221  fi
9222
9223  # Now join together the path and the arguments once again
9224  if test "x$arguments" != xEOL; then
9225      new_complete="$new_path ${arguments% *}"
9226  else
9227      new_complete="$new_path"
9228  fi
9229
9230  if test "x$complete" != "x$new_complete"; then
9231    FOUND_MAKE="$new_complete"
9232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9233$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9234  fi
9235
9236        fi
9237      fi
9238    fi
9239  fi
9240
9241        if test "x$FOUND_MAKE" = x; then
9242          for ac_prog in make
9243do
9244  # Extract the first word of "$ac_prog", so it can be a program name with args.
9245set dummy $ac_prog; ac_word=$2
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247$as_echo_n "checking for $ac_word... " >&6; }
9248if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9249  $as_echo_n "(cached) " >&6
9250else
9251  case $CHECK_TOOLSDIR_MAKE in
9252  [\\/]* | ?:[\\/]*)
9253  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9254  ;;
9255  *)
9256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257for as_dir in $PATH
9258do
9259  IFS=$as_save_IFS
9260  test -z "$as_dir" && as_dir=.
9261    for ac_exec_ext in '' $ac_executable_extensions; do
9262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9263    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9265    break 2
9266  fi
9267done
9268  done
9269IFS=$as_save_IFS
9270
9271  ;;
9272esac
9273fi
9274CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9275if test -n "$CHECK_TOOLSDIR_MAKE"; then
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9277$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9278else
9279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
9281fi
9282
9283
9284  test -n "$CHECK_TOOLSDIR_MAKE" && break
9285done
9286
9287
9288  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9289  DESCRIPTION="make in tools-dir"
9290  if test "x$MAKE_CANDIDATE" != x; then
9291    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9292$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9293    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9294    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9295    if test "x$IS_GNU_MAKE" = x; then
9296      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9297$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9298    else
9299      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9300      if test "x$IS_MODERN_MAKE" = x; then
9301        { $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
9302$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;}
9303      else
9304        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9305          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9306            MAKE_EXPECTED_ENV='cygwin'
9307          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9308            MAKE_EXPECTED_ENV='msys'
9309          else
9310            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9311          fi
9312          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9313          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9314        else
9315          # Not relevant for non-Windows
9316          IS_MAKE_CORRECT_ENV=true
9317        fi
9318        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9319          { $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
9320$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;}
9321        else
9322          FOUND_MAKE=$MAKE_CANDIDATE
9323
9324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9325
9326  # First separate the path from the arguments. This will split at the first
9327  # space.
9328  complete="$FOUND_MAKE"
9329  path="${complete%% *}"
9330  tmp="$complete EOL"
9331  arguments="${tmp#* }"
9332
9333  # Input might be given as Windows format, start by converting to
9334  # unix format.
9335  new_path=`$CYGPATH -u "$path"`
9336
9337  # Now try to locate executable using which
9338  new_path=`$WHICH "$new_path" 2> /dev/null`
9339  # bat and cmd files are not always considered executable in cygwin causing which
9340  # to not find them
9341  if test "x$new_path" = x \
9342           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9343           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9344    new_path=`$CYGPATH -u "$path"`
9345  fi
9346  if test "x$new_path" = x; then
9347    # Oops. Which didn't find the executable.
9348    # The splitting of arguments from the executable at a space might have been incorrect,
9349    # since paths with space are more likely in Windows. Give it another try with the whole
9350    # argument.
9351    path="$complete"
9352    arguments="EOL"
9353    new_path=`$CYGPATH -u "$path"`
9354    new_path=`$WHICH "$new_path" 2> /dev/null`
9355    # bat and cmd files are not always considered executable in cygwin causing which
9356    # to not find them
9357    if test "x$new_path" = x \
9358             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9359             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9360      new_path=`$CYGPATH -u "$path"`
9361    fi
9362    if test "x$new_path" = x; then
9363      # It's still not found. Now this is an unrecoverable error.
9364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9366      has_space=`$ECHO "$complete" | $GREP " "`
9367      if test "x$has_space" != x; then
9368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9370      fi
9371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9372    fi
9373  fi
9374
9375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9378  # "foo.exe" is OK but "foo" is an error.
9379  #
9380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9381  # It is also a way to make sure we got the proper file name for the real test later on.
9382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9383  if test "x$test_shortpath" = x; then
9384    # Short path failed, file does not exist as specified.
9385    # Try adding .exe or .cmd
9386    if test -f "${new_path}.exe"; then
9387       input_to_shortpath="${new_path}.exe"
9388    elif test -f "${new_path}.cmd"; then
9389       input_to_shortpath="${new_path}.cmd"
9390    else
9391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9393      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9394$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9395      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9396    fi
9397  else
9398    input_to_shortpath="$new_path"
9399  fi
9400
9401  # Call helper function which possibly converts this using DOS-style short mode.
9402  # If so, the updated path is stored in $new_path.
9403  new_path="$input_to_shortpath"
9404
9405  input_path="$input_to_shortpath"
9406  # Check if we need to convert this using DOS-style short mode. If the path
9407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9408  # take no chances and rewrite it.
9409  # Note: m4 eats our [], so we need to use [ and ] instead.
9410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9411  if test "x$has_forbidden_chars" != x; then
9412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9416      # Going to short mode and back again did indeed matter. Since short mode is
9417      # case insensitive, let's make it lowercase to improve readability.
9418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9419      # Now convert it back to Unix-stile (cygpath)
9420      input_path=`$CYGPATH -u "$shortmode_path"`
9421      new_path="$input_path"
9422    fi
9423  fi
9424
9425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9426  if test "x$test_cygdrive_prefix" = x; then
9427    # As a simple fix, exclude /usr/bin since it's not a real path.
9428    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9430      # a path prefixed by /cygdrive for fixpath to work.
9431      new_path="$CYGWIN_ROOT_PATH$input_path"
9432    fi
9433  fi
9434
9435  # remove trailing .exe if any
9436  new_path="${new_path/%.exe/}"
9437
9438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9439
9440  # First separate the path from the arguments. This will split at the first
9441  # space.
9442  complete="$FOUND_MAKE"
9443  path="${complete%% *}"
9444  tmp="$complete EOL"
9445  arguments="${tmp#* }"
9446
9447  # Input might be given as Windows format, start by converting to
9448  # unix format.
9449  new_path="$path"
9450
9451  windows_path="$new_path"
9452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9453    unix_path=`$CYGPATH -u "$windows_path"`
9454    new_path="$unix_path"
9455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9457    new_path="$unix_path"
9458  fi
9459
9460
9461  # Now try to locate executable using which
9462  new_path=`$WHICH "$new_path" 2> /dev/null`
9463
9464  if test "x$new_path" = x; then
9465    # Oops. Which didn't find the executable.
9466    # The splitting of arguments from the executable at a space might have been incorrect,
9467    # since paths with space are more likely in Windows. Give it another try with the whole
9468    # argument.
9469    path="$complete"
9470    arguments="EOL"
9471    new_path="$path"
9472
9473  windows_path="$new_path"
9474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9475    unix_path=`$CYGPATH -u "$windows_path"`
9476    new_path="$unix_path"
9477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9479    new_path="$unix_path"
9480  fi
9481
9482
9483    new_path=`$WHICH "$new_path" 2> /dev/null`
9484
9485    if test "x$new_path" = x; then
9486      # It's still not found. Now this is an unrecoverable error.
9487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9489      has_space=`$ECHO "$complete" | $GREP " "`
9490      if test "x$has_space" != x; then
9491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9493      fi
9494      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9495    fi
9496  fi
9497
9498  # Now new_path has a complete unix path to the binary
9499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9500    # Keep paths in /bin as-is, but remove trailing .exe if any
9501    new_path="${new_path/%.exe/}"
9502    # Do not save /bin paths to all_fixpath_prefixes!
9503  else
9504    # Not in mixed or Windows style, start by that.
9505    new_path=`cmd //c echo $new_path`
9506
9507  input_path="$new_path"
9508  # Check if we need to convert this using DOS-style short mode. If the path
9509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9510  # take no chances and rewrite it.
9511  # Note: m4 eats our [], so we need to use [ and ] instead.
9512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9513  if test "x$has_forbidden_chars" != x; then
9514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9516  fi
9517
9518    # Output is in $new_path
9519
9520  windows_path="$new_path"
9521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9522    unix_path=`$CYGPATH -u "$windows_path"`
9523    new_path="$unix_path"
9524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9526    new_path="$unix_path"
9527  fi
9528
9529    # remove trailing .exe if any
9530    new_path="${new_path/%.exe/}"
9531
9532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9534  fi
9535
9536  else
9537    # We're on a posix platform. Hooray! :)
9538    # First separate the path from the arguments. This will split at the first
9539    # space.
9540    complete="$FOUND_MAKE"
9541    path="${complete%% *}"
9542    tmp="$complete EOL"
9543    arguments="${tmp#* }"
9544
9545    new_path=`$WHICH $path 2> /dev/null`
9546    if test "x$new_path" = x; then
9547      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9548      if test "x$is_absolute_path" != x; then
9549        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9550$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9551        new_path="$path"
9552      else
9553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9554$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9555        has_space=`$ECHO "$complete" | $GREP " "`
9556        if test "x$has_space" != x; then
9557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9559        fi
9560        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9561      fi
9562    fi
9563  fi
9564
9565  # Now join together the path and the arguments once again
9566  if test "x$arguments" != xEOL; then
9567      new_complete="$new_path ${arguments% *}"
9568  else
9569      new_complete="$new_path"
9570  fi
9571
9572  if test "x$complete" != "x$new_complete"; then
9573    FOUND_MAKE="$new_complete"
9574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9575$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9576  fi
9577
9578        fi
9579      fi
9580    fi
9581  fi
9582
9583        fi
9584        PATH=$OLD_PATH
9585      fi
9586    fi
9587
9588    if test "x$FOUND_MAKE" = x; then
9589      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
9590    fi
9591  fi
9592
9593  MAKE=$FOUND_MAKE
9594
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9596$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9597
9598
9599
9600    # Test if find supports -delete
9601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9602$as_echo_n "checking if find supports -delete... " >&6; }
9603    FIND_DELETE="-delete"
9604
9605    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9606
9607    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9608
9609    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9610    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9611        # No, it does not.
9612        rm $DELETEDIR/TestIfFindSupportsDelete
9613        FIND_DELETE="-exec rm \{\} \+"
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615$as_echo "no" >&6; }
9616    else
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9618$as_echo "yes" >&6; }
9619    fi
9620    rmdir $DELETEDIR
9621
9622
9623
9624# These tools might not be installed by default,
9625# need hint on how to install them.
9626
9627    for ac_prog in unzip
9628do
9629  # Extract the first word of "$ac_prog", so it can be a program name with args.
9630set dummy $ac_prog; ac_word=$2
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632$as_echo_n "checking for $ac_word... " >&6; }
9633if test "${ac_cv_path_UNZIP+set}" = set; then :
9634  $as_echo_n "(cached) " >&6
9635else
9636  case $UNZIP in
9637  [\\/]* | ?:[\\/]*)
9638  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9639  ;;
9640  *)
9641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642for as_dir in $PATH
9643do
9644  IFS=$as_save_IFS
9645  test -z "$as_dir" && as_dir=.
9646    for ac_exec_ext in '' $ac_executable_extensions; do
9647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9648    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9650    break 2
9651  fi
9652done
9653  done
9654IFS=$as_save_IFS
9655
9656  ;;
9657esac
9658fi
9659UNZIP=$ac_cv_path_UNZIP
9660if test -n "$UNZIP"; then
9661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9662$as_echo "$UNZIP" >&6; }
9663else
9664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
9666fi
9667
9668
9669  test -n "$UNZIP" && break
9670done
9671
9672
9673    if test "x$UNZIP" = x; then
9674        if test "xunzip" = x; then
9675          PROG_NAME=unzip
9676        else
9677          PROG_NAME=unzip
9678        fi
9679        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9680$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9681        as_fn_error $? "Cannot continue" "$LINENO" 5
9682    fi
9683
9684
9685
9686    for ac_prog in zip
9687do
9688  # Extract the first word of "$ac_prog", so it can be a program name with args.
9689set dummy $ac_prog; ac_word=$2
9690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9691$as_echo_n "checking for $ac_word... " >&6; }
9692if test "${ac_cv_path_ZIP+set}" = set; then :
9693  $as_echo_n "(cached) " >&6
9694else
9695  case $ZIP in
9696  [\\/]* | ?:[\\/]*)
9697  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9698  ;;
9699  *)
9700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9701for as_dir in $PATH
9702do
9703  IFS=$as_save_IFS
9704  test -z "$as_dir" && as_dir=.
9705    for ac_exec_ext in '' $ac_executable_extensions; do
9706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9707    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9709    break 2
9710  fi
9711done
9712  done
9713IFS=$as_save_IFS
9714
9715  ;;
9716esac
9717fi
9718ZIP=$ac_cv_path_ZIP
9719if test -n "$ZIP"; then
9720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9721$as_echo "$ZIP" >&6; }
9722else
9723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724$as_echo "no" >&6; }
9725fi
9726
9727
9728  test -n "$ZIP" && break
9729done
9730
9731
9732    if test "x$ZIP" = x; then
9733        if test "xzip" = x; then
9734          PROG_NAME=zip
9735        else
9736          PROG_NAME=zip
9737        fi
9738        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9739$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9740        as_fn_error $? "Cannot continue" "$LINENO" 5
9741    fi
9742
9743
9744
9745# Non-required basic tools
9746
9747# Extract the first word of "ldd", so it can be a program name with args.
9748set dummy ldd; ac_word=$2
9749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9750$as_echo_n "checking for $ac_word... " >&6; }
9751if test "${ac_cv_path_LDD+set}" = set; then :
9752  $as_echo_n "(cached) " >&6
9753else
9754  case $LDD in
9755  [\\/]* | ?:[\\/]*)
9756  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9757  ;;
9758  *)
9759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9760for as_dir in $PATH
9761do
9762  IFS=$as_save_IFS
9763  test -z "$as_dir" && as_dir=.
9764    for ac_exec_ext in '' $ac_executable_extensions; do
9765  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9766    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9768    break 2
9769  fi
9770done
9771  done
9772IFS=$as_save_IFS
9773
9774  ;;
9775esac
9776fi
9777LDD=$ac_cv_path_LDD
9778if test -n "$LDD"; then
9779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9780$as_echo "$LDD" >&6; }
9781else
9782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9783$as_echo "no" >&6; }
9784fi
9785
9786
9787if test "x$LDD" = "x"; then
9788    # List shared lib dependencies is used for
9789    # debug output and checking for forbidden dependencies.
9790    # We can build without it.
9791    LDD="true"
9792fi
9793# Extract the first word of "otool", so it can be a program name with args.
9794set dummy otool; ac_word=$2
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796$as_echo_n "checking for $ac_word... " >&6; }
9797if test "${ac_cv_path_OTOOL+set}" = set; then :
9798  $as_echo_n "(cached) " >&6
9799else
9800  case $OTOOL in
9801  [\\/]* | ?:[\\/]*)
9802  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9803  ;;
9804  *)
9805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806for as_dir in $PATH
9807do
9808  IFS=$as_save_IFS
9809  test -z "$as_dir" && as_dir=.
9810    for ac_exec_ext in '' $ac_executable_extensions; do
9811  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9812    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814    break 2
9815  fi
9816done
9817  done
9818IFS=$as_save_IFS
9819
9820  ;;
9821esac
9822fi
9823OTOOL=$ac_cv_path_OTOOL
9824if test -n "$OTOOL"; then
9825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9826$as_echo "$OTOOL" >&6; }
9827else
9828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829$as_echo "no" >&6; }
9830fi
9831
9832
9833if test "x$OTOOL" = "x"; then
9834   OTOOL="true"
9835fi
9836for ac_prog in readelf greadelf
9837do
9838  # Extract the first word of "$ac_prog", so it can be a program name with args.
9839set dummy $ac_prog; ac_word=$2
9840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9841$as_echo_n "checking for $ac_word... " >&6; }
9842if test "${ac_cv_path_READELF+set}" = set; then :
9843  $as_echo_n "(cached) " >&6
9844else
9845  case $READELF in
9846  [\\/]* | ?:[\\/]*)
9847  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9848  ;;
9849  *)
9850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9851for as_dir in $PATH
9852do
9853  IFS=$as_save_IFS
9854  test -z "$as_dir" && as_dir=.
9855    for ac_exec_ext in '' $ac_executable_extensions; do
9856  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9857    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9859    break 2
9860  fi
9861done
9862  done
9863IFS=$as_save_IFS
9864
9865  ;;
9866esac
9867fi
9868READELF=$ac_cv_path_READELF
9869if test -n "$READELF"; then
9870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9871$as_echo "$READELF" >&6; }
9872else
9873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9874$as_echo "no" >&6; }
9875fi
9876
9877
9878  test -n "$READELF" && break
9879done
9880
9881# Extract the first word of "hg", so it can be a program name with args.
9882set dummy hg; ac_word=$2
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9884$as_echo_n "checking for $ac_word... " >&6; }
9885if test "${ac_cv_path_HG+set}" = set; then :
9886  $as_echo_n "(cached) " >&6
9887else
9888  case $HG in
9889  [\\/]* | ?:[\\/]*)
9890  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9891  ;;
9892  *)
9893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9894for as_dir in $PATH
9895do
9896  IFS=$as_save_IFS
9897  test -z "$as_dir" && as_dir=.
9898    for ac_exec_ext in '' $ac_executable_extensions; do
9899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9900    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9902    break 2
9903  fi
9904done
9905  done
9906IFS=$as_save_IFS
9907
9908  ;;
9909esac
9910fi
9911HG=$ac_cv_path_HG
9912if test -n "$HG"; then
9913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9914$as_echo "$HG" >&6; }
9915else
9916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
9918fi
9919
9920
9921# Extract the first word of "stat", so it can be a program name with args.
9922set dummy stat; ac_word=$2
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9924$as_echo_n "checking for $ac_word... " >&6; }
9925if test "${ac_cv_path_STAT+set}" = set; then :
9926  $as_echo_n "(cached) " >&6
9927else
9928  case $STAT in
9929  [\\/]* | ?:[\\/]*)
9930  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9931  ;;
9932  *)
9933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9934for as_dir in $PATH
9935do
9936  IFS=$as_save_IFS
9937  test -z "$as_dir" && as_dir=.
9938    for ac_exec_ext in '' $ac_executable_extensions; do
9939  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9940    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9942    break 2
9943  fi
9944done
9945  done
9946IFS=$as_save_IFS
9947
9948  ;;
9949esac
9950fi
9951STAT=$ac_cv_path_STAT
9952if test -n "$STAT"; then
9953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9954$as_echo "$STAT" >&6; }
9955else
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
9958fi
9959
9960
9961# Extract the first word of "time", so it can be a program name with args.
9962set dummy time; ac_word=$2
9963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9964$as_echo_n "checking for $ac_word... " >&6; }
9965if test "${ac_cv_path_TIME+set}" = set; then :
9966  $as_echo_n "(cached) " >&6
9967else
9968  case $TIME in
9969  [\\/]* | ?:[\\/]*)
9970  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9971  ;;
9972  *)
9973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9974for as_dir in $PATH
9975do
9976  IFS=$as_save_IFS
9977  test -z "$as_dir" && as_dir=.
9978    for ac_exec_ext in '' $ac_executable_extensions; do
9979  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9980    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9982    break 2
9983  fi
9984done
9985  done
9986IFS=$as_save_IFS
9987
9988  ;;
9989esac
9990fi
9991TIME=$ac_cv_path_TIME
9992if test -n "$TIME"; then
9993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9994$as_echo "$TIME" >&6; }
9995else
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
9998fi
9999
10000
10001
10002if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10003
10004    for ac_prog in comm
10005do
10006  # Extract the first word of "$ac_prog", so it can be a program name with args.
10007set dummy $ac_prog; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if test "${ac_cv_path_COMM+set}" = set; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $COMM in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10025    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036COMM=$ac_cv_path_COMM
10037if test -n "$COMM"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10039$as_echo "$COMM" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046  test -n "$COMM" && break
10047done
10048
10049
10050    if test "x$COMM" = x; then
10051        if test "xcomm" = x; then
10052          PROG_NAME=comm
10053        else
10054          PROG_NAME=comm
10055        fi
10056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10058        as_fn_error $? "Cannot continue" "$LINENO" 5
10059    fi
10060
10061
10062fi
10063
10064
10065# Check if pkg-config is available.
10066
10067
10068if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10069	if test -n "$ac_tool_prefix"; then
10070  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10071set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10073$as_echo_n "checking for $ac_word... " >&6; }
10074if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10075  $as_echo_n "(cached) " >&6
10076else
10077  case $PKG_CONFIG in
10078  [\\/]* | ?:[\\/]*)
10079  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10080  ;;
10081  *)
10082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10083for as_dir in $PATH
10084do
10085  IFS=$as_save_IFS
10086  test -z "$as_dir" && as_dir=.
10087    for ac_exec_ext in '' $ac_executable_extensions; do
10088  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10089    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10091    break 2
10092  fi
10093done
10094  done
10095IFS=$as_save_IFS
10096
10097  ;;
10098esac
10099fi
10100PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10101if test -n "$PKG_CONFIG"; then
10102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10103$as_echo "$PKG_CONFIG" >&6; }
10104else
10105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10106$as_echo "no" >&6; }
10107fi
10108
10109
10110fi
10111if test -z "$ac_cv_path_PKG_CONFIG"; then
10112  ac_pt_PKG_CONFIG=$PKG_CONFIG
10113  # Extract the first word of "pkg-config", so it can be a program name with args.
10114set dummy pkg-config; ac_word=$2
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10116$as_echo_n "checking for $ac_word... " >&6; }
10117if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10118  $as_echo_n "(cached) " >&6
10119else
10120  case $ac_pt_PKG_CONFIG in
10121  [\\/]* | ?:[\\/]*)
10122  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10123  ;;
10124  *)
10125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10126for as_dir in $PATH
10127do
10128  IFS=$as_save_IFS
10129  test -z "$as_dir" && as_dir=.
10130    for ac_exec_ext in '' $ac_executable_extensions; do
10131  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10132    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10134    break 2
10135  fi
10136done
10137  done
10138IFS=$as_save_IFS
10139
10140  ;;
10141esac
10142fi
10143ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10144if test -n "$ac_pt_PKG_CONFIG"; then
10145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10146$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10147else
10148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149$as_echo "no" >&6; }
10150fi
10151
10152  if test "x$ac_pt_PKG_CONFIG" = x; then
10153    PKG_CONFIG=""
10154  else
10155    case $cross_compiling:$ac_tool_warned in
10156yes:)
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10159ac_tool_warned=yes ;;
10160esac
10161    PKG_CONFIG=$ac_pt_PKG_CONFIG
10162  fi
10163else
10164  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10165fi
10166
10167fi
10168if test -n "$PKG_CONFIG"; then
10169	_pkg_min_version=0.9.0
10170	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10171$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10172	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10173		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10174$as_echo "yes" >&6; }
10175	else
10176		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178		PKG_CONFIG=""
10179	fi
10180
10181fi
10182
10183# After basic tools have been setup, we can check build os specific details.
10184
10185###############################################################################
10186
10187# Note that this is the build platform OS version!
10188
10189OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10190OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10191OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10192OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10193
10194
10195
10196
10197
10198# Setup builddeps, for automatic downloading of tools we need.
10199# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10200# boot-jdk setup, but we need to have basic tools setup first.
10201
10202
10203# Check whether --with-builddeps-conf was given.
10204if test "${with_builddeps_conf+set}" = set; then :
10205  withval=$with_builddeps_conf;
10206fi
10207
10208
10209
10210# Check whether --with-builddeps-server was given.
10211if test "${with_builddeps_server+set}" = set; then :
10212  withval=$with_builddeps_server;
10213fi
10214
10215
10216
10217# Check whether --with-builddeps-dir was given.
10218if test "${with_builddeps_dir+set}" = set; then :
10219  withval=$with_builddeps_dir;
10220else
10221  with_builddeps_dir=/localhome/builddeps
10222fi
10223
10224
10225
10226# Check whether --with-builddeps-group was given.
10227if test "${with_builddeps_group+set}" = set; then :
10228  withval=$with_builddeps_group;
10229fi
10230
10231
10232
10233
10234    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10235        if test "x$with_builddeps_conf" != x; then
10236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10237$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10238            builddepsfile=$with_builddeps_conf
10239            if test -s $builddepsfile; then
10240                . $builddepsfile
10241                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10242$as_echo "loaded!" >&6; }
10243            else
10244               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10245           fi
10246        else
10247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10248$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10249            builddepsfile=`mktemp`
10250            touch $builddepsfile
10251            # Put all found confs into a single file.
10252            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10253            # Source the file to acquire the variables
10254            if test -s $builddepsfile; then
10255                . $builddepsfile
10256                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10257$as_echo "found at least one!" >&6; }
10258            else
10259               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10260           fi
10261        fi
10262        # Create build and target names that use _ instead of "-" and ".".
10263        # This is necessary to use them in variable names.
10264        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10265        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10266        # Extract rewrite information for build and target
10267        eval rewritten_build=\${REWRITE_${build_var}}
10268        if test "x$rewritten_build" = x; then
10269            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10270            echo Build stays the same $rewritten_build
10271        else
10272            echo Rewriting build for builddeps into $rewritten_build
10273        fi
10274        eval rewritten_target=\${REWRITE_${target_var}}
10275        if test "x$rewritten_target" = x; then
10276            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10277            echo Target stays the same $rewritten_target
10278        else
10279            echo Rewriting target for builddeps into $rewritten_target
10280        fi
10281        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10282        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10283    fi
10284    for ac_prog in 7z unzip
10285do
10286  # Extract the first word of "$ac_prog", so it can be a program name with args.
10287set dummy $ac_prog; ac_word=$2
10288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289$as_echo_n "checking for $ac_word... " >&6; }
10290if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10291  $as_echo_n "(cached) " >&6
10292else
10293  if test -n "$BDEPS_UNZIP"; then
10294  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10295else
10296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10297for as_dir in $PATH
10298do
10299  IFS=$as_save_IFS
10300  test -z "$as_dir" && as_dir=.
10301    for ac_exec_ext in '' $ac_executable_extensions; do
10302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10303    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10305    break 2
10306  fi
10307done
10308  done
10309IFS=$as_save_IFS
10310
10311fi
10312fi
10313BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10314if test -n "$BDEPS_UNZIP"; then
10315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10316$as_echo "$BDEPS_UNZIP" >&6; }
10317else
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
10320fi
10321
10322
10323  test -n "$BDEPS_UNZIP" && break
10324done
10325
10326    if test "x$BDEPS_UNZIP" = x7z; then
10327        BDEPS_UNZIP="7z x"
10328    fi
10329
10330    for ac_prog in wget lftp ftp
10331do
10332  # Extract the first word of "$ac_prog", so it can be a program name with args.
10333set dummy $ac_prog; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  if test -n "$BDEPS_FTP"; then
10340  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10341else
10342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10349    ac_cv_prog_BDEPS_FTP="$ac_prog"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357fi
10358fi
10359BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10360if test -n "$BDEPS_FTP"; then
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10362$as_echo "$BDEPS_FTP" >&6; }
10363else
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368
10369  test -n "$BDEPS_FTP" && break
10370done
10371
10372
10373
10374###############################################################################
10375#
10376# Determine OpenJDK variants, options and version numbers.
10377#
10378###############################################################################
10379
10380# We need build & target for this.
10381
10382
10383###############################################################################
10384#
10385# Should we build only OpenJDK even if closed sources are present?
10386#
10387# Check whether --enable-openjdk-only was given.
10388if test "${enable_openjdk_only+set}" = set; then :
10389  enableval=$enable_openjdk_only;
10390else
10391  enable_openjdk_only="no"
10392fi
10393
10394
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10396$as_echo_n "checking for presence of closed sources... " >&6; }
10397if test -d "$SRC_ROOT/jdk/src/closed"; then
10398    CLOSED_SOURCE_PRESENT=yes
10399else
10400    CLOSED_SOURCE_PRESENT=no
10401fi
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10403$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10404
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10406$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10407SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10409$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10410
10411if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10412  OPENJDK=true
10413  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10414    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10415$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10416  fi
10417else
10418  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10419    OPENJDK=true
10420  else
10421    OPENJDK=false
10422  fi
10423fi
10424
10425if test "x$OPENJDK" = "xtrue"; then
10426    SET_OPENJDK="OPENJDK=true"
10427fi
10428
10429
10430
10431###############################################################################
10432#
10433# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10434# We always build headless support.
10435#
10436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10437$as_echo_n "checking headful support... " >&6; }
10438# Check whether --enable-headful was given.
10439if test "${enable_headful+set}" = set; then :
10440  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10441else
10442  SUPPORT_HEADFUL=yes
10443fi
10444
10445
10446SUPPORT_HEADLESS=yes
10447BUILD_HEADLESS="BUILD_HEADLESS:=true"
10448
10449if test "x$SUPPORT_HEADFUL" = xyes; then
10450    # We are building both headful and headless.
10451    headful_msg="inlude support for both headful and headless"
10452fi
10453
10454if test "x$SUPPORT_HEADFUL" = xno; then
10455    # Thus we are building headless only.
10456    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10457    headful_msg="headless only"
10458fi
10459
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10461$as_echo "$headful_msg" >&6; }
10462
10463
10464
10465
10466
10467# Control wether Hotspot runs Queens test after build.
10468# Check whether --enable-hotspot-test-in-build was given.
10469if test "${enable_hotspot_test_in_build+set}" = set; then :
10470  enableval=$enable_hotspot_test_in_build;
10471else
10472  enable_hotspot_test_in_build=no
10473fi
10474
10475if test "x$enable_hotspot_test_in_build" = "xyes"; then
10476    TEST_IN_BUILD=true
10477else
10478    TEST_IN_BUILD=false
10479fi
10480
10481
10482###############################################################################
10483#
10484# Choose cacerts source file
10485#
10486
10487# Check whether --with-cacerts-file was given.
10488if test "${with_cacerts_file+set}" = set; then :
10489  withval=$with_cacerts_file;
10490fi
10491
10492if test "x$with_cacerts_file" != x; then
10493    CACERTS_FILE=$with_cacerts_file
10494else
10495    if test "x$OPENJDK" = "xtrue"; then
10496        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10497    else
10498        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10499    fi
10500fi
10501
10502
10503###############################################################################
10504#
10505# Enable or disable unlimited crypto
10506#
10507# Check whether --enable-unlimited-crypto was given.
10508if test "${enable_unlimited_crypto+set}" = set; then :
10509  enableval=$enable_unlimited_crypto;
10510else
10511  enable_unlimited_crypto=no
10512fi
10513
10514if test "x$enable_unlimited_crypto" = "xyes"; then
10515    UNLIMITED_CRYPTO=true
10516else
10517    UNLIMITED_CRYPTO=false
10518fi
10519
10520
10521###############################################################################
10522#
10523# Compress jars
10524#
10525COMPRESS_JARS=false
10526
10527
10528
10529
10530# Source the version numbers
10531. $AUTOCONF_DIR/version.numbers
10532if test "x$OPENJDK" = "xfalse"; then
10533    . $AUTOCONF_DIR/closed.version.numbers
10534fi
10535# Now set the JDK version, milestone, build number etc.
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550COPYRIGHT_YEAR=`date +'%Y'`
10551
10552
10553RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10554
10555
10556if test "x$JDK_UPDATE_VERSION" != x; then
10557    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10558else
10559    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10560fi
10561
10562
10563if test "x$MILESTONE" != x; then
10564    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10565else
10566    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10567fi
10568
10569
10570if test "x$JDK_BUILD_NUMBER" != x; then
10571    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10572else
10573    JDK_BUILD_NUMBER=b00
10574    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10575    # Avoid [:alnum:] since it depends on the locale.
10576    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10577    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10578    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10579fi
10580
10581COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10582
10583
10584
10585###############################################################################
10586#
10587# Setup BootJDK, used to bootstrap the build.
10588#
10589###############################################################################
10590
10591
10592BOOT_JDK_FOUND=no
10593
10594# Check whether --with-boot-jdk was given.
10595if test "${with_boot_jdk+set}" = set; then :
10596  withval=$with_boot_jdk;
10597fi
10598
10599
10600# We look for the Boot JDK through various means, going from more certain to
10601# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10602# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10603# must check if this is indeed valid; otherwise we'll continue looking.
10604
10605# Test: Is bootjdk explicitely set by command line arguments?
10606
10607  if test "x$BOOT_JDK_FOUND" = xno; then
10608    # Now execute the test
10609
10610if test "x$with_boot_jdk" != x; then
10611    BOOT_JDK=$with_boot_jdk
10612    BOOT_JDK_FOUND=maybe
10613    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10614$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10615fi
10616
10617
10618    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10619    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10620      # Do we have a bin/java?
10621      if test ! -x "$BOOT_JDK/bin/java"; then
10622        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10624        BOOT_JDK_FOUND=no
10625      else
10626        # Do we have a bin/javac?
10627        if test ! -x "$BOOT_JDK/bin/javac"; then
10628          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10630          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10631$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10632          BOOT_JDK_FOUND=no
10633        else
10634          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10635          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10636            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10638            BOOT_JDK_FOUND=no
10639          else
10640            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10641            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10642
10643            # Extra M4 quote needed to protect [] in grep expression.
10644            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10645            if test "x$FOUND_VERSION_78" = x; then
10646              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10648              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10649$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10650              BOOT_JDK_FOUND=no
10651            else
10652              # We're done! :-)
10653              BOOT_JDK_FOUND=yes
10654
10655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10656
10657  # Input might be given as Windows format, start by converting to
10658  # unix format.
10659  path="$BOOT_JDK"
10660  new_path=`$CYGPATH -u "$path"`
10661
10662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10665  # "foo.exe" is OK but "foo" is an error.
10666  #
10667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10668  # It is also a way to make sure we got the proper file name for the real test later on.
10669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10670  if test "x$test_shortpath" = x; then
10671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10673    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10674  fi
10675
10676  # Call helper function which possibly converts this using DOS-style short mode.
10677  # If so, the updated path is stored in $new_path.
10678
10679  input_path="$new_path"
10680  # Check if we need to convert this using DOS-style short mode. If the path
10681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10682  # take no chances and rewrite it.
10683  # Note: m4 eats our [], so we need to use [ and ] instead.
10684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10685  if test "x$has_forbidden_chars" != x; then
10686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10690      # Going to short mode and back again did indeed matter. Since short mode is
10691      # case insensitive, let's make it lowercase to improve readability.
10692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10693      # Now convert it back to Unix-stile (cygpath)
10694      input_path=`$CYGPATH -u "$shortmode_path"`
10695      new_path="$input_path"
10696    fi
10697  fi
10698
10699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10700  if test "x$test_cygdrive_prefix" = x; then
10701    # As a simple fix, exclude /usr/bin since it's not a real path.
10702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10704      # a path prefixed by /cygdrive for fixpath to work.
10705      new_path="$CYGWIN_ROOT_PATH$input_path"
10706    fi
10707  fi
10708
10709
10710  if test "x$path" != "x$new_path"; then
10711    BOOT_JDK="$new_path"
10712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10714  fi
10715
10716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10717
10718  path="$BOOT_JDK"
10719  has_colon=`$ECHO $path | $GREP ^.:`
10720  new_path="$path"
10721  if test "x$has_colon" = x; then
10722    # Not in mixed or Windows style, start by that.
10723    new_path=`cmd //c echo $path`
10724  fi
10725
10726
10727  input_path="$new_path"
10728  # Check if we need to convert this using DOS-style short mode. If the path
10729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10730  # take no chances and rewrite it.
10731  # Note: m4 eats our [], so we need to use [ and ] instead.
10732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10733  if test "x$has_forbidden_chars" != x; then
10734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10736  fi
10737
10738
10739  windows_path="$new_path"
10740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10741    unix_path=`$CYGPATH -u "$windows_path"`
10742    new_path="$unix_path"
10743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10745    new_path="$unix_path"
10746  fi
10747
10748  if test "x$path" != "x$new_path"; then
10749    BOOT_JDK="$new_path"
10750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10752  fi
10753
10754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10756
10757  else
10758    # We're on a posix platform. Hooray! :)
10759    path="$BOOT_JDK"
10760
10761    if test ! -f "$path" && test ! -d "$path"; then
10762      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10763    fi
10764
10765    has_space=`$ECHO "$path" | $GREP " "`
10766    if test "x$has_space" != x; then
10767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10770    fi
10771  fi
10772
10773              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10774$as_echo_n "checking for Boot JDK... " >&6; }
10775              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10776$as_echo "$BOOT_JDK" >&6; }
10777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10778$as_echo_n "checking Boot JDK version... " >&6; }
10779              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10780              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10781$as_echo "$BOOT_JDK_VERSION" >&6; }
10782            fi # end check jdk version
10783          fi # end check rt.jar
10784        fi # end check javac
10785      fi # end check java
10786    fi # end check boot jdk found
10787  fi
10788
10789if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10790  # Having specified an argument which is incorrect will produce an instant failure;
10791  # we should not go on looking
10792  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10793fi
10794
10795# Test: Is bootjdk available from builddeps?
10796
10797  if test "x$BOOT_JDK_FOUND" = xno; then
10798    # Now execute the test
10799
10800
10801
10802    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10803        # Source the builddeps file again, to make sure it uses the latest variables!
10804        . $builddepsfile
10805        # Look for a target and build machine specific resource!
10806        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10807        if test "x$resource" = x; then
10808            # Ok, lets instead look for a target specific resource
10809            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10810        fi
10811        if test "x$resource" = x; then
10812            # Ok, lets instead look for a build specific resource
10813            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10814        fi
10815        if test "x$resource" = x; then
10816            # Ok, lets instead look for a generic resource
10817            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10818            resource=${builddep_bootjdk}
10819        fi
10820        if test "x$resource" != x; then
10821            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10822$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10823	    # If the resource in the builddeps.conf file is an existing directory,
10824	    # for example /java/linux/cups
10825	    if test -d ${resource}; then
10826	       depdir=${resource}
10827	    else
10828
10829# bootjdk is for example mymodule
10830# $resource is for example libs/general/libmymod_1_2_3.zip
10831# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10832# $with_builddeps_dir is for example /localhome/builddeps
10833# depdir is the name of the variable into which we store the depdir, eg MYMOD
10834# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10835# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10836    filename=`basename $resource`
10837    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10838    filebase=${filename%%.*}
10839    extension=${filename#*.}
10840    installdir=$with_builddeps_dir/$filebase
10841    if test ! -f $installdir/$filename.unpacked; then
10842        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10843$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10844        if test ! -d $installdir; then
10845            mkdir -p $installdir
10846        fi
10847        if test ! -d $installdir; then
10848            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10849        fi
10850        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10851        touch $tmpfile
10852        if test ! -f $tmpfile; then
10853            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10854        fi
10855
10856    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10857    # $tmpfile is the local file name for the downloaded file.
10858    VALID_TOOL=no
10859    if test "x$BDEPS_FTP" = xwget; then
10860       VALID_TOOL=yes
10861       wget -O $tmpfile $with_builddeps_server/$resource
10862    fi
10863    if test "x$BDEPS_FTP" = xlftp; then
10864       VALID_TOOL=yes
10865       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10866    fi
10867    if test "x$BDEPS_FTP" = xftp; then
10868        VALID_TOOL=yes
10869        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10870        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10871        FTPUSERPWD=${FTPSERVER%%@*}
10872        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10873            FTPUSER=${userpwd%%:*}
10874            FTPPWD=${userpwd#*@}
10875            FTPSERVER=${FTPSERVER#*@}
10876        else
10877            FTPUSER=ftp
10878            FTPPWD=ftp
10879        fi
10880        # the "pass" command does not work on some
10881        # ftp clients (read ftp.exe) but if it works,
10882        # passive mode is better!
10883        (\
10884            echo "user $FTPUSER $FTPPWD"        ;\
10885            echo "pass"                         ;\
10886            echo "bin"                          ;\
10887            echo "get $FTPPATH $tmpfile"              ;\
10888        ) | ftp -in $FTPSERVER
10889    fi
10890    if test "x$VALID_TOOL" != xyes; then
10891       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10892    fi
10893
10894        mv $tmpfile $installdir/$filename
10895        if test ! -s $installdir/$filename; then
10896            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10897        fi
10898        case "$extension" in
10899            zip)  echo "Unzipping $installdir/$filename..."
10900               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10901            ;;
10902            tar.gz) echo "Untaring $installdir/$filename..."
10903               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10904            ;;
10905            tgz) echo "Untaring $installdir/$filename..."
10906               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10907            ;;
10908            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10909            ;;
10910        esac
10911    fi
10912    if test -f $installdir/$filename.unpacked; then
10913        depdir=$installdir
10914    fi
10915
10916	    fi
10917            # Source the builddeps file again, because in the previous command, the depdir
10918            # was updated to point at the current build dependency install directory.
10919            . $builddepsfile
10920            # Now extract variables from the builddeps.conf files.
10921            theroot=${builddep_bootjdk_ROOT}
10922            thecflags=${builddep_bootjdk_CFLAGS}
10923            thelibs=${builddep_bootjdk_LIBS}
10924            if test "x$depdir" = x; then
10925                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10926            fi
10927            BOOT_JDK=$depdir
10928            if test "x$theroot" != x; then
10929               BOOT_JDK="$theroot"
10930            fi
10931            if test "x$thecflags" != x; then
10932               BOOT_JDK_CFLAGS="$thecflags"
10933            fi
10934            if test "x$thelibs" != x; then
10935               BOOT_JDK_LIBS="$thelibs"
10936            fi
10937            BOOT_JDK_FOUND=maybe
10938            else BOOT_JDK_FOUND=no
10939
10940        fi
10941        else BOOT_JDK_FOUND=no
10942
10943    fi
10944
10945
10946
10947    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10948    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10949      # Do we have a bin/java?
10950      if test ! -x "$BOOT_JDK/bin/java"; then
10951        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10953        BOOT_JDK_FOUND=no
10954      else
10955        # Do we have a bin/javac?
10956        if test ! -x "$BOOT_JDK/bin/javac"; then
10957          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10959          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10960$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10961          BOOT_JDK_FOUND=no
10962        else
10963          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10964          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10965            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10967            BOOT_JDK_FOUND=no
10968          else
10969            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10970            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10971
10972            # Extra M4 quote needed to protect [] in grep expression.
10973            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10974            if test "x$FOUND_VERSION_78" = x; then
10975              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10977              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10978$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10979              BOOT_JDK_FOUND=no
10980            else
10981              # We're done! :-)
10982              BOOT_JDK_FOUND=yes
10983
10984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10985
10986  # Input might be given as Windows format, start by converting to
10987  # unix format.
10988  path="$BOOT_JDK"
10989  new_path=`$CYGPATH -u "$path"`
10990
10991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10994  # "foo.exe" is OK but "foo" is an error.
10995  #
10996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10997  # It is also a way to make sure we got the proper file name for the real test later on.
10998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10999  if test "x$test_shortpath" = x; then
11000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11002    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11003  fi
11004
11005  # Call helper function which possibly converts this using DOS-style short mode.
11006  # If so, the updated path is stored in $new_path.
11007
11008  input_path="$new_path"
11009  # Check if we need to convert this using DOS-style short mode. If the path
11010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11011  # take no chances and rewrite it.
11012  # Note: m4 eats our [], so we need to use [ and ] instead.
11013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11014  if test "x$has_forbidden_chars" != x; then
11015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11019      # Going to short mode and back again did indeed matter. Since short mode is
11020      # case insensitive, let's make it lowercase to improve readability.
11021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11022      # Now convert it back to Unix-stile (cygpath)
11023      input_path=`$CYGPATH -u "$shortmode_path"`
11024      new_path="$input_path"
11025    fi
11026  fi
11027
11028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11029  if test "x$test_cygdrive_prefix" = x; then
11030    # As a simple fix, exclude /usr/bin since it's not a real path.
11031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11033      # a path prefixed by /cygdrive for fixpath to work.
11034      new_path="$CYGWIN_ROOT_PATH$input_path"
11035    fi
11036  fi
11037
11038
11039  if test "x$path" != "x$new_path"; then
11040    BOOT_JDK="$new_path"
11041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11043  fi
11044
11045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11046
11047  path="$BOOT_JDK"
11048  has_colon=`$ECHO $path | $GREP ^.:`
11049  new_path="$path"
11050  if test "x$has_colon" = x; then
11051    # Not in mixed or Windows style, start by that.
11052    new_path=`cmd //c echo $path`
11053  fi
11054
11055
11056  input_path="$new_path"
11057  # Check if we need to convert this using DOS-style short mode. If the path
11058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11059  # take no chances and rewrite it.
11060  # Note: m4 eats our [], so we need to use [ and ] instead.
11061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11062  if test "x$has_forbidden_chars" != x; then
11063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11065  fi
11066
11067
11068  windows_path="$new_path"
11069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11070    unix_path=`$CYGPATH -u "$windows_path"`
11071    new_path="$unix_path"
11072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11074    new_path="$unix_path"
11075  fi
11076
11077  if test "x$path" != "x$new_path"; then
11078    BOOT_JDK="$new_path"
11079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11081  fi
11082
11083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11085
11086  else
11087    # We're on a posix platform. Hooray! :)
11088    path="$BOOT_JDK"
11089
11090    if test ! -f "$path" && test ! -d "$path"; then
11091      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11092    fi
11093
11094    has_space=`$ECHO "$path" | $GREP " "`
11095    if test "x$has_space" != x; then
11096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11099    fi
11100  fi
11101
11102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11103$as_echo_n "checking for Boot JDK... " >&6; }
11104              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11105$as_echo "$BOOT_JDK" >&6; }
11106              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11107$as_echo_n "checking Boot JDK version... " >&6; }
11108              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11109              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11110$as_echo "$BOOT_JDK_VERSION" >&6; }
11111            fi # end check jdk version
11112          fi # end check rt.jar
11113        fi # end check javac
11114      fi # end check java
11115    fi # end check boot jdk found
11116  fi
11117
11118
11119# Test: Is $JAVA_HOME set?
11120
11121  if test "x$BOOT_JDK_FOUND" = xno; then
11122    # Now execute the test
11123
11124    if test "x$JAVA_HOME" != x; then
11125        JAVA_HOME_PROCESSED="$JAVA_HOME"
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="$JAVA_HOME_PROCESSED"
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 JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11144$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11145    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$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    JAVA_HOME_PROCESSED="$new_path"
11184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11185$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11186  fi
11187
11188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11189
11190  path="$JAVA_HOME_PROCESSED"
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    JAVA_HOME_PROCESSED="$new_path"
11222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11223$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED 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="$JAVA_HOME_PROCESSED"
11232
11233    if test ! -f "$path" && test ! -d "$path"; then
11234      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11235    fi
11236
11237    has_space=`$ECHO "$path" | $GREP " "`
11238    if test "x$has_space" != x; then
11239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11240$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11241      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11242    fi
11243  fi
11244
11245        if test ! -d "$JAVA_HOME_PROCESSED"; then
11246            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11247$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11248        else
11249          # Aha, the user has set a JAVA_HOME
11250          # let us use that as the Boot JDK.
11251          BOOT_JDK="$JAVA_HOME_PROCESSED"
11252          BOOT_JDK_FOUND=maybe
11253          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11254$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11255        fi
11256    fi
11257
11258
11259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11261      # Do we have a bin/java?
11262      if test ! -x "$BOOT_JDK/bin/java"; then
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11265        BOOT_JDK_FOUND=no
11266      else
11267        # Do we have a bin/javac?
11268        if test ! -x "$BOOT_JDK/bin/javac"; then
11269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11273          BOOT_JDK_FOUND=no
11274        else
11275          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11276          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11277            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11279            BOOT_JDK_FOUND=no
11280          else
11281            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11282            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11283
11284            # Extra M4 quote needed to protect [] in grep expression.
11285            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11286            if test "x$FOUND_VERSION_78" = x; then
11287              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11289              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11290$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11291              BOOT_JDK_FOUND=no
11292            else
11293              # We're done! :-)
11294              BOOT_JDK_FOUND=yes
11295
11296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11297
11298  # Input might be given as Windows format, start by converting to
11299  # unix format.
11300  path="$BOOT_JDK"
11301  new_path=`$CYGPATH -u "$path"`
11302
11303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11306  # "foo.exe" is OK but "foo" is an error.
11307  #
11308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11309  # It is also a way to make sure we got the proper file name for the real test later on.
11310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11311  if test "x$test_shortpath" = x; then
11312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11314    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11315  fi
11316
11317  # Call helper function which possibly converts this using DOS-style short mode.
11318  # If so, the updated path is stored in $new_path.
11319
11320  input_path="$new_path"
11321  # Check if we need to convert this using DOS-style short mode. If the path
11322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11323  # take no chances and rewrite it.
11324  # Note: m4 eats our [], so we need to use [ and ] instead.
11325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11326  if test "x$has_forbidden_chars" != x; then
11327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11331      # Going to short mode and back again did indeed matter. Since short mode is
11332      # case insensitive, let's make it lowercase to improve readability.
11333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11334      # Now convert it back to Unix-stile (cygpath)
11335      input_path=`$CYGPATH -u "$shortmode_path"`
11336      new_path="$input_path"
11337    fi
11338  fi
11339
11340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11341  if test "x$test_cygdrive_prefix" = x; then
11342    # As a simple fix, exclude /usr/bin since it's not a real path.
11343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11345      # a path prefixed by /cygdrive for fixpath to work.
11346      new_path="$CYGWIN_ROOT_PATH$input_path"
11347    fi
11348  fi
11349
11350
11351  if test "x$path" != "x$new_path"; then
11352    BOOT_JDK="$new_path"
11353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11355  fi
11356
11357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11358
11359  path="$BOOT_JDK"
11360  has_colon=`$ECHO $path | $GREP ^.:`
11361  new_path="$path"
11362  if test "x$has_colon" = x; then
11363    # Not in mixed or Windows style, start by that.
11364    new_path=`cmd //c echo $path`
11365  fi
11366
11367
11368  input_path="$new_path"
11369  # Check if we need to convert this using DOS-style short mode. If the path
11370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11371  # take no chances and rewrite it.
11372  # Note: m4 eats our [], so we need to use [ and ] instead.
11373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11374  if test "x$has_forbidden_chars" != x; then
11375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11377  fi
11378
11379
11380  windows_path="$new_path"
11381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11382    unix_path=`$CYGPATH -u "$windows_path"`
11383    new_path="$unix_path"
11384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11386    new_path="$unix_path"
11387  fi
11388
11389  if test "x$path" != "x$new_path"; then
11390    BOOT_JDK="$new_path"
11391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11393  fi
11394
11395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11397
11398  else
11399    # We're on a posix platform. Hooray! :)
11400    path="$BOOT_JDK"
11401
11402    if test ! -f "$path" && test ! -d "$path"; then
11403      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11404    fi
11405
11406    has_space=`$ECHO "$path" | $GREP " "`
11407    if test "x$has_space" != x; then
11408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11410      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11411    fi
11412  fi
11413
11414              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11415$as_echo_n "checking for Boot JDK... " >&6; }
11416              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11417$as_echo "$BOOT_JDK" >&6; }
11418              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11419$as_echo_n "checking Boot JDK version... " >&6; }
11420              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11421              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11422$as_echo "$BOOT_JDK_VERSION" >&6; }
11423            fi # end check jdk version
11424          fi # end check rt.jar
11425        fi # end check javac
11426      fi # end check java
11427    fi # end check boot jdk found
11428  fi
11429
11430
11431# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11432
11433  if test "x$BOOT_JDK_FOUND" = xno; then
11434    # Now execute the test
11435
11436    if test -x /usr/libexec/java_home; then
11437        BOOT_JDK=`/usr/libexec/java_home`
11438        BOOT_JDK_FOUND=maybe
11439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11440$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11441    fi
11442
11443
11444    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11445    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11446      # Do we have a bin/java?
11447      if test ! -x "$BOOT_JDK/bin/java"; then
11448        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11450        BOOT_JDK_FOUND=no
11451      else
11452        # Do we have a bin/javac?
11453        if test ! -x "$BOOT_JDK/bin/javac"; then
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11457$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11458          BOOT_JDK_FOUND=no
11459        else
11460          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11461          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11462            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11464            BOOT_JDK_FOUND=no
11465          else
11466            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11467            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11468
11469            # Extra M4 quote needed to protect [] in grep expression.
11470            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11471            if test "x$FOUND_VERSION_78" = x; then
11472              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11474              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11475$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11476              BOOT_JDK_FOUND=no
11477            else
11478              # We're done! :-)
11479              BOOT_JDK_FOUND=yes
11480
11481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11482
11483  # Input might be given as Windows format, start by converting to
11484  # unix format.
11485  path="$BOOT_JDK"
11486  new_path=`$CYGPATH -u "$path"`
11487
11488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11491  # "foo.exe" is OK but "foo" is an error.
11492  #
11493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11494  # It is also a way to make sure we got the proper file name for the real test later on.
11495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11496  if test "x$test_shortpath" = x; then
11497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11499    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11500  fi
11501
11502  # Call helper function which possibly converts this using DOS-style short mode.
11503  # If so, the updated path is stored in $new_path.
11504
11505  input_path="$new_path"
11506  # Check if we need to convert this using DOS-style short mode. If the path
11507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11508  # take no chances and rewrite it.
11509  # Note: m4 eats our [], so we need to use [ and ] instead.
11510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11511  if test "x$has_forbidden_chars" != x; then
11512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11516      # Going to short mode and back again did indeed matter. Since short mode is
11517      # case insensitive, let's make it lowercase to improve readability.
11518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11519      # Now convert it back to Unix-stile (cygpath)
11520      input_path=`$CYGPATH -u "$shortmode_path"`
11521      new_path="$input_path"
11522    fi
11523  fi
11524
11525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11526  if test "x$test_cygdrive_prefix" = x; then
11527    # As a simple fix, exclude /usr/bin since it's not a real path.
11528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11530      # a path prefixed by /cygdrive for fixpath to work.
11531      new_path="$CYGWIN_ROOT_PATH$input_path"
11532    fi
11533  fi
11534
11535
11536  if test "x$path" != "x$new_path"; then
11537    BOOT_JDK="$new_path"
11538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11540  fi
11541
11542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11543
11544  path="$BOOT_JDK"
11545  has_colon=`$ECHO $path | $GREP ^.:`
11546  new_path="$path"
11547  if test "x$has_colon" = x; then
11548    # Not in mixed or Windows style, start by that.
11549    new_path=`cmd //c echo $path`
11550  fi
11551
11552
11553  input_path="$new_path"
11554  # Check if we need to convert this using DOS-style short mode. If the path
11555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11556  # take no chances and rewrite it.
11557  # Note: m4 eats our [], so we need to use [ and ] instead.
11558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11559  if test "x$has_forbidden_chars" != x; then
11560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11562  fi
11563
11564
11565  windows_path="$new_path"
11566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11567    unix_path=`$CYGPATH -u "$windows_path"`
11568    new_path="$unix_path"
11569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11571    new_path="$unix_path"
11572  fi
11573
11574  if test "x$path" != "x$new_path"; then
11575    BOOT_JDK="$new_path"
11576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11578  fi
11579
11580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11582
11583  else
11584    # We're on a posix platform. Hooray! :)
11585    path="$BOOT_JDK"
11586
11587    if test ! -f "$path" && test ! -d "$path"; then
11588      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11589    fi
11590
11591    has_space=`$ECHO "$path" | $GREP " "`
11592    if test "x$has_space" != x; then
11593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11595      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11596    fi
11597  fi
11598
11599              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11600$as_echo_n "checking for Boot JDK... " >&6; }
11601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11602$as_echo "$BOOT_JDK" >&6; }
11603              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11604$as_echo_n "checking Boot JDK version... " >&6; }
11605              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11607$as_echo "$BOOT_JDK_VERSION" >&6; }
11608            fi # end check jdk version
11609          fi # end check rt.jar
11610        fi # end check javac
11611      fi # end check java
11612    fi # end check boot jdk found
11613  fi
11614
11615
11616# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11617
11618  if test "x$BOOT_JDK_FOUND" = xno; then
11619    # Now execute the test
11620
11621    # Extract the first word of "javac", so it can be a program name with args.
11622set dummy javac; ac_word=$2
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11624$as_echo_n "checking for $ac_word... " >&6; }
11625if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11626  $as_echo_n "(cached) " >&6
11627else
11628  case $JAVAC_CHECK in
11629  [\\/]* | ?:[\\/]*)
11630  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11631  ;;
11632  *)
11633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11634for as_dir in $PATH
11635do
11636  IFS=$as_save_IFS
11637  test -z "$as_dir" && as_dir=.
11638    for ac_exec_ext in '' $ac_executable_extensions; do
11639  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11640    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11642    break 2
11643  fi
11644done
11645  done
11646IFS=$as_save_IFS
11647
11648  ;;
11649esac
11650fi
11651JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11652if test -n "$JAVAC_CHECK"; then
11653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11654$as_echo "$JAVAC_CHECK" >&6; }
11655else
11656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11657$as_echo "no" >&6; }
11658fi
11659
11660
11661    # Extract the first word of "java", so it can be a program name with args.
11662set dummy java; ac_word=$2
11663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11664$as_echo_n "checking for $ac_word... " >&6; }
11665if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11666  $as_echo_n "(cached) " >&6
11667else
11668  case $JAVA_CHECK in
11669  [\\/]* | ?:[\\/]*)
11670  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11671  ;;
11672  *)
11673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11674for as_dir in $PATH
11675do
11676  IFS=$as_save_IFS
11677  test -z "$as_dir" && as_dir=.
11678    for ac_exec_ext in '' $ac_executable_extensions; do
11679  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11680    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11682    break 2
11683  fi
11684done
11685  done
11686IFS=$as_save_IFS
11687
11688  ;;
11689esac
11690fi
11691JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11692if test -n "$JAVA_CHECK"; then
11693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11694$as_echo "$JAVA_CHECK" >&6; }
11695else
11696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11697$as_echo "no" >&6; }
11698fi
11699
11700
11701    BINARY="$JAVAC_CHECK"
11702    if test "x$JAVAC_CHECK" = x; then
11703        BINARY="$JAVA_CHECK"
11704    fi
11705    if test "x$BINARY" != x; then
11706        # So there is a java(c) binary, it might be part of a JDK.
11707        # Lets find the JDK/JRE directory by following symbolic links.
11708        # Linux/GNU systems often have links from /usr/bin/java to
11709        # /etc/alternatives/java to the real JDK binary.
11710
11711    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11712        # Follow a chain of symbolic links. Use readlink
11713        # where it exists, else fall back to horribly
11714        # complicated shell code.
11715        if test "x$READLINK_TESTED" != yes; then
11716            # On MacOSX there is a readlink tool with a different
11717            # purpose than the GNU readlink tool. Check the found readlink.
11718            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11719            if test "x$ISGNU" = x; then
11720                 # A readlink that we do not know how to use.
11721                 # Are there other non-GNU readlinks out there?
11722                 READLINK_TESTED=yes
11723                 READLINK=
11724            fi
11725        fi
11726
11727        if test "x$READLINK" != x; then
11728            BINARY=`$READLINK -f $BINARY`
11729        else
11730            # Save the current directory for restoring afterwards
11731            STARTDIR=$PWD
11732            COUNTER=0
11733            sym_link_dir=`$DIRNAME $BINARY`
11734            sym_link_file=`$BASENAME $BINARY`
11735            # Use the system pwd and not the shell builtin to resolve directory symlinks
11736            cd $sym_link_dir
11737            cd `$THEPWDCMD`
11738            sym_link_dir=`$THEPWDCMD`
11739            # Resolve file symlinks
11740            while test $COUNTER -lt 20; do
11741                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11742                if test "x$ISLINK" == x; then
11743                    # This is not a symbolic link! We are done!
11744                    break
11745                fi
11746                # Again resolve directory symlinks since the target of the just found
11747                # link could be in a different directory
11748                cd `$DIRNAME $ISLINK`
11749                sym_link_dir=`$THEPWDCMD`
11750                sym_link_file=`$BASENAME $ISLINK`
11751                let COUNTER=COUNTER+1
11752            done
11753            cd $STARTDIR
11754            BINARY=$sym_link_dir/$sym_link_file
11755        fi
11756    fi
11757
11758        BOOT_JDK=`dirname "$BINARY"`
11759        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11760        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11761            # Looks like we found ourselves an JDK
11762            BOOT_JDK_FOUND=maybe
11763            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11764$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11765        fi
11766    fi
11767
11768
11769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11771      # Do we have a bin/java?
11772      if test ! -x "$BOOT_JDK/bin/java"; then
11773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11775        BOOT_JDK_FOUND=no
11776      else
11777        # Do we have a bin/javac?
11778        if test ! -x "$BOOT_JDK/bin/javac"; then
11779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11783          BOOT_JDK_FOUND=no
11784        else
11785          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11786          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11789            BOOT_JDK_FOUND=no
11790          else
11791            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11793
11794            # Extra M4 quote needed to protect [] in grep expression.
11795            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11796            if test "x$FOUND_VERSION_78" = x; then
11797              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11799              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11800$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11801              BOOT_JDK_FOUND=no
11802            else
11803              # We're done! :-)
11804              BOOT_JDK_FOUND=yes
11805
11806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11807
11808  # Input might be given as Windows format, start by converting to
11809  # unix format.
11810  path="$BOOT_JDK"
11811  new_path=`$CYGPATH -u "$path"`
11812
11813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11816  # "foo.exe" is OK but "foo" is an error.
11817  #
11818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11819  # It is also a way to make sure we got the proper file name for the real test later on.
11820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11821  if test "x$test_shortpath" = x; then
11822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11825  fi
11826
11827  # Call helper function which possibly converts this using DOS-style short mode.
11828  # If so, the updated path is stored in $new_path.
11829
11830  input_path="$new_path"
11831  # Check if we need to convert this using DOS-style short mode. If the path
11832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11833  # take no chances and rewrite it.
11834  # Note: m4 eats our [], so we need to use [ and ] instead.
11835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11836  if test "x$has_forbidden_chars" != x; then
11837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11841      # Going to short mode and back again did indeed matter. Since short mode is
11842      # case insensitive, let's make it lowercase to improve readability.
11843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11844      # Now convert it back to Unix-stile (cygpath)
11845      input_path=`$CYGPATH -u "$shortmode_path"`
11846      new_path="$input_path"
11847    fi
11848  fi
11849
11850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11851  if test "x$test_cygdrive_prefix" = x; then
11852    # As a simple fix, exclude /usr/bin since it's not a real path.
11853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11855      # a path prefixed by /cygdrive for fixpath to work.
11856      new_path="$CYGWIN_ROOT_PATH$input_path"
11857    fi
11858  fi
11859
11860
11861  if test "x$path" != "x$new_path"; then
11862    BOOT_JDK="$new_path"
11863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11865  fi
11866
11867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11868
11869  path="$BOOT_JDK"
11870  has_colon=`$ECHO $path | $GREP ^.:`
11871  new_path="$path"
11872  if test "x$has_colon" = x; then
11873    # Not in mixed or Windows style, start by that.
11874    new_path=`cmd //c echo $path`
11875  fi
11876
11877
11878  input_path="$new_path"
11879  # Check if we need to convert this using DOS-style short mode. If the path
11880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11881  # take no chances and rewrite it.
11882  # Note: m4 eats our [], so we need to use [ and ] instead.
11883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11884  if test "x$has_forbidden_chars" != x; then
11885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11887  fi
11888
11889
11890  windows_path="$new_path"
11891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11892    unix_path=`$CYGPATH -u "$windows_path"`
11893    new_path="$unix_path"
11894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11896    new_path="$unix_path"
11897  fi
11898
11899  if test "x$path" != "x$new_path"; then
11900    BOOT_JDK="$new_path"
11901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11903  fi
11904
11905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11907
11908  else
11909    # We're on a posix platform. Hooray! :)
11910    path="$BOOT_JDK"
11911
11912    if test ! -f "$path" && test ! -d "$path"; then
11913      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11914    fi
11915
11916    has_space=`$ECHO "$path" | $GREP " "`
11917    if test "x$has_space" != x; then
11918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11920      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11921    fi
11922  fi
11923
11924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11925$as_echo_n "checking for Boot JDK... " >&6; }
11926              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11927$as_echo "$BOOT_JDK" >&6; }
11928              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11929$as_echo_n "checking Boot JDK version... " >&6; }
11930              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11931              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11932$as_echo "$BOOT_JDK_VERSION" >&6; }
11933            fi # end check jdk version
11934          fi # end check rt.jar
11935        fi # end check javac
11936      fi # end check java
11937    fi # end check boot jdk found
11938  fi
11939
11940
11941# Test: Is there a JDK installed in default, well-known locations?
11942
11943  if test "x$BOOT_JDK_FOUND" = xno; then
11944    # Now execute the test
11945
11946  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11947
11948  if test "x$BOOT_JDK_FOUND" = xno; then
11949    # Now execute the test
11950
11951  if test "x$ProgramW6432" != x; then
11952    VIRTUAL_DIR="$ProgramW6432/Java"
11953
11954  windows_path="$VIRTUAL_DIR"
11955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11956    unix_path=`$CYGPATH -u "$windows_path"`
11957    VIRTUAL_DIR="$unix_path"
11958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11960    VIRTUAL_DIR="$unix_path"
11961  fi
11962
11963
11964  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11965  BOOT_JDK_SUFFIX=""
11966  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11967  if test "x$ALL_JDKS_FOUND" != x; then
11968    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11969
11970  if test "x$BOOT_JDK_FOUND" = xno; then
11971    # Now execute the test
11972
11973        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11974        if test -d "$BOOT_JDK"; then
11975          BOOT_JDK_FOUND=maybe
11976          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11977$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11978        fi
11979
11980
11981    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11982    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11983      # Do we have a bin/java?
11984      if test ! -x "$BOOT_JDK/bin/java"; then
11985        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11987        BOOT_JDK_FOUND=no
11988      else
11989        # Do we have a bin/javac?
11990        if test ! -x "$BOOT_JDK/bin/javac"; then
11991          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11994$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11995          BOOT_JDK_FOUND=no
11996        else
11997          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11998          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11999            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12001            BOOT_JDK_FOUND=no
12002          else
12003            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12004            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12005
12006            # Extra M4 quote needed to protect [] in grep expression.
12007            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12008            if test "x$FOUND_VERSION_78" = x; then
12009              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12012$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12013              BOOT_JDK_FOUND=no
12014            else
12015              # We're done! :-)
12016              BOOT_JDK_FOUND=yes
12017
12018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12019
12020  # Input might be given as Windows format, start by converting to
12021  # unix format.
12022  path="$BOOT_JDK"
12023  new_path=`$CYGPATH -u "$path"`
12024
12025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12028  # "foo.exe" is OK but "foo" is an error.
12029  #
12030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12031  # It is also a way to make sure we got the proper file name for the real test later on.
12032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12033  if test "x$test_shortpath" = x; then
12034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12037  fi
12038
12039  # Call helper function which possibly converts this using DOS-style short mode.
12040  # If so, the updated path is stored in $new_path.
12041
12042  input_path="$new_path"
12043  # Check if we need to convert this using DOS-style short mode. If the path
12044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12045  # take no chances and rewrite it.
12046  # Note: m4 eats our [], so we need to use [ and ] instead.
12047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12048  if test "x$has_forbidden_chars" != x; then
12049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12053      # Going to short mode and back again did indeed matter. Since short mode is
12054      # case insensitive, let's make it lowercase to improve readability.
12055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12056      # Now convert it back to Unix-stile (cygpath)
12057      input_path=`$CYGPATH -u "$shortmode_path"`
12058      new_path="$input_path"
12059    fi
12060  fi
12061
12062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12063  if test "x$test_cygdrive_prefix" = x; then
12064    # As a simple fix, exclude /usr/bin since it's not a real path.
12065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12067      # a path prefixed by /cygdrive for fixpath to work.
12068      new_path="$CYGWIN_ROOT_PATH$input_path"
12069    fi
12070  fi
12071
12072
12073  if test "x$path" != "x$new_path"; then
12074    BOOT_JDK="$new_path"
12075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12077  fi
12078
12079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12080
12081  path="$BOOT_JDK"
12082  has_colon=`$ECHO $path | $GREP ^.:`
12083  new_path="$path"
12084  if test "x$has_colon" = x; then
12085    # Not in mixed or Windows style, start by that.
12086    new_path=`cmd //c echo $path`
12087  fi
12088
12089
12090  input_path="$new_path"
12091  # Check if we need to convert this using DOS-style short mode. If the path
12092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12093  # take no chances and rewrite it.
12094  # Note: m4 eats our [], so we need to use [ and ] instead.
12095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12096  if test "x$has_forbidden_chars" != x; then
12097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12099  fi
12100
12101
12102  windows_path="$new_path"
12103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12104    unix_path=`$CYGPATH -u "$windows_path"`
12105    new_path="$unix_path"
12106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12108    new_path="$unix_path"
12109  fi
12110
12111  if test "x$path" != "x$new_path"; then
12112    BOOT_JDK="$new_path"
12113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12115  fi
12116
12117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12119
12120  else
12121    # We're on a posix platform. Hooray! :)
12122    path="$BOOT_JDK"
12123
12124    if test ! -f "$path" && test ! -d "$path"; then
12125      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12126    fi
12127
12128    has_space=`$ECHO "$path" | $GREP " "`
12129    if test "x$has_space" != x; then
12130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12132      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12133    fi
12134  fi
12135
12136              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12137$as_echo_n "checking for Boot JDK... " >&6; }
12138              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12139$as_echo "$BOOT_JDK" >&6; }
12140              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12141$as_echo_n "checking Boot JDK version... " >&6; }
12142              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12144$as_echo "$BOOT_JDK_VERSION" >&6; }
12145            fi # end check jdk version
12146          fi # end check rt.jar
12147        fi # end check javac
12148      fi # end check java
12149    fi # end check boot jdk found
12150  fi
12151
12152    done
12153  fi
12154
12155  fi
12156
12157
12158    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12159    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12160      # Do we have a bin/java?
12161      if test ! -x "$BOOT_JDK/bin/java"; then
12162        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12164        BOOT_JDK_FOUND=no
12165      else
12166        # Do we have a bin/javac?
12167        if test ! -x "$BOOT_JDK/bin/javac"; then
12168          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12170          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12171$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12172          BOOT_JDK_FOUND=no
12173        else
12174          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12175          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12176            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12178            BOOT_JDK_FOUND=no
12179          else
12180            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12182
12183            # Extra M4 quote needed to protect [] in grep expression.
12184            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12185            if test "x$FOUND_VERSION_78" = x; then
12186              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12188              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12189$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12190              BOOT_JDK_FOUND=no
12191            else
12192              # We're done! :-)
12193              BOOT_JDK_FOUND=yes
12194
12195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12196
12197  # Input might be given as Windows format, start by converting to
12198  # unix format.
12199  path="$BOOT_JDK"
12200  new_path=`$CYGPATH -u "$path"`
12201
12202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12205  # "foo.exe" is OK but "foo" is an error.
12206  #
12207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12208  # It is also a way to make sure we got the proper file name for the real test later on.
12209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12210  if test "x$test_shortpath" = x; then
12211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12214  fi
12215
12216  # Call helper function which possibly converts this using DOS-style short mode.
12217  # If so, the updated path is stored in $new_path.
12218
12219  input_path="$new_path"
12220  # Check if we need to convert this using DOS-style short mode. If the path
12221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12222  # take no chances and rewrite it.
12223  # Note: m4 eats our [], so we need to use [ and ] instead.
12224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12225  if test "x$has_forbidden_chars" != x; then
12226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12230      # Going to short mode and back again did indeed matter. Since short mode is
12231      # case insensitive, let's make it lowercase to improve readability.
12232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12233      # Now convert it back to Unix-stile (cygpath)
12234      input_path=`$CYGPATH -u "$shortmode_path"`
12235      new_path="$input_path"
12236    fi
12237  fi
12238
12239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12240  if test "x$test_cygdrive_prefix" = x; then
12241    # As a simple fix, exclude /usr/bin since it's not a real path.
12242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12244      # a path prefixed by /cygdrive for fixpath to work.
12245      new_path="$CYGWIN_ROOT_PATH$input_path"
12246    fi
12247  fi
12248
12249
12250  if test "x$path" != "x$new_path"; then
12251    BOOT_JDK="$new_path"
12252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12254  fi
12255
12256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12257
12258  path="$BOOT_JDK"
12259  has_colon=`$ECHO $path | $GREP ^.:`
12260  new_path="$path"
12261  if test "x$has_colon" = x; then
12262    # Not in mixed or Windows style, start by that.
12263    new_path=`cmd //c echo $path`
12264  fi
12265
12266
12267  input_path="$new_path"
12268  # Check if we need to convert this using DOS-style short mode. If the path
12269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12270  # take no chances and rewrite it.
12271  # Note: m4 eats our [], so we need to use [ and ] instead.
12272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12273  if test "x$has_forbidden_chars" != x; then
12274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12276  fi
12277
12278
12279  windows_path="$new_path"
12280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12281    unix_path=`$CYGPATH -u "$windows_path"`
12282    new_path="$unix_path"
12283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12285    new_path="$unix_path"
12286  fi
12287
12288  if test "x$path" != "x$new_path"; then
12289    BOOT_JDK="$new_path"
12290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12292  fi
12293
12294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12296
12297  else
12298    # We're on a posix platform. Hooray! :)
12299    path="$BOOT_JDK"
12300
12301    if test ! -f "$path" && test ! -d "$path"; then
12302      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12303    fi
12304
12305    has_space=`$ECHO "$path" | $GREP " "`
12306    if test "x$has_space" != x; then
12307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12309      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12310    fi
12311  fi
12312
12313              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12314$as_echo_n "checking for Boot JDK... " >&6; }
12315              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12316$as_echo "$BOOT_JDK" >&6; }
12317              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12318$as_echo_n "checking Boot JDK version... " >&6; }
12319              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12321$as_echo "$BOOT_JDK_VERSION" >&6; }
12322            fi # end check jdk version
12323          fi # end check rt.jar
12324        fi # end check javac
12325      fi # end check java
12326    fi # end check boot jdk found
12327  fi
12328
12329
12330  if test "x$BOOT_JDK_FOUND" = xno; then
12331    # Now execute the test
12332
12333  if test "x$PROGRAMW6432" != x; then
12334    VIRTUAL_DIR="$PROGRAMW6432/Java"
12335
12336  windows_path="$VIRTUAL_DIR"
12337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12338    unix_path=`$CYGPATH -u "$windows_path"`
12339    VIRTUAL_DIR="$unix_path"
12340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12342    VIRTUAL_DIR="$unix_path"
12343  fi
12344
12345
12346  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12347  BOOT_JDK_SUFFIX=""
12348  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12349  if test "x$ALL_JDKS_FOUND" != x; then
12350    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12351
12352  if test "x$BOOT_JDK_FOUND" = xno; then
12353    # Now execute the test
12354
12355        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12356        if test -d "$BOOT_JDK"; then
12357          BOOT_JDK_FOUND=maybe
12358          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12359$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12360        fi
12361
12362
12363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12365      # Do we have a bin/java?
12366      if test ! -x "$BOOT_JDK/bin/java"; then
12367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12369        BOOT_JDK_FOUND=no
12370      else
12371        # Do we have a bin/javac?
12372        if test ! -x "$BOOT_JDK/bin/javac"; then
12373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12377          BOOT_JDK_FOUND=no
12378        else
12379          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12380          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12383            BOOT_JDK_FOUND=no
12384          else
12385            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12387
12388            # Extra M4 quote needed to protect [] in grep expression.
12389            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12390            if test "x$FOUND_VERSION_78" = x; then
12391              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12393              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12394$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12395              BOOT_JDK_FOUND=no
12396            else
12397              # We're done! :-)
12398              BOOT_JDK_FOUND=yes
12399
12400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12401
12402  # Input might be given as Windows format, start by converting to
12403  # unix format.
12404  path="$BOOT_JDK"
12405  new_path=`$CYGPATH -u "$path"`
12406
12407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12410  # "foo.exe" is OK but "foo" is an error.
12411  #
12412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12413  # It is also a way to make sure we got the proper file name for the real test later on.
12414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12415  if test "x$test_shortpath" = x; then
12416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12419  fi
12420
12421  # Call helper function which possibly converts this using DOS-style short mode.
12422  # If so, the updated path is stored in $new_path.
12423
12424  input_path="$new_path"
12425  # Check if we need to convert this using DOS-style short mode. If the path
12426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12427  # take no chances and rewrite it.
12428  # Note: m4 eats our [], so we need to use [ and ] instead.
12429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12430  if test "x$has_forbidden_chars" != x; then
12431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12435      # Going to short mode and back again did indeed matter. Since short mode is
12436      # case insensitive, let's make it lowercase to improve readability.
12437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12438      # Now convert it back to Unix-stile (cygpath)
12439      input_path=`$CYGPATH -u "$shortmode_path"`
12440      new_path="$input_path"
12441    fi
12442  fi
12443
12444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12445  if test "x$test_cygdrive_prefix" = x; then
12446    # As a simple fix, exclude /usr/bin since it's not a real path.
12447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12449      # a path prefixed by /cygdrive for fixpath to work.
12450      new_path="$CYGWIN_ROOT_PATH$input_path"
12451    fi
12452  fi
12453
12454
12455  if test "x$path" != "x$new_path"; then
12456    BOOT_JDK="$new_path"
12457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12459  fi
12460
12461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12462
12463  path="$BOOT_JDK"
12464  has_colon=`$ECHO $path | $GREP ^.:`
12465  new_path="$path"
12466  if test "x$has_colon" = x; then
12467    # Not in mixed or Windows style, start by that.
12468    new_path=`cmd //c echo $path`
12469  fi
12470
12471
12472  input_path="$new_path"
12473  # Check if we need to convert this using DOS-style short mode. If the path
12474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12475  # take no chances and rewrite it.
12476  # Note: m4 eats our [], so we need to use [ and ] instead.
12477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12478  if test "x$has_forbidden_chars" != x; then
12479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12481  fi
12482
12483
12484  windows_path="$new_path"
12485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12486    unix_path=`$CYGPATH -u "$windows_path"`
12487    new_path="$unix_path"
12488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12490    new_path="$unix_path"
12491  fi
12492
12493  if test "x$path" != "x$new_path"; then
12494    BOOT_JDK="$new_path"
12495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12497  fi
12498
12499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12501
12502  else
12503    # We're on a posix platform. Hooray! :)
12504    path="$BOOT_JDK"
12505
12506    if test ! -f "$path" && test ! -d "$path"; then
12507      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12508    fi
12509
12510    has_space=`$ECHO "$path" | $GREP " "`
12511    if test "x$has_space" != x; then
12512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12515    fi
12516  fi
12517
12518              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12519$as_echo_n "checking for Boot JDK... " >&6; }
12520              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12521$as_echo "$BOOT_JDK" >&6; }
12522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12523$as_echo_n "checking Boot JDK version... " >&6; }
12524              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12525              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12526$as_echo "$BOOT_JDK_VERSION" >&6; }
12527            fi # end check jdk version
12528          fi # end check rt.jar
12529        fi # end check javac
12530      fi # end check java
12531    fi # end check boot jdk found
12532  fi
12533
12534    done
12535  fi
12536
12537  fi
12538
12539
12540    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12541    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12542      # Do we have a bin/java?
12543      if test ! -x "$BOOT_JDK/bin/java"; then
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12546        BOOT_JDK_FOUND=no
12547      else
12548        # Do we have a bin/javac?
12549        if test ! -x "$BOOT_JDK/bin/javac"; then
12550          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12552          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12553$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12554          BOOT_JDK_FOUND=no
12555        else
12556          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12557          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12558            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12560            BOOT_JDK_FOUND=no
12561          else
12562            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12564
12565            # Extra M4 quote needed to protect [] in grep expression.
12566            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12567            if test "x$FOUND_VERSION_78" = x; then
12568              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12570              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12571$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12572              BOOT_JDK_FOUND=no
12573            else
12574              # We're done! :-)
12575              BOOT_JDK_FOUND=yes
12576
12577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12578
12579  # Input might be given as Windows format, start by converting to
12580  # unix format.
12581  path="$BOOT_JDK"
12582  new_path=`$CYGPATH -u "$path"`
12583
12584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12587  # "foo.exe" is OK but "foo" is an error.
12588  #
12589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12590  # It is also a way to make sure we got the proper file name for the real test later on.
12591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12592  if test "x$test_shortpath" = x; then
12593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12596  fi
12597
12598  # Call helper function which possibly converts this using DOS-style short mode.
12599  # If so, the updated path is stored in $new_path.
12600
12601  input_path="$new_path"
12602  # Check if we need to convert this using DOS-style short mode. If the path
12603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12604  # take no chances and rewrite it.
12605  # Note: m4 eats our [], so we need to use [ and ] instead.
12606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12607  if test "x$has_forbidden_chars" != x; then
12608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12612      # Going to short mode and back again did indeed matter. Since short mode is
12613      # case insensitive, let's make it lowercase to improve readability.
12614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12615      # Now convert it back to Unix-stile (cygpath)
12616      input_path=`$CYGPATH -u "$shortmode_path"`
12617      new_path="$input_path"
12618    fi
12619  fi
12620
12621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12622  if test "x$test_cygdrive_prefix" = x; then
12623    # As a simple fix, exclude /usr/bin since it's not a real path.
12624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12626      # a path prefixed by /cygdrive for fixpath to work.
12627      new_path="$CYGWIN_ROOT_PATH$input_path"
12628    fi
12629  fi
12630
12631
12632  if test "x$path" != "x$new_path"; then
12633    BOOT_JDK="$new_path"
12634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12636  fi
12637
12638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639
12640  path="$BOOT_JDK"
12641  has_colon=`$ECHO $path | $GREP ^.:`
12642  new_path="$path"
12643  if test "x$has_colon" = x; then
12644    # Not in mixed or Windows style, start by that.
12645    new_path=`cmd //c echo $path`
12646  fi
12647
12648
12649  input_path="$new_path"
12650  # Check if we need to convert this using DOS-style short mode. If the path
12651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12652  # take no chances and rewrite it.
12653  # Note: m4 eats our [], so we need to use [ and ] instead.
12654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12655  if test "x$has_forbidden_chars" != x; then
12656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12658  fi
12659
12660
12661  windows_path="$new_path"
12662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12663    unix_path=`$CYGPATH -u "$windows_path"`
12664    new_path="$unix_path"
12665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12667    new_path="$unix_path"
12668  fi
12669
12670  if test "x$path" != "x$new_path"; then
12671    BOOT_JDK="$new_path"
12672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12674  fi
12675
12676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12678
12679  else
12680    # We're on a posix platform. Hooray! :)
12681    path="$BOOT_JDK"
12682
12683    if test ! -f "$path" && test ! -d "$path"; then
12684      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12685    fi
12686
12687    has_space=`$ECHO "$path" | $GREP " "`
12688    if test "x$has_space" != x; then
12689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12691      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12692    fi
12693  fi
12694
12695              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12696$as_echo_n "checking for Boot JDK... " >&6; }
12697              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12698$as_echo "$BOOT_JDK" >&6; }
12699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12700$as_echo_n "checking Boot JDK version... " >&6; }
12701              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12702              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12703$as_echo "$BOOT_JDK_VERSION" >&6; }
12704            fi # end check jdk version
12705          fi # end check rt.jar
12706        fi # end check javac
12707      fi # end check java
12708    fi # end check boot jdk found
12709  fi
12710
12711
12712  if test "x$BOOT_JDK_FOUND" = xno; then
12713    # Now execute the test
12714
12715  if test "x$PROGRAMFILES" != x; then
12716    VIRTUAL_DIR="$PROGRAMFILES/Java"
12717
12718  windows_path="$VIRTUAL_DIR"
12719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12720    unix_path=`$CYGPATH -u "$windows_path"`
12721    VIRTUAL_DIR="$unix_path"
12722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12724    VIRTUAL_DIR="$unix_path"
12725  fi
12726
12727
12728  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12729  BOOT_JDK_SUFFIX=""
12730  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12731  if test "x$ALL_JDKS_FOUND" != x; then
12732    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12733
12734  if test "x$BOOT_JDK_FOUND" = xno; then
12735    # Now execute the test
12736
12737        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12738        if test -d "$BOOT_JDK"; then
12739          BOOT_JDK_FOUND=maybe
12740          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12741$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12742        fi
12743
12744
12745    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12746    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12747      # Do we have a bin/java?
12748      if test ! -x "$BOOT_JDK/bin/java"; then
12749        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12751        BOOT_JDK_FOUND=no
12752      else
12753        # Do we have a bin/javac?
12754        if test ! -x "$BOOT_JDK/bin/javac"; then
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12758$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12759          BOOT_JDK_FOUND=no
12760        else
12761          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12762          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12765            BOOT_JDK_FOUND=no
12766          else
12767            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12768            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12769
12770            # Extra M4 quote needed to protect [] in grep expression.
12771            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12772            if test "x$FOUND_VERSION_78" = x; then
12773              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12775              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12776$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12777              BOOT_JDK_FOUND=no
12778            else
12779              # We're done! :-)
12780              BOOT_JDK_FOUND=yes
12781
12782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12783
12784  # Input might be given as Windows format, start by converting to
12785  # unix format.
12786  path="$BOOT_JDK"
12787  new_path=`$CYGPATH -u "$path"`
12788
12789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12792  # "foo.exe" is OK but "foo" is an error.
12793  #
12794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12795  # It is also a way to make sure we got the proper file name for the real test later on.
12796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12797  if test "x$test_shortpath" = x; then
12798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12801  fi
12802
12803  # Call helper function which possibly converts this using DOS-style short mode.
12804  # If so, the updated path is stored in $new_path.
12805
12806  input_path="$new_path"
12807  # Check if we need to convert this using DOS-style short mode. If the path
12808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12809  # take no chances and rewrite it.
12810  # Note: m4 eats our [], so we need to use [ and ] instead.
12811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12812  if test "x$has_forbidden_chars" != x; then
12813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12817      # Going to short mode and back again did indeed matter. Since short mode is
12818      # case insensitive, let's make it lowercase to improve readability.
12819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12820      # Now convert it back to Unix-stile (cygpath)
12821      input_path=`$CYGPATH -u "$shortmode_path"`
12822      new_path="$input_path"
12823    fi
12824  fi
12825
12826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12827  if test "x$test_cygdrive_prefix" = x; then
12828    # As a simple fix, exclude /usr/bin since it's not a real path.
12829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12831      # a path prefixed by /cygdrive for fixpath to work.
12832      new_path="$CYGWIN_ROOT_PATH$input_path"
12833    fi
12834  fi
12835
12836
12837  if test "x$path" != "x$new_path"; then
12838    BOOT_JDK="$new_path"
12839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12841  fi
12842
12843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12844
12845  path="$BOOT_JDK"
12846  has_colon=`$ECHO $path | $GREP ^.:`
12847  new_path="$path"
12848  if test "x$has_colon" = x; then
12849    # Not in mixed or Windows style, start by that.
12850    new_path=`cmd //c echo $path`
12851  fi
12852
12853
12854  input_path="$new_path"
12855  # Check if we need to convert this using DOS-style short mode. If the path
12856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12857  # take no chances and rewrite it.
12858  # Note: m4 eats our [], so we need to use [ and ] instead.
12859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12860  if test "x$has_forbidden_chars" != x; then
12861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12863  fi
12864
12865
12866  windows_path="$new_path"
12867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12868    unix_path=`$CYGPATH -u "$windows_path"`
12869    new_path="$unix_path"
12870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12872    new_path="$unix_path"
12873  fi
12874
12875  if test "x$path" != "x$new_path"; then
12876    BOOT_JDK="$new_path"
12877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12879  fi
12880
12881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12883
12884  else
12885    # We're on a posix platform. Hooray! :)
12886    path="$BOOT_JDK"
12887
12888    if test ! -f "$path" && test ! -d "$path"; then
12889      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12890    fi
12891
12892    has_space=`$ECHO "$path" | $GREP " "`
12893    if test "x$has_space" != x; then
12894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12895$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12896      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12897    fi
12898  fi
12899
12900              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12901$as_echo_n "checking for Boot JDK... " >&6; }
12902              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12903$as_echo "$BOOT_JDK" >&6; }
12904              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12905$as_echo_n "checking Boot JDK version... " >&6; }
12906              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12907              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12908$as_echo "$BOOT_JDK_VERSION" >&6; }
12909            fi # end check jdk version
12910          fi # end check rt.jar
12911        fi # end check javac
12912      fi # end check java
12913    fi # end check boot jdk found
12914  fi
12915
12916    done
12917  fi
12918
12919  fi
12920
12921
12922    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12923    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12924      # Do we have a bin/java?
12925      if test ! -x "$BOOT_JDK/bin/java"; then
12926        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12928        BOOT_JDK_FOUND=no
12929      else
12930        # Do we have a bin/javac?
12931        if test ! -x "$BOOT_JDK/bin/javac"; then
12932          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12934          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12935$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12936          BOOT_JDK_FOUND=no
12937        else
12938          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12939          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12940            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12942            BOOT_JDK_FOUND=no
12943          else
12944            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12946
12947            # Extra M4 quote needed to protect [] in grep expression.
12948            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12949            if test "x$FOUND_VERSION_78" = x; then
12950              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12952              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12953$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12954              BOOT_JDK_FOUND=no
12955            else
12956              # We're done! :-)
12957              BOOT_JDK_FOUND=yes
12958
12959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12960
12961  # Input might be given as Windows format, start by converting to
12962  # unix format.
12963  path="$BOOT_JDK"
12964  new_path=`$CYGPATH -u "$path"`
12965
12966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12969  # "foo.exe" is OK but "foo" is an error.
12970  #
12971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12972  # It is also a way to make sure we got the proper file name for the real test later on.
12973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12974  if test "x$test_shortpath" = x; then
12975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12977    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12978  fi
12979
12980  # Call helper function which possibly converts this using DOS-style short mode.
12981  # If so, the updated path is stored in $new_path.
12982
12983  input_path="$new_path"
12984  # Check if we need to convert this using DOS-style short mode. If the path
12985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12986  # take no chances and rewrite it.
12987  # Note: m4 eats our [], so we need to use [ and ] instead.
12988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12989  if test "x$has_forbidden_chars" != x; then
12990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12994      # Going to short mode and back again did indeed matter. Since short mode is
12995      # case insensitive, let's make it lowercase to improve readability.
12996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12997      # Now convert it back to Unix-stile (cygpath)
12998      input_path=`$CYGPATH -u "$shortmode_path"`
12999      new_path="$input_path"
13000    fi
13001  fi
13002
13003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13004  if test "x$test_cygdrive_prefix" = x; then
13005    # As a simple fix, exclude /usr/bin since it's not a real path.
13006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13008      # a path prefixed by /cygdrive for fixpath to work.
13009      new_path="$CYGWIN_ROOT_PATH$input_path"
13010    fi
13011  fi
13012
13013
13014  if test "x$path" != "x$new_path"; then
13015    BOOT_JDK="$new_path"
13016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13018  fi
13019
13020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13021
13022  path="$BOOT_JDK"
13023  has_colon=`$ECHO $path | $GREP ^.:`
13024  new_path="$path"
13025  if test "x$has_colon" = x; then
13026    # Not in mixed or Windows style, start by that.
13027    new_path=`cmd //c echo $path`
13028  fi
13029
13030
13031  input_path="$new_path"
13032  # Check if we need to convert this using DOS-style short mode. If the path
13033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13034  # take no chances and rewrite it.
13035  # Note: m4 eats our [], so we need to use [ and ] instead.
13036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13037  if test "x$has_forbidden_chars" != x; then
13038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13040  fi
13041
13042
13043  windows_path="$new_path"
13044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13045    unix_path=`$CYGPATH -u "$windows_path"`
13046    new_path="$unix_path"
13047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13049    new_path="$unix_path"
13050  fi
13051
13052  if test "x$path" != "x$new_path"; then
13053    BOOT_JDK="$new_path"
13054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13056  fi
13057
13058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13060
13061  else
13062    # We're on a posix platform. Hooray! :)
13063    path="$BOOT_JDK"
13064
13065    if test ! -f "$path" && test ! -d "$path"; then
13066      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13067    fi
13068
13069    has_space=`$ECHO "$path" | $GREP " "`
13070    if test "x$has_space" != x; then
13071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13073      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13074    fi
13075  fi
13076
13077              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13078$as_echo_n "checking for Boot JDK... " >&6; }
13079              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13080$as_echo "$BOOT_JDK" >&6; }
13081              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13082$as_echo_n "checking Boot JDK version... " >&6; }
13083              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13084              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13085$as_echo "$BOOT_JDK_VERSION" >&6; }
13086            fi # end check jdk version
13087          fi # end check rt.jar
13088        fi # end check javac
13089      fi # end check java
13090    fi # end check boot jdk found
13091  fi
13092
13093
13094  if test "x$BOOT_JDK_FOUND" = xno; then
13095    # Now execute the test
13096
13097  if test "x$ProgramFiles" != x; then
13098    VIRTUAL_DIR="$ProgramFiles/Java"
13099
13100  windows_path="$VIRTUAL_DIR"
13101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13102    unix_path=`$CYGPATH -u "$windows_path"`
13103    VIRTUAL_DIR="$unix_path"
13104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13106    VIRTUAL_DIR="$unix_path"
13107  fi
13108
13109
13110  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13111  BOOT_JDK_SUFFIX=""
13112  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13113  if test "x$ALL_JDKS_FOUND" != x; then
13114    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13115
13116  if test "x$BOOT_JDK_FOUND" = xno; then
13117    # Now execute the test
13118
13119        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13120        if test -d "$BOOT_JDK"; then
13121          BOOT_JDK_FOUND=maybe
13122          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13123$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13124        fi
13125
13126
13127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13129      # Do we have a bin/java?
13130      if test ! -x "$BOOT_JDK/bin/java"; then
13131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13133        BOOT_JDK_FOUND=no
13134      else
13135        # Do we have a bin/javac?
13136        if test ! -x "$BOOT_JDK/bin/javac"; then
13137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13141          BOOT_JDK_FOUND=no
13142        else
13143          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13144          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13147            BOOT_JDK_FOUND=no
13148          else
13149            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13151
13152            # Extra M4 quote needed to protect [] in grep expression.
13153            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13154            if test "x$FOUND_VERSION_78" = x; then
13155              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13157              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13158$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13159              BOOT_JDK_FOUND=no
13160            else
13161              # We're done! :-)
13162              BOOT_JDK_FOUND=yes
13163
13164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13165
13166  # Input might be given as Windows format, start by converting to
13167  # unix format.
13168  path="$BOOT_JDK"
13169  new_path=`$CYGPATH -u "$path"`
13170
13171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13174  # "foo.exe" is OK but "foo" is an error.
13175  #
13176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13177  # It is also a way to make sure we got the proper file name for the real test later on.
13178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13179  if test "x$test_shortpath" = x; then
13180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13183  fi
13184
13185  # Call helper function which possibly converts this using DOS-style short mode.
13186  # If so, the updated path is stored in $new_path.
13187
13188  input_path="$new_path"
13189  # Check if we need to convert this using DOS-style short mode. If the path
13190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13191  # take no chances and rewrite it.
13192  # Note: m4 eats our [], so we need to use [ and ] instead.
13193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13194  if test "x$has_forbidden_chars" != x; then
13195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13199      # Going to short mode and back again did indeed matter. Since short mode is
13200      # case insensitive, let's make it lowercase to improve readability.
13201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13202      # Now convert it back to Unix-stile (cygpath)
13203      input_path=`$CYGPATH -u "$shortmode_path"`
13204      new_path="$input_path"
13205    fi
13206  fi
13207
13208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13209  if test "x$test_cygdrive_prefix" = x; then
13210    # As a simple fix, exclude /usr/bin since it's not a real path.
13211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13213      # a path prefixed by /cygdrive for fixpath to work.
13214      new_path="$CYGWIN_ROOT_PATH$input_path"
13215    fi
13216  fi
13217
13218
13219  if test "x$path" != "x$new_path"; then
13220    BOOT_JDK="$new_path"
13221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13223  fi
13224
13225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13226
13227  path="$BOOT_JDK"
13228  has_colon=`$ECHO $path | $GREP ^.:`
13229  new_path="$path"
13230  if test "x$has_colon" = x; then
13231    # Not in mixed or Windows style, start by that.
13232    new_path=`cmd //c echo $path`
13233  fi
13234
13235
13236  input_path="$new_path"
13237  # Check if we need to convert this using DOS-style short mode. If the path
13238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13239  # take no chances and rewrite it.
13240  # Note: m4 eats our [], so we need to use [ and ] instead.
13241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13242  if test "x$has_forbidden_chars" != x; then
13243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13245  fi
13246
13247
13248  windows_path="$new_path"
13249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13250    unix_path=`$CYGPATH -u "$windows_path"`
13251    new_path="$unix_path"
13252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13254    new_path="$unix_path"
13255  fi
13256
13257  if test "x$path" != "x$new_path"; then
13258    BOOT_JDK="$new_path"
13259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13261  fi
13262
13263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13265
13266  else
13267    # We're on a posix platform. Hooray! :)
13268    path="$BOOT_JDK"
13269
13270    if test ! -f "$path" && test ! -d "$path"; then
13271      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13272    fi
13273
13274    has_space=`$ECHO "$path" | $GREP " "`
13275    if test "x$has_space" != x; then
13276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13279    fi
13280  fi
13281
13282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13283$as_echo_n "checking for Boot JDK... " >&6; }
13284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13285$as_echo "$BOOT_JDK" >&6; }
13286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13287$as_echo_n "checking Boot JDK version... " >&6; }
13288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13290$as_echo "$BOOT_JDK_VERSION" >&6; }
13291            fi # end check jdk version
13292          fi # end check rt.jar
13293        fi # end check javac
13294      fi # end check java
13295    fi # end check boot jdk found
13296  fi
13297
13298    done
13299  fi
13300
13301  fi
13302
13303
13304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13306      # Do we have a bin/java?
13307      if test ! -x "$BOOT_JDK/bin/java"; then
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13310        BOOT_JDK_FOUND=no
13311      else
13312        # Do we have a bin/javac?
13313        if test ! -x "$BOOT_JDK/bin/javac"; then
13314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13318          BOOT_JDK_FOUND=no
13319        else
13320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13324            BOOT_JDK_FOUND=no
13325          else
13326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13328
13329            # Extra M4 quote needed to protect [] in grep expression.
13330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13331            if test "x$FOUND_VERSION_78" = x; then
13332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13336              BOOT_JDK_FOUND=no
13337            else
13338              # We're done! :-)
13339              BOOT_JDK_FOUND=yes
13340
13341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13342
13343  # Input might be given as Windows format, start by converting to
13344  # unix format.
13345  path="$BOOT_JDK"
13346  new_path=`$CYGPATH -u "$path"`
13347
13348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13351  # "foo.exe" is OK but "foo" is an error.
13352  #
13353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13354  # It is also a way to make sure we got the proper file name for the real test later on.
13355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13356  if test "x$test_shortpath" = x; then
13357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13360  fi
13361
13362  # Call helper function which possibly converts this using DOS-style short mode.
13363  # If so, the updated path is stored in $new_path.
13364
13365  input_path="$new_path"
13366  # Check if we need to convert this using DOS-style short mode. If the path
13367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13368  # take no chances and rewrite it.
13369  # Note: m4 eats our [], so we need to use [ and ] instead.
13370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13371  if test "x$has_forbidden_chars" != x; then
13372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13376      # Going to short mode and back again did indeed matter. Since short mode is
13377      # case insensitive, let's make it lowercase to improve readability.
13378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13379      # Now convert it back to Unix-stile (cygpath)
13380      input_path=`$CYGPATH -u "$shortmode_path"`
13381      new_path="$input_path"
13382    fi
13383  fi
13384
13385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13386  if test "x$test_cygdrive_prefix" = x; then
13387    # As a simple fix, exclude /usr/bin since it's not a real path.
13388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13390      # a path prefixed by /cygdrive for fixpath to work.
13391      new_path="$CYGWIN_ROOT_PATH$input_path"
13392    fi
13393  fi
13394
13395
13396  if test "x$path" != "x$new_path"; then
13397    BOOT_JDK="$new_path"
13398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13400  fi
13401
13402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13403
13404  path="$BOOT_JDK"
13405  has_colon=`$ECHO $path | $GREP ^.:`
13406  new_path="$path"
13407  if test "x$has_colon" = x; then
13408    # Not in mixed or Windows style, start by that.
13409    new_path=`cmd //c echo $path`
13410  fi
13411
13412
13413  input_path="$new_path"
13414  # Check if we need to convert this using DOS-style short mode. If the path
13415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13416  # take no chances and rewrite it.
13417  # Note: m4 eats our [], so we need to use [ and ] instead.
13418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13419  if test "x$has_forbidden_chars" != x; then
13420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13422  fi
13423
13424
13425  windows_path="$new_path"
13426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13427    unix_path=`$CYGPATH -u "$windows_path"`
13428    new_path="$unix_path"
13429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13431    new_path="$unix_path"
13432  fi
13433
13434  if test "x$path" != "x$new_path"; then
13435    BOOT_JDK="$new_path"
13436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13438  fi
13439
13440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13442
13443  else
13444    # We're on a posix platform. Hooray! :)
13445    path="$BOOT_JDK"
13446
13447    if test ! -f "$path" && test ! -d "$path"; then
13448      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13449    fi
13450
13451    has_space=`$ECHO "$path" | $GREP " "`
13452    if test "x$has_space" != x; then
13453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13456    fi
13457  fi
13458
13459              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13460$as_echo_n "checking for Boot JDK... " >&6; }
13461              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13462$as_echo "$BOOT_JDK" >&6; }
13463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13464$as_echo_n "checking Boot JDK version... " >&6; }
13465              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13467$as_echo "$BOOT_JDK_VERSION" >&6; }
13468            fi # end check jdk version
13469          fi # end check rt.jar
13470        fi # end check javac
13471      fi # end check java
13472    fi # end check boot jdk found
13473  fi
13474
13475
13476  if test "x$BOOT_JDK_FOUND" = xno; then
13477    # Now execute the test
13478
13479  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13480  BOOT_JDK_SUFFIX=""
13481  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13482  if test "x$ALL_JDKS_FOUND" != x; then
13483    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13484
13485  if test "x$BOOT_JDK_FOUND" = xno; then
13486    # Now execute the test
13487
13488        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13489        if test -d "$BOOT_JDK"; then
13490          BOOT_JDK_FOUND=maybe
13491          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13492$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13493        fi
13494
13495
13496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13498      # Do we have a bin/java?
13499      if test ! -x "$BOOT_JDK/bin/java"; then
13500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13502        BOOT_JDK_FOUND=no
13503      else
13504        # Do we have a bin/javac?
13505        if test ! -x "$BOOT_JDK/bin/javac"; then
13506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13510          BOOT_JDK_FOUND=no
13511        else
13512          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13513          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13516            BOOT_JDK_FOUND=no
13517          else
13518            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13520
13521            # Extra M4 quote needed to protect [] in grep expression.
13522            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13523            if test "x$FOUND_VERSION_78" = x; then
13524              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13526              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13527$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13528              BOOT_JDK_FOUND=no
13529            else
13530              # We're done! :-)
13531              BOOT_JDK_FOUND=yes
13532
13533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13534
13535  # Input might be given as Windows format, start by converting to
13536  # unix format.
13537  path="$BOOT_JDK"
13538  new_path=`$CYGPATH -u "$path"`
13539
13540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13543  # "foo.exe" is OK but "foo" is an error.
13544  #
13545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13546  # It is also a way to make sure we got the proper file name for the real test later on.
13547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13548  if test "x$test_shortpath" = x; then
13549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13552  fi
13553
13554  # Call helper function which possibly converts this using DOS-style short mode.
13555  # If so, the updated path is stored in $new_path.
13556
13557  input_path="$new_path"
13558  # Check if we need to convert this using DOS-style short mode. If the path
13559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13560  # take no chances and rewrite it.
13561  # Note: m4 eats our [], so we need to use [ and ] instead.
13562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13563  if test "x$has_forbidden_chars" != x; then
13564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13568      # Going to short mode and back again did indeed matter. Since short mode is
13569      # case insensitive, let's make it lowercase to improve readability.
13570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13571      # Now convert it back to Unix-stile (cygpath)
13572      input_path=`$CYGPATH -u "$shortmode_path"`
13573      new_path="$input_path"
13574    fi
13575  fi
13576
13577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13578  if test "x$test_cygdrive_prefix" = x; then
13579    # As a simple fix, exclude /usr/bin since it's not a real path.
13580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13582      # a path prefixed by /cygdrive for fixpath to work.
13583      new_path="$CYGWIN_ROOT_PATH$input_path"
13584    fi
13585  fi
13586
13587
13588  if test "x$path" != "x$new_path"; then
13589    BOOT_JDK="$new_path"
13590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13592  fi
13593
13594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13595
13596  path="$BOOT_JDK"
13597  has_colon=`$ECHO $path | $GREP ^.:`
13598  new_path="$path"
13599  if test "x$has_colon" = x; then
13600    # Not in mixed or Windows style, start by that.
13601    new_path=`cmd //c echo $path`
13602  fi
13603
13604
13605  input_path="$new_path"
13606  # Check if we need to convert this using DOS-style short mode. If the path
13607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13608  # take no chances and rewrite it.
13609  # Note: m4 eats our [], so we need to use [ and ] instead.
13610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13611  if test "x$has_forbidden_chars" != x; then
13612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13614  fi
13615
13616
13617  windows_path="$new_path"
13618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13619    unix_path=`$CYGPATH -u "$windows_path"`
13620    new_path="$unix_path"
13621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13623    new_path="$unix_path"
13624  fi
13625
13626  if test "x$path" != "x$new_path"; then
13627    BOOT_JDK="$new_path"
13628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13630  fi
13631
13632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13634
13635  else
13636    # We're on a posix platform. Hooray! :)
13637    path="$BOOT_JDK"
13638
13639    if test ! -f "$path" && test ! -d "$path"; then
13640      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13641    fi
13642
13643    has_space=`$ECHO "$path" | $GREP " "`
13644    if test "x$has_space" != x; then
13645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13647      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13648    fi
13649  fi
13650
13651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13652$as_echo_n "checking for Boot JDK... " >&6; }
13653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13654$as_echo "$BOOT_JDK" >&6; }
13655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13656$as_echo_n "checking Boot JDK version... " >&6; }
13657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13659$as_echo "$BOOT_JDK_VERSION" >&6; }
13660            fi # end check jdk version
13661          fi # end check rt.jar
13662        fi # end check javac
13663      fi # end check java
13664    fi # end check boot jdk found
13665  fi
13666
13667    done
13668  fi
13669
13670
13671    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13672    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13673      # Do we have a bin/java?
13674      if test ! -x "$BOOT_JDK/bin/java"; then
13675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13677        BOOT_JDK_FOUND=no
13678      else
13679        # Do we have a bin/javac?
13680        if test ! -x "$BOOT_JDK/bin/javac"; then
13681          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13683          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13684$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13685          BOOT_JDK_FOUND=no
13686        else
13687          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13688          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13689            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13691            BOOT_JDK_FOUND=no
13692          else
13693            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13694            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13695
13696            # Extra M4 quote needed to protect [] in grep expression.
13697            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13698            if test "x$FOUND_VERSION_78" = x; then
13699              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13702$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13703              BOOT_JDK_FOUND=no
13704            else
13705              # We're done! :-)
13706              BOOT_JDK_FOUND=yes
13707
13708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13709
13710  # Input might be given as Windows format, start by converting to
13711  # unix format.
13712  path="$BOOT_JDK"
13713  new_path=`$CYGPATH -u "$path"`
13714
13715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13718  # "foo.exe" is OK but "foo" is an error.
13719  #
13720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13721  # It is also a way to make sure we got the proper file name for the real test later on.
13722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13723  if test "x$test_shortpath" = x; then
13724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13727  fi
13728
13729  # Call helper function which possibly converts this using DOS-style short mode.
13730  # If so, the updated path is stored in $new_path.
13731
13732  input_path="$new_path"
13733  # Check if we need to convert this using DOS-style short mode. If the path
13734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13735  # take no chances and rewrite it.
13736  # Note: m4 eats our [], so we need to use [ and ] instead.
13737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13738  if test "x$has_forbidden_chars" != x; then
13739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13743      # Going to short mode and back again did indeed matter. Since short mode is
13744      # case insensitive, let's make it lowercase to improve readability.
13745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13746      # Now convert it back to Unix-stile (cygpath)
13747      input_path=`$CYGPATH -u "$shortmode_path"`
13748      new_path="$input_path"
13749    fi
13750  fi
13751
13752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13753  if test "x$test_cygdrive_prefix" = x; then
13754    # As a simple fix, exclude /usr/bin since it's not a real path.
13755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13757      # a path prefixed by /cygdrive for fixpath to work.
13758      new_path="$CYGWIN_ROOT_PATH$input_path"
13759    fi
13760  fi
13761
13762
13763  if test "x$path" != "x$new_path"; then
13764    BOOT_JDK="$new_path"
13765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13767  fi
13768
13769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13770
13771  path="$BOOT_JDK"
13772  has_colon=`$ECHO $path | $GREP ^.:`
13773  new_path="$path"
13774  if test "x$has_colon" = x; then
13775    # Not in mixed or Windows style, start by that.
13776    new_path=`cmd //c echo $path`
13777  fi
13778
13779
13780  input_path="$new_path"
13781  # Check if we need to convert this using DOS-style short mode. If the path
13782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13783  # take no chances and rewrite it.
13784  # Note: m4 eats our [], so we need to use [ and ] instead.
13785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13786  if test "x$has_forbidden_chars" != x; then
13787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13789  fi
13790
13791
13792  windows_path="$new_path"
13793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13794    unix_path=`$CYGPATH -u "$windows_path"`
13795    new_path="$unix_path"
13796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13798    new_path="$unix_path"
13799  fi
13800
13801  if test "x$path" != "x$new_path"; then
13802    BOOT_JDK="$new_path"
13803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13805  fi
13806
13807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13809
13810  else
13811    # We're on a posix platform. Hooray! :)
13812    path="$BOOT_JDK"
13813
13814    if test ! -f "$path" && test ! -d "$path"; then
13815      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13816    fi
13817
13818    has_space=`$ECHO "$path" | $GREP " "`
13819    if test "x$has_space" != x; then
13820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13823    fi
13824  fi
13825
13826              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13827$as_echo_n "checking for Boot JDK... " >&6; }
13828              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13829$as_echo "$BOOT_JDK" >&6; }
13830              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13831$as_echo_n "checking Boot JDK version... " >&6; }
13832              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13834$as_echo "$BOOT_JDK_VERSION" >&6; }
13835            fi # end check jdk version
13836          fi # end check rt.jar
13837        fi # end check javac
13838      fi # end check java
13839    fi # end check boot jdk found
13840  fi
13841
13842  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13843
13844  if test "x$BOOT_JDK_FOUND" = xno; then
13845    # Now execute the test
13846
13847  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13848  BOOT_JDK_SUFFIX="/Contents/Home"
13849  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13850  if test "x$ALL_JDKS_FOUND" != x; then
13851    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13852
13853  if test "x$BOOT_JDK_FOUND" = xno; then
13854    # Now execute the test
13855
13856        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13857        if test -d "$BOOT_JDK"; then
13858          BOOT_JDK_FOUND=maybe
13859          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13860$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13861        fi
13862
13863
13864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13866      # Do we have a bin/java?
13867      if test ! -x "$BOOT_JDK/bin/java"; then
13868        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13870        BOOT_JDK_FOUND=no
13871      else
13872        # Do we have a bin/javac?
13873        if test ! -x "$BOOT_JDK/bin/javac"; then
13874          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13876          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13878          BOOT_JDK_FOUND=no
13879        else
13880          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13881          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13882            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13884            BOOT_JDK_FOUND=no
13885          else
13886            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13887            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13888
13889            # Extra M4 quote needed to protect [] in grep expression.
13890            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13891            if test "x$FOUND_VERSION_78" = x; then
13892              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13894              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13895$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13896              BOOT_JDK_FOUND=no
13897            else
13898              # We're done! :-)
13899              BOOT_JDK_FOUND=yes
13900
13901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13902
13903  # Input might be given as Windows format, start by converting to
13904  # unix format.
13905  path="$BOOT_JDK"
13906  new_path=`$CYGPATH -u "$path"`
13907
13908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13911  # "foo.exe" is OK but "foo" is an error.
13912  #
13913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13914  # It is also a way to make sure we got the proper file name for the real test later on.
13915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13916  if test "x$test_shortpath" = x; then
13917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13919    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13920  fi
13921
13922  # Call helper function which possibly converts this using DOS-style short mode.
13923  # If so, the updated path is stored in $new_path.
13924
13925  input_path="$new_path"
13926  # Check if we need to convert this using DOS-style short mode. If the path
13927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13928  # take no chances and rewrite it.
13929  # Note: m4 eats our [], so we need to use [ and ] instead.
13930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13931  if test "x$has_forbidden_chars" != x; then
13932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13936      # Going to short mode and back again did indeed matter. Since short mode is
13937      # case insensitive, let's make it lowercase to improve readability.
13938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13939      # Now convert it back to Unix-stile (cygpath)
13940      input_path=`$CYGPATH -u "$shortmode_path"`
13941      new_path="$input_path"
13942    fi
13943  fi
13944
13945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13946  if test "x$test_cygdrive_prefix" = x; then
13947    # As a simple fix, exclude /usr/bin since it's not a real path.
13948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13950      # a path prefixed by /cygdrive for fixpath to work.
13951      new_path="$CYGWIN_ROOT_PATH$input_path"
13952    fi
13953  fi
13954
13955
13956  if test "x$path" != "x$new_path"; then
13957    BOOT_JDK="$new_path"
13958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13960  fi
13961
13962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13963
13964  path="$BOOT_JDK"
13965  has_colon=`$ECHO $path | $GREP ^.:`
13966  new_path="$path"
13967  if test "x$has_colon" = x; then
13968    # Not in mixed or Windows style, start by that.
13969    new_path=`cmd //c echo $path`
13970  fi
13971
13972
13973  input_path="$new_path"
13974  # Check if we need to convert this using DOS-style short mode. If the path
13975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13976  # take no chances and rewrite it.
13977  # Note: m4 eats our [], so we need to use [ and ] instead.
13978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13979  if test "x$has_forbidden_chars" != x; then
13980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13982  fi
13983
13984
13985  windows_path="$new_path"
13986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13987    unix_path=`$CYGPATH -u "$windows_path"`
13988    new_path="$unix_path"
13989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13991    new_path="$unix_path"
13992  fi
13993
13994  if test "x$path" != "x$new_path"; then
13995    BOOT_JDK="$new_path"
13996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13998  fi
13999
14000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14002
14003  else
14004    # We're on a posix platform. Hooray! :)
14005    path="$BOOT_JDK"
14006
14007    if test ! -f "$path" && test ! -d "$path"; then
14008      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14009    fi
14010
14011    has_space=`$ECHO "$path" | $GREP " "`
14012    if test "x$has_space" != x; then
14013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14016    fi
14017  fi
14018
14019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14020$as_echo_n "checking for Boot JDK... " >&6; }
14021              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14022$as_echo "$BOOT_JDK" >&6; }
14023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14024$as_echo_n "checking Boot JDK version... " >&6; }
14025              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14027$as_echo "$BOOT_JDK_VERSION" >&6; }
14028            fi # end check jdk version
14029          fi # end check rt.jar
14030        fi # end check javac
14031      fi # end check java
14032    fi # end check boot jdk found
14033  fi
14034
14035    done
14036  fi
14037
14038
14039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14041      # Do we have a bin/java?
14042      if test ! -x "$BOOT_JDK/bin/java"; then
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14045        BOOT_JDK_FOUND=no
14046      else
14047        # Do we have a bin/javac?
14048        if test ! -x "$BOOT_JDK/bin/javac"; then
14049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14053          BOOT_JDK_FOUND=no
14054        else
14055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14059            BOOT_JDK_FOUND=no
14060          else
14061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14063
14064            # Extra M4 quote needed to protect [] in grep expression.
14065            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14066            if test "x$FOUND_VERSION_78" = x; then
14067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14070$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14071              BOOT_JDK_FOUND=no
14072            else
14073              # We're done! :-)
14074              BOOT_JDK_FOUND=yes
14075
14076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14077
14078  # Input might be given as Windows format, start by converting to
14079  # unix format.
14080  path="$BOOT_JDK"
14081  new_path=`$CYGPATH -u "$path"`
14082
14083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14086  # "foo.exe" is OK but "foo" is an error.
14087  #
14088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14089  # It is also a way to make sure we got the proper file name for the real test later on.
14090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14091  if test "x$test_shortpath" = x; then
14092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14095  fi
14096
14097  # Call helper function which possibly converts this using DOS-style short mode.
14098  # If so, the updated path is stored in $new_path.
14099
14100  input_path="$new_path"
14101  # Check if we need to convert this using DOS-style short mode. If the path
14102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14103  # take no chances and rewrite it.
14104  # Note: m4 eats our [], so we need to use [ and ] instead.
14105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14106  if test "x$has_forbidden_chars" != x; then
14107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14111      # Going to short mode and back again did indeed matter. Since short mode is
14112      # case insensitive, let's make it lowercase to improve readability.
14113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14114      # Now convert it back to Unix-stile (cygpath)
14115      input_path=`$CYGPATH -u "$shortmode_path"`
14116      new_path="$input_path"
14117    fi
14118  fi
14119
14120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14121  if test "x$test_cygdrive_prefix" = x; then
14122    # As a simple fix, exclude /usr/bin since it's not a real path.
14123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14125      # a path prefixed by /cygdrive for fixpath to work.
14126      new_path="$CYGWIN_ROOT_PATH$input_path"
14127    fi
14128  fi
14129
14130
14131  if test "x$path" != "x$new_path"; then
14132    BOOT_JDK="$new_path"
14133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14135  fi
14136
14137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14138
14139  path="$BOOT_JDK"
14140  has_colon=`$ECHO $path | $GREP ^.:`
14141  new_path="$path"
14142  if test "x$has_colon" = x; then
14143    # Not in mixed or Windows style, start by that.
14144    new_path=`cmd //c echo $path`
14145  fi
14146
14147
14148  input_path="$new_path"
14149  # Check if we need to convert this using DOS-style short mode. If the path
14150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14151  # take no chances and rewrite it.
14152  # Note: m4 eats our [], so we need to use [ and ] instead.
14153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14154  if test "x$has_forbidden_chars" != x; then
14155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14157  fi
14158
14159
14160  windows_path="$new_path"
14161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14162    unix_path=`$CYGPATH -u "$windows_path"`
14163    new_path="$unix_path"
14164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14166    new_path="$unix_path"
14167  fi
14168
14169  if test "x$path" != "x$new_path"; then
14170    BOOT_JDK="$new_path"
14171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14173  fi
14174
14175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14177
14178  else
14179    # We're on a posix platform. Hooray! :)
14180    path="$BOOT_JDK"
14181
14182    if test ! -f "$path" && test ! -d "$path"; then
14183      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14184    fi
14185
14186    has_space=`$ECHO "$path" | $GREP " "`
14187    if test "x$has_space" != x; then
14188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14191    fi
14192  fi
14193
14194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14195$as_echo_n "checking for Boot JDK... " >&6; }
14196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14197$as_echo "$BOOT_JDK" >&6; }
14198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14199$as_echo_n "checking Boot JDK version... " >&6; }
14200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14202$as_echo "$BOOT_JDK_VERSION" >&6; }
14203            fi # end check jdk version
14204          fi # end check rt.jar
14205        fi # end check javac
14206      fi # end check java
14207    fi # end check boot jdk found
14208  fi
14209
14210
14211  if test "x$BOOT_JDK_FOUND" = xno; then
14212    # Now execute the test
14213
14214  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14215  BOOT_JDK_SUFFIX="/Contents/Home"
14216  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14217  if test "x$ALL_JDKS_FOUND" != x; then
14218    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14219
14220  if test "x$BOOT_JDK_FOUND" = xno; then
14221    # Now execute the test
14222
14223        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14224        if test -d "$BOOT_JDK"; then
14225          BOOT_JDK_FOUND=maybe
14226          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14227$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14228        fi
14229
14230
14231    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14232    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14233      # Do we have a bin/java?
14234      if test ! -x "$BOOT_JDK/bin/java"; then
14235        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14237        BOOT_JDK_FOUND=no
14238      else
14239        # Do we have a bin/javac?
14240        if test ! -x "$BOOT_JDK/bin/javac"; then
14241          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14243          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14244$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14245          BOOT_JDK_FOUND=no
14246        else
14247          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14248          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14249            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14251            BOOT_JDK_FOUND=no
14252          else
14253            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14254            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14255
14256            # Extra M4 quote needed to protect [] in grep expression.
14257            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14258            if test "x$FOUND_VERSION_78" = x; then
14259              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14261              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14262$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14263              BOOT_JDK_FOUND=no
14264            else
14265              # We're done! :-)
14266              BOOT_JDK_FOUND=yes
14267
14268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14269
14270  # Input might be given as Windows format, start by converting to
14271  # unix format.
14272  path="$BOOT_JDK"
14273  new_path=`$CYGPATH -u "$path"`
14274
14275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14278  # "foo.exe" is OK but "foo" is an error.
14279  #
14280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14281  # It is also a way to make sure we got the proper file name for the real test later on.
14282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14283  if test "x$test_shortpath" = x; then
14284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14287  fi
14288
14289  # Call helper function which possibly converts this using DOS-style short mode.
14290  # If so, the updated path is stored in $new_path.
14291
14292  input_path="$new_path"
14293  # Check if we need to convert this using DOS-style short mode. If the path
14294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14295  # take no chances and rewrite it.
14296  # Note: m4 eats our [], so we need to use [ and ] instead.
14297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14298  if test "x$has_forbidden_chars" != x; then
14299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14303      # Going to short mode and back again did indeed matter. Since short mode is
14304      # case insensitive, let's make it lowercase to improve readability.
14305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14306      # Now convert it back to Unix-stile (cygpath)
14307      input_path=`$CYGPATH -u "$shortmode_path"`
14308      new_path="$input_path"
14309    fi
14310  fi
14311
14312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14313  if test "x$test_cygdrive_prefix" = x; then
14314    # As a simple fix, exclude /usr/bin since it's not a real path.
14315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14317      # a path prefixed by /cygdrive for fixpath to work.
14318      new_path="$CYGWIN_ROOT_PATH$input_path"
14319    fi
14320  fi
14321
14322
14323  if test "x$path" != "x$new_path"; then
14324    BOOT_JDK="$new_path"
14325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14327  fi
14328
14329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14330
14331  path="$BOOT_JDK"
14332  has_colon=`$ECHO $path | $GREP ^.:`
14333  new_path="$path"
14334  if test "x$has_colon" = x; then
14335    # Not in mixed or Windows style, start by that.
14336    new_path=`cmd //c echo $path`
14337  fi
14338
14339
14340  input_path="$new_path"
14341  # Check if we need to convert this using DOS-style short mode. If the path
14342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14343  # take no chances and rewrite it.
14344  # Note: m4 eats our [], so we need to use [ and ] instead.
14345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14346  if test "x$has_forbidden_chars" != x; then
14347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14349  fi
14350
14351
14352  windows_path="$new_path"
14353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14354    unix_path=`$CYGPATH -u "$windows_path"`
14355    new_path="$unix_path"
14356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14358    new_path="$unix_path"
14359  fi
14360
14361  if test "x$path" != "x$new_path"; then
14362    BOOT_JDK="$new_path"
14363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14365  fi
14366
14367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14369
14370  else
14371    # We're on a posix platform. Hooray! :)
14372    path="$BOOT_JDK"
14373
14374    if test ! -f "$path" && test ! -d "$path"; then
14375      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14376    fi
14377
14378    has_space=`$ECHO "$path" | $GREP " "`
14379    if test "x$has_space" != x; then
14380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14382      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14383    fi
14384  fi
14385
14386              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14387$as_echo_n "checking for Boot JDK... " >&6; }
14388              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14389$as_echo "$BOOT_JDK" >&6; }
14390              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14391$as_echo_n "checking Boot JDK version... " >&6; }
14392              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14393              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14394$as_echo "$BOOT_JDK_VERSION" >&6; }
14395            fi # end check jdk version
14396          fi # end check rt.jar
14397        fi # end check javac
14398      fi # end check java
14399    fi # end check boot jdk found
14400  fi
14401
14402    done
14403  fi
14404
14405
14406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14408      # Do we have a bin/java?
14409      if test ! -x "$BOOT_JDK/bin/java"; then
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14412        BOOT_JDK_FOUND=no
14413      else
14414        # Do we have a bin/javac?
14415        if test ! -x "$BOOT_JDK/bin/javac"; then
14416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14420          BOOT_JDK_FOUND=no
14421        else
14422          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14423          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14424            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14426            BOOT_JDK_FOUND=no
14427          else
14428            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14429            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14430
14431            # Extra M4 quote needed to protect [] in grep expression.
14432            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14433            if test "x$FOUND_VERSION_78" = x; then
14434              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14436              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14437$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14438              BOOT_JDK_FOUND=no
14439            else
14440              # We're done! :-)
14441              BOOT_JDK_FOUND=yes
14442
14443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14444
14445  # Input might be given as Windows format, start by converting to
14446  # unix format.
14447  path="$BOOT_JDK"
14448  new_path=`$CYGPATH -u "$path"`
14449
14450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14453  # "foo.exe" is OK but "foo" is an error.
14454  #
14455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14456  # It is also a way to make sure we got the proper file name for the real test later on.
14457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14458  if test "x$test_shortpath" = x; then
14459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14461    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14462  fi
14463
14464  # Call helper function which possibly converts this using DOS-style short mode.
14465  # If so, the updated path is stored in $new_path.
14466
14467  input_path="$new_path"
14468  # Check if we need to convert this using DOS-style short mode. If the path
14469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14470  # take no chances and rewrite it.
14471  # Note: m4 eats our [], so we need to use [ and ] instead.
14472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14473  if test "x$has_forbidden_chars" != x; then
14474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14478      # Going to short mode and back again did indeed matter. Since short mode is
14479      # case insensitive, let's make it lowercase to improve readability.
14480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14481      # Now convert it back to Unix-stile (cygpath)
14482      input_path=`$CYGPATH -u "$shortmode_path"`
14483      new_path="$input_path"
14484    fi
14485  fi
14486
14487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14488  if test "x$test_cygdrive_prefix" = x; then
14489    # As a simple fix, exclude /usr/bin since it's not a real path.
14490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14492      # a path prefixed by /cygdrive for fixpath to work.
14493      new_path="$CYGWIN_ROOT_PATH$input_path"
14494    fi
14495  fi
14496
14497
14498  if test "x$path" != "x$new_path"; then
14499    BOOT_JDK="$new_path"
14500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14502  fi
14503
14504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14505
14506  path="$BOOT_JDK"
14507  has_colon=`$ECHO $path | $GREP ^.:`
14508  new_path="$path"
14509  if test "x$has_colon" = x; then
14510    # Not in mixed or Windows style, start by that.
14511    new_path=`cmd //c echo $path`
14512  fi
14513
14514
14515  input_path="$new_path"
14516  # Check if we need to convert this using DOS-style short mode. If the path
14517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14518  # take no chances and rewrite it.
14519  # Note: m4 eats our [], so we need to use [ and ] instead.
14520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14521  if test "x$has_forbidden_chars" != x; then
14522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14524  fi
14525
14526
14527  windows_path="$new_path"
14528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14529    unix_path=`$CYGPATH -u "$windows_path"`
14530    new_path="$unix_path"
14531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14533    new_path="$unix_path"
14534  fi
14535
14536  if test "x$path" != "x$new_path"; then
14537    BOOT_JDK="$new_path"
14538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14540  fi
14541
14542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14544
14545  else
14546    # We're on a posix platform. Hooray! :)
14547    path="$BOOT_JDK"
14548
14549    if test ! -f "$path" && test ! -d "$path"; then
14550      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14551    fi
14552
14553    has_space=`$ECHO "$path" | $GREP " "`
14554    if test "x$has_space" != x; then
14555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14557      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14558    fi
14559  fi
14560
14561              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14562$as_echo_n "checking for Boot JDK... " >&6; }
14563              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14564$as_echo "$BOOT_JDK" >&6; }
14565              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14566$as_echo_n "checking Boot JDK version... " >&6; }
14567              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14568              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14569$as_echo "$BOOT_JDK_VERSION" >&6; }
14570            fi # end check jdk version
14571          fi # end check rt.jar
14572        fi # end check javac
14573      fi # end check java
14574    fi # end check boot jdk found
14575  fi
14576
14577  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14578
14579  if test "x$BOOT_JDK_FOUND" = xno; then
14580    # Now execute the test
14581
14582  BOOT_JDK_PREFIX="/usr/lib/jvm"
14583  BOOT_JDK_SUFFIX=""
14584  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14585  if test "x$ALL_JDKS_FOUND" != x; then
14586    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14587
14588  if test "x$BOOT_JDK_FOUND" = xno; then
14589    # Now execute the test
14590
14591        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14592        if test -d "$BOOT_JDK"; then
14593          BOOT_JDK_FOUND=maybe
14594          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14595$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14596        fi
14597
14598
14599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14601      # Do we have a bin/java?
14602      if test ! -x "$BOOT_JDK/bin/java"; then
14603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14605        BOOT_JDK_FOUND=no
14606      else
14607        # Do we have a bin/javac?
14608        if test ! -x "$BOOT_JDK/bin/javac"; then
14609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14613          BOOT_JDK_FOUND=no
14614        else
14615          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14616          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14619            BOOT_JDK_FOUND=no
14620          else
14621            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14622            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14623
14624            # Extra M4 quote needed to protect [] in grep expression.
14625            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14626            if test "x$FOUND_VERSION_78" = x; then
14627              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14629              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14630$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14631              BOOT_JDK_FOUND=no
14632            else
14633              # We're done! :-)
14634              BOOT_JDK_FOUND=yes
14635
14636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14637
14638  # Input might be given as Windows format, start by converting to
14639  # unix format.
14640  path="$BOOT_JDK"
14641  new_path=`$CYGPATH -u "$path"`
14642
14643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14646  # "foo.exe" is OK but "foo" is an error.
14647  #
14648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14649  # It is also a way to make sure we got the proper file name for the real test later on.
14650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14651  if test "x$test_shortpath" = x; then
14652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14655  fi
14656
14657  # Call helper function which possibly converts this using DOS-style short mode.
14658  # If so, the updated path is stored in $new_path.
14659
14660  input_path="$new_path"
14661  # Check if we need to convert this using DOS-style short mode. If the path
14662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14663  # take no chances and rewrite it.
14664  # Note: m4 eats our [], so we need to use [ and ] instead.
14665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14666  if test "x$has_forbidden_chars" != x; then
14667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14671      # Going to short mode and back again did indeed matter. Since short mode is
14672      # case insensitive, let's make it lowercase to improve readability.
14673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14674      # Now convert it back to Unix-stile (cygpath)
14675      input_path=`$CYGPATH -u "$shortmode_path"`
14676      new_path="$input_path"
14677    fi
14678  fi
14679
14680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14681  if test "x$test_cygdrive_prefix" = x; then
14682    # As a simple fix, exclude /usr/bin since it's not a real path.
14683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14685      # a path prefixed by /cygdrive for fixpath to work.
14686      new_path="$CYGWIN_ROOT_PATH$input_path"
14687    fi
14688  fi
14689
14690
14691  if test "x$path" != "x$new_path"; then
14692    BOOT_JDK="$new_path"
14693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14695  fi
14696
14697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14698
14699  path="$BOOT_JDK"
14700  has_colon=`$ECHO $path | $GREP ^.:`
14701  new_path="$path"
14702  if test "x$has_colon" = x; then
14703    # Not in mixed or Windows style, start by that.
14704    new_path=`cmd //c echo $path`
14705  fi
14706
14707
14708  input_path="$new_path"
14709  # Check if we need to convert this using DOS-style short mode. If the path
14710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14711  # take no chances and rewrite it.
14712  # Note: m4 eats our [], so we need to use [ and ] instead.
14713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14714  if test "x$has_forbidden_chars" != x; then
14715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14717  fi
14718
14719
14720  windows_path="$new_path"
14721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14722    unix_path=`$CYGPATH -u "$windows_path"`
14723    new_path="$unix_path"
14724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14726    new_path="$unix_path"
14727  fi
14728
14729  if test "x$path" != "x$new_path"; then
14730    BOOT_JDK="$new_path"
14731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14733  fi
14734
14735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14737
14738  else
14739    # We're on a posix platform. Hooray! :)
14740    path="$BOOT_JDK"
14741
14742    if test ! -f "$path" && test ! -d "$path"; then
14743      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14744    fi
14745
14746    has_space=`$ECHO "$path" | $GREP " "`
14747    if test "x$has_space" != x; then
14748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14750      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14751    fi
14752  fi
14753
14754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14755$as_echo_n "checking for Boot JDK... " >&6; }
14756              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14757$as_echo "$BOOT_JDK" >&6; }
14758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14759$as_echo_n "checking Boot JDK version... " >&6; }
14760              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14761              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14762$as_echo "$BOOT_JDK_VERSION" >&6; }
14763            fi # end check jdk version
14764          fi # end check rt.jar
14765        fi # end check javac
14766      fi # end check java
14767    fi # end check boot jdk found
14768  fi
14769
14770    done
14771  fi
14772
14773
14774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14776      # Do we have a bin/java?
14777      if test ! -x "$BOOT_JDK/bin/java"; then
14778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14780        BOOT_JDK_FOUND=no
14781      else
14782        # Do we have a bin/javac?
14783        if test ! -x "$BOOT_JDK/bin/javac"; then
14784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14788          BOOT_JDK_FOUND=no
14789        else
14790          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14791          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14792            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14794            BOOT_JDK_FOUND=no
14795          else
14796            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14798
14799            # Extra M4 quote needed to protect [] in grep expression.
14800            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14801            if test "x$FOUND_VERSION_78" = x; then
14802              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14804              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14805$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14806              BOOT_JDK_FOUND=no
14807            else
14808              # We're done! :-)
14809              BOOT_JDK_FOUND=yes
14810
14811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14812
14813  # Input might be given as Windows format, start by converting to
14814  # unix format.
14815  path="$BOOT_JDK"
14816  new_path=`$CYGPATH -u "$path"`
14817
14818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14821  # "foo.exe" is OK but "foo" is an error.
14822  #
14823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14824  # It is also a way to make sure we got the proper file name for the real test later on.
14825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14826  if test "x$test_shortpath" = x; then
14827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14830  fi
14831
14832  # Call helper function which possibly converts this using DOS-style short mode.
14833  # If so, the updated path is stored in $new_path.
14834
14835  input_path="$new_path"
14836  # Check if we need to convert this using DOS-style short mode. If the path
14837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14838  # take no chances and rewrite it.
14839  # Note: m4 eats our [], so we need to use [ and ] instead.
14840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14841  if test "x$has_forbidden_chars" != x; then
14842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14846      # Going to short mode and back again did indeed matter. Since short mode is
14847      # case insensitive, let's make it lowercase to improve readability.
14848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14849      # Now convert it back to Unix-stile (cygpath)
14850      input_path=`$CYGPATH -u "$shortmode_path"`
14851      new_path="$input_path"
14852    fi
14853  fi
14854
14855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14856  if test "x$test_cygdrive_prefix" = x; then
14857    # As a simple fix, exclude /usr/bin since it's not a real path.
14858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14860      # a path prefixed by /cygdrive for fixpath to work.
14861      new_path="$CYGWIN_ROOT_PATH$input_path"
14862    fi
14863  fi
14864
14865
14866  if test "x$path" != "x$new_path"; then
14867    BOOT_JDK="$new_path"
14868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14870  fi
14871
14872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14873
14874  path="$BOOT_JDK"
14875  has_colon=`$ECHO $path | $GREP ^.:`
14876  new_path="$path"
14877  if test "x$has_colon" = x; then
14878    # Not in mixed or Windows style, start by that.
14879    new_path=`cmd //c echo $path`
14880  fi
14881
14882
14883  input_path="$new_path"
14884  # Check if we need to convert this using DOS-style short mode. If the path
14885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14886  # take no chances and rewrite it.
14887  # Note: m4 eats our [], so we need to use [ and ] instead.
14888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14889  if test "x$has_forbidden_chars" != x; then
14890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14892  fi
14893
14894
14895  windows_path="$new_path"
14896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14897    unix_path=`$CYGPATH -u "$windows_path"`
14898    new_path="$unix_path"
14899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14901    new_path="$unix_path"
14902  fi
14903
14904  if test "x$path" != "x$new_path"; then
14905    BOOT_JDK="$new_path"
14906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14908  fi
14909
14910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14912
14913  else
14914    # We're on a posix platform. Hooray! :)
14915    path="$BOOT_JDK"
14916
14917    if test ! -f "$path" && test ! -d "$path"; then
14918      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14919    fi
14920
14921    has_space=`$ECHO "$path" | $GREP " "`
14922    if test "x$has_space" != x; then
14923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14925      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14926    fi
14927  fi
14928
14929              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14930$as_echo_n "checking for Boot JDK... " >&6; }
14931              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14932$as_echo "$BOOT_JDK" >&6; }
14933              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14934$as_echo_n "checking Boot JDK version... " >&6; }
14935              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14936              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14937$as_echo "$BOOT_JDK_VERSION" >&6; }
14938            fi # end check jdk version
14939          fi # end check rt.jar
14940        fi # end check javac
14941      fi # end check java
14942    fi # end check boot jdk found
14943  fi
14944
14945  fi
14946
14947
14948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14950      # Do we have a bin/java?
14951      if test ! -x "$BOOT_JDK/bin/java"; then
14952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14954        BOOT_JDK_FOUND=no
14955      else
14956        # Do we have a bin/javac?
14957        if test ! -x "$BOOT_JDK/bin/javac"; then
14958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14962          BOOT_JDK_FOUND=no
14963        else
14964          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14965          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14968            BOOT_JDK_FOUND=no
14969          else
14970            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14971            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14972
14973            # Extra M4 quote needed to protect [] in grep expression.
14974            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14975            if test "x$FOUND_VERSION_78" = x; then
14976              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14978              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14979$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14980              BOOT_JDK_FOUND=no
14981            else
14982              # We're done! :-)
14983              BOOT_JDK_FOUND=yes
14984
14985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14986
14987  # Input might be given as Windows format, start by converting to
14988  # unix format.
14989  path="$BOOT_JDK"
14990  new_path=`$CYGPATH -u "$path"`
14991
14992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14995  # "foo.exe" is OK but "foo" is an error.
14996  #
14997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14998  # It is also a way to make sure we got the proper file name for the real test later on.
14999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15000  if test "x$test_shortpath" = x; then
15001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15003    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15004  fi
15005
15006  # Call helper function which possibly converts this using DOS-style short mode.
15007  # If so, the updated path is stored in $new_path.
15008
15009  input_path="$new_path"
15010  # Check if we need to convert this using DOS-style short mode. If the path
15011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15012  # take no chances and rewrite it.
15013  # Note: m4 eats our [], so we need to use [ and ] instead.
15014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15015  if test "x$has_forbidden_chars" != x; then
15016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15020      # Going to short mode and back again did indeed matter. Since short mode is
15021      # case insensitive, let's make it lowercase to improve readability.
15022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15023      # Now convert it back to Unix-stile (cygpath)
15024      input_path=`$CYGPATH -u "$shortmode_path"`
15025      new_path="$input_path"
15026    fi
15027  fi
15028
15029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15030  if test "x$test_cygdrive_prefix" = x; then
15031    # As a simple fix, exclude /usr/bin since it's not a real path.
15032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15034      # a path prefixed by /cygdrive for fixpath to work.
15035      new_path="$CYGWIN_ROOT_PATH$input_path"
15036    fi
15037  fi
15038
15039
15040  if test "x$path" != "x$new_path"; then
15041    BOOT_JDK="$new_path"
15042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15044  fi
15045
15046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15047
15048  path="$BOOT_JDK"
15049  has_colon=`$ECHO $path | $GREP ^.:`
15050  new_path="$path"
15051  if test "x$has_colon" = x; then
15052    # Not in mixed or Windows style, start by that.
15053    new_path=`cmd //c echo $path`
15054  fi
15055
15056
15057  input_path="$new_path"
15058  # Check if we need to convert this using DOS-style short mode. If the path
15059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15060  # take no chances and rewrite it.
15061  # Note: m4 eats our [], so we need to use [ and ] instead.
15062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15063  if test "x$has_forbidden_chars" != x; then
15064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15066  fi
15067
15068
15069  windows_path="$new_path"
15070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15071    unix_path=`$CYGPATH -u "$windows_path"`
15072    new_path="$unix_path"
15073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15075    new_path="$unix_path"
15076  fi
15077
15078  if test "x$path" != "x$new_path"; then
15079    BOOT_JDK="$new_path"
15080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15082  fi
15083
15084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15086
15087  else
15088    # We're on a posix platform. Hooray! :)
15089    path="$BOOT_JDK"
15090
15091    if test ! -f "$path" && test ! -d "$path"; then
15092      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15093    fi
15094
15095    has_space=`$ECHO "$path" | $GREP " "`
15096    if test "x$has_space" != x; then
15097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15099      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15100    fi
15101  fi
15102
15103              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15104$as_echo_n "checking for Boot JDK... " >&6; }
15105              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15106$as_echo "$BOOT_JDK" >&6; }
15107              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15108$as_echo_n "checking Boot JDK version... " >&6; }
15109              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15110              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15111$as_echo "$BOOT_JDK_VERSION" >&6; }
15112            fi # end check jdk version
15113          fi # end check rt.jar
15114        fi # end check javac
15115      fi # end check java
15116    fi # end check boot jdk found
15117  fi
15118
15119
15120# If we haven't found anything yet, we've truly lost. Give up.
15121if test "x$BOOT_JDK_FOUND" = xno; then
15122
15123    # Print a helpful message on how to acquire the necessary build dependency.
15124    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15125    MISSING_DEPENDENCY=openjdk
15126    PKGHANDLER_COMMAND=
15127
15128    case $PKGHANDLER in
15129	apt-get)
15130                apt_help     $MISSING_DEPENDENCY ;;
15131    yum)
15132                yum_help     $MISSING_DEPENDENCY ;;
15133	port)
15134                port_help    $MISSING_DEPENDENCY ;;
15135	pkgutil)
15136                pkgutil_help $MISSING_DEPENDENCY ;;
15137	pkgadd)
15138                pkgadd_help  $MISSING_DEPENDENCY ;;
15139    * )
15140      break ;;
15141    esac
15142
15143    if test "x$PKGHANDLER_COMMAND" != x; then
15144        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15145    fi
15146
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15148$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15149  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15150$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15151  as_fn_error $? "Cannot continue" "$LINENO" 5
15152fi
15153
15154# Setup proper paths for what we found
15155BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15156if test ! -f "$BOOT_RTJAR"; then
15157    # On MacOSX it is called classes.jar
15158    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15159    if test -f "$BOOT_RTJAR"; then
15160      # Remove the ..
15161      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15162    fi
15163fi
15164BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15165BOOT_JDK="$BOOT_JDK"
15166
15167
15168
15169
15170# Setup tools from the Boot JDK.
15171
15172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15173$as_echo_n "checking for java in Boot JDK... " >&6; }
15174  JAVA=$BOOT_JDK/bin/java
15175  if test ! -x $JAVA; then
15176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15177$as_echo "not found" >&6; }
15178      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15179$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15180      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15181  fi
15182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15183$as_echo "ok" >&6; }
15184
15185
15186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15187$as_echo_n "checking for javac in Boot JDK... " >&6; }
15188  JAVAC=$BOOT_JDK/bin/javac
15189  if test ! -x $JAVAC; then
15190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15191$as_echo "not found" >&6; }
15192      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15193$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15194      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15195  fi
15196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15197$as_echo "ok" >&6; }
15198
15199
15200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15201$as_echo_n "checking for javah in Boot JDK... " >&6; }
15202  JAVAH=$BOOT_JDK/bin/javah
15203  if test ! -x $JAVAH; then
15204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15205$as_echo "not found" >&6; }
15206      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15207$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15208      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15209  fi
15210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15211$as_echo "ok" >&6; }
15212
15213
15214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15215$as_echo_n "checking for javap in Boot JDK... " >&6; }
15216  JAVAP=$BOOT_JDK/bin/javap
15217  if test ! -x $JAVAP; then
15218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15219$as_echo "not found" >&6; }
15220      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15221$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15222      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15223  fi
15224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15225$as_echo "ok" >&6; }
15226
15227
15228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15229$as_echo_n "checking for jar in Boot JDK... " >&6; }
15230  JAR=$BOOT_JDK/bin/jar
15231  if test ! -x $JAR; then
15232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15233$as_echo "not found" >&6; }
15234      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15235$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15236      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15237  fi
15238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15239$as_echo "ok" >&6; }
15240
15241
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15243$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15244  RMIC=$BOOT_JDK/bin/rmic
15245  if test ! -x $RMIC; then
15246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15247$as_echo "not found" >&6; }
15248      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15249$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15250      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15251  fi
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15253$as_echo "ok" >&6; }
15254
15255
15256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15257$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15258  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15259  if test ! -x $NATIVE2ASCII; then
15260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15261$as_echo "not found" >&6; }
15262      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15263$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15264      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15265  fi
15266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15267$as_echo "ok" >&6; }
15268
15269
15270# Finally, set some other options...
15271
15272# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15273BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15274
15275
15276
15277
15278##############################################################################
15279#
15280# Specify options for anything that is run with the Boot JDK.
15281#
15282
15283# Check whether --with-boot-jdk-jvmargs was given.
15284if test "${with_boot_jdk_jvmargs+set}" = set; then :
15285  withval=$with_boot_jdk_jvmargs;
15286fi
15287
15288
15289if test "x$with_boot_jdk_jvmargs" = x; then
15290    # Not all JVM:s accept the same arguments on the command line.
15291    # OpenJDK specific increase in thread stack for JDK build,
15292    # well more specifically, when running javac.
15293    if test "x$BUILD_NUM_BITS" = x32; then
15294       STACK_SIZE=768
15295    else
15296       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15297       # since 64-bit pointers are pushed on the stach. Apparently, we need
15298       # to increase the stack space when javacing the JDK....
15299       STACK_SIZE=1536
15300    fi
15301
15302    # Minimum amount of heap memory.
15303
15304    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15305    # If so, then append -Xms64M to boot_jdk_jvmargs
15306    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15307    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15308    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15309        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15310    fi
15311
15312    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15313        # Why does macosx need more heap? Its the huge JDK batch.
15314
15315    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15316    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15317    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15318    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15319    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15320        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15321    fi
15322
15323    else
15324
15325    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15326    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15327    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15328    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15329    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15330        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15331    fi
15332
15333    fi
15334    # When is adding -client something that speeds up the JVM?
15335    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15336
15337    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15338    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15339    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15340    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15341    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15342        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15343    fi
15344
15345
15346    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15347    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15348    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15349    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15350    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15351        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15352    fi
15353
15354
15355    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15356    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15357    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15358    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15359    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15360        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15361    fi
15362
15363    # Disable special log output when a debug build is used as Boot JDK...
15364
15365    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15366    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15367    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15368    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15369    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15370        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15371    fi
15372
15373fi
15374
15375BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15376
15377
15378
15379###############################################################################
15380#
15381# Configure the sources to use. We can add or override individual directories.
15382#
15383###############################################################################
15384
15385
15386
15387# Where are the sources. Any of these can be overridden
15388# using --with-override-corba and the likes.
15389LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15390CORBA_TOPDIR="$SRC_ROOT/corba"
15391JAXP_TOPDIR="$SRC_ROOT/jaxp"
15392JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15393HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15394JDK_TOPDIR="$SRC_ROOT/jdk"
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404###############################################################################
15405#
15406# Pickup additional source for a component from outside of the source root
15407# or override source for a component.
15408#
15409
15410# Check whether --with-add-source-root was given.
15411if test "${with_add_source_root+set}" = set; then :
15412  withval=$with_add_source_root;
15413fi
15414
15415
15416
15417# Check whether --with-override-source-root was given.
15418if test "${with_override_source_root+set}" = set; then :
15419  withval=$with_override_source_root;
15420fi
15421
15422
15423
15424# Check whether --with-adds-and-overrides was given.
15425if test "${with_adds_and_overrides+set}" = set; then :
15426  withval=$with_adds_and_overrides;
15427fi
15428
15429
15430if test "x$with_adds_and_overrides" != x; then
15431    with_add_source_root="$with_adds_and_overrides/adds"
15432    with_override_source_root="$with_adds_and_overrides/overrides"
15433fi
15434
15435if test "x$with_add_source_root" != x; then
15436    if ! test -d $with_add_source_root; then
15437       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15438    fi
15439    CURDIR="$PWD"
15440    cd "$with_add_source_root"
15441    ADD_SRC_ROOT="`pwd`"
15442    cd "$CURDIR"
15443    # Verify that the addon source root does not have any root makefiles.
15444    # If it does, then it is usually an error, prevent this.
15445    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15446       test -f $with_add_source_root/langtools/make/Makefile; then
15447        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
15448    fi
15449    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15450       test -f $with_add_source_root/corba/make/Makefile; then
15451        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
15452    fi
15453    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15454       test -f $with_add_source_root/jaxp/make/Makefile; then
15455        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
15456    fi
15457    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15458       test -f $with_add_source_root/jaxws/make/Makefile; then
15459        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
15460    fi
15461    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15462       test -f $with_add_source_root/hotspot/make/Makefile; then
15463        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
15464    fi
15465    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15466       test -f $with_add_source_root/jdk/make/Makefile; then
15467        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
15468    fi
15469fi
15470
15471
15472if test "x$with_override_source_root" != x; then
15473    if ! test -d $with_override_source_root; then
15474       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15475    fi
15476    CURDIR="$PWD"
15477    cd "$with_override_source_root"
15478    OVERRIDE_SRC_ROOT="`pwd`"
15479    cd "$CURDIR"
15480    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15481       test -f $with_override_source_root/langtools/make/Makefile; then
15482        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
15483    fi
15484    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15485       test -f $with_override_source_root/corba/make/Makefile; then
15486        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
15487    fi
15488    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15489       test -f $with_override_source_root/jaxp/make/Makefile; then
15490        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
15491    fi
15492    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15493       test -f $with_override_source_root/jaxws/make/Makefile; then
15494        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
15495    fi
15496    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15497       test -f $with_override_source_root/hotspot/make/Makefile; then
15498        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
15499    fi
15500    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15501       test -f $with_override_source_root/jdk/make/Makefile; then
15502        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
15503    fi
15504fi
15505
15506
15507###############################################################################
15508#
15509# Override a repo completely, this is used for example when you have 3 small
15510# development sandboxes of the langtools sources and want to avoid having 3 full
15511# OpenJDK sources checked out on disk.
15512#
15513# Assuming that the 3 langtools sandboxes are located here:
15514# /home/fredrik/sandbox1/langtools
15515# /home/fredrik/sandbox2/langtools
15516# /home/fredrik/sandbox3/langtools
15517#
15518# From the source root you create build subdirs manually:
15519#     mkdir -p build1 build2 build3
15520# in each build directory run:
15521#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15522#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15523#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15524#
15525
15526
15527# Check whether --with-override-langtools was given.
15528if test "${with_override_langtools+set}" = set; then :
15529  withval=$with_override_langtools;
15530fi
15531
15532
15533
15534# Check whether --with-override-corba was given.
15535if test "${with_override_corba+set}" = set; then :
15536  withval=$with_override_corba;
15537fi
15538
15539
15540
15541# Check whether --with-override-jaxp was given.
15542if test "${with_override_jaxp+set}" = set; then :
15543  withval=$with_override_jaxp;
15544fi
15545
15546
15547
15548# Check whether --with-override-jaxws was given.
15549if test "${with_override_jaxws+set}" = set; then :
15550  withval=$with_override_jaxws;
15551fi
15552
15553
15554
15555# Check whether --with-override-hotspot was given.
15556if test "${with_override_hotspot+set}" = set; then :
15557  withval=$with_override_hotspot;
15558fi
15559
15560
15561
15562# Check whether --with-override-jdk was given.
15563if test "${with_override_jdk+set}" = set; then :
15564  withval=$with_override_jdk;
15565fi
15566
15567
15568if test "x$with_override_langtools" != x; then
15569    CURDIR="$PWD"
15570    cd "$with_override_langtools"
15571    LANGTOOLS_TOPDIR="`pwd`"
15572    cd "$CURDIR"
15573    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15574        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15575    fi
15576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15577$as_echo_n "checking if langtools should be overridden... " >&6; }
15578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15579$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15580fi
15581if test "x$with_override_corba" != x; then
15582    CURDIR="$PWD"
15583    cd "$with_override_corba"
15584    CORBA_TOPDIR="`pwd`"
15585    cd "$CURDIR"
15586    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15587        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15588    fi
15589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15590$as_echo_n "checking if corba should be overridden... " >&6; }
15591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15592$as_echo "yes with $CORBA_TOPDIR" >&6; }
15593fi
15594if test "x$with_override_jaxp" != x; then
15595    CURDIR="$PWD"
15596    cd "$with_override_jaxp"
15597    JAXP_TOPDIR="`pwd`"
15598    cd "$CURDIR"
15599    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15600        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15601    fi
15602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15603$as_echo_n "checking if jaxp should be overridden... " >&6; }
15604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15605$as_echo "yes with $JAXP_TOPDIR" >&6; }
15606fi
15607if test "x$with_override_jaxws" != x; then
15608    CURDIR="$PWD"
15609    cd "$with_override_jaxws"
15610    JAXWS_TOPDIR="`pwd`"
15611    cd "$CURDIR"
15612    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15613        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15614    fi
15615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15616$as_echo_n "checking if jaxws should be overridden... " >&6; }
15617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15618$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15619fi
15620if test "x$with_override_hotspot" != x; then
15621    CURDIR="$PWD"
15622    cd "$with_override_hotspot"
15623    HOTSPOT_TOPDIR="`pwd`"
15624    cd "$CURDIR"
15625    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15626       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15627        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15628    fi
15629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15630$as_echo_n "checking if hotspot should be overridden... " >&6; }
15631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15632$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15633fi
15634if test "x$with_override_jdk" != x; then
15635    CURDIR="$PWD"
15636    cd "$with_override_jdk"
15637    JDK_TOPDIR="`pwd`"
15638    cd "$CURDIR"
15639    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15640        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15641    fi
15642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15643$as_echo_n "checking if JDK should be overridden... " >&6; }
15644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15645$as_echo "yes with $JDK_TOPDIR" >&6; }
15646fi
15647
15648
15649
15650BUILD_OUTPUT="$OUTPUT_ROOT"
15651
15652
15653HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15654BUILD_HOTSPOT=true
15655
15656
15657
15658# Check whether --with-import-hotspot was given.
15659if test "${with_import_hotspot+set}" = set; then :
15660  withval=$with_import_hotspot;
15661fi
15662
15663if test "x$with_import_hotspot" != x; then
15664    CURDIR="$PWD"
15665    cd "$with_import_hotspot"
15666    HOTSPOT_DIST="`pwd`"
15667    cd "$CURDIR"
15668    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15669        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15670    fi
15671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15672$as_echo_n "checking if hotspot should be imported... " >&6; }
15673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15674$as_echo "yes from $HOTSPOT_DIST" >&6; }
15675    BUILD_HOTSPOT=false
15676fi
15677
15678JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15679
15680
15681###############################################################################
15682#
15683# Setup the toolchain (compilers etc), i.e. the tools that need to be
15684# cross-compilation aware.
15685#
15686###############################################################################
15687
15688
15689###############################################################################
15690#
15691# Configure the development tool paths and potential sysroot.
15692#
15693ac_ext=cpp
15694ac_cpp='$CXXCPP $CPPFLAGS'
15695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15698
15699
15700# The option used to specify the target .o,.a or .so file.
15701# When compiling, how to specify the to be created object file.
15702CC_OUT_OPTION='-o$(SPACE)'
15703# When linking, how to specify the to be created executable.
15704EXE_OUT_OPTION='-o$(SPACE)'
15705# When linking, how to specify the to be created dynamically linkable library.
15706LD_OUT_OPTION='-o$(SPACE)'
15707# When archiving, how to specify the to be create static archive for object files.
15708AR_OUT_OPTION='rcs$(SPACE)'
15709
15710
15711
15712
15713
15714# Locate the actual tools
15715
15716if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15717
15718  # Store path to cygwin link.exe to help excluding it when searching for
15719  # VS linker. This must be done before changing the PATH when looking for VS.
15720  # Extract the first word of "link", so it can be a program name with args.
15721set dummy link; ac_word=$2
15722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15723$as_echo_n "checking for $ac_word... " >&6; }
15724if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15725  $as_echo_n "(cached) " >&6
15726else
15727  case $CYGWIN_LINK in
15728  [\\/]* | ?:[\\/]*)
15729  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15730  ;;
15731  *)
15732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15733for as_dir in $PATH
15734do
15735  IFS=$as_save_IFS
15736  test -z "$as_dir" && as_dir=.
15737    for ac_exec_ext in '' $ac_executable_extensions; do
15738  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15739    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15741    break 2
15742  fi
15743done
15744  done
15745IFS=$as_save_IFS
15746
15747  ;;
15748esac
15749fi
15750CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15751if test -n "$CYGWIN_LINK"; then
15752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15753$as_echo "$CYGWIN_LINK" >&6; }
15754else
15755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15756$as_echo "no" >&6; }
15757fi
15758
15759
15760  if test "x$CYGWIN_LINK" != x; then
15761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15762$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15763    "$CYGWIN_LINK" --version > /dev/null
15764    if test $? -eq 0 ; then
15765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15766$as_echo "yes" >&6; }
15767    else
15768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15769$as_echo "no" >&6; }
15770      # This might be the VS linker. Don't exclude it later on.
15771      CYGWIN_LINK=""
15772    fi
15773  fi
15774
15775  # First-hand choice is to locate and run the vsvars bat file.
15776
15777  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15778    VCVARSFILE="vc/bin/vcvars32.bat"
15779  else
15780    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15781  fi
15782
15783  VS_ENV_CMD=""
15784  VS_ENV_ARGS=""
15785  if test "x$with_toolsdir" != x; then
15786
15787  if test "x$VS_ENV_CMD" = x; then
15788    VS100BASE="$with_toolsdir/../.."
15789    METHOD="--with-tools-dir"
15790
15791  windows_path="$VS100BASE"
15792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15793    unix_path=`$CYGPATH -u "$windows_path"`
15794    VS100BASE="$unix_path"
15795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15797    VS100BASE="$unix_path"
15798  fi
15799
15800    if test -d "$VS100BASE"; then
15801      if test -f "$VS100BASE/$VCVARSFILE"; then
15802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15803$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15804        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15805      else
15806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15807$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15808        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15809$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15810      fi
15811    fi
15812  fi
15813
15814  fi
15815
15816  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15817    # Having specified an argument which is incorrect will produce an instant failure;
15818    # we should not go on looking
15819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15820$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15821    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15822$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15823    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15824  fi
15825
15826  if test "x$ProgramW6432" != x; then
15827
15828  if test "x$VS_ENV_CMD" = x; then
15829    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15830    METHOD="well-known name"
15831
15832  windows_path="$WIN_SDK_BASE"
15833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15834    unix_path=`$CYGPATH -u "$windows_path"`
15835    WIN_SDK_BASE="$unix_path"
15836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15838    WIN_SDK_BASE="$unix_path"
15839  fi
15840
15841    if test -d "$WIN_SDK_BASE"; then
15842      # There have been cases of partial or broken SDK installations. A missing
15843      # lib dir is not going to work.
15844      if test ! -d "$WIN_SDK_BASE/../lib"; then
15845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15846$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15847        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15848$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15849      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15851$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15852        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15853        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15854          VS_ENV_ARGS="/x86"
15855        else
15856          VS_ENV_ARGS="/x64"
15857        fi
15858      else
15859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15860$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15861        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15862$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15863      fi
15864    fi
15865  fi
15866
15867  fi
15868  if test "x$PROGRAMW6432" != x; then
15869
15870  if test "x$VS_ENV_CMD" = x; then
15871    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15872    METHOD="well-known name"
15873
15874  windows_path="$WIN_SDK_BASE"
15875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15876    unix_path=`$CYGPATH -u "$windows_path"`
15877    WIN_SDK_BASE="$unix_path"
15878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15880    WIN_SDK_BASE="$unix_path"
15881  fi
15882
15883    if test -d "$WIN_SDK_BASE"; then
15884      # There have been cases of partial or broken SDK installations. A missing
15885      # lib dir is not going to work.
15886      if test ! -d "$WIN_SDK_BASE/../lib"; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15888$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15889        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15890$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15891      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15894        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15895        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15896          VS_ENV_ARGS="/x86"
15897        else
15898          VS_ENV_ARGS="/x64"
15899        fi
15900      else
15901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15902$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15903        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15904$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15905      fi
15906    fi
15907  fi
15908
15909  fi
15910  if test "x$PROGRAMFILES" != x; then
15911
15912  if test "x$VS_ENV_CMD" = x; then
15913    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15914    METHOD="well-known name"
15915
15916  windows_path="$WIN_SDK_BASE"
15917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15918    unix_path=`$CYGPATH -u "$windows_path"`
15919    WIN_SDK_BASE="$unix_path"
15920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15922    WIN_SDK_BASE="$unix_path"
15923  fi
15924
15925    if test -d "$WIN_SDK_BASE"; then
15926      # There have been cases of partial or broken SDK installations. A missing
15927      # lib dir is not going to work.
15928      if test ! -d "$WIN_SDK_BASE/../lib"; then
15929        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15930$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15931        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15932$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15933      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15935$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15936        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15937        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15938          VS_ENV_ARGS="/x86"
15939        else
15940          VS_ENV_ARGS="/x64"
15941        fi
15942      else
15943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15944$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15945        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15946$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15947      fi
15948    fi
15949  fi
15950
15951  fi
15952
15953  if test "x$VS_ENV_CMD" = x; then
15954    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15955    METHOD="well-known name"
15956
15957  windows_path="$WIN_SDK_BASE"
15958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15959    unix_path=`$CYGPATH -u "$windows_path"`
15960    WIN_SDK_BASE="$unix_path"
15961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15963    WIN_SDK_BASE="$unix_path"
15964  fi
15965
15966    if test -d "$WIN_SDK_BASE"; then
15967      # There have been cases of partial or broken SDK installations. A missing
15968      # lib dir is not going to work.
15969      if test ! -d "$WIN_SDK_BASE/../lib"; then
15970        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15971$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15972        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15973$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15974      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15975        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15976$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15977        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15978        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15979          VS_ENV_ARGS="/x86"
15980        else
15981          VS_ENV_ARGS="/x64"
15982        fi
15983      else
15984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15985$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15987$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15988      fi
15989    fi
15990  fi
15991
15992
15993  if test "x$VS_ENV_CMD" = x; then
15994    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15995    METHOD="well-known name"
15996
15997  windows_path="$WIN_SDK_BASE"
15998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15999    unix_path=`$CYGPATH -u "$windows_path"`
16000    WIN_SDK_BASE="$unix_path"
16001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16003    WIN_SDK_BASE="$unix_path"
16004  fi
16005
16006    if test -d "$WIN_SDK_BASE"; then
16007      # There have been cases of partial or broken SDK installations. A missing
16008      # lib dir is not going to work.
16009      if test ! -d "$WIN_SDK_BASE/../lib"; then
16010        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16011$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16012        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16013$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16014      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16016$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16017        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16018        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16019          VS_ENV_ARGS="/x86"
16020        else
16021          VS_ENV_ARGS="/x64"
16022        fi
16023      else
16024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16025$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16026        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16027$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16028      fi
16029    fi
16030  fi
16031
16032
16033  if test "x$VS100COMNTOOLS" != x; then
16034
16035  if test "x$VS_ENV_CMD" = x; then
16036    VS100BASE="$VS100COMNTOOLS/../.."
16037    METHOD="VS100COMNTOOLS variable"
16038
16039  windows_path="$VS100BASE"
16040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16041    unix_path=`$CYGPATH -u "$windows_path"`
16042    VS100BASE="$unix_path"
16043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16045    VS100BASE="$unix_path"
16046  fi
16047
16048    if test -d "$VS100BASE"; then
16049      if test -f "$VS100BASE/$VCVARSFILE"; then
16050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16051$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16052        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16053      else
16054        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16055$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16056        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16057$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16058      fi
16059    fi
16060  fi
16061
16062  fi
16063  if test "x$PROGRAMFILES" != x; then
16064
16065  if test "x$VS_ENV_CMD" = x; then
16066    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16067    METHOD="well-known name"
16068
16069  windows_path="$VS100BASE"
16070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16071    unix_path=`$CYGPATH -u "$windows_path"`
16072    VS100BASE="$unix_path"
16073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16075    VS100BASE="$unix_path"
16076  fi
16077
16078    if test -d "$VS100BASE"; then
16079      if test -f "$VS100BASE/$VCVARSFILE"; then
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16081$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16082        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16083      else
16084        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16085$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16086        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16087$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16088      fi
16089    fi
16090  fi
16091
16092  fi
16093
16094  if test "x$VS_ENV_CMD" = x; then
16095    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16096    METHOD="well-known name"
16097
16098  windows_path="$VS100BASE"
16099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16100    unix_path=`$CYGPATH -u "$windows_path"`
16101    VS100BASE="$unix_path"
16102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16104    VS100BASE="$unix_path"
16105  fi
16106
16107    if test -d "$VS100BASE"; then
16108      if test -f "$VS100BASE/$VCVARSFILE"; then
16109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16110$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16111        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16112      else
16113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16114$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16115        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16116$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16117      fi
16118    fi
16119  fi
16120
16121
16122  if test "x$VS_ENV_CMD" = x; then
16123    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16124    METHOD="well-known name"
16125
16126  windows_path="$VS100BASE"
16127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16128    unix_path=`$CYGPATH -u "$windows_path"`
16129    VS100BASE="$unix_path"
16130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16132    VS100BASE="$unix_path"
16133  fi
16134
16135    if test -d "$VS100BASE"; then
16136      if test -f "$VS100BASE/$VCVARSFILE"; then
16137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16138$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16139        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16140      else
16141        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16142$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16143        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16144$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16145      fi
16146    fi
16147  fi
16148
16149
16150  if test "x$VS_ENV_CMD" != x; then
16151    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16152
16153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16154
16155  # First separate the path from the arguments. This will split at the first
16156  # space.
16157  complete="$VS_ENV_CMD"
16158  path="${complete%% *}"
16159  tmp="$complete EOL"
16160  arguments="${tmp#* }"
16161
16162  # Input might be given as Windows format, start by converting to
16163  # unix format.
16164  new_path=`$CYGPATH -u "$path"`
16165
16166  # Now try to locate executable using which
16167  new_path=`$WHICH "$new_path" 2> /dev/null`
16168  # bat and cmd files are not always considered executable in cygwin causing which
16169  # to not find them
16170  if test "x$new_path" = x \
16171           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16172           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16173    new_path=`$CYGPATH -u "$path"`
16174  fi
16175  if test "x$new_path" = x; then
16176    # Oops. Which didn't find the executable.
16177    # The splitting of arguments from the executable at a space might have been incorrect,
16178    # since paths with space are more likely in Windows. Give it another try with the whole
16179    # argument.
16180    path="$complete"
16181    arguments="EOL"
16182    new_path=`$CYGPATH -u "$path"`
16183    new_path=`$WHICH "$new_path" 2> /dev/null`
16184    # bat and cmd files are not always considered executable in cygwin causing which
16185    # to not find them
16186    if test "x$new_path" = x \
16187             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16188             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16189      new_path=`$CYGPATH -u "$path"`
16190    fi
16191    if test "x$new_path" = x; then
16192      # It's still not found. Now this is an unrecoverable error.
16193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16194$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16195      has_space=`$ECHO "$complete" | $GREP " "`
16196      if test "x$has_space" != x; then
16197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16199      fi
16200      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16201    fi
16202  fi
16203
16204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16207  # "foo.exe" is OK but "foo" is an error.
16208  #
16209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16210  # It is also a way to make sure we got the proper file name for the real test later on.
16211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16212  if test "x$test_shortpath" = x; then
16213    # Short path failed, file does not exist as specified.
16214    # Try adding .exe or .cmd
16215    if test -f "${new_path}.exe"; then
16216       input_to_shortpath="${new_path}.exe"
16217    elif test -f "${new_path}.cmd"; then
16218       input_to_shortpath="${new_path}.cmd"
16219    else
16220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16221$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16222      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16223$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16224      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16225    fi
16226  else
16227    input_to_shortpath="$new_path"
16228  fi
16229
16230  # Call helper function which possibly converts this using DOS-style short mode.
16231  # If so, the updated path is stored in $new_path.
16232  new_path="$input_to_shortpath"
16233
16234  input_path="$input_to_shortpath"
16235  # Check if we need to convert this using DOS-style short mode. If the path
16236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16237  # take no chances and rewrite it.
16238  # Note: m4 eats our [], so we need to use [ and ] instead.
16239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16240  if test "x$has_forbidden_chars" != x; then
16241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16245      # Going to short mode and back again did indeed matter. Since short mode is
16246      # case insensitive, let's make it lowercase to improve readability.
16247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16248      # Now convert it back to Unix-stile (cygpath)
16249      input_path=`$CYGPATH -u "$shortmode_path"`
16250      new_path="$input_path"
16251    fi
16252  fi
16253
16254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16255  if test "x$test_cygdrive_prefix" = x; then
16256    # As a simple fix, exclude /usr/bin since it's not a real path.
16257    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16259      # a path prefixed by /cygdrive for fixpath to work.
16260      new_path="$CYGWIN_ROOT_PATH$input_path"
16261    fi
16262  fi
16263
16264  # remove trailing .exe if any
16265  new_path="${new_path/%.exe/}"
16266
16267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16268
16269  # First separate the path from the arguments. This will split at the first
16270  # space.
16271  complete="$VS_ENV_CMD"
16272  path="${complete%% *}"
16273  tmp="$complete EOL"
16274  arguments="${tmp#* }"
16275
16276  # Input might be given as Windows format, start by converting to
16277  # unix format.
16278  new_path="$path"
16279
16280  windows_path="$new_path"
16281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16282    unix_path=`$CYGPATH -u "$windows_path"`
16283    new_path="$unix_path"
16284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16286    new_path="$unix_path"
16287  fi
16288
16289
16290  # Now try to locate executable using which
16291  new_path=`$WHICH "$new_path" 2> /dev/null`
16292
16293  if test "x$new_path" = x; then
16294    # Oops. Which didn't find the executable.
16295    # The splitting of arguments from the executable at a space might have been incorrect,
16296    # since paths with space are more likely in Windows. Give it another try with the whole
16297    # argument.
16298    path="$complete"
16299    arguments="EOL"
16300    new_path="$path"
16301
16302  windows_path="$new_path"
16303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16304    unix_path=`$CYGPATH -u "$windows_path"`
16305    new_path="$unix_path"
16306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16308    new_path="$unix_path"
16309  fi
16310
16311
16312    new_path=`$WHICH "$new_path" 2> /dev/null`
16313
16314    if test "x$new_path" = x; then
16315      # It's still not found. Now this is an unrecoverable error.
16316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16317$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16318      has_space=`$ECHO "$complete" | $GREP " "`
16319      if test "x$has_space" != x; then
16320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16322      fi
16323      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16324    fi
16325  fi
16326
16327  # Now new_path has a complete unix path to the binary
16328  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16329    # Keep paths in /bin as-is, but remove trailing .exe if any
16330    new_path="${new_path/%.exe/}"
16331    # Do not save /bin paths to all_fixpath_prefixes!
16332  else
16333    # Not in mixed or Windows style, start by that.
16334    new_path=`cmd //c echo $new_path`
16335
16336  input_path="$new_path"
16337  # Check if we need to convert this using DOS-style short mode. If the path
16338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16339  # take no chances and rewrite it.
16340  # Note: m4 eats our [], so we need to use [ and ] instead.
16341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16342  if test "x$has_forbidden_chars" != x; then
16343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16345  fi
16346
16347    # Output is in $new_path
16348
16349  windows_path="$new_path"
16350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16351    unix_path=`$CYGPATH -u "$windows_path"`
16352    new_path="$unix_path"
16353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16355    new_path="$unix_path"
16356  fi
16357
16358    # remove trailing .exe if any
16359    new_path="${new_path/%.exe/}"
16360
16361    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16362    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16363  fi
16364
16365  else
16366    # We're on a posix platform. Hooray! :)
16367    # First separate the path from the arguments. This will split at the first
16368    # space.
16369    complete="$VS_ENV_CMD"
16370    path="${complete%% *}"
16371    tmp="$complete EOL"
16372    arguments="${tmp#* }"
16373
16374    new_path=`$WHICH $path 2> /dev/null`
16375    if test "x$new_path" = x; then
16376      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16377      if test "x$is_absolute_path" != x; then
16378        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16379$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16380        new_path="$path"
16381      else
16382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16383$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16384        has_space=`$ECHO "$complete" | $GREP " "`
16385        if test "x$has_space" != x; then
16386          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16387$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16388        fi
16389        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16390      fi
16391    fi
16392  fi
16393
16394  # Now join together the path and the arguments once again
16395  if test "x$arguments" != xEOL; then
16396      new_complete="$new_path ${arguments% *}"
16397  else
16398      new_complete="$new_path"
16399  fi
16400
16401  if test "x$complete" != "x$new_complete"; then
16402    VS_ENV_CMD="$new_complete"
16403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16404$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16405  fi
16406
16407
16408    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16409    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16410$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16411    cd $OUTPUT_ROOT
16412    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16413    # to autoconf standards.
16414
16415    #----
16416
16417    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16418    # but calculate the difference in Cygwin environment before/after running it and then
16419    # apply the diff.
16420
16421    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16422      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16423      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16424      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16425    else
16426      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16427      _dosbash=`cmd //c echo \`which bash\``
16428    fi
16429
16430    # generate the set of exported vars before/after the vs10 setup
16431    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16432    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16433    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16434    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16435
16436    # Now execute the newly created bat file.
16437    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16438    cmd /c localdevenvtmp.bat | cat
16439
16440    # apply the diff (less some non-vs10 vars named by "!")
16441    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16442    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16443    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16444
16445    # cleanup
16446    $RM localdevenvtmp*
16447    #----
16448    cd $CURDIR
16449    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16451$as_echo "no" >&6; }
16452      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16453$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16454      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16455$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16456      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16457$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16458      as_fn_error $? "Cannot continue" "$LINENO" 5
16459    fi
16460
16461    # Now set all paths and other env variables. This will allow the rest of
16462    # the configure script to find and run the compiler in the proper way.
16463    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16464$as_echo "$as_me: Setting extracted environment variables" >&6;}
16465    . $OUTPUT_ROOT/localdevenv.sh
16466  else
16467    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16468    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16469$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16470  fi
16471
16472  # At this point, we should have corrent variables in the environment, or we can't continue.
16473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16474$as_echo_n "checking for Visual Studio variables... " >&6; }
16475
16476  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16477    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16478      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16479$as_echo "present but broken" >&6; }
16480      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16481    else
16482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16483$as_echo "ok" >&6; }
16484      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16485      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16486      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16487      VS_PATH="$PATH"
16488
16489
16490
16491    fi
16492  else
16493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16494$as_echo "not found" >&6; }
16495
16496    if test "x$VS_ENV_CMD" = x; then
16497      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16498$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16499      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16500$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16501    else
16502      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16503$as_echo "$as_me: Running the extraction script failed." >&6;}
16504    fi
16505    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16506$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16507    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16508$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16509    as_fn_error $? "Cannot continue" "$LINENO" 5
16510  fi
16511
16512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16513$as_echo_n "checking for msvcr100.dll... " >&6; }
16514
16515# Check whether --with-msvcr-dll was given.
16516if test "${with_msvcr_dll+set}" = set; then :
16517  withval=$with_msvcr_dll;
16518fi
16519
16520  if test "x$with_msvcr_dll" != x; then
16521    MSVCR_DLL="$with_msvcr_dll"
16522  else
16523    if test "x$VCINSTALLDIR" != x; then
16524      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16525        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16526      else
16527        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16528        if test "x$MSVCR_DLL" = x; then
16529          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16530        fi
16531      fi
16532      if test "x$MSVCR_DLL" != x; then
16533        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16534$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16535      else
16536        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16537$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16538      fi
16539    fi
16540    if test "x$MSVCR_DLL" = x; then
16541      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16542        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16543$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16544        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16545      fi
16546    fi
16547  fi
16548  if test "x$MSVCR_DLL" = x; then
16549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16550$as_echo "no" >&6; }
16551    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16552  fi
16553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16554$as_echo "$MSVCR_DLL" >&6; }
16555
16556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16557
16558  # Input might be given as Windows format, start by converting to
16559  # unix format.
16560  path="$MSVCR_DLL"
16561  new_path=`$CYGPATH -u "$path"`
16562
16563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16566  # "foo.exe" is OK but "foo" is an error.
16567  #
16568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16569  # It is also a way to make sure we got the proper file name for the real test later on.
16570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16571  if test "x$test_shortpath" = x; then
16572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16573$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16574    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16575  fi
16576
16577  # Call helper function which possibly converts this using DOS-style short mode.
16578  # If so, the updated path is stored in $new_path.
16579
16580  input_path="$new_path"
16581  # Check if we need to convert this using DOS-style short mode. If the path
16582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16583  # take no chances and rewrite it.
16584  # Note: m4 eats our [], so we need to use [ and ] instead.
16585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16586  if test "x$has_forbidden_chars" != x; then
16587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16591      # Going to short mode and back again did indeed matter. Since short mode is
16592      # case insensitive, let's make it lowercase to improve readability.
16593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16594      # Now convert it back to Unix-stile (cygpath)
16595      input_path=`$CYGPATH -u "$shortmode_path"`
16596      new_path="$input_path"
16597    fi
16598  fi
16599
16600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16601  if test "x$test_cygdrive_prefix" = x; then
16602    # As a simple fix, exclude /usr/bin since it's not a real path.
16603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16605      # a path prefixed by /cygdrive for fixpath to work.
16606      new_path="$CYGWIN_ROOT_PATH$input_path"
16607    fi
16608  fi
16609
16610
16611  if test "x$path" != "x$new_path"; then
16612    MSVCR_DLL="$new_path"
16613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16614$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16615  fi
16616
16617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16618
16619  path="$MSVCR_DLL"
16620  has_colon=`$ECHO $path | $GREP ^.:`
16621  new_path="$path"
16622  if test "x$has_colon" = x; then
16623    # Not in mixed or Windows style, start by that.
16624    new_path=`cmd //c echo $path`
16625  fi
16626
16627
16628  input_path="$new_path"
16629  # Check if we need to convert this using DOS-style short mode. If the path
16630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16631  # take no chances and rewrite it.
16632  # Note: m4 eats our [], so we need to use [ and ] instead.
16633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16634  if test "x$has_forbidden_chars" != x; then
16635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16637  fi
16638
16639
16640  windows_path="$new_path"
16641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16642    unix_path=`$CYGPATH -u "$windows_path"`
16643    new_path="$unix_path"
16644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16646    new_path="$unix_path"
16647  fi
16648
16649  if test "x$path" != "x$new_path"; then
16650    MSVCR_DLL="$new_path"
16651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16652$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16653  fi
16654
16655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16657
16658  else
16659    # We're on a posix platform. Hooray! :)
16660    path="$MSVCR_DLL"
16661
16662    if test ! -f "$path" && test ! -d "$path"; then
16663      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16664    fi
16665
16666    has_space=`$ECHO "$path" | $GREP " "`
16667    if test "x$has_space" != x; then
16668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16669$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16670      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16671    fi
16672  fi
16673
16674
16675fi
16676
16677
16678
16679# If --build AND --host is set, then the configure script will find any
16680# cross compilation tools in the PATH. Cross compilation tools
16681# follows the cross compilation standard where they are prefixed with ${host}.
16682# For example the binary i686-sun-solaris2.10-gcc
16683# will cross compile for i686-sun-solaris2.10
16684# If neither of build and host is not set, then build=host and the
16685# default compiler found in the path will be used.
16686# Setting only --host, does not seem to be really supported.
16687# Please set both --build and --host if you want to cross compile.
16688
16689if test "x$COMPILE_TYPE" = "xcross"; then
16690    # Now we to find a C/C++ compiler that can build executables for the build
16691    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16692    # once. Also, we need to do this before adding a tools dir to the path,
16693    # otherwise we might pick up cross-compilers which don't use standard naming.
16694    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16695    # to wait until they are properly discovered.
16696    for ac_prog in cl cc gcc
16697do
16698  # Extract the first word of "$ac_prog", so it can be a program name with args.
16699set dummy $ac_prog; ac_word=$2
16700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16701$as_echo_n "checking for $ac_word... " >&6; }
16702if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16703  $as_echo_n "(cached) " >&6
16704else
16705  case $BUILD_CC in
16706  [\\/]* | ?:[\\/]*)
16707  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16708  ;;
16709  *)
16710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16711for as_dir in $PATH
16712do
16713  IFS=$as_save_IFS
16714  test -z "$as_dir" && as_dir=.
16715    for ac_exec_ext in '' $ac_executable_extensions; do
16716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16717    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16719    break 2
16720  fi
16721done
16722  done
16723IFS=$as_save_IFS
16724
16725  ;;
16726esac
16727fi
16728BUILD_CC=$ac_cv_path_BUILD_CC
16729if test -n "$BUILD_CC"; then
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16731$as_echo "$BUILD_CC" >&6; }
16732else
16733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16734$as_echo "no" >&6; }
16735fi
16736
16737
16738  test -n "$BUILD_CC" && break
16739done
16740
16741
16742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16743
16744  # First separate the path from the arguments. This will split at the first
16745  # space.
16746  complete="$BUILD_CC"
16747  path="${complete%% *}"
16748  tmp="$complete EOL"
16749  arguments="${tmp#* }"
16750
16751  # Input might be given as Windows format, start by converting to
16752  # unix format.
16753  new_path=`$CYGPATH -u "$path"`
16754
16755  # Now try to locate executable using which
16756  new_path=`$WHICH "$new_path" 2> /dev/null`
16757  # bat and cmd files are not always considered executable in cygwin causing which
16758  # to not find them
16759  if test "x$new_path" = x \
16760           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16761           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16762    new_path=`$CYGPATH -u "$path"`
16763  fi
16764  if test "x$new_path" = x; then
16765    # Oops. Which didn't find the executable.
16766    # The splitting of arguments from the executable at a space might have been incorrect,
16767    # since paths with space are more likely in Windows. Give it another try with the whole
16768    # argument.
16769    path="$complete"
16770    arguments="EOL"
16771    new_path=`$CYGPATH -u "$path"`
16772    new_path=`$WHICH "$new_path" 2> /dev/null`
16773    # bat and cmd files are not always considered executable in cygwin causing which
16774    # to not find them
16775    if test "x$new_path" = x \
16776             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16777             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16778      new_path=`$CYGPATH -u "$path"`
16779    fi
16780    if test "x$new_path" = x; then
16781      # It's still not found. Now this is an unrecoverable error.
16782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16783$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16784      has_space=`$ECHO "$complete" | $GREP " "`
16785      if test "x$has_space" != x; then
16786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16788      fi
16789      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16790    fi
16791  fi
16792
16793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16796  # "foo.exe" is OK but "foo" is an error.
16797  #
16798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16799  # It is also a way to make sure we got the proper file name for the real test later on.
16800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16801  if test "x$test_shortpath" = x; then
16802    # Short path failed, file does not exist as specified.
16803    # Try adding .exe or .cmd
16804    if test -f "${new_path}.exe"; then
16805       input_to_shortpath="${new_path}.exe"
16806    elif test -f "${new_path}.cmd"; then
16807       input_to_shortpath="${new_path}.cmd"
16808    else
16809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16810$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16813      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16814    fi
16815  else
16816    input_to_shortpath="$new_path"
16817  fi
16818
16819  # Call helper function which possibly converts this using DOS-style short mode.
16820  # If so, the updated path is stored in $new_path.
16821  new_path="$input_to_shortpath"
16822
16823  input_path="$input_to_shortpath"
16824  # Check if we need to convert this using DOS-style short mode. If the path
16825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16826  # take no chances and rewrite it.
16827  # Note: m4 eats our [], so we need to use [ and ] instead.
16828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16829  if test "x$has_forbidden_chars" != x; then
16830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16834      # Going to short mode and back again did indeed matter. Since short mode is
16835      # case insensitive, let's make it lowercase to improve readability.
16836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16837      # Now convert it back to Unix-stile (cygpath)
16838      input_path=`$CYGPATH -u "$shortmode_path"`
16839      new_path="$input_path"
16840    fi
16841  fi
16842
16843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16844  if test "x$test_cygdrive_prefix" = x; then
16845    # As a simple fix, exclude /usr/bin since it's not a real path.
16846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16848      # a path prefixed by /cygdrive for fixpath to work.
16849      new_path="$CYGWIN_ROOT_PATH$input_path"
16850    fi
16851  fi
16852
16853  # remove trailing .exe if any
16854  new_path="${new_path/%.exe/}"
16855
16856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16857
16858  # First separate the path from the arguments. This will split at the first
16859  # space.
16860  complete="$BUILD_CC"
16861  path="${complete%% *}"
16862  tmp="$complete EOL"
16863  arguments="${tmp#* }"
16864
16865  # Input might be given as Windows format, start by converting to
16866  # unix format.
16867  new_path="$path"
16868
16869  windows_path="$new_path"
16870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16871    unix_path=`$CYGPATH -u "$windows_path"`
16872    new_path="$unix_path"
16873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16875    new_path="$unix_path"
16876  fi
16877
16878
16879  # Now try to locate executable using which
16880  new_path=`$WHICH "$new_path" 2> /dev/null`
16881
16882  if test "x$new_path" = x; then
16883    # Oops. Which didn't find the executable.
16884    # The splitting of arguments from the executable at a space might have been incorrect,
16885    # since paths with space are more likely in Windows. Give it another try with the whole
16886    # argument.
16887    path="$complete"
16888    arguments="EOL"
16889    new_path="$path"
16890
16891  windows_path="$new_path"
16892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16893    unix_path=`$CYGPATH -u "$windows_path"`
16894    new_path="$unix_path"
16895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16897    new_path="$unix_path"
16898  fi
16899
16900
16901    new_path=`$WHICH "$new_path" 2> /dev/null`
16902
16903    if test "x$new_path" = x; then
16904      # It's still not found. Now this is an unrecoverable error.
16905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16906$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16907      has_space=`$ECHO "$complete" | $GREP " "`
16908      if test "x$has_space" != x; then
16909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16911      fi
16912      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16913    fi
16914  fi
16915
16916  # Now new_path has a complete unix path to the binary
16917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16918    # Keep paths in /bin as-is, but remove trailing .exe if any
16919    new_path="${new_path/%.exe/}"
16920    # Do not save /bin paths to all_fixpath_prefixes!
16921  else
16922    # Not in mixed or Windows style, start by that.
16923    new_path=`cmd //c echo $new_path`
16924
16925  input_path="$new_path"
16926  # Check if we need to convert this using DOS-style short mode. If the path
16927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16928  # take no chances and rewrite it.
16929  # Note: m4 eats our [], so we need to use [ and ] instead.
16930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16931  if test "x$has_forbidden_chars" != x; then
16932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16934  fi
16935
16936    # Output is in $new_path
16937
16938  windows_path="$new_path"
16939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16940    unix_path=`$CYGPATH -u "$windows_path"`
16941    new_path="$unix_path"
16942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16944    new_path="$unix_path"
16945  fi
16946
16947    # remove trailing .exe if any
16948    new_path="${new_path/%.exe/}"
16949
16950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16952  fi
16953
16954  else
16955    # We're on a posix platform. Hooray! :)
16956    # First separate the path from the arguments. This will split at the first
16957    # space.
16958    complete="$BUILD_CC"
16959    path="${complete%% *}"
16960    tmp="$complete EOL"
16961    arguments="${tmp#* }"
16962
16963    new_path=`$WHICH $path 2> /dev/null`
16964    if test "x$new_path" = x; then
16965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16966      if test "x$is_absolute_path" != x; then
16967        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16968$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16969        new_path="$path"
16970      else
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16972$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16973        has_space=`$ECHO "$complete" | $GREP " "`
16974        if test "x$has_space" != x; then
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16976$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16977        fi
16978        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16979      fi
16980    fi
16981  fi
16982
16983  # Now join together the path and the arguments once again
16984  if test "x$arguments" != xEOL; then
16985      new_complete="$new_path ${arguments% *}"
16986  else
16987      new_complete="$new_path"
16988  fi
16989
16990  if test "x$complete" != "x$new_complete"; then
16991    BUILD_CC="$new_complete"
16992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16993$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16994  fi
16995
16996    for ac_prog in cl CC g++
16997do
16998  # Extract the first word of "$ac_prog", so it can be a program name with args.
16999set dummy $ac_prog; ac_word=$2
17000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17001$as_echo_n "checking for $ac_word... " >&6; }
17002if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17003  $as_echo_n "(cached) " >&6
17004else
17005  case $BUILD_CXX in
17006  [\\/]* | ?:[\\/]*)
17007  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17008  ;;
17009  *)
17010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17011for as_dir in $PATH
17012do
17013  IFS=$as_save_IFS
17014  test -z "$as_dir" && as_dir=.
17015    for ac_exec_ext in '' $ac_executable_extensions; do
17016  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17017    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17019    break 2
17020  fi
17021done
17022  done
17023IFS=$as_save_IFS
17024
17025  ;;
17026esac
17027fi
17028BUILD_CXX=$ac_cv_path_BUILD_CXX
17029if test -n "$BUILD_CXX"; then
17030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17031$as_echo "$BUILD_CXX" >&6; }
17032else
17033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17034$as_echo "no" >&6; }
17035fi
17036
17037
17038  test -n "$BUILD_CXX" && break
17039done
17040
17041
17042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17043
17044  # First separate the path from the arguments. This will split at the first
17045  # space.
17046  complete="$BUILD_CXX"
17047  path="${complete%% *}"
17048  tmp="$complete EOL"
17049  arguments="${tmp#* }"
17050
17051  # Input might be given as Windows format, start by converting to
17052  # unix format.
17053  new_path=`$CYGPATH -u "$path"`
17054
17055  # Now try to locate executable using which
17056  new_path=`$WHICH "$new_path" 2> /dev/null`
17057  # bat and cmd files are not always considered executable in cygwin causing which
17058  # to not find them
17059  if test "x$new_path" = x \
17060           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17061           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17062    new_path=`$CYGPATH -u "$path"`
17063  fi
17064  if test "x$new_path" = x; then
17065    # Oops. Which didn't find the executable.
17066    # The splitting of arguments from the executable at a space might have been incorrect,
17067    # since paths with space are more likely in Windows. Give it another try with the whole
17068    # argument.
17069    path="$complete"
17070    arguments="EOL"
17071    new_path=`$CYGPATH -u "$path"`
17072    new_path=`$WHICH "$new_path" 2> /dev/null`
17073    # bat and cmd files are not always considered executable in cygwin causing which
17074    # to not find them
17075    if test "x$new_path" = x \
17076             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17077             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17078      new_path=`$CYGPATH -u "$path"`
17079    fi
17080    if test "x$new_path" = x; then
17081      # It's still not found. Now this is an unrecoverable error.
17082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17083$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17084      has_space=`$ECHO "$complete" | $GREP " "`
17085      if test "x$has_space" != x; then
17086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17088      fi
17089      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17090    fi
17091  fi
17092
17093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17096  # "foo.exe" is OK but "foo" is an error.
17097  #
17098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17099  # It is also a way to make sure we got the proper file name for the real test later on.
17100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17101  if test "x$test_shortpath" = x; then
17102    # Short path failed, file does not exist as specified.
17103    # Try adding .exe or .cmd
17104    if test -f "${new_path}.exe"; then
17105       input_to_shortpath="${new_path}.exe"
17106    elif test -f "${new_path}.cmd"; then
17107       input_to_shortpath="${new_path}.cmd"
17108    else
17109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17110$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17111      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17112$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17113      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17114    fi
17115  else
17116    input_to_shortpath="$new_path"
17117  fi
17118
17119  # Call helper function which possibly converts this using DOS-style short mode.
17120  # If so, the updated path is stored in $new_path.
17121  new_path="$input_to_shortpath"
17122
17123  input_path="$input_to_shortpath"
17124  # Check if we need to convert this using DOS-style short mode. If the path
17125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17126  # take no chances and rewrite it.
17127  # Note: m4 eats our [], so we need to use [ and ] instead.
17128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17129  if test "x$has_forbidden_chars" != x; then
17130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17134      # Going to short mode and back again did indeed matter. Since short mode is
17135      # case insensitive, let's make it lowercase to improve readability.
17136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17137      # Now convert it back to Unix-stile (cygpath)
17138      input_path=`$CYGPATH -u "$shortmode_path"`
17139      new_path="$input_path"
17140    fi
17141  fi
17142
17143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17144  if test "x$test_cygdrive_prefix" = x; then
17145    # As a simple fix, exclude /usr/bin since it's not a real path.
17146    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17148      # a path prefixed by /cygdrive for fixpath to work.
17149      new_path="$CYGWIN_ROOT_PATH$input_path"
17150    fi
17151  fi
17152
17153  # remove trailing .exe if any
17154  new_path="${new_path/%.exe/}"
17155
17156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17157
17158  # First separate the path from the arguments. This will split at the first
17159  # space.
17160  complete="$BUILD_CXX"
17161  path="${complete%% *}"
17162  tmp="$complete EOL"
17163  arguments="${tmp#* }"
17164
17165  # Input might be given as Windows format, start by converting to
17166  # unix format.
17167  new_path="$path"
17168
17169  windows_path="$new_path"
17170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17171    unix_path=`$CYGPATH -u "$windows_path"`
17172    new_path="$unix_path"
17173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17175    new_path="$unix_path"
17176  fi
17177
17178
17179  # Now try to locate executable using which
17180  new_path=`$WHICH "$new_path" 2> /dev/null`
17181
17182  if test "x$new_path" = x; then
17183    # Oops. Which didn't find the executable.
17184    # The splitting of arguments from the executable at a space might have been incorrect,
17185    # since paths with space are more likely in Windows. Give it another try with the whole
17186    # argument.
17187    path="$complete"
17188    arguments="EOL"
17189    new_path="$path"
17190
17191  windows_path="$new_path"
17192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17193    unix_path=`$CYGPATH -u "$windows_path"`
17194    new_path="$unix_path"
17195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17197    new_path="$unix_path"
17198  fi
17199
17200
17201    new_path=`$WHICH "$new_path" 2> /dev/null`
17202
17203    if test "x$new_path" = x; then
17204      # It's still not found. Now this is an unrecoverable error.
17205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17206$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17207      has_space=`$ECHO "$complete" | $GREP " "`
17208      if test "x$has_space" != x; then
17209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17211      fi
17212      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17213    fi
17214  fi
17215
17216  # Now new_path has a complete unix path to the binary
17217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17218    # Keep paths in /bin as-is, but remove trailing .exe if any
17219    new_path="${new_path/%.exe/}"
17220    # Do not save /bin paths to all_fixpath_prefixes!
17221  else
17222    # Not in mixed or Windows style, start by that.
17223    new_path=`cmd //c echo $new_path`
17224
17225  input_path="$new_path"
17226  # Check if we need to convert this using DOS-style short mode. If the path
17227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17228  # take no chances and rewrite it.
17229  # Note: m4 eats our [], so we need to use [ and ] instead.
17230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17231  if test "x$has_forbidden_chars" != x; then
17232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17234  fi
17235
17236    # Output is in $new_path
17237
17238  windows_path="$new_path"
17239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17240    unix_path=`$CYGPATH -u "$windows_path"`
17241    new_path="$unix_path"
17242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17244    new_path="$unix_path"
17245  fi
17246
17247    # remove trailing .exe if any
17248    new_path="${new_path/%.exe/}"
17249
17250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17252  fi
17253
17254  else
17255    # We're on a posix platform. Hooray! :)
17256    # First separate the path from the arguments. This will split at the first
17257    # space.
17258    complete="$BUILD_CXX"
17259    path="${complete%% *}"
17260    tmp="$complete EOL"
17261    arguments="${tmp#* }"
17262
17263    new_path=`$WHICH $path 2> /dev/null`
17264    if test "x$new_path" = x; then
17265      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17266      if test "x$is_absolute_path" != x; then
17267        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17268$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17269        new_path="$path"
17270      else
17271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17272$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17273        has_space=`$ECHO "$complete" | $GREP " "`
17274        if test "x$has_space" != x; then
17275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17277        fi
17278        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17279      fi
17280    fi
17281  fi
17282
17283  # Now join together the path and the arguments once again
17284  if test "x$arguments" != xEOL; then
17285      new_complete="$new_path ${arguments% *}"
17286  else
17287      new_complete="$new_path"
17288  fi
17289
17290  if test "x$complete" != "x$new_complete"; then
17291    BUILD_CXX="$new_complete"
17292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17293$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17294  fi
17295
17296    # Extract the first word of "ld", so it can be a program name with args.
17297set dummy ld; ac_word=$2
17298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17299$as_echo_n "checking for $ac_word... " >&6; }
17300if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17301  $as_echo_n "(cached) " >&6
17302else
17303  case $BUILD_LD in
17304  [\\/]* | ?:[\\/]*)
17305  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17306  ;;
17307  *)
17308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17309for as_dir in $PATH
17310do
17311  IFS=$as_save_IFS
17312  test -z "$as_dir" && as_dir=.
17313    for ac_exec_ext in '' $ac_executable_extensions; do
17314  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17315    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17317    break 2
17318  fi
17319done
17320  done
17321IFS=$as_save_IFS
17322
17323  ;;
17324esac
17325fi
17326BUILD_LD=$ac_cv_path_BUILD_LD
17327if test -n "$BUILD_LD"; then
17328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17329$as_echo "$BUILD_LD" >&6; }
17330else
17331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17332$as_echo "no" >&6; }
17333fi
17334
17335
17336
17337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17338
17339  # First separate the path from the arguments. This will split at the first
17340  # space.
17341  complete="$BUILD_LD"
17342  path="${complete%% *}"
17343  tmp="$complete EOL"
17344  arguments="${tmp#* }"
17345
17346  # Input might be given as Windows format, start by converting to
17347  # unix format.
17348  new_path=`$CYGPATH -u "$path"`
17349
17350  # Now try to locate executable using which
17351  new_path=`$WHICH "$new_path" 2> /dev/null`
17352  # bat and cmd files are not always considered executable in cygwin causing which
17353  # to not find them
17354  if test "x$new_path" = x \
17355           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17356           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17357    new_path=`$CYGPATH -u "$path"`
17358  fi
17359  if test "x$new_path" = x; then
17360    # Oops. Which didn't find the executable.
17361    # The splitting of arguments from the executable at a space might have been incorrect,
17362    # since paths with space are more likely in Windows. Give it another try with the whole
17363    # argument.
17364    path="$complete"
17365    arguments="EOL"
17366    new_path=`$CYGPATH -u "$path"`
17367    new_path=`$WHICH "$new_path" 2> /dev/null`
17368    # bat and cmd files are not always considered executable in cygwin causing which
17369    # to not find them
17370    if test "x$new_path" = x \
17371             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17372             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17373      new_path=`$CYGPATH -u "$path"`
17374    fi
17375    if test "x$new_path" = x; then
17376      # It's still not found. Now this is an unrecoverable error.
17377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17378$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17379      has_space=`$ECHO "$complete" | $GREP " "`
17380      if test "x$has_space" != x; then
17381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17383      fi
17384      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17385    fi
17386  fi
17387
17388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17391  # "foo.exe" is OK but "foo" is an error.
17392  #
17393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17394  # It is also a way to make sure we got the proper file name for the real test later on.
17395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17396  if test "x$test_shortpath" = x; then
17397    # Short path failed, file does not exist as specified.
17398    # Try adding .exe or .cmd
17399    if test -f "${new_path}.exe"; then
17400       input_to_shortpath="${new_path}.exe"
17401    elif test -f "${new_path}.cmd"; then
17402       input_to_shortpath="${new_path}.cmd"
17403    else
17404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17405$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17408      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17409    fi
17410  else
17411    input_to_shortpath="$new_path"
17412  fi
17413
17414  # Call helper function which possibly converts this using DOS-style short mode.
17415  # If so, the updated path is stored in $new_path.
17416  new_path="$input_to_shortpath"
17417
17418  input_path="$input_to_shortpath"
17419  # Check if we need to convert this using DOS-style short mode. If the path
17420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17421  # take no chances and rewrite it.
17422  # Note: m4 eats our [], so we need to use [ and ] instead.
17423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17424  if test "x$has_forbidden_chars" != x; then
17425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17429      # Going to short mode and back again did indeed matter. Since short mode is
17430      # case insensitive, let's make it lowercase to improve readability.
17431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17432      # Now convert it back to Unix-stile (cygpath)
17433      input_path=`$CYGPATH -u "$shortmode_path"`
17434      new_path="$input_path"
17435    fi
17436  fi
17437
17438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17439  if test "x$test_cygdrive_prefix" = x; then
17440    # As a simple fix, exclude /usr/bin since it's not a real path.
17441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17443      # a path prefixed by /cygdrive for fixpath to work.
17444      new_path="$CYGWIN_ROOT_PATH$input_path"
17445    fi
17446  fi
17447
17448  # remove trailing .exe if any
17449  new_path="${new_path/%.exe/}"
17450
17451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17452
17453  # First separate the path from the arguments. This will split at the first
17454  # space.
17455  complete="$BUILD_LD"
17456  path="${complete%% *}"
17457  tmp="$complete EOL"
17458  arguments="${tmp#* }"
17459
17460  # Input might be given as Windows format, start by converting to
17461  # unix format.
17462  new_path="$path"
17463
17464  windows_path="$new_path"
17465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17466    unix_path=`$CYGPATH -u "$windows_path"`
17467    new_path="$unix_path"
17468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17470    new_path="$unix_path"
17471  fi
17472
17473
17474  # Now try to locate executable using which
17475  new_path=`$WHICH "$new_path" 2> /dev/null`
17476
17477  if test "x$new_path" = x; then
17478    # Oops. Which didn't find the executable.
17479    # The splitting of arguments from the executable at a space might have been incorrect,
17480    # since paths with space are more likely in Windows. Give it another try with the whole
17481    # argument.
17482    path="$complete"
17483    arguments="EOL"
17484    new_path="$path"
17485
17486  windows_path="$new_path"
17487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17488    unix_path=`$CYGPATH -u "$windows_path"`
17489    new_path="$unix_path"
17490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17492    new_path="$unix_path"
17493  fi
17494
17495
17496    new_path=`$WHICH "$new_path" 2> /dev/null`
17497
17498    if test "x$new_path" = x; then
17499      # It's still not found. Now this is an unrecoverable error.
17500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17501$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17502      has_space=`$ECHO "$complete" | $GREP " "`
17503      if test "x$has_space" != x; then
17504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17506      fi
17507      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17508    fi
17509  fi
17510
17511  # Now new_path has a complete unix path to the binary
17512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17513    # Keep paths in /bin as-is, but remove trailing .exe if any
17514    new_path="${new_path/%.exe/}"
17515    # Do not save /bin paths to all_fixpath_prefixes!
17516  else
17517    # Not in mixed or Windows style, start by that.
17518    new_path=`cmd //c echo $new_path`
17519
17520  input_path="$new_path"
17521  # Check if we need to convert this using DOS-style short mode. If the path
17522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17523  # take no chances and rewrite it.
17524  # Note: m4 eats our [], so we need to use [ and ] instead.
17525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17526  if test "x$has_forbidden_chars" != x; then
17527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17529  fi
17530
17531    # Output is in $new_path
17532
17533  windows_path="$new_path"
17534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17535    unix_path=`$CYGPATH -u "$windows_path"`
17536    new_path="$unix_path"
17537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17539    new_path="$unix_path"
17540  fi
17541
17542    # remove trailing .exe if any
17543    new_path="${new_path/%.exe/}"
17544
17545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17547  fi
17548
17549  else
17550    # We're on a posix platform. Hooray! :)
17551    # First separate the path from the arguments. This will split at the first
17552    # space.
17553    complete="$BUILD_LD"
17554    path="${complete%% *}"
17555    tmp="$complete EOL"
17556    arguments="${tmp#* }"
17557
17558    new_path=`$WHICH $path 2> /dev/null`
17559    if test "x$new_path" = x; then
17560      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17561      if test "x$is_absolute_path" != x; then
17562        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17563$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17564        new_path="$path"
17565      else
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17567$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17568        has_space=`$ECHO "$complete" | $GREP " "`
17569        if test "x$has_space" != x; then
17570          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17571$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17572        fi
17573        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17574      fi
17575    fi
17576  fi
17577
17578  # Now join together the path and the arguments once again
17579  if test "x$arguments" != xEOL; then
17580      new_complete="$new_path ${arguments% *}"
17581  else
17582      new_complete="$new_path"
17583  fi
17584
17585  if test "x$complete" != "x$new_complete"; then
17586    BUILD_LD="$new_complete"
17587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17588$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17589  fi
17590
17591fi
17592
17593
17594
17595
17596# If a devkit is found on the builddeps server, then prepend its path to the
17597# PATH variable. If there are cross compilers available in the devkit, these
17598# will be found by AC_PROG_CC et al.
17599DEVKIT=
17600
17601
17602    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17603        # Source the builddeps file again, to make sure it uses the latest variables!
17604        . $builddepsfile
17605        # Look for a target and build machine specific resource!
17606        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17607        if test "x$resource" = x; then
17608            # Ok, lets instead look for a target specific resource
17609            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17610        fi
17611        if test "x$resource" = x; then
17612            # Ok, lets instead look for a build specific resource
17613            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17614        fi
17615        if test "x$resource" = x; then
17616            # Ok, lets instead look for a generic resource
17617            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17618            resource=${builddep_devkit}
17619        fi
17620        if test "x$resource" != x; then
17621            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17622$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17623	    # If the resource in the builddeps.conf file is an existing directory,
17624	    # for example /java/linux/cups
17625	    if test -d ${resource}; then
17626	       depdir=${resource}
17627	    else
17628
17629# devkit is for example mymodule
17630# $resource is for example libs/general/libmymod_1_2_3.zip
17631# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17632# $with_builddeps_dir is for example /localhome/builddeps
17633# depdir is the name of the variable into which we store the depdir, eg MYMOD
17634# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17635# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17636    filename=`basename $resource`
17637    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17638    filebase=${filename%%.*}
17639    extension=${filename#*.}
17640    installdir=$with_builddeps_dir/$filebase
17641    if test ! -f $installdir/$filename.unpacked; then
17642        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17643$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17644        if test ! -d $installdir; then
17645            mkdir -p $installdir
17646        fi
17647        if test ! -d $installdir; then
17648            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17649        fi
17650        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17651        touch $tmpfile
17652        if test ! -f $tmpfile; then
17653            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17654        fi
17655
17656    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17657    # $tmpfile is the local file name for the downloaded file.
17658    VALID_TOOL=no
17659    if test "x$BDEPS_FTP" = xwget; then
17660       VALID_TOOL=yes
17661       wget -O $tmpfile $with_builddeps_server/$resource
17662    fi
17663    if test "x$BDEPS_FTP" = xlftp; then
17664       VALID_TOOL=yes
17665       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17666    fi
17667    if test "x$BDEPS_FTP" = xftp; then
17668        VALID_TOOL=yes
17669        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17670        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17671        FTPUSERPWD=${FTPSERVER%%@*}
17672        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17673            FTPUSER=${userpwd%%:*}
17674            FTPPWD=${userpwd#*@}
17675            FTPSERVER=${FTPSERVER#*@}
17676        else
17677            FTPUSER=ftp
17678            FTPPWD=ftp
17679        fi
17680        # the "pass" command does not work on some
17681        # ftp clients (read ftp.exe) but if it works,
17682        # passive mode is better!
17683        (\
17684            echo "user $FTPUSER $FTPPWD"        ;\
17685            echo "pass"                         ;\
17686            echo "bin"                          ;\
17687            echo "get $FTPPATH $tmpfile"              ;\
17688        ) | ftp -in $FTPSERVER
17689    fi
17690    if test "x$VALID_TOOL" != xyes; then
17691       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17692    fi
17693
17694        mv $tmpfile $installdir/$filename
17695        if test ! -s $installdir/$filename; then
17696            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17697        fi
17698        case "$extension" in
17699            zip)  echo "Unzipping $installdir/$filename..."
17700               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17701            ;;
17702            tar.gz) echo "Untaring $installdir/$filename..."
17703               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17704            ;;
17705            tgz) echo "Untaring $installdir/$filename..."
17706               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17707            ;;
17708            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17709            ;;
17710        esac
17711    fi
17712    if test -f $installdir/$filename.unpacked; then
17713        depdir=$installdir
17714    fi
17715
17716	    fi
17717            # Source the builddeps file again, because in the previous command, the depdir
17718            # was updated to point at the current build dependency install directory.
17719            . $builddepsfile
17720            # Now extract variables from the builddeps.conf files.
17721            theroot=${builddep_devkit_ROOT}
17722            thecflags=${builddep_devkit_CFLAGS}
17723            thelibs=${builddep_devkit_LIBS}
17724            if test "x$depdir" = x; then
17725                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17726            fi
17727            DEVKIT=$depdir
17728            if test "x$theroot" != x; then
17729               DEVKIT="$theroot"
17730            fi
17731            if test "x$thecflags" != x; then
17732               DEVKIT_CFLAGS="$thecflags"
17733            fi
17734            if test "x$thelibs" != x; then
17735               DEVKIT_LIBS="$thelibs"
17736            fi
17737            # Found devkit
17738                     PATH="$DEVKIT/bin:$PATH"
17739                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17740                     if test "x$x_includes" = "xNONE"; then
17741                         x_includes="$SYS_ROOT/usr/include/X11"
17742                     fi
17743                     if test "x$x_libraries" = "xNONE"; then
17744                         x_libraries="$SYS_ROOT/usr/lib"
17745                     fi
17746
17747
17748        fi
17749
17750    fi
17751
17752
17753if test "x$SYS_ROOT" != "x/" ; then
17754    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17755    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17756    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17757    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17758    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17759    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17760fi
17761
17762# Store the CFLAGS etal passed to the configure script.
17763ORG_CFLAGS="$CFLAGS"
17764ORG_CXXFLAGS="$CXXFLAGS"
17765ORG_OBJCFLAGS="$OBJCFLAGS"
17766
17767# autoconf magic only relies on PATH, so update it if tools dir is specified
17768OLD_PATH="$PATH"
17769if test "x$TOOLS_DIR" != x; then
17770  PATH=$TOOLS_DIR:$PATH
17771fi
17772
17773
17774### Locate C compiler (CC)
17775
17776# gcc is almost always present, but on Windows we
17777# prefer cl.exe and on Solaris we prefer CC.
17778# Thus test for them in this order.
17779if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17780  # Do not probe for cc on MacOSX.
17781  COMPILER_CHECK_LIST="cl gcc"
17782else
17783  COMPILER_CHECK_LIST="cl cc gcc"
17784fi
17785
17786
17787  COMPILER_NAME=C
17788
17789  # Do a first initial attempt at searching the list of compiler names.
17790  # AC_PATH_PROGS can't be run multiple times with the same variable,
17791  # so create a new name for this run.
17792  for ac_prog in $COMPILER_CHECK_LIST
17793do
17794  # Extract the first word of "$ac_prog", so it can be a program name with args.
17795set dummy $ac_prog; ac_word=$2
17796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17797$as_echo_n "checking for $ac_word... " >&6; }
17798if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17799  $as_echo_n "(cached) " >&6
17800else
17801  case $POTENTIAL_CC in
17802  [\\/]* | ?:[\\/]*)
17803  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17804  ;;
17805  *)
17806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17807for as_dir in $PATH
17808do
17809  IFS=$as_save_IFS
17810  test -z "$as_dir" && as_dir=.
17811    for ac_exec_ext in '' $ac_executable_extensions; do
17812  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17813    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17815    break 2
17816  fi
17817done
17818  done
17819IFS=$as_save_IFS
17820
17821  ;;
17822esac
17823fi
17824POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17825if test -n "$POTENTIAL_CC"; then
17826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17827$as_echo "$POTENTIAL_CC" >&6; }
17828else
17829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17830$as_echo "no" >&6; }
17831fi
17832
17833
17834  test -n "$POTENTIAL_CC" && break
17835done
17836
17837  CC=$POTENTIAL_CC
17838
17839  if test "x$$CC" = x; then
17840
17841    # Print a helpful message on how to acquire the necessary build dependency.
17842    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17843    MISSING_DEPENDENCY=devkit
17844    PKGHANDLER_COMMAND=
17845
17846    case $PKGHANDLER in
17847	apt-get)
17848                apt_help     $MISSING_DEPENDENCY ;;
17849    yum)
17850                yum_help     $MISSING_DEPENDENCY ;;
17851	port)
17852                port_help    $MISSING_DEPENDENCY ;;
17853	pkgutil)
17854                pkgutil_help $MISSING_DEPENDENCY ;;
17855	pkgadd)
17856                pkgadd_help  $MISSING_DEPENDENCY ;;
17857    * )
17858      break ;;
17859    esac
17860
17861    if test "x$PKGHANDLER_COMMAND" != x; then
17862        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17863    fi
17864
17865      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17866  fi
17867
17868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17869
17870  # First separate the path from the arguments. This will split at the first
17871  # space.
17872  complete="$CC"
17873  path="${complete%% *}"
17874  tmp="$complete EOL"
17875  arguments="${tmp#* }"
17876
17877  # Input might be given as Windows format, start by converting to
17878  # unix format.
17879  new_path=`$CYGPATH -u "$path"`
17880
17881  # Now try to locate executable using which
17882  new_path=`$WHICH "$new_path" 2> /dev/null`
17883  # bat and cmd files are not always considered executable in cygwin causing which
17884  # to not find them
17885  if test "x$new_path" = x \
17886           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17887           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17888    new_path=`$CYGPATH -u "$path"`
17889  fi
17890  if test "x$new_path" = x; then
17891    # Oops. Which didn't find the executable.
17892    # The splitting of arguments from the executable at a space might have been incorrect,
17893    # since paths with space are more likely in Windows. Give it another try with the whole
17894    # argument.
17895    path="$complete"
17896    arguments="EOL"
17897    new_path=`$CYGPATH -u "$path"`
17898    new_path=`$WHICH "$new_path" 2> /dev/null`
17899    # bat and cmd files are not always considered executable in cygwin causing which
17900    # to not find them
17901    if test "x$new_path" = x \
17902             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17903             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17904      new_path=`$CYGPATH -u "$path"`
17905    fi
17906    if test "x$new_path" = x; then
17907      # It's still not found. Now this is an unrecoverable error.
17908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17909$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17910      has_space=`$ECHO "$complete" | $GREP " "`
17911      if test "x$has_space" != x; then
17912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17914      fi
17915      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17916    fi
17917  fi
17918
17919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17922  # "foo.exe" is OK but "foo" is an error.
17923  #
17924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17925  # It is also a way to make sure we got the proper file name for the real test later on.
17926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17927  if test "x$test_shortpath" = x; then
17928    # Short path failed, file does not exist as specified.
17929    # Try adding .exe or .cmd
17930    if test -f "${new_path}.exe"; then
17931       input_to_shortpath="${new_path}.exe"
17932    elif test -f "${new_path}.cmd"; then
17933       input_to_shortpath="${new_path}.cmd"
17934    else
17935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17936$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17937      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17938$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17939      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17940    fi
17941  else
17942    input_to_shortpath="$new_path"
17943  fi
17944
17945  # Call helper function which possibly converts this using DOS-style short mode.
17946  # If so, the updated path is stored in $new_path.
17947  new_path="$input_to_shortpath"
17948
17949  input_path="$input_to_shortpath"
17950  # Check if we need to convert this using DOS-style short mode. If the path
17951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17952  # take no chances and rewrite it.
17953  # Note: m4 eats our [], so we need to use [ and ] instead.
17954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17955  if test "x$has_forbidden_chars" != x; then
17956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17960      # Going to short mode and back again did indeed matter. Since short mode is
17961      # case insensitive, let's make it lowercase to improve readability.
17962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17963      # Now convert it back to Unix-stile (cygpath)
17964      input_path=`$CYGPATH -u "$shortmode_path"`
17965      new_path="$input_path"
17966    fi
17967  fi
17968
17969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17970  if test "x$test_cygdrive_prefix" = x; then
17971    # As a simple fix, exclude /usr/bin since it's not a real path.
17972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17974      # a path prefixed by /cygdrive for fixpath to work.
17975      new_path="$CYGWIN_ROOT_PATH$input_path"
17976    fi
17977  fi
17978
17979  # remove trailing .exe if any
17980  new_path="${new_path/%.exe/}"
17981
17982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17983
17984  # First separate the path from the arguments. This will split at the first
17985  # space.
17986  complete="$CC"
17987  path="${complete%% *}"
17988  tmp="$complete EOL"
17989  arguments="${tmp#* }"
17990
17991  # Input might be given as Windows format, start by converting to
17992  # unix format.
17993  new_path="$path"
17994
17995  windows_path="$new_path"
17996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17997    unix_path=`$CYGPATH -u "$windows_path"`
17998    new_path="$unix_path"
17999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18001    new_path="$unix_path"
18002  fi
18003
18004
18005  # Now try to locate executable using which
18006  new_path=`$WHICH "$new_path" 2> /dev/null`
18007
18008  if test "x$new_path" = x; then
18009    # Oops. Which didn't find the executable.
18010    # The splitting of arguments from the executable at a space might have been incorrect,
18011    # since paths with space are more likely in Windows. Give it another try with the whole
18012    # argument.
18013    path="$complete"
18014    arguments="EOL"
18015    new_path="$path"
18016
18017  windows_path="$new_path"
18018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18019    unix_path=`$CYGPATH -u "$windows_path"`
18020    new_path="$unix_path"
18021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18023    new_path="$unix_path"
18024  fi
18025
18026
18027    new_path=`$WHICH "$new_path" 2> /dev/null`
18028
18029    if test "x$new_path" = x; then
18030      # It's still not found. Now this is an unrecoverable error.
18031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18032$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18033      has_space=`$ECHO "$complete" | $GREP " "`
18034      if test "x$has_space" != x; then
18035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18037      fi
18038      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18039    fi
18040  fi
18041
18042  # Now new_path has a complete unix path to the binary
18043  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18044    # Keep paths in /bin as-is, but remove trailing .exe if any
18045    new_path="${new_path/%.exe/}"
18046    # Do not save /bin paths to all_fixpath_prefixes!
18047  else
18048    # Not in mixed or Windows style, start by that.
18049    new_path=`cmd //c echo $new_path`
18050
18051  input_path="$new_path"
18052  # Check if we need to convert this using DOS-style short mode. If the path
18053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18054  # take no chances and rewrite it.
18055  # Note: m4 eats our [], so we need to use [ and ] instead.
18056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18057  if test "x$has_forbidden_chars" != x; then
18058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18060  fi
18061
18062    # Output is in $new_path
18063
18064  windows_path="$new_path"
18065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18066    unix_path=`$CYGPATH -u "$windows_path"`
18067    new_path="$unix_path"
18068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18070    new_path="$unix_path"
18071  fi
18072
18073    # remove trailing .exe if any
18074    new_path="${new_path/%.exe/}"
18075
18076    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18077    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18078  fi
18079
18080  else
18081    # We're on a posix platform. Hooray! :)
18082    # First separate the path from the arguments. This will split at the first
18083    # space.
18084    complete="$CC"
18085    path="${complete%% *}"
18086    tmp="$complete EOL"
18087    arguments="${tmp#* }"
18088
18089    new_path=`$WHICH $path 2> /dev/null`
18090    if test "x$new_path" = x; then
18091      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18092      if test "x$is_absolute_path" != x; then
18093        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
18094$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
18095        new_path="$path"
18096      else
18097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18098$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18099        has_space=`$ECHO "$complete" | $GREP " "`
18100        if test "x$has_space" != x; then
18101          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18102$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18103        fi
18104        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18105      fi
18106    fi
18107  fi
18108
18109  # Now join together the path and the arguments once again
18110  if test "x$arguments" != xEOL; then
18111      new_complete="$new_path ${arguments% *}"
18112  else
18113      new_complete="$new_path"
18114  fi
18115
18116  if test "x$complete" != "x$new_complete"; then
18117    CC="$new_complete"
18118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18119$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18120  fi
18121
18122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18123$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18124  TEST_COMPILER="$CC"
18125
18126    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18127        # Follow a chain of symbolic links. Use readlink
18128        # where it exists, else fall back to horribly
18129        # complicated shell code.
18130        if test "x$READLINK_TESTED" != yes; then
18131            # On MacOSX there is a readlink tool with a different
18132            # purpose than the GNU readlink tool. Check the found readlink.
18133            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18134            if test "x$ISGNU" = x; then
18135                 # A readlink that we do not know how to use.
18136                 # Are there other non-GNU readlinks out there?
18137                 READLINK_TESTED=yes
18138                 READLINK=
18139            fi
18140        fi
18141
18142        if test "x$READLINK" != x; then
18143            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18144        else
18145            # Save the current directory for restoring afterwards
18146            STARTDIR=$PWD
18147            COUNTER=0
18148            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18149            sym_link_file=`$BASENAME $TEST_COMPILER`
18150            # Use the system pwd and not the shell builtin to resolve directory symlinks
18151            cd $sym_link_dir
18152            cd `$THEPWDCMD`
18153            sym_link_dir=`$THEPWDCMD`
18154            # Resolve file symlinks
18155            while test $COUNTER -lt 20; do
18156                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18157                if test "x$ISLINK" == x; then
18158                    # This is not a symbolic link! We are done!
18159                    break
18160                fi
18161                # Again resolve directory symlinks since the target of the just found
18162                # link could be in a different directory
18163                cd `$DIRNAME $ISLINK`
18164                sym_link_dir=`$THEPWDCMD`
18165                sym_link_file=`$BASENAME $ISLINK`
18166                let COUNTER=COUNTER+1
18167            done
18168            cd $STARTDIR
18169            TEST_COMPILER=$sym_link_dir/$sym_link_file
18170        fi
18171    fi
18172
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18174$as_echo "$TEST_COMPILER" >&6; }
18175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18176$as_echo_n "checking if CC is disguised ccache... " >&6; }
18177
18178  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18179  if test "x$COMPILER_BASENAME" = "xccache"; then
18180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18181$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18182    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18183    # We want to control ccache invocation ourselves, so ignore this cc and try
18184    # searching again.
18185
18186    # Remove the path to the fake ccache cc from the PATH
18187    RETRY_COMPILER_SAVED_PATH="$PATH"
18188    COMPILER_DIRNAME=`$DIRNAME $CC`
18189    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18190
18191    # Try again looking for our compiler
18192    if test -n "$ac_tool_prefix"; then
18193  for ac_prog in $COMPILER_CHECK_LIST
18194  do
18195    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18198$as_echo_n "checking for $ac_word... " >&6; }
18199if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18200  $as_echo_n "(cached) " >&6
18201else
18202  if test -n "$PROPER_COMPILER_CC"; then
18203  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18204else
18205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18206for as_dir in $PATH
18207do
18208  IFS=$as_save_IFS
18209  test -z "$as_dir" && as_dir=.
18210    for ac_exec_ext in '' $ac_executable_extensions; do
18211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18212    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18214    break 2
18215  fi
18216done
18217  done
18218IFS=$as_save_IFS
18219
18220fi
18221fi
18222PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18223if test -n "$PROPER_COMPILER_CC"; then
18224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18225$as_echo "$PROPER_COMPILER_CC" >&6; }
18226else
18227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18228$as_echo "no" >&6; }
18229fi
18230
18231
18232    test -n "$PROPER_COMPILER_CC" && break
18233  done
18234fi
18235if test -z "$PROPER_COMPILER_CC"; then
18236  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18237  for ac_prog in $COMPILER_CHECK_LIST
18238do
18239  # Extract the first word of "$ac_prog", so it can be a program name with args.
18240set dummy $ac_prog; ac_word=$2
18241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18242$as_echo_n "checking for $ac_word... " >&6; }
18243if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18244  $as_echo_n "(cached) " >&6
18245else
18246  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18247  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18248else
18249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18250for as_dir in $PATH
18251do
18252  IFS=$as_save_IFS
18253  test -z "$as_dir" && as_dir=.
18254    for ac_exec_ext in '' $ac_executable_extensions; do
18255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18256    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18258    break 2
18259  fi
18260done
18261  done
18262IFS=$as_save_IFS
18263
18264fi
18265fi
18266ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18267if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18269$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18270else
18271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18272$as_echo "no" >&6; }
18273fi
18274
18275
18276  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18277done
18278
18279  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18280    PROPER_COMPILER_CC=""
18281  else
18282    case $cross_compiling:$ac_tool_warned in
18283yes:)
18284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18286ac_tool_warned=yes ;;
18287esac
18288    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18289  fi
18290fi
18291
18292
18293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18294
18295  # First separate the path from the arguments. This will split at the first
18296  # space.
18297  complete="$PROPER_COMPILER_CC"
18298  path="${complete%% *}"
18299  tmp="$complete EOL"
18300  arguments="${tmp#* }"
18301
18302  # Input might be given as Windows format, start by converting to
18303  # unix format.
18304  new_path=`$CYGPATH -u "$path"`
18305
18306  # Now try to locate executable using which
18307  new_path=`$WHICH "$new_path" 2> /dev/null`
18308  # bat and cmd files are not always considered executable in cygwin causing which
18309  # to not find them
18310  if test "x$new_path" = x \
18311           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18312           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18313    new_path=`$CYGPATH -u "$path"`
18314  fi
18315  if test "x$new_path" = x; then
18316    # Oops. Which didn't find the executable.
18317    # The splitting of arguments from the executable at a space might have been incorrect,
18318    # since paths with space are more likely in Windows. Give it another try with the whole
18319    # argument.
18320    path="$complete"
18321    arguments="EOL"
18322    new_path=`$CYGPATH -u "$path"`
18323    new_path=`$WHICH "$new_path" 2> /dev/null`
18324    # bat and cmd files are not always considered executable in cygwin causing which
18325    # to not find them
18326    if test "x$new_path" = x \
18327             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18328             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18329      new_path=`$CYGPATH -u "$path"`
18330    fi
18331    if test "x$new_path" = x; then
18332      # It's still not found. Now this is an unrecoverable error.
18333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18334$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18335      has_space=`$ECHO "$complete" | $GREP " "`
18336      if test "x$has_space" != x; then
18337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18339      fi
18340      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18341    fi
18342  fi
18343
18344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18347  # "foo.exe" is OK but "foo" is an error.
18348  #
18349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18350  # It is also a way to make sure we got the proper file name for the real test later on.
18351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18352  if test "x$test_shortpath" = x; then
18353    # Short path failed, file does not exist as specified.
18354    # Try adding .exe or .cmd
18355    if test -f "${new_path}.exe"; then
18356       input_to_shortpath="${new_path}.exe"
18357    elif test -f "${new_path}.cmd"; then
18358       input_to_shortpath="${new_path}.cmd"
18359    else
18360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18361$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18364      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18365    fi
18366  else
18367    input_to_shortpath="$new_path"
18368  fi
18369
18370  # Call helper function which possibly converts this using DOS-style short mode.
18371  # If so, the updated path is stored in $new_path.
18372  new_path="$input_to_shortpath"
18373
18374  input_path="$input_to_shortpath"
18375  # Check if we need to convert this using DOS-style short mode. If the path
18376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18377  # take no chances and rewrite it.
18378  # Note: m4 eats our [], so we need to use [ and ] instead.
18379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18380  if test "x$has_forbidden_chars" != x; then
18381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18385      # Going to short mode and back again did indeed matter. Since short mode is
18386      # case insensitive, let's make it lowercase to improve readability.
18387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18388      # Now convert it back to Unix-stile (cygpath)
18389      input_path=`$CYGPATH -u "$shortmode_path"`
18390      new_path="$input_path"
18391    fi
18392  fi
18393
18394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18395  if test "x$test_cygdrive_prefix" = x; then
18396    # As a simple fix, exclude /usr/bin since it's not a real path.
18397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18399      # a path prefixed by /cygdrive for fixpath to work.
18400      new_path="$CYGWIN_ROOT_PATH$input_path"
18401    fi
18402  fi
18403
18404  # remove trailing .exe if any
18405  new_path="${new_path/%.exe/}"
18406
18407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18408
18409  # First separate the path from the arguments. This will split at the first
18410  # space.
18411  complete="$PROPER_COMPILER_CC"
18412  path="${complete%% *}"
18413  tmp="$complete EOL"
18414  arguments="${tmp#* }"
18415
18416  # Input might be given as Windows format, start by converting to
18417  # unix format.
18418  new_path="$path"
18419
18420  windows_path="$new_path"
18421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18422    unix_path=`$CYGPATH -u "$windows_path"`
18423    new_path="$unix_path"
18424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18426    new_path="$unix_path"
18427  fi
18428
18429
18430  # Now try to locate executable using which
18431  new_path=`$WHICH "$new_path" 2> /dev/null`
18432
18433  if test "x$new_path" = x; then
18434    # Oops. Which didn't find the executable.
18435    # The splitting of arguments from the executable at a space might have been incorrect,
18436    # since paths with space are more likely in Windows. Give it another try with the whole
18437    # argument.
18438    path="$complete"
18439    arguments="EOL"
18440    new_path="$path"
18441
18442  windows_path="$new_path"
18443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18444    unix_path=`$CYGPATH -u "$windows_path"`
18445    new_path="$unix_path"
18446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18448    new_path="$unix_path"
18449  fi
18450
18451
18452    new_path=`$WHICH "$new_path" 2> /dev/null`
18453
18454    if test "x$new_path" = x; then
18455      # It's still not found. Now this is an unrecoverable error.
18456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18457$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18458      has_space=`$ECHO "$complete" | $GREP " "`
18459      if test "x$has_space" != x; then
18460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18462      fi
18463      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18464    fi
18465  fi
18466
18467  # Now new_path has a complete unix path to the binary
18468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18469    # Keep paths in /bin as-is, but remove trailing .exe if any
18470    new_path="${new_path/%.exe/}"
18471    # Do not save /bin paths to all_fixpath_prefixes!
18472  else
18473    # Not in mixed or Windows style, start by that.
18474    new_path=`cmd //c echo $new_path`
18475
18476  input_path="$new_path"
18477  # Check if we need to convert this using DOS-style short mode. If the path
18478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18479  # take no chances and rewrite it.
18480  # Note: m4 eats our [], so we need to use [ and ] instead.
18481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18482  if test "x$has_forbidden_chars" != x; then
18483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18485  fi
18486
18487    # Output is in $new_path
18488
18489  windows_path="$new_path"
18490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18491    unix_path=`$CYGPATH -u "$windows_path"`
18492    new_path="$unix_path"
18493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18495    new_path="$unix_path"
18496  fi
18497
18498    # remove trailing .exe if any
18499    new_path="${new_path/%.exe/}"
18500
18501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18503  fi
18504
18505  else
18506    # We're on a posix platform. Hooray! :)
18507    # First separate the path from the arguments. This will split at the first
18508    # space.
18509    complete="$PROPER_COMPILER_CC"
18510    path="${complete%% *}"
18511    tmp="$complete EOL"
18512    arguments="${tmp#* }"
18513
18514    new_path=`$WHICH $path 2> /dev/null`
18515    if test "x$new_path" = x; then
18516      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18517      if test "x$is_absolute_path" != x; then
18518        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18519$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18520        new_path="$path"
18521      else
18522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18523$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18524        has_space=`$ECHO "$complete" | $GREP " "`
18525        if test "x$has_space" != x; then
18526          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18528        fi
18529        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18530      fi
18531    fi
18532  fi
18533
18534  # Now join together the path and the arguments once again
18535  if test "x$arguments" != xEOL; then
18536      new_complete="$new_path ${arguments% *}"
18537  else
18538      new_complete="$new_path"
18539  fi
18540
18541  if test "x$complete" != "x$new_complete"; then
18542    PROPER_COMPILER_CC="$new_complete"
18543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18544$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18545  fi
18546
18547    PATH="$RETRY_COMPILER_SAVED_PATH"
18548
18549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18550$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18551
18552    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18553        # Follow a chain of symbolic links. Use readlink
18554        # where it exists, else fall back to horribly
18555        # complicated shell code.
18556        if test "x$READLINK_TESTED" != yes; then
18557            # On MacOSX there is a readlink tool with a different
18558            # purpose than the GNU readlink tool. Check the found readlink.
18559            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18560            if test "x$ISGNU" = x; then
18561                 # A readlink that we do not know how to use.
18562                 # Are there other non-GNU readlinks out there?
18563                 READLINK_TESTED=yes
18564                 READLINK=
18565            fi
18566        fi
18567
18568        if test "x$READLINK" != x; then
18569            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18570        else
18571            # Save the current directory for restoring afterwards
18572            STARTDIR=$PWD
18573            COUNTER=0
18574            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18575            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18576            # Use the system pwd and not the shell builtin to resolve directory symlinks
18577            cd $sym_link_dir
18578            cd `$THEPWDCMD`
18579            sym_link_dir=`$THEPWDCMD`
18580            # Resolve file symlinks
18581            while test $COUNTER -lt 20; do
18582                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18583                if test "x$ISLINK" == x; then
18584                    # This is not a symbolic link! We are done!
18585                    break
18586                fi
18587                # Again resolve directory symlinks since the target of the just found
18588                # link could be in a different directory
18589                cd `$DIRNAME $ISLINK`
18590                sym_link_dir=`$THEPWDCMD`
18591                sym_link_file=`$BASENAME $ISLINK`
18592                let COUNTER=COUNTER+1
18593            done
18594            cd $STARTDIR
18595            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18596        fi
18597    fi
18598
18599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18600$as_echo "$PROPER_COMPILER_CC" >&6; }
18601    CC="$PROPER_COMPILER_CC"
18602  else
18603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18604$as_echo "no, keeping CC" >&6; }
18605    CC="$TEST_COMPILER"
18606  fi
18607
18608  COMPILER=$CC
18609  COMPILER_NAME=$COMPILER_NAME
18610
18611  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18612    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18613    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18614    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18615    if test $? -ne 0; then
18616      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18617
18618      { $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
18619$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18620      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18621$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18622      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18623    else
18624      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18625      COMPILER_VENDOR="Sun Studio"
18626    fi
18627  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18628    # First line typically looks something like:
18629    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18630    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18631    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18632    COMPILER_VENDOR="Microsoft CL.EXE"
18633    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18634    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18635      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18636        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18637      fi
18638    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18639      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18640        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18641      fi
18642    fi
18643  else
18644    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18645    # Check that this is likely to be GCC.
18646    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18647    if test $? -ne 0; then
18648      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18649$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18650      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18651$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18652      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18653    fi
18654
18655    # First line typically looks something like:
18656    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18657    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18658    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18659  fi
18660  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18661  CC_VERSION="$COMPILER_VERSION"
18662  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18663  CC_VENDOR="$COMPILER_VENDOR"
18664
18665  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18666$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18667
18668
18669# Now that we have resolved CC ourself, let autoconf have it's go at it
18670ac_ext=c
18671ac_cpp='$CPP $CPPFLAGS'
18672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18674ac_compiler_gnu=$ac_cv_c_compiler_gnu
18675if test -n "$ac_tool_prefix"; then
18676  for ac_prog in $CC
18677  do
18678    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18679set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18681$as_echo_n "checking for $ac_word... " >&6; }
18682if test "${ac_cv_prog_CC+set}" = set; then :
18683  $as_echo_n "(cached) " >&6
18684else
18685  if test -n "$CC"; then
18686  ac_cv_prog_CC="$CC" # Let the user override the test.
18687else
18688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18689for as_dir in $PATH
18690do
18691  IFS=$as_save_IFS
18692  test -z "$as_dir" && as_dir=.
18693    for ac_exec_ext in '' $ac_executable_extensions; do
18694  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18695    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18697    break 2
18698  fi
18699done
18700  done
18701IFS=$as_save_IFS
18702
18703fi
18704fi
18705CC=$ac_cv_prog_CC
18706if test -n "$CC"; then
18707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18708$as_echo "$CC" >&6; }
18709else
18710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18711$as_echo "no" >&6; }
18712fi
18713
18714
18715    test -n "$CC" && break
18716  done
18717fi
18718if test -z "$CC"; then
18719  ac_ct_CC=$CC
18720  for ac_prog in $CC
18721do
18722  # Extract the first word of "$ac_prog", so it can be a program name with args.
18723set dummy $ac_prog; ac_word=$2
18724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18725$as_echo_n "checking for $ac_word... " >&6; }
18726if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18727  $as_echo_n "(cached) " >&6
18728else
18729  if test -n "$ac_ct_CC"; then
18730  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18731else
18732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18733for as_dir in $PATH
18734do
18735  IFS=$as_save_IFS
18736  test -z "$as_dir" && as_dir=.
18737    for ac_exec_ext in '' $ac_executable_extensions; do
18738  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18739    ac_cv_prog_ac_ct_CC="$ac_prog"
18740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18741    break 2
18742  fi
18743done
18744  done
18745IFS=$as_save_IFS
18746
18747fi
18748fi
18749ac_ct_CC=$ac_cv_prog_ac_ct_CC
18750if test -n "$ac_ct_CC"; then
18751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18752$as_echo "$ac_ct_CC" >&6; }
18753else
18754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18755$as_echo "no" >&6; }
18756fi
18757
18758
18759  test -n "$ac_ct_CC" && break
18760done
18761
18762  if test "x$ac_ct_CC" = x; then
18763    CC=""
18764  else
18765    case $cross_compiling:$ac_tool_warned in
18766yes:)
18767{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18768$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18769ac_tool_warned=yes ;;
18770esac
18771    CC=$ac_ct_CC
18772  fi
18773fi
18774
18775
18776test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18778as_fn_error $? "no acceptable C compiler found in \$PATH
18779See \`config.log' for more details" "$LINENO" 5 ; }
18780
18781# Provide some information about the compiler.
18782$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18783set X $ac_compile
18784ac_compiler=$2
18785for ac_option in --version -v -V -qversion; do
18786  { { ac_try="$ac_compiler $ac_option >&5"
18787case "(($ac_try" in
18788  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18789  *) ac_try_echo=$ac_try;;
18790esac
18791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18792$as_echo "$ac_try_echo"; } >&5
18793  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18794  ac_status=$?
18795  if test -s conftest.err; then
18796    sed '10a\
18797... rest of stderr output deleted ...
18798         10q' conftest.err >conftest.er1
18799    cat conftest.er1 >&5
18800  fi
18801  rm -f conftest.er1 conftest.err
18802  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18803  test $ac_status = 0; }
18804done
18805
18806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18807/* end confdefs.h.  */
18808
18809int
18810main ()
18811{
18812
18813  ;
18814  return 0;
18815}
18816_ACEOF
18817ac_clean_files_save=$ac_clean_files
18818ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18819# Try to create an executable without -o first, disregard a.out.
18820# It will help us diagnose broken compilers, and finding out an intuition
18821# of exeext.
18822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18823$as_echo_n "checking whether the C compiler works... " >&6; }
18824ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18825
18826# The possible output files:
18827ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18828
18829ac_rmfiles=
18830for ac_file in $ac_files
18831do
18832  case $ac_file in
18833    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18834    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18835  esac
18836done
18837rm -f $ac_rmfiles
18838
18839if { { ac_try="$ac_link_default"
18840case "(($ac_try" in
18841  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18842  *) ac_try_echo=$ac_try;;
18843esac
18844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18845$as_echo "$ac_try_echo"; } >&5
18846  (eval "$ac_link_default") 2>&5
18847  ac_status=$?
18848  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18849  test $ac_status = 0; }; then :
18850  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18851# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18852# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18853# so that the user can short-circuit this test for compilers unknown to
18854# Autoconf.
18855for ac_file in $ac_files ''
18856do
18857  test -f "$ac_file" || continue
18858  case $ac_file in
18859    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18860	;;
18861    [ab].out )
18862	# We found the default executable, but exeext='' is most
18863	# certainly right.
18864	break;;
18865    *.* )
18866	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18867	then :; else
18868	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18869	fi
18870	# We set ac_cv_exeext here because the later test for it is not
18871	# safe: cross compilers may not add the suffix if given an `-o'
18872	# argument, so we may need to know it at that point already.
18873	# Even if this section looks crufty: it has the advantage of
18874	# actually working.
18875	break;;
18876    * )
18877	break;;
18878  esac
18879done
18880test "$ac_cv_exeext" = no && ac_cv_exeext=
18881
18882else
18883  ac_file=''
18884fi
18885if test -z "$ac_file"; then :
18886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18887$as_echo "no" >&6; }
18888$as_echo "$as_me: failed program was:" >&5
18889sed 's/^/| /' conftest.$ac_ext >&5
18890
18891{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18893as_fn_error 77 "C compiler cannot create executables
18894See \`config.log' for more details" "$LINENO" 5 ; }
18895else
18896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18897$as_echo "yes" >&6; }
18898fi
18899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18900$as_echo_n "checking for C compiler default output file name... " >&6; }
18901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18902$as_echo "$ac_file" >&6; }
18903ac_exeext=$ac_cv_exeext
18904
18905rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18906ac_clean_files=$ac_clean_files_save
18907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18908$as_echo_n "checking for suffix of executables... " >&6; }
18909if { { ac_try="$ac_link"
18910case "(($ac_try" in
18911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18912  *) ac_try_echo=$ac_try;;
18913esac
18914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18915$as_echo "$ac_try_echo"; } >&5
18916  (eval "$ac_link") 2>&5
18917  ac_status=$?
18918  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18919  test $ac_status = 0; }; then :
18920  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18921# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18922# work properly (i.e., refer to `conftest.exe'), while it won't with
18923# `rm'.
18924for ac_file in conftest.exe conftest conftest.*; do
18925  test -f "$ac_file" || continue
18926  case $ac_file in
18927    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18928    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18929	  break;;
18930    * ) break;;
18931  esac
18932done
18933else
18934  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18936as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18937See \`config.log' for more details" "$LINENO" 5 ; }
18938fi
18939rm -f conftest conftest$ac_cv_exeext
18940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18941$as_echo "$ac_cv_exeext" >&6; }
18942
18943rm -f conftest.$ac_ext
18944EXEEXT=$ac_cv_exeext
18945ac_exeext=$EXEEXT
18946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18947/* end confdefs.h.  */
18948#include <stdio.h>
18949int
18950main ()
18951{
18952FILE *f = fopen ("conftest.out", "w");
18953 return ferror (f) || fclose (f) != 0;
18954
18955  ;
18956  return 0;
18957}
18958_ACEOF
18959ac_clean_files="$ac_clean_files conftest.out"
18960# Check that the compiler produces executables we can run.  If not, either
18961# the compiler is broken, or we cross compile.
18962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
18963$as_echo_n "checking whether we are cross compiling... " >&6; }
18964if test "$cross_compiling" != yes; then
18965  { { ac_try="$ac_link"
18966case "(($ac_try" in
18967  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18968  *) ac_try_echo=$ac_try;;
18969esac
18970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18971$as_echo "$ac_try_echo"; } >&5
18972  (eval "$ac_link") 2>&5
18973  ac_status=$?
18974  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18975  test $ac_status = 0; }
18976  if { ac_try='./conftest$ac_cv_exeext'
18977  { { case "(($ac_try" in
18978  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18979  *) ac_try_echo=$ac_try;;
18980esac
18981eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18982$as_echo "$ac_try_echo"; } >&5
18983  (eval "$ac_try") 2>&5
18984  ac_status=$?
18985  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18986  test $ac_status = 0; }; }; then
18987    cross_compiling=no
18988  else
18989    if test "$cross_compiling" = maybe; then
18990	cross_compiling=yes
18991    else
18992	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18994as_fn_error $? "cannot run C compiled programs.
18995If you meant to cross compile, use \`--host'.
18996See \`config.log' for more details" "$LINENO" 5 ; }
18997    fi
18998  fi
18999fi
19000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19001$as_echo "$cross_compiling" >&6; }
19002
19003rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19004ac_clean_files=$ac_clean_files_save
19005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19006$as_echo_n "checking for suffix of object files... " >&6; }
19007if test "${ac_cv_objext+set}" = set; then :
19008  $as_echo_n "(cached) " >&6
19009else
19010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19011/* end confdefs.h.  */
19012
19013int
19014main ()
19015{
19016
19017  ;
19018  return 0;
19019}
19020_ACEOF
19021rm -f conftest.o conftest.obj
19022if { { ac_try="$ac_compile"
19023case "(($ac_try" in
19024  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19025  *) ac_try_echo=$ac_try;;
19026esac
19027eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19028$as_echo "$ac_try_echo"; } >&5
19029  (eval "$ac_compile") 2>&5
19030  ac_status=$?
19031  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19032  test $ac_status = 0; }; then :
19033  for ac_file in conftest.o conftest.obj conftest.*; do
19034  test -f "$ac_file" || continue;
19035  case $ac_file in
19036    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19037    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19038       break;;
19039  esac
19040done
19041else
19042  $as_echo "$as_me: failed program was:" >&5
19043sed 's/^/| /' conftest.$ac_ext >&5
19044
19045{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19047as_fn_error $? "cannot compute suffix of object files: cannot compile
19048See \`config.log' for more details" "$LINENO" 5 ; }
19049fi
19050rm -f conftest.$ac_cv_objext conftest.$ac_ext
19051fi
19052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19053$as_echo "$ac_cv_objext" >&6; }
19054OBJEXT=$ac_cv_objext
19055ac_objext=$OBJEXT
19056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19057$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19058if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19059  $as_echo_n "(cached) " >&6
19060else
19061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19062/* end confdefs.h.  */
19063
19064int
19065main ()
19066{
19067#ifndef __GNUC__
19068       choke me
19069#endif
19070
19071  ;
19072  return 0;
19073}
19074_ACEOF
19075if ac_fn_c_try_compile "$LINENO"; then :
19076  ac_compiler_gnu=yes
19077else
19078  ac_compiler_gnu=no
19079fi
19080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19081ac_cv_c_compiler_gnu=$ac_compiler_gnu
19082
19083fi
19084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19085$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19086if test $ac_compiler_gnu = yes; then
19087  GCC=yes
19088else
19089  GCC=
19090fi
19091ac_test_CFLAGS=${CFLAGS+set}
19092ac_save_CFLAGS=$CFLAGS
19093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19094$as_echo_n "checking whether $CC accepts -g... " >&6; }
19095if test "${ac_cv_prog_cc_g+set}" = set; then :
19096  $as_echo_n "(cached) " >&6
19097else
19098  ac_save_c_werror_flag=$ac_c_werror_flag
19099   ac_c_werror_flag=yes
19100   ac_cv_prog_cc_g=no
19101   CFLAGS="-g"
19102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19103/* end confdefs.h.  */
19104
19105int
19106main ()
19107{
19108
19109  ;
19110  return 0;
19111}
19112_ACEOF
19113if ac_fn_c_try_compile "$LINENO"; then :
19114  ac_cv_prog_cc_g=yes
19115else
19116  CFLAGS=""
19117      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19118/* end confdefs.h.  */
19119
19120int
19121main ()
19122{
19123
19124  ;
19125  return 0;
19126}
19127_ACEOF
19128if ac_fn_c_try_compile "$LINENO"; then :
19129
19130else
19131  ac_c_werror_flag=$ac_save_c_werror_flag
19132	 CFLAGS="-g"
19133	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134/* end confdefs.h.  */
19135
19136int
19137main ()
19138{
19139
19140  ;
19141  return 0;
19142}
19143_ACEOF
19144if ac_fn_c_try_compile "$LINENO"; then :
19145  ac_cv_prog_cc_g=yes
19146fi
19147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19148fi
19149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19150fi
19151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19152   ac_c_werror_flag=$ac_save_c_werror_flag
19153fi
19154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19155$as_echo "$ac_cv_prog_cc_g" >&6; }
19156if test "$ac_test_CFLAGS" = set; then
19157  CFLAGS=$ac_save_CFLAGS
19158elif test $ac_cv_prog_cc_g = yes; then
19159  if test "$GCC" = yes; then
19160    CFLAGS="-g -O2"
19161  else
19162    CFLAGS="-g"
19163  fi
19164else
19165  if test "$GCC" = yes; then
19166    CFLAGS="-O2"
19167  else
19168    CFLAGS=
19169  fi
19170fi
19171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19172$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19173if test "${ac_cv_prog_cc_c89+set}" = set; then :
19174  $as_echo_n "(cached) " >&6
19175else
19176  ac_cv_prog_cc_c89=no
19177ac_save_CC=$CC
19178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19179/* end confdefs.h.  */
19180#include <stdarg.h>
19181#include <stdio.h>
19182#include <sys/types.h>
19183#include <sys/stat.h>
19184/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19185struct buf { int x; };
19186FILE * (*rcsopen) (struct buf *, struct stat *, int);
19187static char *e (p, i)
19188     char **p;
19189     int i;
19190{
19191  return p[i];
19192}
19193static char *f (char * (*g) (char **, int), char **p, ...)
19194{
19195  char *s;
19196  va_list v;
19197  va_start (v,p);
19198  s = g (p, va_arg (v,int));
19199  va_end (v);
19200  return s;
19201}
19202
19203/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19204   function prototypes and stuff, but not '\xHH' hex character constants.
19205   These don't provoke an error unfortunately, instead are silently treated
19206   as 'x'.  The following induces an error, until -std is added to get
19207   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19208   array size at least.  It's necessary to write '\x00'==0 to get something
19209   that's true only with -std.  */
19210int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19211
19212/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19213   inside strings and character constants.  */
19214#define FOO(x) 'x'
19215int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19216
19217int test (int i, double x);
19218struct s1 {int (*f) (int a);};
19219struct s2 {int (*f) (double a);};
19220int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19221int argc;
19222char **argv;
19223int
19224main ()
19225{
19226return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19227  ;
19228  return 0;
19229}
19230_ACEOF
19231for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19232	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19233do
19234  CC="$ac_save_CC $ac_arg"
19235  if ac_fn_c_try_compile "$LINENO"; then :
19236  ac_cv_prog_cc_c89=$ac_arg
19237fi
19238rm -f core conftest.err conftest.$ac_objext
19239  test "x$ac_cv_prog_cc_c89" != "xno" && break
19240done
19241rm -f conftest.$ac_ext
19242CC=$ac_save_CC
19243
19244fi
19245# AC_CACHE_VAL
19246case "x$ac_cv_prog_cc_c89" in
19247  x)
19248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19249$as_echo "none needed" >&6; } ;;
19250  xno)
19251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19252$as_echo "unsupported" >&6; } ;;
19253  *)
19254    CC="$CC $ac_cv_prog_cc_c89"
19255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19256$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19257esac
19258if test "x$ac_cv_prog_cc_c89" != xno; then :
19259
19260fi
19261
19262ac_ext=cpp
19263ac_cpp='$CXXCPP $CPPFLAGS'
19264ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19265ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19266ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19267
19268
19269### Locate C++ compiler (CXX)
19270
19271if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19272  # Do not probe for CC on MacOSX.
19273  COMPILER_CHECK_LIST="cl g++"
19274else
19275  COMPILER_CHECK_LIST="cl CC g++"
19276fi
19277
19278  COMPILER_NAME=C++
19279
19280  # Do a first initial attempt at searching the list of compiler names.
19281  # AC_PATH_PROGS can't be run multiple times with the same variable,
19282  # so create a new name for this run.
19283  for ac_prog in $COMPILER_CHECK_LIST
19284do
19285  # Extract the first word of "$ac_prog", so it can be a program name with args.
19286set dummy $ac_prog; ac_word=$2
19287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19288$as_echo_n "checking for $ac_word... " >&6; }
19289if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19290  $as_echo_n "(cached) " >&6
19291else
19292  case $POTENTIAL_CXX in
19293  [\\/]* | ?:[\\/]*)
19294  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19295  ;;
19296  *)
19297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19298for as_dir in $PATH
19299do
19300  IFS=$as_save_IFS
19301  test -z "$as_dir" && as_dir=.
19302    for ac_exec_ext in '' $ac_executable_extensions; do
19303  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19304    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19306    break 2
19307  fi
19308done
19309  done
19310IFS=$as_save_IFS
19311
19312  ;;
19313esac
19314fi
19315POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19316if test -n "$POTENTIAL_CXX"; then
19317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19318$as_echo "$POTENTIAL_CXX" >&6; }
19319else
19320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19321$as_echo "no" >&6; }
19322fi
19323
19324
19325  test -n "$POTENTIAL_CXX" && break
19326done
19327
19328  CXX=$POTENTIAL_CXX
19329
19330  if test "x$$CXX" = x; then
19331
19332    # Print a helpful message on how to acquire the necessary build dependency.
19333    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19334    MISSING_DEPENDENCY=devkit
19335    PKGHANDLER_COMMAND=
19336
19337    case $PKGHANDLER in
19338	apt-get)
19339                apt_help     $MISSING_DEPENDENCY ;;
19340    yum)
19341                yum_help     $MISSING_DEPENDENCY ;;
19342	port)
19343                port_help    $MISSING_DEPENDENCY ;;
19344	pkgutil)
19345                pkgutil_help $MISSING_DEPENDENCY ;;
19346	pkgadd)
19347                pkgadd_help  $MISSING_DEPENDENCY ;;
19348    * )
19349      break ;;
19350    esac
19351
19352    if test "x$PKGHANDLER_COMMAND" != x; then
19353        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19354    fi
19355
19356      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19357  fi
19358
19359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19360
19361  # First separate the path from the arguments. This will split at the first
19362  # space.
19363  complete="$CXX"
19364  path="${complete%% *}"
19365  tmp="$complete EOL"
19366  arguments="${tmp#* }"
19367
19368  # Input might be given as Windows format, start by converting to
19369  # unix format.
19370  new_path=`$CYGPATH -u "$path"`
19371
19372  # Now try to locate executable using which
19373  new_path=`$WHICH "$new_path" 2> /dev/null`
19374  # bat and cmd files are not always considered executable in cygwin causing which
19375  # to not find them
19376  if test "x$new_path" = x \
19377           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19378           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19379    new_path=`$CYGPATH -u "$path"`
19380  fi
19381  if test "x$new_path" = x; then
19382    # Oops. Which didn't find the executable.
19383    # The splitting of arguments from the executable at a space might have been incorrect,
19384    # since paths with space are more likely in Windows. Give it another try with the whole
19385    # argument.
19386    path="$complete"
19387    arguments="EOL"
19388    new_path=`$CYGPATH -u "$path"`
19389    new_path=`$WHICH "$new_path" 2> /dev/null`
19390    # bat and cmd files are not always considered executable in cygwin causing which
19391    # to not find them
19392    if test "x$new_path" = x \
19393             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19394             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19395      new_path=`$CYGPATH -u "$path"`
19396    fi
19397    if test "x$new_path" = x; then
19398      # It's still not found. Now this is an unrecoverable error.
19399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19400$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19401      has_space=`$ECHO "$complete" | $GREP " "`
19402      if test "x$has_space" != x; then
19403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19405      fi
19406      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19407    fi
19408  fi
19409
19410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19413  # "foo.exe" is OK but "foo" is an error.
19414  #
19415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19416  # It is also a way to make sure we got the proper file name for the real test later on.
19417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19418  if test "x$test_shortpath" = x; then
19419    # Short path failed, file does not exist as specified.
19420    # Try adding .exe or .cmd
19421    if test -f "${new_path}.exe"; then
19422       input_to_shortpath="${new_path}.exe"
19423    elif test -f "${new_path}.cmd"; then
19424       input_to_shortpath="${new_path}.cmd"
19425    else
19426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19427$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19428      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19429$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19430      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19431    fi
19432  else
19433    input_to_shortpath="$new_path"
19434  fi
19435
19436  # Call helper function which possibly converts this using DOS-style short mode.
19437  # If so, the updated path is stored in $new_path.
19438  new_path="$input_to_shortpath"
19439
19440  input_path="$input_to_shortpath"
19441  # Check if we need to convert this using DOS-style short mode. If the path
19442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19443  # take no chances and rewrite it.
19444  # Note: m4 eats our [], so we need to use [ and ] instead.
19445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19446  if test "x$has_forbidden_chars" != x; then
19447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19451      # Going to short mode and back again did indeed matter. Since short mode is
19452      # case insensitive, let's make it lowercase to improve readability.
19453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19454      # Now convert it back to Unix-stile (cygpath)
19455      input_path=`$CYGPATH -u "$shortmode_path"`
19456      new_path="$input_path"
19457    fi
19458  fi
19459
19460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19461  if test "x$test_cygdrive_prefix" = x; then
19462    # As a simple fix, exclude /usr/bin since it's not a real path.
19463    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19465      # a path prefixed by /cygdrive for fixpath to work.
19466      new_path="$CYGWIN_ROOT_PATH$input_path"
19467    fi
19468  fi
19469
19470  # remove trailing .exe if any
19471  new_path="${new_path/%.exe/}"
19472
19473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19474
19475  # First separate the path from the arguments. This will split at the first
19476  # space.
19477  complete="$CXX"
19478  path="${complete%% *}"
19479  tmp="$complete EOL"
19480  arguments="${tmp#* }"
19481
19482  # Input might be given as Windows format, start by converting to
19483  # unix format.
19484  new_path="$path"
19485
19486  windows_path="$new_path"
19487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19488    unix_path=`$CYGPATH -u "$windows_path"`
19489    new_path="$unix_path"
19490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19492    new_path="$unix_path"
19493  fi
19494
19495
19496  # Now try to locate executable using which
19497  new_path=`$WHICH "$new_path" 2> /dev/null`
19498
19499  if test "x$new_path" = x; then
19500    # Oops. Which didn't find the executable.
19501    # The splitting of arguments from the executable at a space might have been incorrect,
19502    # since paths with space are more likely in Windows. Give it another try with the whole
19503    # argument.
19504    path="$complete"
19505    arguments="EOL"
19506    new_path="$path"
19507
19508  windows_path="$new_path"
19509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19510    unix_path=`$CYGPATH -u "$windows_path"`
19511    new_path="$unix_path"
19512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19514    new_path="$unix_path"
19515  fi
19516
19517
19518    new_path=`$WHICH "$new_path" 2> /dev/null`
19519
19520    if test "x$new_path" = x; then
19521      # It's still not found. Now this is an unrecoverable error.
19522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19523$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19524      has_space=`$ECHO "$complete" | $GREP " "`
19525      if test "x$has_space" != x; then
19526        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19527$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19528      fi
19529      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19530    fi
19531  fi
19532
19533  # Now new_path has a complete unix path to the binary
19534  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19535    # Keep paths in /bin as-is, but remove trailing .exe if any
19536    new_path="${new_path/%.exe/}"
19537    # Do not save /bin paths to all_fixpath_prefixes!
19538  else
19539    # Not in mixed or Windows style, start by that.
19540    new_path=`cmd //c echo $new_path`
19541
19542  input_path="$new_path"
19543  # Check if we need to convert this using DOS-style short mode. If the path
19544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19545  # take no chances and rewrite it.
19546  # Note: m4 eats our [], so we need to use [ and ] instead.
19547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19548  if test "x$has_forbidden_chars" != x; then
19549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19551  fi
19552
19553    # Output is in $new_path
19554
19555  windows_path="$new_path"
19556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19557    unix_path=`$CYGPATH -u "$windows_path"`
19558    new_path="$unix_path"
19559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19561    new_path="$unix_path"
19562  fi
19563
19564    # remove trailing .exe if any
19565    new_path="${new_path/%.exe/}"
19566
19567    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19568    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19569  fi
19570
19571  else
19572    # We're on a posix platform. Hooray! :)
19573    # First separate the path from the arguments. This will split at the first
19574    # space.
19575    complete="$CXX"
19576    path="${complete%% *}"
19577    tmp="$complete EOL"
19578    arguments="${tmp#* }"
19579
19580    new_path=`$WHICH $path 2> /dev/null`
19581    if test "x$new_path" = x; then
19582      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19583      if test "x$is_absolute_path" != x; then
19584        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19585$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19586        new_path="$path"
19587      else
19588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19589$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19590        has_space=`$ECHO "$complete" | $GREP " "`
19591        if test "x$has_space" != x; then
19592          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19593$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19594        fi
19595        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19596      fi
19597    fi
19598  fi
19599
19600  # Now join together the path and the arguments once again
19601  if test "x$arguments" != xEOL; then
19602      new_complete="$new_path ${arguments% *}"
19603  else
19604      new_complete="$new_path"
19605  fi
19606
19607  if test "x$complete" != "x$new_complete"; then
19608    CXX="$new_complete"
19609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19610$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19611  fi
19612
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19614$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19615  TEST_COMPILER="$CXX"
19616
19617    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19618        # Follow a chain of symbolic links. Use readlink
19619        # where it exists, else fall back to horribly
19620        # complicated shell code.
19621        if test "x$READLINK_TESTED" != yes; then
19622            # On MacOSX there is a readlink tool with a different
19623            # purpose than the GNU readlink tool. Check the found readlink.
19624            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19625            if test "x$ISGNU" = x; then
19626                 # A readlink that we do not know how to use.
19627                 # Are there other non-GNU readlinks out there?
19628                 READLINK_TESTED=yes
19629                 READLINK=
19630            fi
19631        fi
19632
19633        if test "x$READLINK" != x; then
19634            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19635        else
19636            # Save the current directory for restoring afterwards
19637            STARTDIR=$PWD
19638            COUNTER=0
19639            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19640            sym_link_file=`$BASENAME $TEST_COMPILER`
19641            # Use the system pwd and not the shell builtin to resolve directory symlinks
19642            cd $sym_link_dir
19643            cd `$THEPWDCMD`
19644            sym_link_dir=`$THEPWDCMD`
19645            # Resolve file symlinks
19646            while test $COUNTER -lt 20; do
19647                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19648                if test "x$ISLINK" == x; then
19649                    # This is not a symbolic link! We are done!
19650                    break
19651                fi
19652                # Again resolve directory symlinks since the target of the just found
19653                # link could be in a different directory
19654                cd `$DIRNAME $ISLINK`
19655                sym_link_dir=`$THEPWDCMD`
19656                sym_link_file=`$BASENAME $ISLINK`
19657                let COUNTER=COUNTER+1
19658            done
19659            cd $STARTDIR
19660            TEST_COMPILER=$sym_link_dir/$sym_link_file
19661        fi
19662    fi
19663
19664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19665$as_echo "$TEST_COMPILER" >&6; }
19666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19667$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19668
19669  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19670  if test "x$COMPILER_BASENAME" = "xccache"; then
19671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19672$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19673    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19674    # We want to control ccache invocation ourselves, so ignore this cc and try
19675    # searching again.
19676
19677    # Remove the path to the fake ccache cc from the PATH
19678    RETRY_COMPILER_SAVED_PATH="$PATH"
19679    COMPILER_DIRNAME=`$DIRNAME $CXX`
19680    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19681
19682    # Try again looking for our compiler
19683    if test -n "$ac_tool_prefix"; then
19684  for ac_prog in $COMPILER_CHECK_LIST
19685  do
19686    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19687set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19689$as_echo_n "checking for $ac_word... " >&6; }
19690if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19691  $as_echo_n "(cached) " >&6
19692else
19693  if test -n "$PROPER_COMPILER_CXX"; then
19694  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19695else
19696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19697for as_dir in $PATH
19698do
19699  IFS=$as_save_IFS
19700  test -z "$as_dir" && as_dir=.
19701    for ac_exec_ext in '' $ac_executable_extensions; do
19702  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19703    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19705    break 2
19706  fi
19707done
19708  done
19709IFS=$as_save_IFS
19710
19711fi
19712fi
19713PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19714if test -n "$PROPER_COMPILER_CXX"; then
19715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19716$as_echo "$PROPER_COMPILER_CXX" >&6; }
19717else
19718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19719$as_echo "no" >&6; }
19720fi
19721
19722
19723    test -n "$PROPER_COMPILER_CXX" && break
19724  done
19725fi
19726if test -z "$PROPER_COMPILER_CXX"; then
19727  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19728  for ac_prog in $COMPILER_CHECK_LIST
19729do
19730  # Extract the first word of "$ac_prog", so it can be a program name with args.
19731set dummy $ac_prog; ac_word=$2
19732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19733$as_echo_n "checking for $ac_word... " >&6; }
19734if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19735  $as_echo_n "(cached) " >&6
19736else
19737  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19738  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19739else
19740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19741for as_dir in $PATH
19742do
19743  IFS=$as_save_IFS
19744  test -z "$as_dir" && as_dir=.
19745    for ac_exec_ext in '' $ac_executable_extensions; do
19746  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19747    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19749    break 2
19750  fi
19751done
19752  done
19753IFS=$as_save_IFS
19754
19755fi
19756fi
19757ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19758if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19760$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19761else
19762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19763$as_echo "no" >&6; }
19764fi
19765
19766
19767  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19768done
19769
19770  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19771    PROPER_COMPILER_CXX=""
19772  else
19773    case $cross_compiling:$ac_tool_warned in
19774yes:)
19775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19777ac_tool_warned=yes ;;
19778esac
19779    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19780  fi
19781fi
19782
19783
19784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19785
19786  # First separate the path from the arguments. This will split at the first
19787  # space.
19788  complete="$PROPER_COMPILER_CXX"
19789  path="${complete%% *}"
19790  tmp="$complete EOL"
19791  arguments="${tmp#* }"
19792
19793  # Input might be given as Windows format, start by converting to
19794  # unix format.
19795  new_path=`$CYGPATH -u "$path"`
19796
19797  # Now try to locate executable using which
19798  new_path=`$WHICH "$new_path" 2> /dev/null`
19799  # bat and cmd files are not always considered executable in cygwin causing which
19800  # to not find them
19801  if test "x$new_path" = x \
19802           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19803           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19804    new_path=`$CYGPATH -u "$path"`
19805  fi
19806  if test "x$new_path" = x; then
19807    # Oops. Which didn't find the executable.
19808    # The splitting of arguments from the executable at a space might have been incorrect,
19809    # since paths with space are more likely in Windows. Give it another try with the whole
19810    # argument.
19811    path="$complete"
19812    arguments="EOL"
19813    new_path=`$CYGPATH -u "$path"`
19814    new_path=`$WHICH "$new_path" 2> /dev/null`
19815    # bat and cmd files are not always considered executable in cygwin causing which
19816    # to not find them
19817    if test "x$new_path" = x \
19818             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19819             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19820      new_path=`$CYGPATH -u "$path"`
19821    fi
19822    if test "x$new_path" = x; then
19823      # It's still not found. Now this is an unrecoverable error.
19824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19825$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19826      has_space=`$ECHO "$complete" | $GREP " "`
19827      if test "x$has_space" != x; then
19828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19830      fi
19831      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19832    fi
19833  fi
19834
19835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19838  # "foo.exe" is OK but "foo" is an error.
19839  #
19840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19841  # It is also a way to make sure we got the proper file name for the real test later on.
19842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19843  if test "x$test_shortpath" = x; then
19844    # Short path failed, file does not exist as specified.
19845    # Try adding .exe or .cmd
19846    if test -f "${new_path}.exe"; then
19847       input_to_shortpath="${new_path}.exe"
19848    elif test -f "${new_path}.cmd"; then
19849       input_to_shortpath="${new_path}.cmd"
19850    else
19851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19852$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19855      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19856    fi
19857  else
19858    input_to_shortpath="$new_path"
19859  fi
19860
19861  # Call helper function which possibly converts this using DOS-style short mode.
19862  # If so, the updated path is stored in $new_path.
19863  new_path="$input_to_shortpath"
19864
19865  input_path="$input_to_shortpath"
19866  # Check if we need to convert this using DOS-style short mode. If the path
19867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19868  # take no chances and rewrite it.
19869  # Note: m4 eats our [], so we need to use [ and ] instead.
19870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19871  if test "x$has_forbidden_chars" != x; then
19872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19876      # Going to short mode and back again did indeed matter. Since short mode is
19877      # case insensitive, let's make it lowercase to improve readability.
19878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19879      # Now convert it back to Unix-stile (cygpath)
19880      input_path=`$CYGPATH -u "$shortmode_path"`
19881      new_path="$input_path"
19882    fi
19883  fi
19884
19885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19886  if test "x$test_cygdrive_prefix" = x; then
19887    # As a simple fix, exclude /usr/bin since it's not a real path.
19888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19890      # a path prefixed by /cygdrive for fixpath to work.
19891      new_path="$CYGWIN_ROOT_PATH$input_path"
19892    fi
19893  fi
19894
19895  # remove trailing .exe if any
19896  new_path="${new_path/%.exe/}"
19897
19898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19899
19900  # First separate the path from the arguments. This will split at the first
19901  # space.
19902  complete="$PROPER_COMPILER_CXX"
19903  path="${complete%% *}"
19904  tmp="$complete EOL"
19905  arguments="${tmp#* }"
19906
19907  # Input might be given as Windows format, start by converting to
19908  # unix format.
19909  new_path="$path"
19910
19911  windows_path="$new_path"
19912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19913    unix_path=`$CYGPATH -u "$windows_path"`
19914    new_path="$unix_path"
19915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19917    new_path="$unix_path"
19918  fi
19919
19920
19921  # Now try to locate executable using which
19922  new_path=`$WHICH "$new_path" 2> /dev/null`
19923
19924  if test "x$new_path" = x; then
19925    # Oops. Which didn't find the executable.
19926    # The splitting of arguments from the executable at a space might have been incorrect,
19927    # since paths with space are more likely in Windows. Give it another try with the whole
19928    # argument.
19929    path="$complete"
19930    arguments="EOL"
19931    new_path="$path"
19932
19933  windows_path="$new_path"
19934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19935    unix_path=`$CYGPATH -u "$windows_path"`
19936    new_path="$unix_path"
19937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19939    new_path="$unix_path"
19940  fi
19941
19942
19943    new_path=`$WHICH "$new_path" 2> /dev/null`
19944
19945    if test "x$new_path" = x; then
19946      # It's still not found. Now this is an unrecoverable error.
19947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19948$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19949      has_space=`$ECHO "$complete" | $GREP " "`
19950      if test "x$has_space" != x; then
19951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19953      fi
19954      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19955    fi
19956  fi
19957
19958  # Now new_path has a complete unix path to the binary
19959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19960    # Keep paths in /bin as-is, but remove trailing .exe if any
19961    new_path="${new_path/%.exe/}"
19962    # Do not save /bin paths to all_fixpath_prefixes!
19963  else
19964    # Not in mixed or Windows style, start by that.
19965    new_path=`cmd //c echo $new_path`
19966
19967  input_path="$new_path"
19968  # Check if we need to convert this using DOS-style short mode. If the path
19969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19970  # take no chances and rewrite it.
19971  # Note: m4 eats our [], so we need to use [ and ] instead.
19972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19973  if test "x$has_forbidden_chars" != x; then
19974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19976  fi
19977
19978    # Output is in $new_path
19979
19980  windows_path="$new_path"
19981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19982    unix_path=`$CYGPATH -u "$windows_path"`
19983    new_path="$unix_path"
19984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19986    new_path="$unix_path"
19987  fi
19988
19989    # remove trailing .exe if any
19990    new_path="${new_path/%.exe/}"
19991
19992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19994  fi
19995
19996  else
19997    # We're on a posix platform. Hooray! :)
19998    # First separate the path from the arguments. This will split at the first
19999    # space.
20000    complete="$PROPER_COMPILER_CXX"
20001    path="${complete%% *}"
20002    tmp="$complete EOL"
20003    arguments="${tmp#* }"
20004
20005    new_path=`$WHICH $path 2> /dev/null`
20006    if test "x$new_path" = x; then
20007      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20008      if test "x$is_absolute_path" != x; then
20009        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
20010$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
20011        new_path="$path"
20012      else
20013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20014$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20015        has_space=`$ECHO "$complete" | $GREP " "`
20016        if test "x$has_space" != x; then
20017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20019        fi
20020        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20021      fi
20022    fi
20023  fi
20024
20025  # Now join together the path and the arguments once again
20026  if test "x$arguments" != xEOL; then
20027      new_complete="$new_path ${arguments% *}"
20028  else
20029      new_complete="$new_path"
20030  fi
20031
20032  if test "x$complete" != "x$new_complete"; then
20033    PROPER_COMPILER_CXX="$new_complete"
20034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20035$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20036  fi
20037
20038    PATH="$RETRY_COMPILER_SAVED_PATH"
20039
20040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20041$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20042
20043    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20044        # Follow a chain of symbolic links. Use readlink
20045        # where it exists, else fall back to horribly
20046        # complicated shell code.
20047        if test "x$READLINK_TESTED" != yes; then
20048            # On MacOSX there is a readlink tool with a different
20049            # purpose than the GNU readlink tool. Check the found readlink.
20050            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20051            if test "x$ISGNU" = x; then
20052                 # A readlink that we do not know how to use.
20053                 # Are there other non-GNU readlinks out there?
20054                 READLINK_TESTED=yes
20055                 READLINK=
20056            fi
20057        fi
20058
20059        if test "x$READLINK" != x; then
20060            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20061        else
20062            # Save the current directory for restoring afterwards
20063            STARTDIR=$PWD
20064            COUNTER=0
20065            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20066            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20067            # Use the system pwd and not the shell builtin to resolve directory symlinks
20068            cd $sym_link_dir
20069            cd `$THEPWDCMD`
20070            sym_link_dir=`$THEPWDCMD`
20071            # Resolve file symlinks
20072            while test $COUNTER -lt 20; do
20073                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20074                if test "x$ISLINK" == x; then
20075                    # This is not a symbolic link! We are done!
20076                    break
20077                fi
20078                # Again resolve directory symlinks since the target of the just found
20079                # link could be in a different directory
20080                cd `$DIRNAME $ISLINK`
20081                sym_link_dir=`$THEPWDCMD`
20082                sym_link_file=`$BASENAME $ISLINK`
20083                let COUNTER=COUNTER+1
20084            done
20085            cd $STARTDIR
20086            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20087        fi
20088    fi
20089
20090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20091$as_echo "$PROPER_COMPILER_CXX" >&6; }
20092    CXX="$PROPER_COMPILER_CXX"
20093  else
20094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20095$as_echo "no, keeping CXX" >&6; }
20096    CXX="$TEST_COMPILER"
20097  fi
20098
20099  COMPILER=$CXX
20100  COMPILER_NAME=$COMPILER_NAME
20101
20102  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20103    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20104    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20105    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20106    if test $? -ne 0; then
20107      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20108
20109      { $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
20110$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20112$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20113      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20114    else
20115      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20116      COMPILER_VENDOR="Sun Studio"
20117    fi
20118  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20119    # First line typically looks something like:
20120    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20121    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20122    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20123    COMPILER_VENDOR="Microsoft CL.EXE"
20124    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20125    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20126      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20127        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20128      fi
20129    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20130      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20131        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20132      fi
20133    fi
20134  else
20135    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20136    # Check that this is likely to be GCC.
20137    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20138    if test $? -ne 0; then
20139      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20140$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20142$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20143      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20144    fi
20145
20146    # First line typically looks something like:
20147    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20148    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20149    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20150  fi
20151  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20152  CXX_VERSION="$COMPILER_VERSION"
20153  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20154  CXX_VENDOR="$COMPILER_VENDOR"
20155
20156  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20157$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20158
20159
20160# Now that we have resolved CXX ourself, let autoconf have it's go at it
20161ac_ext=cpp
20162ac_cpp='$CXXCPP $CPPFLAGS'
20163ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20164ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20165ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20166if test -z "$CXX"; then
20167  if test -n "$CCC"; then
20168    CXX=$CCC
20169  else
20170    if test -n "$ac_tool_prefix"; then
20171  for ac_prog in $CXX
20172  do
20173    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20174set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20176$as_echo_n "checking for $ac_word... " >&6; }
20177if test "${ac_cv_prog_CXX+set}" = set; then :
20178  $as_echo_n "(cached) " >&6
20179else
20180  if test -n "$CXX"; then
20181  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20182else
20183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20184for as_dir in $PATH
20185do
20186  IFS=$as_save_IFS
20187  test -z "$as_dir" && as_dir=.
20188    for ac_exec_ext in '' $ac_executable_extensions; do
20189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20190    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20192    break 2
20193  fi
20194done
20195  done
20196IFS=$as_save_IFS
20197
20198fi
20199fi
20200CXX=$ac_cv_prog_CXX
20201if test -n "$CXX"; then
20202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20203$as_echo "$CXX" >&6; }
20204else
20205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20206$as_echo "no" >&6; }
20207fi
20208
20209
20210    test -n "$CXX" && break
20211  done
20212fi
20213if test -z "$CXX"; then
20214  ac_ct_CXX=$CXX
20215  for ac_prog in $CXX
20216do
20217  # Extract the first word of "$ac_prog", so it can be a program name with args.
20218set dummy $ac_prog; ac_word=$2
20219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20220$as_echo_n "checking for $ac_word... " >&6; }
20221if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20222  $as_echo_n "(cached) " >&6
20223else
20224  if test -n "$ac_ct_CXX"; then
20225  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20226else
20227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20228for as_dir in $PATH
20229do
20230  IFS=$as_save_IFS
20231  test -z "$as_dir" && as_dir=.
20232    for ac_exec_ext in '' $ac_executable_extensions; do
20233  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20234    ac_cv_prog_ac_ct_CXX="$ac_prog"
20235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20236    break 2
20237  fi
20238done
20239  done
20240IFS=$as_save_IFS
20241
20242fi
20243fi
20244ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20245if test -n "$ac_ct_CXX"; then
20246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20247$as_echo "$ac_ct_CXX" >&6; }
20248else
20249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20250$as_echo "no" >&6; }
20251fi
20252
20253
20254  test -n "$ac_ct_CXX" && break
20255done
20256
20257  if test "x$ac_ct_CXX" = x; then
20258    CXX="g++"
20259  else
20260    case $cross_compiling:$ac_tool_warned in
20261yes:)
20262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20264ac_tool_warned=yes ;;
20265esac
20266    CXX=$ac_ct_CXX
20267  fi
20268fi
20269
20270  fi
20271fi
20272# Provide some information about the compiler.
20273$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20274set X $ac_compile
20275ac_compiler=$2
20276for ac_option in --version -v -V -qversion; do
20277  { { ac_try="$ac_compiler $ac_option >&5"
20278case "(($ac_try" in
20279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20280  *) ac_try_echo=$ac_try;;
20281esac
20282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20283$as_echo "$ac_try_echo"; } >&5
20284  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20285  ac_status=$?
20286  if test -s conftest.err; then
20287    sed '10a\
20288... rest of stderr output deleted ...
20289         10q' conftest.err >conftest.er1
20290    cat conftest.er1 >&5
20291  fi
20292  rm -f conftest.er1 conftest.err
20293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20294  test $ac_status = 0; }
20295done
20296
20297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20298$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20299if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20300  $as_echo_n "(cached) " >&6
20301else
20302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20303/* end confdefs.h.  */
20304
20305int
20306main ()
20307{
20308#ifndef __GNUC__
20309       choke me
20310#endif
20311
20312  ;
20313  return 0;
20314}
20315_ACEOF
20316if ac_fn_cxx_try_compile "$LINENO"; then :
20317  ac_compiler_gnu=yes
20318else
20319  ac_compiler_gnu=no
20320fi
20321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20322ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20323
20324fi
20325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20326$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20327if test $ac_compiler_gnu = yes; then
20328  GXX=yes
20329else
20330  GXX=
20331fi
20332ac_test_CXXFLAGS=${CXXFLAGS+set}
20333ac_save_CXXFLAGS=$CXXFLAGS
20334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20335$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20336if test "${ac_cv_prog_cxx_g+set}" = set; then :
20337  $as_echo_n "(cached) " >&6
20338else
20339  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20340   ac_cxx_werror_flag=yes
20341   ac_cv_prog_cxx_g=no
20342   CXXFLAGS="-g"
20343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20344/* end confdefs.h.  */
20345
20346int
20347main ()
20348{
20349
20350  ;
20351  return 0;
20352}
20353_ACEOF
20354if ac_fn_cxx_try_compile "$LINENO"; then :
20355  ac_cv_prog_cxx_g=yes
20356else
20357  CXXFLAGS=""
20358      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20359/* end confdefs.h.  */
20360
20361int
20362main ()
20363{
20364
20365  ;
20366  return 0;
20367}
20368_ACEOF
20369if ac_fn_cxx_try_compile "$LINENO"; then :
20370
20371else
20372  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20373	 CXXFLAGS="-g"
20374	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20375/* end confdefs.h.  */
20376
20377int
20378main ()
20379{
20380
20381  ;
20382  return 0;
20383}
20384_ACEOF
20385if ac_fn_cxx_try_compile "$LINENO"; then :
20386  ac_cv_prog_cxx_g=yes
20387fi
20388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20389fi
20390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20391fi
20392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20393   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20394fi
20395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20396$as_echo "$ac_cv_prog_cxx_g" >&6; }
20397if test "$ac_test_CXXFLAGS" = set; then
20398  CXXFLAGS=$ac_save_CXXFLAGS
20399elif test $ac_cv_prog_cxx_g = yes; then
20400  if test "$GXX" = yes; then
20401    CXXFLAGS="-g -O2"
20402  else
20403    CXXFLAGS="-g"
20404  fi
20405else
20406  if test "$GXX" = yes; then
20407    CXXFLAGS="-O2"
20408  else
20409    CXXFLAGS=
20410  fi
20411fi
20412ac_ext=cpp
20413ac_cpp='$CXXCPP $CPPFLAGS'
20414ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20415ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20416ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20417
20418
20419### Locate other tools
20420
20421if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20422    ac_ext=m
20423ac_cpp='$OBJCPP $CPPFLAGS'
20424ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20425ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20426ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20427if test -n "$ac_tool_prefix"; then
20428  for ac_prog in gcc objcc objc cc CC
20429  do
20430    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20431set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20433$as_echo_n "checking for $ac_word... " >&6; }
20434if test "${ac_cv_prog_OBJC+set}" = set; then :
20435  $as_echo_n "(cached) " >&6
20436else
20437  if test -n "$OBJC"; then
20438  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20439else
20440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20441for as_dir in $PATH
20442do
20443  IFS=$as_save_IFS
20444  test -z "$as_dir" && as_dir=.
20445    for ac_exec_ext in '' $ac_executable_extensions; do
20446  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20447    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20449    break 2
20450  fi
20451done
20452  done
20453IFS=$as_save_IFS
20454
20455fi
20456fi
20457OBJC=$ac_cv_prog_OBJC
20458if test -n "$OBJC"; then
20459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20460$as_echo "$OBJC" >&6; }
20461else
20462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20463$as_echo "no" >&6; }
20464fi
20465
20466
20467    test -n "$OBJC" && break
20468  done
20469fi
20470if test -z "$OBJC"; then
20471  ac_ct_OBJC=$OBJC
20472  for ac_prog in gcc objcc objc cc CC
20473do
20474  # Extract the first word of "$ac_prog", so it can be a program name with args.
20475set dummy $ac_prog; ac_word=$2
20476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20477$as_echo_n "checking for $ac_word... " >&6; }
20478if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20479  $as_echo_n "(cached) " >&6
20480else
20481  if test -n "$ac_ct_OBJC"; then
20482  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20483else
20484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20485for as_dir in $PATH
20486do
20487  IFS=$as_save_IFS
20488  test -z "$as_dir" && as_dir=.
20489    for ac_exec_ext in '' $ac_executable_extensions; do
20490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20491    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20493    break 2
20494  fi
20495done
20496  done
20497IFS=$as_save_IFS
20498
20499fi
20500fi
20501ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20502if test -n "$ac_ct_OBJC"; then
20503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20504$as_echo "$ac_ct_OBJC" >&6; }
20505else
20506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20507$as_echo "no" >&6; }
20508fi
20509
20510
20511  test -n "$ac_ct_OBJC" && break
20512done
20513
20514  if test "x$ac_ct_OBJC" = x; then
20515    OBJC="gcc"
20516  else
20517    case $cross_compiling:$ac_tool_warned in
20518yes:)
20519{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20520$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20521ac_tool_warned=yes ;;
20522esac
20523    OBJC=$ac_ct_OBJC
20524  fi
20525fi
20526
20527# Provide some information about the compiler.
20528$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20529set X $ac_compile
20530ac_compiler=$2
20531for ac_option in --version -v -V -qversion; do
20532  { { ac_try="$ac_compiler $ac_option >&5"
20533case "(($ac_try" in
20534  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20535  *) ac_try_echo=$ac_try;;
20536esac
20537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20538$as_echo "$ac_try_echo"; } >&5
20539  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20540  ac_status=$?
20541  if test -s conftest.err; then
20542    sed '10a\
20543... rest of stderr output deleted ...
20544         10q' conftest.err >conftest.er1
20545    cat conftest.er1 >&5
20546  fi
20547  rm -f conftest.er1 conftest.err
20548  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20549  test $ac_status = 0; }
20550done
20551
20552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20553$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20554if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20555  $as_echo_n "(cached) " >&6
20556else
20557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20558/* end confdefs.h.  */
20559
20560int
20561main ()
20562{
20563#ifndef __GNUC__
20564       choke me
20565#endif
20566
20567  ;
20568  return 0;
20569}
20570_ACEOF
20571if ac_fn_objc_try_compile "$LINENO"; then :
20572  ac_compiler_gnu=yes
20573else
20574  ac_compiler_gnu=no
20575fi
20576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20577ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20578
20579fi
20580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20581$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20582if test $ac_compiler_gnu = yes; then
20583  GOBJC=yes
20584else
20585  GOBJC=
20586fi
20587ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20588ac_save_OBJCFLAGS=$OBJCFLAGS
20589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20590$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20591if test "${ac_cv_prog_objc_g+set}" = set; then :
20592  $as_echo_n "(cached) " >&6
20593else
20594  ac_save_objc_werror_flag=$ac_objc_werror_flag
20595   ac_objc_werror_flag=yes
20596   ac_cv_prog_objc_g=no
20597   OBJCFLAGS="-g"
20598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20599/* end confdefs.h.  */
20600
20601int
20602main ()
20603{
20604
20605  ;
20606  return 0;
20607}
20608_ACEOF
20609if ac_fn_objc_try_compile "$LINENO"; then :
20610  ac_cv_prog_objc_g=yes
20611else
20612  OBJCFLAGS=""
20613      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20614/* end confdefs.h.  */
20615
20616int
20617main ()
20618{
20619
20620  ;
20621  return 0;
20622}
20623_ACEOF
20624if ac_fn_objc_try_compile "$LINENO"; then :
20625
20626else
20627  ac_objc_werror_flag=$ac_save_objc_werror_flag
20628	 OBJCFLAGS="-g"
20629	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20630/* end confdefs.h.  */
20631
20632int
20633main ()
20634{
20635
20636  ;
20637  return 0;
20638}
20639_ACEOF
20640if ac_fn_objc_try_compile "$LINENO"; then :
20641  ac_cv_prog_objc_g=yes
20642fi
20643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20644fi
20645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20646fi
20647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20648   ac_objc_werror_flag=$ac_save_objc_werror_flag
20649fi
20650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20651$as_echo "$ac_cv_prog_objc_g" >&6; }
20652if test "$ac_test_OBJCFLAGS" = set; then
20653  OBJCFLAGS=$ac_save_OBJCFLAGS
20654elif test $ac_cv_prog_objc_g = yes; then
20655  if test "$GOBJC" = yes; then
20656    OBJCFLAGS="-g -O2"
20657  else
20658    OBJCFLAGS="-g"
20659  fi
20660else
20661  if test "$GOBJC" = yes; then
20662    OBJCFLAGS="-O2"
20663  else
20664    OBJCFLAGS=
20665  fi
20666fi
20667ac_ext=cpp
20668ac_cpp='$CXXCPP $CPPFLAGS'
20669ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20670ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20671ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20672
20673
20674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20675
20676  # First separate the path from the arguments. This will split at the first
20677  # space.
20678  complete="$OBJC"
20679  path="${complete%% *}"
20680  tmp="$complete EOL"
20681  arguments="${tmp#* }"
20682
20683  # Input might be given as Windows format, start by converting to
20684  # unix format.
20685  new_path=`$CYGPATH -u "$path"`
20686
20687  # Now try to locate executable using which
20688  new_path=`$WHICH "$new_path" 2> /dev/null`
20689  # bat and cmd files are not always considered executable in cygwin causing which
20690  # to not find them
20691  if test "x$new_path" = x \
20692           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20693           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20694    new_path=`$CYGPATH -u "$path"`
20695  fi
20696  if test "x$new_path" = x; then
20697    # Oops. Which didn't find the executable.
20698    # The splitting of arguments from the executable at a space might have been incorrect,
20699    # since paths with space are more likely in Windows. Give it another try with the whole
20700    # argument.
20701    path="$complete"
20702    arguments="EOL"
20703    new_path=`$CYGPATH -u "$path"`
20704    new_path=`$WHICH "$new_path" 2> /dev/null`
20705    # bat and cmd files are not always considered executable in cygwin causing which
20706    # to not find them
20707    if test "x$new_path" = x \
20708             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20709             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20710      new_path=`$CYGPATH -u "$path"`
20711    fi
20712    if test "x$new_path" = x; then
20713      # It's still not found. Now this is an unrecoverable error.
20714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20715$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20716      has_space=`$ECHO "$complete" | $GREP " "`
20717      if test "x$has_space" != x; then
20718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20720      fi
20721      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20722    fi
20723  fi
20724
20725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20728  # "foo.exe" is OK but "foo" is an error.
20729  #
20730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20731  # It is also a way to make sure we got the proper file name for the real test later on.
20732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20733  if test "x$test_shortpath" = x; then
20734    # Short path failed, file does not exist as specified.
20735    # Try adding .exe or .cmd
20736    if test -f "${new_path}.exe"; then
20737       input_to_shortpath="${new_path}.exe"
20738    elif test -f "${new_path}.cmd"; then
20739       input_to_shortpath="${new_path}.cmd"
20740    else
20741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20742$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20745      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20746    fi
20747  else
20748    input_to_shortpath="$new_path"
20749  fi
20750
20751  # Call helper function which possibly converts this using DOS-style short mode.
20752  # If so, the updated path is stored in $new_path.
20753  new_path="$input_to_shortpath"
20754
20755  input_path="$input_to_shortpath"
20756  # Check if we need to convert this using DOS-style short mode. If the path
20757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20758  # take no chances and rewrite it.
20759  # Note: m4 eats our [], so we need to use [ and ] instead.
20760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20761  if test "x$has_forbidden_chars" != x; then
20762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20766      # Going to short mode and back again did indeed matter. Since short mode is
20767      # case insensitive, let's make it lowercase to improve readability.
20768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20769      # Now convert it back to Unix-stile (cygpath)
20770      input_path=`$CYGPATH -u "$shortmode_path"`
20771      new_path="$input_path"
20772    fi
20773  fi
20774
20775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20776  if test "x$test_cygdrive_prefix" = x; then
20777    # As a simple fix, exclude /usr/bin since it's not a real path.
20778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20780      # a path prefixed by /cygdrive for fixpath to work.
20781      new_path="$CYGWIN_ROOT_PATH$input_path"
20782    fi
20783  fi
20784
20785  # remove trailing .exe if any
20786  new_path="${new_path/%.exe/}"
20787
20788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20789
20790  # First separate the path from the arguments. This will split at the first
20791  # space.
20792  complete="$OBJC"
20793  path="${complete%% *}"
20794  tmp="$complete EOL"
20795  arguments="${tmp#* }"
20796
20797  # Input might be given as Windows format, start by converting to
20798  # unix format.
20799  new_path="$path"
20800
20801  windows_path="$new_path"
20802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20803    unix_path=`$CYGPATH -u "$windows_path"`
20804    new_path="$unix_path"
20805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20807    new_path="$unix_path"
20808  fi
20809
20810
20811  # Now try to locate executable using which
20812  new_path=`$WHICH "$new_path" 2> /dev/null`
20813
20814  if test "x$new_path" = x; then
20815    # Oops. Which didn't find the executable.
20816    # The splitting of arguments from the executable at a space might have been incorrect,
20817    # since paths with space are more likely in Windows. Give it another try with the whole
20818    # argument.
20819    path="$complete"
20820    arguments="EOL"
20821    new_path="$path"
20822
20823  windows_path="$new_path"
20824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20825    unix_path=`$CYGPATH -u "$windows_path"`
20826    new_path="$unix_path"
20827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20829    new_path="$unix_path"
20830  fi
20831
20832
20833    new_path=`$WHICH "$new_path" 2> /dev/null`
20834
20835    if test "x$new_path" = x; then
20836      # It's still not found. Now this is an unrecoverable error.
20837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20838$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20839      has_space=`$ECHO "$complete" | $GREP " "`
20840      if test "x$has_space" != x; then
20841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20843      fi
20844      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20845    fi
20846  fi
20847
20848  # Now new_path has a complete unix path to the binary
20849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20850    # Keep paths in /bin as-is, but remove trailing .exe if any
20851    new_path="${new_path/%.exe/}"
20852    # Do not save /bin paths to all_fixpath_prefixes!
20853  else
20854    # Not in mixed or Windows style, start by that.
20855    new_path=`cmd //c echo $new_path`
20856
20857  input_path="$new_path"
20858  # Check if we need to convert this using DOS-style short mode. If the path
20859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20860  # take no chances and rewrite it.
20861  # Note: m4 eats our [], so we need to use [ and ] instead.
20862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20863  if test "x$has_forbidden_chars" != x; then
20864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20866  fi
20867
20868    # Output is in $new_path
20869
20870  windows_path="$new_path"
20871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20872    unix_path=`$CYGPATH -u "$windows_path"`
20873    new_path="$unix_path"
20874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20876    new_path="$unix_path"
20877  fi
20878
20879    # remove trailing .exe if any
20880    new_path="${new_path/%.exe/}"
20881
20882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20884  fi
20885
20886  else
20887    # We're on a posix platform. Hooray! :)
20888    # First separate the path from the arguments. This will split at the first
20889    # space.
20890    complete="$OBJC"
20891    path="${complete%% *}"
20892    tmp="$complete EOL"
20893    arguments="${tmp#* }"
20894
20895    new_path=`$WHICH $path 2> /dev/null`
20896    if test "x$new_path" = x; then
20897      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20898      if test "x$is_absolute_path" != x; then
20899        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
20900$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
20901        new_path="$path"
20902      else
20903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20904$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20905        has_space=`$ECHO "$complete" | $GREP " "`
20906        if test "x$has_space" != x; then
20907          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20909        fi
20910        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20911      fi
20912    fi
20913  fi
20914
20915  # Now join together the path and the arguments once again
20916  if test "x$arguments" != xEOL; then
20917      new_complete="$new_path ${arguments% *}"
20918  else
20919      new_complete="$new_path"
20920  fi
20921
20922  if test "x$complete" != "x$new_complete"; then
20923    OBJC="$new_complete"
20924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
20925$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
20926  fi
20927
20928else
20929    OBJC=
20930fi
20931
20932# Restore the flags to the user specified values.
20933# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
20934CFLAGS="$ORG_CFLAGS"
20935CXXFLAGS="$ORG_CXXFLAGS"
20936OBJCFLAGS="$ORG_OBJCFLAGS"
20937
20938LD="$CC"
20939LDEXE="$CC"
20940LDCXX="$CXX"
20941LDEXECXX="$CXX"
20942
20943# LDEXE is the linker to use, when creating executables.
20944
20945# Linking C++ libraries.
20946
20947# Linking C++ executables.
20948
20949
20950if test "x$OPENJDK_TARGET_OS" != xwindows; then
20951    if test -n "$ac_tool_prefix"; then
20952  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20953set dummy ${ac_tool_prefix}ar; ac_word=$2
20954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20955$as_echo_n "checking for $ac_word... " >&6; }
20956if test "${ac_cv_prog_AR+set}" = set; then :
20957  $as_echo_n "(cached) " >&6
20958else
20959  if test -n "$AR"; then
20960  ac_cv_prog_AR="$AR" # Let the user override the test.
20961else
20962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20963for as_dir in $PATH
20964do
20965  IFS=$as_save_IFS
20966  test -z "$as_dir" && as_dir=.
20967    for ac_exec_ext in '' $ac_executable_extensions; do
20968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20969    ac_cv_prog_AR="${ac_tool_prefix}ar"
20970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20971    break 2
20972  fi
20973done
20974  done
20975IFS=$as_save_IFS
20976
20977fi
20978fi
20979AR=$ac_cv_prog_AR
20980if test -n "$AR"; then
20981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20982$as_echo "$AR" >&6; }
20983else
20984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20985$as_echo "no" >&6; }
20986fi
20987
20988
20989fi
20990if test -z "$ac_cv_prog_AR"; then
20991  ac_ct_AR=$AR
20992  # Extract the first word of "ar", so it can be a program name with args.
20993set dummy ar; ac_word=$2
20994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20995$as_echo_n "checking for $ac_word... " >&6; }
20996if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20997  $as_echo_n "(cached) " >&6
20998else
20999  if test -n "$ac_ct_AR"; then
21000  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21001else
21002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21003for as_dir in $PATH
21004do
21005  IFS=$as_save_IFS
21006  test -z "$as_dir" && as_dir=.
21007    for ac_exec_ext in '' $ac_executable_extensions; do
21008  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21009    ac_cv_prog_ac_ct_AR="ar"
21010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21011    break 2
21012  fi
21013done
21014  done
21015IFS=$as_save_IFS
21016
21017fi
21018fi
21019ac_ct_AR=$ac_cv_prog_ac_ct_AR
21020if test -n "$ac_ct_AR"; then
21021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21022$as_echo "$ac_ct_AR" >&6; }
21023else
21024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21025$as_echo "no" >&6; }
21026fi
21027
21028  if test "x$ac_ct_AR" = x; then
21029    AR=""
21030  else
21031    case $cross_compiling:$ac_tool_warned in
21032yes:)
21033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21035ac_tool_warned=yes ;;
21036esac
21037    AR=$ac_ct_AR
21038  fi
21039else
21040  AR="$ac_cv_prog_AR"
21041fi
21042
21043
21044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21045
21046  # First separate the path from the arguments. This will split at the first
21047  # space.
21048  complete="$AR"
21049  path="${complete%% *}"
21050  tmp="$complete EOL"
21051  arguments="${tmp#* }"
21052
21053  # Input might be given as Windows format, start by converting to
21054  # unix format.
21055  new_path=`$CYGPATH -u "$path"`
21056
21057  # Now try to locate executable using which
21058  new_path=`$WHICH "$new_path" 2> /dev/null`
21059  # bat and cmd files are not always considered executable in cygwin causing which
21060  # to not find them
21061  if test "x$new_path" = x \
21062           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21063           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21064    new_path=`$CYGPATH -u "$path"`
21065  fi
21066  if test "x$new_path" = x; then
21067    # Oops. Which didn't find the executable.
21068    # The splitting of arguments from the executable at a space might have been incorrect,
21069    # since paths with space are more likely in Windows. Give it another try with the whole
21070    # argument.
21071    path="$complete"
21072    arguments="EOL"
21073    new_path=`$CYGPATH -u "$path"`
21074    new_path=`$WHICH "$new_path" 2> /dev/null`
21075    # bat and cmd files are not always considered executable in cygwin causing which
21076    # to not find them
21077    if test "x$new_path" = x \
21078             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21079             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21080      new_path=`$CYGPATH -u "$path"`
21081    fi
21082    if test "x$new_path" = x; then
21083      # It's still not found. Now this is an unrecoverable error.
21084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21085$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21086      has_space=`$ECHO "$complete" | $GREP " "`
21087      if test "x$has_space" != x; then
21088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21090      fi
21091      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21092    fi
21093  fi
21094
21095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21098  # "foo.exe" is OK but "foo" is an error.
21099  #
21100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21101  # It is also a way to make sure we got the proper file name for the real test later on.
21102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21103  if test "x$test_shortpath" = x; then
21104    # Short path failed, file does not exist as specified.
21105    # Try adding .exe or .cmd
21106    if test -f "${new_path}.exe"; then
21107       input_to_shortpath="${new_path}.exe"
21108    elif test -f "${new_path}.cmd"; then
21109       input_to_shortpath="${new_path}.cmd"
21110    else
21111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21112$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21115      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21116    fi
21117  else
21118    input_to_shortpath="$new_path"
21119  fi
21120
21121  # Call helper function which possibly converts this using DOS-style short mode.
21122  # If so, the updated path is stored in $new_path.
21123  new_path="$input_to_shortpath"
21124
21125  input_path="$input_to_shortpath"
21126  # Check if we need to convert this using DOS-style short mode. If the path
21127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21128  # take no chances and rewrite it.
21129  # Note: m4 eats our [], so we need to use [ and ] instead.
21130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21131  if test "x$has_forbidden_chars" != x; then
21132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21136      # Going to short mode and back again did indeed matter. Since short mode is
21137      # case insensitive, let's make it lowercase to improve readability.
21138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21139      # Now convert it back to Unix-stile (cygpath)
21140      input_path=`$CYGPATH -u "$shortmode_path"`
21141      new_path="$input_path"
21142    fi
21143  fi
21144
21145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21146  if test "x$test_cygdrive_prefix" = x; then
21147    # As a simple fix, exclude /usr/bin since it's not a real path.
21148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21150      # a path prefixed by /cygdrive for fixpath to work.
21151      new_path="$CYGWIN_ROOT_PATH$input_path"
21152    fi
21153  fi
21154
21155  # remove trailing .exe if any
21156  new_path="${new_path/%.exe/}"
21157
21158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21159
21160  # First separate the path from the arguments. This will split at the first
21161  # space.
21162  complete="$AR"
21163  path="${complete%% *}"
21164  tmp="$complete EOL"
21165  arguments="${tmp#* }"
21166
21167  # Input might be given as Windows format, start by converting to
21168  # unix format.
21169  new_path="$path"
21170
21171  windows_path="$new_path"
21172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21173    unix_path=`$CYGPATH -u "$windows_path"`
21174    new_path="$unix_path"
21175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21177    new_path="$unix_path"
21178  fi
21179
21180
21181  # Now try to locate executable using which
21182  new_path=`$WHICH "$new_path" 2> /dev/null`
21183
21184  if test "x$new_path" = x; then
21185    # Oops. Which didn't find the executable.
21186    # The splitting of arguments from the executable at a space might have been incorrect,
21187    # since paths with space are more likely in Windows. Give it another try with the whole
21188    # argument.
21189    path="$complete"
21190    arguments="EOL"
21191    new_path="$path"
21192
21193  windows_path="$new_path"
21194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21195    unix_path=`$CYGPATH -u "$windows_path"`
21196    new_path="$unix_path"
21197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21199    new_path="$unix_path"
21200  fi
21201
21202
21203    new_path=`$WHICH "$new_path" 2> /dev/null`
21204
21205    if test "x$new_path" = x; then
21206      # It's still not found. Now this is an unrecoverable error.
21207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21208$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21209      has_space=`$ECHO "$complete" | $GREP " "`
21210      if test "x$has_space" != x; then
21211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21213      fi
21214      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21215    fi
21216  fi
21217
21218  # Now new_path has a complete unix path to the binary
21219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21220    # Keep paths in /bin as-is, but remove trailing .exe if any
21221    new_path="${new_path/%.exe/}"
21222    # Do not save /bin paths to all_fixpath_prefixes!
21223  else
21224    # Not in mixed or Windows style, start by that.
21225    new_path=`cmd //c echo $new_path`
21226
21227  input_path="$new_path"
21228  # Check if we need to convert this using DOS-style short mode. If the path
21229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21230  # take no chances and rewrite it.
21231  # Note: m4 eats our [], so we need to use [ and ] instead.
21232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21233  if test "x$has_forbidden_chars" != x; then
21234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21236  fi
21237
21238    # Output is in $new_path
21239
21240  windows_path="$new_path"
21241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21242    unix_path=`$CYGPATH -u "$windows_path"`
21243    new_path="$unix_path"
21244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21246    new_path="$unix_path"
21247  fi
21248
21249    # remove trailing .exe if any
21250    new_path="${new_path/%.exe/}"
21251
21252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21254  fi
21255
21256  else
21257    # We're on a posix platform. Hooray! :)
21258    # First separate the path from the arguments. This will split at the first
21259    # space.
21260    complete="$AR"
21261    path="${complete%% *}"
21262    tmp="$complete EOL"
21263    arguments="${tmp#* }"
21264
21265    new_path=`$WHICH $path 2> /dev/null`
21266    if test "x$new_path" = x; then
21267      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21268      if test "x$is_absolute_path" != x; then
21269        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21270$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21271        new_path="$path"
21272      else
21273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21274$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21275        has_space=`$ECHO "$complete" | $GREP " "`
21276        if test "x$has_space" != x; then
21277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21279        fi
21280        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21281      fi
21282    fi
21283  fi
21284
21285  # Now join together the path and the arguments once again
21286  if test "x$arguments" != xEOL; then
21287      new_complete="$new_path ${arguments% *}"
21288  else
21289      new_complete="$new_path"
21290  fi
21291
21292  if test "x$complete" != "x$new_complete"; then
21293    AR="$new_complete"
21294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21295$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21296  fi
21297
21298fi
21299if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21300    ARFLAGS="-r"
21301else
21302    ARFLAGS=""
21303fi
21304
21305
21306# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21307HOTSPOT_CXX="$CXX"
21308HOTSPOT_LD="$LD"
21309
21310
21311
21312COMPILER_NAME=gcc
21313COMPILER_TYPE=CC
21314if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21315
21316    # For now, assume that we are always compiling using cl.exe.
21317    CC_OUT_OPTION=-Fo
21318    EXE_OUT_OPTION=-out:
21319    LD_OUT_OPTION=-out:
21320    AR_OUT_OPTION=-out:
21321    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21322    # program for something completely different.
21323    # Extract the first word of "link", so it can be a program name with args.
21324set dummy link; ac_word=$2
21325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21326$as_echo_n "checking for $ac_word... " >&6; }
21327if test "${ac_cv_prog_WINLD+set}" = set; then :
21328  $as_echo_n "(cached) " >&6
21329else
21330  if test -n "$WINLD"; then
21331  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21332else
21333  ac_prog_rejected=no
21334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21335for as_dir in $PATH
21336do
21337  IFS=$as_save_IFS
21338  test -z "$as_dir" && as_dir=.
21339    for ac_exec_ext in '' $ac_executable_extensions; do
21340  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21341    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21342       ac_prog_rejected=yes
21343       continue
21344     fi
21345    ac_cv_prog_WINLD="link"
21346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21347    break 2
21348  fi
21349done
21350  done
21351IFS=$as_save_IFS
21352
21353if test $ac_prog_rejected = yes; then
21354  # We found a bogon in the path, so make sure we never use it.
21355  set dummy $ac_cv_prog_WINLD
21356  shift
21357  if test $# != 0; then
21358    # We chose a different compiler from the bogus one.
21359    # However, it has the same basename, so the bogon will be chosen
21360    # first if we set WINLD to just the basename; use the full file name.
21361    shift
21362    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21363  fi
21364fi
21365fi
21366fi
21367WINLD=$ac_cv_prog_WINLD
21368if test -n "$WINLD"; then
21369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21370$as_echo "$WINLD" >&6; }
21371else
21372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21373$as_echo "no" >&6; }
21374fi
21375
21376
21377    # Since we must ignore the first found link, WINLD will contain
21378    # the full path to the link.exe program.
21379
21380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21381
21382  # First separate the path from the arguments. This will split at the first
21383  # space.
21384  complete="$WINLD"
21385  path="${complete%% *}"
21386  tmp="$complete EOL"
21387  arguments="${tmp#* }"
21388
21389  # Input might be given as Windows format, start by converting to
21390  # unix format.
21391  new_path=`$CYGPATH -u "$path"`
21392
21393  # Now try to locate executable using which
21394  new_path=`$WHICH "$new_path" 2> /dev/null`
21395  # bat and cmd files are not always considered executable in cygwin causing which
21396  # to not find them
21397  if test "x$new_path" = x \
21398           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21399           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21400    new_path=`$CYGPATH -u "$path"`
21401  fi
21402  if test "x$new_path" = x; then
21403    # Oops. Which didn't find the executable.
21404    # The splitting of arguments from the executable at a space might have been incorrect,
21405    # since paths with space are more likely in Windows. Give it another try with the whole
21406    # argument.
21407    path="$complete"
21408    arguments="EOL"
21409    new_path=`$CYGPATH -u "$path"`
21410    new_path=`$WHICH "$new_path" 2> /dev/null`
21411    # bat and cmd files are not always considered executable in cygwin causing which
21412    # to not find them
21413    if test "x$new_path" = x \
21414             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21415             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21416      new_path=`$CYGPATH -u "$path"`
21417    fi
21418    if test "x$new_path" = x; then
21419      # It's still not found. Now this is an unrecoverable error.
21420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21421$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21422      has_space=`$ECHO "$complete" | $GREP " "`
21423      if test "x$has_space" != x; then
21424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21426      fi
21427      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21428    fi
21429  fi
21430
21431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21434  # "foo.exe" is OK but "foo" is an error.
21435  #
21436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21437  # It is also a way to make sure we got the proper file name for the real test later on.
21438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21439  if test "x$test_shortpath" = x; then
21440    # Short path failed, file does not exist as specified.
21441    # Try adding .exe or .cmd
21442    if test -f "${new_path}.exe"; then
21443       input_to_shortpath="${new_path}.exe"
21444    elif test -f "${new_path}.cmd"; then
21445       input_to_shortpath="${new_path}.cmd"
21446    else
21447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21448$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21451      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21452    fi
21453  else
21454    input_to_shortpath="$new_path"
21455  fi
21456
21457  # Call helper function which possibly converts this using DOS-style short mode.
21458  # If so, the updated path is stored in $new_path.
21459  new_path="$input_to_shortpath"
21460
21461  input_path="$input_to_shortpath"
21462  # Check if we need to convert this using DOS-style short mode. If the path
21463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21464  # take no chances and rewrite it.
21465  # Note: m4 eats our [], so we need to use [ and ] instead.
21466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21467  if test "x$has_forbidden_chars" != x; then
21468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21472      # Going to short mode and back again did indeed matter. Since short mode is
21473      # case insensitive, let's make it lowercase to improve readability.
21474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21475      # Now convert it back to Unix-stile (cygpath)
21476      input_path=`$CYGPATH -u "$shortmode_path"`
21477      new_path="$input_path"
21478    fi
21479  fi
21480
21481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21482  if test "x$test_cygdrive_prefix" = x; then
21483    # As a simple fix, exclude /usr/bin since it's not a real path.
21484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21486      # a path prefixed by /cygdrive for fixpath to work.
21487      new_path="$CYGWIN_ROOT_PATH$input_path"
21488    fi
21489  fi
21490
21491  # remove trailing .exe if any
21492  new_path="${new_path/%.exe/}"
21493
21494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21495
21496  # First separate the path from the arguments. This will split at the first
21497  # space.
21498  complete="$WINLD"
21499  path="${complete%% *}"
21500  tmp="$complete EOL"
21501  arguments="${tmp#* }"
21502
21503  # Input might be given as Windows format, start by converting to
21504  # unix format.
21505  new_path="$path"
21506
21507  windows_path="$new_path"
21508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21509    unix_path=`$CYGPATH -u "$windows_path"`
21510    new_path="$unix_path"
21511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21513    new_path="$unix_path"
21514  fi
21515
21516
21517  # Now try to locate executable using which
21518  new_path=`$WHICH "$new_path" 2> /dev/null`
21519
21520  if test "x$new_path" = x; then
21521    # Oops. Which didn't find the executable.
21522    # The splitting of arguments from the executable at a space might have been incorrect,
21523    # since paths with space are more likely in Windows. Give it another try with the whole
21524    # argument.
21525    path="$complete"
21526    arguments="EOL"
21527    new_path="$path"
21528
21529  windows_path="$new_path"
21530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21531    unix_path=`$CYGPATH -u "$windows_path"`
21532    new_path="$unix_path"
21533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21535    new_path="$unix_path"
21536  fi
21537
21538
21539    new_path=`$WHICH "$new_path" 2> /dev/null`
21540
21541    if test "x$new_path" = x; then
21542      # It's still not found. Now this is an unrecoverable error.
21543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21544$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21545      has_space=`$ECHO "$complete" | $GREP " "`
21546      if test "x$has_space" != x; then
21547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21549      fi
21550      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21551    fi
21552  fi
21553
21554  # Now new_path has a complete unix path to the binary
21555  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21556    # Keep paths in /bin as-is, but remove trailing .exe if any
21557    new_path="${new_path/%.exe/}"
21558    # Do not save /bin paths to all_fixpath_prefixes!
21559  else
21560    # Not in mixed or Windows style, start by that.
21561    new_path=`cmd //c echo $new_path`
21562
21563  input_path="$new_path"
21564  # Check if we need to convert this using DOS-style short mode. If the path
21565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21566  # take no chances and rewrite it.
21567  # Note: m4 eats our [], so we need to use [ and ] instead.
21568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21569  if test "x$has_forbidden_chars" != x; then
21570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21572  fi
21573
21574    # Output is in $new_path
21575
21576  windows_path="$new_path"
21577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21578    unix_path=`$CYGPATH -u "$windows_path"`
21579    new_path="$unix_path"
21580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21582    new_path="$unix_path"
21583  fi
21584
21585    # remove trailing .exe if any
21586    new_path="${new_path/%.exe/}"
21587
21588    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21589    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21590  fi
21591
21592  else
21593    # We're on a posix platform. Hooray! :)
21594    # First separate the path from the arguments. This will split at the first
21595    # space.
21596    complete="$WINLD"
21597    path="${complete%% *}"
21598    tmp="$complete EOL"
21599    arguments="${tmp#* }"
21600
21601    new_path=`$WHICH $path 2> /dev/null`
21602    if test "x$new_path" = x; then
21603      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21604      if test "x$is_absolute_path" != x; then
21605        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21606$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21607        new_path="$path"
21608      else
21609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21610$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21611        has_space=`$ECHO "$complete" | $GREP " "`
21612        if test "x$has_space" != x; then
21613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21615        fi
21616        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21617      fi
21618    fi
21619  fi
21620
21621  # Now join together the path and the arguments once again
21622  if test "x$arguments" != xEOL; then
21623      new_complete="$new_path ${arguments% *}"
21624  else
21625      new_complete="$new_path"
21626  fi
21627
21628  if test "x$complete" != "x$new_complete"; then
21629    WINLD="$new_complete"
21630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21631$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21632  fi
21633
21634    printf "Windows linker was found at $WINLD\n"
21635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21636$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21637    "$WINLD" --version > /dev/null
21638    if test $? -eq 0 ; then
21639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21640$as_echo "no" >&6; }
21641      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21642    else
21643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21644$as_echo "yes" >&6; }
21645    fi
21646    LD="$WINLD"
21647    LDEXE="$WINLD"
21648    LDCXX="$WINLD"
21649    LDEXECXX="$WINLD"
21650
21651    # Extract the first word of "mt", so it can be a program name with args.
21652set dummy mt; 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_MT+set}" = set; then :
21656  $as_echo_n "(cached) " >&6
21657else
21658  if test -n "$MT"; then
21659  ac_cv_prog_MT="$MT" # Let the user override the test.
21660else
21661  ac_prog_rejected=no
21662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21663for as_dir in $PATH
21664do
21665  IFS=$as_save_IFS
21666  test -z "$as_dir" && as_dir=.
21667    for ac_exec_ext in '' $ac_executable_extensions; do
21668  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21669    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21670       ac_prog_rejected=yes
21671       continue
21672     fi
21673    ac_cv_prog_MT="mt"
21674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21675    break 2
21676  fi
21677done
21678  done
21679IFS=$as_save_IFS
21680
21681if test $ac_prog_rejected = yes; then
21682  # We found a bogon in the path, so make sure we never use it.
21683  set dummy $ac_cv_prog_MT
21684  shift
21685  if test $# != 0; then
21686    # We chose a different compiler from the bogus one.
21687    # However, it has the same basename, so the bogon will be chosen
21688    # first if we set MT to just the basename; use the full file name.
21689    shift
21690    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21691  fi
21692fi
21693fi
21694fi
21695MT=$ac_cv_prog_MT
21696if test -n "$MT"; then
21697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21698$as_echo "$MT" >&6; }
21699else
21700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21701$as_echo "no" >&6; }
21702fi
21703
21704
21705
21706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21707
21708  # First separate the path from the arguments. This will split at the first
21709  # space.
21710  complete="$MT"
21711  path="${complete%% *}"
21712  tmp="$complete EOL"
21713  arguments="${tmp#* }"
21714
21715  # Input might be given as Windows format, start by converting to
21716  # unix format.
21717  new_path=`$CYGPATH -u "$path"`
21718
21719  # Now try to locate executable using which
21720  new_path=`$WHICH "$new_path" 2> /dev/null`
21721  # bat and cmd files are not always considered executable in cygwin causing which
21722  # to not find them
21723  if test "x$new_path" = x \
21724           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21725           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21726    new_path=`$CYGPATH -u "$path"`
21727  fi
21728  if test "x$new_path" = x; then
21729    # Oops. Which didn't find the executable.
21730    # The splitting of arguments from the executable at a space might have been incorrect,
21731    # since paths with space are more likely in Windows. Give it another try with the whole
21732    # argument.
21733    path="$complete"
21734    arguments="EOL"
21735    new_path=`$CYGPATH -u "$path"`
21736    new_path=`$WHICH "$new_path" 2> /dev/null`
21737    # bat and cmd files are not always considered executable in cygwin causing which
21738    # to not find them
21739    if test "x$new_path" = x \
21740             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21741             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21742      new_path=`$CYGPATH -u "$path"`
21743    fi
21744    if test "x$new_path" = x; then
21745      # It's still not found. Now this is an unrecoverable error.
21746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21747$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21748      has_space=`$ECHO "$complete" | $GREP " "`
21749      if test "x$has_space" != x; then
21750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21752      fi
21753      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21754    fi
21755  fi
21756
21757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21760  # "foo.exe" is OK but "foo" is an error.
21761  #
21762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21763  # It is also a way to make sure we got the proper file name for the real test later on.
21764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21765  if test "x$test_shortpath" = x; then
21766    # Short path failed, file does not exist as specified.
21767    # Try adding .exe or .cmd
21768    if test -f "${new_path}.exe"; then
21769       input_to_shortpath="${new_path}.exe"
21770    elif test -f "${new_path}.cmd"; then
21771       input_to_shortpath="${new_path}.cmd"
21772    else
21773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21774$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21777      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21778    fi
21779  else
21780    input_to_shortpath="$new_path"
21781  fi
21782
21783  # Call helper function which possibly converts this using DOS-style short mode.
21784  # If so, the updated path is stored in $new_path.
21785  new_path="$input_to_shortpath"
21786
21787  input_path="$input_to_shortpath"
21788  # Check if we need to convert this using DOS-style short mode. If the path
21789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21790  # take no chances and rewrite it.
21791  # Note: m4 eats our [], so we need to use [ and ] instead.
21792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21793  if test "x$has_forbidden_chars" != x; then
21794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21798      # Going to short mode and back again did indeed matter. Since short mode is
21799      # case insensitive, let's make it lowercase to improve readability.
21800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21801      # Now convert it back to Unix-stile (cygpath)
21802      input_path=`$CYGPATH -u "$shortmode_path"`
21803      new_path="$input_path"
21804    fi
21805  fi
21806
21807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21808  if test "x$test_cygdrive_prefix" = x; then
21809    # As a simple fix, exclude /usr/bin since it's not a real path.
21810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21812      # a path prefixed by /cygdrive for fixpath to work.
21813      new_path="$CYGWIN_ROOT_PATH$input_path"
21814    fi
21815  fi
21816
21817  # remove trailing .exe if any
21818  new_path="${new_path/%.exe/}"
21819
21820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21821
21822  # First separate the path from the arguments. This will split at the first
21823  # space.
21824  complete="$MT"
21825  path="${complete%% *}"
21826  tmp="$complete EOL"
21827  arguments="${tmp#* }"
21828
21829  # Input might be given as Windows format, start by converting to
21830  # unix format.
21831  new_path="$path"
21832
21833  windows_path="$new_path"
21834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21835    unix_path=`$CYGPATH -u "$windows_path"`
21836    new_path="$unix_path"
21837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21839    new_path="$unix_path"
21840  fi
21841
21842
21843  # Now try to locate executable using which
21844  new_path=`$WHICH "$new_path" 2> /dev/null`
21845
21846  if test "x$new_path" = x; then
21847    # Oops. Which didn't find the executable.
21848    # The splitting of arguments from the executable at a space might have been incorrect,
21849    # since paths with space are more likely in Windows. Give it another try with the whole
21850    # argument.
21851    path="$complete"
21852    arguments="EOL"
21853    new_path="$path"
21854
21855  windows_path="$new_path"
21856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21857    unix_path=`$CYGPATH -u "$windows_path"`
21858    new_path="$unix_path"
21859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21861    new_path="$unix_path"
21862  fi
21863
21864
21865    new_path=`$WHICH "$new_path" 2> /dev/null`
21866
21867    if test "x$new_path" = x; then
21868      # It's still not found. Now this is an unrecoverable error.
21869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21870$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21871      has_space=`$ECHO "$complete" | $GREP " "`
21872      if test "x$has_space" != x; then
21873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21875      fi
21876      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21877    fi
21878  fi
21879
21880  # Now new_path has a complete unix path to the binary
21881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21882    # Keep paths in /bin as-is, but remove trailing .exe if any
21883    new_path="${new_path/%.exe/}"
21884    # Do not save /bin paths to all_fixpath_prefixes!
21885  else
21886    # Not in mixed or Windows style, start by that.
21887    new_path=`cmd //c echo $new_path`
21888
21889  input_path="$new_path"
21890  # Check if we need to convert this using DOS-style short mode. If the path
21891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21892  # take no chances and rewrite it.
21893  # Note: m4 eats our [], so we need to use [ and ] instead.
21894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21895  if test "x$has_forbidden_chars" != x; then
21896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21898  fi
21899
21900    # Output is in $new_path
21901
21902  windows_path="$new_path"
21903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21904    unix_path=`$CYGPATH -u "$windows_path"`
21905    new_path="$unix_path"
21906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21908    new_path="$unix_path"
21909  fi
21910
21911    # remove trailing .exe if any
21912    new_path="${new_path/%.exe/}"
21913
21914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21916  fi
21917
21918  else
21919    # We're on a posix platform. Hooray! :)
21920    # First separate the path from the arguments. This will split at the first
21921    # space.
21922    complete="$MT"
21923    path="${complete%% *}"
21924    tmp="$complete EOL"
21925    arguments="${tmp#* }"
21926
21927    new_path=`$WHICH $path 2> /dev/null`
21928    if test "x$new_path" = x; then
21929      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21930      if test "x$is_absolute_path" != x; then
21931        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
21932$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
21933        new_path="$path"
21934      else
21935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21936$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21937        has_space=`$ECHO "$complete" | $GREP " "`
21938        if test "x$has_space" != x; then
21939          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21941        fi
21942        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21943      fi
21944    fi
21945  fi
21946
21947  # Now join together the path and the arguments once again
21948  if test "x$arguments" != xEOL; then
21949      new_complete="$new_path ${arguments% *}"
21950  else
21951      new_complete="$new_path"
21952  fi
21953
21954  if test "x$complete" != "x$new_complete"; then
21955    MT="$new_complete"
21956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
21957$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
21958  fi
21959
21960    # The resource compiler
21961    # Extract the first word of "rc", so it can be a program name with args.
21962set dummy rc; ac_word=$2
21963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21964$as_echo_n "checking for $ac_word... " >&6; }
21965if test "${ac_cv_prog_RC+set}" = set; then :
21966  $as_echo_n "(cached) " >&6
21967else
21968  if test -n "$RC"; then
21969  ac_cv_prog_RC="$RC" # Let the user override the test.
21970else
21971  ac_prog_rejected=no
21972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21973for as_dir in $PATH
21974do
21975  IFS=$as_save_IFS
21976  test -z "$as_dir" && as_dir=.
21977    for ac_exec_ext in '' $ac_executable_extensions; do
21978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21979    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
21980       ac_prog_rejected=yes
21981       continue
21982     fi
21983    ac_cv_prog_RC="rc"
21984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21985    break 2
21986  fi
21987done
21988  done
21989IFS=$as_save_IFS
21990
21991if test $ac_prog_rejected = yes; then
21992  # We found a bogon in the path, so make sure we never use it.
21993  set dummy $ac_cv_prog_RC
21994  shift
21995  if test $# != 0; then
21996    # We chose a different compiler from the bogus one.
21997    # However, it has the same basename, so the bogon will be chosen
21998    # first if we set RC to just the basename; use the full file name.
21999    shift
22000    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22001  fi
22002fi
22003fi
22004fi
22005RC=$ac_cv_prog_RC
22006if test -n "$RC"; then
22007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22008$as_echo "$RC" >&6; }
22009else
22010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22011$as_echo "no" >&6; }
22012fi
22013
22014
22015
22016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22017
22018  # First separate the path from the arguments. This will split at the first
22019  # space.
22020  complete="$RC"
22021  path="${complete%% *}"
22022  tmp="$complete EOL"
22023  arguments="${tmp#* }"
22024
22025  # Input might be given as Windows format, start by converting to
22026  # unix format.
22027  new_path=`$CYGPATH -u "$path"`
22028
22029  # Now try to locate executable using which
22030  new_path=`$WHICH "$new_path" 2> /dev/null`
22031  # bat and cmd files are not always considered executable in cygwin causing which
22032  # to not find them
22033  if test "x$new_path" = x \
22034           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22035           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22036    new_path=`$CYGPATH -u "$path"`
22037  fi
22038  if test "x$new_path" = x; then
22039    # Oops. Which didn't find the executable.
22040    # The splitting of arguments from the executable at a space might have been incorrect,
22041    # since paths with space are more likely in Windows. Give it another try with the whole
22042    # argument.
22043    path="$complete"
22044    arguments="EOL"
22045    new_path=`$CYGPATH -u "$path"`
22046    new_path=`$WHICH "$new_path" 2> /dev/null`
22047    # bat and cmd files are not always considered executable in cygwin causing which
22048    # to not find them
22049    if test "x$new_path" = x \
22050             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22051             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22052      new_path=`$CYGPATH -u "$path"`
22053    fi
22054    if test "x$new_path" = x; then
22055      # It's still not found. Now this is an unrecoverable error.
22056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22057$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22058      has_space=`$ECHO "$complete" | $GREP " "`
22059      if test "x$has_space" != x; then
22060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22062      fi
22063      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22064    fi
22065  fi
22066
22067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22070  # "foo.exe" is OK but "foo" is an error.
22071  #
22072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22073  # It is also a way to make sure we got the proper file name for the real test later on.
22074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22075  if test "x$test_shortpath" = x; then
22076    # Short path failed, file does not exist as specified.
22077    # Try adding .exe or .cmd
22078    if test -f "${new_path}.exe"; then
22079       input_to_shortpath="${new_path}.exe"
22080    elif test -f "${new_path}.cmd"; then
22081       input_to_shortpath="${new_path}.cmd"
22082    else
22083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22084$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22087      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22088    fi
22089  else
22090    input_to_shortpath="$new_path"
22091  fi
22092
22093  # Call helper function which possibly converts this using DOS-style short mode.
22094  # If so, the updated path is stored in $new_path.
22095  new_path="$input_to_shortpath"
22096
22097  input_path="$input_to_shortpath"
22098  # Check if we need to convert this using DOS-style short mode. If the path
22099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22100  # take no chances and rewrite it.
22101  # Note: m4 eats our [], so we need to use [ and ] instead.
22102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22103  if test "x$has_forbidden_chars" != x; then
22104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22108      # Going to short mode and back again did indeed matter. Since short mode is
22109      # case insensitive, let's make it lowercase to improve readability.
22110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22111      # Now convert it back to Unix-stile (cygpath)
22112      input_path=`$CYGPATH -u "$shortmode_path"`
22113      new_path="$input_path"
22114    fi
22115  fi
22116
22117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22118  if test "x$test_cygdrive_prefix" = x; then
22119    # As a simple fix, exclude /usr/bin since it's not a real path.
22120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22122      # a path prefixed by /cygdrive for fixpath to work.
22123      new_path="$CYGWIN_ROOT_PATH$input_path"
22124    fi
22125  fi
22126
22127  # remove trailing .exe if any
22128  new_path="${new_path/%.exe/}"
22129
22130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22131
22132  # First separate the path from the arguments. This will split at the first
22133  # space.
22134  complete="$RC"
22135  path="${complete%% *}"
22136  tmp="$complete EOL"
22137  arguments="${tmp#* }"
22138
22139  # Input might be given as Windows format, start by converting to
22140  # unix format.
22141  new_path="$path"
22142
22143  windows_path="$new_path"
22144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22145    unix_path=`$CYGPATH -u "$windows_path"`
22146    new_path="$unix_path"
22147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22149    new_path="$unix_path"
22150  fi
22151
22152
22153  # Now try to locate executable using which
22154  new_path=`$WHICH "$new_path" 2> /dev/null`
22155
22156  if test "x$new_path" = x; then
22157    # Oops. Which didn't find the executable.
22158    # The splitting of arguments from the executable at a space might have been incorrect,
22159    # since paths with space are more likely in Windows. Give it another try with the whole
22160    # argument.
22161    path="$complete"
22162    arguments="EOL"
22163    new_path="$path"
22164
22165  windows_path="$new_path"
22166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22167    unix_path=`$CYGPATH -u "$windows_path"`
22168    new_path="$unix_path"
22169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22171    new_path="$unix_path"
22172  fi
22173
22174
22175    new_path=`$WHICH "$new_path" 2> /dev/null`
22176
22177    if test "x$new_path" = x; then
22178      # It's still not found. Now this is an unrecoverable error.
22179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22180$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22181      has_space=`$ECHO "$complete" | $GREP " "`
22182      if test "x$has_space" != x; then
22183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22185      fi
22186      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22187    fi
22188  fi
22189
22190  # Now new_path has a complete unix path to the binary
22191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22192    # Keep paths in /bin as-is, but remove trailing .exe if any
22193    new_path="${new_path/%.exe/}"
22194    # Do not save /bin paths to all_fixpath_prefixes!
22195  else
22196    # Not in mixed or Windows style, start by that.
22197    new_path=`cmd //c echo $new_path`
22198
22199  input_path="$new_path"
22200  # Check if we need to convert this using DOS-style short mode. If the path
22201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22202  # take no chances and rewrite it.
22203  # Note: m4 eats our [], so we need to use [ and ] instead.
22204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22205  if test "x$has_forbidden_chars" != x; then
22206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22208  fi
22209
22210    # Output is in $new_path
22211
22212  windows_path="$new_path"
22213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22214    unix_path=`$CYGPATH -u "$windows_path"`
22215    new_path="$unix_path"
22216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22218    new_path="$unix_path"
22219  fi
22220
22221    # remove trailing .exe if any
22222    new_path="${new_path/%.exe/}"
22223
22224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22226  fi
22227
22228  else
22229    # We're on a posix platform. Hooray! :)
22230    # First separate the path from the arguments. This will split at the first
22231    # space.
22232    complete="$RC"
22233    path="${complete%% *}"
22234    tmp="$complete EOL"
22235    arguments="${tmp#* }"
22236
22237    new_path=`$WHICH $path 2> /dev/null`
22238    if test "x$new_path" = x; then
22239      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22240      if test "x$is_absolute_path" != x; then
22241        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22242$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22243        new_path="$path"
22244      else
22245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22246$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22247        has_space=`$ECHO "$complete" | $GREP " "`
22248        if test "x$has_space" != x; then
22249          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22250$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22251        fi
22252        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22253      fi
22254    fi
22255  fi
22256
22257  # Now join together the path and the arguments once again
22258  if test "x$arguments" != xEOL; then
22259      new_complete="$new_path ${arguments% *}"
22260  else
22261      new_complete="$new_path"
22262  fi
22263
22264  if test "x$complete" != "x$new_complete"; then
22265    RC="$new_complete"
22266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22267$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22268  fi
22269
22270
22271    # For hotspot, we need these in Windows mixed path,
22272    # so rewrite them all. Need added .exe suffix.
22273    HOTSPOT_CXX="$CXX.exe"
22274    HOTSPOT_LD="$LD.exe"
22275    HOTSPOT_MT="$MT.exe"
22276    HOTSPOT_RC="$RC.exe"
22277
22278  unix_path="$HOTSPOT_CXX"
22279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22280    windows_path=`$CYGPATH -m "$unix_path"`
22281    HOTSPOT_CXX="$windows_path"
22282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22283    windows_path=`cmd //c echo $unix_path`
22284    HOTSPOT_CXX="$windows_path"
22285  fi
22286
22287
22288  unix_path="$HOTSPOT_LD"
22289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22290    windows_path=`$CYGPATH -m "$unix_path"`
22291    HOTSPOT_LD="$windows_path"
22292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22293    windows_path=`cmd //c echo $unix_path`
22294    HOTSPOT_LD="$windows_path"
22295  fi
22296
22297
22298  unix_path="$HOTSPOT_MT"
22299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22300    windows_path=`$CYGPATH -m "$unix_path"`
22301    HOTSPOT_MT="$windows_path"
22302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22303    windows_path=`cmd //c echo $unix_path`
22304    HOTSPOT_MT="$windows_path"
22305  fi
22306
22307
22308  unix_path="$HOTSPOT_RC"
22309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22310    windows_path=`$CYGPATH -m "$unix_path"`
22311    HOTSPOT_RC="$windows_path"
22312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22313    windows_path=`cmd //c echo $unix_path`
22314    HOTSPOT_RC="$windows_path"
22315  fi
22316
22317
22318
22319
22320    RC_FLAGS="-nologo -l 0x409 -r"
22321    if test "x$VARIANT" = xOPT; then :
22322
22323        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22324
22325fi
22326    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22327    if test "x$JDK_UPDATE_VERSION" = x; then :
22328
22329        JDK_UPDATE_VERSION_NOTNULL=0
22330
22331fi
22332    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22333    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22334    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22335    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22336    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22337    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22338    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22339
22340    # lib.exe is used to create static libraries.
22341    # Extract the first word of "lib", so it can be a program name with args.
22342set dummy lib; ac_word=$2
22343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22344$as_echo_n "checking for $ac_word... " >&6; }
22345if test "${ac_cv_prog_WINAR+set}" = set; then :
22346  $as_echo_n "(cached) " >&6
22347else
22348  if test -n "$WINAR"; then
22349  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22350else
22351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22352for as_dir in $PATH
22353do
22354  IFS=$as_save_IFS
22355  test -z "$as_dir" && as_dir=.
22356    for ac_exec_ext in '' $ac_executable_extensions; do
22357  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22358    ac_cv_prog_WINAR="lib"
22359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22360    break 2
22361  fi
22362done
22363  done
22364IFS=$as_save_IFS
22365
22366fi
22367fi
22368WINAR=$ac_cv_prog_WINAR
22369if test -n "$WINAR"; then
22370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22371$as_echo "$WINAR" >&6; }
22372else
22373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22374$as_echo "no" >&6; }
22375fi
22376
22377
22378
22379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22380
22381  # First separate the path from the arguments. This will split at the first
22382  # space.
22383  complete="$WINAR"
22384  path="${complete%% *}"
22385  tmp="$complete EOL"
22386  arguments="${tmp#* }"
22387
22388  # Input might be given as Windows format, start by converting to
22389  # unix format.
22390  new_path=`$CYGPATH -u "$path"`
22391
22392  # Now try to locate executable using which
22393  new_path=`$WHICH "$new_path" 2> /dev/null`
22394  # bat and cmd files are not always considered executable in cygwin causing which
22395  # to not find them
22396  if test "x$new_path" = x \
22397           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22398           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22399    new_path=`$CYGPATH -u "$path"`
22400  fi
22401  if test "x$new_path" = x; then
22402    # Oops. Which didn't find the executable.
22403    # The splitting of arguments from the executable at a space might have been incorrect,
22404    # since paths with space are more likely in Windows. Give it another try with the whole
22405    # argument.
22406    path="$complete"
22407    arguments="EOL"
22408    new_path=`$CYGPATH -u "$path"`
22409    new_path=`$WHICH "$new_path" 2> /dev/null`
22410    # bat and cmd files are not always considered executable in cygwin causing which
22411    # to not find them
22412    if test "x$new_path" = x \
22413             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22414             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22415      new_path=`$CYGPATH -u "$path"`
22416    fi
22417    if test "x$new_path" = x; then
22418      # It's still not found. Now this is an unrecoverable error.
22419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22420$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22421      has_space=`$ECHO "$complete" | $GREP " "`
22422      if test "x$has_space" != x; then
22423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22425      fi
22426      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22427    fi
22428  fi
22429
22430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22433  # "foo.exe" is OK but "foo" is an error.
22434  #
22435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22436  # It is also a way to make sure we got the proper file name for the real test later on.
22437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22438  if test "x$test_shortpath" = x; then
22439    # Short path failed, file does not exist as specified.
22440    # Try adding .exe or .cmd
22441    if test -f "${new_path}.exe"; then
22442       input_to_shortpath="${new_path}.exe"
22443    elif test -f "${new_path}.cmd"; then
22444       input_to_shortpath="${new_path}.cmd"
22445    else
22446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22447$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22448      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22449$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22450      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22451    fi
22452  else
22453    input_to_shortpath="$new_path"
22454  fi
22455
22456  # Call helper function which possibly converts this using DOS-style short mode.
22457  # If so, the updated path is stored in $new_path.
22458  new_path="$input_to_shortpath"
22459
22460  input_path="$input_to_shortpath"
22461  # Check if we need to convert this using DOS-style short mode. If the path
22462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22463  # take no chances and rewrite it.
22464  # Note: m4 eats our [], so we need to use [ and ] instead.
22465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22466  if test "x$has_forbidden_chars" != x; then
22467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22471      # Going to short mode and back again did indeed matter. Since short mode is
22472      # case insensitive, let's make it lowercase to improve readability.
22473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22474      # Now convert it back to Unix-stile (cygpath)
22475      input_path=`$CYGPATH -u "$shortmode_path"`
22476      new_path="$input_path"
22477    fi
22478  fi
22479
22480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22481  if test "x$test_cygdrive_prefix" = x; then
22482    # As a simple fix, exclude /usr/bin since it's not a real path.
22483    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22485      # a path prefixed by /cygdrive for fixpath to work.
22486      new_path="$CYGWIN_ROOT_PATH$input_path"
22487    fi
22488  fi
22489
22490  # remove trailing .exe if any
22491  new_path="${new_path/%.exe/}"
22492
22493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22494
22495  # First separate the path from the arguments. This will split at the first
22496  # space.
22497  complete="$WINAR"
22498  path="${complete%% *}"
22499  tmp="$complete EOL"
22500  arguments="${tmp#* }"
22501
22502  # Input might be given as Windows format, start by converting to
22503  # unix format.
22504  new_path="$path"
22505
22506  windows_path="$new_path"
22507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22508    unix_path=`$CYGPATH -u "$windows_path"`
22509    new_path="$unix_path"
22510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22512    new_path="$unix_path"
22513  fi
22514
22515
22516  # Now try to locate executable using which
22517  new_path=`$WHICH "$new_path" 2> /dev/null`
22518
22519  if test "x$new_path" = x; then
22520    # Oops. Which didn't find the executable.
22521    # The splitting of arguments from the executable at a space might have been incorrect,
22522    # since paths with space are more likely in Windows. Give it another try with the whole
22523    # argument.
22524    path="$complete"
22525    arguments="EOL"
22526    new_path="$path"
22527
22528  windows_path="$new_path"
22529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22530    unix_path=`$CYGPATH -u "$windows_path"`
22531    new_path="$unix_path"
22532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22534    new_path="$unix_path"
22535  fi
22536
22537
22538    new_path=`$WHICH "$new_path" 2> /dev/null`
22539
22540    if test "x$new_path" = x; then
22541      # It's still not found. Now this is an unrecoverable error.
22542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22543$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22544      has_space=`$ECHO "$complete" | $GREP " "`
22545      if test "x$has_space" != x; then
22546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22548      fi
22549      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22550    fi
22551  fi
22552
22553  # Now new_path has a complete unix path to the binary
22554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22555    # Keep paths in /bin as-is, but remove trailing .exe if any
22556    new_path="${new_path/%.exe/}"
22557    # Do not save /bin paths to all_fixpath_prefixes!
22558  else
22559    # Not in mixed or Windows style, start by that.
22560    new_path=`cmd //c echo $new_path`
22561
22562  input_path="$new_path"
22563  # Check if we need to convert this using DOS-style short mode. If the path
22564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22565  # take no chances and rewrite it.
22566  # Note: m4 eats our [], so we need to use [ and ] instead.
22567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22568  if test "x$has_forbidden_chars" != x; then
22569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22571  fi
22572
22573    # Output is in $new_path
22574
22575  windows_path="$new_path"
22576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22577    unix_path=`$CYGPATH -u "$windows_path"`
22578    new_path="$unix_path"
22579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22581    new_path="$unix_path"
22582  fi
22583
22584    # remove trailing .exe if any
22585    new_path="${new_path/%.exe/}"
22586
22587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22589  fi
22590
22591  else
22592    # We're on a posix platform. Hooray! :)
22593    # First separate the path from the arguments. This will split at the first
22594    # space.
22595    complete="$WINAR"
22596    path="${complete%% *}"
22597    tmp="$complete EOL"
22598    arguments="${tmp#* }"
22599
22600    new_path=`$WHICH $path 2> /dev/null`
22601    if test "x$new_path" = x; then
22602      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22603      if test "x$is_absolute_path" != x; then
22604        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22605$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22606        new_path="$path"
22607      else
22608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22609$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22610        has_space=`$ECHO "$complete" | $GREP " "`
22611        if test "x$has_space" != x; then
22612          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22613$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22614        fi
22615        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22616      fi
22617    fi
22618  fi
22619
22620  # Now join together the path and the arguments once again
22621  if test "x$arguments" != xEOL; then
22622      new_complete="$new_path ${arguments% *}"
22623  else
22624      new_complete="$new_path"
22625  fi
22626
22627  if test "x$complete" != "x$new_complete"; then
22628    WINAR="$new_complete"
22629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22630$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22631  fi
22632
22633    AR="$WINAR"
22634    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22635
22636    # Extract the first word of "dumpbin", so it can be a program name with args.
22637set dummy dumpbin; ac_word=$2
22638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22639$as_echo_n "checking for $ac_word... " >&6; }
22640if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22641  $as_echo_n "(cached) " >&6
22642else
22643  if test -n "$DUMPBIN"; then
22644  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22645else
22646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22647for as_dir in $PATH
22648do
22649  IFS=$as_save_IFS
22650  test -z "$as_dir" && as_dir=.
22651    for ac_exec_ext in '' $ac_executable_extensions; do
22652  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22653    ac_cv_prog_DUMPBIN="dumpbin"
22654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22655    break 2
22656  fi
22657done
22658  done
22659IFS=$as_save_IFS
22660
22661fi
22662fi
22663DUMPBIN=$ac_cv_prog_DUMPBIN
22664if test -n "$DUMPBIN"; then
22665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22666$as_echo "$DUMPBIN" >&6; }
22667else
22668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22669$as_echo "no" >&6; }
22670fi
22671
22672
22673
22674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22675
22676  # First separate the path from the arguments. This will split at the first
22677  # space.
22678  complete="$DUMPBIN"
22679  path="${complete%% *}"
22680  tmp="$complete EOL"
22681  arguments="${tmp#* }"
22682
22683  # Input might be given as Windows format, start by converting to
22684  # unix format.
22685  new_path=`$CYGPATH -u "$path"`
22686
22687  # Now try to locate executable using which
22688  new_path=`$WHICH "$new_path" 2> /dev/null`
22689  # bat and cmd files are not always considered executable in cygwin causing which
22690  # to not find them
22691  if test "x$new_path" = x \
22692           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22693           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22694    new_path=`$CYGPATH -u "$path"`
22695  fi
22696  if test "x$new_path" = x; then
22697    # Oops. Which didn't find the executable.
22698    # The splitting of arguments from the executable at a space might have been incorrect,
22699    # since paths with space are more likely in Windows. Give it another try with the whole
22700    # argument.
22701    path="$complete"
22702    arguments="EOL"
22703    new_path=`$CYGPATH -u "$path"`
22704    new_path=`$WHICH "$new_path" 2> /dev/null`
22705    # bat and cmd files are not always considered executable in cygwin causing which
22706    # to not find them
22707    if test "x$new_path" = x \
22708             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22709             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22710      new_path=`$CYGPATH -u "$path"`
22711    fi
22712    if test "x$new_path" = x; then
22713      # It's still not found. Now this is an unrecoverable error.
22714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22715$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22716      has_space=`$ECHO "$complete" | $GREP " "`
22717      if test "x$has_space" != x; then
22718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22720      fi
22721      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22722    fi
22723  fi
22724
22725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22728  # "foo.exe" is OK but "foo" is an error.
22729  #
22730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22731  # It is also a way to make sure we got the proper file name for the real test later on.
22732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22733  if test "x$test_shortpath" = x; then
22734    # Short path failed, file does not exist as specified.
22735    # Try adding .exe or .cmd
22736    if test -f "${new_path}.exe"; then
22737       input_to_shortpath="${new_path}.exe"
22738    elif test -f "${new_path}.cmd"; then
22739       input_to_shortpath="${new_path}.cmd"
22740    else
22741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22742$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22745      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22746    fi
22747  else
22748    input_to_shortpath="$new_path"
22749  fi
22750
22751  # Call helper function which possibly converts this using DOS-style short mode.
22752  # If so, the updated path is stored in $new_path.
22753  new_path="$input_to_shortpath"
22754
22755  input_path="$input_to_shortpath"
22756  # Check if we need to convert this using DOS-style short mode. If the path
22757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22758  # take no chances and rewrite it.
22759  # Note: m4 eats our [], so we need to use [ and ] instead.
22760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22761  if test "x$has_forbidden_chars" != x; then
22762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22766      # Going to short mode and back again did indeed matter. Since short mode is
22767      # case insensitive, let's make it lowercase to improve readability.
22768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22769      # Now convert it back to Unix-stile (cygpath)
22770      input_path=`$CYGPATH -u "$shortmode_path"`
22771      new_path="$input_path"
22772    fi
22773  fi
22774
22775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22776  if test "x$test_cygdrive_prefix" = x; then
22777    # As a simple fix, exclude /usr/bin since it's not a real path.
22778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22780      # a path prefixed by /cygdrive for fixpath to work.
22781      new_path="$CYGWIN_ROOT_PATH$input_path"
22782    fi
22783  fi
22784
22785  # remove trailing .exe if any
22786  new_path="${new_path/%.exe/}"
22787
22788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22789
22790  # First separate the path from the arguments. This will split at the first
22791  # space.
22792  complete="$DUMPBIN"
22793  path="${complete%% *}"
22794  tmp="$complete EOL"
22795  arguments="${tmp#* }"
22796
22797  # Input might be given as Windows format, start by converting to
22798  # unix format.
22799  new_path="$path"
22800
22801  windows_path="$new_path"
22802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22803    unix_path=`$CYGPATH -u "$windows_path"`
22804    new_path="$unix_path"
22805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22807    new_path="$unix_path"
22808  fi
22809
22810
22811  # Now try to locate executable using which
22812  new_path=`$WHICH "$new_path" 2> /dev/null`
22813
22814  if test "x$new_path" = x; then
22815    # Oops. Which didn't find the executable.
22816    # The splitting of arguments from the executable at a space might have been incorrect,
22817    # since paths with space are more likely in Windows. Give it another try with the whole
22818    # argument.
22819    path="$complete"
22820    arguments="EOL"
22821    new_path="$path"
22822
22823  windows_path="$new_path"
22824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22825    unix_path=`$CYGPATH -u "$windows_path"`
22826    new_path="$unix_path"
22827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22829    new_path="$unix_path"
22830  fi
22831
22832
22833    new_path=`$WHICH "$new_path" 2> /dev/null`
22834
22835    if test "x$new_path" = x; then
22836      # It's still not found. Now this is an unrecoverable error.
22837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22838$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22839      has_space=`$ECHO "$complete" | $GREP " "`
22840      if test "x$has_space" != x; then
22841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22843      fi
22844      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22845    fi
22846  fi
22847
22848  # Now new_path has a complete unix path to the binary
22849  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22850    # Keep paths in /bin as-is, but remove trailing .exe if any
22851    new_path="${new_path/%.exe/}"
22852    # Do not save /bin paths to all_fixpath_prefixes!
22853  else
22854    # Not in mixed or Windows style, start by that.
22855    new_path=`cmd //c echo $new_path`
22856
22857  input_path="$new_path"
22858  # Check if we need to convert this using DOS-style short mode. If the path
22859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22860  # take no chances and rewrite it.
22861  # Note: m4 eats our [], so we need to use [ and ] instead.
22862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22863  if test "x$has_forbidden_chars" != x; then
22864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22866  fi
22867
22868    # Output is in $new_path
22869
22870  windows_path="$new_path"
22871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22872    unix_path=`$CYGPATH -u "$windows_path"`
22873    new_path="$unix_path"
22874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22876    new_path="$unix_path"
22877  fi
22878
22879    # remove trailing .exe if any
22880    new_path="${new_path/%.exe/}"
22881
22882    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22883    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22884  fi
22885
22886  else
22887    # We're on a posix platform. Hooray! :)
22888    # First separate the path from the arguments. This will split at the first
22889    # space.
22890    complete="$DUMPBIN"
22891    path="${complete%% *}"
22892    tmp="$complete EOL"
22893    arguments="${tmp#* }"
22894
22895    new_path=`$WHICH $path 2> /dev/null`
22896    if test "x$new_path" = x; then
22897      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22898      if test "x$is_absolute_path" != x; then
22899        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
22900$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
22901        new_path="$path"
22902      else
22903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22904$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22905        has_space=`$ECHO "$complete" | $GREP " "`
22906        if test "x$has_space" != x; then
22907          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22909        fi
22910        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22911      fi
22912    fi
22913  fi
22914
22915  # Now join together the path and the arguments once again
22916  if test "x$arguments" != xEOL; then
22917      new_complete="$new_path ${arguments% *}"
22918  else
22919      new_complete="$new_path"
22920  fi
22921
22922  if test "x$complete" != "x$new_complete"; then
22923    DUMPBIN="$new_complete"
22924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
22925$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
22926  fi
22927
22928
22929    COMPILER_TYPE=CL
22930    CCXXFLAGS="$CCXXFLAGS -nologo"
22931
22932fi
22933
22934
22935
22936ac_ext=c
22937ac_cpp='$CPP $CPPFLAGS'
22938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22940ac_compiler_gnu=$ac_cv_c_compiler_gnu
22941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
22942$as_echo_n "checking how to run the C preprocessor... " >&6; }
22943# On Suns, sometimes $CPP names a directory.
22944if test -n "$CPP" && test -d "$CPP"; then
22945  CPP=
22946fi
22947if test -z "$CPP"; then
22948  if test "${ac_cv_prog_CPP+set}" = set; then :
22949  $as_echo_n "(cached) " >&6
22950else
22951      # Double quotes because CPP needs to be expanded
22952    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
22953    do
22954      ac_preproc_ok=false
22955for ac_c_preproc_warn_flag in '' yes
22956do
22957  # Use a header file that comes with gcc, so configuring glibc
22958  # with a fresh cross-compiler works.
22959  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22960  # <limits.h> exists even on freestanding compilers.
22961  # On the NeXT, cc -E runs the code through the compiler's parser,
22962  # not just through cpp. "Syntax error" is here to catch this case.
22963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22964/* end confdefs.h.  */
22965#ifdef __STDC__
22966# include <limits.h>
22967#else
22968# include <assert.h>
22969#endif
22970		     Syntax error
22971_ACEOF
22972if ac_fn_c_try_cpp "$LINENO"; then :
22973
22974else
22975  # Broken: fails on valid input.
22976continue
22977fi
22978rm -f conftest.err conftest.i conftest.$ac_ext
22979
22980  # OK, works on sane cases.  Now check whether nonexistent headers
22981  # can be detected and how.
22982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22983/* end confdefs.h.  */
22984#include <ac_nonexistent.h>
22985_ACEOF
22986if ac_fn_c_try_cpp "$LINENO"; then :
22987  # Broken: success on invalid input.
22988continue
22989else
22990  # Passes both tests.
22991ac_preproc_ok=:
22992break
22993fi
22994rm -f conftest.err conftest.i conftest.$ac_ext
22995
22996done
22997# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22998rm -f conftest.i conftest.err conftest.$ac_ext
22999if $ac_preproc_ok; then :
23000  break
23001fi
23002
23003    done
23004    ac_cv_prog_CPP=$CPP
23005
23006fi
23007  CPP=$ac_cv_prog_CPP
23008else
23009  ac_cv_prog_CPP=$CPP
23010fi
23011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23012$as_echo "$CPP" >&6; }
23013ac_preproc_ok=false
23014for ac_c_preproc_warn_flag in '' yes
23015do
23016  # Use a header file that comes with gcc, so configuring glibc
23017  # with a fresh cross-compiler works.
23018  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23019  # <limits.h> exists even on freestanding compilers.
23020  # On the NeXT, cc -E runs the code through the compiler's parser,
23021  # not just through cpp. "Syntax error" is here to catch this case.
23022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23023/* end confdefs.h.  */
23024#ifdef __STDC__
23025# include <limits.h>
23026#else
23027# include <assert.h>
23028#endif
23029		     Syntax error
23030_ACEOF
23031if ac_fn_c_try_cpp "$LINENO"; then :
23032
23033else
23034  # Broken: fails on valid input.
23035continue
23036fi
23037rm -f conftest.err conftest.i conftest.$ac_ext
23038
23039  # OK, works on sane cases.  Now check whether nonexistent headers
23040  # can be detected and how.
23041  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23042/* end confdefs.h.  */
23043#include <ac_nonexistent.h>
23044_ACEOF
23045if ac_fn_c_try_cpp "$LINENO"; then :
23046  # Broken: success on invalid input.
23047continue
23048else
23049  # Passes both tests.
23050ac_preproc_ok=:
23051break
23052fi
23053rm -f conftest.err conftest.i conftest.$ac_ext
23054
23055done
23056# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23057rm -f conftest.i conftest.err conftest.$ac_ext
23058if $ac_preproc_ok; then :
23059
23060else
23061  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23063as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23064See \`config.log' for more details" "$LINENO" 5 ; }
23065fi
23066
23067ac_ext=cpp
23068ac_cpp='$CXXCPP $CPPFLAGS'
23069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23072
23073
23074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23075
23076  # First separate the path from the arguments. This will split at the first
23077  # space.
23078  complete="$CPP"
23079  path="${complete%% *}"
23080  tmp="$complete EOL"
23081  arguments="${tmp#* }"
23082
23083  # Input might be given as Windows format, start by converting to
23084  # unix format.
23085  new_path=`$CYGPATH -u "$path"`
23086
23087  # Now try to locate executable using which
23088  new_path=`$WHICH "$new_path" 2> /dev/null`
23089  # bat and cmd files are not always considered executable in cygwin causing which
23090  # to not find them
23091  if test "x$new_path" = x \
23092           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23093           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23094    new_path=`$CYGPATH -u "$path"`
23095  fi
23096  if test "x$new_path" = x; then
23097    # Oops. Which didn't find the executable.
23098    # The splitting of arguments from the executable at a space might have been incorrect,
23099    # since paths with space are more likely in Windows. Give it another try with the whole
23100    # argument.
23101    path="$complete"
23102    arguments="EOL"
23103    new_path=`$CYGPATH -u "$path"`
23104    new_path=`$WHICH "$new_path" 2> /dev/null`
23105    # bat and cmd files are not always considered executable in cygwin causing which
23106    # to not find them
23107    if test "x$new_path" = x \
23108             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23109             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23110      new_path=`$CYGPATH -u "$path"`
23111    fi
23112    if test "x$new_path" = x; then
23113      # It's still not found. Now this is an unrecoverable error.
23114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23115$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23116      has_space=`$ECHO "$complete" | $GREP " "`
23117      if test "x$has_space" != x; then
23118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23120      fi
23121      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23122    fi
23123  fi
23124
23125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23128  # "foo.exe" is OK but "foo" is an error.
23129  #
23130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23131  # It is also a way to make sure we got the proper file name for the real test later on.
23132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23133  if test "x$test_shortpath" = x; then
23134    # Short path failed, file does not exist as specified.
23135    # Try adding .exe or .cmd
23136    if test -f "${new_path}.exe"; then
23137       input_to_shortpath="${new_path}.exe"
23138    elif test -f "${new_path}.cmd"; then
23139       input_to_shortpath="${new_path}.cmd"
23140    else
23141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23142$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23143      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23144$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23145      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23146    fi
23147  else
23148    input_to_shortpath="$new_path"
23149  fi
23150
23151  # Call helper function which possibly converts this using DOS-style short mode.
23152  # If so, the updated path is stored in $new_path.
23153  new_path="$input_to_shortpath"
23154
23155  input_path="$input_to_shortpath"
23156  # Check if we need to convert this using DOS-style short mode. If the path
23157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23158  # take no chances and rewrite it.
23159  # Note: m4 eats our [], so we need to use [ and ] instead.
23160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23161  if test "x$has_forbidden_chars" != x; then
23162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23166      # Going to short mode and back again did indeed matter. Since short mode is
23167      # case insensitive, let's make it lowercase to improve readability.
23168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23169      # Now convert it back to Unix-stile (cygpath)
23170      input_path=`$CYGPATH -u "$shortmode_path"`
23171      new_path="$input_path"
23172    fi
23173  fi
23174
23175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23176  if test "x$test_cygdrive_prefix" = x; then
23177    # As a simple fix, exclude /usr/bin since it's not a real path.
23178    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23180      # a path prefixed by /cygdrive for fixpath to work.
23181      new_path="$CYGWIN_ROOT_PATH$input_path"
23182    fi
23183  fi
23184
23185  # remove trailing .exe if any
23186  new_path="${new_path/%.exe/}"
23187
23188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23189
23190  # First separate the path from the arguments. This will split at the first
23191  # space.
23192  complete="$CPP"
23193  path="${complete%% *}"
23194  tmp="$complete EOL"
23195  arguments="${tmp#* }"
23196
23197  # Input might be given as Windows format, start by converting to
23198  # unix format.
23199  new_path="$path"
23200
23201  windows_path="$new_path"
23202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23203    unix_path=`$CYGPATH -u "$windows_path"`
23204    new_path="$unix_path"
23205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23207    new_path="$unix_path"
23208  fi
23209
23210
23211  # Now try to locate executable using which
23212  new_path=`$WHICH "$new_path" 2> /dev/null`
23213
23214  if test "x$new_path" = x; then
23215    # Oops. Which didn't find the executable.
23216    # The splitting of arguments from the executable at a space might have been incorrect,
23217    # since paths with space are more likely in Windows. Give it another try with the whole
23218    # argument.
23219    path="$complete"
23220    arguments="EOL"
23221    new_path="$path"
23222
23223  windows_path="$new_path"
23224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23225    unix_path=`$CYGPATH -u "$windows_path"`
23226    new_path="$unix_path"
23227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23229    new_path="$unix_path"
23230  fi
23231
23232
23233    new_path=`$WHICH "$new_path" 2> /dev/null`
23234
23235    if test "x$new_path" = x; then
23236      # It's still not found. Now this is an unrecoverable error.
23237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23238$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23239      has_space=`$ECHO "$complete" | $GREP " "`
23240      if test "x$has_space" != x; then
23241        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23242$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23243      fi
23244      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23245    fi
23246  fi
23247
23248  # Now new_path has a complete unix path to the binary
23249  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23250    # Keep paths in /bin as-is, but remove trailing .exe if any
23251    new_path="${new_path/%.exe/}"
23252    # Do not save /bin paths to all_fixpath_prefixes!
23253  else
23254    # Not in mixed or Windows style, start by that.
23255    new_path=`cmd //c echo $new_path`
23256
23257  input_path="$new_path"
23258  # Check if we need to convert this using DOS-style short mode. If the path
23259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23260  # take no chances and rewrite it.
23261  # Note: m4 eats our [], so we need to use [ and ] instead.
23262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23263  if test "x$has_forbidden_chars" != x; then
23264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23266  fi
23267
23268    # Output is in $new_path
23269
23270  windows_path="$new_path"
23271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23272    unix_path=`$CYGPATH -u "$windows_path"`
23273    new_path="$unix_path"
23274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23276    new_path="$unix_path"
23277  fi
23278
23279    # remove trailing .exe if any
23280    new_path="${new_path/%.exe/}"
23281
23282    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23283    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23284  fi
23285
23286  else
23287    # We're on a posix platform. Hooray! :)
23288    # First separate the path from the arguments. This will split at the first
23289    # space.
23290    complete="$CPP"
23291    path="${complete%% *}"
23292    tmp="$complete EOL"
23293    arguments="${tmp#* }"
23294
23295    new_path=`$WHICH $path 2> /dev/null`
23296    if test "x$new_path" = x; then
23297      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23298      if test "x$is_absolute_path" != x; then
23299        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23300$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23301        new_path="$path"
23302      else
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23304$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23305        has_space=`$ECHO "$complete" | $GREP " "`
23306        if test "x$has_space" != x; then
23307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23309        fi
23310        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23311      fi
23312    fi
23313  fi
23314
23315  # Now join together the path and the arguments once again
23316  if test "x$arguments" != xEOL; then
23317      new_complete="$new_path ${arguments% *}"
23318  else
23319      new_complete="$new_path"
23320  fi
23321
23322  if test "x$complete" != "x$new_complete"; then
23323    CPP="$new_complete"
23324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23325$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23326  fi
23327
23328
23329ac_ext=cpp
23330ac_cpp='$CXXCPP $CPPFLAGS'
23331ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23332ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23333ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23335$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23336if test -z "$CXXCPP"; then
23337  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23338  $as_echo_n "(cached) " >&6
23339else
23340      # Double quotes because CXXCPP needs to be expanded
23341    for CXXCPP in "$CXX -E" "/lib/cpp"
23342    do
23343      ac_preproc_ok=false
23344for ac_cxx_preproc_warn_flag in '' yes
23345do
23346  # Use a header file that comes with gcc, so configuring glibc
23347  # with a fresh cross-compiler works.
23348  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23349  # <limits.h> exists even on freestanding compilers.
23350  # On the NeXT, cc -E runs the code through the compiler's parser,
23351  # not just through cpp. "Syntax error" is here to catch this case.
23352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23353/* end confdefs.h.  */
23354#ifdef __STDC__
23355# include <limits.h>
23356#else
23357# include <assert.h>
23358#endif
23359		     Syntax error
23360_ACEOF
23361if ac_fn_cxx_try_cpp "$LINENO"; then :
23362
23363else
23364  # Broken: fails on valid input.
23365continue
23366fi
23367rm -f conftest.err conftest.i conftest.$ac_ext
23368
23369  # OK, works on sane cases.  Now check whether nonexistent headers
23370  # can be detected and how.
23371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23372/* end confdefs.h.  */
23373#include <ac_nonexistent.h>
23374_ACEOF
23375if ac_fn_cxx_try_cpp "$LINENO"; then :
23376  # Broken: success on invalid input.
23377continue
23378else
23379  # Passes both tests.
23380ac_preproc_ok=:
23381break
23382fi
23383rm -f conftest.err conftest.i conftest.$ac_ext
23384
23385done
23386# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23387rm -f conftest.i conftest.err conftest.$ac_ext
23388if $ac_preproc_ok; then :
23389  break
23390fi
23391
23392    done
23393    ac_cv_prog_CXXCPP=$CXXCPP
23394
23395fi
23396  CXXCPP=$ac_cv_prog_CXXCPP
23397else
23398  ac_cv_prog_CXXCPP=$CXXCPP
23399fi
23400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23401$as_echo "$CXXCPP" >&6; }
23402ac_preproc_ok=false
23403for ac_cxx_preproc_warn_flag in '' yes
23404do
23405  # Use a header file that comes with gcc, so configuring glibc
23406  # with a fresh cross-compiler works.
23407  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23408  # <limits.h> exists even on freestanding compilers.
23409  # On the NeXT, cc -E runs the code through the compiler's parser,
23410  # not just through cpp. "Syntax error" is here to catch this case.
23411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23412/* end confdefs.h.  */
23413#ifdef __STDC__
23414# include <limits.h>
23415#else
23416# include <assert.h>
23417#endif
23418		     Syntax error
23419_ACEOF
23420if ac_fn_cxx_try_cpp "$LINENO"; then :
23421
23422else
23423  # Broken: fails on valid input.
23424continue
23425fi
23426rm -f conftest.err conftest.i conftest.$ac_ext
23427
23428  # OK, works on sane cases.  Now check whether nonexistent headers
23429  # can be detected and how.
23430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23431/* end confdefs.h.  */
23432#include <ac_nonexistent.h>
23433_ACEOF
23434if ac_fn_cxx_try_cpp "$LINENO"; then :
23435  # Broken: success on invalid input.
23436continue
23437else
23438  # Passes both tests.
23439ac_preproc_ok=:
23440break
23441fi
23442rm -f conftest.err conftest.i conftest.$ac_ext
23443
23444done
23445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23446rm -f conftest.i conftest.err conftest.$ac_ext
23447if $ac_preproc_ok; then :
23448
23449else
23450  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23452as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23453See \`config.log' for more details" "$LINENO" 5 ; }
23454fi
23455
23456ac_ext=cpp
23457ac_cpp='$CXXCPP $CPPFLAGS'
23458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23461
23462
23463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23464
23465  # First separate the path from the arguments. This will split at the first
23466  # space.
23467  complete="$CXXCPP"
23468  path="${complete%% *}"
23469  tmp="$complete EOL"
23470  arguments="${tmp#* }"
23471
23472  # Input might be given as Windows format, start by converting to
23473  # unix format.
23474  new_path=`$CYGPATH -u "$path"`
23475
23476  # Now try to locate executable using which
23477  new_path=`$WHICH "$new_path" 2> /dev/null`
23478  # bat and cmd files are not always considered executable in cygwin causing which
23479  # to not find them
23480  if test "x$new_path" = x \
23481           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23482           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23483    new_path=`$CYGPATH -u "$path"`
23484  fi
23485  if test "x$new_path" = x; then
23486    # Oops. Which didn't find the executable.
23487    # The splitting of arguments from the executable at a space might have been incorrect,
23488    # since paths with space are more likely in Windows. Give it another try with the whole
23489    # argument.
23490    path="$complete"
23491    arguments="EOL"
23492    new_path=`$CYGPATH -u "$path"`
23493    new_path=`$WHICH "$new_path" 2> /dev/null`
23494    # bat and cmd files are not always considered executable in cygwin causing which
23495    # to not find them
23496    if test "x$new_path" = x \
23497             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23498             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23499      new_path=`$CYGPATH -u "$path"`
23500    fi
23501    if test "x$new_path" = x; then
23502      # It's still not found. Now this is an unrecoverable error.
23503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23504$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23505      has_space=`$ECHO "$complete" | $GREP " "`
23506      if test "x$has_space" != x; then
23507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23509      fi
23510      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23511    fi
23512  fi
23513
23514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23517  # "foo.exe" is OK but "foo" is an error.
23518  #
23519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23520  # It is also a way to make sure we got the proper file name for the real test later on.
23521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23522  if test "x$test_shortpath" = x; then
23523    # Short path failed, file does not exist as specified.
23524    # Try adding .exe or .cmd
23525    if test -f "${new_path}.exe"; then
23526       input_to_shortpath="${new_path}.exe"
23527    elif test -f "${new_path}.cmd"; then
23528       input_to_shortpath="${new_path}.cmd"
23529    else
23530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23531$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23532      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23533$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23534      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23535    fi
23536  else
23537    input_to_shortpath="$new_path"
23538  fi
23539
23540  # Call helper function which possibly converts this using DOS-style short mode.
23541  # If so, the updated path is stored in $new_path.
23542  new_path="$input_to_shortpath"
23543
23544  input_path="$input_to_shortpath"
23545  # Check if we need to convert this using DOS-style short mode. If the path
23546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23547  # take no chances and rewrite it.
23548  # Note: m4 eats our [], so we need to use [ and ] instead.
23549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23550  if test "x$has_forbidden_chars" != x; then
23551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23555      # Going to short mode and back again did indeed matter. Since short mode is
23556      # case insensitive, let's make it lowercase to improve readability.
23557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23558      # Now convert it back to Unix-stile (cygpath)
23559      input_path=`$CYGPATH -u "$shortmode_path"`
23560      new_path="$input_path"
23561    fi
23562  fi
23563
23564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23565  if test "x$test_cygdrive_prefix" = x; then
23566    # As a simple fix, exclude /usr/bin since it's not a real path.
23567    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23569      # a path prefixed by /cygdrive for fixpath to work.
23570      new_path="$CYGWIN_ROOT_PATH$input_path"
23571    fi
23572  fi
23573
23574  # remove trailing .exe if any
23575  new_path="${new_path/%.exe/}"
23576
23577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23578
23579  # First separate the path from the arguments. This will split at the first
23580  # space.
23581  complete="$CXXCPP"
23582  path="${complete%% *}"
23583  tmp="$complete EOL"
23584  arguments="${tmp#* }"
23585
23586  # Input might be given as Windows format, start by converting to
23587  # unix format.
23588  new_path="$path"
23589
23590  windows_path="$new_path"
23591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23592    unix_path=`$CYGPATH -u "$windows_path"`
23593    new_path="$unix_path"
23594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23596    new_path="$unix_path"
23597  fi
23598
23599
23600  # Now try to locate executable using which
23601  new_path=`$WHICH "$new_path" 2> /dev/null`
23602
23603  if test "x$new_path" = x; then
23604    # Oops. Which didn't find the executable.
23605    # The splitting of arguments from the executable at a space might have been incorrect,
23606    # since paths with space are more likely in Windows. Give it another try with the whole
23607    # argument.
23608    path="$complete"
23609    arguments="EOL"
23610    new_path="$path"
23611
23612  windows_path="$new_path"
23613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23614    unix_path=`$CYGPATH -u "$windows_path"`
23615    new_path="$unix_path"
23616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23618    new_path="$unix_path"
23619  fi
23620
23621
23622    new_path=`$WHICH "$new_path" 2> /dev/null`
23623
23624    if test "x$new_path" = x; then
23625      # It's still not found. Now this is an unrecoverable error.
23626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23627$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23628      has_space=`$ECHO "$complete" | $GREP " "`
23629      if test "x$has_space" != x; then
23630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23632      fi
23633      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23634    fi
23635  fi
23636
23637  # Now new_path has a complete unix path to the binary
23638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23639    # Keep paths in /bin as-is, but remove trailing .exe if any
23640    new_path="${new_path/%.exe/}"
23641    # Do not save /bin paths to all_fixpath_prefixes!
23642  else
23643    # Not in mixed or Windows style, start by that.
23644    new_path=`cmd //c echo $new_path`
23645
23646  input_path="$new_path"
23647  # Check if we need to convert this using DOS-style short mode. If the path
23648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23649  # take no chances and rewrite it.
23650  # Note: m4 eats our [], so we need to use [ and ] instead.
23651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23652  if test "x$has_forbidden_chars" != x; then
23653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23655  fi
23656
23657    # Output is in $new_path
23658
23659  windows_path="$new_path"
23660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23661    unix_path=`$CYGPATH -u "$windows_path"`
23662    new_path="$unix_path"
23663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23665    new_path="$unix_path"
23666  fi
23667
23668    # remove trailing .exe if any
23669    new_path="${new_path/%.exe/}"
23670
23671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23673  fi
23674
23675  else
23676    # We're on a posix platform. Hooray! :)
23677    # First separate the path from the arguments. This will split at the first
23678    # space.
23679    complete="$CXXCPP"
23680    path="${complete%% *}"
23681    tmp="$complete EOL"
23682    arguments="${tmp#* }"
23683
23684    new_path=`$WHICH $path 2> /dev/null`
23685    if test "x$new_path" = x; then
23686      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23687      if test "x$is_absolute_path" != x; then
23688        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23689$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23690        new_path="$path"
23691      else
23692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23693$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23694        has_space=`$ECHO "$complete" | $GREP " "`
23695        if test "x$has_space" != x; then
23696          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23697$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23698        fi
23699        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23700      fi
23701    fi
23702  fi
23703
23704  # Now join together the path and the arguments once again
23705  if test "x$arguments" != xEOL; then
23706      new_complete="$new_path ${arguments% *}"
23707  else
23708      new_complete="$new_path"
23709  fi
23710
23711  if test "x$complete" != "x$new_complete"; then
23712    CXXCPP="$new_complete"
23713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23714$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23715  fi
23716
23717
23718if test "x$COMPILE_TYPE" != "xcross"; then
23719    # If we are not cross compiling, use the same compilers for
23720    # building the build platform executables. The cross-compilation
23721    # case needed to be done earlier, but this can only be done after
23722    # the native tools have been localized.
23723    BUILD_CC="$CC"
23724    BUILD_CXX="$CXX"
23725    BUILD_LD="$LD"
23726fi
23727
23728# for solaris we really need solaris tools, and not gnu equivalent
23729#   these seems to normally reside in /usr/ccs/bin so add that to path before
23730#   starting to probe
23731#
23732#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23733#         so that it can be overriden --with-tools-dir
23734if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23735    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23736fi
23737
23738# Find the right assembler.
23739if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23740    # Extract the first word of "as", so it can be a program name with args.
23741set dummy as; ac_word=$2
23742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23743$as_echo_n "checking for $ac_word... " >&6; }
23744if test "${ac_cv_path_AS+set}" = set; then :
23745  $as_echo_n "(cached) " >&6
23746else
23747  case $AS in
23748  [\\/]* | ?:[\\/]*)
23749  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23750  ;;
23751  *)
23752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23753for as_dir in $PATH
23754do
23755  IFS=$as_save_IFS
23756  test -z "$as_dir" && as_dir=.
23757    for ac_exec_ext in '' $ac_executable_extensions; do
23758  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23759    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23761    break 2
23762  fi
23763done
23764  done
23765IFS=$as_save_IFS
23766
23767  ;;
23768esac
23769fi
23770AS=$ac_cv_path_AS
23771if test -n "$AS"; then
23772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23773$as_echo "$AS" >&6; }
23774else
23775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23776$as_echo "no" >&6; }
23777fi
23778
23779
23780
23781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23782
23783  # First separate the path from the arguments. This will split at the first
23784  # space.
23785  complete="$AS"
23786  path="${complete%% *}"
23787  tmp="$complete EOL"
23788  arguments="${tmp#* }"
23789
23790  # Input might be given as Windows format, start by converting to
23791  # unix format.
23792  new_path=`$CYGPATH -u "$path"`
23793
23794  # Now try to locate executable using which
23795  new_path=`$WHICH "$new_path" 2> /dev/null`
23796  # bat and cmd files are not always considered executable in cygwin causing which
23797  # to not find them
23798  if test "x$new_path" = x \
23799           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23800           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23801    new_path=`$CYGPATH -u "$path"`
23802  fi
23803  if test "x$new_path" = x; then
23804    # Oops. Which didn't find the executable.
23805    # The splitting of arguments from the executable at a space might have been incorrect,
23806    # since paths with space are more likely in Windows. Give it another try with the whole
23807    # argument.
23808    path="$complete"
23809    arguments="EOL"
23810    new_path=`$CYGPATH -u "$path"`
23811    new_path=`$WHICH "$new_path" 2> /dev/null`
23812    # bat and cmd files are not always considered executable in cygwin causing which
23813    # to not find them
23814    if test "x$new_path" = x \
23815             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23816             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23817      new_path=`$CYGPATH -u "$path"`
23818    fi
23819    if test "x$new_path" = x; then
23820      # It's still not found. Now this is an unrecoverable error.
23821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23822$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23823      has_space=`$ECHO "$complete" | $GREP " "`
23824      if test "x$has_space" != x; then
23825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23827      fi
23828      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23829    fi
23830  fi
23831
23832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23835  # "foo.exe" is OK but "foo" is an error.
23836  #
23837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23838  # It is also a way to make sure we got the proper file name for the real test later on.
23839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23840  if test "x$test_shortpath" = x; then
23841    # Short path failed, file does not exist as specified.
23842    # Try adding .exe or .cmd
23843    if test -f "${new_path}.exe"; then
23844       input_to_shortpath="${new_path}.exe"
23845    elif test -f "${new_path}.cmd"; then
23846       input_to_shortpath="${new_path}.cmd"
23847    else
23848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23849$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23850      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23851$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23852      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23853    fi
23854  else
23855    input_to_shortpath="$new_path"
23856  fi
23857
23858  # Call helper function which possibly converts this using DOS-style short mode.
23859  # If so, the updated path is stored in $new_path.
23860  new_path="$input_to_shortpath"
23861
23862  input_path="$input_to_shortpath"
23863  # Check if we need to convert this using DOS-style short mode. If the path
23864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23865  # take no chances and rewrite it.
23866  # Note: m4 eats our [], so we need to use [ and ] instead.
23867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23868  if test "x$has_forbidden_chars" != x; then
23869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23873      # Going to short mode and back again did indeed matter. Since short mode is
23874      # case insensitive, let's make it lowercase to improve readability.
23875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23876      # Now convert it back to Unix-stile (cygpath)
23877      input_path=`$CYGPATH -u "$shortmode_path"`
23878      new_path="$input_path"
23879    fi
23880  fi
23881
23882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23883  if test "x$test_cygdrive_prefix" = x; then
23884    # As a simple fix, exclude /usr/bin since it's not a real path.
23885    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23887      # a path prefixed by /cygdrive for fixpath to work.
23888      new_path="$CYGWIN_ROOT_PATH$input_path"
23889    fi
23890  fi
23891
23892  # remove trailing .exe if any
23893  new_path="${new_path/%.exe/}"
23894
23895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23896
23897  # First separate the path from the arguments. This will split at the first
23898  # space.
23899  complete="$AS"
23900  path="${complete%% *}"
23901  tmp="$complete EOL"
23902  arguments="${tmp#* }"
23903
23904  # Input might be given as Windows format, start by converting to
23905  # unix format.
23906  new_path="$path"
23907
23908  windows_path="$new_path"
23909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23910    unix_path=`$CYGPATH -u "$windows_path"`
23911    new_path="$unix_path"
23912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23914    new_path="$unix_path"
23915  fi
23916
23917
23918  # Now try to locate executable using which
23919  new_path=`$WHICH "$new_path" 2> /dev/null`
23920
23921  if test "x$new_path" = x; then
23922    # Oops. Which didn't find the executable.
23923    # The splitting of arguments from the executable at a space might have been incorrect,
23924    # since paths with space are more likely in Windows. Give it another try with the whole
23925    # argument.
23926    path="$complete"
23927    arguments="EOL"
23928    new_path="$path"
23929
23930  windows_path="$new_path"
23931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23932    unix_path=`$CYGPATH -u "$windows_path"`
23933    new_path="$unix_path"
23934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23936    new_path="$unix_path"
23937  fi
23938
23939
23940    new_path=`$WHICH "$new_path" 2> /dev/null`
23941
23942    if test "x$new_path" = x; then
23943      # It's still not found. Now this is an unrecoverable error.
23944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23945$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23946      has_space=`$ECHO "$complete" | $GREP " "`
23947      if test "x$has_space" != x; then
23948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23950      fi
23951      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23952    fi
23953  fi
23954
23955  # Now new_path has a complete unix path to the binary
23956  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23957    # Keep paths in /bin as-is, but remove trailing .exe if any
23958    new_path="${new_path/%.exe/}"
23959    # Do not save /bin paths to all_fixpath_prefixes!
23960  else
23961    # Not in mixed or Windows style, start by that.
23962    new_path=`cmd //c echo $new_path`
23963
23964  input_path="$new_path"
23965  # Check if we need to convert this using DOS-style short mode. If the path
23966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23967  # take no chances and rewrite it.
23968  # Note: m4 eats our [], so we need to use [ and ] instead.
23969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23970  if test "x$has_forbidden_chars" != x; then
23971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23973  fi
23974
23975    # Output is in $new_path
23976
23977  windows_path="$new_path"
23978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23979    unix_path=`$CYGPATH -u "$windows_path"`
23980    new_path="$unix_path"
23981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23983    new_path="$unix_path"
23984  fi
23985
23986    # remove trailing .exe if any
23987    new_path="${new_path/%.exe/}"
23988
23989    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23990    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23991  fi
23992
23993  else
23994    # We're on a posix platform. Hooray! :)
23995    # First separate the path from the arguments. This will split at the first
23996    # space.
23997    complete="$AS"
23998    path="${complete%% *}"
23999    tmp="$complete EOL"
24000    arguments="${tmp#* }"
24001
24002    new_path=`$WHICH $path 2> /dev/null`
24003    if test "x$new_path" = x; then
24004      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24005      if test "x$is_absolute_path" != x; then
24006        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
24007$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
24008        new_path="$path"
24009      else
24010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24011$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24012        has_space=`$ECHO "$complete" | $GREP " "`
24013        if test "x$has_space" != x; then
24014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24016        fi
24017        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24018      fi
24019    fi
24020  fi
24021
24022  # Now join together the path and the arguments once again
24023  if test "x$arguments" != xEOL; then
24024      new_complete="$new_path ${arguments% *}"
24025  else
24026      new_complete="$new_path"
24027  fi
24028
24029  if test "x$complete" != "x$new_complete"; then
24030    AS="$new_complete"
24031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24032$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24033  fi
24034
24035else
24036    AS="$CC -c"
24037fi
24038
24039
24040if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24041    for ac_prog in gnm nm
24042do
24043  # Extract the first word of "$ac_prog", so it can be a program name with args.
24044set dummy $ac_prog; ac_word=$2
24045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24046$as_echo_n "checking for $ac_word... " >&6; }
24047if test "${ac_cv_path_NM+set}" = set; then :
24048  $as_echo_n "(cached) " >&6
24049else
24050  case $NM in
24051  [\\/]* | ?:[\\/]*)
24052  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24053  ;;
24054  *)
24055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24056for as_dir in $PATH
24057do
24058  IFS=$as_save_IFS
24059  test -z "$as_dir" && as_dir=.
24060    for ac_exec_ext in '' $ac_executable_extensions; do
24061  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24062    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24064    break 2
24065  fi
24066done
24067  done
24068IFS=$as_save_IFS
24069
24070  ;;
24071esac
24072fi
24073NM=$ac_cv_path_NM
24074if test -n "$NM"; then
24075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24076$as_echo "$NM" >&6; }
24077else
24078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24079$as_echo "no" >&6; }
24080fi
24081
24082
24083  test -n "$NM" && break
24084done
24085
24086
24087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24088
24089  # First separate the path from the arguments. This will split at the first
24090  # space.
24091  complete="$NM"
24092  path="${complete%% *}"
24093  tmp="$complete EOL"
24094  arguments="${tmp#* }"
24095
24096  # Input might be given as Windows format, start by converting to
24097  # unix format.
24098  new_path=`$CYGPATH -u "$path"`
24099
24100  # Now try to locate executable using which
24101  new_path=`$WHICH "$new_path" 2> /dev/null`
24102  # bat and cmd files are not always considered executable in cygwin causing which
24103  # to not find them
24104  if test "x$new_path" = x \
24105           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24106           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24107    new_path=`$CYGPATH -u "$path"`
24108  fi
24109  if test "x$new_path" = x; then
24110    # Oops. Which didn't find the executable.
24111    # The splitting of arguments from the executable at a space might have been incorrect,
24112    # since paths with space are more likely in Windows. Give it another try with the whole
24113    # argument.
24114    path="$complete"
24115    arguments="EOL"
24116    new_path=`$CYGPATH -u "$path"`
24117    new_path=`$WHICH "$new_path" 2> /dev/null`
24118    # bat and cmd files are not always considered executable in cygwin causing which
24119    # to not find them
24120    if test "x$new_path" = x \
24121             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24122             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24123      new_path=`$CYGPATH -u "$path"`
24124    fi
24125    if test "x$new_path" = x; then
24126      # It's still not found. Now this is an unrecoverable error.
24127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24128$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24129      has_space=`$ECHO "$complete" | $GREP " "`
24130      if test "x$has_space" != x; then
24131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24133      fi
24134      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24135    fi
24136  fi
24137
24138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24141  # "foo.exe" is OK but "foo" is an error.
24142  #
24143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24144  # It is also a way to make sure we got the proper file name for the real test later on.
24145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24146  if test "x$test_shortpath" = x; then
24147    # Short path failed, file does not exist as specified.
24148    # Try adding .exe or .cmd
24149    if test -f "${new_path}.exe"; then
24150       input_to_shortpath="${new_path}.exe"
24151    elif test -f "${new_path}.cmd"; then
24152       input_to_shortpath="${new_path}.cmd"
24153    else
24154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24155$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24156      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24157$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24158      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24159    fi
24160  else
24161    input_to_shortpath="$new_path"
24162  fi
24163
24164  # Call helper function which possibly converts this using DOS-style short mode.
24165  # If so, the updated path is stored in $new_path.
24166  new_path="$input_to_shortpath"
24167
24168  input_path="$input_to_shortpath"
24169  # Check if we need to convert this using DOS-style short mode. If the path
24170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24171  # take no chances and rewrite it.
24172  # Note: m4 eats our [], so we need to use [ and ] instead.
24173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24174  if test "x$has_forbidden_chars" != x; then
24175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24179      # Going to short mode and back again did indeed matter. Since short mode is
24180      # case insensitive, let's make it lowercase to improve readability.
24181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24182      # Now convert it back to Unix-stile (cygpath)
24183      input_path=`$CYGPATH -u "$shortmode_path"`
24184      new_path="$input_path"
24185    fi
24186  fi
24187
24188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24189  if test "x$test_cygdrive_prefix" = x; then
24190    # As a simple fix, exclude /usr/bin since it's not a real path.
24191    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24193      # a path prefixed by /cygdrive for fixpath to work.
24194      new_path="$CYGWIN_ROOT_PATH$input_path"
24195    fi
24196  fi
24197
24198  # remove trailing .exe if any
24199  new_path="${new_path/%.exe/}"
24200
24201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24202
24203  # First separate the path from the arguments. This will split at the first
24204  # space.
24205  complete="$NM"
24206  path="${complete%% *}"
24207  tmp="$complete EOL"
24208  arguments="${tmp#* }"
24209
24210  # Input might be given as Windows format, start by converting to
24211  # unix format.
24212  new_path="$path"
24213
24214  windows_path="$new_path"
24215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24216    unix_path=`$CYGPATH -u "$windows_path"`
24217    new_path="$unix_path"
24218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24220    new_path="$unix_path"
24221  fi
24222
24223
24224  # Now try to locate executable using which
24225  new_path=`$WHICH "$new_path" 2> /dev/null`
24226
24227  if test "x$new_path" = x; then
24228    # Oops. Which didn't find the executable.
24229    # The splitting of arguments from the executable at a space might have been incorrect,
24230    # since paths with space are more likely in Windows. Give it another try with the whole
24231    # argument.
24232    path="$complete"
24233    arguments="EOL"
24234    new_path="$path"
24235
24236  windows_path="$new_path"
24237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24238    unix_path=`$CYGPATH -u "$windows_path"`
24239    new_path="$unix_path"
24240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24242    new_path="$unix_path"
24243  fi
24244
24245
24246    new_path=`$WHICH "$new_path" 2> /dev/null`
24247
24248    if test "x$new_path" = x; then
24249      # It's still not found. Now this is an unrecoverable error.
24250      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24251$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24252      has_space=`$ECHO "$complete" | $GREP " "`
24253      if test "x$has_space" != x; then
24254        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24255$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24256      fi
24257      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24258    fi
24259  fi
24260
24261  # Now new_path has a complete unix path to the binary
24262  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24263    # Keep paths in /bin as-is, but remove trailing .exe if any
24264    new_path="${new_path/%.exe/}"
24265    # Do not save /bin paths to all_fixpath_prefixes!
24266  else
24267    # Not in mixed or Windows style, start by that.
24268    new_path=`cmd //c echo $new_path`
24269
24270  input_path="$new_path"
24271  # Check if we need to convert this using DOS-style short mode. If the path
24272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24273  # take no chances and rewrite it.
24274  # Note: m4 eats our [], so we need to use [ and ] instead.
24275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24276  if test "x$has_forbidden_chars" != x; then
24277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24279  fi
24280
24281    # Output is in $new_path
24282
24283  windows_path="$new_path"
24284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24285    unix_path=`$CYGPATH -u "$windows_path"`
24286    new_path="$unix_path"
24287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24289    new_path="$unix_path"
24290  fi
24291
24292    # remove trailing .exe if any
24293    new_path="${new_path/%.exe/}"
24294
24295    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24296    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24297  fi
24298
24299  else
24300    # We're on a posix platform. Hooray! :)
24301    # First separate the path from the arguments. This will split at the first
24302    # space.
24303    complete="$NM"
24304    path="${complete%% *}"
24305    tmp="$complete EOL"
24306    arguments="${tmp#* }"
24307
24308    new_path=`$WHICH $path 2> /dev/null`
24309    if test "x$new_path" = x; then
24310      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24311      if test "x$is_absolute_path" != x; then
24312        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24313$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24314        new_path="$path"
24315      else
24316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24317$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24318        has_space=`$ECHO "$complete" | $GREP " "`
24319        if test "x$has_space" != x; then
24320          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24321$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24322        fi
24323        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24324      fi
24325    fi
24326  fi
24327
24328  # Now join together the path and the arguments once again
24329  if test "x$arguments" != xEOL; then
24330      new_complete="$new_path ${arguments% *}"
24331  else
24332      new_complete="$new_path"
24333  fi
24334
24335  if test "x$complete" != "x$new_complete"; then
24336    NM="$new_complete"
24337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24338$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24339  fi
24340
24341    # Extract the first word of "strip", so it can be a program name with args.
24342set dummy strip; ac_word=$2
24343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24344$as_echo_n "checking for $ac_word... " >&6; }
24345if test "${ac_cv_path_STRIP+set}" = set; then :
24346  $as_echo_n "(cached) " >&6
24347else
24348  case $STRIP in
24349  [\\/]* | ?:[\\/]*)
24350  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24351  ;;
24352  *)
24353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24354for as_dir in $PATH
24355do
24356  IFS=$as_save_IFS
24357  test -z "$as_dir" && as_dir=.
24358    for ac_exec_ext in '' $ac_executable_extensions; do
24359  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24360    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24362    break 2
24363  fi
24364done
24365  done
24366IFS=$as_save_IFS
24367
24368  ;;
24369esac
24370fi
24371STRIP=$ac_cv_path_STRIP
24372if test -n "$STRIP"; then
24373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24374$as_echo "$STRIP" >&6; }
24375else
24376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24377$as_echo "no" >&6; }
24378fi
24379
24380
24381
24382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24383
24384  # First separate the path from the arguments. This will split at the first
24385  # space.
24386  complete="$STRIP"
24387  path="${complete%% *}"
24388  tmp="$complete EOL"
24389  arguments="${tmp#* }"
24390
24391  # Input might be given as Windows format, start by converting to
24392  # unix format.
24393  new_path=`$CYGPATH -u "$path"`
24394
24395  # Now try to locate executable using which
24396  new_path=`$WHICH "$new_path" 2> /dev/null`
24397  # bat and cmd files are not always considered executable in cygwin causing which
24398  # to not find them
24399  if test "x$new_path" = x \
24400           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24401           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24402    new_path=`$CYGPATH -u "$path"`
24403  fi
24404  if test "x$new_path" = x; then
24405    # Oops. Which didn't find the executable.
24406    # The splitting of arguments from the executable at a space might have been incorrect,
24407    # since paths with space are more likely in Windows. Give it another try with the whole
24408    # argument.
24409    path="$complete"
24410    arguments="EOL"
24411    new_path=`$CYGPATH -u "$path"`
24412    new_path=`$WHICH "$new_path" 2> /dev/null`
24413    # bat and cmd files are not always considered executable in cygwin causing which
24414    # to not find them
24415    if test "x$new_path" = x \
24416             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24417             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24418      new_path=`$CYGPATH -u "$path"`
24419    fi
24420    if test "x$new_path" = x; then
24421      # It's still not found. Now this is an unrecoverable error.
24422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24423$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24424      has_space=`$ECHO "$complete" | $GREP " "`
24425      if test "x$has_space" != x; then
24426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24428      fi
24429      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24430    fi
24431  fi
24432
24433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24436  # "foo.exe" is OK but "foo" is an error.
24437  #
24438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24439  # It is also a way to make sure we got the proper file name for the real test later on.
24440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24441  if test "x$test_shortpath" = x; then
24442    # Short path failed, file does not exist as specified.
24443    # Try adding .exe or .cmd
24444    if test -f "${new_path}.exe"; then
24445       input_to_shortpath="${new_path}.exe"
24446    elif test -f "${new_path}.cmd"; then
24447       input_to_shortpath="${new_path}.cmd"
24448    else
24449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24450$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24451      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24452$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24453      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24454    fi
24455  else
24456    input_to_shortpath="$new_path"
24457  fi
24458
24459  # Call helper function which possibly converts this using DOS-style short mode.
24460  # If so, the updated path is stored in $new_path.
24461  new_path="$input_to_shortpath"
24462
24463  input_path="$input_to_shortpath"
24464  # Check if we need to convert this using DOS-style short mode. If the path
24465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24466  # take no chances and rewrite it.
24467  # Note: m4 eats our [], so we need to use [ and ] instead.
24468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24469  if test "x$has_forbidden_chars" != x; then
24470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24474      # Going to short mode and back again did indeed matter. Since short mode is
24475      # case insensitive, let's make it lowercase to improve readability.
24476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24477      # Now convert it back to Unix-stile (cygpath)
24478      input_path=`$CYGPATH -u "$shortmode_path"`
24479      new_path="$input_path"
24480    fi
24481  fi
24482
24483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24484  if test "x$test_cygdrive_prefix" = x; then
24485    # As a simple fix, exclude /usr/bin since it's not a real path.
24486    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24488      # a path prefixed by /cygdrive for fixpath to work.
24489      new_path="$CYGWIN_ROOT_PATH$input_path"
24490    fi
24491  fi
24492
24493  # remove trailing .exe if any
24494  new_path="${new_path/%.exe/}"
24495
24496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24497
24498  # First separate the path from the arguments. This will split at the first
24499  # space.
24500  complete="$STRIP"
24501  path="${complete%% *}"
24502  tmp="$complete EOL"
24503  arguments="${tmp#* }"
24504
24505  # Input might be given as Windows format, start by converting to
24506  # unix format.
24507  new_path="$path"
24508
24509  windows_path="$new_path"
24510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24511    unix_path=`$CYGPATH -u "$windows_path"`
24512    new_path="$unix_path"
24513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24515    new_path="$unix_path"
24516  fi
24517
24518
24519  # Now try to locate executable using which
24520  new_path=`$WHICH "$new_path" 2> /dev/null`
24521
24522  if test "x$new_path" = x; then
24523    # Oops. Which didn't find the executable.
24524    # The splitting of arguments from the executable at a space might have been incorrect,
24525    # since paths with space are more likely in Windows. Give it another try with the whole
24526    # argument.
24527    path="$complete"
24528    arguments="EOL"
24529    new_path="$path"
24530
24531  windows_path="$new_path"
24532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24533    unix_path=`$CYGPATH -u "$windows_path"`
24534    new_path="$unix_path"
24535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24537    new_path="$unix_path"
24538  fi
24539
24540
24541    new_path=`$WHICH "$new_path" 2> /dev/null`
24542
24543    if test "x$new_path" = x; then
24544      # It's still not found. Now this is an unrecoverable error.
24545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24546$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24547      has_space=`$ECHO "$complete" | $GREP " "`
24548      if test "x$has_space" != x; then
24549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24551      fi
24552      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24553    fi
24554  fi
24555
24556  # Now new_path has a complete unix path to the binary
24557  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24558    # Keep paths in /bin as-is, but remove trailing .exe if any
24559    new_path="${new_path/%.exe/}"
24560    # Do not save /bin paths to all_fixpath_prefixes!
24561  else
24562    # Not in mixed or Windows style, start by that.
24563    new_path=`cmd //c echo $new_path`
24564
24565  input_path="$new_path"
24566  # Check if we need to convert this using DOS-style short mode. If the path
24567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24568  # take no chances and rewrite it.
24569  # Note: m4 eats our [], so we need to use [ and ] instead.
24570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24571  if test "x$has_forbidden_chars" != x; then
24572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24574  fi
24575
24576    # Output is in $new_path
24577
24578  windows_path="$new_path"
24579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24580    unix_path=`$CYGPATH -u "$windows_path"`
24581    new_path="$unix_path"
24582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24584    new_path="$unix_path"
24585  fi
24586
24587    # remove trailing .exe if any
24588    new_path="${new_path/%.exe/}"
24589
24590    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24591    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24592  fi
24593
24594  else
24595    # We're on a posix platform. Hooray! :)
24596    # First separate the path from the arguments. This will split at the first
24597    # space.
24598    complete="$STRIP"
24599    path="${complete%% *}"
24600    tmp="$complete EOL"
24601    arguments="${tmp#* }"
24602
24603    new_path=`$WHICH $path 2> /dev/null`
24604    if test "x$new_path" = x; then
24605      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24606      if test "x$is_absolute_path" != x; then
24607        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24608$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24609        new_path="$path"
24610      else
24611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24612$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24613        has_space=`$ECHO "$complete" | $GREP " "`
24614        if test "x$has_space" != x; then
24615          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24616$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24617        fi
24618        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24619      fi
24620    fi
24621  fi
24622
24623  # Now join together the path and the arguments once again
24624  if test "x$arguments" != xEOL; then
24625      new_complete="$new_path ${arguments% *}"
24626  else
24627      new_complete="$new_path"
24628  fi
24629
24630  if test "x$complete" != "x$new_complete"; then
24631    STRIP="$new_complete"
24632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24633$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24634  fi
24635
24636    # Extract the first word of "mcs", so it can be a program name with args.
24637set dummy mcs; ac_word=$2
24638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24639$as_echo_n "checking for $ac_word... " >&6; }
24640if test "${ac_cv_path_MCS+set}" = set; then :
24641  $as_echo_n "(cached) " >&6
24642else
24643  case $MCS in
24644  [\\/]* | ?:[\\/]*)
24645  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24646  ;;
24647  *)
24648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24649for as_dir in $PATH
24650do
24651  IFS=$as_save_IFS
24652  test -z "$as_dir" && as_dir=.
24653    for ac_exec_ext in '' $ac_executable_extensions; do
24654  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24655    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24657    break 2
24658  fi
24659done
24660  done
24661IFS=$as_save_IFS
24662
24663  ;;
24664esac
24665fi
24666MCS=$ac_cv_path_MCS
24667if test -n "$MCS"; then
24668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24669$as_echo "$MCS" >&6; }
24670else
24671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24672$as_echo "no" >&6; }
24673fi
24674
24675
24676
24677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24678
24679  # First separate the path from the arguments. This will split at the first
24680  # space.
24681  complete="$MCS"
24682  path="${complete%% *}"
24683  tmp="$complete EOL"
24684  arguments="${tmp#* }"
24685
24686  # Input might be given as Windows format, start by converting to
24687  # unix format.
24688  new_path=`$CYGPATH -u "$path"`
24689
24690  # Now try to locate executable using which
24691  new_path=`$WHICH "$new_path" 2> /dev/null`
24692  # bat and cmd files are not always considered executable in cygwin causing which
24693  # to not find them
24694  if test "x$new_path" = x \
24695           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24696           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24697    new_path=`$CYGPATH -u "$path"`
24698  fi
24699  if test "x$new_path" = x; then
24700    # Oops. Which didn't find the executable.
24701    # The splitting of arguments from the executable at a space might have been incorrect,
24702    # since paths with space are more likely in Windows. Give it another try with the whole
24703    # argument.
24704    path="$complete"
24705    arguments="EOL"
24706    new_path=`$CYGPATH -u "$path"`
24707    new_path=`$WHICH "$new_path" 2> /dev/null`
24708    # bat and cmd files are not always considered executable in cygwin causing which
24709    # to not find them
24710    if test "x$new_path" = x \
24711             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24712             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24713      new_path=`$CYGPATH -u "$path"`
24714    fi
24715    if test "x$new_path" = x; then
24716      # It's still not found. Now this is an unrecoverable error.
24717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24718$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24719      has_space=`$ECHO "$complete" | $GREP " "`
24720      if test "x$has_space" != x; then
24721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24723      fi
24724      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24725    fi
24726  fi
24727
24728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24731  # "foo.exe" is OK but "foo" is an error.
24732  #
24733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24734  # It is also a way to make sure we got the proper file name for the real test later on.
24735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24736  if test "x$test_shortpath" = x; then
24737    # Short path failed, file does not exist as specified.
24738    # Try adding .exe or .cmd
24739    if test -f "${new_path}.exe"; then
24740       input_to_shortpath="${new_path}.exe"
24741    elif test -f "${new_path}.cmd"; then
24742       input_to_shortpath="${new_path}.cmd"
24743    else
24744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24745$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24748      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24749    fi
24750  else
24751    input_to_shortpath="$new_path"
24752  fi
24753
24754  # Call helper function which possibly converts this using DOS-style short mode.
24755  # If so, the updated path is stored in $new_path.
24756  new_path="$input_to_shortpath"
24757
24758  input_path="$input_to_shortpath"
24759  # Check if we need to convert this using DOS-style short mode. If the path
24760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24761  # take no chances and rewrite it.
24762  # Note: m4 eats our [], so we need to use [ and ] instead.
24763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24764  if test "x$has_forbidden_chars" != x; then
24765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24769      # Going to short mode and back again did indeed matter. Since short mode is
24770      # case insensitive, let's make it lowercase to improve readability.
24771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24772      # Now convert it back to Unix-stile (cygpath)
24773      input_path=`$CYGPATH -u "$shortmode_path"`
24774      new_path="$input_path"
24775    fi
24776  fi
24777
24778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24779  if test "x$test_cygdrive_prefix" = x; then
24780    # As a simple fix, exclude /usr/bin since it's not a real path.
24781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24783      # a path prefixed by /cygdrive for fixpath to work.
24784      new_path="$CYGWIN_ROOT_PATH$input_path"
24785    fi
24786  fi
24787
24788  # remove trailing .exe if any
24789  new_path="${new_path/%.exe/}"
24790
24791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24792
24793  # First separate the path from the arguments. This will split at the first
24794  # space.
24795  complete="$MCS"
24796  path="${complete%% *}"
24797  tmp="$complete EOL"
24798  arguments="${tmp#* }"
24799
24800  # Input might be given as Windows format, start by converting to
24801  # unix format.
24802  new_path="$path"
24803
24804  windows_path="$new_path"
24805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24806    unix_path=`$CYGPATH -u "$windows_path"`
24807    new_path="$unix_path"
24808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24810    new_path="$unix_path"
24811  fi
24812
24813
24814  # Now try to locate executable using which
24815  new_path=`$WHICH "$new_path" 2> /dev/null`
24816
24817  if test "x$new_path" = x; then
24818    # Oops. Which didn't find the executable.
24819    # The splitting of arguments from the executable at a space might have been incorrect,
24820    # since paths with space are more likely in Windows. Give it another try with the whole
24821    # argument.
24822    path="$complete"
24823    arguments="EOL"
24824    new_path="$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
24836    new_path=`$WHICH "$new_path" 2> /dev/null`
24837
24838    if test "x$new_path" = x; then
24839      # It's still not found. Now this is an unrecoverable error.
24840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24841$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24842      has_space=`$ECHO "$complete" | $GREP " "`
24843      if test "x$has_space" != x; then
24844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24846      fi
24847      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24848    fi
24849  fi
24850
24851  # Now new_path has a complete unix path to the binary
24852  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24853    # Keep paths in /bin as-is, but remove trailing .exe if any
24854    new_path="${new_path/%.exe/}"
24855    # Do not save /bin paths to all_fixpath_prefixes!
24856  else
24857    # Not in mixed or Windows style, start by that.
24858    new_path=`cmd //c echo $new_path`
24859
24860  input_path="$new_path"
24861  # Check if we need to convert this using DOS-style short mode. If the path
24862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24863  # take no chances and rewrite it.
24864  # Note: m4 eats our [], so we need to use [ and ] instead.
24865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24866  if test "x$has_forbidden_chars" != x; then
24867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24869  fi
24870
24871    # Output is in $new_path
24872
24873  windows_path="$new_path"
24874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24875    unix_path=`$CYGPATH -u "$windows_path"`
24876    new_path="$unix_path"
24877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24879    new_path="$unix_path"
24880  fi
24881
24882    # remove trailing .exe if any
24883    new_path="${new_path/%.exe/}"
24884
24885    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24886    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24887  fi
24888
24889  else
24890    # We're on a posix platform. Hooray! :)
24891    # First separate the path from the arguments. This will split at the first
24892    # space.
24893    complete="$MCS"
24894    path="${complete%% *}"
24895    tmp="$complete EOL"
24896    arguments="${tmp#* }"
24897
24898    new_path=`$WHICH $path 2> /dev/null`
24899    if test "x$new_path" = x; then
24900      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24901      if test "x$is_absolute_path" != x; then
24902        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
24903$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
24904        new_path="$path"
24905      else
24906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24907$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24908        has_space=`$ECHO "$complete" | $GREP " "`
24909        if test "x$has_space" != x; then
24910          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24911$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24912        fi
24913        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24914      fi
24915    fi
24916  fi
24917
24918  # Now join together the path and the arguments once again
24919  if test "x$arguments" != xEOL; then
24920      new_complete="$new_path ${arguments% *}"
24921  else
24922      new_complete="$new_path"
24923  fi
24924
24925  if test "x$complete" != "x$new_complete"; then
24926    MCS="$new_complete"
24927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
24928$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
24929  fi
24930
24931elif test "x$OPENJDK_TARGET_OS" != xwindows; then
24932    if test -n "$ac_tool_prefix"; then
24933  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
24934set dummy ${ac_tool_prefix}nm; ac_word=$2
24935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24936$as_echo_n "checking for $ac_word... " >&6; }
24937if test "${ac_cv_prog_NM+set}" = set; then :
24938  $as_echo_n "(cached) " >&6
24939else
24940  if test -n "$NM"; then
24941  ac_cv_prog_NM="$NM" # Let the user override the test.
24942else
24943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24944for as_dir in $PATH
24945do
24946  IFS=$as_save_IFS
24947  test -z "$as_dir" && as_dir=.
24948    for ac_exec_ext in '' $ac_executable_extensions; do
24949  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24950    ac_cv_prog_NM="${ac_tool_prefix}nm"
24951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24952    break 2
24953  fi
24954done
24955  done
24956IFS=$as_save_IFS
24957
24958fi
24959fi
24960NM=$ac_cv_prog_NM
24961if test -n "$NM"; then
24962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24963$as_echo "$NM" >&6; }
24964else
24965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24966$as_echo "no" >&6; }
24967fi
24968
24969
24970fi
24971if test -z "$ac_cv_prog_NM"; then
24972  ac_ct_NM=$NM
24973  # Extract the first word of "nm", so it can be a program name with args.
24974set dummy nm; ac_word=$2
24975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24976$as_echo_n "checking for $ac_word... " >&6; }
24977if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
24978  $as_echo_n "(cached) " >&6
24979else
24980  if test -n "$ac_ct_NM"; then
24981  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
24982else
24983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24984for as_dir in $PATH
24985do
24986  IFS=$as_save_IFS
24987  test -z "$as_dir" && as_dir=.
24988    for ac_exec_ext in '' $ac_executable_extensions; do
24989  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24990    ac_cv_prog_ac_ct_NM="nm"
24991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24992    break 2
24993  fi
24994done
24995  done
24996IFS=$as_save_IFS
24997
24998fi
24999fi
25000ac_ct_NM=$ac_cv_prog_ac_ct_NM
25001if test -n "$ac_ct_NM"; then
25002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25003$as_echo "$ac_ct_NM" >&6; }
25004else
25005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25006$as_echo "no" >&6; }
25007fi
25008
25009  if test "x$ac_ct_NM" = x; then
25010    NM=""
25011  else
25012    case $cross_compiling:$ac_tool_warned in
25013yes:)
25014{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25015$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25016ac_tool_warned=yes ;;
25017esac
25018    NM=$ac_ct_NM
25019  fi
25020else
25021  NM="$ac_cv_prog_NM"
25022fi
25023
25024
25025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25026
25027  # First separate the path from the arguments. This will split at the first
25028  # space.
25029  complete="$NM"
25030  path="${complete%% *}"
25031  tmp="$complete EOL"
25032  arguments="${tmp#* }"
25033
25034  # Input might be given as Windows format, start by converting to
25035  # unix format.
25036  new_path=`$CYGPATH -u "$path"`
25037
25038  # Now try to locate executable using which
25039  new_path=`$WHICH "$new_path" 2> /dev/null`
25040  # bat and cmd files are not always considered executable in cygwin causing which
25041  # to not find them
25042  if test "x$new_path" = x \
25043           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25044           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25045    new_path=`$CYGPATH -u "$path"`
25046  fi
25047  if test "x$new_path" = x; then
25048    # Oops. Which didn't find the executable.
25049    # The splitting of arguments from the executable at a space might have been incorrect,
25050    # since paths with space are more likely in Windows. Give it another try with the whole
25051    # argument.
25052    path="$complete"
25053    arguments="EOL"
25054    new_path=`$CYGPATH -u "$path"`
25055    new_path=`$WHICH "$new_path" 2> /dev/null`
25056    # bat and cmd files are not always considered executable in cygwin causing which
25057    # to not find them
25058    if test "x$new_path" = x \
25059             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25060             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25061      new_path=`$CYGPATH -u "$path"`
25062    fi
25063    if test "x$new_path" = x; then
25064      # It's still not found. Now this is an unrecoverable error.
25065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25066$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25067      has_space=`$ECHO "$complete" | $GREP " "`
25068      if test "x$has_space" != x; then
25069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25071      fi
25072      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25073    fi
25074  fi
25075
25076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25079  # "foo.exe" is OK but "foo" is an error.
25080  #
25081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25082  # It is also a way to make sure we got the proper file name for the real test later on.
25083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25084  if test "x$test_shortpath" = x; then
25085    # Short path failed, file does not exist as specified.
25086    # Try adding .exe or .cmd
25087    if test -f "${new_path}.exe"; then
25088       input_to_shortpath="${new_path}.exe"
25089    elif test -f "${new_path}.cmd"; then
25090       input_to_shortpath="${new_path}.cmd"
25091    else
25092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25093$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25096      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25097    fi
25098  else
25099    input_to_shortpath="$new_path"
25100  fi
25101
25102  # Call helper function which possibly converts this using DOS-style short mode.
25103  # If so, the updated path is stored in $new_path.
25104  new_path="$input_to_shortpath"
25105
25106  input_path="$input_to_shortpath"
25107  # Check if we need to convert this using DOS-style short mode. If the path
25108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25109  # take no chances and rewrite it.
25110  # Note: m4 eats our [], so we need to use [ and ] instead.
25111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25112  if test "x$has_forbidden_chars" != x; then
25113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25117      # Going to short mode and back again did indeed matter. Since short mode is
25118      # case insensitive, let's make it lowercase to improve readability.
25119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25120      # Now convert it back to Unix-stile (cygpath)
25121      input_path=`$CYGPATH -u "$shortmode_path"`
25122      new_path="$input_path"
25123    fi
25124  fi
25125
25126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25127  if test "x$test_cygdrive_prefix" = x; then
25128    # As a simple fix, exclude /usr/bin since it's not a real path.
25129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25131      # a path prefixed by /cygdrive for fixpath to work.
25132      new_path="$CYGWIN_ROOT_PATH$input_path"
25133    fi
25134  fi
25135
25136  # remove trailing .exe if any
25137  new_path="${new_path/%.exe/}"
25138
25139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25140
25141  # First separate the path from the arguments. This will split at the first
25142  # space.
25143  complete="$NM"
25144  path="${complete%% *}"
25145  tmp="$complete EOL"
25146  arguments="${tmp#* }"
25147
25148  # Input might be given as Windows format, start by converting to
25149  # unix format.
25150  new_path="$path"
25151
25152  windows_path="$new_path"
25153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25154    unix_path=`$CYGPATH -u "$windows_path"`
25155    new_path="$unix_path"
25156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25158    new_path="$unix_path"
25159  fi
25160
25161
25162  # Now try to locate executable using which
25163  new_path=`$WHICH "$new_path" 2> /dev/null`
25164
25165  if test "x$new_path" = x; then
25166    # Oops. Which didn't find the executable.
25167    # The splitting of arguments from the executable at a space might have been incorrect,
25168    # since paths with space are more likely in Windows. Give it another try with the whole
25169    # argument.
25170    path="$complete"
25171    arguments="EOL"
25172    new_path="$path"
25173
25174  windows_path="$new_path"
25175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25176    unix_path=`$CYGPATH -u "$windows_path"`
25177    new_path="$unix_path"
25178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25180    new_path="$unix_path"
25181  fi
25182
25183
25184    new_path=`$WHICH "$new_path" 2> /dev/null`
25185
25186    if test "x$new_path" = x; then
25187      # It's still not found. Now this is an unrecoverable error.
25188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25189$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25190      has_space=`$ECHO "$complete" | $GREP " "`
25191      if test "x$has_space" != x; then
25192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25194      fi
25195      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25196    fi
25197  fi
25198
25199  # Now new_path has a complete unix path to the binary
25200  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25201    # Keep paths in /bin as-is, but remove trailing .exe if any
25202    new_path="${new_path/%.exe/}"
25203    # Do not save /bin paths to all_fixpath_prefixes!
25204  else
25205    # Not in mixed or Windows style, start by that.
25206    new_path=`cmd //c echo $new_path`
25207
25208  input_path="$new_path"
25209  # Check if we need to convert this using DOS-style short mode. If the path
25210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25211  # take no chances and rewrite it.
25212  # Note: m4 eats our [], so we need to use [ and ] instead.
25213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25214  if test "x$has_forbidden_chars" != x; then
25215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25216    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25217  fi
25218
25219    # Output is in $new_path
25220
25221  windows_path="$new_path"
25222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25223    unix_path=`$CYGPATH -u "$windows_path"`
25224    new_path="$unix_path"
25225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25227    new_path="$unix_path"
25228  fi
25229
25230    # remove trailing .exe if any
25231    new_path="${new_path/%.exe/}"
25232
25233    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25234    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25235  fi
25236
25237  else
25238    # We're on a posix platform. Hooray! :)
25239    # First separate the path from the arguments. This will split at the first
25240    # space.
25241    complete="$NM"
25242    path="${complete%% *}"
25243    tmp="$complete EOL"
25244    arguments="${tmp#* }"
25245
25246    new_path=`$WHICH $path 2> /dev/null`
25247    if test "x$new_path" = x; then
25248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25249      if test "x$is_absolute_path" != x; then
25250        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25251$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25252        new_path="$path"
25253      else
25254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25255$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25256        has_space=`$ECHO "$complete" | $GREP " "`
25257        if test "x$has_space" != x; then
25258          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25260        fi
25261        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25262      fi
25263    fi
25264  fi
25265
25266  # Now join together the path and the arguments once again
25267  if test "x$arguments" != xEOL; then
25268      new_complete="$new_path ${arguments% *}"
25269  else
25270      new_complete="$new_path"
25271  fi
25272
25273  if test "x$complete" != "x$new_complete"; then
25274    NM="$new_complete"
25275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25276$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25277  fi
25278
25279    if test -n "$ac_tool_prefix"; then
25280  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25281set dummy ${ac_tool_prefix}strip; ac_word=$2
25282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25283$as_echo_n "checking for $ac_word... " >&6; }
25284if test "${ac_cv_prog_STRIP+set}" = set; then :
25285  $as_echo_n "(cached) " >&6
25286else
25287  if test -n "$STRIP"; then
25288  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25289else
25290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25291for as_dir in $PATH
25292do
25293  IFS=$as_save_IFS
25294  test -z "$as_dir" && as_dir=.
25295    for ac_exec_ext in '' $ac_executable_extensions; do
25296  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25297    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25299    break 2
25300  fi
25301done
25302  done
25303IFS=$as_save_IFS
25304
25305fi
25306fi
25307STRIP=$ac_cv_prog_STRIP
25308if test -n "$STRIP"; then
25309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25310$as_echo "$STRIP" >&6; }
25311else
25312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25313$as_echo "no" >&6; }
25314fi
25315
25316
25317fi
25318if test -z "$ac_cv_prog_STRIP"; then
25319  ac_ct_STRIP=$STRIP
25320  # Extract the first word of "strip", so it can be a program name with args.
25321set dummy strip; ac_word=$2
25322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25323$as_echo_n "checking for $ac_word... " >&6; }
25324if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25325  $as_echo_n "(cached) " >&6
25326else
25327  if test -n "$ac_ct_STRIP"; then
25328  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25329else
25330as_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_prog_ac_ct_STRIP="strip"
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
25345fi
25346fi
25347ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25348if test -n "$ac_ct_STRIP"; then
25349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25350$as_echo "$ac_ct_STRIP" >&6; }
25351else
25352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25353$as_echo "no" >&6; }
25354fi
25355
25356  if test "x$ac_ct_STRIP" = x; then
25357    STRIP=""
25358  else
25359    case $cross_compiling:$ac_tool_warned in
25360yes:)
25361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25363ac_tool_warned=yes ;;
25364esac
25365    STRIP=$ac_ct_STRIP
25366  fi
25367else
25368  STRIP="$ac_cv_prog_STRIP"
25369fi
25370
25371
25372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25373
25374  # First separate the path from the arguments. This will split at the first
25375  # space.
25376  complete="$STRIP"
25377  path="${complete%% *}"
25378  tmp="$complete EOL"
25379  arguments="${tmp#* }"
25380
25381  # Input might be given as Windows format, start by converting to
25382  # unix format.
25383  new_path=`$CYGPATH -u "$path"`
25384
25385  # Now try to locate executable using which
25386  new_path=`$WHICH "$new_path" 2> /dev/null`
25387  # bat and cmd files are not always considered executable in cygwin causing which
25388  # to not find them
25389  if test "x$new_path" = x \
25390           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25391           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25392    new_path=`$CYGPATH -u "$path"`
25393  fi
25394  if test "x$new_path" = x; then
25395    # Oops. Which didn't find the executable.
25396    # The splitting of arguments from the executable at a space might have been incorrect,
25397    # since paths with space are more likely in Windows. Give it another try with the whole
25398    # argument.
25399    path="$complete"
25400    arguments="EOL"
25401    new_path=`$CYGPATH -u "$path"`
25402    new_path=`$WHICH "$new_path" 2> /dev/null`
25403    # bat and cmd files are not always considered executable in cygwin causing which
25404    # to not find them
25405    if test "x$new_path" = x \
25406             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25407             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25408      new_path=`$CYGPATH -u "$path"`
25409    fi
25410    if test "x$new_path" = x; then
25411      # It's still not found. Now this is an unrecoverable error.
25412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25413$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25414      has_space=`$ECHO "$complete" | $GREP " "`
25415      if test "x$has_space" != x; then
25416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25418      fi
25419      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25420    fi
25421  fi
25422
25423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25426  # "foo.exe" is OK but "foo" is an error.
25427  #
25428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25429  # It is also a way to make sure we got the proper file name for the real test later on.
25430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25431  if test "x$test_shortpath" = x; then
25432    # Short path failed, file does not exist as specified.
25433    # Try adding .exe or .cmd
25434    if test -f "${new_path}.exe"; then
25435       input_to_shortpath="${new_path}.exe"
25436    elif test -f "${new_path}.cmd"; then
25437       input_to_shortpath="${new_path}.cmd"
25438    else
25439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25440$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25441      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25442$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25443      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25444    fi
25445  else
25446    input_to_shortpath="$new_path"
25447  fi
25448
25449  # Call helper function which possibly converts this using DOS-style short mode.
25450  # If so, the updated path is stored in $new_path.
25451  new_path="$input_to_shortpath"
25452
25453  input_path="$input_to_shortpath"
25454  # Check if we need to convert this using DOS-style short mode. If the path
25455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25456  # take no chances and rewrite it.
25457  # Note: m4 eats our [], so we need to use [ and ] instead.
25458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25459  if test "x$has_forbidden_chars" != x; then
25460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25464      # Going to short mode and back again did indeed matter. Since short mode is
25465      # case insensitive, let's make it lowercase to improve readability.
25466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25467      # Now convert it back to Unix-stile (cygpath)
25468      input_path=`$CYGPATH -u "$shortmode_path"`
25469      new_path="$input_path"
25470    fi
25471  fi
25472
25473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25474  if test "x$test_cygdrive_prefix" = x; then
25475    # As a simple fix, exclude /usr/bin since it's not a real path.
25476    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25478      # a path prefixed by /cygdrive for fixpath to work.
25479      new_path="$CYGWIN_ROOT_PATH$input_path"
25480    fi
25481  fi
25482
25483  # remove trailing .exe if any
25484  new_path="${new_path/%.exe/}"
25485
25486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487
25488  # First separate the path from the arguments. This will split at the first
25489  # space.
25490  complete="$STRIP"
25491  path="${complete%% *}"
25492  tmp="$complete EOL"
25493  arguments="${tmp#* }"
25494
25495  # Input might be given as Windows format, start by converting to
25496  # unix format.
25497  new_path="$path"
25498
25499  windows_path="$new_path"
25500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25501    unix_path=`$CYGPATH -u "$windows_path"`
25502    new_path="$unix_path"
25503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25505    new_path="$unix_path"
25506  fi
25507
25508
25509  # Now try to locate executable using which
25510  new_path=`$WHICH "$new_path" 2> /dev/null`
25511
25512  if test "x$new_path" = x; then
25513    # Oops. Which didn't find the executable.
25514    # The splitting of arguments from the executable at a space might have been incorrect,
25515    # since paths with space are more likely in Windows. Give it another try with the whole
25516    # argument.
25517    path="$complete"
25518    arguments="EOL"
25519    new_path="$path"
25520
25521  windows_path="$new_path"
25522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25523    unix_path=`$CYGPATH -u "$windows_path"`
25524    new_path="$unix_path"
25525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25527    new_path="$unix_path"
25528  fi
25529
25530
25531    new_path=`$WHICH "$new_path" 2> /dev/null`
25532
25533    if test "x$new_path" = x; then
25534      # It's still not found. Now this is an unrecoverable error.
25535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25536$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25537      has_space=`$ECHO "$complete" | $GREP " "`
25538      if test "x$has_space" != x; then
25539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25541      fi
25542      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25543    fi
25544  fi
25545
25546  # Now new_path has a complete unix path to the binary
25547  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25548    # Keep paths in /bin as-is, but remove trailing .exe if any
25549    new_path="${new_path/%.exe/}"
25550    # Do not save /bin paths to all_fixpath_prefixes!
25551  else
25552    # Not in mixed or Windows style, start by that.
25553    new_path=`cmd //c echo $new_path`
25554
25555  input_path="$new_path"
25556  # Check if we need to convert this using DOS-style short mode. If the path
25557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25558  # take no chances and rewrite it.
25559  # Note: m4 eats our [], so we need to use [ and ] instead.
25560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25561  if test "x$has_forbidden_chars" != x; then
25562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25564  fi
25565
25566    # Output is in $new_path
25567
25568  windows_path="$new_path"
25569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25570    unix_path=`$CYGPATH -u "$windows_path"`
25571    new_path="$unix_path"
25572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25574    new_path="$unix_path"
25575  fi
25576
25577    # remove trailing .exe if any
25578    new_path="${new_path/%.exe/}"
25579
25580    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25581    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25582  fi
25583
25584  else
25585    # We're on a posix platform. Hooray! :)
25586    # First separate the path from the arguments. This will split at the first
25587    # space.
25588    complete="$STRIP"
25589    path="${complete%% *}"
25590    tmp="$complete EOL"
25591    arguments="${tmp#* }"
25592
25593    new_path=`$WHICH $path 2> /dev/null`
25594    if test "x$new_path" = x; then
25595      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25596      if test "x$is_absolute_path" != x; then
25597        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25598$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25599        new_path="$path"
25600      else
25601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25602$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25603        has_space=`$ECHO "$complete" | $GREP " "`
25604        if test "x$has_space" != x; then
25605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25607        fi
25608        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25609      fi
25610    fi
25611  fi
25612
25613  # Now join together the path and the arguments once again
25614  if test "x$arguments" != xEOL; then
25615      new_complete="$new_path ${arguments% *}"
25616  else
25617      new_complete="$new_path"
25618  fi
25619
25620  if test "x$complete" != "x$new_complete"; then
25621    STRIP="$new_complete"
25622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25623$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25624  fi
25625
25626fi
25627
25628# objcopy is used for moving debug symbols to separate files when
25629# full debug symbols are enabled.
25630if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25631    if test -n "$ac_tool_prefix"; then
25632  for ac_prog in gobjcopy objcopy
25633  do
25634    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25635set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25637$as_echo_n "checking for $ac_word... " >&6; }
25638if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25639  $as_echo_n "(cached) " >&6
25640else
25641  if test -n "$OBJCOPY"; then
25642  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25643else
25644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25645for as_dir in $PATH
25646do
25647  IFS=$as_save_IFS
25648  test -z "$as_dir" && as_dir=.
25649    for ac_exec_ext in '' $ac_executable_extensions; do
25650  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25651    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25653    break 2
25654  fi
25655done
25656  done
25657IFS=$as_save_IFS
25658
25659fi
25660fi
25661OBJCOPY=$ac_cv_prog_OBJCOPY
25662if test -n "$OBJCOPY"; then
25663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25664$as_echo "$OBJCOPY" >&6; }
25665else
25666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25667$as_echo "no" >&6; }
25668fi
25669
25670
25671    test -n "$OBJCOPY" && break
25672  done
25673fi
25674if test -z "$OBJCOPY"; then
25675  ac_ct_OBJCOPY=$OBJCOPY
25676  for ac_prog in gobjcopy objcopy
25677do
25678  # Extract the first word of "$ac_prog", so it can be a program name with args.
25679set dummy $ac_prog; ac_word=$2
25680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25681$as_echo_n "checking for $ac_word... " >&6; }
25682if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25683  $as_echo_n "(cached) " >&6
25684else
25685  if test -n "$ac_ct_OBJCOPY"; then
25686  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25687else
25688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25689for as_dir in $PATH
25690do
25691  IFS=$as_save_IFS
25692  test -z "$as_dir" && as_dir=.
25693    for ac_exec_ext in '' $ac_executable_extensions; do
25694  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25695    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25697    break 2
25698  fi
25699done
25700  done
25701IFS=$as_save_IFS
25702
25703fi
25704fi
25705ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25706if test -n "$ac_ct_OBJCOPY"; then
25707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25708$as_echo "$ac_ct_OBJCOPY" >&6; }
25709else
25710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25711$as_echo "no" >&6; }
25712fi
25713
25714
25715  test -n "$ac_ct_OBJCOPY" && break
25716done
25717
25718  if test "x$ac_ct_OBJCOPY" = x; then
25719    OBJCOPY=""
25720  else
25721    case $cross_compiling:$ac_tool_warned in
25722yes:)
25723{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25724$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25725ac_tool_warned=yes ;;
25726esac
25727    OBJCOPY=$ac_ct_OBJCOPY
25728  fi
25729fi
25730
25731    # Only call fixup if objcopy was found.
25732    if test -n "$OBJCOPY"; then
25733
25734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25735
25736  # First separate the path from the arguments. This will split at the first
25737  # space.
25738  complete="$OBJCOPY"
25739  path="${complete%% *}"
25740  tmp="$complete EOL"
25741  arguments="${tmp#* }"
25742
25743  # Input might be given as Windows format, start by converting to
25744  # unix format.
25745  new_path=`$CYGPATH -u "$path"`
25746
25747  # Now try to locate executable using which
25748  new_path=`$WHICH "$new_path" 2> /dev/null`
25749  # bat and cmd files are not always considered executable in cygwin causing which
25750  # to not find them
25751  if test "x$new_path" = x \
25752           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25753           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25754    new_path=`$CYGPATH -u "$path"`
25755  fi
25756  if test "x$new_path" = x; then
25757    # Oops. Which didn't find the executable.
25758    # The splitting of arguments from the executable at a space might have been incorrect,
25759    # since paths with space are more likely in Windows. Give it another try with the whole
25760    # argument.
25761    path="$complete"
25762    arguments="EOL"
25763    new_path=`$CYGPATH -u "$path"`
25764    new_path=`$WHICH "$new_path" 2> /dev/null`
25765    # bat and cmd files are not always considered executable in cygwin causing which
25766    # to not find them
25767    if test "x$new_path" = x \
25768             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25769             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25770      new_path=`$CYGPATH -u "$path"`
25771    fi
25772    if test "x$new_path" = x; then
25773      # It's still not found. Now this is an unrecoverable error.
25774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25775$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25776      has_space=`$ECHO "$complete" | $GREP " "`
25777      if test "x$has_space" != x; then
25778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25780      fi
25781      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25782    fi
25783  fi
25784
25785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25788  # "foo.exe" is OK but "foo" is an error.
25789  #
25790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25791  # It is also a way to make sure we got the proper file name for the real test later on.
25792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25793  if test "x$test_shortpath" = x; then
25794    # Short path failed, file does not exist as specified.
25795    # Try adding .exe or .cmd
25796    if test -f "${new_path}.exe"; then
25797       input_to_shortpath="${new_path}.exe"
25798    elif test -f "${new_path}.cmd"; then
25799       input_to_shortpath="${new_path}.cmd"
25800    else
25801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25802$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25805      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25806    fi
25807  else
25808    input_to_shortpath="$new_path"
25809  fi
25810
25811  # Call helper function which possibly converts this using DOS-style short mode.
25812  # If so, the updated path is stored in $new_path.
25813  new_path="$input_to_shortpath"
25814
25815  input_path="$input_to_shortpath"
25816  # Check if we need to convert this using DOS-style short mode. If the path
25817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25818  # take no chances and rewrite it.
25819  # Note: m4 eats our [], so we need to use [ and ] instead.
25820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25821  if test "x$has_forbidden_chars" != x; then
25822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25826      # Going to short mode and back again did indeed matter. Since short mode is
25827      # case insensitive, let's make it lowercase to improve readability.
25828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25829      # Now convert it back to Unix-stile (cygpath)
25830      input_path=`$CYGPATH -u "$shortmode_path"`
25831      new_path="$input_path"
25832    fi
25833  fi
25834
25835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25836  if test "x$test_cygdrive_prefix" = x; then
25837    # As a simple fix, exclude /usr/bin since it's not a real path.
25838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25840      # a path prefixed by /cygdrive for fixpath to work.
25841      new_path="$CYGWIN_ROOT_PATH$input_path"
25842    fi
25843  fi
25844
25845  # remove trailing .exe if any
25846  new_path="${new_path/%.exe/}"
25847
25848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25849
25850  # First separate the path from the arguments. This will split at the first
25851  # space.
25852  complete="$OBJCOPY"
25853  path="${complete%% *}"
25854  tmp="$complete EOL"
25855  arguments="${tmp#* }"
25856
25857  # Input might be given as Windows format, start by converting to
25858  # unix format.
25859  new_path="$path"
25860
25861  windows_path="$new_path"
25862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25863    unix_path=`$CYGPATH -u "$windows_path"`
25864    new_path="$unix_path"
25865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25867    new_path="$unix_path"
25868  fi
25869
25870
25871  # Now try to locate executable using which
25872  new_path=`$WHICH "$new_path" 2> /dev/null`
25873
25874  if test "x$new_path" = x; then
25875    # Oops. Which didn't find the executable.
25876    # The splitting of arguments from the executable at a space might have been incorrect,
25877    # since paths with space are more likely in Windows. Give it another try with the whole
25878    # argument.
25879    path="$complete"
25880    arguments="EOL"
25881    new_path="$path"
25882
25883  windows_path="$new_path"
25884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25885    unix_path=`$CYGPATH -u "$windows_path"`
25886    new_path="$unix_path"
25887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25889    new_path="$unix_path"
25890  fi
25891
25892
25893    new_path=`$WHICH "$new_path" 2> /dev/null`
25894
25895    if test "x$new_path" = x; then
25896      # It's still not found. Now this is an unrecoverable error.
25897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25898$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25899      has_space=`$ECHO "$complete" | $GREP " "`
25900      if test "x$has_space" != x; then
25901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25903      fi
25904      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25905    fi
25906  fi
25907
25908  # Now new_path has a complete unix path to the binary
25909  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25910    # Keep paths in /bin as-is, but remove trailing .exe if any
25911    new_path="${new_path/%.exe/}"
25912    # Do not save /bin paths to all_fixpath_prefixes!
25913  else
25914    # Not in mixed or Windows style, start by that.
25915    new_path=`cmd //c echo $new_path`
25916
25917  input_path="$new_path"
25918  # Check if we need to convert this using DOS-style short mode. If the path
25919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25920  # take no chances and rewrite it.
25921  # Note: m4 eats our [], so we need to use [ and ] instead.
25922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25923  if test "x$has_forbidden_chars" != x; then
25924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25926  fi
25927
25928    # Output is in $new_path
25929
25930  windows_path="$new_path"
25931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25932    unix_path=`$CYGPATH -u "$windows_path"`
25933    new_path="$unix_path"
25934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25936    new_path="$unix_path"
25937  fi
25938
25939    # remove trailing .exe if any
25940    new_path="${new_path/%.exe/}"
25941
25942    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25943    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25944  fi
25945
25946  else
25947    # We're on a posix platform. Hooray! :)
25948    # First separate the path from the arguments. This will split at the first
25949    # space.
25950    complete="$OBJCOPY"
25951    path="${complete%% *}"
25952    tmp="$complete EOL"
25953    arguments="${tmp#* }"
25954
25955    new_path=`$WHICH $path 2> /dev/null`
25956    if test "x$new_path" = x; then
25957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25958      if test "x$is_absolute_path" != x; then
25959        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
25960$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
25961        new_path="$path"
25962      else
25963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25964$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25965        has_space=`$ECHO "$complete" | $GREP " "`
25966        if test "x$has_space" != x; then
25967          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25968$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25969        fi
25970        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25971      fi
25972    fi
25973  fi
25974
25975  # Now join together the path and the arguments once again
25976  if test "x$arguments" != xEOL; then
25977      new_complete="$new_path ${arguments% *}"
25978  else
25979      new_complete="$new_path"
25980  fi
25981
25982  if test "x$complete" != "x$new_complete"; then
25983    OBJCOPY="$new_complete"
25984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
25985$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
25986  fi
25987
25988    fi
25989fi
25990
25991if test -n "$ac_tool_prefix"; then
25992  for ac_prog in gobjdump objdump
25993  do
25994    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25995set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25997$as_echo_n "checking for $ac_word... " >&6; }
25998if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
25999  $as_echo_n "(cached) " >&6
26000else
26001  if test -n "$OBJDUMP"; then
26002  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26003else
26004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26005for as_dir in $PATH
26006do
26007  IFS=$as_save_IFS
26008  test -z "$as_dir" && as_dir=.
26009    for ac_exec_ext in '' $ac_executable_extensions; do
26010  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26011    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26013    break 2
26014  fi
26015done
26016  done
26017IFS=$as_save_IFS
26018
26019fi
26020fi
26021OBJDUMP=$ac_cv_prog_OBJDUMP
26022if test -n "$OBJDUMP"; then
26023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26024$as_echo "$OBJDUMP" >&6; }
26025else
26026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26027$as_echo "no" >&6; }
26028fi
26029
26030
26031    test -n "$OBJDUMP" && break
26032  done
26033fi
26034if test -z "$OBJDUMP"; then
26035  ac_ct_OBJDUMP=$OBJDUMP
26036  for ac_prog in gobjdump objdump
26037do
26038  # Extract the first word of "$ac_prog", so it can be a program name with args.
26039set dummy $ac_prog; ac_word=$2
26040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26041$as_echo_n "checking for $ac_word... " >&6; }
26042if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26043  $as_echo_n "(cached) " >&6
26044else
26045  if test -n "$ac_ct_OBJDUMP"; then
26046  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26047else
26048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26049for as_dir in $PATH
26050do
26051  IFS=$as_save_IFS
26052  test -z "$as_dir" && as_dir=.
26053    for ac_exec_ext in '' $ac_executable_extensions; do
26054  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26055    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26057    break 2
26058  fi
26059done
26060  done
26061IFS=$as_save_IFS
26062
26063fi
26064fi
26065ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26066if test -n "$ac_ct_OBJDUMP"; then
26067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26068$as_echo "$ac_ct_OBJDUMP" >&6; }
26069else
26070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26071$as_echo "no" >&6; }
26072fi
26073
26074
26075  test -n "$ac_ct_OBJDUMP" && break
26076done
26077
26078  if test "x$ac_ct_OBJDUMP" = x; then
26079    OBJDUMP=""
26080  else
26081    case $cross_compiling:$ac_tool_warned in
26082yes:)
26083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26085ac_tool_warned=yes ;;
26086esac
26087    OBJDUMP=$ac_ct_OBJDUMP
26088  fi
26089fi
26090
26091if test "x$OBJDUMP" != x; then
26092  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26093
26094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26095
26096  # First separate the path from the arguments. This will split at the first
26097  # space.
26098  complete="$OBJDUMP"
26099  path="${complete%% *}"
26100  tmp="$complete EOL"
26101  arguments="${tmp#* }"
26102
26103  # Input might be given as Windows format, start by converting to
26104  # unix format.
26105  new_path=`$CYGPATH -u "$path"`
26106
26107  # Now try to locate executable using which
26108  new_path=`$WHICH "$new_path" 2> /dev/null`
26109  # bat and cmd files are not always considered executable in cygwin causing which
26110  # to not find them
26111  if test "x$new_path" = x \
26112           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26113           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26114    new_path=`$CYGPATH -u "$path"`
26115  fi
26116  if test "x$new_path" = x; then
26117    # Oops. Which didn't find the executable.
26118    # The splitting of arguments from the executable at a space might have been incorrect,
26119    # since paths with space are more likely in Windows. Give it another try with the whole
26120    # argument.
26121    path="$complete"
26122    arguments="EOL"
26123    new_path=`$CYGPATH -u "$path"`
26124    new_path=`$WHICH "$new_path" 2> /dev/null`
26125    # bat and cmd files are not always considered executable in cygwin causing which
26126    # to not find them
26127    if test "x$new_path" = x \
26128             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26129             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26130      new_path=`$CYGPATH -u "$path"`
26131    fi
26132    if test "x$new_path" = x; then
26133      # It's still not found. Now this is an unrecoverable error.
26134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26135$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26136      has_space=`$ECHO "$complete" | $GREP " "`
26137      if test "x$has_space" != x; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26140      fi
26141      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26142    fi
26143  fi
26144
26145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26148  # "foo.exe" is OK but "foo" is an error.
26149  #
26150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26151  # It is also a way to make sure we got the proper file name for the real test later on.
26152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26153  if test "x$test_shortpath" = x; then
26154    # Short path failed, file does not exist as specified.
26155    # Try adding .exe or .cmd
26156    if test -f "${new_path}.exe"; then
26157       input_to_shortpath="${new_path}.exe"
26158    elif test -f "${new_path}.cmd"; then
26159       input_to_shortpath="${new_path}.cmd"
26160    else
26161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26162$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26163      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26164$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26165      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26166    fi
26167  else
26168    input_to_shortpath="$new_path"
26169  fi
26170
26171  # Call helper function which possibly converts this using DOS-style short mode.
26172  # If so, the updated path is stored in $new_path.
26173  new_path="$input_to_shortpath"
26174
26175  input_path="$input_to_shortpath"
26176  # Check if we need to convert this using DOS-style short mode. If the path
26177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26178  # take no chances and rewrite it.
26179  # Note: m4 eats our [], so we need to use [ and ] instead.
26180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26181  if test "x$has_forbidden_chars" != x; then
26182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26186      # Going to short mode and back again did indeed matter. Since short mode is
26187      # case insensitive, let's make it lowercase to improve readability.
26188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26189      # Now convert it back to Unix-stile (cygpath)
26190      input_path=`$CYGPATH -u "$shortmode_path"`
26191      new_path="$input_path"
26192    fi
26193  fi
26194
26195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26196  if test "x$test_cygdrive_prefix" = x; then
26197    # As a simple fix, exclude /usr/bin since it's not a real path.
26198    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26200      # a path prefixed by /cygdrive for fixpath to work.
26201      new_path="$CYGWIN_ROOT_PATH$input_path"
26202    fi
26203  fi
26204
26205  # remove trailing .exe if any
26206  new_path="${new_path/%.exe/}"
26207
26208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26209
26210  # First separate the path from the arguments. This will split at the first
26211  # space.
26212  complete="$OBJDUMP"
26213  path="${complete%% *}"
26214  tmp="$complete EOL"
26215  arguments="${tmp#* }"
26216
26217  # Input might be given as Windows format, start by converting to
26218  # unix format.
26219  new_path="$path"
26220
26221  windows_path="$new_path"
26222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26223    unix_path=`$CYGPATH -u "$windows_path"`
26224    new_path="$unix_path"
26225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26227    new_path="$unix_path"
26228  fi
26229
26230
26231  # Now try to locate executable using which
26232  new_path=`$WHICH "$new_path" 2> /dev/null`
26233
26234  if test "x$new_path" = x; then
26235    # Oops. Which didn't find the executable.
26236    # The splitting of arguments from the executable at a space might have been incorrect,
26237    # since paths with space are more likely in Windows. Give it another try with the whole
26238    # argument.
26239    path="$complete"
26240    arguments="EOL"
26241    new_path="$path"
26242
26243  windows_path="$new_path"
26244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26245    unix_path=`$CYGPATH -u "$windows_path"`
26246    new_path="$unix_path"
26247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26249    new_path="$unix_path"
26250  fi
26251
26252
26253    new_path=`$WHICH "$new_path" 2> /dev/null`
26254
26255    if test "x$new_path" = x; then
26256      # It's still not found. Now this is an unrecoverable error.
26257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26258$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26259      has_space=`$ECHO "$complete" | $GREP " "`
26260      if test "x$has_space" != x; then
26261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26263      fi
26264      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26265    fi
26266  fi
26267
26268  # Now new_path has a complete unix path to the binary
26269  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26270    # Keep paths in /bin as-is, but remove trailing .exe if any
26271    new_path="${new_path/%.exe/}"
26272    # Do not save /bin paths to all_fixpath_prefixes!
26273  else
26274    # Not in mixed or Windows style, start by that.
26275    new_path=`cmd //c echo $new_path`
26276
26277  input_path="$new_path"
26278  # Check if we need to convert this using DOS-style short mode. If the path
26279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26280  # take no chances and rewrite it.
26281  # Note: m4 eats our [], so we need to use [ and ] instead.
26282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26283  if test "x$has_forbidden_chars" != x; then
26284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26286  fi
26287
26288    # Output is in $new_path
26289
26290  windows_path="$new_path"
26291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26292    unix_path=`$CYGPATH -u "$windows_path"`
26293    new_path="$unix_path"
26294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26296    new_path="$unix_path"
26297  fi
26298
26299    # remove trailing .exe if any
26300    new_path="${new_path/%.exe/}"
26301
26302    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26303    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26304  fi
26305
26306  else
26307    # We're on a posix platform. Hooray! :)
26308    # First separate the path from the arguments. This will split at the first
26309    # space.
26310    complete="$OBJDUMP"
26311    path="${complete%% *}"
26312    tmp="$complete EOL"
26313    arguments="${tmp#* }"
26314
26315    new_path=`$WHICH $path 2> /dev/null`
26316    if test "x$new_path" = x; then
26317      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26318      if test "x$is_absolute_path" != x; then
26319        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26320$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26321        new_path="$path"
26322      else
26323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26324$as_echo "$as_me: The path of OBJDUMP, 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}: This might be caused by spaces in the path, which is not allowed." >&5
26328$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26329        fi
26330        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26331      fi
26332    fi
26333  fi
26334
26335  # Now join together the path and the arguments once again
26336  if test "x$arguments" != xEOL; then
26337      new_complete="$new_path ${arguments% *}"
26338  else
26339      new_complete="$new_path"
26340  fi
26341
26342  if test "x$complete" != "x$new_complete"; then
26343    OBJDUMP="$new_complete"
26344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26345$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26346  fi
26347
26348fi
26349
26350if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26351   # Extract the first word of "lipo", so it can be a program name with args.
26352set dummy lipo; ac_word=$2
26353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26354$as_echo_n "checking for $ac_word... " >&6; }
26355if test "${ac_cv_path_LIPO+set}" = set; then :
26356  $as_echo_n "(cached) " >&6
26357else
26358  case $LIPO in
26359  [\\/]* | ?:[\\/]*)
26360  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26361  ;;
26362  *)
26363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26364for as_dir in $PATH
26365do
26366  IFS=$as_save_IFS
26367  test -z "$as_dir" && as_dir=.
26368    for ac_exec_ext in '' $ac_executable_extensions; do
26369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26370    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26372    break 2
26373  fi
26374done
26375  done
26376IFS=$as_save_IFS
26377
26378  ;;
26379esac
26380fi
26381LIPO=$ac_cv_path_LIPO
26382if test -n "$LIPO"; then
26383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26384$as_echo "$LIPO" >&6; }
26385else
26386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26387$as_echo "no" >&6; }
26388fi
26389
26390
26391
26392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26393
26394  # First separate the path from the arguments. This will split at the first
26395  # space.
26396  complete="$LIPO"
26397  path="${complete%% *}"
26398  tmp="$complete EOL"
26399  arguments="${tmp#* }"
26400
26401  # Input might be given as Windows format, start by converting to
26402  # unix format.
26403  new_path=`$CYGPATH -u "$path"`
26404
26405  # Now try to locate executable using which
26406  new_path=`$WHICH "$new_path" 2> /dev/null`
26407  # bat and cmd files are not always considered executable in cygwin causing which
26408  # to not find them
26409  if test "x$new_path" = x \
26410           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26411           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26412    new_path=`$CYGPATH -u "$path"`
26413  fi
26414  if test "x$new_path" = x; then
26415    # Oops. Which didn't find the executable.
26416    # The splitting of arguments from the executable at a space might have been incorrect,
26417    # since paths with space are more likely in Windows. Give it another try with the whole
26418    # argument.
26419    path="$complete"
26420    arguments="EOL"
26421    new_path=`$CYGPATH -u "$path"`
26422    new_path=`$WHICH "$new_path" 2> /dev/null`
26423    # bat and cmd files are not always considered executable in cygwin causing which
26424    # to not find them
26425    if test "x$new_path" = x \
26426             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26427             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26428      new_path=`$CYGPATH -u "$path"`
26429    fi
26430    if test "x$new_path" = x; then
26431      # It's still not found. Now this is an unrecoverable error.
26432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26433$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26434      has_space=`$ECHO "$complete" | $GREP " "`
26435      if test "x$has_space" != x; then
26436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26438      fi
26439      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26440    fi
26441  fi
26442
26443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26446  # "foo.exe" is OK but "foo" is an error.
26447  #
26448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26449  # It is also a way to make sure we got the proper file name for the real test later on.
26450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26451  if test "x$test_shortpath" = x; then
26452    # Short path failed, file does not exist as specified.
26453    # Try adding .exe or .cmd
26454    if test -f "${new_path}.exe"; then
26455       input_to_shortpath="${new_path}.exe"
26456    elif test -f "${new_path}.cmd"; then
26457       input_to_shortpath="${new_path}.cmd"
26458    else
26459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26460$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26461      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26462$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26463      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26464    fi
26465  else
26466    input_to_shortpath="$new_path"
26467  fi
26468
26469  # Call helper function which possibly converts this using DOS-style short mode.
26470  # If so, the updated path is stored in $new_path.
26471  new_path="$input_to_shortpath"
26472
26473  input_path="$input_to_shortpath"
26474  # Check if we need to convert this using DOS-style short mode. If the path
26475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26476  # take no chances and rewrite it.
26477  # Note: m4 eats our [], so we need to use [ and ] instead.
26478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26479  if test "x$has_forbidden_chars" != x; then
26480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26484      # Going to short mode and back again did indeed matter. Since short mode is
26485      # case insensitive, let's make it lowercase to improve readability.
26486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26487      # Now convert it back to Unix-stile (cygpath)
26488      input_path=`$CYGPATH -u "$shortmode_path"`
26489      new_path="$input_path"
26490    fi
26491  fi
26492
26493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26494  if test "x$test_cygdrive_prefix" = x; then
26495    # As a simple fix, exclude /usr/bin since it's not a real path.
26496    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26498      # a path prefixed by /cygdrive for fixpath to work.
26499      new_path="$CYGWIN_ROOT_PATH$input_path"
26500    fi
26501  fi
26502
26503  # remove trailing .exe if any
26504  new_path="${new_path/%.exe/}"
26505
26506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26507
26508  # First separate the path from the arguments. This will split at the first
26509  # space.
26510  complete="$LIPO"
26511  path="${complete%% *}"
26512  tmp="$complete EOL"
26513  arguments="${tmp#* }"
26514
26515  # Input might be given as Windows format, start by converting to
26516  # unix format.
26517  new_path="$path"
26518
26519  windows_path="$new_path"
26520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26521    unix_path=`$CYGPATH -u "$windows_path"`
26522    new_path="$unix_path"
26523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26525    new_path="$unix_path"
26526  fi
26527
26528
26529  # Now try to locate executable using which
26530  new_path=`$WHICH "$new_path" 2> /dev/null`
26531
26532  if test "x$new_path" = x; then
26533    # Oops. Which didn't find the executable.
26534    # The splitting of arguments from the executable at a space might have been incorrect,
26535    # since paths with space are more likely in Windows. Give it another try with the whole
26536    # argument.
26537    path="$complete"
26538    arguments="EOL"
26539    new_path="$path"
26540
26541  windows_path="$new_path"
26542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26543    unix_path=`$CYGPATH -u "$windows_path"`
26544    new_path="$unix_path"
26545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26547    new_path="$unix_path"
26548  fi
26549
26550
26551    new_path=`$WHICH "$new_path" 2> /dev/null`
26552
26553    if test "x$new_path" = x; then
26554      # It's still not found. Now this is an unrecoverable error.
26555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26556$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26557      has_space=`$ECHO "$complete" | $GREP " "`
26558      if test "x$has_space" != x; then
26559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26561      fi
26562      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26563    fi
26564  fi
26565
26566  # Now new_path has a complete unix path to the binary
26567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26568    # Keep paths in /bin as-is, but remove trailing .exe if any
26569    new_path="${new_path/%.exe/}"
26570    # Do not save /bin paths to all_fixpath_prefixes!
26571  else
26572    # Not in mixed or Windows style, start by that.
26573    new_path=`cmd //c echo $new_path`
26574
26575  input_path="$new_path"
26576  # Check if we need to convert this using DOS-style short mode. If the path
26577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26578  # take no chances and rewrite it.
26579  # Note: m4 eats our [], so we need to use [ and ] instead.
26580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26581  if test "x$has_forbidden_chars" != x; then
26582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26584  fi
26585
26586    # Output is in $new_path
26587
26588  windows_path="$new_path"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    new_path="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    new_path="$unix_path"
26595  fi
26596
26597    # remove trailing .exe if any
26598    new_path="${new_path/%.exe/}"
26599
26600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26602  fi
26603
26604  else
26605    # We're on a posix platform. Hooray! :)
26606    # First separate the path from the arguments. This will split at the first
26607    # space.
26608    complete="$LIPO"
26609    path="${complete%% *}"
26610    tmp="$complete EOL"
26611    arguments="${tmp#* }"
26612
26613    new_path=`$WHICH $path 2> /dev/null`
26614    if test "x$new_path" = x; then
26615      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26616      if test "x$is_absolute_path" != x; then
26617        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
26618$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
26619        new_path="$path"
26620      else
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26622$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26623        has_space=`$ECHO "$complete" | $GREP " "`
26624        if test "x$has_space" != x; then
26625          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26626$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26627        fi
26628        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26629      fi
26630    fi
26631  fi
26632
26633  # Now join together the path and the arguments once again
26634  if test "x$arguments" != xEOL; then
26635      new_complete="$new_path ${arguments% *}"
26636  else
26637      new_complete="$new_path"
26638  fi
26639
26640  if test "x$complete" != "x$new_complete"; then
26641    LIPO="$new_complete"
26642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26643$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26644  fi
26645
26646fi
26647
26648# Restore old path without tools dir
26649PATH="$OLD_PATH"
26650
26651
26652# FIXME: Currently we must test this after paths but before flags. Fix!
26653
26654# And we can test some aspects on the target using configure macros.
26655
26656
26657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26658$as_echo_n "checking for ANSI C header files... " >&6; }
26659if test "${ac_cv_header_stdc+set}" = set; then :
26660  $as_echo_n "(cached) " >&6
26661else
26662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26663/* end confdefs.h.  */
26664#include <stdlib.h>
26665#include <stdarg.h>
26666#include <string.h>
26667#include <float.h>
26668
26669int
26670main ()
26671{
26672
26673  ;
26674  return 0;
26675}
26676_ACEOF
26677if ac_fn_cxx_try_compile "$LINENO"; then :
26678  ac_cv_header_stdc=yes
26679else
26680  ac_cv_header_stdc=no
26681fi
26682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26683
26684if test $ac_cv_header_stdc = yes; then
26685  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26687/* end confdefs.h.  */
26688#include <string.h>
26689
26690_ACEOF
26691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26692  $EGREP "memchr" >/dev/null 2>&1; then :
26693
26694else
26695  ac_cv_header_stdc=no
26696fi
26697rm -f conftest*
26698
26699fi
26700
26701if test $ac_cv_header_stdc = yes; then
26702  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26704/* end confdefs.h.  */
26705#include <stdlib.h>
26706
26707_ACEOF
26708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26709  $EGREP "free" >/dev/null 2>&1; then :
26710
26711else
26712  ac_cv_header_stdc=no
26713fi
26714rm -f conftest*
26715
26716fi
26717
26718if test $ac_cv_header_stdc = yes; then
26719  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26720  if test "$cross_compiling" = yes; then :
26721  :
26722else
26723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26724/* end confdefs.h.  */
26725#include <ctype.h>
26726#include <stdlib.h>
26727#if ((' ' & 0x0FF) == 0x020)
26728# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26729# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26730#else
26731# define ISLOWER(c) \
26732		   (('a' <= (c) && (c) <= 'i') \
26733		     || ('j' <= (c) && (c) <= 'r') \
26734		     || ('s' <= (c) && (c) <= 'z'))
26735# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26736#endif
26737
26738#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26739int
26740main ()
26741{
26742  int i;
26743  for (i = 0; i < 256; i++)
26744    if (XOR (islower (i), ISLOWER (i))
26745	|| toupper (i) != TOUPPER (i))
26746      return 2;
26747  return 0;
26748}
26749_ACEOF
26750if ac_fn_cxx_try_run "$LINENO"; then :
26751
26752else
26753  ac_cv_header_stdc=no
26754fi
26755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26756  conftest.$ac_objext conftest.beam conftest.$ac_ext
26757fi
26758
26759fi
26760fi
26761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26762$as_echo "$ac_cv_header_stdc" >&6; }
26763if test $ac_cv_header_stdc = yes; then
26764
26765$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26766
26767fi
26768
26769# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26770for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26771		  inttypes.h stdint.h unistd.h
26772do :
26773  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26774ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26775"
26776if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26777  cat >>confdefs.h <<_ACEOF
26778#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26779_ACEOF
26780
26781fi
26782
26783done
26784
26785
26786
26787###############################################################################
26788#
26789# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26790# (The JVM can use 32 or 64 bit Java pointers but that decision
26791# is made at runtime.)
26792#
26793if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26794  # Always specify -m flags on Solaris
26795
26796  # keep track of c/cxx flags that we added outselves...
26797  #   to prevent emitting warning...
26798  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26799  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26800  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26801
26802  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26803  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26804  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26805
26806  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26807  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26808  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26809
26810elif test "x$COMPILE_TYPE" = xreduced; then
26811  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26812    # Specify -m if running reduced on other Posix platforms
26813
26814  # keep track of c/cxx flags that we added outselves...
26815  #   to prevent emitting warning...
26816  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26817  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26818  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26819
26820  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26821  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26822  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26823
26824  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26825  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26826  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26827
26828  fi
26829fi
26830
26831# Make compilation sanity check
26832for ac_header in stdio.h
26833do :
26834  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26835if test "x$ac_cv_header_stdio_h" = x""yes; then :
26836  cat >>confdefs.h <<_ACEOF
26837#define HAVE_STDIO_H 1
26838_ACEOF
26839
26840else
26841
26842  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26843$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26844  if test "x$COMPILE_TYPE" = xreduced; then
26845    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26846$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26847  elif test "x$COMPILE_TYPE" = xcross; then
26848    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26849$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26850  fi
26851  as_fn_error $? "Cannot continue." "$LINENO" 5
26852
26853fi
26854
26855done
26856
26857
26858# The cast to long int works around a bug in the HP C Compiler
26859# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26860# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26861# This bug is HP SR number 8606223364.
26862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26863$as_echo_n "checking size of int *... " >&6; }
26864if test "${ac_cv_sizeof_int_p+set}" = set; then :
26865  $as_echo_n "(cached) " >&6
26866else
26867  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26868
26869else
26870  if test "$ac_cv_type_int_p" = yes; then
26871     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26873as_fn_error 77 "cannot compute sizeof (int *)
26874See \`config.log' for more details" "$LINENO" 5 ; }
26875   else
26876     ac_cv_sizeof_int_p=0
26877   fi
26878fi
26879
26880fi
26881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26882$as_echo "$ac_cv_sizeof_int_p" >&6; }
26883
26884
26885
26886cat >>confdefs.h <<_ACEOF
26887#define SIZEOF_INT_P $ac_cv_sizeof_int_p
26888_ACEOF
26889
26890
26891
26892if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
26893  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
26894  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
26895fi
26896
26897if test "x$SIZEOF_INT_P" = x; then
26898    # The test failed, lets stick to the assumed value.
26899    { $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
26900$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
26901else
26902    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
26903
26904    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
26905        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
26906    fi
26907fi
26908
26909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
26910$as_echo_n "checking for target address size... " >&6; }
26911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
26912$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
26913
26914
26915###############################################################################
26916#
26917# Is the target little of big endian?
26918#
26919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
26920$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
26921if test "${ac_cv_c_bigendian+set}" = set; then :
26922  $as_echo_n "(cached) " >&6
26923else
26924  ac_cv_c_bigendian=unknown
26925    # See if we're dealing with a universal compiler.
26926    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26927/* end confdefs.h.  */
26928#ifndef __APPLE_CC__
26929	       not a universal capable compiler
26930	     #endif
26931	     typedef int dummy;
26932
26933_ACEOF
26934if ac_fn_cxx_try_compile "$LINENO"; then :
26935
26936	# Check for potential -arch flags.  It is not universal unless
26937	# there are at least two -arch flags with different values.
26938	ac_arch=
26939	ac_prev=
26940	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
26941	 if test -n "$ac_prev"; then
26942	   case $ac_word in
26943	     i?86 | x86_64 | ppc | ppc64)
26944	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
26945		 ac_arch=$ac_word
26946	       else
26947		 ac_cv_c_bigendian=universal
26948		 break
26949	       fi
26950	       ;;
26951	   esac
26952	   ac_prev=
26953	 elif test "x$ac_word" = "x-arch"; then
26954	   ac_prev=arch
26955	 fi
26956       done
26957fi
26958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26959    if test $ac_cv_c_bigendian = unknown; then
26960      # See if sys/param.h defines the BYTE_ORDER macro.
26961      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26962/* end confdefs.h.  */
26963#include <sys/types.h>
26964	     #include <sys/param.h>
26965
26966int
26967main ()
26968{
26969#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
26970		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
26971		     && LITTLE_ENDIAN)
26972	      bogus endian macros
26973	     #endif
26974
26975  ;
26976  return 0;
26977}
26978_ACEOF
26979if ac_fn_cxx_try_compile "$LINENO"; then :
26980  # It does; now see whether it defined to BIG_ENDIAN or not.
26981	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26982/* end confdefs.h.  */
26983#include <sys/types.h>
26984		#include <sys/param.h>
26985
26986int
26987main ()
26988{
26989#if BYTE_ORDER != BIG_ENDIAN
26990		 not big endian
26991		#endif
26992
26993  ;
26994  return 0;
26995}
26996_ACEOF
26997if ac_fn_cxx_try_compile "$LINENO"; then :
26998  ac_cv_c_bigendian=yes
26999else
27000  ac_cv_c_bigendian=no
27001fi
27002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27003fi
27004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27005    fi
27006    if test $ac_cv_c_bigendian = unknown; then
27007      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27008      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27009/* end confdefs.h.  */
27010#include <limits.h>
27011
27012int
27013main ()
27014{
27015#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27016	      bogus endian macros
27017	     #endif
27018
27019  ;
27020  return 0;
27021}
27022_ACEOF
27023if ac_fn_cxx_try_compile "$LINENO"; then :
27024  # It does; now see whether it defined to _BIG_ENDIAN or not.
27025	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27026/* end confdefs.h.  */
27027#include <limits.h>
27028
27029int
27030main ()
27031{
27032#ifndef _BIG_ENDIAN
27033		 not big endian
27034		#endif
27035
27036  ;
27037  return 0;
27038}
27039_ACEOF
27040if ac_fn_cxx_try_compile "$LINENO"; then :
27041  ac_cv_c_bigendian=yes
27042else
27043  ac_cv_c_bigendian=no
27044fi
27045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27046fi
27047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27048    fi
27049    if test $ac_cv_c_bigendian = unknown; then
27050      # Compile a test program.
27051      if test "$cross_compiling" = yes; then :
27052  # Try to guess by grepping values from an object file.
27053	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27054/* end confdefs.h.  */
27055short int ascii_mm[] =
27056		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27057		short int ascii_ii[] =
27058		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27059		int use_ascii (int i) {
27060		  return ascii_mm[i] + ascii_ii[i];
27061		}
27062		short int ebcdic_ii[] =
27063		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27064		short int ebcdic_mm[] =
27065		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27066		int use_ebcdic (int i) {
27067		  return ebcdic_mm[i] + ebcdic_ii[i];
27068		}
27069		extern int foo;
27070
27071int
27072main ()
27073{
27074return use_ascii (foo) == use_ebcdic (foo);
27075  ;
27076  return 0;
27077}
27078_ACEOF
27079if ac_fn_cxx_try_compile "$LINENO"; then :
27080  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27081	      ac_cv_c_bigendian=yes
27082	    fi
27083	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27084	      if test "$ac_cv_c_bigendian" = unknown; then
27085		ac_cv_c_bigendian=no
27086	      else
27087		# finding both strings is unlikely to happen, but who knows?
27088		ac_cv_c_bigendian=unknown
27089	      fi
27090	    fi
27091fi
27092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27093else
27094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27095/* end confdefs.h.  */
27096$ac_includes_default
27097int
27098main ()
27099{
27100
27101	     /* Are we little or big endian?  From Harbison&Steele.  */
27102	     union
27103	     {
27104	       long int l;
27105	       char c[sizeof (long int)];
27106	     } u;
27107	     u.l = 1;
27108	     return u.c[sizeof (long int) - 1] == 1;
27109
27110  ;
27111  return 0;
27112}
27113_ACEOF
27114if ac_fn_cxx_try_run "$LINENO"; then :
27115  ac_cv_c_bigendian=no
27116else
27117  ac_cv_c_bigendian=yes
27118fi
27119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27120  conftest.$ac_objext conftest.beam conftest.$ac_ext
27121fi
27122
27123    fi
27124fi
27125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27126$as_echo "$ac_cv_c_bigendian" >&6; }
27127 case $ac_cv_c_bigendian in #(
27128   yes)
27129     ENDIAN="big";; #(
27130   no)
27131     ENDIAN="little" ;; #(
27132   universal)
27133     ENDIAN="universal_endianness"
27134     ;; #(
27135   *)
27136     ENDIAN="unknown" ;;
27137 esac
27138
27139
27140if test "x$ENDIAN" = xuniversal_endianness; then
27141    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27142fi
27143if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27144    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
27145fi
27146
27147
27148# Configure flags for the tools
27149
27150
27151###############################################################################
27152#
27153# How to compile shared libraries.
27154#
27155
27156if test "x$GCC" = xyes; then
27157    COMPILER_NAME=gcc
27158    PICFLAG="-fPIC"
27159    LIBRARY_PREFIX=lib
27160    SHARED_LIBRARY='lib$1.so'
27161    STATIC_LIBRARY='lib$1.a'
27162    SHARED_LIBRARY_FLAGS="-shared"
27163    SHARED_LIBRARY_SUFFIX='.so'
27164    STATIC_LIBRARY_SUFFIX='.a'
27165    OBJ_SUFFIX='.o'
27166    EXE_SUFFIX=''
27167    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27168    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27169    C_FLAG_REORDER=''
27170    CXX_FLAG_REORDER=''
27171    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27172    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27173    LD="$CC"
27174    LDEXE="$CC"
27175    LDCXX="$CXX"
27176    LDEXECXX="$CXX"
27177    POST_STRIP_CMD="$STRIP -g"
27178
27179    # Linking is different on MacOSX
27180    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27181        # Might change in the future to clang.
27182        COMPILER_NAME=gcc
27183        SHARED_LIBRARY='lib$1.dylib'
27184        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27185        SHARED_LIBRARY_SUFFIX='.dylib'
27186        EXE_SUFFIX=''
27187        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27188        SET_SHARED_LIBRARY_MAPFILE=''
27189        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27190        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27191        POST_STRIP_CMD="$STRIP -S"
27192    fi
27193else
27194    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27195        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27196        COMPILER_NAME=ossc
27197        PICFLAG="-KPIC"
27198        LIBRARY_PREFIX=lib
27199        SHARED_LIBRARY='lib$1.so'
27200        STATIC_LIBRARY='lib$1.a'
27201        SHARED_LIBRARY_FLAGS="-G"
27202        SHARED_LIBRARY_SUFFIX='.so'
27203        STATIC_LIBRARY_SUFFIX='.a'
27204        OBJ_SUFFIX='.o'
27205        EXE_SUFFIX=''
27206        SET_SHARED_LIBRARY_NAME=''
27207        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27208	C_FLAG_REORDER='-xF'
27209	CXX_FLAG_REORDER='-xF'
27210        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27211        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27212        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27213        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27214        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27215        POST_STRIP_CMD="$STRIP -x"
27216        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27217    fi
27218    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27219        # If it is not gcc, then assume it is the MS Visual Studio compiler
27220        COMPILER_NAME=cl
27221        PICFLAG=""
27222        LIBRARY_PREFIX=
27223        SHARED_LIBRARY='$1.dll'
27224        STATIC_LIBRARY='$1.lib'
27225        SHARED_LIBRARY_FLAGS="-LD"
27226        SHARED_LIBRARY_SUFFIX='.dll'
27227        STATIC_LIBRARY_SUFFIX='.lib'
27228        OBJ_SUFFIX='.obj'
27229        EXE_SUFFIX='.exe'
27230        SET_SHARED_LIBRARY_NAME=''
27231        SET_SHARED_LIBRARY_MAPFILE=''
27232        SET_SHARED_LIBRARY_ORIGIN=''
27233        SET_EXECUTABLE_ORIGIN=''
27234    fi
27235fi
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254# The (cross) compiler is now configured, we can now test capabilities
27255# of the target platform.
27256
27257
27258
27259###############################################################################
27260#
27261# Setup the opt flags for different compilers
27262# and different operating systems.
27263#
27264
27265#
27266# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27267#
27268if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27269    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27270    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27271    CFLAGS="$CFLAGS -mstackrealign"
27272    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27273$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27274    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27275/* end confdefs.h.  */
27276int main() { return 0; }
27277_ACEOF
27278if ac_fn_cxx_try_link "$LINENO"; then :
27279
27280		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27281$as_echo "yes" >&6; }
27282
27283else
27284
27285		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27286$as_echo "no" >&6; }
27287	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27288
27289fi
27290rm -f core conftest.err conftest.$ac_objext \
27291    conftest$ac_exeext conftest.$ac_ext
27292fi
27293
27294C_FLAG_DEPS="-MMD -MF"
27295CXX_FLAG_DEPS="-MMD -MF"
27296
27297case $COMPILER_TYPE in
27298  CC )
27299    D_FLAG="-g"
27300    case $COMPILER_NAME in
27301      gcc )
27302      	case $OPENJDK_TARGET_OS in
27303	  macosx )
27304	    # On MacOSX we optimize for size, something
27305	    # we should do for all platforms?
27306	    C_O_FLAG_HI="-Os"
27307	    C_O_FLAG_NORM="-Os"
27308	    C_O_FLAG_NONE=""
27309	    ;;
27310	  *)
27311	    C_O_FLAG_HI="-O3"
27312	    C_O_FLAG_NORM="-O2"
27313	    C_O_FLAG_NONE="-O0"
27314	    CFLAGS_DEBUG_SYMBOLS="-g"
27315	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27316	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27317	       CFLAGS_DEBUG_SYMBOLS="-g1"
27318	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27319	    fi
27320	    ;;
27321	esac
27322        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27323        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27324        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27325        ;;
27326      ossc )
27327        #
27328        # Forte has different names for this with their C++ compiler...
27329        #
27330        C_FLAG_DEPS="-xMMD -xMF"
27331        CXX_FLAG_DEPS="-xMMD -xMF"
27332
27333        # Extra options used with HIGHEST
27334        #
27335        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27336        #          done with care, there are some assumptions below that need to
27337        #          be understood about the use of pointers, and IEEE behavior.
27338        #
27339        # Use non-standard floating point mode (not IEEE 754)
27340        CC_HIGHEST="$CC_HIGHEST -fns"
27341        # Do some simplification of floating point arithmetic (not IEEE 754)
27342        CC_HIGHEST="$CC_HIGHEST -fsimple"
27343        # Use single precision floating point with 'float'
27344        CC_HIGHEST="$CC_HIGHEST -fsingle"
27345        # Assume memory references via basic pointer types do not alias
27346        #   (Source with excessing pointer casting and data access with mixed
27347        #    pointer types are not recommended)
27348        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27349        # Use intrinsic or inline versions for math/std functions
27350        #   (If you expect perfect errno behavior, do not use this)
27351        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27352        # Loop data dependency optimizations (need -xO3 or higher)
27353        CC_HIGHEST="$CC_HIGHEST -xdepend"
27354        # Pointer parameters to functions do not overlap
27355        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27356        #    If you pass in multiple pointers to the same data, do not use this)
27357        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27358        # Inline some library routines
27359        #   (If you expect perfect errno behavior, do not use this)
27360        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27361        # Use optimized math routines
27362        #   (If you expect perfect errno behavior, do not use this)
27363        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27364        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27365
27366        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27367          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27368          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27369        fi
27370
27371        case $OPENJDK_TARGET_CPU_ARCH in
27372          x86)
27373            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27374            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27375            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27376            C_O_FLAG_NONE="-xregs=no%frameptr"
27377            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27378            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27379            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27380            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27381            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27382               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27383               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27384            fi
27385            ;;
27386          sparc)
27387            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27388            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27389            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27390            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27391            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27392            C_O_FLAG_NONE=""
27393            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27394            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27395            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27396            CXX_O_FLAG_NONE=""
27397            ;;
27398        esac
27399
27400    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27401    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27402    esac
27403    ;;
27404  CL )
27405    D_FLAG=
27406    C_O_FLAG_HIGHEST="-O2"
27407    C_O_FLAG_HI="-O1"
27408    C_O_FLAG_NORM="-O1"
27409    C_O_FLAG_NONE="-Od"
27410    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27411    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27412    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27413    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27414    ;;
27415esac
27416
27417if test -z "$C_O_FLAG_HIGHEST"; then
27418   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27419fi
27420
27421if test -z "$CXX_O_FLAG_HIGHEST"; then
27422   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27423fi
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27439   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27440$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27441fi
27442
27443if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27444   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27445$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27446fi
27447
27448if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27449   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27450$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27451fi
27452
27453
27454# Check whether --with-extra-cflags was given.
27455if test "${with_extra_cflags+set}" = set; then :
27456  withval=$with_extra_cflags;
27457fi
27458
27459
27460
27461# Check whether --with-extra-cxxflags was given.
27462if test "${with_extra_cxxflags+set}" = set; then :
27463  withval=$with_extra_cxxflags;
27464fi
27465
27466
27467
27468# Check whether --with-extra-ldflags was given.
27469if test "${with_extra_ldflags+set}" = set; then :
27470  withval=$with_extra_ldflags;
27471fi
27472
27473
27474CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27475CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27476LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27477
27478# Hotspot needs these set in their legacy form
27479LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27480LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27481LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27482
27483
27484
27485
27486
27487###############################################################################
27488#
27489# Now setup the CFLAGS and LDFLAGS for the JDK build.
27490# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27491#
27492case $COMPILER_NAME in
27493      gcc )
27494      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27495                          -pipe \
27496                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27497	  case $OPENJDK_TARGET_CPU_ARCH in
27498	  arm )
27499            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27500	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27501	  ;;
27502	  ppc )
27503            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27504	  ;;
27505	  * )
27506	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27507	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27508          ;;
27509	  esac
27510          ;;
27511      ossc )
27512          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27513          case $OPENJDK_TARGET_CPU_ARCH in
27514          x86 )
27515            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27516       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27517          ;;
27518          esac
27519
27520      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27521      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27522
27523          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27524          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27525          ;;
27526      cl )
27527          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
27528               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
27529	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
27530	       -DWIN32 -DIAL"
27531          case $OPENJDK_TARGET_CPU in
27532              x86 )
27533                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
27534                  ;;
27535              x86_64 )
27536                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
27537                  ;;
27538          esac
27539          ;;
27540esac
27541
27542###############################################################################
27543
27544CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
27545
27546# The package path is used only on macosx?
27547PACKAGE_PATH=/opt/local
27548
27549
27550if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
27551    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
27552    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
27553    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
27554    #   Note: -Dmacro         is the same as    #define macro 1
27555    #         -Dmacro=	    is the same as    #define macro
27556    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27557        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
27558    else
27559        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
27560    fi
27561else
27562    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
27563fi
27564if test "x$OPENJDK_TARGET_OS" = xlinux; then
27565    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
27566fi
27567if test "x$OPENJDK_TARGET_OS" = xwindows; then
27568    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
27569fi
27570if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27571    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
27572fi
27573if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27574    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
27575fi
27576if test "x$OPENJDK_TARGET_OS" = xbsd; then
27577    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
27578fi
27579if test "x$DEBUG_LEVEL" = xrelease; then
27580    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
27581    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27582        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
27583    fi
27584else
27585    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
27586fi
27587
27588CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
27589CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
27590
27591CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
27592        -I${JDK_OUTPUTDIR}/include \
27593        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
27594        -I${JDK_TOPDIR}/src/share/javavm/export \
27595        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
27596        -I${JDK_TOPDIR}/src/share/native/common \
27597        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
27598
27599# The shared libraries are compiled using the picflag.
27600CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
27601CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
27602
27603# Executable flags
27604CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
27605CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
27606
27607# Now this is odd. The JDK native libraries have to link against libjvm.so
27608# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
27609# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
27610# is identical for client and server? Yes. Which is picked at runtime (client or server)?
27611# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
27612# libraries will link to whatever is in memory. Yuck.
27613#
27614# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
27615if test "x$COMPILER_NAME" = xcl; then
27616    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
27617    if test "x$OPENJDK_TARGET_CPU" = xx86; then
27618        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
27619    fi
27620    # TODO: make -debug optional "--disable-full-debug-symbols"
27621    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
27622    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
27623    LDFLAGS_JDKLIB_SUFFIX=""
27624    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
27625        LDFLAGS_STACK_SIZE=1048576
27626    else
27627        LDFLAGS_STACK_SIZE=327680
27628    fi
27629    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
27630else
27631    if test "x$COMPILER_NAME" = xgcc; then
27632        # If this is a --hash-style=gnu system, use --hash-style=both, why?
27633        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27634        if test -n "$HAS_GNU_HASH"; then
27635            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27636        fi
27637        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27638          # And since we now know that the linker is gnu, then add -z defs, to forbid
27639          # undefined symbols in object files.
27640          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27641          if test "x$DEBUG_LEVEL" = "xrelease"; then
27642              # When building release libraries, tell the linker optimize them.
27643              # Should this be supplied to the OSS linker as well?
27644              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27645          fi
27646        fi
27647    fi
27648    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27649                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27650
27651    # On some platforms (mac) the linker warns about non existing -L dirs.
27652    # Add server first if available. Linking aginst client does not always produce the same results.
27653    # Only add client dir if client is being built. Default to server for other variants.
27654    if test "x$JVM_VARIANT_SERVER" = xtrue; then
27655        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27656    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
27657        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
27658    else
27659        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27660    fi
27661
27662    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27663    if test "x$COMPILER_NAME" = xossc; then
27664        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27665    fi
27666
27667    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27668    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27669        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27670    fi
27671fi
27672
27673# Adjust flags according to debug level.
27674case $DEBUG_LEVEL in
27675      fastdebug )
27676              CFLAGS="$CFLAGS $D_FLAG"
27677              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27678              ;;
27679      slowdebug )
27680              CFLAGS="$CFLAGS $D_FLAG"
27681	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27682	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27683	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27684	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27685              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27686              ;;
27687esac
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703# Setup debug symbols (need objcopy from the toolchain for that)
27704
27705#
27706# ENABLE_DEBUG_SYMBOLS
27707# This must be done after the toolchain is setup, since we're looking at objcopy.
27708#
27709ENABLE_DEBUG_SYMBOLS=default
27710
27711# default on macosx is no...
27712if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27713   ENABLE_DEBUG_SYMBOLS=no
27714fi
27715
27716# Check whether --enable-debug-symbols was given.
27717if test "${enable_debug_symbols+set}" = set; then :
27718  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
27719fi
27720
27721
27722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27723$as_echo_n "checking if we should generate debug symbols... " >&6; }
27724
27725if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
27726   # explicit enabling of enable-debug-symbols and can't find objcopy
27727   #   this is an error
27728   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27729fi
27730
27731if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
27732  # Default is on if objcopy is found, otherwise off
27733  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27734     ENABLE_DEBUG_SYMBOLS=yes
27735  else
27736     ENABLE_DEBUG_SYMBOLS=no
27737  fi
27738fi
27739
27740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27741$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27742
27743#
27744# ZIP_DEBUGINFO_FILES
27745#
27746ZIP_DEBUGINFO_FILES=yes
27747
27748# Check whether --enable-zip-debug-info was given.
27749if test "${enable_zip_debug_info+set}" = set; then :
27750  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
27751fi
27752
27753
27754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27755$as_echo_n "checking if we should zip debug-info files... " >&6; }
27756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
27757$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
27758
27759# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
27760#   use that...
27761if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
27762   ZIP_DEBUGINFO_FILES=1
27763else
27764   ZIP_DEBUGINFO_FILES=0
27765fi
27766
27767
27768
27769
27770
27771
27772
27773###############################################################################
27774#
27775# Check dependencies for external and internal libraries.
27776#
27777###############################################################################
27778
27779
27780
27781###############################################################################
27782#
27783# OS specific settings that we never will need to probe.
27784#
27785if test "x$OPENJDK_TARGET_OS" = xlinux; then
27786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27787$as_echo_n "checking what is not needed on Linux?... " >&6; }
27788    PULSE_NOT_NEEDED=yes
27789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27790$as_echo "pulse" >&6; }
27791fi
27792
27793if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27795$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27796    ALSA_NOT_NEEDED=yes
27797    PULSE_NOT_NEEDED=yes
27798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27799$as_echo "alsa pulse" >&6; }
27800fi
27801
27802if test "x$OPENJDK_TARGET_OS" = xwindows; then
27803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27804$as_echo_n "checking what is not needed on Windows?... " >&6; }
27805    CUPS_NOT_NEEDED=yes
27806    ALSA_NOT_NEEDED=yes
27807    PULSE_NOT_NEEDED=yes
27808    X11_NOT_NEEDED=yes
27809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27810$as_echo "alsa cups pulse x11" >&6; }
27811fi
27812
27813if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27815$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27816    ALSA_NOT_NEEDED=yes
27817    PULSE_NOT_NEEDED=yes
27818    X11_NOT_NEEDED=yes
27819    FREETYPE2_NOT_NEEDED=yes
27820    # If the java runtime framework is disabled, then we need X11.
27821    # This will be adjusted below.
27822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27823$as_echo "alsa pulse x11" >&6; }
27824fi
27825
27826if test "x$OPENJDK_TARGET_OS" = xbsd; then
27827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27828$as_echo_n "checking what is not needed on bsd?... " >&6; }
27829    ALSA_NOT_NEEDED=yes
27830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27831$as_echo "alsa" >&6; }
27832fi
27833
27834if test "x$OPENJDK" = "xfalse"; then
27835    FREETYPE2_NOT_NEEDED=yes
27836fi
27837
27838if test "x$SUPPORT_HEADFUL" = xno; then
27839    X11_NOT_NEEDED=yes
27840fi
27841
27842###############################################################################
27843#
27844# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27845# that uses this API.
27846#
27847# Check whether --enable-macosx-runtime-support was given.
27848if test "${enable_macosx_runtime_support+set}" = set; then :
27849  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27850else
27851  MACOSX_RUNTIME_SUPPORT="no"
27852fi
27853
27854
27855USE_MACOSX_RUNTIME_SUPPORT=no
27856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27857$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27858if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27859    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27860        MACOSX_RUNTIME_SUPPORT=yes
27861        USE_MACOSX_RUNTIME_SUPPORT=yes
27862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27863$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27864    else
27865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27866$as_echo "yes, but explicitly disabled." >&6; }
27867    fi
27868else
27869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27870$as_echo "no" >&6; }
27871fi
27872
27873if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27875$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27876    X11_NOT_NEEDED=
27877    FREETYPE2_NOT_NEEDED=
27878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27879$as_echo "alsa pulse" >&6; }
27880fi
27881
27882
27883
27884
27885###############################################################################
27886#
27887# Check for X Windows
27888#
27889
27890# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
27891# Make a simple check for the libraries at the sysroot, and setup --x-includes and
27892# --x-libraries for the sysroot, if that seems to be correct.
27893if test "x$SYS_ROOT" != "x/"; then
27894  if test "x$x_includes" = xNONE; then
27895    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
27896      x_includes="$SYS_ROOT/usr/X11R6/include"
27897    fi
27898  fi
27899  if test "x$x_libraries" = xNONE; then
27900    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
27901      x_libraries="$SYS_ROOT/usr/X11R6/lib"
27902    fi
27903  fi
27904fi
27905
27906# Now let autoconf do it's magic
27907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
27908$as_echo_n "checking for X... " >&6; }
27909
27910
27911# Check whether --with-x was given.
27912if test "${with_x+set}" = set; then :
27913  withval=$with_x;
27914fi
27915
27916# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
27917if test "x$with_x" = xno; then
27918  # The user explicitly disabled X.
27919  have_x=disabled
27920else
27921  case $x_includes,$x_libraries in #(
27922    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
27923    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
27924  $as_echo_n "(cached) " >&6
27925else
27926  # One or both of the vars are not set, and there is no cached value.
27927ac_x_includes=no ac_x_libraries=no
27928rm -f -r conftest.dir
27929if mkdir conftest.dir; then
27930  cd conftest.dir
27931  cat >Imakefile <<'_ACEOF'
27932incroot:
27933	@echo incroot='${INCROOT}'
27934usrlibdir:
27935	@echo usrlibdir='${USRLIBDIR}'
27936libdir:
27937	@echo libdir='${LIBDIR}'
27938_ACEOF
27939  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
27940    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
27941    for ac_var in incroot usrlibdir libdir; do
27942      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
27943    done
27944    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
27945    for ac_extension in a so sl dylib la dll; do
27946      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
27947	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
27948	ac_im_usrlibdir=$ac_im_libdir; break
27949      fi
27950    done
27951    # Screen out bogus values from the imake configuration.  They are
27952    # bogus both because they are the default anyway, and because
27953    # using them would break gcc on systems where it needs fixed includes.
27954    case $ac_im_incroot in
27955	/usr/include) ac_x_includes= ;;
27956	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
27957    esac
27958    case $ac_im_usrlibdir in
27959	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
27960	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
27961    esac
27962  fi
27963  cd ..
27964  rm -f -r conftest.dir
27965fi
27966
27967# Standard set of common directories for X headers.
27968# Check X11 before X11Rn because it is often a symlink to the current release.
27969ac_x_header_dirs='
27970/usr/X11/include
27971/usr/X11R7/include
27972/usr/X11R6/include
27973/usr/X11R5/include
27974/usr/X11R4/include
27975
27976/usr/include/X11
27977/usr/include/X11R7
27978/usr/include/X11R6
27979/usr/include/X11R5
27980/usr/include/X11R4
27981
27982/usr/local/X11/include
27983/usr/local/X11R7/include
27984/usr/local/X11R6/include
27985/usr/local/X11R5/include
27986/usr/local/X11R4/include
27987
27988/usr/local/include/X11
27989/usr/local/include/X11R7
27990/usr/local/include/X11R6
27991/usr/local/include/X11R5
27992/usr/local/include/X11R4
27993
27994/usr/X386/include
27995/usr/x386/include
27996/usr/XFree86/include/X11
27997
27998/usr/include
27999/usr/local/include
28000/usr/unsupported/include
28001/usr/athena/include
28002/usr/local/x11r5/include
28003/usr/lpp/Xamples/include
28004
28005/usr/openwin/include
28006/usr/openwin/share/include'
28007
28008if test "$ac_x_includes" = no; then
28009  # Guess where to find include files, by looking for Xlib.h.
28010  # First, try using that file with no special directory specified.
28011  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28012/* end confdefs.h.  */
28013#include <X11/Xlib.h>
28014_ACEOF
28015if ac_fn_cxx_try_cpp "$LINENO"; then :
28016  # We can compile using X headers with no special include directory.
28017ac_x_includes=
28018else
28019  for ac_dir in $ac_x_header_dirs; do
28020  if test -r "$ac_dir/X11/Xlib.h"; then
28021    ac_x_includes=$ac_dir
28022    break
28023  fi
28024done
28025fi
28026rm -f conftest.err conftest.i conftest.$ac_ext
28027fi # $ac_x_includes = no
28028
28029if test "$ac_x_libraries" = no; then
28030  # Check for the libraries.
28031  # See if we find them without any special options.
28032  # Don't add to $LIBS permanently.
28033  ac_save_LIBS=$LIBS
28034  LIBS="-lX11 $LIBS"
28035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28036/* end confdefs.h.  */
28037#include <X11/Xlib.h>
28038int
28039main ()
28040{
28041XrmInitialize ()
28042  ;
28043  return 0;
28044}
28045_ACEOF
28046if ac_fn_cxx_try_link "$LINENO"; then :
28047  LIBS=$ac_save_LIBS
28048# We can link X programs with no special library path.
28049ac_x_libraries=
28050else
28051  LIBS=$ac_save_LIBS
28052for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28053do
28054  # Don't even attempt the hair of trying to link an X program!
28055  for ac_extension in a so sl dylib la dll; do
28056    if test -r "$ac_dir/libX11.$ac_extension"; then
28057      ac_x_libraries=$ac_dir
28058      break 2
28059    fi
28060  done
28061done
28062fi
28063rm -f core conftest.err conftest.$ac_objext \
28064    conftest$ac_exeext conftest.$ac_ext
28065fi # $ac_x_libraries = no
28066
28067case $ac_x_includes,$ac_x_libraries in #(
28068  no,* | *,no | *\'*)
28069    # Didn't find X, or a directory has "'" in its name.
28070    ac_cv_have_x="have_x=no";; #(
28071  *)
28072    # Record where we found X for the cache.
28073    ac_cv_have_x="have_x=yes\
28074	ac_x_includes='$ac_x_includes'\
28075	ac_x_libraries='$ac_x_libraries'"
28076esac
28077fi
28078;; #(
28079    *) have_x=yes;;
28080  esac
28081  eval "$ac_cv_have_x"
28082fi # $with_x != no
28083
28084if test "$have_x" != yes; then
28085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28086$as_echo "$have_x" >&6; }
28087  no_x=yes
28088else
28089  # If each of the values was on the command line, it overrides each guess.
28090  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28091  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28092  # Update the cache value to reflect the command line values.
28093  ac_cv_have_x="have_x=yes\
28094	ac_x_includes='$x_includes'\
28095	ac_x_libraries='$x_libraries'"
28096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28097$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28098fi
28099
28100if test "$no_x" = yes; then
28101  # Not all programs may use this symbol, but it does not hurt to define it.
28102
28103$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28104
28105  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28106else
28107  if test -n "$x_includes"; then
28108    X_CFLAGS="$X_CFLAGS -I$x_includes"
28109  fi
28110
28111  # It would also be nice to do this for all -L options, not just this one.
28112  if test -n "$x_libraries"; then
28113    X_LIBS="$X_LIBS -L$x_libraries"
28114    # For Solaris; some versions of Sun CC require a space after -R and
28115    # others require no space.  Words are not sufficient . . . .
28116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28117$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28118    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28119    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28120    ac_cxx_werror_flag=yes
28121    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28122/* end confdefs.h.  */
28123
28124int
28125main ()
28126{
28127
28128  ;
28129  return 0;
28130}
28131_ACEOF
28132if ac_fn_cxx_try_link "$LINENO"; then :
28133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28134$as_echo "no" >&6; }
28135       X_LIBS="$X_LIBS -R$x_libraries"
28136else
28137  LIBS="$ac_xsave_LIBS -R $x_libraries"
28138       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28139/* end confdefs.h.  */
28140
28141int
28142main ()
28143{
28144
28145  ;
28146  return 0;
28147}
28148_ACEOF
28149if ac_fn_cxx_try_link "$LINENO"; then :
28150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28151$as_echo "yes" >&6; }
28152	  X_LIBS="$X_LIBS -R $x_libraries"
28153else
28154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28155$as_echo "neither works" >&6; }
28156fi
28157rm -f core conftest.err conftest.$ac_objext \
28158    conftest$ac_exeext conftest.$ac_ext
28159fi
28160rm -f core conftest.err conftest.$ac_objext \
28161    conftest$ac_exeext conftest.$ac_ext
28162    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28163    LIBS=$ac_xsave_LIBS
28164  fi
28165
28166  # Check for system-dependent libraries X programs must link with.
28167  # Do this before checking for the system-independent R6 libraries
28168  # (-lICE), since we may need -lsocket or whatever for X linking.
28169
28170  if test "$ISC" = yes; then
28171    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28172  else
28173    # Martyn Johnson says this is needed for Ultrix, if the X
28174    # libraries were built with DECnet support.  And Karl Berry says
28175    # the Alpha needs dnet_stub (dnet does not exist).
28176    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28177    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28178/* end confdefs.h.  */
28179
28180/* Override any GCC internal prototype to avoid an error.
28181   Use char because int might match the return type of a GCC
28182   builtin and then its argument prototype would still apply.  */
28183#ifdef __cplusplus
28184extern "C"
28185#endif
28186char XOpenDisplay ();
28187int
28188main ()
28189{
28190return XOpenDisplay ();
28191  ;
28192  return 0;
28193}
28194_ACEOF
28195if ac_fn_cxx_try_link "$LINENO"; then :
28196
28197else
28198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28199$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28200if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28201  $as_echo_n "(cached) " >&6
28202else
28203  ac_check_lib_save_LIBS=$LIBS
28204LIBS="-ldnet  $LIBS"
28205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28206/* end confdefs.h.  */
28207
28208/* Override any GCC internal prototype to avoid an error.
28209   Use char because int might match the return type of a GCC
28210   builtin and then its argument prototype would still apply.  */
28211#ifdef __cplusplus
28212extern "C"
28213#endif
28214char dnet_ntoa ();
28215int
28216main ()
28217{
28218return dnet_ntoa ();
28219  ;
28220  return 0;
28221}
28222_ACEOF
28223if ac_fn_cxx_try_link "$LINENO"; then :
28224  ac_cv_lib_dnet_dnet_ntoa=yes
28225else
28226  ac_cv_lib_dnet_dnet_ntoa=no
28227fi
28228rm -f core conftest.err conftest.$ac_objext \
28229    conftest$ac_exeext conftest.$ac_ext
28230LIBS=$ac_check_lib_save_LIBS
28231fi
28232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28233$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28234if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28235  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28236fi
28237
28238    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28240$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28241if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28242  $as_echo_n "(cached) " >&6
28243else
28244  ac_check_lib_save_LIBS=$LIBS
28245LIBS="-ldnet_stub  $LIBS"
28246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28247/* end confdefs.h.  */
28248
28249/* Override any GCC internal prototype to avoid an error.
28250   Use char because int might match the return type of a GCC
28251   builtin and then its argument prototype would still apply.  */
28252#ifdef __cplusplus
28253extern "C"
28254#endif
28255char dnet_ntoa ();
28256int
28257main ()
28258{
28259return dnet_ntoa ();
28260  ;
28261  return 0;
28262}
28263_ACEOF
28264if ac_fn_cxx_try_link "$LINENO"; then :
28265  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28266else
28267  ac_cv_lib_dnet_stub_dnet_ntoa=no
28268fi
28269rm -f core conftest.err conftest.$ac_objext \
28270    conftest$ac_exeext conftest.$ac_ext
28271LIBS=$ac_check_lib_save_LIBS
28272fi
28273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28274$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28275if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28276  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28277fi
28278
28279    fi
28280fi
28281rm -f core conftest.err conftest.$ac_objext \
28282    conftest$ac_exeext conftest.$ac_ext
28283    LIBS="$ac_xsave_LIBS"
28284
28285    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28286    # to get the SysV transport functions.
28287    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28288    # needs -lnsl.
28289    # The nsl library prevents programs from opening the X display
28290    # on Irix 5.2, according to T.E. Dickey.
28291    # The functions gethostbyname, getservbyname, and inet_addr are
28292    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28293    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28294if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28295
28296fi
28297
28298    if test $ac_cv_func_gethostbyname = no; then
28299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28300$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28301if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28302  $as_echo_n "(cached) " >&6
28303else
28304  ac_check_lib_save_LIBS=$LIBS
28305LIBS="-lnsl  $LIBS"
28306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28307/* end confdefs.h.  */
28308
28309/* Override any GCC internal prototype to avoid an error.
28310   Use char because int might match the return type of a GCC
28311   builtin and then its argument prototype would still apply.  */
28312#ifdef __cplusplus
28313extern "C"
28314#endif
28315char gethostbyname ();
28316int
28317main ()
28318{
28319return gethostbyname ();
28320  ;
28321  return 0;
28322}
28323_ACEOF
28324if ac_fn_cxx_try_link "$LINENO"; then :
28325  ac_cv_lib_nsl_gethostbyname=yes
28326else
28327  ac_cv_lib_nsl_gethostbyname=no
28328fi
28329rm -f core conftest.err conftest.$ac_objext \
28330    conftest$ac_exeext conftest.$ac_ext
28331LIBS=$ac_check_lib_save_LIBS
28332fi
28333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28334$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28335if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28336  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28337fi
28338
28339      if test $ac_cv_lib_nsl_gethostbyname = no; then
28340	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28341$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28342if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28343  $as_echo_n "(cached) " >&6
28344else
28345  ac_check_lib_save_LIBS=$LIBS
28346LIBS="-lbsd  $LIBS"
28347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28348/* end confdefs.h.  */
28349
28350/* Override any GCC internal prototype to avoid an error.
28351   Use char because int might match the return type of a GCC
28352   builtin and then its argument prototype would still apply.  */
28353#ifdef __cplusplus
28354extern "C"
28355#endif
28356char gethostbyname ();
28357int
28358main ()
28359{
28360return gethostbyname ();
28361  ;
28362  return 0;
28363}
28364_ACEOF
28365if ac_fn_cxx_try_link "$LINENO"; then :
28366  ac_cv_lib_bsd_gethostbyname=yes
28367else
28368  ac_cv_lib_bsd_gethostbyname=no
28369fi
28370rm -f core conftest.err conftest.$ac_objext \
28371    conftest$ac_exeext conftest.$ac_ext
28372LIBS=$ac_check_lib_save_LIBS
28373fi
28374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28375$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28376if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28377  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28378fi
28379
28380      fi
28381    fi
28382
28383    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28384    # socket/setsockopt and other routines are undefined under SCO ODT
28385    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28386    # on later versions), says Simon Leinen: it contains gethostby*
28387    # variants that don't use the name server (or something).  -lsocket
28388    # must be given before -lnsl if both are needed.  We assume that
28389    # if connect needs -lnsl, so does gethostbyname.
28390    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28391if test "x$ac_cv_func_connect" = x""yes; then :
28392
28393fi
28394
28395    if test $ac_cv_func_connect = no; then
28396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28397$as_echo_n "checking for connect in -lsocket... " >&6; }
28398if test "${ac_cv_lib_socket_connect+set}" = set; then :
28399  $as_echo_n "(cached) " >&6
28400else
28401  ac_check_lib_save_LIBS=$LIBS
28402LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28404/* end confdefs.h.  */
28405
28406/* Override any GCC internal prototype to avoid an error.
28407   Use char because int might match the return type of a GCC
28408   builtin and then its argument prototype would still apply.  */
28409#ifdef __cplusplus
28410extern "C"
28411#endif
28412char connect ();
28413int
28414main ()
28415{
28416return connect ();
28417  ;
28418  return 0;
28419}
28420_ACEOF
28421if ac_fn_cxx_try_link "$LINENO"; then :
28422  ac_cv_lib_socket_connect=yes
28423else
28424  ac_cv_lib_socket_connect=no
28425fi
28426rm -f core conftest.err conftest.$ac_objext \
28427    conftest$ac_exeext conftest.$ac_ext
28428LIBS=$ac_check_lib_save_LIBS
28429fi
28430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28431$as_echo "$ac_cv_lib_socket_connect" >&6; }
28432if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28433  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28434fi
28435
28436    fi
28437
28438    # Guillermo Gomez says -lposix is necessary on A/UX.
28439    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28440if test "x$ac_cv_func_remove" = x""yes; then :
28441
28442fi
28443
28444    if test $ac_cv_func_remove = no; then
28445      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28446$as_echo_n "checking for remove in -lposix... " >&6; }
28447if test "${ac_cv_lib_posix_remove+set}" = set; then :
28448  $as_echo_n "(cached) " >&6
28449else
28450  ac_check_lib_save_LIBS=$LIBS
28451LIBS="-lposix  $LIBS"
28452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28453/* end confdefs.h.  */
28454
28455/* Override any GCC internal prototype to avoid an error.
28456   Use char because int might match the return type of a GCC
28457   builtin and then its argument prototype would still apply.  */
28458#ifdef __cplusplus
28459extern "C"
28460#endif
28461char remove ();
28462int
28463main ()
28464{
28465return remove ();
28466  ;
28467  return 0;
28468}
28469_ACEOF
28470if ac_fn_cxx_try_link "$LINENO"; then :
28471  ac_cv_lib_posix_remove=yes
28472else
28473  ac_cv_lib_posix_remove=no
28474fi
28475rm -f core conftest.err conftest.$ac_objext \
28476    conftest$ac_exeext conftest.$ac_ext
28477LIBS=$ac_check_lib_save_LIBS
28478fi
28479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28480$as_echo "$ac_cv_lib_posix_remove" >&6; }
28481if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28482  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28483fi
28484
28485    fi
28486
28487    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28488    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28489if test "x$ac_cv_func_shmat" = x""yes; then :
28490
28491fi
28492
28493    if test $ac_cv_func_shmat = no; then
28494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28495$as_echo_n "checking for shmat in -lipc... " >&6; }
28496if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28497  $as_echo_n "(cached) " >&6
28498else
28499  ac_check_lib_save_LIBS=$LIBS
28500LIBS="-lipc  $LIBS"
28501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28502/* end confdefs.h.  */
28503
28504/* Override any GCC internal prototype to avoid an error.
28505   Use char because int might match the return type of a GCC
28506   builtin and then its argument prototype would still apply.  */
28507#ifdef __cplusplus
28508extern "C"
28509#endif
28510char shmat ();
28511int
28512main ()
28513{
28514return shmat ();
28515  ;
28516  return 0;
28517}
28518_ACEOF
28519if ac_fn_cxx_try_link "$LINENO"; then :
28520  ac_cv_lib_ipc_shmat=yes
28521else
28522  ac_cv_lib_ipc_shmat=no
28523fi
28524rm -f core conftest.err conftest.$ac_objext \
28525    conftest$ac_exeext conftest.$ac_ext
28526LIBS=$ac_check_lib_save_LIBS
28527fi
28528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
28529$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
28530if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
28531  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
28532fi
28533
28534    fi
28535  fi
28536
28537  # Check for libraries that X11R6 Xt/Xaw programs need.
28538  ac_save_LDFLAGS=$LDFLAGS
28539  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
28540  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
28541  # check for ICE first), but we must link in the order -lSM -lICE or
28542  # we get undefined symbols.  So assume we have SM if we have ICE.
28543  # These have to be linked with before -lX11, unlike the other
28544  # libraries we check for below, so use a different variable.
28545  # John Interrante, Karl Berry
28546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
28547$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
28548if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
28549  $as_echo_n "(cached) " >&6
28550else
28551  ac_check_lib_save_LIBS=$LIBS
28552LIBS="-lICE $X_EXTRA_LIBS $LIBS"
28553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28554/* end confdefs.h.  */
28555
28556/* Override any GCC internal prototype to avoid an error.
28557   Use char because int might match the return type of a GCC
28558   builtin and then its argument prototype would still apply.  */
28559#ifdef __cplusplus
28560extern "C"
28561#endif
28562char IceConnectionNumber ();
28563int
28564main ()
28565{
28566return IceConnectionNumber ();
28567  ;
28568  return 0;
28569}
28570_ACEOF
28571if ac_fn_cxx_try_link "$LINENO"; then :
28572  ac_cv_lib_ICE_IceConnectionNumber=yes
28573else
28574  ac_cv_lib_ICE_IceConnectionNumber=no
28575fi
28576rm -f core conftest.err conftest.$ac_objext \
28577    conftest$ac_exeext conftest.$ac_ext
28578LIBS=$ac_check_lib_save_LIBS
28579fi
28580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
28581$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
28582if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
28583  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
28584fi
28585
28586  LDFLAGS=$ac_save_LDFLAGS
28587
28588fi
28589
28590
28591if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
28592
28593    # Print a helpful message on how to acquire the necessary build dependency.
28594    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28595    MISSING_DEPENDENCY=x11
28596    PKGHANDLER_COMMAND=
28597
28598    case $PKGHANDLER in
28599	apt-get)
28600                apt_help     $MISSING_DEPENDENCY ;;
28601    yum)
28602                yum_help     $MISSING_DEPENDENCY ;;
28603	port)
28604                port_help    $MISSING_DEPENDENCY ;;
28605	pkgutil)
28606                pkgutil_help $MISSING_DEPENDENCY ;;
28607	pkgadd)
28608                pkgadd_help  $MISSING_DEPENDENCY ;;
28609    * )
28610      break ;;
28611    esac
28612
28613    if test "x$PKGHANDLER_COMMAND" != x; then
28614        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28615    fi
28616
28617    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
28618fi
28619
28620# Some of the old makefiles require a setting of OPENWIN_HOME
28621# Since the X11R6 directory has disappeared on later Linuxes,
28622# we need to probe for it.
28623if test "x$OPENJDK_TARGET_OS" = xlinux; then
28624    if test -d "$SYS_ROOT/usr/X11R6"; then
28625        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
28626    fi
28627    if test -d "$SYS_ROOT/usr/include/X11"; then
28628        OPENWIN_HOME="$SYS_ROOT/usr"
28629    fi
28630fi
28631if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28632    OPENWIN_HOME="/usr/openwin"
28633fi
28634
28635
28636
28637#
28638# Weird Sol10 something check...TODO change to try compile
28639#
28640if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
28641  if test "`uname -r`" = "5.10"; then
28642     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28643     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28644     fi
28645  fi
28646fi
28647
28648ac_ext=c
28649ac_cpp='$CPP $CPPFLAGS'
28650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28652ac_compiler_gnu=$ac_cv_c_compiler_gnu
28653
28654OLD_CFLAGS="$CFLAGS"
28655CFLAGS="$CFLAGS $X_CFLAGS"
28656
28657# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28658for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28659do :
28660  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28661ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28662                   # include <X11/Xutil.h>
28663
28664"
28665if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28666  cat >>confdefs.h <<_ACEOF
28667#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28668_ACEOF
28669 X11_A_OK=yes
28670else
28671  X11_A_OK=no
28672fi
28673
28674done
28675
28676
28677CFLAGS="$OLD_CFLAGS"
28678ac_ext=cpp
28679ac_cpp='$CXXCPP $CPPFLAGS'
28680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28683
28684
28685if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28686
28687    # Print a helpful message on how to acquire the necessary build dependency.
28688    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28689    MISSING_DEPENDENCY=x11
28690    PKGHANDLER_COMMAND=
28691
28692    case $PKGHANDLER in
28693	apt-get)
28694                apt_help     $MISSING_DEPENDENCY ;;
28695    yum)
28696                yum_help     $MISSING_DEPENDENCY ;;
28697	port)
28698                port_help    $MISSING_DEPENDENCY ;;
28699	pkgutil)
28700                pkgutil_help $MISSING_DEPENDENCY ;;
28701	pkgadd)
28702                pkgadd_help  $MISSING_DEPENDENCY ;;
28703    * )
28704      break ;;
28705    esac
28706
28707    if test "x$PKGHANDLER_COMMAND" != x; then
28708        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28709    fi
28710
28711    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28712fi
28713
28714
28715
28716
28717
28718
28719###############################################################################
28720#
28721# The common unix printing system cups is used to print from java.
28722#
28723
28724# Check whether --with-cups was given.
28725if test "${with_cups+set}" = set; then :
28726  withval=$with_cups;
28727fi
28728
28729
28730# Check whether --with-cups-include was given.
28731if test "${with_cups_include+set}" = set; then :
28732  withval=$with_cups_include;
28733fi
28734
28735
28736if test "x$CUPS_NOT_NEEDED" = xyes; then
28737	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28738		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28739$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28740	fi
28741	CUPS_CFLAGS=
28742else
28743	CUPS_FOUND=no
28744
28745	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28746	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28747	fi
28748
28749	if test "x${with_cups}" != x; then
28750	    CUPS_CFLAGS="-I${with_cups}/include"
28751	    CUPS_FOUND=yes
28752	fi
28753	if test "x${with_cups_include}" != x; then
28754	    CUPS_CFLAGS="-I${with_cups_include}"
28755	    CUPS_FOUND=yes
28756	fi
28757	if test "x$CUPS_FOUND" = xno; then
28758
28759
28760    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28761        # Source the builddeps file again, to make sure it uses the latest variables!
28762        . $builddepsfile
28763        # Look for a target and build machine specific resource!
28764        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28765        if test "x$resource" = x; then
28766            # Ok, lets instead look for a target specific resource
28767            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28768        fi
28769        if test "x$resource" = x; then
28770            # Ok, lets instead look for a build specific resource
28771            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28772        fi
28773        if test "x$resource" = x; then
28774            # Ok, lets instead look for a generic resource
28775            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28776            resource=${builddep_cups}
28777        fi
28778        if test "x$resource" != x; then
28779            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28780$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28781	    # If the resource in the builddeps.conf file is an existing directory,
28782	    # for example /java/linux/cups
28783	    if test -d ${resource}; then
28784	       depdir=${resource}
28785	    else
28786
28787# cups is for example mymodule
28788# $resource is for example libs/general/libmymod_1_2_3.zip
28789# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28790# $with_builddeps_dir is for example /localhome/builddeps
28791# depdir is the name of the variable into which we store the depdir, eg MYMOD
28792# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28793# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28794    filename=`basename $resource`
28795    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28796    filebase=${filename%%.*}
28797    extension=${filename#*.}
28798    installdir=$with_builddeps_dir/$filebase
28799    if test ! -f $installdir/$filename.unpacked; then
28800        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28801$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28802        if test ! -d $installdir; then
28803            mkdir -p $installdir
28804        fi
28805        if test ! -d $installdir; then
28806            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28807        fi
28808        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28809        touch $tmpfile
28810        if test ! -f $tmpfile; then
28811            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28812        fi
28813
28814    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28815    # $tmpfile is the local file name for the downloaded file.
28816    VALID_TOOL=no
28817    if test "x$BDEPS_FTP" = xwget; then
28818       VALID_TOOL=yes
28819       wget -O $tmpfile $with_builddeps_server/$resource
28820    fi
28821    if test "x$BDEPS_FTP" = xlftp; then
28822       VALID_TOOL=yes
28823       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28824    fi
28825    if test "x$BDEPS_FTP" = xftp; then
28826        VALID_TOOL=yes
28827        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28828        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28829        FTPUSERPWD=${FTPSERVER%%@*}
28830        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28831            FTPUSER=${userpwd%%:*}
28832            FTPPWD=${userpwd#*@}
28833            FTPSERVER=${FTPSERVER#*@}
28834        else
28835            FTPUSER=ftp
28836            FTPPWD=ftp
28837        fi
28838        # the "pass" command does not work on some
28839        # ftp clients (read ftp.exe) but if it works,
28840        # passive mode is better!
28841        (\
28842            echo "user $FTPUSER $FTPPWD"        ;\
28843            echo "pass"                         ;\
28844            echo "bin"                          ;\
28845            echo "get $FTPPATH $tmpfile"              ;\
28846        ) | ftp -in $FTPSERVER
28847    fi
28848    if test "x$VALID_TOOL" != xyes; then
28849       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28850    fi
28851
28852        mv $tmpfile $installdir/$filename
28853        if test ! -s $installdir/$filename; then
28854            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28855        fi
28856        case "$extension" in
28857            zip)  echo "Unzipping $installdir/$filename..."
28858               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28859            ;;
28860            tar.gz) echo "Untaring $installdir/$filename..."
28861               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28862            ;;
28863            tgz) echo "Untaring $installdir/$filename..."
28864               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28865            ;;
28866            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28867            ;;
28868        esac
28869    fi
28870    if test -f $installdir/$filename.unpacked; then
28871        depdir=$installdir
28872    fi
28873
28874	    fi
28875            # Source the builddeps file again, because in the previous command, the depdir
28876            # was updated to point at the current build dependency install directory.
28877            . $builddepsfile
28878            # Now extract variables from the builddeps.conf files.
28879            theroot=${builddep_cups_ROOT}
28880            thecflags=${builddep_cups_CFLAGS}
28881            thelibs=${builddep_cups_LIBS}
28882            if test "x$depdir" = x; then
28883                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28884            fi
28885            CUPS=$depdir
28886            if test "x$theroot" != x; then
28887               CUPS="$theroot"
28888            fi
28889            if test "x$thecflags" != x; then
28890               CUPS_CFLAGS="$thecflags"
28891            fi
28892            if test "x$thelibs" != x; then
28893               CUPS_LIBS="$thelibs"
28894            fi
28895            CUPS_FOUND=yes
28896
28897        fi
28898
28899    fi
28900
28901	fi
28902	if test "x$CUPS_FOUND" = xno; then
28903	    # Are the cups headers installed in the default /usr/include location?
28904	    for ac_header in cups/cups.h cups/ppd.h
28905do :
28906  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28907ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28908if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28909  cat >>confdefs.h <<_ACEOF
28910#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28911_ACEOF
28912 CUPS_FOUND=yes
28913	                      CUPS_CFLAGS=
28914	                      DEFAULT_CUPS=yes
28915fi
28916
28917done
28918
28919	fi
28920	if test "x$CUPS_FOUND" = xno; then
28921	    # Getting nervous now? Lets poke around for standard Solaris third-party
28922	    # package installation locations.
28923	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
28924$as_echo_n "checking for cups headers... " >&6; }
28925	    if test -s /opt/sfw/cups/include/cups/cups.h; then
28926	       # An SFW package seems to be installed!
28927	       CUPS_FOUND=yes
28928	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
28929	    elif test -s /opt/csw/include/cups/cups.h; then
28930	       # A CSW package seems to be installed!
28931	       CUPS_FOUND=yes
28932	       CUPS_CFLAGS="-I/opt/csw/include"
28933	    fi
28934	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
28935$as_echo "$CUPS_FOUND" >&6; }
28936	fi
28937	if test "x$CUPS_FOUND" = xno; then
28938
28939    # Print a helpful message on how to acquire the necessary build dependency.
28940    # cups is the help tag: freetyp2, cups, pulse, alsa etc
28941    MISSING_DEPENDENCY=cups
28942    PKGHANDLER_COMMAND=
28943
28944    case $PKGHANDLER in
28945	apt-get)
28946                apt_help     $MISSING_DEPENDENCY ;;
28947    yum)
28948                yum_help     $MISSING_DEPENDENCY ;;
28949	port)
28950                port_help    $MISSING_DEPENDENCY ;;
28951	pkgutil)
28952                pkgutil_help $MISSING_DEPENDENCY ;;
28953	pkgadd)
28954                pkgadd_help  $MISSING_DEPENDENCY ;;
28955    * )
28956      break ;;
28957    esac
28958
28959    if test "x$PKGHANDLER_COMMAND" != x; then
28960        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28961    fi
28962
28963	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
28964	fi
28965fi
28966
28967
28968
28969
28970
28971
28972###############################################################################
28973#
28974# The ubiquitous freetype2 library is used to render fonts.
28975#
28976
28977# Check whether --with-freetype was given.
28978if test "${with_freetype+set}" = set; then :
28979  withval=$with_freetype;
28980fi
28981
28982
28983# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
28984USING_SYSTEM_FT_LIB=false
28985
28986if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
28987	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
28988		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
28989$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
28990	fi
28991	FREETYPE2_CFLAGS=
28992	FREETYPE2_LIBS=
28993        FREETYPE2_LIB_PATH=
28994else
28995	FREETYPE2_FOUND=no
28996
28997	if test "x$with_freetype" != x; then
28998
28999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29000
29001  # Input might be given as Windows format, start by converting to
29002  # unix format.
29003  path="$with_freetype"
29004  new_path=`$CYGPATH -u "$path"`
29005
29006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29009  # "foo.exe" is OK but "foo" is an error.
29010  #
29011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29012  # It is also a way to make sure we got the proper file name for the real test later on.
29013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29014  if test "x$test_shortpath" = x; then
29015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29016$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29017    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29018  fi
29019
29020  # Call helper function which possibly converts this using DOS-style short mode.
29021  # If so, the updated path is stored in $new_path.
29022
29023  input_path="$new_path"
29024  # Check if we need to convert this using DOS-style short mode. If the path
29025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29026  # take no chances and rewrite it.
29027  # Note: m4 eats our [], so we need to use [ and ] instead.
29028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29029  if test "x$has_forbidden_chars" != x; then
29030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29034      # Going to short mode and back again did indeed matter. Since short mode is
29035      # case insensitive, let's make it lowercase to improve readability.
29036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29037      # Now convert it back to Unix-stile (cygpath)
29038      input_path=`$CYGPATH -u "$shortmode_path"`
29039      new_path="$input_path"
29040    fi
29041  fi
29042
29043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29044  if test "x$test_cygdrive_prefix" = x; then
29045    # As a simple fix, exclude /usr/bin since it's not a real path.
29046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29048      # a path prefixed by /cygdrive for fixpath to work.
29049      new_path="$CYGWIN_ROOT_PATH$input_path"
29050    fi
29051  fi
29052
29053
29054  if test "x$path" != "x$new_path"; then
29055    with_freetype="$new_path"
29056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29057$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29058  fi
29059
29060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29061
29062  path="$with_freetype"
29063  has_colon=`$ECHO $path | $GREP ^.:`
29064  new_path="$path"
29065  if test "x$has_colon" = x; then
29066    # Not in mixed or Windows style, start by that.
29067    new_path=`cmd //c echo $path`
29068  fi
29069
29070
29071  input_path="$new_path"
29072  # Check if we need to convert this using DOS-style short mode. If the path
29073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29074  # take no chances and rewrite it.
29075  # Note: m4 eats our [], so we need to use [ and ] instead.
29076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29077  if test "x$has_forbidden_chars" != x; then
29078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29080  fi
29081
29082
29083  windows_path="$new_path"
29084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29085    unix_path=`$CYGPATH -u "$windows_path"`
29086    new_path="$unix_path"
29087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29089    new_path="$unix_path"
29090  fi
29091
29092  if test "x$path" != "x$new_path"; then
29093    with_freetype="$new_path"
29094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29095$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29096  fi
29097
29098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29100
29101  else
29102    # We're on a posix platform. Hooray! :)
29103    path="$with_freetype"
29104
29105    if test ! -f "$path" && test ! -d "$path"; then
29106      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29107    fi
29108
29109    has_space=`$ECHO "$path" | $GREP " "`
29110    if test "x$has_space" != x; then
29111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29112$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29113      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29114    fi
29115  fi
29116
29117	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29118            FREETYPE2_LIB_PATH="$with_freetype/lib"
29119            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29120                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29121                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29122            fi
29123            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29124                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29125            fi
29126	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29127            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29128                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29129            fi
29130 	    FREETYPE2_FOUND=yes
29131   	    if test "x$FREETYPE2_FOUND" = xyes; then
29132	        # Verify that the directories exist
29133                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29134		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29135		fi
29136	        # List the contents of the lib.
29137		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29138                if test "x$FREETYPELIB" = x; then
29139		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29140		fi
29141	        # Check one h-file
29142                if ! test -s "$with_freetype/include/ft2build.h"; then
29143		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29144		fi
29145            fi
29146        fi
29147	if test "x$FREETYPE2_FOUND" = xno; then
29148
29149
29150    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29151        # Source the builddeps file again, to make sure it uses the latest variables!
29152        . $builddepsfile
29153        # Look for a target and build machine specific resource!
29154        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29155        if test "x$resource" = x; then
29156            # Ok, lets instead look for a target specific resource
29157            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29158        fi
29159        if test "x$resource" = x; then
29160            # Ok, lets instead look for a build specific resource
29161            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29162        fi
29163        if test "x$resource" = x; then
29164            # Ok, lets instead look for a generic resource
29165            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29166            resource=${builddep_freetype2}
29167        fi
29168        if test "x$resource" != x; then
29169            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29170$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29171	    # If the resource in the builddeps.conf file is an existing directory,
29172	    # for example /java/linux/cups
29173	    if test -d ${resource}; then
29174	       depdir=${resource}
29175	    else
29176
29177# freetype2 is for example mymodule
29178# $resource is for example libs/general/libmymod_1_2_3.zip
29179# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29180# $with_builddeps_dir is for example /localhome/builddeps
29181# depdir is the name of the variable into which we store the depdir, eg MYMOD
29182# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29183# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29184    filename=`basename $resource`
29185    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29186    filebase=${filename%%.*}
29187    extension=${filename#*.}
29188    installdir=$with_builddeps_dir/$filebase
29189    if test ! -f $installdir/$filename.unpacked; then
29190        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29191$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29192        if test ! -d $installdir; then
29193            mkdir -p $installdir
29194        fi
29195        if test ! -d $installdir; then
29196            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29197        fi
29198        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29199        touch $tmpfile
29200        if test ! -f $tmpfile; then
29201            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29202        fi
29203
29204    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29205    # $tmpfile is the local file name for the downloaded file.
29206    VALID_TOOL=no
29207    if test "x$BDEPS_FTP" = xwget; then
29208       VALID_TOOL=yes
29209       wget -O $tmpfile $with_builddeps_server/$resource
29210    fi
29211    if test "x$BDEPS_FTP" = xlftp; then
29212       VALID_TOOL=yes
29213       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29214    fi
29215    if test "x$BDEPS_FTP" = xftp; then
29216        VALID_TOOL=yes
29217        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29218        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29219        FTPUSERPWD=${FTPSERVER%%@*}
29220        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29221            FTPUSER=${userpwd%%:*}
29222            FTPPWD=${userpwd#*@}
29223            FTPSERVER=${FTPSERVER#*@}
29224        else
29225            FTPUSER=ftp
29226            FTPPWD=ftp
29227        fi
29228        # the "pass" command does not work on some
29229        # ftp clients (read ftp.exe) but if it works,
29230        # passive mode is better!
29231        (\
29232            echo "user $FTPUSER $FTPPWD"        ;\
29233            echo "pass"                         ;\
29234            echo "bin"                          ;\
29235            echo "get $FTPPATH $tmpfile"              ;\
29236        ) | ftp -in $FTPSERVER
29237    fi
29238    if test "x$VALID_TOOL" != xyes; then
29239       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29240    fi
29241
29242        mv $tmpfile $installdir/$filename
29243        if test ! -s $installdir/$filename; then
29244            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29245        fi
29246        case "$extension" in
29247            zip)  echo "Unzipping $installdir/$filename..."
29248               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29249            ;;
29250            tar.gz) echo "Untaring $installdir/$filename..."
29251               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29252            ;;
29253            tgz) echo "Untaring $installdir/$filename..."
29254               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29255            ;;
29256            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29257            ;;
29258        esac
29259    fi
29260    if test -f $installdir/$filename.unpacked; then
29261        depdir=$installdir
29262    fi
29263
29264	    fi
29265            # Source the builddeps file again, because in the previous command, the depdir
29266            # was updated to point at the current build dependency install directory.
29267            . $builddepsfile
29268            # Now extract variables from the builddeps.conf files.
29269            theroot=${builddep_freetype2_ROOT}
29270            thecflags=${builddep_freetype2_CFLAGS}
29271            thelibs=${builddep_freetype2_LIBS}
29272            if test "x$depdir" = x; then
29273                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29274            fi
29275            FREETYPE2=$depdir
29276            if test "x$theroot" != x; then
29277               FREETYPE2="$theroot"
29278            fi
29279            if test "x$thecflags" != x; then
29280               FREETYPE2_CFLAGS="$thecflags"
29281            fi
29282            if test "x$thelibs" != x; then
29283               FREETYPE2_LIBS="$thelibs"
29284            fi
29285            FREETYPE2_FOUND=yes
29286            else FREETYPE2_FOUND=no
29287
29288        fi
29289        else FREETYPE2_FOUND=no
29290
29291    fi
29292
29293            USING_SYSTEM_FT_LIB=true
29294	fi
29295	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29296            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29297
29298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29299
29300  # Input might be given as Windows format, start by converting to
29301  # unix format.
29302  path="$FREETYPELOCATION"
29303  new_path=`$CYGPATH -u "$path"`
29304
29305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29308  # "foo.exe" is OK but "foo" is an error.
29309  #
29310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29311  # It is also a way to make sure we got the proper file name for the real test later on.
29312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29313  if test "x$test_shortpath" = x; then
29314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29315$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29316    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29317  fi
29318
29319  # Call helper function which possibly converts this using DOS-style short mode.
29320  # If so, the updated path is stored in $new_path.
29321
29322  input_path="$new_path"
29323  # Check if we need to convert this using DOS-style short mode. If the path
29324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29325  # take no chances and rewrite it.
29326  # Note: m4 eats our [], so we need to use [ and ] instead.
29327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29328  if test "x$has_forbidden_chars" != x; then
29329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29333      # Going to short mode and back again did indeed matter. Since short mode is
29334      # case insensitive, let's make it lowercase to improve readability.
29335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29336      # Now convert it back to Unix-stile (cygpath)
29337      input_path=`$CYGPATH -u "$shortmode_path"`
29338      new_path="$input_path"
29339    fi
29340  fi
29341
29342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29343  if test "x$test_cygdrive_prefix" = x; then
29344    # As a simple fix, exclude /usr/bin since it's not a real path.
29345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29347      # a path prefixed by /cygdrive for fixpath to work.
29348      new_path="$CYGWIN_ROOT_PATH$input_path"
29349    fi
29350  fi
29351
29352
29353  if test "x$path" != "x$new_path"; then
29354    FREETYPELOCATION="$new_path"
29355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29356$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29357  fi
29358
29359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29360
29361  path="$FREETYPELOCATION"
29362  has_colon=`$ECHO $path | $GREP ^.:`
29363  new_path="$path"
29364  if test "x$has_colon" = x; then
29365    # Not in mixed or Windows style, start by that.
29366    new_path=`cmd //c echo $path`
29367  fi
29368
29369
29370  input_path="$new_path"
29371  # Check if we need to convert this using DOS-style short mode. If the path
29372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29373  # take no chances and rewrite it.
29374  # Note: m4 eats our [], so we need to use [ and ] instead.
29375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29376  if test "x$has_forbidden_chars" != x; then
29377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29379  fi
29380
29381
29382  windows_path="$new_path"
29383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29384    unix_path=`$CYGPATH -u "$windows_path"`
29385    new_path="$unix_path"
29386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29388    new_path="$unix_path"
29389  fi
29390
29391  if test "x$path" != "x$new_path"; then
29392    FREETYPELOCATION="$new_path"
29393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29394$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29395  fi
29396
29397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29399
29400  else
29401    # We're on a posix platform. Hooray! :)
29402    path="$FREETYPELOCATION"
29403
29404    if test ! -f "$path" && test ! -d "$path"; then
29405      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29406    fi
29407
29408    has_space=`$ECHO "$path" | $GREP " "`
29409    if test "x$has_space" != x; then
29410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29411$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29412      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29413    fi
29414  fi
29415
29416	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29417$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29418	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29419	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29420	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29421 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29422                if ! test -s "$FREETYPE2_LIBS"; then
29423		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29424		fi
29425                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29426		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29427		fi
29428                USING_SYSTEM_FT_LIB=true
29429                FREETYPE2_FOUND=yes
29430	    fi
29431	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29432$as_echo "$FREETYPE2_FOUND" >&6; }
29433        fi
29434	if test "x$FREETYPE2_FOUND" = xno; then
29435
29436pkg_failed=no
29437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29438$as_echo_n "checking for FREETYPE2... " >&6; }
29439
29440if test -n "$FREETYPE2_CFLAGS"; then
29441    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29442 elif test -n "$PKG_CONFIG"; then
29443    if test -n "$PKG_CONFIG" && \
29444    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29445  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29446  ac_status=$?
29447  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29448  test $ac_status = 0; }; then
29449  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29450else
29451  pkg_failed=yes
29452fi
29453 else
29454    pkg_failed=untried
29455fi
29456if test -n "$FREETYPE2_LIBS"; then
29457    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29458 elif test -n "$PKG_CONFIG"; then
29459    if test -n "$PKG_CONFIG" && \
29460    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29461  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29462  ac_status=$?
29463  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29464  test $ac_status = 0; }; then
29465  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29466else
29467  pkg_failed=yes
29468fi
29469 else
29470    pkg_failed=untried
29471fi
29472
29473
29474
29475if test $pkg_failed = yes; then
29476
29477if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29478        _pkg_short_errors_supported=yes
29479else
29480        _pkg_short_errors_supported=no
29481fi
29482        if test $_pkg_short_errors_supported = yes; then
29483	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29484        else
29485	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29486        fi
29487	# Put the nasty error message in config.log where it belongs
29488	echo "$FREETYPE2_PKG_ERRORS" >&5
29489
29490	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29491$as_echo "no" >&6; }
29492                FREETYPE2_FOUND=no
29493elif test $pkg_failed = untried; then
29494	FREETYPE2_FOUND=no
29495else
29496	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29497	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29499$as_echo "yes" >&6; }
29500	FREETYPE2_FOUND=yes
29501fi
29502            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29503            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29504            USING_SYSTEM_FT_LIB=true
29505            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29506            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29507              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29508            fi
29509	fi
29510	if test "x$FREETYPE2_FOUND" = xno; then
29511	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29512$as_echo_n "checking for freetype in some standard locations... " >&6; }
29513
29514	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29515	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29516	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29517	    fi
29518	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29519	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29520	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29521	    fi
29522
29523	    PREV_CXXCFLAGS="$CXXFLAGS"
29524	    PREV_LDFLAGS="$LDFLAGS"
29525	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29526	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
29527	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29528/* end confdefs.h.  */
29529#include<ft2build.h>
29530	                    #include FT_FREETYPE_H
29531	                   int main() { return 0; }
29532
29533_ACEOF
29534if ac_fn_cxx_try_link "$LINENO"; then :
29535
29536	                      # Yes, the default cflags and libs did the trick.
29537	                      FREETYPE2_FOUND=yes
29538	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
29539	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
29540
29541else
29542
29543	                      FREETYPE2_FOUND=no
29544
29545fi
29546rm -f core conftest.err conftest.$ac_objext \
29547    conftest$ac_exeext conftest.$ac_ext
29548            CXXCFLAGS="$PREV_CXXFLAGS"
29549	    LDFLAGS="$PREV_LDFLAGS"
29550	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29551$as_echo "$FREETYPE2_FOUND" >&6; }
29552            USING_SYSTEM_FT_LIB=true
29553	fi
29554	if test "x$FREETYPE2_FOUND" = xno; then
29555
29556    # Print a helpful message on how to acquire the necessary build dependency.
29557    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
29558    MISSING_DEPENDENCY=freetype2
29559    PKGHANDLER_COMMAND=
29560
29561    case $PKGHANDLER in
29562	apt-get)
29563                apt_help     $MISSING_DEPENDENCY ;;
29564    yum)
29565                yum_help     $MISSING_DEPENDENCY ;;
29566	port)
29567                port_help    $MISSING_DEPENDENCY ;;
29568	pkgutil)
29569                pkgutil_help $MISSING_DEPENDENCY ;;
29570	pkgadd)
29571                pkgadd_help  $MISSING_DEPENDENCY ;;
29572    * )
29573      break ;;
29574    esac
29575
29576    if test "x$PKGHANDLER_COMMAND" != x; then
29577        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29578    fi
29579
29580		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29581	fi
29582
29583        if test "x$OPENJDK_TARGET_OS" != xwindows; then
29584            # AC_CHECK_LIB does not support use of cl.exe
29585            PREV_LDFLAGS="$LDFLAGS"
29586            LDFLAGS="$FREETYPE2_LIBS"
29587            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
29588$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
29589if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
29590  $as_echo_n "(cached) " >&6
29591else
29592  ac_check_lib_save_LIBS=$LIBS
29593LIBS="-lfreetype  $LIBS"
29594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29595/* end confdefs.h.  */
29596
29597/* Override any GCC internal prototype to avoid an error.
29598   Use char because int might match the return type of a GCC
29599   builtin and then its argument prototype would still apply.  */
29600#ifdef __cplusplus
29601extern "C"
29602#endif
29603char FT_Init_FreeType ();
29604int
29605main ()
29606{
29607return FT_Init_FreeType ();
29608  ;
29609  return 0;
29610}
29611_ACEOF
29612if ac_fn_cxx_try_link "$LINENO"; then :
29613  ac_cv_lib_freetype_FT_Init_FreeType=yes
29614else
29615  ac_cv_lib_freetype_FT_Init_FreeType=no
29616fi
29617rm -f core conftest.err conftest.$ac_objext \
29618    conftest$ac_exeext conftest.$ac_ext
29619LIBS=$ac_check_lib_save_LIBS
29620fi
29621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
29622$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
29623if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
29624  FREETYPE2_FOUND=true
29625else
29626  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29627fi
29628
29629            LDFLAGS="$PREV_LDFLAGS"
29630        fi
29631fi
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641###############################################################################
29642#
29643# Check for alsa headers and libraries. Used on Linux/GNU systems.
29644#
29645
29646# Check whether --with-alsa was given.
29647if test "${with_alsa+set}" = set; then :
29648  withval=$with_alsa;
29649fi
29650
29651
29652# Check whether --with-alsa-include was given.
29653if test "${with_alsa_include+set}" = set; then :
29654  withval=$with_alsa_include;
29655fi
29656
29657
29658# Check whether --with-alsa-lib was given.
29659if test "${with_alsa_lib+set}" = set; then :
29660  withval=$with_alsa_lib;
29661fi
29662
29663
29664if test "x$ALSA_NOT_NEEDED" = xyes; then
29665	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29666		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29667$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29668	fi
29669	ALSA_CFLAGS=
29670	ALSA_LIBS=
29671else
29672	ALSA_FOUND=no
29673
29674	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29675	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29676	fi
29677
29678	if test "x${with_alsa}" != x; then
29679	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29680	    ALSA_CFLAGS="-I${with_alsa}/include"
29681	    ALSA_FOUND=yes
29682	fi
29683	if test "x${with_alsa_include}" != x; then
29684	    ALSA_CFLAGS="-I${with_alsa_include}"
29685	    ALSA_FOUND=yes
29686	fi
29687	if test "x${with_alsa_lib}" != x; then
29688	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29689	    ALSA_FOUND=yes
29690	fi
29691	if test "x$ALSA_FOUND" = xno; then
29692
29693
29694    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29695        # Source the builddeps file again, to make sure it uses the latest variables!
29696        . $builddepsfile
29697        # Look for a target and build machine specific resource!
29698        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29699        if test "x$resource" = x; then
29700            # Ok, lets instead look for a target specific resource
29701            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29702        fi
29703        if test "x$resource" = x; then
29704            # Ok, lets instead look for a build specific resource
29705            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29706        fi
29707        if test "x$resource" = x; then
29708            # Ok, lets instead look for a generic resource
29709            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29710            resource=${builddep_alsa}
29711        fi
29712        if test "x$resource" != x; then
29713            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29714$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29715	    # If the resource in the builddeps.conf file is an existing directory,
29716	    # for example /java/linux/cups
29717	    if test -d ${resource}; then
29718	       depdir=${resource}
29719	    else
29720
29721# alsa is for example mymodule
29722# $resource is for example libs/general/libmymod_1_2_3.zip
29723# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29724# $with_builddeps_dir is for example /localhome/builddeps
29725# depdir is the name of the variable into which we store the depdir, eg MYMOD
29726# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29727# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29728    filename=`basename $resource`
29729    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29730    filebase=${filename%%.*}
29731    extension=${filename#*.}
29732    installdir=$with_builddeps_dir/$filebase
29733    if test ! -f $installdir/$filename.unpacked; then
29734        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29735$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29736        if test ! -d $installdir; then
29737            mkdir -p $installdir
29738        fi
29739        if test ! -d $installdir; then
29740            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29741        fi
29742        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29743        touch $tmpfile
29744        if test ! -f $tmpfile; then
29745            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29746        fi
29747
29748    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29749    # $tmpfile is the local file name for the downloaded file.
29750    VALID_TOOL=no
29751    if test "x$BDEPS_FTP" = xwget; then
29752       VALID_TOOL=yes
29753       wget -O $tmpfile $with_builddeps_server/$resource
29754    fi
29755    if test "x$BDEPS_FTP" = xlftp; then
29756       VALID_TOOL=yes
29757       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29758    fi
29759    if test "x$BDEPS_FTP" = xftp; then
29760        VALID_TOOL=yes
29761        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29762        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29763        FTPUSERPWD=${FTPSERVER%%@*}
29764        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29765            FTPUSER=${userpwd%%:*}
29766            FTPPWD=${userpwd#*@}
29767            FTPSERVER=${FTPSERVER#*@}
29768        else
29769            FTPUSER=ftp
29770            FTPPWD=ftp
29771        fi
29772        # the "pass" command does not work on some
29773        # ftp clients (read ftp.exe) but if it works,
29774        # passive mode is better!
29775        (\
29776            echo "user $FTPUSER $FTPPWD"        ;\
29777            echo "pass"                         ;\
29778            echo "bin"                          ;\
29779            echo "get $FTPPATH $tmpfile"              ;\
29780        ) | ftp -in $FTPSERVER
29781    fi
29782    if test "x$VALID_TOOL" != xyes; then
29783       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29784    fi
29785
29786        mv $tmpfile $installdir/$filename
29787        if test ! -s $installdir/$filename; then
29788            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29789        fi
29790        case "$extension" in
29791            zip)  echo "Unzipping $installdir/$filename..."
29792               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29793            ;;
29794            tar.gz) echo "Untaring $installdir/$filename..."
29795               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29796            ;;
29797            tgz) echo "Untaring $installdir/$filename..."
29798               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29799            ;;
29800            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29801            ;;
29802        esac
29803    fi
29804    if test -f $installdir/$filename.unpacked; then
29805        depdir=$installdir
29806    fi
29807
29808	    fi
29809            # Source the builddeps file again, because in the previous command, the depdir
29810            # was updated to point at the current build dependency install directory.
29811            . $builddepsfile
29812            # Now extract variables from the builddeps.conf files.
29813            theroot=${builddep_alsa_ROOT}
29814            thecflags=${builddep_alsa_CFLAGS}
29815            thelibs=${builddep_alsa_LIBS}
29816            if test "x$depdir" = x; then
29817                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29818            fi
29819            ALSA=$depdir
29820            if test "x$theroot" != x; then
29821               ALSA="$theroot"
29822            fi
29823            if test "x$thecflags" != x; then
29824               ALSA_CFLAGS="$thecflags"
29825            fi
29826            if test "x$thelibs" != x; then
29827               ALSA_LIBS="$thelibs"
29828            fi
29829            ALSA_FOUND=yes
29830            else ALSA_FOUND=no
29831
29832        fi
29833        else ALSA_FOUND=no
29834
29835    fi
29836
29837	fi
29838	if test "x$ALSA_FOUND" = xno; then
29839
29840pkg_failed=no
29841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29842$as_echo_n "checking for ALSA... " >&6; }
29843
29844if test -n "$ALSA_CFLAGS"; then
29845    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29846 elif test -n "$PKG_CONFIG"; then
29847    if test -n "$PKG_CONFIG" && \
29848    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29849  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29850  ac_status=$?
29851  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29852  test $ac_status = 0; }; then
29853  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29854else
29855  pkg_failed=yes
29856fi
29857 else
29858    pkg_failed=untried
29859fi
29860if test -n "$ALSA_LIBS"; then
29861    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29862 elif test -n "$PKG_CONFIG"; then
29863    if test -n "$PKG_CONFIG" && \
29864    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29865  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29866  ac_status=$?
29867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29868  test $ac_status = 0; }; then
29869  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29870else
29871  pkg_failed=yes
29872fi
29873 else
29874    pkg_failed=untried
29875fi
29876
29877
29878
29879if test $pkg_failed = yes; then
29880
29881if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29882        _pkg_short_errors_supported=yes
29883else
29884        _pkg_short_errors_supported=no
29885fi
29886        if test $_pkg_short_errors_supported = yes; then
29887	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29888        else
29889	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
29890        fi
29891	# Put the nasty error message in config.log where it belongs
29892	echo "$ALSA_PKG_ERRORS" >&5
29893
29894	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29895$as_echo "no" >&6; }
29896                ALSA_FOUND=no
29897elif test $pkg_failed = untried; then
29898	ALSA_FOUND=no
29899else
29900	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
29901	ALSA_LIBS=$pkg_cv_ALSA_LIBS
29902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29903$as_echo "yes" >&6; }
29904	ALSA_FOUND=yes
29905fi
29906	fi
29907	if test "x$ALSA_FOUND" = xno; then
29908	    for ac_header in alsa/asoundlib.h
29909do :
29910  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
29911if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
29912  cat >>confdefs.h <<_ACEOF
29913#define HAVE_ALSA_ASOUNDLIB_H 1
29914_ACEOF
29915 ALSA_FOUND=yes
29916	                      ALSA_CFLAGS=-Iignoreme
29917	                      ALSA_LIBS=-lasound
29918	                      DEFAULT_ALSA=yes
29919else
29920  ALSA_FOUND=no
29921fi
29922
29923done
29924
29925	fi
29926	if test "x$ALSA_FOUND" = xno; then
29927
29928    # Print a helpful message on how to acquire the necessary build dependency.
29929    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
29930    MISSING_DEPENDENCY=alsa
29931    PKGHANDLER_COMMAND=
29932
29933    case $PKGHANDLER in
29934	apt-get)
29935                apt_help     $MISSING_DEPENDENCY ;;
29936    yum)
29937                yum_help     $MISSING_DEPENDENCY ;;
29938	port)
29939                port_help    $MISSING_DEPENDENCY ;;
29940	pkgutil)
29941                pkgutil_help $MISSING_DEPENDENCY ;;
29942	pkgadd)
29943                pkgadd_help  $MISSING_DEPENDENCY ;;
29944    * )
29945      break ;;
29946    esac
29947
29948    if test "x$PKGHANDLER_COMMAND" != x; then
29949        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29950    fi
29951
29952	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
29953	fi
29954fi
29955
29956
29957
29958
29959
29960
29961
29962###############################################################################
29963#
29964# Check for the jpeg library
29965#
29966
29967USE_EXTERNAL_LIBJPEG=true
29968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
29969$as_echo_n "checking for main in -ljpeg... " >&6; }
29970if test "${ac_cv_lib_jpeg_main+set}" = set; then :
29971  $as_echo_n "(cached) " >&6
29972else
29973  ac_check_lib_save_LIBS=$LIBS
29974LIBS="-ljpeg  $LIBS"
29975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29976/* end confdefs.h.  */
29977
29978
29979int
29980main ()
29981{
29982return main ();
29983  ;
29984  return 0;
29985}
29986_ACEOF
29987if ac_fn_cxx_try_link "$LINENO"; then :
29988  ac_cv_lib_jpeg_main=yes
29989else
29990  ac_cv_lib_jpeg_main=no
29991fi
29992rm -f core conftest.err conftest.$ac_objext \
29993    conftest$ac_exeext conftest.$ac_ext
29994LIBS=$ac_check_lib_save_LIBS
29995fi
29996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
29997$as_echo "$ac_cv_lib_jpeg_main" >&6; }
29998if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
29999  cat >>confdefs.h <<_ACEOF
30000#define HAVE_LIBJPEG 1
30001_ACEOF
30002
30003  LIBS="-ljpeg $LIBS"
30004
30005else
30006   USE_EXTERNAL_LIBJPEG=false
30007               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30008$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30009
30010fi
30011
30012
30013
30014###############################################################################
30015#
30016# Check for the gif library
30017#
30018
30019USE_EXTERNAL_LIBJPEG=true
30020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30021$as_echo_n "checking for main in -lgif... " >&6; }
30022if test "${ac_cv_lib_gif_main+set}" = set; then :
30023  $as_echo_n "(cached) " >&6
30024else
30025  ac_check_lib_save_LIBS=$LIBS
30026LIBS="-lgif  $LIBS"
30027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30028/* end confdefs.h.  */
30029
30030
30031int
30032main ()
30033{
30034return main ();
30035  ;
30036  return 0;
30037}
30038_ACEOF
30039if ac_fn_cxx_try_link "$LINENO"; then :
30040  ac_cv_lib_gif_main=yes
30041else
30042  ac_cv_lib_gif_main=no
30043fi
30044rm -f core conftest.err conftest.$ac_objext \
30045    conftest$ac_exeext conftest.$ac_ext
30046LIBS=$ac_check_lib_save_LIBS
30047fi
30048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30049$as_echo "$ac_cv_lib_gif_main" >&6; }
30050if test "x$ac_cv_lib_gif_main" = x""yes; then :
30051  cat >>confdefs.h <<_ACEOF
30052#define HAVE_LIBGIF 1
30053_ACEOF
30054
30055  LIBS="-lgif $LIBS"
30056
30057else
30058   USE_EXTERNAL_LIBGIF=false
30059               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30060$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30061
30062fi
30063
30064
30065
30066###############################################################################
30067#
30068# Check for the zlib library
30069#
30070
30071
30072# Check whether --with-zlib was given.
30073if test "${with_zlib+set}" = set; then :
30074  withval=$with_zlib;
30075fi
30076
30077
30078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30079$as_echo_n "checking for compress in -lz... " >&6; }
30080if test "${ac_cv_lib_z_compress+set}" = set; then :
30081  $as_echo_n "(cached) " >&6
30082else
30083  ac_check_lib_save_LIBS=$LIBS
30084LIBS="-lz  $LIBS"
30085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30086/* end confdefs.h.  */
30087
30088/* Override any GCC internal prototype to avoid an error.
30089   Use char because int might match the return type of a GCC
30090   builtin and then its argument prototype would still apply.  */
30091#ifdef __cplusplus
30092extern "C"
30093#endif
30094char compress ();
30095int
30096main ()
30097{
30098return compress ();
30099  ;
30100  return 0;
30101}
30102_ACEOF
30103if ac_fn_cxx_try_link "$LINENO"; then :
30104  ac_cv_lib_z_compress=yes
30105else
30106  ac_cv_lib_z_compress=no
30107fi
30108rm -f core conftest.err conftest.$ac_objext \
30109    conftest$ac_exeext conftest.$ac_ext
30110LIBS=$ac_check_lib_save_LIBS
30111fi
30112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30113$as_echo "$ac_cv_lib_z_compress" >&6; }
30114if test "x$ac_cv_lib_z_compress" = x""yes; then :
30115   ZLIB_FOUND=yes
30116else
30117   ZLIB_FOUND=no
30118fi
30119
30120
30121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30122$as_echo_n "checking for which zlib to use... " >&6; }
30123
30124DEFAULT_ZLIB=bundled
30125if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30126#
30127# On macosx default is system...on others default is
30128#
30129    DEFAULT_ZLIB=system
30130fi
30131
30132if test "x${ZLIB_FOUND}" != "xyes"; then
30133#
30134# If we don't find any system...set default to bundled
30135#
30136    DEFAULT_ZLIB=bundled
30137fi
30138
30139#
30140# If user didn't specify, use DEFAULT_ZLIB
30141#
30142if test "x${with_zlib}" = "x"; then
30143    with_zlib=${DEFAULT_ZLIB}
30144fi
30145
30146if test "x${with_zlib}" = "xbundled"; then
30147    USE_EXTERNAL_LIBZ=false
30148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30149$as_echo "bundled" >&6; }
30150elif test "x${with_zlib}" = "xsystem"; then
30151    if test "x${ZLIB_FOUND}" = "xyes"; then
30152        USE_EXTERNAL_LIBZ=true
30153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30154$as_echo "system" >&6; }
30155    else
30156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30157$as_echo "system not found" >&6; }
30158        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30159    fi
30160else
30161    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30162fi
30163
30164
30165
30166###############################################################################
30167LIBZIP_CAN_USE_MMAP=true
30168
30169
30170
30171###############################################################################
30172#
30173# Check if altzone exists in time.h
30174#
30175
30176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30177/* end confdefs.h.  */
30178#include <time.h>
30179int
30180main ()
30181{
30182return (int)altzone;
30183  ;
30184  return 0;
30185}
30186_ACEOF
30187if ac_fn_cxx_try_link "$LINENO"; then :
30188  has_altzone=yes
30189else
30190  has_altzone=no
30191fi
30192rm -f core conftest.err conftest.$ac_objext \
30193    conftest$ac_exeext conftest.$ac_ext
30194if test "x$has_altzone" = xyes; then
30195
30196$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30197
30198fi
30199
30200###############################################################################
30201#
30202# Check the maths library
30203#
30204
30205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30206$as_echo_n "checking for cos in -lm... " >&6; }
30207if test "${ac_cv_lib_m_cos+set}" = set; then :
30208  $as_echo_n "(cached) " >&6
30209else
30210  ac_check_lib_save_LIBS=$LIBS
30211LIBS="-lm  $LIBS"
30212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30213/* end confdefs.h.  */
30214
30215/* Override any GCC internal prototype to avoid an error.
30216   Use char because int might match the return type of a GCC
30217   builtin and then its argument prototype would still apply.  */
30218#ifdef __cplusplus
30219extern "C"
30220#endif
30221char cos ();
30222int
30223main ()
30224{
30225return cos ();
30226  ;
30227  return 0;
30228}
30229_ACEOF
30230if ac_fn_cxx_try_link "$LINENO"; then :
30231  ac_cv_lib_m_cos=yes
30232else
30233  ac_cv_lib_m_cos=no
30234fi
30235rm -f core conftest.err conftest.$ac_objext \
30236    conftest$ac_exeext conftest.$ac_ext
30237LIBS=$ac_check_lib_save_LIBS
30238fi
30239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30240$as_echo "$ac_cv_lib_m_cos" >&6; }
30241if test "x$ac_cv_lib_m_cos" = x""yes; then :
30242  cat >>confdefs.h <<_ACEOF
30243#define HAVE_LIBM 1
30244_ACEOF
30245
30246  LIBS="-lm $LIBS"
30247
30248else
30249
30250                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30251$as_echo "$as_me: Maths library was not found" >&6;}
30252
30253fi
30254
30255
30256
30257###############################################################################
30258#
30259# Check for libdl.so
30260
30261save_LIBS="$LIBS"
30262LIBS=""
30263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30264$as_echo_n "checking for dlopen in -ldl... " >&6; }
30265if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30266  $as_echo_n "(cached) " >&6
30267else
30268  ac_check_lib_save_LIBS=$LIBS
30269LIBS="-ldl  $LIBS"
30270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30271/* end confdefs.h.  */
30272
30273/* Override any GCC internal prototype to avoid an error.
30274   Use char because int might match the return type of a GCC
30275   builtin and then its argument prototype would still apply.  */
30276#ifdef __cplusplus
30277extern "C"
30278#endif
30279char dlopen ();
30280int
30281main ()
30282{
30283return dlopen ();
30284  ;
30285  return 0;
30286}
30287_ACEOF
30288if ac_fn_cxx_try_link "$LINENO"; then :
30289  ac_cv_lib_dl_dlopen=yes
30290else
30291  ac_cv_lib_dl_dlopen=no
30292fi
30293rm -f core conftest.err conftest.$ac_objext \
30294    conftest$ac_exeext conftest.$ac_ext
30295LIBS=$ac_check_lib_save_LIBS
30296fi
30297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30298$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30299if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30300  cat >>confdefs.h <<_ACEOF
30301#define HAVE_LIBDL 1
30302_ACEOF
30303
30304  LIBS="-ldl $LIBS"
30305
30306fi
30307
30308LIBDL="$LIBS"
30309
30310LIBS="$save_LIBS"
30311
30312
30313
30314###############################################################################
30315#
30316# statically link libstdc++ before C++ ABI is stablized on Linux unless
30317# dynamic build is configured on command line.
30318#
30319
30320# Check whether --with-stdc++lib was given.
30321if test "${with_stdc__lib+set}" = set; then :
30322  withval=$with_stdc__lib;
30323    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30324        && test "x$with_stdc__lib" != xdefault; then
30325      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30326    fi
30327
30328else
30329  with_stdc__lib=default
30330
30331fi
30332
30333
30334if test "x$OPENJDK_TARGET_OS" = xlinux; then
30335    # Test if -lstdc++ works.
30336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30337$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30338    ac_ext=cpp
30339ac_cpp='$CXXCPP $CPPFLAGS'
30340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30343
30344    OLD_CXXFLAGS="$CXXFLAGS"
30345    CXXFLAGS="$CXXFLAGS -lstdc++"
30346    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30347/* end confdefs.h.  */
30348
30349int
30350main ()
30351{
30352return 0;
30353  ;
30354  return 0;
30355}
30356_ACEOF
30357if ac_fn_cxx_try_link "$LINENO"; then :
30358  has_dynamic_libstdcxx=yes
30359else
30360  has_dynamic_libstdcxx=no
30361fi
30362rm -f core conftest.err conftest.$ac_objext \
30363    conftest$ac_exeext conftest.$ac_ext
30364    CXXFLAGS="$OLD_CXXFLAGS"
30365    ac_ext=cpp
30366ac_cpp='$CXXCPP $CPPFLAGS'
30367ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30368ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30369ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30370
30371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30372$as_echo "$has_dynamic_libstdcxx" >&6; }
30373
30374    # Test if stdc++ can be linked statically.
30375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30376$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30377    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30378    ac_ext=cpp
30379ac_cpp='$CXXCPP $CPPFLAGS'
30380ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30381ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30382ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30383
30384    OLD_LIBS="$LIBS"
30385    OLD_CXX="$CXX"
30386    LIBS="$STATIC_STDCXX_FLAGS"
30387    CXX="$CC"
30388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30389/* end confdefs.h.  */
30390
30391int
30392main ()
30393{
30394return 0;
30395  ;
30396  return 0;
30397}
30398_ACEOF
30399if ac_fn_cxx_try_link "$LINENO"; then :
30400  has_static_libstdcxx=yes
30401else
30402  has_static_libstdcxx=no
30403fi
30404rm -f core conftest.err conftest.$ac_objext \
30405    conftest$ac_exeext conftest.$ac_ext
30406    LIBS="$OLD_LIBS"
30407    CXX="$OLD_CXX"
30408    ac_ext=cpp
30409ac_cpp='$CXXCPP $CPPFLAGS'
30410ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30411ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30412ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30413
30414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30415$as_echo "$has_static_libstdcxx" >&6; }
30416
30417    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30418        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30419    fi
30420
30421    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30422        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30423    fi
30424
30425    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30426        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30427    fi
30428
30429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30430$as_echo_n "checking how to link with libstdc++... " >&6; }
30431    # If dynamic was requested, it's available since it would fail above otherwise.
30432    # If dynamic wasn't requested, go with static unless it isn't available.
30433    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30434        LIBCXX="$LIBCXX -lstdc++"
30435        LDCXX="$CXX"
30436        STATIC_CXX_SETTING="STATIC_CXX=false"
30437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30438$as_echo "dynamic" >&6; }
30439    else
30440        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30441        LDCXX="$CC"
30442        STATIC_CXX_SETTING="STATIC_CXX=true"
30443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30444$as_echo "static" >&6; }
30445    fi
30446fi
30447
30448
30449# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30450if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30451    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30452fi
30453
30454# TODO better (platform agnostic) test
30455if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30456    LIBCXX="-lstdc++"
30457fi
30458
30459
30460
30461
30462
30463# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30464
30465# When using cygwin or msys, we need a wrapper binary that renames
30466# /cygdrive/c/ arguments into c:/ arguments and peeks into
30467# @files and rewrites these too! This wrapper binary is
30468# called fixpath.
30469FIXPATH=
30470if test "x$OPENJDK_BUILD_OS" = xwindows; then
30471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30472$as_echo_n "checking if fixpath can be created... " >&6; }
30473    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30474    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30475    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30476      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30477      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30478      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30479      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30480    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30481      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30482      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30483
30484      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30485      # @ was chosen as separator to minimize risk of other tools messing around with it
30486      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30487      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30488
30489      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30490    fi
30491    rm -f $OUTPUT_ROOT/fixpath*
30492    cd $OUTPUT_ROOT
30493    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30494    cd $CURDIR
30495
30496    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30498$as_echo "no" >&6; }
30499        cat $OUTPUT_ROOT/fixpath1.log
30500        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30501    fi
30502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30503$as_echo "yes" >&6; }
30504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30505$as_echo_n "checking if fixpath.exe works... " >&6; }
30506    cd $OUTPUT_ROOT
30507    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30508    cd $CURDIR
30509    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30511$as_echo "no" >&6; }
30512        cat $OUTPUT_ROOT/fixpath2.log
30513        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30514    fi
30515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30516$as_echo "yes" >&6; }
30517    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30518fi
30519
30520
30521
30522
30523###############################################################################
30524#
30525# We need to do some final tweaking, when everything else is done.
30526#
30527###############################################################################
30528
30529
30530HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
30531
30532
30533# The name of the Service Agent jar.
30534SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
30535if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30536    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
30537fi
30538
30539
30540
30541
30542###############################################################################
30543#
30544# Configure parts of the build that only affect the build performance,
30545# not the result.
30546#
30547###############################################################################
30548
30549
30550# How many cores do we have on this build system?
30551
30552# Check whether --with-num-cores was given.
30553if test "${with_num_cores+set}" = set; then :
30554  withval=$with_num_cores;
30555fi
30556
30557if test "x$with_num_cores" = x; then
30558    # The number of cores were not specified, try to probe them.
30559
30560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
30561$as_echo_n "checking for number of cores... " >&6; }
30562    NUM_CORES=1
30563    FOUND_CORES=no
30564
30565    if test -f /proc/cpuinfo; then
30566        # Looks like a Linux (or cygwin) system
30567        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
30568        FOUND_CORES=yes
30569    elif test -x /usr/sbin/psrinfo; then
30570        # Looks like a Solaris system
30571        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
30572        FOUND_CORES=yes
30573    elif test -x /usr/sbin/system_profiler; then
30574        # Looks like a MacOSX system
30575        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
30576        FOUND_CORES=yes
30577    elif test -n "$NUMBER_OF_PROCESSORS"; then
30578        # On windows, look in the env
30579        NUM_CORES=$NUMBER_OF_PROCESSORS
30580        FOUND_CORES=yes
30581    fi
30582
30583    # For c/c++ code we run twice as many concurrent build
30584    # jobs than we have cores, otherwise we will stall on io.
30585    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30586
30587    if test "x$FOUND_CORES" = xyes; then
30588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
30589$as_echo "$NUM_CORES" >&6; }
30590    else
30591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
30592$as_echo "could not detect number of cores, defaulting to 1" >&6; }
30593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
30594$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
30595    fi
30596
30597
30598else
30599    NUM_CORES=$with_num_cores
30600    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30601fi
30602
30603
30604
30605
30606# How much memory do we have on this build system?
30607
30608# Check whether --with-memory-size was given.
30609if test "${with_memory_size+set}" = set; then :
30610  withval=$with_memory_size;
30611fi
30612
30613if test "x$with_memory_size" = x; then
30614    # The memory size was not specified, try to probe it.
30615
30616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
30617$as_echo_n "checking for memory size... " >&6; }
30618    # Default to 1024 MB
30619    MEMORY_SIZE=1024
30620    FOUND_MEM=no
30621
30622    if test -f /proc/meminfo; then
30623        # Looks like a Linux (or cygwin) system
30624        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
30625        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
30626        FOUND_MEM=yes
30627    elif test -x /usr/sbin/prtconf; then
30628        # Looks like a Solaris system
30629        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
30630        FOUND_MEM=yes
30631    elif test -x /usr/sbin/system_profiler; then
30632        # Looks like a MacOSX system
30633        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
30634        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
30635        FOUND_MEM=yes
30636    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
30637        # Windows, but without cygwin
30638        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
30639        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
30640        FOUND_MEM=yes
30641    fi
30642
30643    if test "x$FOUND_MEM" = xyes; then
30644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30645$as_echo "$MEMORY_SIZE MB" >&6; }
30646    else
30647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30648$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30650$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30651    fi
30652
30653else
30654    MEMORY_SIZE=$with_memory_size
30655fi
30656
30657
30658
30659# Setup smart javac (after cores and memory have been setup)
30660
30661
30662# Check whether --with-sjavac-server-java was given.
30663if test "${with_sjavac_server_java+set}" = set; then :
30664  withval=$with_sjavac_server_java;
30665fi
30666
30667
30668if test "x$with_sjavac_server_java" != x; then
30669    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30670    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30671    if test "x$FOUND_VERSION" = x; then
30672        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30673    fi
30674else
30675    SJAVAC_SERVER_JAVA=""
30676    # Hotspot specific options.
30677
30678    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30679    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30680    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30681    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30682    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30683        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30684    fi
30685
30686    # JRockit specific options.
30687
30688    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30689    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30690    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30691    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30692    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30693        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30694    fi
30695
30696    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30697fi
30698
30699
30700
30701# Check whether --with-sjavac-server-cores was given.
30702if test "${with_sjavac_server_cores+set}" = set; then :
30703  withval=$with_sjavac_server_cores;
30704fi
30705
30706if test "x$with_sjavac_server_cores" != x; then
30707    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30708else
30709    if test "$NUM_CORES" -gt 16; then
30710        # We set this arbitrary limit because we want to limit the heap
30711        # size of the javac server.
30712        # In the future we will make the javac compilers in the server
30713        # share more and more state, thus enabling us to use more and
30714        # more concurrent threads in the server.
30715        SJAVAC_SERVER_CORES="16"
30716    else
30717        SJAVAC_SERVER_CORES="$NUM_CORES"
30718    fi
30719
30720    if test "$MEMORY_SIZE" -gt "17000"; then
30721        MAX_HEAP_MEM=10000
30722
30723    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30724    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30725    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30726    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30727    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30728        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30729    fi
30730
30731
30732    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30733    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30734    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30735    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30736    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30737        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30738    fi
30739
30740    elif test "$MEMORY_SIZE" -gt "10000"; then
30741        MAX_HEAP_MEM=6000
30742
30743    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30744    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30745    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30746    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30747    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30748        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30749    fi
30750
30751
30752    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30753    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30754    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30755    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30756    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30757        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30758    fi
30759
30760    elif test "$MEMORY_SIZE" -gt "5000"; then
30761        MAX_HEAP_MEM=3000
30762
30763    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30764    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30765    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30766    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30767    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30768        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30769    fi
30770
30771
30772    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30773    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30774    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30775    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30776    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30777        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30778    fi
30779
30780    elif test "$MEMORY_SIZE" -gt "3800"; then
30781        MAX_HEAP_MEM=2500
30782
30783    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30784    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30785    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30786    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30787    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30788        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30789    fi
30790
30791    elif test "$MEMORY_SIZE" -gt "1900"; then
30792        MAX_HEAP_MEM=1200
30793
30794    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30795    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30796    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30797    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30798    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30799        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30800    fi
30801
30802    elif test "$MEMORY_SIZE" -gt "1000"; then
30803        MAX_HEAP_MEM=900
30804
30805    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30806    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30807    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30808    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30809    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30810        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30811    fi
30812
30813    else
30814        MAX_HEAP_MEM=512
30815
30816    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30817    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30818    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30819    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30820    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30821        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30822    fi
30823
30824    fi
30825
30826
30827    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30828    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30829    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30830    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30831    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30832        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30833    fi
30834
30835
30836    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30837    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30838    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30839    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30840    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30841        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30842    fi
30843
30844
30845    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30846    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30847    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30848    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30849    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30850        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30851    fi
30852
30853
30854    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30855    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30857$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30858        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30860$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30861    fi
30862fi
30863
30864
30865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30866$as_echo_n "checking whether to use sjavac... " >&6; }
30867# Check whether --enable-sjavac was given.
30868if test "${enable_sjavac+set}" = set; then :
30869  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30870else
30871  ENABLE_SJAVAC='no'
30872fi
30873
30874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30875$as_echo "$ENABLE_SJAVAC" >&6; }
30876
30877
30878if test "x$ENABLE_SJAVAC" = xyes; then
30879    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30880else
30881    SJAVAC_SERVER_DIR=
30882fi
30883
30884
30885
30886
30887# Can the C/C++ compiler use precompiled headers?
30888
30889
30890###############################################################################
30891#
30892# Can the C/C++ compiler use precompiled headers?
30893#
30894# Check whether --enable-precompiled-headers was given.
30895if test "${enable_precompiled_headers+set}" = set; then :
30896  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
30897else
30898  ENABLE_PRECOMPH=yes
30899fi
30900
30901
30902USE_PRECOMPILED_HEADER=1
30903if test "x$ENABLE_PRECOMPH" = xno; then
30904    USE_PRECOMPILED_HEADER=0
30905fi
30906
30907if test "x$ENABLE_PRECOMPH" = xyes; then
30908    # Check that the compiler actually supports precomp headers.
30909    if test "x$GCC" = xyes; then
30910         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
30911$as_echo_n "checking that precompiled headers work... " >&6; }
30912         echo "int alfa();" > conftest.h
30913         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
30914         if test ! -f conftest.hpp.gch; then
30915             USE_PRECOMPILED_HEADER=0
30916             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30917$as_echo "no" >&6; }
30918         else
30919             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30920$as_echo "yes" >&6; }
30921         fi
30922         rm -f conftest.h conftest.hpp.gch
30923    fi
30924fi
30925
30926
30927
30928
30929# Setup use of ccache, if available
30930
30931    # Check whether --enable-ccache was given.
30932if test "${enable_ccache+set}" = set; then :
30933  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
30934else
30935  ENABLE_CCACHE=yes
30936fi
30937
30938    if test "x$ENABLE_CCACHE" = xyes; then
30939        # Extract the first word of "ccache", so it can be a program name with args.
30940set dummy ccache; ac_word=$2
30941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30942$as_echo_n "checking for $ac_word... " >&6; }
30943if test "${ac_cv_path_CCACHE+set}" = set; then :
30944  $as_echo_n "(cached) " >&6
30945else
30946  case $CCACHE in
30947  [\\/]* | ?:[\\/]*)
30948  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
30949  ;;
30950  *)
30951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30952for as_dir in $PATH
30953do
30954  IFS=$as_save_IFS
30955  test -z "$as_dir" && as_dir=.
30956    for ac_exec_ext in '' $ac_executable_extensions; do
30957  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30958    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
30959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30960    break 2
30961  fi
30962done
30963  done
30964IFS=$as_save_IFS
30965
30966  ;;
30967esac
30968fi
30969CCACHE=$ac_cv_path_CCACHE
30970if test -n "$CCACHE"; then
30971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
30972$as_echo "$CCACHE" >&6; }
30973else
30974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30975$as_echo "no" >&6; }
30976fi
30977
30978
30979    else
30980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
30981$as_echo_n "checking for ccache... " >&6; }
30982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
30983$as_echo "explicitly disabled" >&6; }
30984        CCACHE=
30985    fi
30986
30987
30988
30989# Check whether --with-ccache-dir was given.
30990if test "${with_ccache_dir+set}" = set; then :
30991  withval=$with_ccache_dir;
30992fi
30993
30994
30995    if test "x$with_ccache_dir" != x; then
30996        # When using a non home ccache directory, assume the use is to share ccache files
30997        # with other users. Thus change the umask.
30998        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
30999    fi
31000    CCACHE_FOUND=""
31001    if test "x$CCACHE" != x; then
31002
31003    if test "x$CCACHE" != x; then
31004        CCACHE_FOUND="true"
31005        # Only use ccache if it is 3.1.4 or later, which supports
31006        # precompiled headers.
31007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31008$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31009        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31010        if test "x$HAS_GOOD_CCACHE" = x; then
31011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31012$as_echo "no, disabling ccache" >&6; }
31013            CCACHE=
31014        else
31015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31016$as_echo "yes" >&6; }
31017            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31018$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31019            PUSHED_FLAGS="$CXXFLAGS"
31020            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31021            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31022/* end confdefs.h.  */
31023
31024int
31025main ()
31026{
31027
31028  ;
31029  return 0;
31030}
31031_ACEOF
31032if ac_fn_cxx_try_compile "$LINENO"; then :
31033  CC_KNOWS_CCACHE_TRICK=yes
31034else
31035  CC_KNOWS_CCACHE_TRICK=no
31036fi
31037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31038            CXXFLAGS="$PUSHED_FLAGS"
31039            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31040                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31041$as_echo "yes" >&6; }
31042            else
31043                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31044$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31045                CCACHE=
31046            fi
31047        fi
31048    fi
31049
31050    if test "x$CCACHE" != x; then
31051        CCACHE_SLOPPINESS=time_macros
31052        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31053        CCACHE_FLAGS=-fpch-preprocess
31054
31055        if test "x$SET_CCACHE_DIR" != x; then
31056            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31057	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31058        fi
31059    fi
31060
31061    fi
31062
31063
31064###############################################################################
31065#
31066# And now the finish...
31067#
31068###############################################################################
31069
31070# Check for some common pitfalls
31071
31072
31073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31074$as_echo_n "checking if build directory is on local disk... " >&6; }
31075
31076	# df -l lists only local disks; if the given directory is not found then
31077	# a non-zero exit code is given
31078  if test "x$DF" = x; then
31079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31080      # msys does not have df; use Windows "net use" instead.
31081      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31082      if test "x$IS_NETWORK_DISK" = x; then
31083        OUTPUT_DIR_IS_LOCAL="yes"
31084      else
31085        OUTPUT_DIR_IS_LOCAL="no"
31086      fi
31087    else
31088      # No df here, say it's local
31089      OUTPUT_DIR_IS_LOCAL="yes"
31090    fi
31091  else
31092    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31093      OUTPUT_DIR_IS_LOCAL="yes"
31094    else
31095      OUTPUT_DIR_IS_LOCAL="no"
31096    fi
31097  fi
31098
31099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31100$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31101
31102# Check if the user has any old-style ALT_ variables set.
31103FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31104
31105# Before generating output files, test if they exist. If they do, this is a reconfigure.
31106# Since we can't properly handle the dependencies for this, warn the user about the situation
31107if test -e $OUTPUT_ROOT/spec.gmk; then
31108  IS_RECONFIGURE=yes
31109else
31110  IS_RECONFIGURE=no
31111fi
31112
31113if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31114  HIDE_PERFORMANCE_HINTS=yes
31115else
31116  HIDE_PERFORMANCE_HINTS=no
31117  # Hide it the next time around...
31118  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31119fi
31120
31121
31122
31123# At the end, call the custom hook. (Dummy macro if no custom sources available)
31124
31125
31126# We're messing a bit with internal autoconf variables to put the config.status
31127# in the output directory instead of the current directory.
31128CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31129# Create the actual output files. Now the main work of configure is done.
31130cat >confcache <<\_ACEOF
31131# This file is a shell script that caches the results of configure
31132# tests run on this system so they can be shared between configure
31133# scripts and configure runs, see configure's option --config-cache.
31134# It is not useful on other systems.  If it contains results you don't
31135# want to keep, you may remove or edit it.
31136#
31137# config.status only pays attention to the cache file if you give it
31138# the --recheck option to rerun configure.
31139#
31140# `ac_cv_env_foo' variables (set or unset) will be overridden when
31141# loading this file, other *unset* `ac_cv_foo' will be assigned the
31142# following values.
31143
31144_ACEOF
31145
31146# The following way of writing the cache mishandles newlines in values,
31147# but we know of no workaround that is simple, portable, and efficient.
31148# So, we kill variables containing newlines.
31149# Ultrix sh set writes to stderr and can't be redirected directly,
31150# and sets the high bit in the cache file unless we assign to the vars.
31151(
31152  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31153    eval ac_val=\$$ac_var
31154    case $ac_val in #(
31155    *${as_nl}*)
31156      case $ac_var in #(
31157      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31158$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31159      esac
31160      case $ac_var in #(
31161      _ | IFS | as_nl) ;; #(
31162      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31163      *) { eval $ac_var=; unset $ac_var;} ;;
31164      esac ;;
31165    esac
31166  done
31167
31168  (set) 2>&1 |
31169    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31170    *${as_nl}ac_space=\ *)
31171      # `set' does not quote correctly, so add quotes: double-quote
31172      # substitution turns \\\\ into \\, and sed turns \\ into \.
31173      sed -n \
31174	"s/'/'\\\\''/g;
31175	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31176      ;; #(
31177    *)
31178      # `set' quotes correctly as required by POSIX, so do not add quotes.
31179      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31180      ;;
31181    esac |
31182    sort
31183) |
31184  sed '
31185     /^ac_cv_env_/b end
31186     t clear
31187     :clear
31188     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31189     t end
31190     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31191     :end' >>confcache
31192if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31193  if test -w "$cache_file"; then
31194    test "x$cache_file" != "x/dev/null" &&
31195      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31196$as_echo "$as_me: updating cache $cache_file" >&6;}
31197    cat confcache >$cache_file
31198  else
31199    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31200$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31201  fi
31202fi
31203rm -f confcache
31204
31205test "x$prefix" = xNONE && prefix=$ac_default_prefix
31206# Let make expand exec_prefix.
31207test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31208
31209DEFS=-DHAVE_CONFIG_H
31210
31211ac_libobjs=
31212ac_ltlibobjs=
31213U=
31214for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31215  # 1. Remove the extension, and $U if already installed.
31216  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31217  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31218  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31219  #    will be set to the directory where LIBOBJS objects are built.
31220  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31221  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31222done
31223LIBOBJS=$ac_libobjs
31224
31225LTLIBOBJS=$ac_ltlibobjs
31226
31227
31228
31229: ${CONFIG_STATUS=./config.status}
31230ac_write_fail=0
31231ac_clean_files_save=$ac_clean_files
31232ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31233{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31234$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31235as_write_fail=0
31236cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31237#! $SHELL
31238# Generated by $as_me.
31239# Run this file to recreate the current configuration.
31240# Compiler output produced by configure, useful for debugging
31241# configure, is in config.log if it exists.
31242
31243debug=false
31244ac_cs_recheck=false
31245ac_cs_silent=false
31246
31247SHELL=\${CONFIG_SHELL-$SHELL}
31248export SHELL
31249_ASEOF
31250cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31251## -------------------- ##
31252## M4sh Initialization. ##
31253## -------------------- ##
31254
31255# Be more Bourne compatible
31256DUALCASE=1; export DUALCASE # for MKS sh
31257if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31258  emulate sh
31259  NULLCMD=:
31260  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31261  # is contrary to our usage.  Disable this feature.
31262  alias -g '${1+"$@"}'='"$@"'
31263  setopt NO_GLOB_SUBST
31264else
31265  case `(set -o) 2>/dev/null` in #(
31266  *posix*) :
31267    set -o posix ;; #(
31268  *) :
31269     ;;
31270esac
31271fi
31272
31273
31274as_nl='
31275'
31276export as_nl
31277# Printing a long string crashes Solaris 7 /usr/bin/printf.
31278as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31279as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31280as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31281# Prefer a ksh shell builtin over an external printf program on Solaris,
31282# but without wasting forks for bash or zsh.
31283if test -z "$BASH_VERSION$ZSH_VERSION" \
31284    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31285  as_echo='print -r --'
31286  as_echo_n='print -rn --'
31287elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31288  as_echo='printf %s\n'
31289  as_echo_n='printf %s'
31290else
31291  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31292    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31293    as_echo_n='/usr/ucb/echo -n'
31294  else
31295    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31296    as_echo_n_body='eval
31297      arg=$1;
31298      case $arg in #(
31299      *"$as_nl"*)
31300	expr "X$arg" : "X\\(.*\\)$as_nl";
31301	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31302      esac;
31303      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31304    '
31305    export as_echo_n_body
31306    as_echo_n='sh -c $as_echo_n_body as_echo'
31307  fi
31308  export as_echo_body
31309  as_echo='sh -c $as_echo_body as_echo'
31310fi
31311
31312# The user is always right.
31313if test "${PATH_SEPARATOR+set}" != set; then
31314  PATH_SEPARATOR=:
31315  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31316    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31317      PATH_SEPARATOR=';'
31318  }
31319fi
31320
31321
31322# IFS
31323# We need space, tab and new line, in precisely that order.  Quoting is
31324# there to prevent editors from complaining about space-tab.
31325# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31326# splitting by setting IFS to empty value.)
31327IFS=" ""	$as_nl"
31328
31329# Find who we are.  Look in the path if we contain no directory separator.
31330case $0 in #((
31331  *[\\/]* ) as_myself=$0 ;;
31332  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31333for as_dir in $PATH
31334do
31335  IFS=$as_save_IFS
31336  test -z "$as_dir" && as_dir=.
31337    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31338  done
31339IFS=$as_save_IFS
31340
31341     ;;
31342esac
31343# We did not find ourselves, most probably we were run as `sh COMMAND'
31344# in which case we are not to be found in the path.
31345if test "x$as_myself" = x; then
31346  as_myself=$0
31347fi
31348if test ! -f "$as_myself"; then
31349  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31350  exit 1
31351fi
31352
31353# Unset variables that we do not need and which cause bugs (e.g. in
31354# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31355# suppresses any "Segmentation fault" message there.  '((' could
31356# trigger a bug in pdksh 5.2.14.
31357for as_var in BASH_ENV ENV MAIL MAILPATH
31358do eval test x\${$as_var+set} = xset \
31359  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31360done
31361PS1='$ '
31362PS2='> '
31363PS4='+ '
31364
31365# NLS nuisances.
31366LC_ALL=C
31367export LC_ALL
31368LANGUAGE=C
31369export LANGUAGE
31370
31371# CDPATH.
31372(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31373
31374
31375# as_fn_error STATUS ERROR [LINENO LOG_FD]
31376# ----------------------------------------
31377# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31378# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31379# script with STATUS, using 1 if that was 0.
31380as_fn_error ()
31381{
31382  as_status=$1; test $as_status -eq 0 && as_status=1
31383  if test "$4"; then
31384    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31385    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31386  fi
31387  $as_echo "$as_me: error: $2" >&2
31388  as_fn_exit $as_status
31389} # as_fn_error
31390
31391
31392# as_fn_set_status STATUS
31393# -----------------------
31394# Set $? to STATUS, without forking.
31395as_fn_set_status ()
31396{
31397  return $1
31398} # as_fn_set_status
31399
31400# as_fn_exit STATUS
31401# -----------------
31402# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31403as_fn_exit ()
31404{
31405  set +e
31406  as_fn_set_status $1
31407  exit $1
31408} # as_fn_exit
31409
31410# as_fn_unset VAR
31411# ---------------
31412# Portably unset VAR.
31413as_fn_unset ()
31414{
31415  { eval $1=; unset $1;}
31416}
31417as_unset=as_fn_unset
31418# as_fn_append VAR VALUE
31419# ----------------------
31420# Append the text in VALUE to the end of the definition contained in VAR. Take
31421# advantage of any shell optimizations that allow amortized linear growth over
31422# repeated appends, instead of the typical quadratic growth present in naive
31423# implementations.
31424if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31425  eval 'as_fn_append ()
31426  {
31427    eval $1+=\$2
31428  }'
31429else
31430  as_fn_append ()
31431  {
31432    eval $1=\$$1\$2
31433  }
31434fi # as_fn_append
31435
31436# as_fn_arith ARG...
31437# ------------------
31438# Perform arithmetic evaluation on the ARGs, and store the result in the
31439# global $as_val. Take advantage of shells that can avoid forks. The arguments
31440# must be portable across $(()) and expr.
31441if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31442  eval 'as_fn_arith ()
31443  {
31444    as_val=$(( $* ))
31445  }'
31446else
31447  as_fn_arith ()
31448  {
31449    as_val=`expr "$@" || test $? -eq 1`
31450  }
31451fi # as_fn_arith
31452
31453
31454if expr a : '\(a\)' >/dev/null 2>&1 &&
31455   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31456  as_expr=expr
31457else
31458  as_expr=false
31459fi
31460
31461if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31462  as_basename=basename
31463else
31464  as_basename=false
31465fi
31466
31467if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31468  as_dirname=dirname
31469else
31470  as_dirname=false
31471fi
31472
31473as_me=`$as_basename -- "$0" ||
31474$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31475	 X"$0" : 'X\(//\)$' \| \
31476	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31477$as_echo X/"$0" |
31478    sed '/^.*\/\([^/][^/]*\)\/*$/{
31479	    s//\1/
31480	    q
31481	  }
31482	  /^X\/\(\/\/\)$/{
31483	    s//\1/
31484	    q
31485	  }
31486	  /^X\/\(\/\).*/{
31487	    s//\1/
31488	    q
31489	  }
31490	  s/.*/./; q'`
31491
31492# Avoid depending upon Character Ranges.
31493as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31494as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31495as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31496as_cr_digits='0123456789'
31497as_cr_alnum=$as_cr_Letters$as_cr_digits
31498
31499ECHO_C= ECHO_N= ECHO_T=
31500case `echo -n x` in #(((((
31501-n*)
31502  case `echo 'xy\c'` in
31503  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31504  xy)  ECHO_C='\c';;
31505  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31506       ECHO_T='	';;
31507  esac;;
31508*)
31509  ECHO_N='-n';;
31510esac
31511
31512rm -f conf$$ conf$$.exe conf$$.file
31513if test -d conf$$.dir; then
31514  rm -f conf$$.dir/conf$$.file
31515else
31516  rm -f conf$$.dir
31517  mkdir conf$$.dir 2>/dev/null
31518fi
31519if (echo >conf$$.file) 2>/dev/null; then
31520  if ln -s conf$$.file conf$$ 2>/dev/null; then
31521    as_ln_s='ln -s'
31522    # ... but there are two gotchas:
31523    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31524    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31525    # In both cases, we have to default to `cp -p'.
31526    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31527      as_ln_s='cp -p'
31528  elif ln conf$$.file conf$$ 2>/dev/null; then
31529    as_ln_s=ln
31530  else
31531    as_ln_s='cp -p'
31532  fi
31533else
31534  as_ln_s='cp -p'
31535fi
31536rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31537rmdir conf$$.dir 2>/dev/null
31538
31539
31540# as_fn_mkdir_p
31541# -------------
31542# Create "$as_dir" as a directory, including parents if necessary.
31543as_fn_mkdir_p ()
31544{
31545
31546  case $as_dir in #(
31547  -*) as_dir=./$as_dir;;
31548  esac
31549  test -d "$as_dir" || eval $as_mkdir_p || {
31550    as_dirs=
31551    while :; do
31552      case $as_dir in #(
31553      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31554      *) as_qdir=$as_dir;;
31555      esac
31556      as_dirs="'$as_qdir' $as_dirs"
31557      as_dir=`$as_dirname -- "$as_dir" ||
31558$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31559	 X"$as_dir" : 'X\(//\)[^/]' \| \
31560	 X"$as_dir" : 'X\(//\)$' \| \
31561	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31562$as_echo X"$as_dir" |
31563    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31564	    s//\1/
31565	    q
31566	  }
31567	  /^X\(\/\/\)[^/].*/{
31568	    s//\1/
31569	    q
31570	  }
31571	  /^X\(\/\/\)$/{
31572	    s//\1/
31573	    q
31574	  }
31575	  /^X\(\/\).*/{
31576	    s//\1/
31577	    q
31578	  }
31579	  s/.*/./; q'`
31580      test -d "$as_dir" && break
31581    done
31582    test -z "$as_dirs" || eval "mkdir $as_dirs"
31583  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31584
31585
31586} # as_fn_mkdir_p
31587if mkdir -p . 2>/dev/null; then
31588  as_mkdir_p='mkdir -p "$as_dir"'
31589else
31590  test -d ./-p && rmdir ./-p
31591  as_mkdir_p=false
31592fi
31593
31594if test -x / >/dev/null 2>&1; then
31595  as_test_x='test -x'
31596else
31597  if ls -dL / >/dev/null 2>&1; then
31598    as_ls_L_option=L
31599  else
31600    as_ls_L_option=
31601  fi
31602  as_test_x='
31603    eval sh -c '\''
31604      if test -d "$1"; then
31605	test -d "$1/.";
31606      else
31607	case $1 in #(
31608	-*)set "./$1";;
31609	esac;
31610	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31611	???[sx]*):;;*)false;;esac;fi
31612    '\'' sh
31613  '
31614fi
31615as_executable_p=$as_test_x
31616
31617# Sed expression to map a string onto a valid CPP name.
31618as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31619
31620# Sed expression to map a string onto a valid variable name.
31621as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31622
31623
31624exec 6>&1
31625## ----------------------------------- ##
31626## Main body of $CONFIG_STATUS script. ##
31627## ----------------------------------- ##
31628_ASEOF
31629test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31630
31631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31632# Save the log message, to keep $0 and so on meaningful, and to
31633# report actual input values of CONFIG_FILES etc. instead of their
31634# values after options handling.
31635ac_log="
31636This file was extended by OpenJDK $as_me jdk8, which was
31637generated by GNU Autoconf 2.67.  Invocation command line was
31638
31639  CONFIG_FILES    = $CONFIG_FILES
31640  CONFIG_HEADERS  = $CONFIG_HEADERS
31641  CONFIG_LINKS    = $CONFIG_LINKS
31642  CONFIG_COMMANDS = $CONFIG_COMMANDS
31643  $ $0 $@
31644
31645on `(hostname || uname -n) 2>/dev/null | sed 1q`
31646"
31647
31648_ACEOF
31649
31650case $ac_config_files in *"
31651"*) set x $ac_config_files; shift; ac_config_files=$*;;
31652esac
31653
31654case $ac_config_headers in *"
31655"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31656esac
31657
31658
31659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31660# Files that config.status was made for.
31661config_files="$ac_config_files"
31662config_headers="$ac_config_headers"
31663
31664_ACEOF
31665
31666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31667ac_cs_usage="\
31668\`$as_me' instantiates files and other configuration actions
31669from templates according to the current configuration.  Unless the files
31670and actions are specified as TAGs, all are instantiated by default.
31671
31672Usage: $0 [OPTION]... [TAG]...
31673
31674  -h, --help       print this help, then exit
31675  -V, --version    print version number and configuration settings, then exit
31676      --config     print configuration, then exit
31677  -q, --quiet, --silent
31678                   do not print progress messages
31679  -d, --debug      don't remove temporary files
31680      --recheck    update $as_me by reconfiguring in the same conditions
31681      --file=FILE[:TEMPLATE]
31682                   instantiate the configuration file FILE
31683      --header=FILE[:TEMPLATE]
31684                   instantiate the configuration header FILE
31685
31686Configuration files:
31687$config_files
31688
31689Configuration headers:
31690$config_headers
31691
31692Report bugs to <build-dev@openjdk.java.net>.
31693OpenJDK home page: <http://openjdk.java.net>."
31694
31695_ACEOF
31696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31697ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31698ac_cs_version="\\
31699OpenJDK config.status jdk8
31700configured by $0, generated by GNU Autoconf 2.67,
31701  with options \\"\$ac_cs_config\\"
31702
31703Copyright (C) 2010 Free Software Foundation, Inc.
31704This config.status script is free software; the Free Software Foundation
31705gives unlimited permission to copy, distribute and modify it."
31706
31707ac_pwd='$ac_pwd'
31708srcdir='$srcdir'
31709AWK='$AWK'
31710test -n "\$AWK" || AWK=awk
31711_ACEOF
31712
31713cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31714# The default lists apply if the user does not specify any file.
31715ac_need_defaults=:
31716while test $# != 0
31717do
31718  case $1 in
31719  --*=?*)
31720    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31721    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31722    ac_shift=:
31723    ;;
31724  --*=)
31725    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31726    ac_optarg=
31727    ac_shift=:
31728    ;;
31729  *)
31730    ac_option=$1
31731    ac_optarg=$2
31732    ac_shift=shift
31733    ;;
31734  esac
31735
31736  case $ac_option in
31737  # Handling of the options.
31738  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31739    ac_cs_recheck=: ;;
31740  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31741    $as_echo "$ac_cs_version"; exit ;;
31742  --config | --confi | --conf | --con | --co | --c )
31743    $as_echo "$ac_cs_config"; exit ;;
31744  --debug | --debu | --deb | --de | --d | -d )
31745    debug=: ;;
31746  --file | --fil | --fi | --f )
31747    $ac_shift
31748    case $ac_optarg in
31749    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31750    '') as_fn_error $? "missing file argument" ;;
31751    esac
31752    as_fn_append CONFIG_FILES " '$ac_optarg'"
31753    ac_need_defaults=false;;
31754  --header | --heade | --head | --hea )
31755    $ac_shift
31756    case $ac_optarg in
31757    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31758    esac
31759    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31760    ac_need_defaults=false;;
31761  --he | --h)
31762    # Conflict between --help and --header
31763    as_fn_error $? "ambiguous option: \`$1'
31764Try \`$0 --help' for more information.";;
31765  --help | --hel | -h )
31766    $as_echo "$ac_cs_usage"; exit ;;
31767  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31768  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31769    ac_cs_silent=: ;;
31770
31771  # This is an error.
31772  -*) as_fn_error $? "unrecognized option: \`$1'
31773Try \`$0 --help' for more information." ;;
31774
31775  *) as_fn_append ac_config_targets " $1"
31776     ac_need_defaults=false ;;
31777
31778  esac
31779  shift
31780done
31781
31782ac_configure_extra_args=
31783
31784if $ac_cs_silent; then
31785  exec 6>/dev/null
31786  ac_configure_extra_args="$ac_configure_extra_args --silent"
31787fi
31788
31789_ACEOF
31790cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31791if \$ac_cs_recheck; then
31792  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31793  shift
31794  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31795  CONFIG_SHELL='$SHELL'
31796  export CONFIG_SHELL
31797  exec "\$@"
31798fi
31799
31800_ACEOF
31801cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31802exec 5>>config.log
31803{
31804  echo
31805  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31806## Running $as_me. ##
31807_ASBOX
31808  $as_echo "$ac_log"
31809} >&5
31810
31811_ACEOF
31812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31813_ACEOF
31814
31815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31816
31817# Handling of arguments.
31818for ac_config_target in $ac_config_targets
31819do
31820  case $ac_config_target in
31821    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31822    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31823    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31824    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31825    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31826    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31827    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31828
31829  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31830  esac
31831done
31832
31833
31834# If the user did not use the arguments to specify the items to instantiate,
31835# then the envvar interface is used.  Set only those that are not.
31836# We use the long form for the default assignment because of an extremely
31837# bizarre bug on SunOS 4.1.3.
31838if $ac_need_defaults; then
31839  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31840  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31841fi
31842
31843# Have a temporary directory for convenience.  Make it in the build tree
31844# simply because there is no reason against having it here, and in addition,
31845# creating and moving files from /tmp can sometimes cause problems.
31846# Hook for its removal unless debugging.
31847# Note that there is a small window in which the directory will not be cleaned:
31848# after its creation but before its name has been assigned to `$tmp'.
31849$debug ||
31850{
31851  tmp=
31852  trap 'exit_status=$?
31853  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31854' 0
31855  trap 'as_fn_exit 1' 1 2 13 15
31856}
31857# Create a (secure) tmp directory for tmp files.
31858
31859{
31860  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31861  test -n "$tmp" && test -d "$tmp"
31862}  ||
31863{
31864  tmp=./conf$$-$RANDOM
31865  (umask 077 && mkdir "$tmp")
31866} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31867
31868# Set up the scripts for CONFIG_FILES section.
31869# No need to generate them if there are no CONFIG_FILES.
31870# This happens for instance with `./config.status config.h'.
31871if test -n "$CONFIG_FILES"; then
31872
31873
31874ac_cr=`echo X | tr X '\015'`
31875# On cygwin, bash can eat \r inside `` if the user requested igncr.
31876# But we know of no other shell where ac_cr would be empty at this
31877# point, so we can use a bashism as a fallback.
31878if test "x$ac_cr" = x; then
31879  eval ac_cr=\$\'\\r\'
31880fi
31881ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31882if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31883  ac_cs_awk_cr='\\r'
31884else
31885  ac_cs_awk_cr=$ac_cr
31886fi
31887
31888echo 'BEGIN {' >"$tmp/subs1.awk" &&
31889_ACEOF
31890
31891
31892{
31893  echo "cat >conf$$subs.awk <<_ACEOF" &&
31894  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31895  echo "_ACEOF"
31896} >conf$$subs.sh ||
31897  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31898ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31899ac_delim='%!_!# '
31900for ac_last_try in false false false false false :; do
31901  . ./conf$$subs.sh ||
31902    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31903
31904  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31905  if test $ac_delim_n = $ac_delim_num; then
31906    break
31907  elif $ac_last_try; then
31908    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31909  else
31910    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31911  fi
31912done
31913rm -f conf$$subs.sh
31914
31915cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31916cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31917_ACEOF
31918sed -n '
31919h
31920s/^/S["/; s/!.*/"]=/
31921p
31922g
31923s/^[^!]*!//
31924:repl
31925t repl
31926s/'"$ac_delim"'$//
31927t delim
31928:nl
31929h
31930s/\(.\{148\}\)..*/\1/
31931t more1
31932s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31933p
31934n
31935b repl
31936:more1
31937s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31938p
31939g
31940s/.\{148\}//
31941t nl
31942:delim
31943h
31944s/\(.\{148\}\)..*/\1/
31945t more2
31946s/["\\]/\\&/g; s/^/"/; s/$/"/
31947p
31948b
31949:more2
31950s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31951p
31952g
31953s/.\{148\}//
31954t delim
31955' <conf$$subs.awk | sed '
31956/^[^""]/{
31957  N
31958  s/\n//
31959}
31960' >>$CONFIG_STATUS || ac_write_fail=1
31961rm -f conf$$subs.awk
31962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31963_ACAWK
31964cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31965  for (key in S) S_is_set[key] = 1
31966  FS = ""
31967
31968}
31969{
31970  line = $ 0
31971  nfields = split(line, field, "@")
31972  substed = 0
31973  len = length(field[1])
31974  for (i = 2; i < nfields; i++) {
31975    key = field[i]
31976    keylen = length(key)
31977    if (S_is_set[key]) {
31978      value = S[key]
31979      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31980      len += length(value) + length(field[++i])
31981      substed = 1
31982    } else
31983      len += 1 + keylen
31984  }
31985
31986  print line
31987}
31988
31989_ACAWK
31990_ACEOF
31991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31992if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31993  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31994else
31995  cat
31996fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31997  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31998_ACEOF
31999
32000# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32001# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32002# trailing colons and then remove the whole line if VPATH becomes empty
32003# (actually we leave an empty line to preserve line numbers).
32004if test "x$srcdir" = x.; then
32005  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32006h
32007s///
32008s/^/:/
32009s/[	 ]*$/:/
32010s/:\$(srcdir):/:/g
32011s/:\${srcdir}:/:/g
32012s/:@srcdir@:/:/g
32013s/^:*//
32014s/:*$//
32015x
32016s/\(=[	 ]*\).*/\1/
32017G
32018s/\n//
32019s/^[^=]*=[	 ]*$//
32020}'
32021fi
32022
32023cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32024fi # test -n "$CONFIG_FILES"
32025
32026# Set up the scripts for CONFIG_HEADERS section.
32027# No need to generate them if there are no CONFIG_HEADERS.
32028# This happens for instance with `./config.status Makefile'.
32029if test -n "$CONFIG_HEADERS"; then
32030cat >"$tmp/defines.awk" <<\_ACAWK ||
32031BEGIN {
32032_ACEOF
32033
32034# Transform confdefs.h into an awk script `defines.awk', embedded as
32035# here-document in config.status, that substitutes the proper values into
32036# config.h.in to produce config.h.
32037
32038# Create a delimiter string that does not exist in confdefs.h, to ease
32039# handling of long lines.
32040ac_delim='%!_!# '
32041for ac_last_try in false false :; do
32042  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32043  if test -z "$ac_t"; then
32044    break
32045  elif $ac_last_try; then
32046    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32047  else
32048    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32049  fi
32050done
32051
32052# For the awk script, D is an array of macro values keyed by name,
32053# likewise P contains macro parameters if any.  Preserve backslash
32054# newline sequences.
32055
32056ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32057sed -n '
32058s/.\{148\}/&'"$ac_delim"'/g
32059t rset
32060:rset
32061s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32062t def
32063d
32064:def
32065s/\\$//
32066t bsnl
32067s/["\\]/\\&/g
32068s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32069D["\1"]=" \3"/p
32070s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32071d
32072:bsnl
32073s/["\\]/\\&/g
32074s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32075D["\1"]=" \3\\\\\\n"\\/p
32076t cont
32077s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32078t cont
32079d
32080:cont
32081n
32082s/.\{148\}/&'"$ac_delim"'/g
32083t clear
32084:clear
32085s/\\$//
32086t bsnlc
32087s/["\\]/\\&/g; s/^/"/; s/$/"/p
32088d
32089:bsnlc
32090s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32091b cont
32092' <confdefs.h | sed '
32093s/'"$ac_delim"'/"\\\
32094"/g' >>$CONFIG_STATUS || ac_write_fail=1
32095
32096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32097  for (key in D) D_is_set[key] = 1
32098  FS = ""
32099}
32100/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32101  line = \$ 0
32102  split(line, arg, " ")
32103  if (arg[1] == "#") {
32104    defundef = arg[2]
32105    mac1 = arg[3]
32106  } else {
32107    defundef = substr(arg[1], 2)
32108    mac1 = arg[2]
32109  }
32110  split(mac1, mac2, "(") #)
32111  macro = mac2[1]
32112  prefix = substr(line, 1, index(line, defundef) - 1)
32113  if (D_is_set[macro]) {
32114    # Preserve the white space surrounding the "#".
32115    print prefix "define", macro P[macro] D[macro]
32116    next
32117  } else {
32118    # Replace #undef with comments.  This is necessary, for example,
32119    # in the case of _POSIX_SOURCE, which is predefined and required
32120    # on some systems where configure will not decide to define it.
32121    if (defundef == "undef") {
32122      print "/*", prefix defundef, macro, "*/"
32123      next
32124    }
32125  }
32126}
32127{ print }
32128_ACAWK
32129_ACEOF
32130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32131  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32132fi # test -n "$CONFIG_HEADERS"
32133
32134
32135eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32136shift
32137for ac_tag
32138do
32139  case $ac_tag in
32140  :[FHLC]) ac_mode=$ac_tag; continue;;
32141  esac
32142  case $ac_mode$ac_tag in
32143  :[FHL]*:*);;
32144  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32145  :[FH]-) ac_tag=-:-;;
32146  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32147  esac
32148  ac_save_IFS=$IFS
32149  IFS=:
32150  set x $ac_tag
32151  IFS=$ac_save_IFS
32152  shift
32153  ac_file=$1
32154  shift
32155
32156  case $ac_mode in
32157  :L) ac_source=$1;;
32158  :[FH])
32159    ac_file_inputs=
32160    for ac_f
32161    do
32162      case $ac_f in
32163      -) ac_f="$tmp/stdin";;
32164      *) # Look for the file first in the build tree, then in the source tree
32165	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32166	 # because $ac_f cannot contain `:'.
32167	 test -f "$ac_f" ||
32168	   case $ac_f in
32169	   [\\/$]*) false;;
32170	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32171	   esac ||
32172	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32173      esac
32174      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32175      as_fn_append ac_file_inputs " '$ac_f'"
32176    done
32177
32178    # Let's still pretend it is `configure' which instantiates (i.e., don't
32179    # use $as_me), people would be surprised to read:
32180    #    /* config.h.  Generated by config.status.  */
32181    configure_input='Generated from '`
32182	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32183	`' by configure.'
32184    if test x"$ac_file" != x-; then
32185      configure_input="$ac_file.  $configure_input"
32186      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32187$as_echo "$as_me: creating $ac_file" >&6;}
32188    fi
32189    # Neutralize special characters interpreted by sed in replacement strings.
32190    case $configure_input in #(
32191    *\&* | *\|* | *\\* )
32192       ac_sed_conf_input=`$as_echo "$configure_input" |
32193       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32194    *) ac_sed_conf_input=$configure_input;;
32195    esac
32196
32197    case $ac_tag in
32198    *:-:* | *:-) cat >"$tmp/stdin" \
32199      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32200    esac
32201    ;;
32202  esac
32203
32204  ac_dir=`$as_dirname -- "$ac_file" ||
32205$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32206	 X"$ac_file" : 'X\(//\)[^/]' \| \
32207	 X"$ac_file" : 'X\(//\)$' \| \
32208	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32209$as_echo X"$ac_file" |
32210    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32211	    s//\1/
32212	    q
32213	  }
32214	  /^X\(\/\/\)[^/].*/{
32215	    s//\1/
32216	    q
32217	  }
32218	  /^X\(\/\/\)$/{
32219	    s//\1/
32220	    q
32221	  }
32222	  /^X\(\/\).*/{
32223	    s//\1/
32224	    q
32225	  }
32226	  s/.*/./; q'`
32227  as_dir="$ac_dir"; as_fn_mkdir_p
32228  ac_builddir=.
32229
32230case "$ac_dir" in
32231.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32232*)
32233  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32234  # A ".." for each directory in $ac_dir_suffix.
32235  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32236  case $ac_top_builddir_sub in
32237  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32238  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32239  esac ;;
32240esac
32241ac_abs_top_builddir=$ac_pwd
32242ac_abs_builddir=$ac_pwd$ac_dir_suffix
32243# for backward compatibility:
32244ac_top_builddir=$ac_top_build_prefix
32245
32246case $srcdir in
32247  .)  # We are building in place.
32248    ac_srcdir=.
32249    ac_top_srcdir=$ac_top_builddir_sub
32250    ac_abs_top_srcdir=$ac_pwd ;;
32251  [\\/]* | ?:[\\/]* )  # Absolute name.
32252    ac_srcdir=$srcdir$ac_dir_suffix;
32253    ac_top_srcdir=$srcdir
32254    ac_abs_top_srcdir=$srcdir ;;
32255  *) # Relative name.
32256    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32257    ac_top_srcdir=$ac_top_build_prefix$srcdir
32258    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32259esac
32260ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32261
32262
32263  case $ac_mode in
32264  :F)
32265  #
32266  # CONFIG_FILE
32267  #
32268
32269_ACEOF
32270
32271cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32272# If the template does not know about datarootdir, expand it.
32273# FIXME: This hack should be removed a few years after 2.60.
32274ac_datarootdir_hack=; ac_datarootdir_seen=
32275ac_sed_dataroot='
32276/datarootdir/ {
32277  p
32278  q
32279}
32280/@datadir@/p
32281/@docdir@/p
32282/@infodir@/p
32283/@localedir@/p
32284/@mandir@/p'
32285case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32286*datarootdir*) ac_datarootdir_seen=yes;;
32287*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32288  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32289$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32290_ACEOF
32291cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32292  ac_datarootdir_hack='
32293  s&@datadir@&$datadir&g
32294  s&@docdir@&$docdir&g
32295  s&@infodir@&$infodir&g
32296  s&@localedir@&$localedir&g
32297  s&@mandir@&$mandir&g
32298  s&\\\${datarootdir}&$datarootdir&g' ;;
32299esac
32300_ACEOF
32301
32302# Neutralize VPATH when `$srcdir' = `.'.
32303# Shell code in configure.ac might set extrasub.
32304# FIXME: do we really want to maintain this feature?
32305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32306ac_sed_extra="$ac_vpsub
32307$extrasub
32308_ACEOF
32309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32310:t
32311/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32312s|@configure_input@|$ac_sed_conf_input|;t t
32313s&@top_builddir@&$ac_top_builddir_sub&;t t
32314s&@top_build_prefix@&$ac_top_build_prefix&;t t
32315s&@srcdir@&$ac_srcdir&;t t
32316s&@abs_srcdir@&$ac_abs_srcdir&;t t
32317s&@top_srcdir@&$ac_top_srcdir&;t t
32318s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32319s&@builddir@&$ac_builddir&;t t
32320s&@abs_builddir@&$ac_abs_builddir&;t t
32321s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32322$ac_datarootdir_hack
32323"
32324eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32325  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32326
32327test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32328  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32329  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32330  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32331which seems to be undefined.  Please make sure it is defined" >&5
32332$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32333which seems to be undefined.  Please make sure it is defined" >&2;}
32334
32335  rm -f "$tmp/stdin"
32336  case $ac_file in
32337  -) cat "$tmp/out" && rm -f "$tmp/out";;
32338  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32339  esac \
32340  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32341 ;;
32342  :H)
32343  #
32344  # CONFIG_HEADER
32345  #
32346  if test x"$ac_file" != x-; then
32347    {
32348      $as_echo "/* $configure_input  */" \
32349      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32350    } >"$tmp/config.h" \
32351      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32352    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32353      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32354$as_echo "$as_me: $ac_file is unchanged" >&6;}
32355    else
32356      rm -f "$ac_file"
32357      mv "$tmp/config.h" "$ac_file" \
32358	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32359    fi
32360  else
32361    $as_echo "/* $configure_input  */" \
32362      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32363      || as_fn_error $? "could not create -" "$LINENO" 5
32364  fi
32365 ;;
32366
32367
32368  esac
32369
32370done # for ac_tag
32371
32372
32373as_fn_exit 0
32374_ACEOF
32375ac_clean_files=$ac_clean_files_save
32376
32377test $ac_write_fail = 0 ||
32378  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32379
32380
32381# configure is writing to config.log, and then calls config.status.
32382# config.status does its own redirection, appending to config.log.
32383# Unfortunately, on DOS this fails, as config.log is still kept open
32384# by configure, so config.status won't be able to write to it; its
32385# output is simply discarded.  So we exec the FD to /dev/null,
32386# effectively closing config.log, so it can be properly (re)opened and
32387# appended to by config.status.  When coming back to configure, we
32388# need to make the FD available again.
32389if test "$no_create" != yes; then
32390  ac_cs_success=:
32391  ac_config_status_args=
32392  test "$silent" = yes &&
32393    ac_config_status_args="$ac_config_status_args --quiet"
32394  exec 5>/dev/null
32395  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32396  exec 5>>config.log
32397  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32398  # would make configure fail if this is the last instruction.
32399  $ac_cs_success || as_fn_exit 1
32400fi
32401if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32402  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32403$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32404fi
32405
32406
32407# Make the compare script executable
32408$CHMOD +x $OUTPUT_ROOT/compare.sh
32409
32410# Finally output some useful information to the user
32411
32412# Finally output some useful information to the user
32413
32414if test "x$CCACHE_FOUND" != x; then
32415	if  test "x$HAS_GOOD_CCACHE" = x; then
32416		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32417		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32418	else
32419		CCACHE_STATUS="installed and in use"
32420	fi
32421else
32422	if test "x$GCC" = xyes; then
32423		CCACHE_STATUS="not installed (consider installing)"
32424		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32425	else
32426		CCACHE_STATUS="not available for your system"
32427	fi
32428fi
32429
32430printf "\n"
32431printf "====================================================\n"
32432printf "A new configuration has been successfully created in\n"
32433printf "$OUTPUT_ROOT\n"
32434if test "x$CONFIGURE_COMMAND_LINE" != x; then
32435	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32436else
32437	printf "using default settings.\n"
32438fi
32439
32440printf "\n"
32441printf "Configuration summary:\n"
32442printf "* Debug level:    $DEBUG_LEVEL\n"
32443printf "* JDK variant:    $JDK_VARIANT\n"
32444printf "* JVM variants:   $with_jvm_variants\n"
32445printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32446
32447printf "\n"
32448printf "Tools summary:\n"
32449if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32450  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32451fi
32452printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32453printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32454printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32455
32456printf "\n"
32457printf "Build performance summary:\n"
32458printf "* Cores to use:   $NUM_CORES\n"
32459printf "* Memory limit:   $MEMORY_SIZE MB\n"
32460printf "* ccache status:  $CCACHE_STATUS\n"
32461printf "\n"
32462
32463if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32464	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32465	printf "$CCACHE_HELP_MSG\n"
32466
32467    # Print a helpful message on how to acquire the necessary build dependency.
32468    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32469    MISSING_DEPENDENCY=ccache
32470    PKGHANDLER_COMMAND=
32471
32472    case $PKGHANDLER in
32473	apt-get)
32474                apt_help     $MISSING_DEPENDENCY ;;
32475    yum)
32476                yum_help     $MISSING_DEPENDENCY ;;
32477	port)
32478                port_help    $MISSING_DEPENDENCY ;;
32479	pkgutil)
32480                pkgutil_help $MISSING_DEPENDENCY ;;
32481	pkgadd)
32482                pkgadd_help  $MISSING_DEPENDENCY ;;
32483    * )
32484      break ;;
32485    esac
32486
32487    if test "x$PKGHANDLER_COMMAND" != x; then
32488        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32489    fi
32490
32491	printf "$HELP_MSG\n"
32492	printf "\n"
32493fi
32494
32495if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32496	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32497	printf "will result in longer build times.\n"
32498	printf "\n"
32499fi
32500
32501if test "x$FOUND_ALT_VARIABLES" != "x"; then
32502	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32503	printf "These are not respected, and will be ignored. It is recommended\n"
32504	printf "that you clean your environment. The following variables are set:\n"
32505	printf "$FOUND_ALT_VARIABLES\n"
32506	printf "\n"
32507fi
32508
32509if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32510	printf "WARNING: Your build output directory is not on a local disk.\n"
32511	printf "This will severely degrade build performance!\n"
32512	printf "It is recommended that you create an output directory on a local disk,\n"
32513	printf "and run the configure script again from that directory.\n"
32514	printf "\n"
32515fi
32516
32517if test "x$IS_RECONFIGURE" = "xyes"; then
32518	printf "WARNING: The result of this configuration has overridden an older\n"
32519	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
32520	printf "proper build. Failure to do so might result in strange build problems.\n"
32521	printf "\n"
32522fi
32523
32524