generated-configure.sh revision 558:2d9bb72b4e34
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741HOTSPOT_TOPDIR
742JAXWS_TOPDIR
743JAXP_TOPDIR
744CORBA_TOPDIR
745LANGTOOLS_TOPDIR
746BOOT_JDK_JVMARGS
747JAVAC_FLAGS
748BOOT_JDK_SOURCETARGET
749BOOT_JDK
750BOOT_TOOLSJAR
751BOOT_RTJAR
752JAVA_CHECK
753JAVAC_CHECK
754COOKED_BUILD_NUMBER
755FULL_VERSION
756RELEASE
757JDK_VERSION
758RUNTIME_NAME
759COPYRIGHT_YEAR
760MACOSX_BUNDLE_ID_BASE
761MACOSX_BUNDLE_NAME_BASE
762COMPANY_NAME
763JDK_RC_PLATFORM_NAME
764PRODUCT_SUFFIX
765PRODUCT_NAME
766LAUNCHER_NAME
767MILESTONE
768JDK_BUILD_NUMBER
769JDK_UPDATE_VERSION
770JDK_MICRO_VERSION
771JDK_MINOR_VERSION
772JDK_MAJOR_VERSION
773COMPRESS_JARS
774UNLIMITED_CRYPTO
775CACERTS_FILE
776TEST_IN_BUILD
777BUILD_HEADLESS
778SUPPORT_HEADFUL
779SUPPORT_HEADLESS
780SET_OPENJDK
781BDEPS_FTP
782BDEPS_UNZIP
783OS_VERSION_MICRO
784OS_VERSION_MINOR
785OS_VERSION_MAJOR
786PKG_CONFIG
787COMM
788TIME
789STAT
790HG
791READELF
792OTOOL
793LDD
794ZIP
795UNZIP
796FIND_DELETE
797MAKE
798CHECK_TOOLSDIR_MAKE
799CHECK_TOOLSDIR_GMAKE
800CHECK_MAKE
801CHECK_GMAKE
802PKGHANDLER
803OUTPUT_ROOT
804CONF_NAME
805SPEC
806BUILD_VARIANT_RELEASE
807DEBUG_CLASSFILES
808FASTDEBUG
809VARIANT
810DEBUG_LEVEL
811MACOSX_UNIVERSAL
812JVM_VARIANT_ZEROSHARK
813JVM_VARIANT_ZERO
814JVM_VARIANT_KERNEL
815JVM_VARIANT_MINIMAL1
816JVM_VARIANT_CLIENT
817JVM_VARIANT_SERVER
818JVM_VARIANTS
819JDK_VARIANT
820BUILD_LOG_WRAPPER
821BUILD_LOG_PREVIOUS
822BUILD_LOG
823SYS_ROOT
824PATH_SEP
825SRC_ROOT
826DEFINE_CROSS_COMPILE_ARCH
827LP64
828OPENJDK_TARGET_OS_API_DIR
829OPENJDK_TARGET_CPU_JLI_CFLAGS
830OPENJDK_TARGET_CPU_OSARCH
831OPENJDK_TARGET_CPU_ISADIR
832OPENJDK_TARGET_CPU_LIBDIR
833OPENJDK_TARGET_CPU_LEGACY_LIB
834OPENJDK_TARGET_CPU_LEGACY
835REQUIRED_OS_VERSION
836REQUIRED_OS_NAME
837COMPILE_TYPE
838OPENJDK_TARGET_CPU_ENDIAN
839OPENJDK_TARGET_CPU_BITS
840OPENJDK_TARGET_CPU_ARCH
841OPENJDK_TARGET_CPU
842OPENJDK_TARGET_OS_API
843OPENJDK_TARGET_OS
844OPENJDK_BUILD_CPU_ENDIAN
845OPENJDK_BUILD_CPU_BITS
846OPENJDK_BUILD_CPU_ARCH
847OPENJDK_BUILD_CPU
848OPENJDK_BUILD_OS_API
849OPENJDK_BUILD_OS
850OPENJDK_BUILD_AUTOCONF_NAME
851OPENJDK_TARGET_AUTOCONF_NAME
852target_os
853target_vendor
854target_cpu
855target
856host_os
857host_vendor
858host_cpu
859host
860build_os
861build_vendor
862build_cpu
863build
864SETFILE
865DF
866READLINK
867CYGPATH
868NAWK
869SED
870FGREP
871EGREP
872GREP
873AWK
874XARGS
875WHICH
876WC
877UNIQ
878UNAME
879TR
880TOUCH
881TEE
882TAR
883TAIL
884SORT
885SH
886RM
887THEPWDCMD
888PRINTF
889MV
890MKTEMP
891MKDIR
892LS
893LN
894HEAD
895FIND
896FILE
897EXPR
898ECHO
899DIRNAME
900DIFF
901DATE
902CUT
903CP
904CMP
905CHMOD
906CAT
907BASH
908BASENAME
909DATE_WHEN_CONFIGURED
910CONFIGURE_COMMAND_LINE
911CUSTOM_MAKE_DIR
912target_alias
913host_alias
914build_alias
915LIBS
916ECHO_T
917ECHO_N
918ECHO_C
919DEFS
920mandir
921localedir
922libdir
923psdir
924pdfdir
925dvidir
926htmldir
927infodir
928docdir
929oldincludedir
930includedir
931localstatedir
932sharedstatedir
933sysconfdir
934datadir
935datarootdir
936libexecdir
937sbindir
938bindir
939program_transform_name
940prefix
941exec_prefix
942PACKAGE_URL
943PACKAGE_BUGREPORT
944PACKAGE_STRING
945PACKAGE_VERSION
946PACKAGE_TARNAME
947PACKAGE_NAME
948PATH_SEPARATOR
949SHELL'
950ac_subst_files=''
951ac_user_opts='
952enable_option_checking
953with_custom_make_dir
954with_target_bits
955with_sys_root
956with_tools_dir
957with_devkit
958with_jdk_variant
959with_jvm_variants
960enable_debug
961with_debug_level
962with_conf_name
963with_builddeps_conf
964with_builddeps_server
965with_builddeps_dir
966with_builddeps_group
967enable_openjdk_only
968enable_headful
969enable_hotspot_test_in_build
970with_cacerts_file
971enable_unlimited_crypto
972with_boot_jdk
973with_boot_jdk_jvmargs
974with_add_source_root
975with_override_source_root
976with_adds_and_overrides
977with_override_langtools
978with_override_corba
979with_override_jaxp
980with_override_jaxws
981with_override_hotspot
982with_override_jdk
983with_import_hotspot
984with_msvcr_dll
985with_extra_cflags
986with_extra_cxxflags
987with_extra_ldflags
988enable_debug_symbols
989enable_zip_debug_info
990enable_macosx_runtime_support
991with_x
992with_cups
993with_cups_include
994with_freetype
995with_alsa
996with_alsa_include
997with_alsa_lib
998with_zlib
999with_stdc__lib
1000with_num_cores
1001with_memory_size
1002with_sjavac_server_java
1003with_sjavac_server_cores
1004enable_sjavac
1005enable_precompiled_headers
1006enable_ccache
1007with_ccache_dir
1008'
1009      ac_precious_vars='build_alias
1010host_alias
1011target_alias
1012PKG_CONFIG
1013CC
1014CFLAGS
1015LDFLAGS
1016LIBS
1017CPPFLAGS
1018CXX
1019CXXFLAGS
1020CCC
1021OBJC
1022OBJCFLAGS
1023CPP
1024CXXCPP
1025XMKMF
1026FREETYPE2_CFLAGS
1027FREETYPE2_LIBS
1028ALSA_CFLAGS
1029ALSA_LIBS'
1030
1031
1032# Initialize some variables set by options.
1033ac_init_help=
1034ac_init_version=false
1035ac_unrecognized_opts=
1036ac_unrecognized_sep=
1037# The variables have the same names as the options, with
1038# dashes changed to underlines.
1039cache_file=/dev/null
1040exec_prefix=NONE
1041no_create=
1042no_recursion=
1043prefix=NONE
1044program_prefix=NONE
1045program_suffix=NONE
1046program_transform_name=s,x,x,
1047silent=
1048site=
1049srcdir=
1050verbose=
1051x_includes=NONE
1052x_libraries=NONE
1053
1054# Installation directory options.
1055# These are left unexpanded so users can "make install exec_prefix=/foo"
1056# and all the variables that are supposed to be based on exec_prefix
1057# by default will actually change.
1058# Use braces instead of parens because sh, perl, etc. also accept them.
1059# (The list follows the same order as the GNU Coding Standards.)
1060bindir='${exec_prefix}/bin'
1061sbindir='${exec_prefix}/sbin'
1062libexecdir='${exec_prefix}/libexec'
1063datarootdir='${prefix}/share'
1064datadir='${datarootdir}'
1065sysconfdir='${prefix}/etc'
1066sharedstatedir='${prefix}/com'
1067localstatedir='${prefix}/var'
1068includedir='${prefix}/include'
1069oldincludedir='/usr/include'
1070docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1071infodir='${datarootdir}/info'
1072htmldir='${docdir}'
1073dvidir='${docdir}'
1074pdfdir='${docdir}'
1075psdir='${docdir}'
1076libdir='${exec_prefix}/lib'
1077localedir='${datarootdir}/locale'
1078mandir='${datarootdir}/man'
1079
1080ac_prev=
1081ac_dashdash=
1082for ac_option
1083do
1084  # If the previous option needs an argument, assign it.
1085  if test -n "$ac_prev"; then
1086    eval $ac_prev=\$ac_option
1087    ac_prev=
1088    continue
1089  fi
1090
1091  case $ac_option in
1092  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1093  *=)   ac_optarg= ;;
1094  *)    ac_optarg=yes ;;
1095  esac
1096
1097  # Accept the important Cygnus configure options, so we can diagnose typos.
1098
1099  case $ac_dashdash$ac_option in
1100  --)
1101    ac_dashdash=yes ;;
1102
1103  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1104    ac_prev=bindir ;;
1105  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1106    bindir=$ac_optarg ;;
1107
1108  -build | --build | --buil | --bui | --bu)
1109    ac_prev=build_alias ;;
1110  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1111    build_alias=$ac_optarg ;;
1112
1113  -cache-file | --cache-file | --cache-fil | --cache-fi \
1114  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1115    ac_prev=cache_file ;;
1116  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1117  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1118    cache_file=$ac_optarg ;;
1119
1120  --config-cache | -C)
1121    cache_file=config.cache ;;
1122
1123  -datadir | --datadir | --datadi | --datad)
1124    ac_prev=datadir ;;
1125  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1126    datadir=$ac_optarg ;;
1127
1128  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1129  | --dataroo | --dataro | --datar)
1130    ac_prev=datarootdir ;;
1131  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1132  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1133    datarootdir=$ac_optarg ;;
1134
1135  -disable-* | --disable-*)
1136    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1137    # Reject names that are not valid shell variable names.
1138    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1139      as_fn_error $? "invalid feature name: $ac_useropt"
1140    ac_useropt_orig=$ac_useropt
1141    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1142    case $ac_user_opts in
1143      *"
1144"enable_$ac_useropt"
1145"*) ;;
1146      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1147	 ac_unrecognized_sep=', ';;
1148    esac
1149    eval enable_$ac_useropt=no ;;
1150
1151  -docdir | --docdir | --docdi | --doc | --do)
1152    ac_prev=docdir ;;
1153  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1154    docdir=$ac_optarg ;;
1155
1156  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1157    ac_prev=dvidir ;;
1158  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1159    dvidir=$ac_optarg ;;
1160
1161  -enable-* | --enable-*)
1162    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1163    # Reject names that are not valid shell variable names.
1164    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1165      as_fn_error $? "invalid feature name: $ac_useropt"
1166    ac_useropt_orig=$ac_useropt
1167    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1168    case $ac_user_opts in
1169      *"
1170"enable_$ac_useropt"
1171"*) ;;
1172      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1173	 ac_unrecognized_sep=', ';;
1174    esac
1175    eval enable_$ac_useropt=\$ac_optarg ;;
1176
1177  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1178  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1179  | --exec | --exe | --ex)
1180    ac_prev=exec_prefix ;;
1181  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1182  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1183  | --exec=* | --exe=* | --ex=*)
1184    exec_prefix=$ac_optarg ;;
1185
1186  -gas | --gas | --ga | --g)
1187    # Obsolete; use --with-gas.
1188    with_gas=yes ;;
1189
1190  -help | --help | --hel | --he | -h)
1191    ac_init_help=long ;;
1192  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1193    ac_init_help=recursive ;;
1194  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1195    ac_init_help=short ;;
1196
1197  -host | --host | --hos | --ho)
1198    ac_prev=host_alias ;;
1199  -host=* | --host=* | --hos=* | --ho=*)
1200    host_alias=$ac_optarg ;;
1201
1202  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1203    ac_prev=htmldir ;;
1204  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1205  | --ht=*)
1206    htmldir=$ac_optarg ;;
1207
1208  -includedir | --includedir | --includedi | --included | --include \
1209  | --includ | --inclu | --incl | --inc)
1210    ac_prev=includedir ;;
1211  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1212  | --includ=* | --inclu=* | --incl=* | --inc=*)
1213    includedir=$ac_optarg ;;
1214
1215  -infodir | --infodir | --infodi | --infod | --info | --inf)
1216    ac_prev=infodir ;;
1217  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1218    infodir=$ac_optarg ;;
1219
1220  -libdir | --libdir | --libdi | --libd)
1221    ac_prev=libdir ;;
1222  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1223    libdir=$ac_optarg ;;
1224
1225  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1226  | --libexe | --libex | --libe)
1227    ac_prev=libexecdir ;;
1228  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1229  | --libexe=* | --libex=* | --libe=*)
1230    libexecdir=$ac_optarg ;;
1231
1232  -localedir | --localedir | --localedi | --localed | --locale)
1233    ac_prev=localedir ;;
1234  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1235    localedir=$ac_optarg ;;
1236
1237  -localstatedir | --localstatedir | --localstatedi | --localstated \
1238  | --localstate | --localstat | --localsta | --localst | --locals)
1239    ac_prev=localstatedir ;;
1240  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1241  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1242    localstatedir=$ac_optarg ;;
1243
1244  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1245    ac_prev=mandir ;;
1246  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1247    mandir=$ac_optarg ;;
1248
1249  -nfp | --nfp | --nf)
1250    # Obsolete; use --without-fp.
1251    with_fp=no ;;
1252
1253  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1254  | --no-cr | --no-c | -n)
1255    no_create=yes ;;
1256
1257  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1258  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1259    no_recursion=yes ;;
1260
1261  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1262  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1263  | --oldin | --oldi | --old | --ol | --o)
1264    ac_prev=oldincludedir ;;
1265  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1266  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1267  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1268    oldincludedir=$ac_optarg ;;
1269
1270  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1271    ac_prev=prefix ;;
1272  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1273    prefix=$ac_optarg ;;
1274
1275  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1276  | --program-pre | --program-pr | --program-p)
1277    ac_prev=program_prefix ;;
1278  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1279  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1280    program_prefix=$ac_optarg ;;
1281
1282  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1283  | --program-suf | --program-su | --program-s)
1284    ac_prev=program_suffix ;;
1285  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1286  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1287    program_suffix=$ac_optarg ;;
1288
1289  -program-transform-name | --program-transform-name \
1290  | --program-transform-nam | --program-transform-na \
1291  | --program-transform-n | --program-transform- \
1292  | --program-transform | --program-transfor \
1293  | --program-transfo | --program-transf \
1294  | --program-trans | --program-tran \
1295  | --progr-tra | --program-tr | --program-t)
1296    ac_prev=program_transform_name ;;
1297  -program-transform-name=* | --program-transform-name=* \
1298  | --program-transform-nam=* | --program-transform-na=* \
1299  | --program-transform-n=* | --program-transform-=* \
1300  | --program-transform=* | --program-transfor=* \
1301  | --program-transfo=* | --program-transf=* \
1302  | --program-trans=* | --program-tran=* \
1303  | --progr-tra=* | --program-tr=* | --program-t=*)
1304    program_transform_name=$ac_optarg ;;
1305
1306  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1307    ac_prev=pdfdir ;;
1308  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1309    pdfdir=$ac_optarg ;;
1310
1311  -psdir | --psdir | --psdi | --psd | --ps)
1312    ac_prev=psdir ;;
1313  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1314    psdir=$ac_optarg ;;
1315
1316  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1317  | -silent | --silent | --silen | --sile | --sil)
1318    silent=yes ;;
1319
1320  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1321    ac_prev=sbindir ;;
1322  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1323  | --sbi=* | --sb=*)
1324    sbindir=$ac_optarg ;;
1325
1326  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1327  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1328  | --sharedst | --shareds | --shared | --share | --shar \
1329  | --sha | --sh)
1330    ac_prev=sharedstatedir ;;
1331  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1332  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1333  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1334  | --sha=* | --sh=*)
1335    sharedstatedir=$ac_optarg ;;
1336
1337  -site | --site | --sit)
1338    ac_prev=site ;;
1339  -site=* | --site=* | --sit=*)
1340    site=$ac_optarg ;;
1341
1342  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1343    ac_prev=srcdir ;;
1344  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1345    srcdir=$ac_optarg ;;
1346
1347  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1348  | --syscon | --sysco | --sysc | --sys | --sy)
1349    ac_prev=sysconfdir ;;
1350  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1351  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1352    sysconfdir=$ac_optarg ;;
1353
1354  -target | --target | --targe | --targ | --tar | --ta | --t)
1355    ac_prev=target_alias ;;
1356  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1357    target_alias=$ac_optarg ;;
1358
1359  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1360    verbose=yes ;;
1361
1362  -version | --version | --versio | --versi | --vers | -V)
1363    ac_init_version=: ;;
1364
1365  -with-* | --with-*)
1366    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1367    # Reject names that are not valid shell variable names.
1368    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1369      as_fn_error $? "invalid package name: $ac_useropt"
1370    ac_useropt_orig=$ac_useropt
1371    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1372    case $ac_user_opts in
1373      *"
1374"with_$ac_useropt"
1375"*) ;;
1376      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1377	 ac_unrecognized_sep=', ';;
1378    esac
1379    eval with_$ac_useropt=\$ac_optarg ;;
1380
1381  -without-* | --without-*)
1382    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1383    # Reject names that are not valid shell variable names.
1384    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1385      as_fn_error $? "invalid package name: $ac_useropt"
1386    ac_useropt_orig=$ac_useropt
1387    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1388    case $ac_user_opts in
1389      *"
1390"with_$ac_useropt"
1391"*) ;;
1392      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1393	 ac_unrecognized_sep=', ';;
1394    esac
1395    eval with_$ac_useropt=no ;;
1396
1397  --x)
1398    # Obsolete; use --with-x.
1399    with_x=yes ;;
1400
1401  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1402  | --x-incl | --x-inc | --x-in | --x-i)
1403    ac_prev=x_includes ;;
1404  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1405  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1406    x_includes=$ac_optarg ;;
1407
1408  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1409  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1410    ac_prev=x_libraries ;;
1411  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1412  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1413    x_libraries=$ac_optarg ;;
1414
1415  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1416Try \`$0 --help' for more information"
1417    ;;
1418
1419  *=*)
1420    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1421    # Reject names that are not valid shell variable names.
1422    case $ac_envvar in #(
1423      '' | [0-9]* | *[!_$as_cr_alnum]* )
1424      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1425    esac
1426    eval $ac_envvar=\$ac_optarg
1427    export $ac_envvar ;;
1428
1429  *)
1430    # FIXME: should be removed in autoconf 3.0.
1431    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1432    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1433      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1434    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1435    ;;
1436
1437  esac
1438done
1439
1440if test -n "$ac_prev"; then
1441  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1442  as_fn_error $? "missing argument to $ac_option"
1443fi
1444
1445if test -n "$ac_unrecognized_opts"; then
1446  case $enable_option_checking in
1447    no) ;;
1448    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1449    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1450  esac
1451fi
1452
1453# Check all directory arguments for consistency.
1454for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1455		datadir sysconfdir sharedstatedir localstatedir includedir \
1456		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1457		libdir localedir mandir
1458do
1459  eval ac_val=\$$ac_var
1460  # Remove trailing slashes.
1461  case $ac_val in
1462    */ )
1463      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1464      eval $ac_var=\$ac_val;;
1465  esac
1466  # Be sure to have absolute directory names.
1467  case $ac_val in
1468    [\\/$]* | ?:[\\/]* )  continue;;
1469    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1470  esac
1471  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1472done
1473
1474# There might be people who depend on the old broken behavior: `$host'
1475# used to hold the argument of --host etc.
1476# FIXME: To remove some day.
1477build=$build_alias
1478host=$host_alias
1479target=$target_alias
1480
1481# FIXME: To remove some day.
1482if test "x$host_alias" != x; then
1483  if test "x$build_alias" = x; then
1484    cross_compiling=maybe
1485    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1486    If a cross compiler is detected then cross compile mode will be used" >&2
1487  elif test "x$build_alias" != "x$host_alias"; then
1488    cross_compiling=yes
1489  fi
1490fi
1491
1492ac_tool_prefix=
1493test -n "$host_alias" && ac_tool_prefix=$host_alias-
1494
1495test "$silent" = yes && exec 6>/dev/null
1496
1497
1498ac_pwd=`pwd` && test -n "$ac_pwd" &&
1499ac_ls_di=`ls -di .` &&
1500ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1501  as_fn_error $? "working directory cannot be determined"
1502test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1503  as_fn_error $? "pwd does not report name of working directory"
1504
1505
1506# Find the source files, if location was not specified.
1507if test -z "$srcdir"; then
1508  ac_srcdir_defaulted=yes
1509  # Try the directory containing this script, then the parent directory.
1510  ac_confdir=`$as_dirname -- "$as_myself" ||
1511$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1512	 X"$as_myself" : 'X\(//\)[^/]' \| \
1513	 X"$as_myself" : 'X\(//\)$' \| \
1514	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1515$as_echo X"$as_myself" |
1516    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1517	    s//\1/
1518	    q
1519	  }
1520	  /^X\(\/\/\)[^/].*/{
1521	    s//\1/
1522	    q
1523	  }
1524	  /^X\(\/\/\)$/{
1525	    s//\1/
1526	    q
1527	  }
1528	  /^X\(\/\).*/{
1529	    s//\1/
1530	    q
1531	  }
1532	  s/.*/./; q'`
1533  srcdir=$ac_confdir
1534  if test ! -r "$srcdir/$ac_unique_file"; then
1535    srcdir=..
1536  fi
1537else
1538  ac_srcdir_defaulted=no
1539fi
1540if test ! -r "$srcdir/$ac_unique_file"; then
1541  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1542  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1543fi
1544ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1545ac_abs_confdir=`(
1546	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1547	pwd)`
1548# When building in place, set srcdir=.
1549if test "$ac_abs_confdir" = "$ac_pwd"; then
1550  srcdir=.
1551fi
1552# Remove unnecessary trailing slashes from srcdir.
1553# Double slashes in file names in object file debugging info
1554# mess up M-x gdb in Emacs.
1555case $srcdir in
1556*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1557esac
1558for ac_var in $ac_precious_vars; do
1559  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1560  eval ac_env_${ac_var}_value=\$${ac_var}
1561  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1562  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1563done
1564
1565#
1566# Report the --help message.
1567#
1568if test "$ac_init_help" = "long"; then
1569  # Omit some internal or obsolete options to make the list less imposing.
1570  # This message is too long to be a string in the A/UX 3.1 sh.
1571  cat <<_ACEOF
1572\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1573
1574Usage: $0 [OPTION]... [VAR=VALUE]...
1575
1576To assign environment variables (e.g., CC, CFLAGS...), specify them as
1577VAR=VALUE.  See below for descriptions of some of the useful variables.
1578
1579Defaults for the options are specified in brackets.
1580
1581Configuration:
1582  -h, --help              display this help and exit
1583      --help=short        display options specific to this package
1584      --help=recursive    display the short help of all the included packages
1585  -V, --version           display version information and exit
1586  -q, --quiet, --silent   do not print \`checking ...' messages
1587      --cache-file=FILE   cache test results in FILE [disabled]
1588  -C, --config-cache      alias for \`--cache-file=config.cache'
1589  -n, --no-create         do not create output files
1590      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1591
1592Installation directories:
1593  --prefix=PREFIX         install architecture-independent files in PREFIX
1594                          [$ac_default_prefix]
1595  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1596                          [PREFIX]
1597
1598By default, \`make install' will install all the files in
1599\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1600an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1601for instance \`--prefix=\$HOME'.
1602
1603For better control, use the options below.
1604
1605Fine tuning of the installation directories:
1606  --bindir=DIR            user executables [EPREFIX/bin]
1607  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1608  --libexecdir=DIR        program executables [EPREFIX/libexec]
1609  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1610  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1611  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1612  --libdir=DIR            object code libraries [EPREFIX/lib]
1613  --includedir=DIR        C header files [PREFIX/include]
1614  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1615  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1616  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1617  --infodir=DIR           info documentation [DATAROOTDIR/info]
1618  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1619  --mandir=DIR            man documentation [DATAROOTDIR/man]
1620  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1621  --htmldir=DIR           html documentation [DOCDIR]
1622  --dvidir=DIR            dvi documentation [DOCDIR]
1623  --pdfdir=DIR            pdf documentation [DOCDIR]
1624  --psdir=DIR             ps documentation [DOCDIR]
1625_ACEOF
1626
1627  cat <<\_ACEOF
1628
1629X features:
1630  --x-includes=DIR    X include files are in DIR
1631  --x-libraries=DIR   X library files are in DIR
1632
1633System types:
1634  --build=BUILD     configure for building on BUILD [guessed]
1635  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1636  --target=TARGET   configure for building compilers for TARGET [HOST]
1637_ACEOF
1638fi
1639
1640if test -n "$ac_init_help"; then
1641  case $ac_init_help in
1642     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1643   esac
1644  cat <<\_ACEOF
1645
1646Optional Features:
1647  --disable-option-checking  ignore unrecognized --enable/--with options
1648  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1649  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1650  --enable-debug          set the debug level to fastdebug (shorthand for
1651                          --with-debug-level=fastdebug) [disabled]
1652  --enable-openjdk-only   supress building closed source even if present
1653                          [disabled]
1654  --disable-headful       disable building headful support (graphical UI
1655                          support) [enabled]
1656  --enable-hotspot-test-in-build
1657                          run the Queens test after Hotspot build [disabled]
1658  --enable-unlimited-crypto
1659                          Enable unlimited crypto policy [disabled]
1660  --disable-debug-symbols disable generation of debug symbols [enabled]
1661  --disable-zip-debug-info
1662                          disable zipping of debug-info files [enabled]
1663  --disable-macosx-runtime-support
1664                          disable the use of MacOSX Java runtime support
1665                          framework [enabled]
1666  --enable-sjavac         use sjavac to do fast incremental compiles
1667                          [disabled]
1668  --disable-precompiled-headers
1669                          disable using precompiled headers when compiling C++
1670                          [enabled]
1671  --disable-ccache        disable using ccache to speed up recompilations
1672                          [enabled]
1673
1674Optional Packages:
1675  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1676  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1677  --with-custom-make-dir  use this directory for custom build/make files
1678  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1679                          support it), e.g. --with-target-bits=32 [guessed]
1680  --with-sys-root         pass this sys-root to the compilers and tools (for
1681                          cross-compiling)
1682  --with-tools-dir        search this directory for compilers and tools (for
1683                          cross-compiling)
1684  --with-devkit           use this directory as base for tools-dir and
1685                          sys-root (for cross-compiling)
1686  --with-jdk-variant      JDK variant to build (normal) [normal]
1687  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1688                          client, minimal1, kernel, zero, zeroshark) [server]
1689  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1690                          [release]
1691  --with-conf-name        use this as the name of the configuration [generated
1692                          from important configuration options]
1693  --with-builddeps-conf   use this configuration file for the builddeps
1694  --with-builddeps-server download and use build dependencies from this server
1695                          url
1696  --with-builddeps-dir    store downloaded build dependencies here
1697                          [/localhome/builddeps]
1698  --with-builddeps-group  chgrp the downloaded build dependencies to this
1699                          group
1700  --with-cacerts-file     specify alternative cacerts file
1701  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1702  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1703                          invocations of the Boot JDK, overriding the default
1704                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1705                          -enableassertions"
1706  --with-add-source-root  for each and every source directory, look in this
1707                          additional source root for the same directory; if it
1708                          exists and have files in it, include it in the build
1709  --with-override-source-root
1710                          for each and every source directory, look in this
1711                          override source root for the same directory; if it
1712                          exists, use that directory instead and ignore the
1713                          directory in the original source root
1714  --with-adds-and-overrides
1715                          use the subdirs 'adds' and 'overrides' in the
1716                          specified directory as add-source-root and
1717                          override-source-root
1718  --with-override-langtools
1719                          use this langtools dir for the build
1720  --with-override-corba   use this corba dir for the build
1721  --with-override-jaxp    use this jaxp dir for the build
1722  --with-override-jaxws   use this jaxws dir for the build
1723  --with-override-hotspot use this hotspot dir for the build
1724  --with-override-jdk     use this jdk dir for the build
1725  --with-import-hotspot   import hotspot binaries from this jdk image or
1726                          hotspot build dist dir instead of building from
1727                          source
1728  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1729                          only) [probed]
1730  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1731  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1732  --with-extra-ldflags    extra flags to be used when linking jdk
1733  --with-x                use the X Window System
1734  --with-cups             specify prefix directory for the cups package
1735                          (expecting the headers under PATH/include)
1736  --with-cups-include     specify directory for the cups include files
1737  --with-freetype         specify prefix directory for the freetype2 package
1738                          (expecting the libraries under PATH/lib and the
1739                          headers under PATH/include)
1740  --with-alsa             specify prefix directory for the alsa package
1741                          (expecting the libraries under PATH/lib and the
1742                          headers under PATH/include)
1743  --with-alsa-include     specify directory for the alsa include files
1744  --with-alsa-lib         specify directory for the alsa library
1745  --with-zlib             use zlib from build system or OpenJDK source
1746                          (system, bundled) [bundled]
1747  --with-stdc++lib=<static>,<dynamic>,<default>
1748                          force linking of the C++ runtime on Linux to either
1749                          static or dynamic, default is static with dynamic as
1750                          fallback
1751  --with-num-cores        number of cores in the build system, e.g.
1752                          --with-num-cores=8 [probed]
1753  --with-memory-size      memory (in MB) available in the build system, e.g.
1754                          --with-memory-size=1024 [probed]
1755  --with-sjavac-server-java
1756                          use this java binary for running the sjavac
1757                          background server [Boot JDK java]
1758  --with-sjavac-server-cores
1759                          use at most this number of concurrent threads on the
1760                          sjavac server [probed]
1761  --with-ccache-dir       where to store ccache files [~/.ccache]
1762
1763Some influential environment variables:
1764  PKG_CONFIG  path to pkg-config utility
1765  CC          C compiler command
1766  CFLAGS      C compiler flags
1767  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1768              nonstandard directory <lib dir>
1769  LIBS        libraries to pass to the linker, e.g. -l<library>
1770  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1771              you have headers in a nonstandard directory <include dir>
1772  CXX         C++ compiler command
1773  CXXFLAGS    C++ compiler flags
1774  OBJC        Objective C compiler command
1775  OBJCFLAGS   Objective C compiler flags
1776  CPP         C preprocessor
1777  CXXCPP      C++ preprocessor
1778  XMKMF       Path to xmkmf, Makefile generator for X Window System
1779  FREETYPE2_CFLAGS
1780              C compiler flags for FREETYPE2, overriding pkg-config
1781  FREETYPE2_LIBS
1782              linker flags for FREETYPE2, overriding pkg-config
1783  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1784  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1785
1786Use these variables to override the choices made by `configure' or to help
1787it to find libraries and programs with nonstandard names/locations.
1788
1789Report bugs to <build-dev@openjdk.java.net>.
1790OpenJDK home page: <http://openjdk.java.net>.
1791_ACEOF
1792ac_status=$?
1793fi
1794
1795if test "$ac_init_help" = "recursive"; then
1796  # If there are subdirs, report their specific --help.
1797  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1798    test -d "$ac_dir" ||
1799      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1800      continue
1801    ac_builddir=.
1802
1803case "$ac_dir" in
1804.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1805*)
1806  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1807  # A ".." for each directory in $ac_dir_suffix.
1808  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1809  case $ac_top_builddir_sub in
1810  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1811  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1812  esac ;;
1813esac
1814ac_abs_top_builddir=$ac_pwd
1815ac_abs_builddir=$ac_pwd$ac_dir_suffix
1816# for backward compatibility:
1817ac_top_builddir=$ac_top_build_prefix
1818
1819case $srcdir in
1820  .)  # We are building in place.
1821    ac_srcdir=.
1822    ac_top_srcdir=$ac_top_builddir_sub
1823    ac_abs_top_srcdir=$ac_pwd ;;
1824  [\\/]* | ?:[\\/]* )  # Absolute name.
1825    ac_srcdir=$srcdir$ac_dir_suffix;
1826    ac_top_srcdir=$srcdir
1827    ac_abs_top_srcdir=$srcdir ;;
1828  *) # Relative name.
1829    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1830    ac_top_srcdir=$ac_top_build_prefix$srcdir
1831    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1832esac
1833ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1834
1835    cd "$ac_dir" || { ac_status=$?; continue; }
1836    # Check for guested configure.
1837    if test -f "$ac_srcdir/configure.gnu"; then
1838      echo &&
1839      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1840    elif test -f "$ac_srcdir/configure"; then
1841      echo &&
1842      $SHELL "$ac_srcdir/configure" --help=recursive
1843    else
1844      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1845    fi || ac_status=$?
1846    cd "$ac_pwd" || { ac_status=$?; break; }
1847  done
1848fi
1849
1850test -n "$ac_init_help" && exit $ac_status
1851if $ac_init_version; then
1852  cat <<\_ACEOF
1853OpenJDK configure jdk8
1854generated by GNU Autoconf 2.67
1855
1856Copyright (C) 2010 Free Software Foundation, Inc.
1857This configure script is free software; the Free Software Foundation
1858gives unlimited permission to copy, distribute and modify it.
1859_ACEOF
1860  exit
1861fi
1862
1863## ------------------------ ##
1864## Autoconf initialization. ##
1865## ------------------------ ##
1866
1867# ac_fn_c_try_compile LINENO
1868# --------------------------
1869# Try to compile conftest.$ac_ext, and return whether this succeeded.
1870ac_fn_c_try_compile ()
1871{
1872  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873  rm -f conftest.$ac_objext
1874  if { { ac_try="$ac_compile"
1875case "(($ac_try" in
1876  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877  *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881  (eval "$ac_compile") 2>conftest.err
1882  ac_status=$?
1883  if test -s conftest.err; then
1884    grep -v '^ *+' conftest.err >conftest.er1
1885    cat conftest.er1 >&5
1886    mv -f conftest.er1 conftest.err
1887  fi
1888  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889  test $ac_status = 0; } && {
1890	 test -z "$ac_c_werror_flag" ||
1891	 test ! -s conftest.err
1892       } && test -s conftest.$ac_objext; then :
1893  ac_retval=0
1894else
1895  $as_echo "$as_me: failed program was:" >&5
1896sed 's/^/| /' conftest.$ac_ext >&5
1897
1898	ac_retval=1
1899fi
1900  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1901  as_fn_set_status $ac_retval
1902
1903} # ac_fn_c_try_compile
1904
1905# ac_fn_cxx_try_compile LINENO
1906# ----------------------------
1907# Try to compile conftest.$ac_ext, and return whether this succeeded.
1908ac_fn_cxx_try_compile ()
1909{
1910  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1911  rm -f conftest.$ac_objext
1912  if { { ac_try="$ac_compile"
1913case "(($ac_try" in
1914  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1915  *) ac_try_echo=$ac_try;;
1916esac
1917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1918$as_echo "$ac_try_echo"; } >&5
1919  (eval "$ac_compile") 2>conftest.err
1920  ac_status=$?
1921  if test -s conftest.err; then
1922    grep -v '^ *+' conftest.err >conftest.er1
1923    cat conftest.er1 >&5
1924    mv -f conftest.er1 conftest.err
1925  fi
1926  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1927  test $ac_status = 0; } && {
1928	 test -z "$ac_cxx_werror_flag" ||
1929	 test ! -s conftest.err
1930       } && test -s conftest.$ac_objext; then :
1931  ac_retval=0
1932else
1933  $as_echo "$as_me: failed program was:" >&5
1934sed 's/^/| /' conftest.$ac_ext >&5
1935
1936	ac_retval=1
1937fi
1938  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1939  as_fn_set_status $ac_retval
1940
1941} # ac_fn_cxx_try_compile
1942
1943# ac_fn_objc_try_compile LINENO
1944# -----------------------------
1945# Try to compile conftest.$ac_ext, and return whether this succeeded.
1946ac_fn_objc_try_compile ()
1947{
1948  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949  rm -f conftest.$ac_objext
1950  if { { ac_try="$ac_compile"
1951case "(($ac_try" in
1952  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1953  *) ac_try_echo=$ac_try;;
1954esac
1955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1956$as_echo "$ac_try_echo"; } >&5
1957  (eval "$ac_compile") 2>conftest.err
1958  ac_status=$?
1959  if test -s conftest.err; then
1960    grep -v '^ *+' conftest.err >conftest.er1
1961    cat conftest.er1 >&5
1962    mv -f conftest.er1 conftest.err
1963  fi
1964  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965  test $ac_status = 0; } && {
1966	 test -z "$ac_objc_werror_flag" ||
1967	 test ! -s conftest.err
1968       } && test -s conftest.$ac_objext; then :
1969  ac_retval=0
1970else
1971  $as_echo "$as_me: failed program was:" >&5
1972sed 's/^/| /' conftest.$ac_ext >&5
1973
1974	ac_retval=1
1975fi
1976  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1977  as_fn_set_status $ac_retval
1978
1979} # ac_fn_objc_try_compile
1980
1981# ac_fn_c_try_cpp LINENO
1982# ----------------------
1983# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1984ac_fn_c_try_cpp ()
1985{
1986  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1987  if { { ac_try="$ac_cpp conftest.$ac_ext"
1988case "(($ac_try" in
1989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1990  *) ac_try_echo=$ac_try;;
1991esac
1992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1993$as_echo "$ac_try_echo"; } >&5
1994  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1995  ac_status=$?
1996  if test -s conftest.err; then
1997    grep -v '^ *+' conftest.err >conftest.er1
1998    cat conftest.er1 >&5
1999    mv -f conftest.er1 conftest.err
2000  fi
2001  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2002  test $ac_status = 0; } > conftest.i && {
2003	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2004	 test ! -s conftest.err
2005       }; then :
2006  ac_retval=0
2007else
2008  $as_echo "$as_me: failed program was:" >&5
2009sed 's/^/| /' conftest.$ac_ext >&5
2010
2011    ac_retval=1
2012fi
2013  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2014  as_fn_set_status $ac_retval
2015
2016} # ac_fn_c_try_cpp
2017
2018# ac_fn_cxx_try_cpp LINENO
2019# ------------------------
2020# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2021ac_fn_cxx_try_cpp ()
2022{
2023  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2024  if { { ac_try="$ac_cpp conftest.$ac_ext"
2025case "(($ac_try" in
2026  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2027  *) ac_try_echo=$ac_try;;
2028esac
2029eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2030$as_echo "$ac_try_echo"; } >&5
2031  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2032  ac_status=$?
2033  if test -s conftest.err; then
2034    grep -v '^ *+' conftest.err >conftest.er1
2035    cat conftest.er1 >&5
2036    mv -f conftest.er1 conftest.err
2037  fi
2038  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2039  test $ac_status = 0; } > conftest.i && {
2040	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2041	 test ! -s conftest.err
2042       }; then :
2043  ac_retval=0
2044else
2045  $as_echo "$as_me: failed program was:" >&5
2046sed 's/^/| /' conftest.$ac_ext >&5
2047
2048    ac_retval=1
2049fi
2050  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2051  as_fn_set_status $ac_retval
2052
2053} # ac_fn_cxx_try_cpp
2054
2055# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2056# ---------------------------------------------------------
2057# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2058# the include files in INCLUDES and setting the cache variable VAR
2059# accordingly.
2060ac_fn_cxx_check_header_mongrel ()
2061{
2062  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2063  if eval "test \"\${$3+set}\"" = set; then :
2064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2065$as_echo_n "checking for $2... " >&6; }
2066if eval "test \"\${$3+set}\"" = set; then :
2067  $as_echo_n "(cached) " >&6
2068fi
2069eval ac_res=\$$3
2070	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071$as_echo "$ac_res" >&6; }
2072else
2073  # Is the header compilable?
2074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2075$as_echo_n "checking $2 usability... " >&6; }
2076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h.  */
2078$4
2079#include <$2>
2080_ACEOF
2081if ac_fn_cxx_try_compile "$LINENO"; then :
2082  ac_header_compiler=yes
2083else
2084  ac_header_compiler=no
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2088$as_echo "$ac_header_compiler" >&6; }
2089
2090# Is the header present?
2091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2092$as_echo_n "checking $2 presence... " >&6; }
2093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h.  */
2095#include <$2>
2096_ACEOF
2097if ac_fn_cxx_try_cpp "$LINENO"; then :
2098  ac_header_preproc=yes
2099else
2100  ac_header_preproc=no
2101fi
2102rm -f conftest.err conftest.i conftest.$ac_ext
2103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2104$as_echo "$ac_header_preproc" >&6; }
2105
2106# So?  What about this header?
2107case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2108  yes:no: )
2109    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2110$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2111    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2112$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2113    ;;
2114  no:yes:* )
2115    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2116$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2117    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2118$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2119    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2120$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2121    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2122$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2123    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2124$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2125( $as_echo "## ----------------------------------------- ##
2126## Report this to build-dev@openjdk.java.net ##
2127## ----------------------------------------- ##"
2128     ) | sed "s/^/$as_me: WARNING:     /" >&2
2129    ;;
2130esac
2131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2132$as_echo_n "checking for $2... " >&6; }
2133if eval "test \"\${$3+set}\"" = set; then :
2134  $as_echo_n "(cached) " >&6
2135else
2136  eval "$3=\$ac_header_compiler"
2137fi
2138eval ac_res=\$$3
2139	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2140$as_echo "$ac_res" >&6; }
2141fi
2142  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2143
2144} # ac_fn_cxx_check_header_mongrel
2145
2146# ac_fn_cxx_try_run LINENO
2147# ------------------------
2148# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2149# that executables *can* be run.
2150ac_fn_cxx_try_run ()
2151{
2152  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153  if { { ac_try="$ac_link"
2154case "(($ac_try" in
2155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2156  *) ac_try_echo=$ac_try;;
2157esac
2158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2159$as_echo "$ac_try_echo"; } >&5
2160  (eval "$ac_link") 2>&5
2161  ac_status=$?
2162  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2163  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2164  { { case "(($ac_try" in
2165  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2166  *) ac_try_echo=$ac_try;;
2167esac
2168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2169$as_echo "$ac_try_echo"; } >&5
2170  (eval "$ac_try") 2>&5
2171  ac_status=$?
2172  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2173  test $ac_status = 0; }; }; then :
2174  ac_retval=0
2175else
2176  $as_echo "$as_me: program exited with status $ac_status" >&5
2177       $as_echo "$as_me: failed program was:" >&5
2178sed 's/^/| /' conftest.$ac_ext >&5
2179
2180       ac_retval=$ac_status
2181fi
2182  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2183  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2184  as_fn_set_status $ac_retval
2185
2186} # ac_fn_cxx_try_run
2187
2188# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2189# ---------------------------------------------------------
2190# Tests whether HEADER exists and can be compiled using the include files in
2191# INCLUDES, setting the cache variable VAR accordingly.
2192ac_fn_cxx_check_header_compile ()
2193{
2194  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2196$as_echo_n "checking for $2... " >&6; }
2197if eval "test \"\${$3+set}\"" = set; then :
2198  $as_echo_n "(cached) " >&6
2199else
2200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201/* end confdefs.h.  */
2202$4
2203#include <$2>
2204_ACEOF
2205if ac_fn_cxx_try_compile "$LINENO"; then :
2206  eval "$3=yes"
2207else
2208  eval "$3=no"
2209fi
2210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2211fi
2212eval ac_res=\$$3
2213	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2214$as_echo "$ac_res" >&6; }
2215  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2216
2217} # ac_fn_cxx_check_header_compile
2218
2219# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2220# ----------------------------------------------
2221# Tries to find the compile-time value of EXPR in a program that includes
2222# INCLUDES, setting VAR accordingly. Returns whether the value could be
2223# computed
2224ac_fn_cxx_compute_int ()
2225{
2226  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227  if test "$cross_compiling" = yes; then
2228    # Depending upon the size, compute the lo and hi bounds.
2229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230/* end confdefs.h.  */
2231$4
2232int
2233main ()
2234{
2235static int test_array [1 - 2 * !(($2) >= 0)];
2236test_array [0] = 0
2237
2238  ;
2239  return 0;
2240}
2241_ACEOF
2242if ac_fn_cxx_try_compile "$LINENO"; then :
2243  ac_lo=0 ac_mid=0
2244  while :; do
2245    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h.  */
2247$4
2248int
2249main ()
2250{
2251static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2252test_array [0] = 0
2253
2254  ;
2255  return 0;
2256}
2257_ACEOF
2258if ac_fn_cxx_try_compile "$LINENO"; then :
2259  ac_hi=$ac_mid; break
2260else
2261  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2262			if test $ac_lo -le $ac_mid; then
2263			  ac_lo= ac_hi=
2264			  break
2265			fi
2266			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2267fi
2268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2269  done
2270else
2271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h.  */
2273$4
2274int
2275main ()
2276{
2277static int test_array [1 - 2 * !(($2) < 0)];
2278test_array [0] = 0
2279
2280  ;
2281  return 0;
2282}
2283_ACEOF
2284if ac_fn_cxx_try_compile "$LINENO"; then :
2285  ac_hi=-1 ac_mid=-1
2286  while :; do
2287    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2288/* end confdefs.h.  */
2289$4
2290int
2291main ()
2292{
2293static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2294test_array [0] = 0
2295
2296  ;
2297  return 0;
2298}
2299_ACEOF
2300if ac_fn_cxx_try_compile "$LINENO"; then :
2301  ac_lo=$ac_mid; break
2302else
2303  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2304			if test $ac_mid -le $ac_hi; then
2305			  ac_lo= ac_hi=
2306			  break
2307			fi
2308			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2309fi
2310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311  done
2312else
2313  ac_lo= ac_hi=
2314fi
2315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318# Binary search between lo and hi bounds.
2319while test "x$ac_lo" != "x$ac_hi"; do
2320  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2321  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322/* end confdefs.h.  */
2323$4
2324int
2325main ()
2326{
2327static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2328test_array [0] = 0
2329
2330  ;
2331  return 0;
2332}
2333_ACEOF
2334if ac_fn_cxx_try_compile "$LINENO"; then :
2335  ac_hi=$ac_mid
2336else
2337  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340done
2341case $ac_lo in #((
2342?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2343'') ac_retval=1 ;;
2344esac
2345  else
2346    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h.  */
2348$4
2349static long int longval () { return $2; }
2350static unsigned long int ulongval () { return $2; }
2351#include <stdio.h>
2352#include <stdlib.h>
2353int
2354main ()
2355{
2356
2357  FILE *f = fopen ("conftest.val", "w");
2358  if (! f)
2359    return 1;
2360  if (($2) < 0)
2361    {
2362      long int i = longval ();
2363      if (i != ($2))
2364	return 1;
2365      fprintf (f, "%ld", i);
2366    }
2367  else
2368    {
2369      unsigned long int i = ulongval ();
2370      if (i != ($2))
2371	return 1;
2372      fprintf (f, "%lu", i);
2373    }
2374  /* Do not output a trailing newline, as this causes \r\n confusion
2375     on some platforms.  */
2376  return ferror (f) || fclose (f) != 0;
2377
2378  ;
2379  return 0;
2380}
2381_ACEOF
2382if ac_fn_cxx_try_run "$LINENO"; then :
2383  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2384else
2385  ac_retval=1
2386fi
2387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2388  conftest.$ac_objext conftest.beam conftest.$ac_ext
2389rm -f conftest.val
2390
2391  fi
2392  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2393  as_fn_set_status $ac_retval
2394
2395} # ac_fn_cxx_compute_int
2396
2397# ac_fn_cxx_try_link LINENO
2398# -------------------------
2399# Try to link conftest.$ac_ext, and return whether this succeeded.
2400ac_fn_cxx_try_link ()
2401{
2402  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403  rm -f conftest.$ac_objext conftest$ac_exeext
2404  if { { ac_try="$ac_link"
2405case "(($ac_try" in
2406  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2407  *) ac_try_echo=$ac_try;;
2408esac
2409eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2410$as_echo "$ac_try_echo"; } >&5
2411  (eval "$ac_link") 2>conftest.err
2412  ac_status=$?
2413  if test -s conftest.err; then
2414    grep -v '^ *+' conftest.err >conftest.er1
2415    cat conftest.er1 >&5
2416    mv -f conftest.er1 conftest.err
2417  fi
2418  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2419  test $ac_status = 0; } && {
2420	 test -z "$ac_cxx_werror_flag" ||
2421	 test ! -s conftest.err
2422       } && test -s conftest$ac_exeext && {
2423	 test "$cross_compiling" = yes ||
2424	 $as_test_x conftest$ac_exeext
2425       }; then :
2426  ac_retval=0
2427else
2428  $as_echo "$as_me: failed program was:" >&5
2429sed 's/^/| /' conftest.$ac_ext >&5
2430
2431	ac_retval=1
2432fi
2433  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2434  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2435  # interfere with the next link command; also delete a directory that is
2436  # left behind by Apple's compiler.  We do this before executing the actions.
2437  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2438  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2439  as_fn_set_status $ac_retval
2440
2441} # ac_fn_cxx_try_link
2442
2443# ac_fn_cxx_check_func LINENO FUNC VAR
2444# ------------------------------------
2445# Tests whether FUNC exists, setting the cache variable VAR accordingly
2446ac_fn_cxx_check_func ()
2447{
2448  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2450$as_echo_n "checking for $2... " >&6; }
2451if eval "test \"\${$3+set}\"" = set; then :
2452  $as_echo_n "(cached) " >&6
2453else
2454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2455/* end confdefs.h.  */
2456/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2457   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2458#define $2 innocuous_$2
2459
2460/* System header to define __stub macros and hopefully few prototypes,
2461    which can conflict with char $2 (); below.
2462    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2463    <limits.h> exists even on freestanding compilers.  */
2464
2465#ifdef __STDC__
2466# include <limits.h>
2467#else
2468# include <assert.h>
2469#endif
2470
2471#undef $2
2472
2473/* Override any GCC internal prototype to avoid an error.
2474   Use char because int might match the return type of a GCC
2475   builtin and then its argument prototype would still apply.  */
2476#ifdef __cplusplus
2477extern "C"
2478#endif
2479char $2 ();
2480/* The GNU C library defines this for functions which it implements
2481    to always fail with ENOSYS.  Some functions are actually named
2482    something starting with __ and the normal name is an alias.  */
2483#if defined __stub_$2 || defined __stub___$2
2484choke me
2485#endif
2486
2487int
2488main ()
2489{
2490return $2 ();
2491  ;
2492  return 0;
2493}
2494_ACEOF
2495if ac_fn_cxx_try_link "$LINENO"; then :
2496  eval "$3=yes"
2497else
2498  eval "$3=no"
2499fi
2500rm -f core conftest.err conftest.$ac_objext \
2501    conftest$ac_exeext conftest.$ac_ext
2502fi
2503eval ac_res=\$$3
2504	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2505$as_echo "$ac_res" >&6; }
2506  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2507
2508} # ac_fn_cxx_check_func
2509
2510# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2511# -------------------------------------------------------
2512# Tests whether HEADER exists and can be compiled using the include files in
2513# INCLUDES, setting the cache variable VAR accordingly.
2514ac_fn_c_check_header_compile ()
2515{
2516  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2518$as_echo_n "checking for $2... " >&6; }
2519if eval "test \"\${$3+set}\"" = set; then :
2520  $as_echo_n "(cached) " >&6
2521else
2522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2523/* end confdefs.h.  */
2524$4
2525#include <$2>
2526_ACEOF
2527if ac_fn_c_try_compile "$LINENO"; then :
2528  eval "$3=yes"
2529else
2530  eval "$3=no"
2531fi
2532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2533fi
2534eval ac_res=\$$3
2535	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2536$as_echo "$ac_res" >&6; }
2537  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2538
2539} # ac_fn_c_check_header_compile
2540cat >config.log <<_ACEOF
2541This file contains any messages produced by compilers while
2542running configure, to aid debugging if configure makes a mistake.
2543
2544It was created by OpenJDK $as_me jdk8, which was
2545generated by GNU Autoconf 2.67.  Invocation command line was
2546
2547  $ $0 $@
2548
2549_ACEOF
2550exec 5>>config.log
2551{
2552cat <<_ASUNAME
2553## --------- ##
2554## Platform. ##
2555## --------- ##
2556
2557hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2558uname -m = `(uname -m) 2>/dev/null || echo unknown`
2559uname -r = `(uname -r) 2>/dev/null || echo unknown`
2560uname -s = `(uname -s) 2>/dev/null || echo unknown`
2561uname -v = `(uname -v) 2>/dev/null || echo unknown`
2562
2563/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2564/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2565
2566/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2567/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2568/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2569/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2570/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2571/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2572/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2573
2574_ASUNAME
2575
2576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2577for as_dir in $PATH
2578do
2579  IFS=$as_save_IFS
2580  test -z "$as_dir" && as_dir=.
2581    $as_echo "PATH: $as_dir"
2582  done
2583IFS=$as_save_IFS
2584
2585} >&5
2586
2587cat >&5 <<_ACEOF
2588
2589
2590## ----------- ##
2591## Core tests. ##
2592## ----------- ##
2593
2594_ACEOF
2595
2596
2597# Keep a trace of the command line.
2598# Strip out --no-create and --no-recursion so they do not pile up.
2599# Strip out --silent because we don't want to record it for future runs.
2600# Also quote any args containing shell meta-characters.
2601# Make two passes to allow for proper duplicate-argument suppression.
2602ac_configure_args=
2603ac_configure_args0=
2604ac_configure_args1=
2605ac_must_keep_next=false
2606for ac_pass in 1 2
2607do
2608  for ac_arg
2609  do
2610    case $ac_arg in
2611    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2612    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2613    | -silent | --silent | --silen | --sile | --sil)
2614      continue ;;
2615    *\'*)
2616      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2617    esac
2618    case $ac_pass in
2619    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2620    2)
2621      as_fn_append ac_configure_args1 " '$ac_arg'"
2622      if test $ac_must_keep_next = true; then
2623	ac_must_keep_next=false # Got value, back to normal.
2624      else
2625	case $ac_arg in
2626	  *=* | --config-cache | -C | -disable-* | --disable-* \
2627	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2628	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2629	  | -with-* | --with-* | -without-* | --without-* | --x)
2630	    case "$ac_configure_args0 " in
2631	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2632	    esac
2633	    ;;
2634	  -* ) ac_must_keep_next=true ;;
2635	esac
2636      fi
2637      as_fn_append ac_configure_args " '$ac_arg'"
2638      ;;
2639    esac
2640  done
2641done
2642{ ac_configure_args0=; unset ac_configure_args0;}
2643{ ac_configure_args1=; unset ac_configure_args1;}
2644
2645# When interrupted or exit'd, cleanup temporary files, and complete
2646# config.log.  We remove comments because anyway the quotes in there
2647# would cause problems or look ugly.
2648# WARNING: Use '\'' to represent an apostrophe within the trap.
2649# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2650trap 'exit_status=$?
2651  # Save into config.log some information that might help in debugging.
2652  {
2653    echo
2654
2655    $as_echo "## ---------------- ##
2656## Cache variables. ##
2657## ---------------- ##"
2658    echo
2659    # The following way of writing the cache mishandles newlines in values,
2660(
2661  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2662    eval ac_val=\$$ac_var
2663    case $ac_val in #(
2664    *${as_nl}*)
2665      case $ac_var in #(
2666      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2667$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2668      esac
2669      case $ac_var in #(
2670      _ | IFS | as_nl) ;; #(
2671      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2672      *) { eval $ac_var=; unset $ac_var;} ;;
2673      esac ;;
2674    esac
2675  done
2676  (set) 2>&1 |
2677    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2678    *${as_nl}ac_space=\ *)
2679      sed -n \
2680	"s/'\''/'\''\\\\'\'''\''/g;
2681	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2682      ;; #(
2683    *)
2684      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2685      ;;
2686    esac |
2687    sort
2688)
2689    echo
2690
2691    $as_echo "## ----------------- ##
2692## Output variables. ##
2693## ----------------- ##"
2694    echo
2695    for ac_var in $ac_subst_vars
2696    do
2697      eval ac_val=\$$ac_var
2698      case $ac_val in
2699      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2700      esac
2701      $as_echo "$ac_var='\''$ac_val'\''"
2702    done | sort
2703    echo
2704
2705    if test -n "$ac_subst_files"; then
2706      $as_echo "## ------------------- ##
2707## File substitutions. ##
2708## ------------------- ##"
2709      echo
2710      for ac_var in $ac_subst_files
2711      do
2712	eval ac_val=\$$ac_var
2713	case $ac_val in
2714	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2715	esac
2716	$as_echo "$ac_var='\''$ac_val'\''"
2717      done | sort
2718      echo
2719    fi
2720
2721    if test -s confdefs.h; then
2722      $as_echo "## ----------- ##
2723## confdefs.h. ##
2724## ----------- ##"
2725      echo
2726      cat confdefs.h
2727      echo
2728    fi
2729    test "$ac_signal" != 0 &&
2730      $as_echo "$as_me: caught signal $ac_signal"
2731    $as_echo "$as_me: exit $exit_status"
2732  } >&5
2733  rm -f core *.core core.conftest.* &&
2734    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2735    exit $exit_status
2736' 0
2737for ac_signal in 1 2 13 15; do
2738  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2739done
2740ac_signal=0
2741
2742# confdefs.h avoids OS command line length limits that DEFS can exceed.
2743rm -f -r conftest* confdefs.h
2744
2745$as_echo "/* confdefs.h */" > confdefs.h
2746
2747# Predefined preprocessor variables.
2748
2749cat >>confdefs.h <<_ACEOF
2750#define PACKAGE_NAME "$PACKAGE_NAME"
2751_ACEOF
2752
2753cat >>confdefs.h <<_ACEOF
2754#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2755_ACEOF
2756
2757cat >>confdefs.h <<_ACEOF
2758#define PACKAGE_VERSION "$PACKAGE_VERSION"
2759_ACEOF
2760
2761cat >>confdefs.h <<_ACEOF
2762#define PACKAGE_STRING "$PACKAGE_STRING"
2763_ACEOF
2764
2765cat >>confdefs.h <<_ACEOF
2766#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2767_ACEOF
2768
2769cat >>confdefs.h <<_ACEOF
2770#define PACKAGE_URL "$PACKAGE_URL"
2771_ACEOF
2772
2773
2774# Let the site file select an alternate cache file if it wants to.
2775# Prefer an explicitly selected file to automatically selected ones.
2776ac_site_file1=NONE
2777ac_site_file2=NONE
2778if test -n "$CONFIG_SITE"; then
2779  # We do not want a PATH search for config.site.
2780  case $CONFIG_SITE in #((
2781    -*)  ac_site_file1=./$CONFIG_SITE;;
2782    */*) ac_site_file1=$CONFIG_SITE;;
2783    *)   ac_site_file1=./$CONFIG_SITE;;
2784  esac
2785elif test "x$prefix" != xNONE; then
2786  ac_site_file1=$prefix/share/config.site
2787  ac_site_file2=$prefix/etc/config.site
2788else
2789  ac_site_file1=$ac_default_prefix/share/config.site
2790  ac_site_file2=$ac_default_prefix/etc/config.site
2791fi
2792for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2793do
2794  test "x$ac_site_file" = xNONE && continue
2795  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2796    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2797$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2798    sed 's/^/| /' "$ac_site_file" >&5
2799    . "$ac_site_file" \
2800      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2802as_fn_error $? "failed to load site script $ac_site_file
2803See \`config.log' for more details" "$LINENO" 5 ; }
2804  fi
2805done
2806
2807if test -r "$cache_file"; then
2808  # Some versions of bash will fail to source /dev/null (special files
2809  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2810  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2811    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2812$as_echo "$as_me: loading cache $cache_file" >&6;}
2813    case $cache_file in
2814      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2815      *)                      . "./$cache_file";;
2816    esac
2817  fi
2818else
2819  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2820$as_echo "$as_me: creating cache $cache_file" >&6;}
2821  >$cache_file
2822fi
2823
2824# Check that the precious variables saved in the cache have kept the same
2825# value.
2826ac_cache_corrupted=false
2827for ac_var in $ac_precious_vars; do
2828  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2829  eval ac_new_set=\$ac_env_${ac_var}_set
2830  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2831  eval ac_new_val=\$ac_env_${ac_var}_value
2832  case $ac_old_set,$ac_new_set in
2833    set,)
2834      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2835$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2836      ac_cache_corrupted=: ;;
2837    ,set)
2838      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2839$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2840      ac_cache_corrupted=: ;;
2841    ,);;
2842    *)
2843      if test "x$ac_old_val" != "x$ac_new_val"; then
2844	# differences in whitespace do not lead to failure.
2845	ac_old_val_w=`echo x $ac_old_val`
2846	ac_new_val_w=`echo x $ac_new_val`
2847	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2848	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2849$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2850	  ac_cache_corrupted=:
2851	else
2852	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2853$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2854	  eval $ac_var=\$ac_old_val
2855	fi
2856	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2857$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2858	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2859$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2860      fi;;
2861  esac
2862  # Pass precious variables to config.status.
2863  if test "$ac_new_set" = set; then
2864    case $ac_new_val in
2865    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2866    *) ac_arg=$ac_var=$ac_new_val ;;
2867    esac
2868    case " $ac_configure_args " in
2869      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2870      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2871    esac
2872  fi
2873done
2874if $ac_cache_corrupted; then
2875  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2877  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2878$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2879  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2880fi
2881## -------------------- ##
2882## Main body of script. ##
2883## -------------------- ##
2884
2885ac_ext=c
2886ac_cpp='$CPP $CPPFLAGS'
2887ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2888ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2889ac_compiler_gnu=$ac_cv_c_compiler_gnu
2890
2891
2892
2893ac_aux_dir=
2894for ac_dir in build-aux "$srcdir"/build-aux; do
2895  if test -f "$ac_dir/install-sh"; then
2896    ac_aux_dir=$ac_dir
2897    ac_install_sh="$ac_aux_dir/install-sh -c"
2898    break
2899  elif test -f "$ac_dir/install.sh"; then
2900    ac_aux_dir=$ac_dir
2901    ac_install_sh="$ac_aux_dir/install.sh -c"
2902    break
2903  elif test -f "$ac_dir/shtool"; then
2904    ac_aux_dir=$ac_dir
2905    ac_install_sh="$ac_aux_dir/shtool install -c"
2906    break
2907  fi
2908done
2909if test -z "$ac_aux_dir"; then
2910  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2911fi
2912
2913# These three variables are undocumented and unsupported,
2914# and are intended to be withdrawn in a future Autoconf release.
2915# They can cause serious problems if a builder's source tree is in a directory
2916# whose full name contains unusual characters.
2917ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2918ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2919ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2920
2921
2922# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2923#
2924# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2925#
2926# This program is free software; you can redistribute it and/or modify
2927# it under the terms of the GNU General Public License as published by
2928# the Free Software Foundation; either version 2 of the License, or
2929# (at your option) any later version.
2930#
2931# This program is distributed in the hope that it will be useful, but
2932# WITHOUT ANY WARRANTY; without even the implied warranty of
2933# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2934# General Public License for more details.
2935#
2936# You should have received a copy of the GNU General Public License
2937# along with this program; if not, write to the Free Software
2938# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2939#
2940# As a special exception to the GNU General Public License, if you
2941# distribute this file as part of a program that contains a
2942# configuration script generated by Autoconf, you may include it under
2943# the same distribution terms that you use for the rest of that program.
2944
2945# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2946# ----------------------------------
2947# PKG_PROG_PKG_CONFIG
2948
2949# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2950#
2951# Check to see whether a particular set of modules exists.  Similar
2952# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2953#
2954#
2955# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2956# this or PKG_CHECK_MODULES is called, or make sure to call
2957# PKG_CHECK_EXISTS manually
2958# --------------------------------------------------------------
2959
2960
2961
2962# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2963# ---------------------------------------------
2964# _PKG_CONFIG
2965
2966# _PKG_SHORT_ERRORS_SUPPORTED
2967# -----------------------------
2968# _PKG_SHORT_ERRORS_SUPPORTED
2969
2970
2971# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2972# [ACTION-IF-NOT-FOUND])
2973#
2974#
2975# Note that if there is a possibility the first call to
2976# PKG_CHECK_MODULES might not happen, you should be sure to include an
2977# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2978#
2979#
2980# --------------------------------------------------------------
2981# PKG_CHECK_MODULES
2982
2983
2984# Include these first...
2985#
2986# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2987# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2988#
2989# This code is free software; you can redistribute it and/or modify it
2990# under the terms of the GNU General Public License version 2 only, as
2991# published by the Free Software Foundation.  Oracle designates this
2992# particular file as subject to the "Classpath" exception as provided
2993# by Oracle in the LICENSE file that accompanied this code.
2994#
2995# This code is distributed in the hope that it will be useful, but WITHOUT
2996# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2997# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2998# version 2 for more details (a copy is included in the LICENSE file that
2999# accompanied this code).
3000#
3001# You should have received a copy of the GNU General Public License version
3002# 2 along with this work; if not, write to the Free Software Foundation,
3003# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3004#
3005# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3006# or visit www.oracle.com if you need additional information or have any
3007# questions.
3008#
3009
3010
3011
3012# This will make sure the given variable points to a full and proper
3013# path. This means:
3014# 1) There will be no spaces in the path. On posix platforms,
3015#    spaces in the path will result in an error. On Windows,
3016#    the path will be rewritten using short-style to be space-free.
3017# 2) The path will be absolute, and it will be in unix-style (on
3018#     cygwin).
3019# $1: The name of the variable to fix
3020
3021
3022# This will make sure the given variable points to a executable
3023# with a full and proper path. This means:
3024# 1) There will be no spaces in the path. On posix platforms,
3025#    spaces in the path will result in an error. On Windows,
3026#    the path will be rewritten using short-style to be space-free.
3027# 2) The path will be absolute, and it will be in unix-style (on
3028#     cygwin).
3029# Any arguments given to the executable is preserved.
3030# If the input variable does not have a directory specification, then
3031# it need to be in the PATH.
3032# $1: The name of the variable to fix
3033
3034
3035
3036
3037
3038
3039# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3040# $1: variable to check
3041# $2: executable name to print in warning (optional)
3042
3043
3044# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3045# Arguments as AC_PATH_PROG:
3046# $1: variable to set
3047# $2: executable name to look for
3048
3049
3050# Setup the most fundamental tools that relies on not much else to set up,
3051# but is used by much of the early bootstrap code.
3052
3053
3054# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3055
3056
3057
3058
3059
3060
3061
3062#%%% Simple tools %%%
3063
3064# Check if we have found a usable version of make
3065# $1: the path to a potential make binary (or empty)
3066# $2: the description on how we found this
3067
3068
3069# Goes looking for a usable version of GNU make.
3070
3071
3072
3073
3074
3075
3076# Check if build directory is on local disk. If not possible to determine,
3077# we prefer to claim it's local.
3078# Argument 1: directory to test
3079# Argument 2: what to do if it is on local disk
3080# Argument 3: what to do otherwise (remote disk or failure)
3081
3082
3083# Check that source files have basic read permissions set. This might
3084# not be the case in cygwin in certain conditions.
3085
3086
3087
3088
3089#
3090# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3092#
3093# This code is free software; you can redistribute it and/or modify it
3094# under the terms of the GNU General Public License version 2 only, as
3095# published by the Free Software Foundation.  Oracle designates this
3096# particular file as subject to the "Classpath" exception as provided
3097# by Oracle in the LICENSE file that accompanied this code.
3098#
3099# This code is distributed in the hope that it will be useful, but WITHOUT
3100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3102# version 2 for more details (a copy is included in the LICENSE file that
3103# accompanied this code).
3104#
3105# You should have received a copy of the GNU General Public License version
3106# 2 along with this work; if not, write to the Free Software Foundation,
3107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3108#
3109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3110# or visit www.oracle.com if you need additional information or have any
3111# questions.
3112#
3113
3114
3115
3116
3117
3118# Helper function which possibly converts a path using DOS-style short mode.
3119# If so, the updated path is stored in $new_path.
3120# $1: The path to check
3121
3122
3123# Helper function which possibly converts a path using DOS-style short mode.
3124# If so, the updated path is stored in $new_path.
3125# $1: The path to check
3126
3127
3128# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3129# and could probably be heavily simplified. However, all changes in this
3130# area tend to need lot of testing in different scenarios, and in lack of
3131# proper unit testing, cleaning this up has not been deemed worth the effort
3132# at the moment.
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3143
3144
3145
3146
3147#
3148# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3149# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3150#
3151# This code is free software; you can redistribute it and/or modify it
3152# under the terms of the GNU General Public License version 2 only, as
3153# published by the Free Software Foundation.  Oracle designates this
3154# particular file as subject to the "Classpath" exception as provided
3155# by Oracle in the LICENSE file that accompanied this code.
3156#
3157# This code is distributed in the hope that it will be useful, but WITHOUT
3158# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3159# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3160# version 2 for more details (a copy is included in the LICENSE file that
3161# accompanied this code).
3162#
3163# You should have received a copy of the GNU General Public License version
3164# 2 along with this work; if not, write to the Free Software Foundation,
3165# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3166#
3167# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3168# or visit www.oracle.com if you need additional information or have any
3169# questions.
3170#
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182# ... then the rest
3183#
3184# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3185# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3186#
3187# This code is free software; you can redistribute it and/or modify it
3188# under the terms of the GNU General Public License version 2 only, as
3189# published by the Free Software Foundation.  Oracle designates this
3190# particular file as subject to the "Classpath" exception as provided
3191# by Oracle in the LICENSE file that accompanied this code.
3192#
3193# This code is distributed in the hope that it will be useful, but WITHOUT
3194# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3195# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3196# version 2 for more details (a copy is included in the LICENSE file that
3197# accompanied this code).
3198#
3199# You should have received a copy of the GNU General Public License version
3200# 2 along with this work; if not, write to the Free Software Foundation,
3201# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3202#
3203# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3204# or visit www.oracle.com if you need additional information or have any
3205# questions.
3206#
3207
3208# Execute the check given as argument, and verify the result
3209# If the Boot JDK was previously found, do nothing
3210# $1 A command line (typically autoconf macro) to execute
3211
3212
3213# Test: Is bootjdk explicitely set by command line arguments?
3214
3215
3216# Test: Is bootjdk available from builddeps?
3217
3218
3219# Test: Is $JAVA_HOME set?
3220
3221
3222# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3223
3224
3225# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3226
3227
3228# Look for a jdk in the given path. If there are multiple, try to select the newest.
3229# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3230# $1 = Path to directory containing jdk installations.
3231# $2 = String to append to the found JDK directory to get the proper JDK home
3232
3233
3234# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3235# environmental variable as base for where to look.
3236# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3237
3238
3239# Test: Is there a JDK installed in default, well-known locations?
3240
3241
3242# Check that a command-line tool in the Boot JDK is correct
3243# $1 = name of variable to assign
3244# $2 = name of binary
3245
3246
3247###############################################################################
3248#
3249# We need a Boot JDK to bootstrap the build.
3250#
3251
3252
3253
3254
3255
3256#
3257# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3258# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3259#
3260# This code is free software; you can redistribute it and/or modify it
3261# under the terms of the GNU General Public License version 2 only, as
3262# published by the Free Software Foundation.  Oracle designates this
3263# particular file as subject to the "Classpath" exception as provided
3264# by Oracle in the LICENSE file that accompanied this code.
3265#
3266# This code is distributed in the hope that it will be useful, but WITHOUT
3267# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3268# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3269# version 2 for more details (a copy is included in the LICENSE file that
3270# accompanied this code).
3271#
3272# You should have received a copy of the GNU General Public License version
3273# 2 along with this work; if not, write to the Free Software Foundation,
3274# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3275#
3276# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3277# or visit www.oracle.com if you need additional information or have any
3278# questions.
3279#
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298#
3299# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3300# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3301#
3302# This code is free software; you can redistribute it and/or modify it
3303# under the terms of the GNU General Public License version 2 only, as
3304# published by the Free Software Foundation.  Oracle designates this
3305# particular file as subject to the "Classpath" exception as provided
3306# by Oracle in the LICENSE file that accompanied this code.
3307#
3308# This code is distributed in the hope that it will be useful, but WITHOUT
3309# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3310# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3311# version 2 for more details (a copy is included in the LICENSE file that
3312# accompanied this code).
3313#
3314# You should have received a copy of the GNU General Public License version
3315# 2 along with this work; if not, write to the Free Software Foundation,
3316# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317#
3318# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3319# or visit www.oracle.com if you need additional information or have any
3320# questions.
3321#
3322
3323
3324
3325
3326
3327cygwin_help() {
3328    case $1 in
3329    unzip)
3330        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3331    zip)
3332        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3333    make)
3334        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3335    * )
3336       break ;;
3337    esac
3338}
3339
3340apt_help() {
3341    case $1 in
3342    devkit)
3343        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3344    openjdk)
3345        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3346    alsa)
3347        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3348    cups)
3349        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3350    freetype2)
3351        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3352    pulse)
3353        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3354    x11)
3355        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3356    ccache)
3357        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3358    * )
3359       break ;;
3360    esac
3361}
3362
3363yum_help() {
3364    case $1 in
3365    devkit)
3366        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3367    openjdk)
3368        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3369    alsa)
3370        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3371    cups)
3372        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3373    freetype2)
3374        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3375    pulse)
3376        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3377    x11)
3378        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3379    ccache)
3380        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3381    * )
3382       break ;;
3383    esac
3384}
3385
3386port_help() {
3387    PKGHANDLER_COMMAND=""
3388}
3389
3390pkgutil_help() {
3391    PKGHANDLER_COMMAND=""
3392}
3393
3394pkgadd_help() {
3395    PKGHANDLER_COMMAND=""
3396}
3397
3398
3399
3400#
3401# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3402# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3403#
3404# This code is free software; you can redistribute it and/or modify it
3405# under the terms of the GNU General Public License version 2 only, as
3406# published by the Free Software Foundation.  Oracle designates this
3407# particular file as subject to the "Classpath" exception as provided
3408# by Oracle in the LICENSE file that accompanied this code.
3409#
3410# This code is distributed in the hope that it will be useful, but WITHOUT
3411# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3412# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3413# version 2 for more details (a copy is included in the LICENSE file that
3414# accompanied this code).
3415#
3416# You should have received a copy of the GNU General Public License version
3417# 2 along with this work; if not, write to the Free Software Foundation,
3418# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3419#
3420# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3421# or visit www.oracle.com if you need additional information or have any
3422# questions.
3423#
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439# Support for customization of the build process. Some build files
3440# will include counterparts from this location, if they exist. This allows
3441# for a degree of customization of the build targets and the rules/recipes
3442# to create them
3443
3444# Check whether --with-custom-make-dir was given.
3445if test "${with_custom_make_dir+set}" = set; then :
3446  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3447fi
3448
3449
3450
3451#
3452# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3453# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3454#
3455# This code is free software; you can redistribute it and/or modify it
3456# under the terms of the GNU General Public License version 2 only, as
3457# published by the Free Software Foundation.  Oracle designates this
3458# particular file as subject to the "Classpath" exception as provided
3459# by Oracle in the LICENSE file that accompanied this code.
3460#
3461# This code is distributed in the hope that it will be useful, but WITHOUT
3462# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3463# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3464# version 2 for more details (a copy is included in the LICENSE file that
3465# accompanied this code).
3466#
3467# You should have received a copy of the GNU General Public License version
3468# 2 along with this work; if not, write to the Free Software Foundation,
3469# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3470#
3471# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3472# or visit www.oracle.com if you need additional information or have any
3473# questions.
3474#
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490#
3491# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3492# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3493#
3494# This code is free software; you can redistribute it and/or modify it
3495# under the terms of the GNU General Public License version 2 only, as
3496# published by the Free Software Foundation.  Oracle designates this
3497# particular file as subject to the "Classpath" exception as provided
3498# by Oracle in the LICENSE file that accompanied this code.
3499#
3500# This code is distributed in the hope that it will be useful, but WITHOUT
3501# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3502# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3503# version 2 for more details (a copy is included in the LICENSE file that
3504# accompanied this code).
3505#
3506# You should have received a copy of the GNU General Public License version
3507# 2 along with this work; if not, write to the Free Software Foundation,
3508# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3509#
3510# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3511# or visit www.oracle.com if you need additional information or have any
3512# questions.
3513#
3514
3515# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3516# Converts autoconf style CPU name to OpenJDK style, into
3517# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3518
3519
3520# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3521# Converts autoconf style OS name to OpenJDK style, into
3522# VAR_OS and VAR_OS_API.
3523
3524
3525# Expects $host_os $host_cpu $build_os and $build_cpu
3526# and $with_target_bits to have been setup!
3527#
3528# Translate the standard triplet(quadruplet) definition
3529# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3530# OPENJDK_BUILD_OS, etc.
3531
3532
3533# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3534# accordingly. Must be done after setting up build and target system, but before
3535# doing anything else with these values.
3536
3537
3538    # Setup the legacy variables, for controlling the old makefiles.
3539    #
3540
3541
3542
3543
3544#%%% Build and target systems %%%
3545
3546
3547
3548
3549# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3550# Add -mX to various FLAGS variables.
3551
3552
3553
3554
3555
3556
3557#
3558# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3559# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3560#
3561# This code is free software; you can redistribute it and/or modify it
3562# under the terms of the GNU General Public License version 2 only, as
3563# published by the Free Software Foundation.  Oracle designates this
3564# particular file as subject to the "Classpath" exception as provided
3565# by Oracle in the LICENSE file that accompanied this code.
3566#
3567# This code is distributed in the hope that it will be useful, but WITHOUT
3568# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3569# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3570# version 2 for more details (a copy is included in the LICENSE file that
3571# accompanied this code).
3572#
3573# You should have received a copy of the GNU General Public License version
3574# 2 along with this work; if not, write to the Free Software Foundation,
3575# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3576#
3577# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3578# or visit www.oracle.com if you need additional information or have any
3579# questions.
3580#
3581
3582
3583
3584
3585
3586
3587
3588
3589#
3590# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3591# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3592#
3593# This code is free software; you can redistribute it and/or modify it
3594# under the terms of the GNU General Public License version 2 only, as
3595# published by the Free Software Foundation.  Oracle designates this
3596# particular file as subject to the "Classpath" exception as provided
3597# by Oracle in the LICENSE file that accompanied this code.
3598#
3599# This code is distributed in the hope that it will be useful, but WITHOUT
3600# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3601# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3602# version 2 for more details (a copy is included in the LICENSE file that
3603# accompanied this code).
3604#
3605# You should have received a copy of the GNU General Public License version
3606# 2 along with this work; if not, write to the Free Software Foundation,
3607# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3608#
3609# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3610# or visit www.oracle.com if you need additional information or have any
3611# questions.
3612#
3613
3614# $1 = compiler to test (CC or CXX)
3615# $2 = human readable name of compiler (C or C++)
3616
3617
3618
3619
3620
3621# $1 = compiler to test (CC or CXX)
3622# $2 = human readable name of compiler (C or C++)
3623# $3 = list of compiler names to search for
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636#
3637# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3638# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3639#
3640# This code is free software; you can redistribute it and/or modify it
3641# under the terms of the GNU General Public License version 2 only, as
3642# published by the Free Software Foundation.  Oracle designates this
3643# particular file as subject to the "Classpath" exception as provided
3644# by Oracle in the LICENSE file that accompanied this code.
3645#
3646# This code is distributed in the hope that it will be useful, but WITHOUT
3647# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3648# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3649# version 2 for more details (a copy is included in the LICENSE file that
3650# accompanied this code).
3651#
3652# You should have received a copy of the GNU General Public License version
3653# 2 along with this work; if not, write to the Free Software Foundation,
3654# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3655#
3656# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3657# or visit www.oracle.com if you need additional information or have any
3658# questions.
3659#
3660
3661
3662
3663
3664
3665
3666
3667# Check if the VS env variables were setup prior to running configure.
3668# If not, then find vcvarsall.bat and run it automatically, and integrate
3669# the set env variables into the spec file.
3670
3671
3672
3673
3674
3675
3676# This line needs to be here, verbatim, after all includes and the dummy hook
3677# definitions. It is replaced with custom functionality when building
3678# custom sources.
3679#CUSTOM_AUTOCONF_INCLUDE
3680
3681# Do not change or remove the following line, it is needed for consistency checks:
3682DATE_WHEN_GENERATED=1356865941
3683
3684###############################################################################
3685#
3686# Initialization / Boot-strapping
3687#
3688# The bootstrapping process needs to solve the "chicken or the egg" problem,
3689# thus it jumps back and forth, each time gaining something needed later on.
3690#
3691###############################################################################
3692
3693# Basic initialization that must happen first of all
3694
3695# Save the original command line. This is passed to us by the wrapper configure script.
3696
3697DATE_WHEN_CONFIGURED=`LANG=C date`
3698
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3700$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3701{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3702$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3703
3704
3705
3706# Start with tools that do not need have cross compilation support
3707# and can be expected to be found in the default PATH. These tools are
3708# used by configure. Nor are these tools expected to be found in the
3709# devkit from the builddeps server either, since they are
3710# needed to download the devkit.
3711
3712# First are all the simple required tools.
3713
3714    for ac_prog in basename
3715do
3716  # Extract the first word of "$ac_prog", so it can be a program name with args.
3717set dummy $ac_prog; ac_word=$2
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
3720if test "${ac_cv_path_BASENAME+set}" = set; then :
3721  $as_echo_n "(cached) " >&6
3722else
3723  case $BASENAME in
3724  [\\/]* | ?:[\\/]*)
3725  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3726  ;;
3727  *)
3728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731  IFS=$as_save_IFS
3732  test -z "$as_dir" && as_dir=.
3733    for ac_exec_ext in '' $ac_executable_extensions; do
3734  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3735    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3737    break 2
3738  fi
3739done
3740  done
3741IFS=$as_save_IFS
3742
3743  ;;
3744esac
3745fi
3746BASENAME=$ac_cv_path_BASENAME
3747if test -n "$BASENAME"; then
3748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3749$as_echo "$BASENAME" >&6; }
3750else
3751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3752$as_echo "no" >&6; }
3753fi
3754
3755
3756  test -n "$BASENAME" && break
3757done
3758
3759
3760    if test "x$BASENAME" = x; then
3761        if test "xbasename" = x; then
3762          PROG_NAME=basename
3763        else
3764          PROG_NAME=basename
3765        fi
3766        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3767$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3768        as_fn_error $? "Cannot continue" "$LINENO" 5
3769    fi
3770
3771
3772
3773    for ac_prog in bash
3774do
3775  # Extract the first word of "$ac_prog", so it can be a program name with args.
3776set dummy $ac_prog; ac_word=$2
3777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
3779if test "${ac_cv_path_BASH+set}" = set; then :
3780  $as_echo_n "(cached) " >&6
3781else
3782  case $BASH in
3783  [\\/]* | ?:[\\/]*)
3784  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3785  ;;
3786  *)
3787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3788for as_dir in $PATH
3789do
3790  IFS=$as_save_IFS
3791  test -z "$as_dir" && as_dir=.
3792    for ac_exec_ext in '' $ac_executable_extensions; do
3793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3794    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3796    break 2
3797  fi
3798done
3799  done
3800IFS=$as_save_IFS
3801
3802  ;;
3803esac
3804fi
3805BASH=$ac_cv_path_BASH
3806if test -n "$BASH"; then
3807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3808$as_echo "$BASH" >&6; }
3809else
3810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3811$as_echo "no" >&6; }
3812fi
3813
3814
3815  test -n "$BASH" && break
3816done
3817
3818
3819    if test "x$BASH" = x; then
3820        if test "xbash" = x; then
3821          PROG_NAME=bash
3822        else
3823          PROG_NAME=bash
3824        fi
3825        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3826$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3827        as_fn_error $? "Cannot continue" "$LINENO" 5
3828    fi
3829
3830
3831
3832    for ac_prog in cat
3833do
3834  # Extract the first word of "$ac_prog", so it can be a program name with args.
3835set dummy $ac_prog; ac_word=$2
3836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837$as_echo_n "checking for $ac_word... " >&6; }
3838if test "${ac_cv_path_CAT+set}" = set; then :
3839  $as_echo_n "(cached) " >&6
3840else
3841  case $CAT in
3842  [\\/]* | ?:[\\/]*)
3843  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3844  ;;
3845  *)
3846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3847for as_dir in $PATH
3848do
3849  IFS=$as_save_IFS
3850  test -z "$as_dir" && as_dir=.
3851    for ac_exec_ext in '' $ac_executable_extensions; do
3852  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3853    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3855    break 2
3856  fi
3857done
3858  done
3859IFS=$as_save_IFS
3860
3861  ;;
3862esac
3863fi
3864CAT=$ac_cv_path_CAT
3865if test -n "$CAT"; then
3866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3867$as_echo "$CAT" >&6; }
3868else
3869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870$as_echo "no" >&6; }
3871fi
3872
3873
3874  test -n "$CAT" && break
3875done
3876
3877
3878    if test "x$CAT" = x; then
3879        if test "xcat" = x; then
3880          PROG_NAME=cat
3881        else
3882          PROG_NAME=cat
3883        fi
3884        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3885$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3886        as_fn_error $? "Cannot continue" "$LINENO" 5
3887    fi
3888
3889
3890
3891    for ac_prog in chmod
3892do
3893  # Extract the first word of "$ac_prog", so it can be a program name with args.
3894set dummy $ac_prog; ac_word=$2
3895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3896$as_echo_n "checking for $ac_word... " >&6; }
3897if test "${ac_cv_path_CHMOD+set}" = set; then :
3898  $as_echo_n "(cached) " >&6
3899else
3900  case $CHMOD in
3901  [\\/]* | ?:[\\/]*)
3902  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3903  ;;
3904  *)
3905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3906for as_dir in $PATH
3907do
3908  IFS=$as_save_IFS
3909  test -z "$as_dir" && as_dir=.
3910    for ac_exec_ext in '' $ac_executable_extensions; do
3911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3912    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3914    break 2
3915  fi
3916done
3917  done
3918IFS=$as_save_IFS
3919
3920  ;;
3921esac
3922fi
3923CHMOD=$ac_cv_path_CHMOD
3924if test -n "$CHMOD"; then
3925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3926$as_echo "$CHMOD" >&6; }
3927else
3928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3929$as_echo "no" >&6; }
3930fi
3931
3932
3933  test -n "$CHMOD" && break
3934done
3935
3936
3937    if test "x$CHMOD" = x; then
3938        if test "xchmod" = x; then
3939          PROG_NAME=chmod
3940        else
3941          PROG_NAME=chmod
3942        fi
3943        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3944$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3945        as_fn_error $? "Cannot continue" "$LINENO" 5
3946    fi
3947
3948
3949
3950    for ac_prog in cmp
3951do
3952  # Extract the first word of "$ac_prog", so it can be a program name with args.
3953set dummy $ac_prog; ac_word=$2
3954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3955$as_echo_n "checking for $ac_word... " >&6; }
3956if test "${ac_cv_path_CMP+set}" = set; then :
3957  $as_echo_n "(cached) " >&6
3958else
3959  case $CMP in
3960  [\\/]* | ?:[\\/]*)
3961  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3962  ;;
3963  *)
3964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3965for as_dir in $PATH
3966do
3967  IFS=$as_save_IFS
3968  test -z "$as_dir" && as_dir=.
3969    for ac_exec_ext in '' $ac_executable_extensions; do
3970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3971    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3973    break 2
3974  fi
3975done
3976  done
3977IFS=$as_save_IFS
3978
3979  ;;
3980esac
3981fi
3982CMP=$ac_cv_path_CMP
3983if test -n "$CMP"; then
3984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3985$as_echo "$CMP" >&6; }
3986else
3987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3988$as_echo "no" >&6; }
3989fi
3990
3991
3992  test -n "$CMP" && break
3993done
3994
3995
3996    if test "x$CMP" = x; then
3997        if test "xcmp" = x; then
3998          PROG_NAME=cmp
3999        else
4000          PROG_NAME=cmp
4001        fi
4002        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4003$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4004        as_fn_error $? "Cannot continue" "$LINENO" 5
4005    fi
4006
4007
4008
4009    for ac_prog in cp
4010do
4011  # Extract the first word of "$ac_prog", so it can be a program name with args.
4012set dummy $ac_prog; ac_word=$2
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4014$as_echo_n "checking for $ac_word... " >&6; }
4015if test "${ac_cv_path_CP+set}" = set; then :
4016  $as_echo_n "(cached) " >&6
4017else
4018  case $CP in
4019  [\\/]* | ?:[\\/]*)
4020  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4021  ;;
4022  *)
4023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4024for as_dir in $PATH
4025do
4026  IFS=$as_save_IFS
4027  test -z "$as_dir" && as_dir=.
4028    for ac_exec_ext in '' $ac_executable_extensions; do
4029  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4030    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4032    break 2
4033  fi
4034done
4035  done
4036IFS=$as_save_IFS
4037
4038  ;;
4039esac
4040fi
4041CP=$ac_cv_path_CP
4042if test -n "$CP"; then
4043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4044$as_echo "$CP" >&6; }
4045else
4046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4047$as_echo "no" >&6; }
4048fi
4049
4050
4051  test -n "$CP" && break
4052done
4053
4054
4055    if test "x$CP" = x; then
4056        if test "xcp" = x; then
4057          PROG_NAME=cp
4058        else
4059          PROG_NAME=cp
4060        fi
4061        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4062$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4063        as_fn_error $? "Cannot continue" "$LINENO" 5
4064    fi
4065
4066
4067
4068    for ac_prog in cut
4069do
4070  # Extract the first word of "$ac_prog", so it can be a program name with args.
4071set dummy $ac_prog; ac_word=$2
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4073$as_echo_n "checking for $ac_word... " >&6; }
4074if test "${ac_cv_path_CUT+set}" = set; then :
4075  $as_echo_n "(cached) " >&6
4076else
4077  case $CUT in
4078  [\\/]* | ?:[\\/]*)
4079  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4080  ;;
4081  *)
4082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4083for as_dir in $PATH
4084do
4085  IFS=$as_save_IFS
4086  test -z "$as_dir" && as_dir=.
4087    for ac_exec_ext in '' $ac_executable_extensions; do
4088  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4089    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4091    break 2
4092  fi
4093done
4094  done
4095IFS=$as_save_IFS
4096
4097  ;;
4098esac
4099fi
4100CUT=$ac_cv_path_CUT
4101if test -n "$CUT"; then
4102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4103$as_echo "$CUT" >&6; }
4104else
4105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4106$as_echo "no" >&6; }
4107fi
4108
4109
4110  test -n "$CUT" && break
4111done
4112
4113
4114    if test "x$CUT" = x; then
4115        if test "xcut" = x; then
4116          PROG_NAME=cut
4117        else
4118          PROG_NAME=cut
4119        fi
4120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4121$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4122        as_fn_error $? "Cannot continue" "$LINENO" 5
4123    fi
4124
4125
4126
4127    for ac_prog in date
4128do
4129  # Extract the first word of "$ac_prog", so it can be a program name with args.
4130set dummy $ac_prog; ac_word=$2
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4132$as_echo_n "checking for $ac_word... " >&6; }
4133if test "${ac_cv_path_DATE+set}" = set; then :
4134  $as_echo_n "(cached) " >&6
4135else
4136  case $DATE in
4137  [\\/]* | ?:[\\/]*)
4138  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4139  ;;
4140  *)
4141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4142for as_dir in $PATH
4143do
4144  IFS=$as_save_IFS
4145  test -z "$as_dir" && as_dir=.
4146    for ac_exec_ext in '' $ac_executable_extensions; do
4147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4148    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4150    break 2
4151  fi
4152done
4153  done
4154IFS=$as_save_IFS
4155
4156  ;;
4157esac
4158fi
4159DATE=$ac_cv_path_DATE
4160if test -n "$DATE"; then
4161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4162$as_echo "$DATE" >&6; }
4163else
4164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4165$as_echo "no" >&6; }
4166fi
4167
4168
4169  test -n "$DATE" && break
4170done
4171
4172
4173    if test "x$DATE" = x; then
4174        if test "xdate" = x; then
4175          PROG_NAME=date
4176        else
4177          PROG_NAME=date
4178        fi
4179        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4180$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4181        as_fn_error $? "Cannot continue" "$LINENO" 5
4182    fi
4183
4184
4185
4186    for ac_prog in gdiff diff
4187do
4188  # Extract the first word of "$ac_prog", so it can be a program name with args.
4189set dummy $ac_prog; ac_word=$2
4190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4191$as_echo_n "checking for $ac_word... " >&6; }
4192if test "${ac_cv_path_DIFF+set}" = set; then :
4193  $as_echo_n "(cached) " >&6
4194else
4195  case $DIFF in
4196  [\\/]* | ?:[\\/]*)
4197  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4198  ;;
4199  *)
4200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4201for as_dir in $PATH
4202do
4203  IFS=$as_save_IFS
4204  test -z "$as_dir" && as_dir=.
4205    for ac_exec_ext in '' $ac_executable_extensions; do
4206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4207    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4209    break 2
4210  fi
4211done
4212  done
4213IFS=$as_save_IFS
4214
4215  ;;
4216esac
4217fi
4218DIFF=$ac_cv_path_DIFF
4219if test -n "$DIFF"; then
4220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4221$as_echo "$DIFF" >&6; }
4222else
4223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4224$as_echo "no" >&6; }
4225fi
4226
4227
4228  test -n "$DIFF" && break
4229done
4230
4231
4232    if test "x$DIFF" = x; then
4233        if test "xgdiff diff" = x; then
4234          PROG_NAME=diff
4235        else
4236          PROG_NAME=gdiff diff
4237        fi
4238        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4239$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4240        as_fn_error $? "Cannot continue" "$LINENO" 5
4241    fi
4242
4243
4244
4245    for ac_prog in dirname
4246do
4247  # Extract the first word of "$ac_prog", so it can be a program name with args.
4248set dummy $ac_prog; ac_word=$2
4249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4250$as_echo_n "checking for $ac_word... " >&6; }
4251if test "${ac_cv_path_DIRNAME+set}" = set; then :
4252  $as_echo_n "(cached) " >&6
4253else
4254  case $DIRNAME in
4255  [\\/]* | ?:[\\/]*)
4256  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4257  ;;
4258  *)
4259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260for as_dir in $PATH
4261do
4262  IFS=$as_save_IFS
4263  test -z "$as_dir" && as_dir=.
4264    for ac_exec_ext in '' $ac_executable_extensions; do
4265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4266    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4268    break 2
4269  fi
4270done
4271  done
4272IFS=$as_save_IFS
4273
4274  ;;
4275esac
4276fi
4277DIRNAME=$ac_cv_path_DIRNAME
4278if test -n "$DIRNAME"; then
4279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4280$as_echo "$DIRNAME" >&6; }
4281else
4282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4283$as_echo "no" >&6; }
4284fi
4285
4286
4287  test -n "$DIRNAME" && break
4288done
4289
4290
4291    if test "x$DIRNAME" = x; then
4292        if test "xdirname" = x; then
4293          PROG_NAME=dirname
4294        else
4295          PROG_NAME=dirname
4296        fi
4297        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4298$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4299        as_fn_error $? "Cannot continue" "$LINENO" 5
4300    fi
4301
4302
4303
4304    for ac_prog in echo
4305do
4306  # Extract the first word of "$ac_prog", so it can be a program name with args.
4307set dummy $ac_prog; ac_word=$2
4308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4309$as_echo_n "checking for $ac_word... " >&6; }
4310if test "${ac_cv_path_ECHO+set}" = set; then :
4311  $as_echo_n "(cached) " >&6
4312else
4313  case $ECHO in
4314  [\\/]* | ?:[\\/]*)
4315  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4316  ;;
4317  *)
4318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319for as_dir in $PATH
4320do
4321  IFS=$as_save_IFS
4322  test -z "$as_dir" && as_dir=.
4323    for ac_exec_ext in '' $ac_executable_extensions; do
4324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4325    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4327    break 2
4328  fi
4329done
4330  done
4331IFS=$as_save_IFS
4332
4333  ;;
4334esac
4335fi
4336ECHO=$ac_cv_path_ECHO
4337if test -n "$ECHO"; then
4338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4339$as_echo "$ECHO" >&6; }
4340else
4341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4342$as_echo "no" >&6; }
4343fi
4344
4345
4346  test -n "$ECHO" && break
4347done
4348
4349
4350    if test "x$ECHO" = x; then
4351        if test "xecho" = x; then
4352          PROG_NAME=echo
4353        else
4354          PROG_NAME=echo
4355        fi
4356        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4357$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4358        as_fn_error $? "Cannot continue" "$LINENO" 5
4359    fi
4360
4361
4362
4363    for ac_prog in expr
4364do
4365  # Extract the first word of "$ac_prog", so it can be a program name with args.
4366set dummy $ac_prog; ac_word=$2
4367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4368$as_echo_n "checking for $ac_word... " >&6; }
4369if test "${ac_cv_path_EXPR+set}" = set; then :
4370  $as_echo_n "(cached) " >&6
4371else
4372  case $EXPR in
4373  [\\/]* | ?:[\\/]*)
4374  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4375  ;;
4376  *)
4377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4378for as_dir in $PATH
4379do
4380  IFS=$as_save_IFS
4381  test -z "$as_dir" && as_dir=.
4382    for ac_exec_ext in '' $ac_executable_extensions; do
4383  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4384    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4386    break 2
4387  fi
4388done
4389  done
4390IFS=$as_save_IFS
4391
4392  ;;
4393esac
4394fi
4395EXPR=$ac_cv_path_EXPR
4396if test -n "$EXPR"; then
4397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4398$as_echo "$EXPR" >&6; }
4399else
4400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4401$as_echo "no" >&6; }
4402fi
4403
4404
4405  test -n "$EXPR" && break
4406done
4407
4408
4409    if test "x$EXPR" = x; then
4410        if test "xexpr" = x; then
4411          PROG_NAME=expr
4412        else
4413          PROG_NAME=expr
4414        fi
4415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4416$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4417        as_fn_error $? "Cannot continue" "$LINENO" 5
4418    fi
4419
4420
4421
4422    for ac_prog in file
4423do
4424  # Extract the first word of "$ac_prog", so it can be a program name with args.
4425set dummy $ac_prog; ac_word=$2
4426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4427$as_echo_n "checking for $ac_word... " >&6; }
4428if test "${ac_cv_path_FILE+set}" = set; then :
4429  $as_echo_n "(cached) " >&6
4430else
4431  case $FILE in
4432  [\\/]* | ?:[\\/]*)
4433  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4434  ;;
4435  *)
4436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4437for as_dir in $PATH
4438do
4439  IFS=$as_save_IFS
4440  test -z "$as_dir" && as_dir=.
4441    for ac_exec_ext in '' $ac_executable_extensions; do
4442  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4443    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4445    break 2
4446  fi
4447done
4448  done
4449IFS=$as_save_IFS
4450
4451  ;;
4452esac
4453fi
4454FILE=$ac_cv_path_FILE
4455if test -n "$FILE"; then
4456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4457$as_echo "$FILE" >&6; }
4458else
4459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4460$as_echo "no" >&6; }
4461fi
4462
4463
4464  test -n "$FILE" && break
4465done
4466
4467
4468    if test "x$FILE" = x; then
4469        if test "xfile" = x; then
4470          PROG_NAME=file
4471        else
4472          PROG_NAME=file
4473        fi
4474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4475$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4476        as_fn_error $? "Cannot continue" "$LINENO" 5
4477    fi
4478
4479
4480
4481    for ac_prog in find
4482do
4483  # Extract the first word of "$ac_prog", so it can be a program name with args.
4484set dummy $ac_prog; ac_word=$2
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486$as_echo_n "checking for $ac_word... " >&6; }
4487if test "${ac_cv_path_FIND+set}" = set; then :
4488  $as_echo_n "(cached) " >&6
4489else
4490  case $FIND in
4491  [\\/]* | ?:[\\/]*)
4492  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4493  ;;
4494  *)
4495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in $PATH
4497do
4498  IFS=$as_save_IFS
4499  test -z "$as_dir" && as_dir=.
4500    for ac_exec_ext in '' $ac_executable_extensions; do
4501  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4502    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4504    break 2
4505  fi
4506done
4507  done
4508IFS=$as_save_IFS
4509
4510  ;;
4511esac
4512fi
4513FIND=$ac_cv_path_FIND
4514if test -n "$FIND"; then
4515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4516$as_echo "$FIND" >&6; }
4517else
4518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519$as_echo "no" >&6; }
4520fi
4521
4522
4523  test -n "$FIND" && break
4524done
4525
4526
4527    if test "x$FIND" = x; then
4528        if test "xfind" = x; then
4529          PROG_NAME=find
4530        else
4531          PROG_NAME=find
4532        fi
4533        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4534$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4535        as_fn_error $? "Cannot continue" "$LINENO" 5
4536    fi
4537
4538
4539
4540    for ac_prog in head
4541do
4542  # Extract the first word of "$ac_prog", so it can be a program name with args.
4543set dummy $ac_prog; ac_word=$2
4544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4545$as_echo_n "checking for $ac_word... " >&6; }
4546if test "${ac_cv_path_HEAD+set}" = set; then :
4547  $as_echo_n "(cached) " >&6
4548else
4549  case $HEAD in
4550  [\\/]* | ?:[\\/]*)
4551  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4552  ;;
4553  *)
4554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in $PATH
4556do
4557  IFS=$as_save_IFS
4558  test -z "$as_dir" && as_dir=.
4559    for ac_exec_ext in '' $ac_executable_extensions; do
4560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4561    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4563    break 2
4564  fi
4565done
4566  done
4567IFS=$as_save_IFS
4568
4569  ;;
4570esac
4571fi
4572HEAD=$ac_cv_path_HEAD
4573if test -n "$HEAD"; then
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4575$as_echo "$HEAD" >&6; }
4576else
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4578$as_echo "no" >&6; }
4579fi
4580
4581
4582  test -n "$HEAD" && break
4583done
4584
4585
4586    if test "x$HEAD" = x; then
4587        if test "xhead" = x; then
4588          PROG_NAME=head
4589        else
4590          PROG_NAME=head
4591        fi
4592        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4593$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4594        as_fn_error $? "Cannot continue" "$LINENO" 5
4595    fi
4596
4597
4598
4599    for ac_prog in ln
4600do
4601  # Extract the first word of "$ac_prog", so it can be a program name with args.
4602set dummy $ac_prog; ac_word=$2
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4604$as_echo_n "checking for $ac_word... " >&6; }
4605if test "${ac_cv_path_LN+set}" = set; then :
4606  $as_echo_n "(cached) " >&6
4607else
4608  case $LN in
4609  [\\/]* | ?:[\\/]*)
4610  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4611  ;;
4612  *)
4613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4614for as_dir in $PATH
4615do
4616  IFS=$as_save_IFS
4617  test -z "$as_dir" && as_dir=.
4618    for ac_exec_ext in '' $ac_executable_extensions; do
4619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4620    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4622    break 2
4623  fi
4624done
4625  done
4626IFS=$as_save_IFS
4627
4628  ;;
4629esac
4630fi
4631LN=$ac_cv_path_LN
4632if test -n "$LN"; then
4633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4634$as_echo "$LN" >&6; }
4635else
4636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4637$as_echo "no" >&6; }
4638fi
4639
4640
4641  test -n "$LN" && break
4642done
4643
4644
4645    if test "x$LN" = x; then
4646        if test "xln" = x; then
4647          PROG_NAME=ln
4648        else
4649          PROG_NAME=ln
4650        fi
4651        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4652$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4653        as_fn_error $? "Cannot continue" "$LINENO" 5
4654    fi
4655
4656
4657
4658    for ac_prog in ls
4659do
4660  # Extract the first word of "$ac_prog", so it can be a program name with args.
4661set dummy $ac_prog; ac_word=$2
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
4664if test "${ac_cv_path_LS+set}" = set; then :
4665  $as_echo_n "(cached) " >&6
4666else
4667  case $LS in
4668  [\\/]* | ?:[\\/]*)
4669  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4670  ;;
4671  *)
4672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in $PATH
4674do
4675  IFS=$as_save_IFS
4676  test -z "$as_dir" && as_dir=.
4677    for ac_exec_ext in '' $ac_executable_extensions; do
4678  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4679    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681    break 2
4682  fi
4683done
4684  done
4685IFS=$as_save_IFS
4686
4687  ;;
4688esac
4689fi
4690LS=$ac_cv_path_LS
4691if test -n "$LS"; then
4692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4693$as_echo "$LS" >&6; }
4694else
4695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699
4700  test -n "$LS" && break
4701done
4702
4703
4704    if test "x$LS" = x; then
4705        if test "xls" = x; then
4706          PROG_NAME=ls
4707        else
4708          PROG_NAME=ls
4709        fi
4710        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4711$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4712        as_fn_error $? "Cannot continue" "$LINENO" 5
4713    fi
4714
4715
4716
4717    for ac_prog in mkdir
4718do
4719  # Extract the first word of "$ac_prog", so it can be a program name with args.
4720set dummy $ac_prog; ac_word=$2
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
4723if test "${ac_cv_path_MKDIR+set}" = set; then :
4724  $as_echo_n "(cached) " >&6
4725else
4726  case $MKDIR in
4727  [\\/]* | ?:[\\/]*)
4728  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4729  ;;
4730  *)
4731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in $PATH
4733do
4734  IFS=$as_save_IFS
4735  test -z "$as_dir" && as_dir=.
4736    for ac_exec_ext in '' $ac_executable_extensions; do
4737  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4738    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4740    break 2
4741  fi
4742done
4743  done
4744IFS=$as_save_IFS
4745
4746  ;;
4747esac
4748fi
4749MKDIR=$ac_cv_path_MKDIR
4750if test -n "$MKDIR"; then
4751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4752$as_echo "$MKDIR" >&6; }
4753else
4754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
4756fi
4757
4758
4759  test -n "$MKDIR" && break
4760done
4761
4762
4763    if test "x$MKDIR" = x; then
4764        if test "xmkdir" = x; then
4765          PROG_NAME=mkdir
4766        else
4767          PROG_NAME=mkdir
4768        fi
4769        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4770$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4771        as_fn_error $? "Cannot continue" "$LINENO" 5
4772    fi
4773
4774
4775
4776    for ac_prog in mktemp
4777do
4778  # Extract the first word of "$ac_prog", so it can be a program name with args.
4779set dummy $ac_prog; ac_word=$2
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4781$as_echo_n "checking for $ac_word... " >&6; }
4782if test "${ac_cv_path_MKTEMP+set}" = set; then :
4783  $as_echo_n "(cached) " >&6
4784else
4785  case $MKTEMP in
4786  [\\/]* | ?:[\\/]*)
4787  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4788  ;;
4789  *)
4790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4791for as_dir in $PATH
4792do
4793  IFS=$as_save_IFS
4794  test -z "$as_dir" && as_dir=.
4795    for ac_exec_ext in '' $ac_executable_extensions; do
4796  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4797    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4799    break 2
4800  fi
4801done
4802  done
4803IFS=$as_save_IFS
4804
4805  ;;
4806esac
4807fi
4808MKTEMP=$ac_cv_path_MKTEMP
4809if test -n "$MKTEMP"; then
4810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4811$as_echo "$MKTEMP" >&6; }
4812else
4813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
4815fi
4816
4817
4818  test -n "$MKTEMP" && break
4819done
4820
4821
4822    if test "x$MKTEMP" = x; then
4823        if test "xmktemp" = x; then
4824          PROG_NAME=mktemp
4825        else
4826          PROG_NAME=mktemp
4827        fi
4828        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4829$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4830        as_fn_error $? "Cannot continue" "$LINENO" 5
4831    fi
4832
4833
4834
4835    for ac_prog in mv
4836do
4837  # Extract the first word of "$ac_prog", so it can be a program name with args.
4838set dummy $ac_prog; ac_word=$2
4839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
4841if test "${ac_cv_path_MV+set}" = set; then :
4842  $as_echo_n "(cached) " >&6
4843else
4844  case $MV in
4845  [\\/]* | ?:[\\/]*)
4846  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4847  ;;
4848  *)
4849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in $PATH
4851do
4852  IFS=$as_save_IFS
4853  test -z "$as_dir" && as_dir=.
4854    for ac_exec_ext in '' $ac_executable_extensions; do
4855  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4856    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858    break 2
4859  fi
4860done
4861  done
4862IFS=$as_save_IFS
4863
4864  ;;
4865esac
4866fi
4867MV=$ac_cv_path_MV
4868if test -n "$MV"; then
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4870$as_echo "$MV" >&6; }
4871else
4872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875
4876
4877  test -n "$MV" && break
4878done
4879
4880
4881    if test "x$MV" = x; then
4882        if test "xmv" = x; then
4883          PROG_NAME=mv
4884        else
4885          PROG_NAME=mv
4886        fi
4887        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4888$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4889        as_fn_error $? "Cannot continue" "$LINENO" 5
4890    fi
4891
4892
4893
4894    for ac_prog in printf
4895do
4896  # Extract the first word of "$ac_prog", so it can be a program name with args.
4897set dummy $ac_prog; ac_word=$2
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899$as_echo_n "checking for $ac_word... " >&6; }
4900if test "${ac_cv_path_PRINTF+set}" = set; then :
4901  $as_echo_n "(cached) " >&6
4902else
4903  case $PRINTF in
4904  [\\/]* | ?:[\\/]*)
4905  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4906  ;;
4907  *)
4908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in $PATH
4910do
4911  IFS=$as_save_IFS
4912  test -z "$as_dir" && as_dir=.
4913    for ac_exec_ext in '' $ac_executable_extensions; do
4914  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4915    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917    break 2
4918  fi
4919done
4920  done
4921IFS=$as_save_IFS
4922
4923  ;;
4924esac
4925fi
4926PRINTF=$ac_cv_path_PRINTF
4927if test -n "$PRINTF"; then
4928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4929$as_echo "$PRINTF" >&6; }
4930else
4931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932$as_echo "no" >&6; }
4933fi
4934
4935
4936  test -n "$PRINTF" && break
4937done
4938
4939
4940    if test "x$PRINTF" = x; then
4941        if test "xprintf" = x; then
4942          PROG_NAME=printf
4943        else
4944          PROG_NAME=printf
4945        fi
4946        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4947$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4948        as_fn_error $? "Cannot continue" "$LINENO" 5
4949    fi
4950
4951
4952
4953    for ac_prog in pwd
4954do
4955  # Extract the first word of "$ac_prog", so it can be a program name with args.
4956set dummy $ac_prog; ac_word=$2
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4958$as_echo_n "checking for $ac_word... " >&6; }
4959if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4960  $as_echo_n "(cached) " >&6
4961else
4962  case $THEPWDCMD in
4963  [\\/]* | ?:[\\/]*)
4964  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4965  ;;
4966  *)
4967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in $PATH
4969do
4970  IFS=$as_save_IFS
4971  test -z "$as_dir" && as_dir=.
4972    for ac_exec_ext in '' $ac_executable_extensions; do
4973  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4974    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976    break 2
4977  fi
4978done
4979  done
4980IFS=$as_save_IFS
4981
4982  ;;
4983esac
4984fi
4985THEPWDCMD=$ac_cv_path_THEPWDCMD
4986if test -n "$THEPWDCMD"; then
4987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4988$as_echo "$THEPWDCMD" >&6; }
4989else
4990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991$as_echo "no" >&6; }
4992fi
4993
4994
4995  test -n "$THEPWDCMD" && break
4996done
4997
4998
4999    if test "x$THEPWDCMD" = x; then
5000        if test "xpwd" = x; then
5001          PROG_NAME=thepwdcmd
5002        else
5003          PROG_NAME=pwd
5004        fi
5005        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5006$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5007        as_fn_error $? "Cannot continue" "$LINENO" 5
5008    fi
5009
5010
5011
5012    for ac_prog in rm
5013do
5014  # Extract the first word of "$ac_prog", so it can be a program name with args.
5015set dummy $ac_prog; ac_word=$2
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5017$as_echo_n "checking for $ac_word... " >&6; }
5018if test "${ac_cv_path_RM+set}" = set; then :
5019  $as_echo_n "(cached) " >&6
5020else
5021  case $RM in
5022  [\\/]* | ?:[\\/]*)
5023  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5024  ;;
5025  *)
5026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027for as_dir in $PATH
5028do
5029  IFS=$as_save_IFS
5030  test -z "$as_dir" && as_dir=.
5031    for ac_exec_ext in '' $ac_executable_extensions; do
5032  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5033    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5035    break 2
5036  fi
5037done
5038  done
5039IFS=$as_save_IFS
5040
5041  ;;
5042esac
5043fi
5044RM=$ac_cv_path_RM
5045if test -n "$RM"; then
5046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5047$as_echo "$RM" >&6; }
5048else
5049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050$as_echo "no" >&6; }
5051fi
5052
5053
5054  test -n "$RM" && break
5055done
5056
5057
5058    if test "x$RM" = x; then
5059        if test "xrm" = x; then
5060          PROG_NAME=rm
5061        else
5062          PROG_NAME=rm
5063        fi
5064        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5065$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5066        as_fn_error $? "Cannot continue" "$LINENO" 5
5067    fi
5068
5069
5070
5071    for ac_prog in sh
5072do
5073  # Extract the first word of "$ac_prog", so it can be a program name with args.
5074set dummy $ac_prog; ac_word=$2
5075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5076$as_echo_n "checking for $ac_word... " >&6; }
5077if test "${ac_cv_path_SH+set}" = set; then :
5078  $as_echo_n "(cached) " >&6
5079else
5080  case $SH in
5081  [\\/]* | ?:[\\/]*)
5082  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5083  ;;
5084  *)
5085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5086for as_dir in $PATH
5087do
5088  IFS=$as_save_IFS
5089  test -z "$as_dir" && as_dir=.
5090    for ac_exec_ext in '' $ac_executable_extensions; do
5091  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5092    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5094    break 2
5095  fi
5096done
5097  done
5098IFS=$as_save_IFS
5099
5100  ;;
5101esac
5102fi
5103SH=$ac_cv_path_SH
5104if test -n "$SH"; then
5105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5106$as_echo "$SH" >&6; }
5107else
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5109$as_echo "no" >&6; }
5110fi
5111
5112
5113  test -n "$SH" && break
5114done
5115
5116
5117    if test "x$SH" = x; then
5118        if test "xsh" = x; then
5119          PROG_NAME=sh
5120        else
5121          PROG_NAME=sh
5122        fi
5123        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5124$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5125        as_fn_error $? "Cannot continue" "$LINENO" 5
5126    fi
5127
5128
5129
5130    for ac_prog in sort
5131do
5132  # Extract the first word of "$ac_prog", so it can be a program name with args.
5133set dummy $ac_prog; ac_word=$2
5134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5135$as_echo_n "checking for $ac_word... " >&6; }
5136if test "${ac_cv_path_SORT+set}" = set; then :
5137  $as_echo_n "(cached) " >&6
5138else
5139  case $SORT in
5140  [\\/]* | ?:[\\/]*)
5141  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5142  ;;
5143  *)
5144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5145for as_dir in $PATH
5146do
5147  IFS=$as_save_IFS
5148  test -z "$as_dir" && as_dir=.
5149    for ac_exec_ext in '' $ac_executable_extensions; do
5150  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5151    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5153    break 2
5154  fi
5155done
5156  done
5157IFS=$as_save_IFS
5158
5159  ;;
5160esac
5161fi
5162SORT=$ac_cv_path_SORT
5163if test -n "$SORT"; then
5164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5165$as_echo "$SORT" >&6; }
5166else
5167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168$as_echo "no" >&6; }
5169fi
5170
5171
5172  test -n "$SORT" && break
5173done
5174
5175
5176    if test "x$SORT" = x; then
5177        if test "xsort" = x; then
5178          PROG_NAME=sort
5179        else
5180          PROG_NAME=sort
5181        fi
5182        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5183$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5184        as_fn_error $? "Cannot continue" "$LINENO" 5
5185    fi
5186
5187
5188
5189    for ac_prog in tail
5190do
5191  # Extract the first word of "$ac_prog", so it can be a program name with args.
5192set dummy $ac_prog; ac_word=$2
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5194$as_echo_n "checking for $ac_word... " >&6; }
5195if test "${ac_cv_path_TAIL+set}" = set; then :
5196  $as_echo_n "(cached) " >&6
5197else
5198  case $TAIL in
5199  [\\/]* | ?:[\\/]*)
5200  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5201  ;;
5202  *)
5203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5204for as_dir in $PATH
5205do
5206  IFS=$as_save_IFS
5207  test -z "$as_dir" && as_dir=.
5208    for ac_exec_ext in '' $ac_executable_extensions; do
5209  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5210    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5212    break 2
5213  fi
5214done
5215  done
5216IFS=$as_save_IFS
5217
5218  ;;
5219esac
5220fi
5221TAIL=$ac_cv_path_TAIL
5222if test -n "$TAIL"; then
5223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5224$as_echo "$TAIL" >&6; }
5225else
5226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227$as_echo "no" >&6; }
5228fi
5229
5230
5231  test -n "$TAIL" && break
5232done
5233
5234
5235    if test "x$TAIL" = x; then
5236        if test "xtail" = x; then
5237          PROG_NAME=tail
5238        else
5239          PROG_NAME=tail
5240        fi
5241        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5242$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5243        as_fn_error $? "Cannot continue" "$LINENO" 5
5244    fi
5245
5246
5247
5248    for ac_prog in tar
5249do
5250  # Extract the first word of "$ac_prog", so it can be a program name with args.
5251set dummy $ac_prog; ac_word=$2
5252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5253$as_echo_n "checking for $ac_word... " >&6; }
5254if test "${ac_cv_path_TAR+set}" = set; then :
5255  $as_echo_n "(cached) " >&6
5256else
5257  case $TAR in
5258  [\\/]* | ?:[\\/]*)
5259  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5260  ;;
5261  *)
5262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5263for as_dir in $PATH
5264do
5265  IFS=$as_save_IFS
5266  test -z "$as_dir" && as_dir=.
5267    for ac_exec_ext in '' $ac_executable_extensions; do
5268  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5269    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5271    break 2
5272  fi
5273done
5274  done
5275IFS=$as_save_IFS
5276
5277  ;;
5278esac
5279fi
5280TAR=$ac_cv_path_TAR
5281if test -n "$TAR"; then
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5283$as_echo "$TAR" >&6; }
5284else
5285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5286$as_echo "no" >&6; }
5287fi
5288
5289
5290  test -n "$TAR" && break
5291done
5292
5293
5294    if test "x$TAR" = x; then
5295        if test "xtar" = x; then
5296          PROG_NAME=tar
5297        else
5298          PROG_NAME=tar
5299        fi
5300        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5301$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5302        as_fn_error $? "Cannot continue" "$LINENO" 5
5303    fi
5304
5305
5306
5307    for ac_prog in tee
5308do
5309  # Extract the first word of "$ac_prog", so it can be a program name with args.
5310set dummy $ac_prog; ac_word=$2
5311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312$as_echo_n "checking for $ac_word... " >&6; }
5313if test "${ac_cv_path_TEE+set}" = set; then :
5314  $as_echo_n "(cached) " >&6
5315else
5316  case $TEE in
5317  [\\/]* | ?:[\\/]*)
5318  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5319  ;;
5320  *)
5321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324  IFS=$as_save_IFS
5325  test -z "$as_dir" && as_dir=.
5326    for ac_exec_ext in '' $ac_executable_extensions; do
5327  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5328    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330    break 2
5331  fi
5332done
5333  done
5334IFS=$as_save_IFS
5335
5336  ;;
5337esac
5338fi
5339TEE=$ac_cv_path_TEE
5340if test -n "$TEE"; then
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5342$as_echo "$TEE" >&6; }
5343else
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347
5348
5349  test -n "$TEE" && break
5350done
5351
5352
5353    if test "x$TEE" = x; then
5354        if test "xtee" = x; then
5355          PROG_NAME=tee
5356        else
5357          PROG_NAME=tee
5358        fi
5359        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5360$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5361        as_fn_error $? "Cannot continue" "$LINENO" 5
5362    fi
5363
5364
5365
5366    for ac_prog in touch
5367do
5368  # Extract the first word of "$ac_prog", so it can be a program name with args.
5369set dummy $ac_prog; ac_word=$2
5370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371$as_echo_n "checking for $ac_word... " >&6; }
5372if test "${ac_cv_path_TOUCH+set}" = set; then :
5373  $as_echo_n "(cached) " >&6
5374else
5375  case $TOUCH in
5376  [\\/]* | ?:[\\/]*)
5377  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5378  ;;
5379  *)
5380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381for as_dir in $PATH
5382do
5383  IFS=$as_save_IFS
5384  test -z "$as_dir" && as_dir=.
5385    for ac_exec_ext in '' $ac_executable_extensions; do
5386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5387    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389    break 2
5390  fi
5391done
5392  done
5393IFS=$as_save_IFS
5394
5395  ;;
5396esac
5397fi
5398TOUCH=$ac_cv_path_TOUCH
5399if test -n "$TOUCH"; then
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5401$as_echo "$TOUCH" >&6; }
5402else
5403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
5405fi
5406
5407
5408  test -n "$TOUCH" && break
5409done
5410
5411
5412    if test "x$TOUCH" = x; then
5413        if test "xtouch" = x; then
5414          PROG_NAME=touch
5415        else
5416          PROG_NAME=touch
5417        fi
5418        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5419$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5420        as_fn_error $? "Cannot continue" "$LINENO" 5
5421    fi
5422
5423
5424
5425    for ac_prog in tr
5426do
5427  # Extract the first word of "$ac_prog", so it can be a program name with args.
5428set dummy $ac_prog; ac_word=$2
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5430$as_echo_n "checking for $ac_word... " >&6; }
5431if test "${ac_cv_path_TR+set}" = set; then :
5432  $as_echo_n "(cached) " >&6
5433else
5434  case $TR in
5435  [\\/]* | ?:[\\/]*)
5436  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5437  ;;
5438  *)
5439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440for as_dir in $PATH
5441do
5442  IFS=$as_save_IFS
5443  test -z "$as_dir" && as_dir=.
5444    for ac_exec_ext in '' $ac_executable_extensions; do
5445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5446    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5448    break 2
5449  fi
5450done
5451  done
5452IFS=$as_save_IFS
5453
5454  ;;
5455esac
5456fi
5457TR=$ac_cv_path_TR
5458if test -n "$TR"; then
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5460$as_echo "$TR" >&6; }
5461else
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463$as_echo "no" >&6; }
5464fi
5465
5466
5467  test -n "$TR" && break
5468done
5469
5470
5471    if test "x$TR" = x; then
5472        if test "xtr" = x; then
5473          PROG_NAME=tr
5474        else
5475          PROG_NAME=tr
5476        fi
5477        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5478$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5479        as_fn_error $? "Cannot continue" "$LINENO" 5
5480    fi
5481
5482
5483
5484    for ac_prog in uname
5485do
5486  # Extract the first word of "$ac_prog", so it can be a program name with args.
5487set dummy $ac_prog; ac_word=$2
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5489$as_echo_n "checking for $ac_word... " >&6; }
5490if test "${ac_cv_path_UNAME+set}" = set; then :
5491  $as_echo_n "(cached) " >&6
5492else
5493  case $UNAME in
5494  [\\/]* | ?:[\\/]*)
5495  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5496  ;;
5497  *)
5498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5499for as_dir in $PATH
5500do
5501  IFS=$as_save_IFS
5502  test -z "$as_dir" && as_dir=.
5503    for ac_exec_ext in '' $ac_executable_extensions; do
5504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5505    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5507    break 2
5508  fi
5509done
5510  done
5511IFS=$as_save_IFS
5512
5513  ;;
5514esac
5515fi
5516UNAME=$ac_cv_path_UNAME
5517if test -n "$UNAME"; then
5518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5519$as_echo "$UNAME" >&6; }
5520else
5521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5522$as_echo "no" >&6; }
5523fi
5524
5525
5526  test -n "$UNAME" && break
5527done
5528
5529
5530    if test "x$UNAME" = x; then
5531        if test "xuname" = x; then
5532          PROG_NAME=uname
5533        else
5534          PROG_NAME=uname
5535        fi
5536        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5537$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5538        as_fn_error $? "Cannot continue" "$LINENO" 5
5539    fi
5540
5541
5542
5543    for ac_prog in uniq
5544do
5545  # Extract the first word of "$ac_prog", so it can be a program name with args.
5546set dummy $ac_prog; ac_word=$2
5547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5548$as_echo_n "checking for $ac_word... " >&6; }
5549if test "${ac_cv_path_UNIQ+set}" = set; then :
5550  $as_echo_n "(cached) " >&6
5551else
5552  case $UNIQ in
5553  [\\/]* | ?:[\\/]*)
5554  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5555  ;;
5556  *)
5557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558for as_dir in $PATH
5559do
5560  IFS=$as_save_IFS
5561  test -z "$as_dir" && as_dir=.
5562    for ac_exec_ext in '' $ac_executable_extensions; do
5563  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5564    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5566    break 2
5567  fi
5568done
5569  done
5570IFS=$as_save_IFS
5571
5572  ;;
5573esac
5574fi
5575UNIQ=$ac_cv_path_UNIQ
5576if test -n "$UNIQ"; then
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5578$as_echo "$UNIQ" >&6; }
5579else
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5581$as_echo "no" >&6; }
5582fi
5583
5584
5585  test -n "$UNIQ" && break
5586done
5587
5588
5589    if test "x$UNIQ" = x; then
5590        if test "xuniq" = x; then
5591          PROG_NAME=uniq
5592        else
5593          PROG_NAME=uniq
5594        fi
5595        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5596$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5597        as_fn_error $? "Cannot continue" "$LINENO" 5
5598    fi
5599
5600
5601
5602    for ac_prog in wc
5603do
5604  # Extract the first word of "$ac_prog", so it can be a program name with args.
5605set dummy $ac_prog; ac_word=$2
5606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5607$as_echo_n "checking for $ac_word... " >&6; }
5608if test "${ac_cv_path_WC+set}" = set; then :
5609  $as_echo_n "(cached) " >&6
5610else
5611  case $WC in
5612  [\\/]* | ?:[\\/]*)
5613  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5614  ;;
5615  *)
5616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5617for as_dir in $PATH
5618do
5619  IFS=$as_save_IFS
5620  test -z "$as_dir" && as_dir=.
5621    for ac_exec_ext in '' $ac_executable_extensions; do
5622  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5623    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5625    break 2
5626  fi
5627done
5628  done
5629IFS=$as_save_IFS
5630
5631  ;;
5632esac
5633fi
5634WC=$ac_cv_path_WC
5635if test -n "$WC"; then
5636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5637$as_echo "$WC" >&6; }
5638else
5639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5640$as_echo "no" >&6; }
5641fi
5642
5643
5644  test -n "$WC" && break
5645done
5646
5647
5648    if test "x$WC" = x; then
5649        if test "xwc" = x; then
5650          PROG_NAME=wc
5651        else
5652          PROG_NAME=wc
5653        fi
5654        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5655$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5656        as_fn_error $? "Cannot continue" "$LINENO" 5
5657    fi
5658
5659
5660
5661    for ac_prog in which
5662do
5663  # Extract the first word of "$ac_prog", so it can be a program name with args.
5664set dummy $ac_prog; ac_word=$2
5665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5666$as_echo_n "checking for $ac_word... " >&6; }
5667if test "${ac_cv_path_WHICH+set}" = set; then :
5668  $as_echo_n "(cached) " >&6
5669else
5670  case $WHICH in
5671  [\\/]* | ?:[\\/]*)
5672  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5673  ;;
5674  *)
5675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5676for as_dir in $PATH
5677do
5678  IFS=$as_save_IFS
5679  test -z "$as_dir" && as_dir=.
5680    for ac_exec_ext in '' $ac_executable_extensions; do
5681  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5682    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5684    break 2
5685  fi
5686done
5687  done
5688IFS=$as_save_IFS
5689
5690  ;;
5691esac
5692fi
5693WHICH=$ac_cv_path_WHICH
5694if test -n "$WHICH"; then
5695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5696$as_echo "$WHICH" >&6; }
5697else
5698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699$as_echo "no" >&6; }
5700fi
5701
5702
5703  test -n "$WHICH" && break
5704done
5705
5706
5707    if test "x$WHICH" = x; then
5708        if test "xwhich" = x; then
5709          PROG_NAME=which
5710        else
5711          PROG_NAME=which
5712        fi
5713        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5714$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5715        as_fn_error $? "Cannot continue" "$LINENO" 5
5716    fi
5717
5718
5719
5720    for ac_prog in xargs
5721do
5722  # Extract the first word of "$ac_prog", so it can be a program name with args.
5723set dummy $ac_prog; ac_word=$2
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5725$as_echo_n "checking for $ac_word... " >&6; }
5726if test "${ac_cv_path_XARGS+set}" = set; then :
5727  $as_echo_n "(cached) " >&6
5728else
5729  case $XARGS in
5730  [\\/]* | ?:[\\/]*)
5731  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5732  ;;
5733  *)
5734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5735for as_dir in $PATH
5736do
5737  IFS=$as_save_IFS
5738  test -z "$as_dir" && as_dir=.
5739    for ac_exec_ext in '' $ac_executable_extensions; do
5740  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5741    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5743    break 2
5744  fi
5745done
5746  done
5747IFS=$as_save_IFS
5748
5749  ;;
5750esac
5751fi
5752XARGS=$ac_cv_path_XARGS
5753if test -n "$XARGS"; then
5754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5755$as_echo "$XARGS" >&6; }
5756else
5757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758$as_echo "no" >&6; }
5759fi
5760
5761
5762  test -n "$XARGS" && break
5763done
5764
5765
5766    if test "x$XARGS" = x; then
5767        if test "xxargs" = x; then
5768          PROG_NAME=xargs
5769        else
5770          PROG_NAME=xargs
5771        fi
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5773$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5774        as_fn_error $? "Cannot continue" "$LINENO" 5
5775    fi
5776
5777
5778
5779# Then required tools that require some special treatment.
5780for ac_prog in gawk mawk nawk awk
5781do
5782  # Extract the first word of "$ac_prog", so it can be a program name with args.
5783set dummy $ac_prog; ac_word=$2
5784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5785$as_echo_n "checking for $ac_word... " >&6; }
5786if test "${ac_cv_prog_AWK+set}" = set; then :
5787  $as_echo_n "(cached) " >&6
5788else
5789  if test -n "$AWK"; then
5790  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5791else
5792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793for as_dir in $PATH
5794do
5795  IFS=$as_save_IFS
5796  test -z "$as_dir" && as_dir=.
5797    for ac_exec_ext in '' $ac_executable_extensions; do
5798  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5799    ac_cv_prog_AWK="$ac_prog"
5800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801    break 2
5802  fi
5803done
5804  done
5805IFS=$as_save_IFS
5806
5807fi
5808fi
5809AWK=$ac_cv_prog_AWK
5810if test -n "$AWK"; then
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5812$as_echo "$AWK" >&6; }
5813else
5814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815$as_echo "no" >&6; }
5816fi
5817
5818
5819  test -n "$AWK" && break
5820done
5821
5822
5823    if test "x$AWK" = x; then
5824        if test "x" = x; then
5825          PROG_NAME=awk
5826        else
5827          PROG_NAME=
5828        fi
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5830$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5831        as_fn_error $? "Cannot continue" "$LINENO" 5
5832    fi
5833
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5835$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5836if test "${ac_cv_path_GREP+set}" = set; then :
5837  $as_echo_n "(cached) " >&6
5838else
5839  if test -z "$GREP"; then
5840  ac_path_GREP_found=false
5841  # Loop through the user's path and test for each of PROGNAME-LIST
5842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5843for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5844do
5845  IFS=$as_save_IFS
5846  test -z "$as_dir" && as_dir=.
5847    for ac_prog in grep ggrep; do
5848    for ac_exec_ext in '' $ac_executable_extensions; do
5849      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5850      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5851# Check for GNU ac_path_GREP and select it if it is found.
5852  # Check for GNU $ac_path_GREP
5853case `"$ac_path_GREP" --version 2>&1` in
5854*GNU*)
5855  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5856*)
5857  ac_count=0
5858  $as_echo_n 0123456789 >"conftest.in"
5859  while :
5860  do
5861    cat "conftest.in" "conftest.in" >"conftest.tmp"
5862    mv "conftest.tmp" "conftest.in"
5863    cp "conftest.in" "conftest.nl"
5864    $as_echo 'GREP' >> "conftest.nl"
5865    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5866    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5867    as_fn_arith $ac_count + 1 && ac_count=$as_val
5868    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5869      # Best one so far, save it but keep looking for a better one
5870      ac_cv_path_GREP="$ac_path_GREP"
5871      ac_path_GREP_max=$ac_count
5872    fi
5873    # 10*(2^10) chars as input seems more than enough
5874    test $ac_count -gt 10 && break
5875  done
5876  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5877esac
5878
5879      $ac_path_GREP_found && break 3
5880    done
5881  done
5882  done
5883IFS=$as_save_IFS
5884  if test -z "$ac_cv_path_GREP"; then
5885    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5886  fi
5887else
5888  ac_cv_path_GREP=$GREP
5889fi
5890
5891fi
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5893$as_echo "$ac_cv_path_GREP" >&6; }
5894 GREP="$ac_cv_path_GREP"
5895
5896
5897
5898    if test "x$GREP" = x; then
5899        if test "x" = x; then
5900          PROG_NAME=grep
5901        else
5902          PROG_NAME=
5903        fi
5904        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5905$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5906        as_fn_error $? "Cannot continue" "$LINENO" 5
5907    fi
5908
5909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5910$as_echo_n "checking for egrep... " >&6; }
5911if test "${ac_cv_path_EGREP+set}" = set; then :
5912  $as_echo_n "(cached) " >&6
5913else
5914  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5915   then ac_cv_path_EGREP="$GREP -E"
5916   else
5917     if test -z "$EGREP"; then
5918  ac_path_EGREP_found=false
5919  # Loop through the user's path and test for each of PROGNAME-LIST
5920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5922do
5923  IFS=$as_save_IFS
5924  test -z "$as_dir" && as_dir=.
5925    for ac_prog in egrep; do
5926    for ac_exec_ext in '' $ac_executable_extensions; do
5927      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5928      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5929# Check for GNU ac_path_EGREP and select it if it is found.
5930  # Check for GNU $ac_path_EGREP
5931case `"$ac_path_EGREP" --version 2>&1` in
5932*GNU*)
5933  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5934*)
5935  ac_count=0
5936  $as_echo_n 0123456789 >"conftest.in"
5937  while :
5938  do
5939    cat "conftest.in" "conftest.in" >"conftest.tmp"
5940    mv "conftest.tmp" "conftest.in"
5941    cp "conftest.in" "conftest.nl"
5942    $as_echo 'EGREP' >> "conftest.nl"
5943    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5944    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5945    as_fn_arith $ac_count + 1 && ac_count=$as_val
5946    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5947      # Best one so far, save it but keep looking for a better one
5948      ac_cv_path_EGREP="$ac_path_EGREP"
5949      ac_path_EGREP_max=$ac_count
5950    fi
5951    # 10*(2^10) chars as input seems more than enough
5952    test $ac_count -gt 10 && break
5953  done
5954  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5955esac
5956
5957      $ac_path_EGREP_found && break 3
5958    done
5959  done
5960  done
5961IFS=$as_save_IFS
5962  if test -z "$ac_cv_path_EGREP"; then
5963    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5964  fi
5965else
5966  ac_cv_path_EGREP=$EGREP
5967fi
5968
5969   fi
5970fi
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5972$as_echo "$ac_cv_path_EGREP" >&6; }
5973 EGREP="$ac_cv_path_EGREP"
5974
5975
5976
5977    if test "x$EGREP" = x; then
5978        if test "x" = x; then
5979          PROG_NAME=egrep
5980        else
5981          PROG_NAME=
5982        fi
5983        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5984$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5985        as_fn_error $? "Cannot continue" "$LINENO" 5
5986    fi
5987
5988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5989$as_echo_n "checking for fgrep... " >&6; }
5990if test "${ac_cv_path_FGREP+set}" = set; then :
5991  $as_echo_n "(cached) " >&6
5992else
5993  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5994   then ac_cv_path_FGREP="$GREP -F"
5995   else
5996     if test -z "$FGREP"; then
5997  ac_path_FGREP_found=false
5998  # Loop through the user's path and test for each of PROGNAME-LIST
5999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6000for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6001do
6002  IFS=$as_save_IFS
6003  test -z "$as_dir" && as_dir=.
6004    for ac_prog in fgrep; do
6005    for ac_exec_ext in '' $ac_executable_extensions; do
6006      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6007      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6008# Check for GNU ac_path_FGREP and select it if it is found.
6009  # Check for GNU $ac_path_FGREP
6010case `"$ac_path_FGREP" --version 2>&1` in
6011*GNU*)
6012  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6013*)
6014  ac_count=0
6015  $as_echo_n 0123456789 >"conftest.in"
6016  while :
6017  do
6018    cat "conftest.in" "conftest.in" >"conftest.tmp"
6019    mv "conftest.tmp" "conftest.in"
6020    cp "conftest.in" "conftest.nl"
6021    $as_echo 'FGREP' >> "conftest.nl"
6022    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6023    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6024    as_fn_arith $ac_count + 1 && ac_count=$as_val
6025    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6026      # Best one so far, save it but keep looking for a better one
6027      ac_cv_path_FGREP="$ac_path_FGREP"
6028      ac_path_FGREP_max=$ac_count
6029    fi
6030    # 10*(2^10) chars as input seems more than enough
6031    test $ac_count -gt 10 && break
6032  done
6033  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6034esac
6035
6036      $ac_path_FGREP_found && break 3
6037    done
6038  done
6039  done
6040IFS=$as_save_IFS
6041  if test -z "$ac_cv_path_FGREP"; then
6042    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6043  fi
6044else
6045  ac_cv_path_FGREP=$FGREP
6046fi
6047
6048   fi
6049fi
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6051$as_echo "$ac_cv_path_FGREP" >&6; }
6052 FGREP="$ac_cv_path_FGREP"
6053
6054
6055
6056    if test "x$FGREP" = x; then
6057        if test "x" = x; then
6058          PROG_NAME=fgrep
6059        else
6060          PROG_NAME=
6061        fi
6062        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6063$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6064        as_fn_error $? "Cannot continue" "$LINENO" 5
6065    fi
6066
6067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6068$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6069if test "${ac_cv_path_SED+set}" = set; then :
6070  $as_echo_n "(cached) " >&6
6071else
6072            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6073     for ac_i in 1 2 3 4 5 6 7; do
6074       ac_script="$ac_script$as_nl$ac_script"
6075     done
6076     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6077     { ac_script=; unset ac_script;}
6078     if test -z "$SED"; then
6079  ac_path_SED_found=false
6080  # Loop through the user's path and test for each of PROGNAME-LIST
6081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082for as_dir in $PATH
6083do
6084  IFS=$as_save_IFS
6085  test -z "$as_dir" && as_dir=.
6086    for ac_prog in sed gsed; do
6087    for ac_exec_ext in '' $ac_executable_extensions; do
6088      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6089      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6090# Check for GNU ac_path_SED and select it if it is found.
6091  # Check for GNU $ac_path_SED
6092case `"$ac_path_SED" --version 2>&1` in
6093*GNU*)
6094  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6095*)
6096  ac_count=0
6097  $as_echo_n 0123456789 >"conftest.in"
6098  while :
6099  do
6100    cat "conftest.in" "conftest.in" >"conftest.tmp"
6101    mv "conftest.tmp" "conftest.in"
6102    cp "conftest.in" "conftest.nl"
6103    $as_echo '' >> "conftest.nl"
6104    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6105    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6106    as_fn_arith $ac_count + 1 && ac_count=$as_val
6107    if test $ac_count -gt ${ac_path_SED_max-0}; then
6108      # Best one so far, save it but keep looking for a better one
6109      ac_cv_path_SED="$ac_path_SED"
6110      ac_path_SED_max=$ac_count
6111    fi
6112    # 10*(2^10) chars as input seems more than enough
6113    test $ac_count -gt 10 && break
6114  done
6115  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6116esac
6117
6118      $ac_path_SED_found && break 3
6119    done
6120  done
6121  done
6122IFS=$as_save_IFS
6123  if test -z "$ac_cv_path_SED"; then
6124    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6125  fi
6126else
6127  ac_cv_path_SED=$SED
6128fi
6129
6130fi
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6132$as_echo "$ac_cv_path_SED" >&6; }
6133 SED="$ac_cv_path_SED"
6134  rm -f conftest.sed
6135
6136
6137    if test "x$SED" = x; then
6138        if test "x" = x; then
6139          PROG_NAME=sed
6140        else
6141          PROG_NAME=
6142        fi
6143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6144$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6145        as_fn_error $? "Cannot continue" "$LINENO" 5
6146    fi
6147
6148
6149for ac_prog in nawk gawk awk
6150do
6151  # Extract the first word of "$ac_prog", so it can be a program name with args.
6152set dummy $ac_prog; ac_word=$2
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6154$as_echo_n "checking for $ac_word... " >&6; }
6155if test "${ac_cv_path_NAWK+set}" = set; then :
6156  $as_echo_n "(cached) " >&6
6157else
6158  case $NAWK in
6159  [\\/]* | ?:[\\/]*)
6160  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6161  ;;
6162  *)
6163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6164for as_dir in $PATH
6165do
6166  IFS=$as_save_IFS
6167  test -z "$as_dir" && as_dir=.
6168    for ac_exec_ext in '' $ac_executable_extensions; do
6169  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6170    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6172    break 2
6173  fi
6174done
6175  done
6176IFS=$as_save_IFS
6177
6178  ;;
6179esac
6180fi
6181NAWK=$ac_cv_path_NAWK
6182if test -n "$NAWK"; then
6183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6184$as_echo "$NAWK" >&6; }
6185else
6186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }
6188fi
6189
6190
6191  test -n "$NAWK" && break
6192done
6193
6194
6195    if test "x$NAWK" = x; then
6196        if test "x" = x; then
6197          PROG_NAME=nawk
6198        else
6199          PROG_NAME=
6200        fi
6201        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6202$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6203        as_fn_error $? "Cannot continue" "$LINENO" 5
6204    fi
6205
6206
6207# Always force rm.
6208RM="$RM -f"
6209
6210# These are not required on all platforms
6211# Extract the first word of "cygpath", so it can be a program name with args.
6212set dummy cygpath; ac_word=$2
6213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6214$as_echo_n "checking for $ac_word... " >&6; }
6215if test "${ac_cv_path_CYGPATH+set}" = set; then :
6216  $as_echo_n "(cached) " >&6
6217else
6218  case $CYGPATH in
6219  [\\/]* | ?:[\\/]*)
6220  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6221  ;;
6222  *)
6223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6224for as_dir in $PATH
6225do
6226  IFS=$as_save_IFS
6227  test -z "$as_dir" && as_dir=.
6228    for ac_exec_ext in '' $ac_executable_extensions; do
6229  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6230    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6232    break 2
6233  fi
6234done
6235  done
6236IFS=$as_save_IFS
6237
6238  ;;
6239esac
6240fi
6241CYGPATH=$ac_cv_path_CYGPATH
6242if test -n "$CYGPATH"; then
6243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6244$as_echo "$CYGPATH" >&6; }
6245else
6246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6247$as_echo "no" >&6; }
6248fi
6249
6250
6251# Extract the first word of "readlink", so it can be a program name with args.
6252set dummy readlink; ac_word=$2
6253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6254$as_echo_n "checking for $ac_word... " >&6; }
6255if test "${ac_cv_path_READLINK+set}" = set; then :
6256  $as_echo_n "(cached) " >&6
6257else
6258  case $READLINK in
6259  [\\/]* | ?:[\\/]*)
6260  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6261  ;;
6262  *)
6263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH
6265do
6266  IFS=$as_save_IFS
6267  test -z "$as_dir" && as_dir=.
6268    for ac_exec_ext in '' $ac_executable_extensions; do
6269  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6270    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6272    break 2
6273  fi
6274done
6275  done
6276IFS=$as_save_IFS
6277
6278  ;;
6279esac
6280fi
6281READLINK=$ac_cv_path_READLINK
6282if test -n "$READLINK"; then
6283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6284$as_echo "$READLINK" >&6; }
6285else
6286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287$as_echo "no" >&6; }
6288fi
6289
6290
6291# Extract the first word of "df", so it can be a program name with args.
6292set dummy df; ac_word=$2
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6294$as_echo_n "checking for $ac_word... " >&6; }
6295if test "${ac_cv_path_DF+set}" = set; then :
6296  $as_echo_n "(cached) " >&6
6297else
6298  case $DF in
6299  [\\/]* | ?:[\\/]*)
6300  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6301  ;;
6302  *)
6303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6304for as_dir in $PATH
6305do
6306  IFS=$as_save_IFS
6307  test -z "$as_dir" && as_dir=.
6308    for ac_exec_ext in '' $ac_executable_extensions; do
6309  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6310    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6312    break 2
6313  fi
6314done
6315  done
6316IFS=$as_save_IFS
6317
6318  ;;
6319esac
6320fi
6321DF=$ac_cv_path_DF
6322if test -n "$DF"; then
6323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6324$as_echo "$DF" >&6; }
6325else
6326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327$as_echo "no" >&6; }
6328fi
6329
6330
6331# Extract the first word of "SetFile", so it can be a program name with args.
6332set dummy SetFile; ac_word=$2
6333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6334$as_echo_n "checking for $ac_word... " >&6; }
6335if test "${ac_cv_path_SETFILE+set}" = set; then :
6336  $as_echo_n "(cached) " >&6
6337else
6338  case $SETFILE in
6339  [\\/]* | ?:[\\/]*)
6340  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6341  ;;
6342  *)
6343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6344for as_dir in $PATH
6345do
6346  IFS=$as_save_IFS
6347  test -z "$as_dir" && as_dir=.
6348    for ac_exec_ext in '' $ac_executable_extensions; do
6349  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6350    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6352    break 2
6353  fi
6354done
6355  done
6356IFS=$as_save_IFS
6357
6358  ;;
6359esac
6360fi
6361SETFILE=$ac_cv_path_SETFILE
6362if test -n "$SETFILE"; then
6363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6364$as_echo "$SETFILE" >&6; }
6365else
6366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6367$as_echo "no" >&6; }
6368fi
6369
6370
6371
6372
6373# Now we can determine OpenJDK build and target platforms. This is required to
6374# have early on.
6375# Make sure we can run config.sub.
6376$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6377  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6378
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6380$as_echo_n "checking build system type... " >&6; }
6381if test "${ac_cv_build+set}" = set; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  ac_build_alias=$build_alias
6385test "x$ac_build_alias" = x &&
6386  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6387test "x$ac_build_alias" = x &&
6388  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6389ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6390  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6391
6392fi
6393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6394$as_echo "$ac_cv_build" >&6; }
6395case $ac_cv_build in
6396*-*-*) ;;
6397*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6398esac
6399build=$ac_cv_build
6400ac_save_IFS=$IFS; IFS='-'
6401set x $ac_cv_build
6402shift
6403build_cpu=$1
6404build_vendor=$2
6405shift; shift
6406# Remember, the first character of IFS is used to create $*,
6407# except with old shells:
6408build_os=$*
6409IFS=$ac_save_IFS
6410case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6411
6412
6413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6414$as_echo_n "checking host system type... " >&6; }
6415if test "${ac_cv_host+set}" = set; then :
6416  $as_echo_n "(cached) " >&6
6417else
6418  if test "x$host_alias" = x; then
6419  ac_cv_host=$ac_cv_build
6420else
6421  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6422    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6423fi
6424
6425fi
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6427$as_echo "$ac_cv_host" >&6; }
6428case $ac_cv_host in
6429*-*-*) ;;
6430*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6431esac
6432host=$ac_cv_host
6433ac_save_IFS=$IFS; IFS='-'
6434set x $ac_cv_host
6435shift
6436host_cpu=$1
6437host_vendor=$2
6438shift; shift
6439# Remember, the first character of IFS is used to create $*,
6440# except with old shells:
6441host_os=$*
6442IFS=$ac_save_IFS
6443case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6444
6445
6446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6447$as_echo_n "checking target system type... " >&6; }
6448if test "${ac_cv_target+set}" = set; then :
6449  $as_echo_n "(cached) " >&6
6450else
6451  if test "x$target_alias" = x; then
6452  ac_cv_target=$ac_cv_host
6453else
6454  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6455    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6456fi
6457
6458fi
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6460$as_echo "$ac_cv_target" >&6; }
6461case $ac_cv_target in
6462*-*-*) ;;
6463*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6464esac
6465target=$ac_cv_target
6466ac_save_IFS=$IFS; IFS='-'
6467set x $ac_cv_target
6468shift
6469target_cpu=$1
6470target_vendor=$2
6471shift; shift
6472# Remember, the first character of IFS is used to create $*,
6473# except with old shells:
6474target_os=$*
6475IFS=$ac_save_IFS
6476case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6477
6478
6479# The aliases save the names the user supplied, while $host etc.
6480# will get canonicalized.
6481test -n "$target_alias" &&
6482  test "$program_prefix$program_suffix$program_transform_name" = \
6483    NONENONEs,x,x, &&
6484  program_prefix=${target_alias}-
6485
6486# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6487# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6488# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6489# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6490# to use the configure naming style.
6491
6492
6493
6494
6495
6496    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6497    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6498    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6499    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6500    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6501    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6502
6503
6504
6505    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6506
6507  case "$build_os" in
6508    *linux*)
6509      VAR_OS=linux
6510      VAR_OS_API=posix
6511      VAR_OS_ENV=linux
6512      ;;
6513    *solaris*)
6514      VAR_OS=solaris
6515      VAR_OS_API=posix
6516      VAR_OS_ENV=solaris
6517      ;;
6518    *darwin*)
6519      VAR_OS=macosx
6520      VAR_OS_API=posix
6521      VAR_OS_ENV=macosx
6522      ;;
6523    *bsd*)
6524      VAR_OS=bsd
6525      VAR_OS_API=posix
6526      VAR_OS_ENV=bsd
6527      ;;
6528    *cygwin*)
6529      VAR_OS=windows
6530      VAR_OS_API=winapi
6531      VAR_OS_ENV=windows.cygwin
6532      ;;
6533    *mingw*)
6534      VAR_OS=windows
6535      VAR_OS_API=winapi
6536      VAR_OS_ENV=windows.msys
6537      ;;
6538    *)
6539      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6540      ;;
6541  esac
6542
6543
6544  # First argument is the cpu name from the trip/quad
6545  case "$build_cpu" in
6546    x86_64)
6547      VAR_CPU=x86_64
6548      VAR_CPU_ARCH=x86
6549      VAR_CPU_BITS=64
6550      VAR_CPU_ENDIAN=little
6551      ;;
6552    i?86)
6553      VAR_CPU=x86
6554      VAR_CPU_ARCH=x86
6555      VAR_CPU_BITS=32
6556      VAR_CPU_ENDIAN=little
6557      ;;
6558    arm*)
6559      VAR_CPU=arm
6560      VAR_CPU_ARCH=arm
6561      VAR_CPU_BITS=32
6562      VAR_CPU_ENDIAN=little
6563      ;;
6564    powerpc)
6565      VAR_CPU=ppc
6566      VAR_CPU_ARCH=ppc
6567      VAR_CPU_BITS=32
6568      VAR_CPU_ENDIAN=big
6569       ;;
6570    powerpc64)
6571      VAR_CPU=ppc64
6572      VAR_CPU_ARCH=ppc
6573      VAR_CPU_BITS=64
6574      VAR_CPU_ENDIAN=big
6575       ;;
6576    sparc)
6577      VAR_CPU=sparc
6578      VAR_CPU_ARCH=sparc
6579      VAR_CPU_BITS=32
6580      VAR_CPU_ENDIAN=big
6581       ;;
6582    sparcv9)
6583      VAR_CPU=sparcv9
6584      VAR_CPU_ARCH=sparc
6585      VAR_CPU_BITS=64
6586      VAR_CPU_ENDIAN=big
6587       ;;
6588    *)
6589      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6590      ;;
6591  esac
6592
6593    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6594    OPENJDK_BUILD_OS="$VAR_OS"
6595    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6596    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6597    OPENJDK_BUILD_CPU="$VAR_CPU"
6598    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6599    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6600    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6601
6602
6603
6604
6605
6606
6607
6608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6609$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6611$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6612
6613    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6614
6615  case "$host_os" in
6616    *linux*)
6617      VAR_OS=linux
6618      VAR_OS_API=posix
6619      VAR_OS_ENV=linux
6620      ;;
6621    *solaris*)
6622      VAR_OS=solaris
6623      VAR_OS_API=posix
6624      VAR_OS_ENV=solaris
6625      ;;
6626    *darwin*)
6627      VAR_OS=macosx
6628      VAR_OS_API=posix
6629      VAR_OS_ENV=macosx
6630      ;;
6631    *bsd*)
6632      VAR_OS=bsd
6633      VAR_OS_API=posix
6634      VAR_OS_ENV=bsd
6635      ;;
6636    *cygwin*)
6637      VAR_OS=windows
6638      VAR_OS_API=winapi
6639      VAR_OS_ENV=windows.cygwin
6640      ;;
6641    *mingw*)
6642      VAR_OS=windows
6643      VAR_OS_API=winapi
6644      VAR_OS_ENV=windows.msys
6645      ;;
6646    *)
6647      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6648      ;;
6649  esac
6650
6651
6652  # First argument is the cpu name from the trip/quad
6653  case "$host_cpu" in
6654    x86_64)
6655      VAR_CPU=x86_64
6656      VAR_CPU_ARCH=x86
6657      VAR_CPU_BITS=64
6658      VAR_CPU_ENDIAN=little
6659      ;;
6660    i?86)
6661      VAR_CPU=x86
6662      VAR_CPU_ARCH=x86
6663      VAR_CPU_BITS=32
6664      VAR_CPU_ENDIAN=little
6665      ;;
6666    arm*)
6667      VAR_CPU=arm
6668      VAR_CPU_ARCH=arm
6669      VAR_CPU_BITS=32
6670      VAR_CPU_ENDIAN=little
6671      ;;
6672    powerpc)
6673      VAR_CPU=ppc
6674      VAR_CPU_ARCH=ppc
6675      VAR_CPU_BITS=32
6676      VAR_CPU_ENDIAN=big
6677       ;;
6678    powerpc64)
6679      VAR_CPU=ppc64
6680      VAR_CPU_ARCH=ppc
6681      VAR_CPU_BITS=64
6682      VAR_CPU_ENDIAN=big
6683       ;;
6684    sparc)
6685      VAR_CPU=sparc
6686      VAR_CPU_ARCH=sparc
6687      VAR_CPU_BITS=32
6688      VAR_CPU_ENDIAN=big
6689       ;;
6690    sparcv9)
6691      VAR_CPU=sparcv9
6692      VAR_CPU_ARCH=sparc
6693      VAR_CPU_BITS=64
6694      VAR_CPU_ENDIAN=big
6695       ;;
6696    *)
6697      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6698      ;;
6699  esac
6700
6701    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6702    OPENJDK_TARGET_OS="$VAR_OS"
6703    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6704    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6705    OPENJDK_TARGET_CPU="$VAR_CPU"
6706    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6707    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6708    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6709
6710
6711
6712
6713
6714
6715
6716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6717$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6719$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6720
6721
6722
6723# Check whether --with-target-bits was given.
6724if test "${with_target_bits+set}" = set; then :
6725  withval=$with_target_bits;
6726fi
6727
6728
6729  # We have three types of compiles:
6730  # native  == normal compilation, target system == build system
6731  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6732  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6733  #
6734  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6735    # We're doing a proper cross-compilation
6736    COMPILE_TYPE="cross"
6737  else
6738    COMPILE_TYPE="native"
6739  fi
6740
6741  if test "x$with_target_bits" != x; then
6742    if test "x$COMPILE_TYPE" = "xcross"; then
6743      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6744    fi
6745
6746    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6747      # A reduced build is requested
6748      COMPILE_TYPE="reduced"
6749      OPENJDK_TARGET_CPU_BITS=32
6750      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6751        OPENJDK_TARGET_CPU=x86
6752      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6753        OPENJDK_TARGET_CPU=sparc
6754      else
6755        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6756      fi
6757    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6758      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
6759    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6760      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6761$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6762    else
6763      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6764    fi
6765  fi
6766
6767
6768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6769$as_echo_n "checking compilation type... " >&6; }
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6771$as_echo "$COMPILE_TYPE" >&6; }
6772
6773
6774    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6775       REQUIRED_OS_NAME=SunOS
6776       REQUIRED_OS_VERSION=5.10
6777    fi
6778    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6779       REQUIRED_OS_NAME=Linux
6780       REQUIRED_OS_VERSION=2.6
6781    fi
6782    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6783        REQUIRED_OS_NAME=Windows
6784        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6785            REQUIRED_OS_VERSION=5.2
6786        else
6787            REQUIRED_OS_VERSION=5.1
6788        fi
6789    fi
6790    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6791        REQUIRED_OS_NAME=Darwin
6792        REQUIRED_OS_VERSION=11.2
6793    fi
6794
6795
6796
6797
6798
6799    # Also store the legacy naming of the cpu.
6800    # Ie i586 and amd64 instead of x86 and x86_64
6801    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6802    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6803      OPENJDK_TARGET_CPU_LEGACY="i586"
6804    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6805      # On all platforms except MacOSX replace x86_64 with amd64.
6806      OPENJDK_TARGET_CPU_LEGACY="amd64"
6807    fi
6808
6809
6810    # And the second legacy naming of the cpu.
6811    # Ie i386 and amd64 instead of x86 and x86_64.
6812    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6813    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6814      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6815    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6816      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6817    fi
6818
6819
6820    # This is the name of the cpu (but using i386 and amd64 instead of
6821    # x86 and x86_64, respectively), preceeded by a /, to be used when
6822    # locating libraries. On macosx, it's empty, though.
6823    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6824    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6825        OPENJDK_TARGET_CPU_LIBDIR=""
6826    fi
6827
6828
6829    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6830    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6831    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6832    OPENJDK_TARGET_CPU_ISADIR=""
6833    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6834      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6835          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6836      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6837          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6838      fi
6839    fi
6840
6841
6842    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6843    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6844    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6845      # On linux only, we replace x86 with i386.
6846      OPENJDK_TARGET_CPU_OSARCH="i386"
6847    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6848      # On all platforms except macosx, we replace x86_64 with amd64.
6849      OPENJDK_TARGET_CPU_OSARCH="amd64"
6850    fi
6851
6852
6853    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6854    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6855      OPENJDK_TARGET_CPU_JLI="i386"
6856    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6857      # On all platforms except macosx, we replace x86_64 with amd64.
6858      OPENJDK_TARGET_CPU_JLI="amd64"
6859    fi
6860    # Now setup the -D flags for building libjli.
6861    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6862    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6863      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6864        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6865      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6866        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6867      fi
6868    fi
6869
6870
6871    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6872    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6873        OPENJDK_TARGET_OS_API_DIR="solaris"
6874    fi
6875    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6876        OPENJDK_TARGET_OS_API_DIR="windows"
6877    fi
6878
6879
6880    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6881        A_LP64="LP64:="
6882        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6883        # unpack200.exe
6884        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6885            ADD_LP64="-D_LP64=1"
6886        fi
6887    fi
6888    LP64=$A_LP64
6889
6890
6891    if test "x$COMPILE_TYPE" = "xcross"; then
6892      # FIXME: ... or should this include reduced builds..?
6893      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6894    else
6895      DEFINE_CROSS_COMPILE_ARCH=""
6896    fi
6897
6898
6899
6900
6901# Continue setting up basic stuff. Most remaining code require fundamental tools.
6902
6903# Locate the directory of this script.
6904SCRIPT="$0"
6905
6906    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6907        # Follow a chain of symbolic links. Use readlink
6908        # where it exists, else fall back to horribly
6909        # complicated shell code.
6910        if test "x$READLINK_TESTED" != yes; then
6911            # On MacOSX there is a readlink tool with a different
6912            # purpose than the GNU readlink tool. Check the found readlink.
6913            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
6914            if test "x$ISGNU" = x; then
6915                 # A readlink that we do not know how to use.
6916                 # Are there other non-GNU readlinks out there?
6917                 READLINK_TESTED=yes
6918                 READLINK=
6919            fi
6920        fi
6921
6922        if test "x$READLINK" != x; then
6923            SCRIPT=`$READLINK -f $SCRIPT`
6924        else
6925            # Save the current directory for restoring afterwards
6926            STARTDIR=$PWD
6927            COUNTER=0
6928            sym_link_dir=`$DIRNAME $SCRIPT`
6929            sym_link_file=`$BASENAME $SCRIPT`
6930            # Use the system pwd and not the shell builtin to resolve directory symlinks
6931            cd $sym_link_dir
6932            cd `$THEPWDCMD`
6933            sym_link_dir=`$THEPWDCMD`
6934            # Resolve file symlinks
6935            while test $COUNTER -lt 20; do
6936                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6937                if test "x$ISLINK" == x; then
6938                    # This is not a symbolic link! We are done!
6939                    break
6940                fi
6941                # Again resolve directory symlinks since the target of the just found
6942                # link could be in a different directory
6943                cd `$DIRNAME $ISLINK`
6944                sym_link_dir=`$THEPWDCMD`
6945                sym_link_file=`$BASENAME $ISLINK`
6946                let COUNTER=COUNTER+1
6947            done
6948            cd $STARTDIR
6949            SCRIPT=$sym_link_dir/$sym_link_file
6950        fi
6951    fi
6952
6953AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6954
6955# Where is the source? It is located two levels above the configure script.
6956CURDIR="$PWD"
6957cd "$AUTOCONF_DIR/../.."
6958SRC_ROOT="`$THEPWDCMD`"
6959
6960if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6961  PATH_SEP=";"
6962
6963  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6964  if test $SRC_ROOT_LENGTH -gt 100; then
6965      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6966  fi
6967
6968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6970$as_echo_n "checking cygwin release... " >&6; }
6971    CYGWIN_VERSION=`$UNAME -r`
6972    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6973$as_echo "$CYGWIN_VERSION" >&6; }
6974    WINDOWS_ENV_VENDOR='cygwin'
6975    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6976
6977    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6978    if test "x$CYGWIN_VERSION_OK" = x; then
6979      { $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
6980$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;}
6981      as_fn_error $? "Cannot continue" "$LINENO" 5
6982    fi
6983    if test "x$CYGPATH" = x; then
6984        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6985    fi
6986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6987$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6988    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6989    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6990    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6991    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6993$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6994    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6995    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6996    if test "x$test_cygdrive_prefix" = x; then
6997        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6998    fi
6999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7001$as_echo_n "checking msys release... " >&6; }
7002    MSYS_VERSION=`$UNAME -r`
7003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7004$as_echo "$MSYS_VERSION" >&6; }
7005
7006    WINDOWS_ENV_VENDOR='msys'
7007    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7008
7009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7010$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7011    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7012    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7013
7014  windows_path="$MSYS_ROOT_PATH"
7015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7016    unix_path=`$CYGPATH -u "$windows_path"`
7017    MSYS_ROOT_PATH="$unix_path"
7018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7020    MSYS_ROOT_PATH="$unix_path"
7021  fi
7022
7023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7024$as_echo "$MSYS_ROOT_PATH" >&6; }
7025    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7026  else
7027    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7028  fi
7029
7030  # Test if windows or unix (cygwin/msys) find is first in path.
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7032$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7033  FIND_BINARY_OUTPUT=`find --version 2>&1`
7034  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7036$as_echo "unix style" >&6; }
7037  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7039$as_echo "Windows" >&6; }
7040    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7041$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7042    { $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
7043$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7044    as_fn_error $? "Cannot continue" "$LINENO" 5
7045  else
7046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7047$as_echo "unknown" >&6; }
7048    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7049$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7050  fi
7051
7052else
7053  PATH_SEP=":"
7054fi
7055
7056
7057
7058cd "$CURDIR"
7059
7060
7061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7062
7063  # Input might be given as Windows format, start by converting to
7064  # unix format.
7065  path="$SRC_ROOT"
7066  new_path=`$CYGPATH -u "$path"`
7067
7068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7071  # "foo.exe" is OK but "foo" is an error.
7072  #
7073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7074  # It is also a way to make sure we got the proper file name for the real test later on.
7075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7076  if test "x$test_shortpath" = x; then
7077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7078$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7079    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7080  fi
7081
7082  # Call helper function which possibly converts this using DOS-style short mode.
7083  # If so, the updated path is stored in $new_path.
7084
7085  input_path="$new_path"
7086  # Check if we need to convert this using DOS-style short mode. If the path
7087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7088  # take no chances and rewrite it.
7089  # Note: m4 eats our [], so we need to use [ and ] instead.
7090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7091  if test "x$has_forbidden_chars" != x; then
7092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7096      # Going to short mode and back again did indeed matter. Since short mode is
7097      # case insensitive, let's make it lowercase to improve readability.
7098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7099      # Now convert it back to Unix-stile (cygpath)
7100      input_path=`$CYGPATH -u "$shortmode_path"`
7101      new_path="$input_path"
7102    fi
7103  fi
7104
7105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7106  if test "x$test_cygdrive_prefix" = x; then
7107    # As a simple fix, exclude /usr/bin since it's not a real path.
7108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7110      # a path prefixed by /cygdrive for fixpath to work.
7111      new_path="$CYGWIN_ROOT_PATH$input_path"
7112    fi
7113  fi
7114
7115
7116  if test "x$path" != "x$new_path"; then
7117    SRC_ROOT="$new_path"
7118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7119$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7120  fi
7121
7122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7123
7124  path="$SRC_ROOT"
7125  has_colon=`$ECHO $path | $GREP ^.:`
7126  new_path="$path"
7127  if test "x$has_colon" = x; then
7128    # Not in mixed or Windows style, start by that.
7129    new_path=`cmd //c echo $path`
7130  fi
7131
7132
7133  input_path="$new_path"
7134  # Check if we need to convert this using DOS-style short mode. If the path
7135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7136  # take no chances and rewrite it.
7137  # Note: m4 eats our [], so we need to use [ and ] instead.
7138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7139  if test "x$has_forbidden_chars" != x; then
7140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7142  fi
7143
7144
7145  windows_path="$new_path"
7146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7147    unix_path=`$CYGPATH -u "$windows_path"`
7148    new_path="$unix_path"
7149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7151    new_path="$unix_path"
7152  fi
7153
7154  if test "x$path" != "x$new_path"; then
7155    SRC_ROOT="$new_path"
7156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7157$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7158  fi
7159
7160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7162
7163  else
7164    # We're on a posix platform. Hooray! :)
7165    path="$SRC_ROOT"
7166
7167    if test ! -f "$path" && test ! -d "$path"; then
7168      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7169    fi
7170
7171    has_space=`$ECHO "$path" | $GREP " "`
7172    if test "x$has_space" != x; then
7173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7174$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7175      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7176    fi
7177  fi
7178
7179
7180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7181
7182  # Input might be given as Windows format, start by converting to
7183  # unix format.
7184  path="$CURDIR"
7185  new_path=`$CYGPATH -u "$path"`
7186
7187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7190  # "foo.exe" is OK but "foo" is an error.
7191  #
7192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7193  # It is also a way to make sure we got the proper file name for the real test later on.
7194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7195  if test "x$test_shortpath" = x; then
7196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7197$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7198    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7199  fi
7200
7201  # Call helper function which possibly converts this using DOS-style short mode.
7202  # If so, the updated path is stored in $new_path.
7203
7204  input_path="$new_path"
7205  # Check if we need to convert this using DOS-style short mode. If the path
7206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7207  # take no chances and rewrite it.
7208  # Note: m4 eats our [], so we need to use [ and ] instead.
7209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7210  if test "x$has_forbidden_chars" != x; then
7211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7215      # Going to short mode and back again did indeed matter. Since short mode is
7216      # case insensitive, let's make it lowercase to improve readability.
7217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7218      # Now convert it back to Unix-stile (cygpath)
7219      input_path=`$CYGPATH -u "$shortmode_path"`
7220      new_path="$input_path"
7221    fi
7222  fi
7223
7224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7225  if test "x$test_cygdrive_prefix" = x; then
7226    # As a simple fix, exclude /usr/bin since it's not a real path.
7227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7229      # a path prefixed by /cygdrive for fixpath to work.
7230      new_path="$CYGWIN_ROOT_PATH$input_path"
7231    fi
7232  fi
7233
7234
7235  if test "x$path" != "x$new_path"; then
7236    CURDIR="$new_path"
7237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7238$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7239  fi
7240
7241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7242
7243  path="$CURDIR"
7244  has_colon=`$ECHO $path | $GREP ^.:`
7245  new_path="$path"
7246  if test "x$has_colon" = x; then
7247    # Not in mixed or Windows style, start by that.
7248    new_path=`cmd //c echo $path`
7249  fi
7250
7251
7252  input_path="$new_path"
7253  # Check if we need to convert this using DOS-style short mode. If the path
7254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7255  # take no chances and rewrite it.
7256  # Note: m4 eats our [], so we need to use [ and ] instead.
7257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7258  if test "x$has_forbidden_chars" != x; then
7259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7261  fi
7262
7263
7264  windows_path="$new_path"
7265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7266    unix_path=`$CYGPATH -u "$windows_path"`
7267    new_path="$unix_path"
7268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7270    new_path="$unix_path"
7271  fi
7272
7273  if test "x$path" != "x$new_path"; then
7274    CURDIR="$new_path"
7275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7276$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7277  fi
7278
7279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7281
7282  else
7283    # We're on a posix platform. Hooray! :)
7284    path="$CURDIR"
7285
7286    if test ! -f "$path" && test ! -d "$path"; then
7287      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7288    fi
7289
7290    has_space=`$ECHO "$path" | $GREP " "`
7291    if test "x$has_space" != x; then
7292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7293$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7294      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7295    fi
7296  fi
7297
7298
7299if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7300    # Add extra search paths on solaris for utilities like ar and as etc...
7301    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7302fi
7303
7304# You can force the sys-root if the sys-root encoded into the cross compiler tools
7305# is not correct.
7306
7307# Check whether --with-sys-root was given.
7308if test "${with_sys_root+set}" = set; then :
7309  withval=$with_sys_root;
7310fi
7311
7312
7313if test "x$with_sys_root" != x; then
7314  SYS_ROOT=$with_sys_root
7315else
7316  SYS_ROOT=/
7317fi
7318
7319
7320
7321# Check whether --with-tools-dir was given.
7322if test "${with_tools_dir+set}" = set; then :
7323  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7324fi
7325
7326
7327
7328# Check whether --with-devkit was given.
7329if test "${with_devkit+set}" = set; then :
7330  withval=$with_devkit;
7331    if test "x$with_sys_root" != x; then
7332      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7333    fi
7334    if test "x$with_tools_dir" != x; then
7335      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7336    fi
7337    TOOLS_DIR=$with_devkit/bin
7338    SYS_ROOT=$with_devkit/$host_alias/libc
7339
7340fi
7341
7342
7343
7344
7345# Setup default logging of stdout and stderr to build.log in the output root.
7346BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7347BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7348BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7349
7350
7351
7352
7353
7354# These are needed to be able to create a configuration name (and thus the output directory)
7355
7356###############################################################################
7357#
7358# Check which variant of the JDK that we want to build.
7359# Currently we have:
7360#    normal:   standard edition
7361# but the custom make system may add other variants
7362#
7363# Effectively the JDK variant gives a name to a specific set of
7364# modules to compile into the JDK. In the future, these modules
7365# might even be Jigsaw modules.
7366#
7367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7368$as_echo_n "checking which variant of the JDK to build... " >&6; }
7369
7370# Check whether --with-jdk-variant was given.
7371if test "${with_jdk_variant+set}" = set; then :
7372  withval=$with_jdk_variant;
7373fi
7374
7375
7376if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7377    JDK_VARIANT="normal"
7378else
7379    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7380fi
7381
7382
7383
7384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7385$as_echo "$JDK_VARIANT" >&6; }
7386
7387
7388
7389###############################################################################
7390#
7391# Check which variants of the JVM that we want to build.
7392# Currently we have:
7393#    server: normal interpreter and a tiered C1/C2 compiler
7394#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7395#    minimal1: reduced form of client with optional VM services and features stripped out
7396#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7397#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7398#    zero: no machine code interpreter, no compiler
7399#    zeroshark: zero interpreter and shark/llvm compiler backend
7400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7401$as_echo_n "checking which variants of the JVM to build... " >&6; }
7402
7403# Check whether --with-jvm-variants was given.
7404if test "${with_jvm_variants+set}" = set; then :
7405  withval=$with_jvm_variants;
7406fi
7407
7408
7409if test "x$with_jvm_variants" = x; then
7410     with_jvm_variants="server"
7411fi
7412
7413JVM_VARIANTS=",$with_jvm_variants,"
7414TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7415
7416if test "x$TEST_VARIANTS" != "x,"; then
7417   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7418fi
7419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7420$as_echo "$with_jvm_variants" >&6; }
7421
7422JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7423JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7424JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7425JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7426JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7427JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7428
7429if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7430    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7431        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7432    fi
7433fi
7434if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7435    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7436        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7437    fi
7438fi
7439if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7440    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7441        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7442    fi
7443fi
7444
7445# Replace the commas with AND for use in the build directory name.
7446ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7447COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7448if test "x$COUNT_VARIANTS" != "x,1"; then
7449    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7450else
7451    BUILDING_MULTIPLE_JVM_VARIANTS=no
7452fi
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7463   MACOSX_UNIVERSAL="true"
7464fi
7465
7466
7467
7468
7469
7470###############################################################################
7471#
7472# Set the debug level
7473#    release: no debug information, all optimizations, no asserts.
7474#    fastdebug: debug information (-g), all optimizations, all asserts
7475#    slowdebug: debug information (-g), no optimizations, all asserts
7476#
7477DEBUG_LEVEL="release"
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7479$as_echo_n "checking which debug level to use... " >&6; }
7480# Check whether --enable-debug was given.
7481if test "${enable_debug+set}" = set; then :
7482  enableval=$enable_debug;
7483        ENABLE_DEBUG="${enableval}"
7484        DEBUG_LEVEL="fastdebug"
7485
7486else
7487  ENABLE_DEBUG="no"
7488fi
7489
7490
7491
7492# Check whether --with-debug-level was given.
7493if test "${with_debug_level+set}" = set; then :
7494  withval=$with_debug_level;
7495        DEBUG_LEVEL="${withval}"
7496        if test "x$ENABLE_DEBUG" = xyes; then
7497			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7498        fi
7499
7500fi
7501
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7503$as_echo "$DEBUG_LEVEL" >&6; }
7504
7505if test "x$DEBUG_LEVEL" != xrelease && \
7506   test "x$DEBUG_LEVEL" != xfastdebug && \
7507   test "x$DEBUG_LEVEL" != xslowdebug; then
7508   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7509fi
7510
7511
7512###############################################################################
7513#
7514# Setup legacy vars/targets and new vars to deal with different debug levels.
7515#
7516
7517case $DEBUG_LEVEL in
7518      release )
7519          VARIANT="OPT"
7520          FASTDEBUG="false"
7521          DEBUG_CLASSFILES="false"
7522          BUILD_VARIANT_RELEASE=""
7523          HOTSPOT_DEBUG_LEVEL="product"
7524          HOTSPOT_EXPORT="product"
7525           ;;
7526      fastdebug )
7527          VARIANT="DBG"
7528          FASTDEBUG="true"
7529          DEBUG_CLASSFILES="true"
7530          BUILD_VARIANT_RELEASE="-fastdebug"
7531          HOTSPOT_DEBUG_LEVEL="fastdebug"
7532          HOTSPOT_EXPORT="fastdebug"
7533           ;;
7534      slowdebug )
7535          VARIANT="DBG"
7536          FASTDEBUG="false"
7537          DEBUG_CLASSFILES="true"
7538          BUILD_VARIANT_RELEASE="-debug"
7539          HOTSPOT_DEBUG_LEVEL="jvmg"
7540          HOTSPOT_EXPORT="debug"
7541           ;;
7542esac
7543
7544#####
7545# Generate the legacy makefile targets for hotspot.
7546# The hotspot api for selecting the build artifacts, really, needs to be improved.
7547# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7548# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7549# But until then ...
7550HOTSPOT_TARGET=""
7551
7552if test "x$JVM_VARIANT_SERVER" = xtrue; then
7553    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7554fi
7555
7556if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7557    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7558fi
7559
7560if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7561    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7562fi
7563
7564if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7565    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7566fi
7567
7568if test "x$JVM_VARIANT_ZERO" = xtrue; then
7569    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7570fi
7571
7572if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7573    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7574fi
7575
7576HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7577
7578# On Macosx universal binaries are produced, but they only contain
7579# 64 bit intel. This invalidates control of which jvms are built
7580# from configure, but only server is valid anyway. Fix this
7581# when hotspot makefiles are rewritten.
7582if test "x$MACOSX_UNIVERSAL" = xtrue; then
7583    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7584fi
7585
7586#####
7587
7588
7589
7590
7591
7592
7593
7594
7595# With basic setup done, call the custom early hook.
7596
7597
7598# To properly create a configuration name, we need to have the OpenJDK target
7599# and options (variants and debug level) parsed.
7600
7601
7602
7603# Check whether --with-conf-name was given.
7604if test "${with_conf_name+set}" = set; then :
7605  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7606fi
7607
7608
7609# Test from where we are running configure, in or outside of src root.
7610# To enable comparison of directories, CURDIR needs to be symlink free
7611# just like SRC_ROOT already is
7612NOSYM_CURDIR="$CURDIR"
7613
7614    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7615        # Follow a chain of symbolic links. Use readlink
7616        # where it exists, else fall back to horribly
7617        # complicated shell code.
7618        if test "x$READLINK_TESTED" != yes; then
7619            # On MacOSX there is a readlink tool with a different
7620            # purpose than the GNU readlink tool. Check the found readlink.
7621            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7622            if test "x$ISGNU" = x; then
7623                 # A readlink that we do not know how to use.
7624                 # Are there other non-GNU readlinks out there?
7625                 READLINK_TESTED=yes
7626                 READLINK=
7627            fi
7628        fi
7629
7630        if test "x$READLINK" != x; then
7631            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7632        else
7633            # Save the current directory for restoring afterwards
7634            STARTDIR=$PWD
7635            COUNTER=0
7636            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7637            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7638            # Use the system pwd and not the shell builtin to resolve directory symlinks
7639            cd $sym_link_dir
7640            cd `$THEPWDCMD`
7641            sym_link_dir=`$THEPWDCMD`
7642            # Resolve file symlinks
7643            while test $COUNTER -lt 20; do
7644                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7645                if test "x$ISLINK" == x; then
7646                    # This is not a symbolic link! We are done!
7647                    break
7648                fi
7649                # Again resolve directory symlinks since the target of the just found
7650                # link could be in a different directory
7651                cd `$DIRNAME $ISLINK`
7652                sym_link_dir=`$THEPWDCMD`
7653                sym_link_file=`$BASENAME $ISLINK`
7654                let COUNTER=COUNTER+1
7655            done
7656            cd $STARTDIR
7657            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7658        fi
7659    fi
7660
7661if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7662        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7663        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7664    # We are running configure from the src root.
7665    # Create a default ./build/target-variant-debuglevel output root.
7666    if test "x${CONF_NAME}" = x; then
7667        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7668    fi
7669    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7670    $MKDIR -p "$OUTPUT_ROOT"
7671    if test ! -d "$OUTPUT_ROOT"; then
7672        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7673    fi
7674else
7675    # We are running configure from outside of the src dir.
7676    # Then use the current directory as output dir!
7677    # If configuration is situated in normal build directory, just use the build
7678    # directory name as configuration name, otherwise use the complete path.
7679    if test "x${CONF_NAME}" = x; then
7680        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7681    fi
7682    OUTPUT_ROOT="$CURDIR"
7683
7684    # WARNING: This might be a bad thing to do. You need to be sure you want to
7685    # have a configuration in this directory. Do some sanity checks!
7686
7687    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7688      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7689      # other files
7690      files_present=`$LS $OUTPUT_ROOT`
7691      # Configure has already touched config.log and confdefs.h in the current dir when this check
7692      # is performed.
7693      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7694                                             | $TR -d '\n'`
7695      if test "x$filtered_files" != x; then
7696        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7697$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7698        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7699$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7700        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7701$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7703$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7705$as_echo "$as_me: seriously mess up just about everything." >&6;}
7706        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7707$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7708        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7709$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7710        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7711      fi
7712    fi
7713fi
7714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7715$as_echo_n "checking what configuration name to use... " >&6; }
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7717$as_echo "$CONF_NAME" >&6; }
7718
7719
7720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7721
7722  # Input might be given as Windows format, start by converting to
7723  # unix format.
7724  path="$OUTPUT_ROOT"
7725  new_path=`$CYGPATH -u "$path"`
7726
7727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7730  # "foo.exe" is OK but "foo" is an error.
7731  #
7732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7733  # It is also a way to make sure we got the proper file name for the real test later on.
7734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7735  if test "x$test_shortpath" = x; then
7736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7737$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7738    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7739  fi
7740
7741  # Call helper function which possibly converts this using DOS-style short mode.
7742  # If so, the updated path is stored in $new_path.
7743
7744  input_path="$new_path"
7745  # Check if we need to convert this using DOS-style short mode. If the path
7746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7747  # take no chances and rewrite it.
7748  # Note: m4 eats our [], so we need to use [ and ] instead.
7749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7750  if test "x$has_forbidden_chars" != x; then
7751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7755      # Going to short mode and back again did indeed matter. Since short mode is
7756      # case insensitive, let's make it lowercase to improve readability.
7757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7758      # Now convert it back to Unix-stile (cygpath)
7759      input_path=`$CYGPATH -u "$shortmode_path"`
7760      new_path="$input_path"
7761    fi
7762  fi
7763
7764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7765  if test "x$test_cygdrive_prefix" = x; then
7766    # As a simple fix, exclude /usr/bin since it's not a real path.
7767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7769      # a path prefixed by /cygdrive for fixpath to work.
7770      new_path="$CYGWIN_ROOT_PATH$input_path"
7771    fi
7772  fi
7773
7774
7775  if test "x$path" != "x$new_path"; then
7776    OUTPUT_ROOT="$new_path"
7777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7778$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7779  fi
7780
7781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7782
7783  path="$OUTPUT_ROOT"
7784  has_colon=`$ECHO $path | $GREP ^.:`
7785  new_path="$path"
7786  if test "x$has_colon" = x; then
7787    # Not in mixed or Windows style, start by that.
7788    new_path=`cmd //c echo $path`
7789  fi
7790
7791
7792  input_path="$new_path"
7793  # Check if we need to convert this using DOS-style short mode. If the path
7794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7795  # take no chances and rewrite it.
7796  # Note: m4 eats our [], so we need to use [ and ] instead.
7797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7798  if test "x$has_forbidden_chars" != x; then
7799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7801  fi
7802
7803
7804  windows_path="$new_path"
7805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7806    unix_path=`$CYGPATH -u "$windows_path"`
7807    new_path="$unix_path"
7808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7810    new_path="$unix_path"
7811  fi
7812
7813  if test "x$path" != "x$new_path"; then
7814    OUTPUT_ROOT="$new_path"
7815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7816$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7817  fi
7818
7819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7821
7822  else
7823    # We're on a posix platform. Hooray! :)
7824    path="$OUTPUT_ROOT"
7825
7826    if test ! -f "$path" && test ! -d "$path"; then
7827      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7828    fi
7829
7830    has_space=`$ECHO "$path" | $GREP " "`
7831    if test "x$has_space" != x; then
7832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7833$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7834      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7835    fi
7836  fi
7837
7838
7839SPEC=$OUTPUT_ROOT/spec.gmk
7840
7841CONF_NAME=$CONF_NAME
7842
7843OUTPUT_ROOT=$OUTPUT_ROOT
7844
7845
7846# Most of the probed defines are put into config.h
7847ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7848
7849# The spec.gmk file contains all variables for the make system.
7850ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7851
7852# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7853ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7854
7855# The bootcycle-spec.gmk file contains support for boot cycle builds.
7856ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7857
7858# The compare.sh is used to compare the build output to other builds.
7859ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7860
7861# Spec.sh is currently used by compare-objects.sh
7862ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7863
7864# The generated Makefile knows where the spec.gmk is and where the source is.
7865# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7866# which will look for generated configurations
7867ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7868
7869
7870# Save the arguments given to us
7871echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7872
7873
7874# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7875
7876    for ac_prog in apt-get yum port pkgutil pkgadd
7877do
7878  # Extract the first word of "$ac_prog", so it can be a program name with args.
7879set dummy $ac_prog; ac_word=$2
7880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7881$as_echo_n "checking for $ac_word... " >&6; }
7882if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7883  $as_echo_n "(cached) " >&6
7884else
7885  if test -n "$PKGHANDLER"; then
7886  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7887else
7888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7889for as_dir in $PATH
7890do
7891  IFS=$as_save_IFS
7892  test -z "$as_dir" && as_dir=.
7893    for ac_exec_ext in '' $ac_executable_extensions; do
7894  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7895    ac_cv_prog_PKGHANDLER="$ac_prog"
7896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7897    break 2
7898  fi
7899done
7900  done
7901IFS=$as_save_IFS
7902
7903fi
7904fi
7905PKGHANDLER=$ac_cv_prog_PKGHANDLER
7906if test -n "$PKGHANDLER"; then
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7908$as_echo "$PKGHANDLER" >&6; }
7909else
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911$as_echo "no" >&6; }
7912fi
7913
7914
7915  test -n "$PKGHANDLER" && break
7916done
7917
7918
7919
7920# Setup tools that requires more complex handling, or that is not needed by the configure script.
7921
7922
7923  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7924  if test "x$MAKE" != x; then
7925    # User has supplied a make, test it.
7926    if test ! -f "$MAKE"; then
7927      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7928    fi
7929
7930  MAKE_CANDIDATE=""$MAKE""
7931  DESCRIPTION="user supplied MAKE=$MAKE"
7932  if test "x$MAKE_CANDIDATE" != x; then
7933    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7934$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7935    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7936    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7937    if test "x$IS_GNU_MAKE" = x; then
7938      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7939$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7940    else
7941      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7942      if test "x$IS_MODERN_MAKE" = x; then
7943        { $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
7944$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;}
7945      else
7946        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7947          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7948            MAKE_EXPECTED_ENV='cygwin'
7949          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7950            MAKE_EXPECTED_ENV='msys'
7951          else
7952            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7953          fi
7954          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7955          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7956        else
7957          # Not relevant for non-Windows
7958          IS_MAKE_CORRECT_ENV=true
7959        fi
7960        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7961          { $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
7962$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;}
7963        else
7964          FOUND_MAKE=$MAKE_CANDIDATE
7965
7966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7967
7968  # First separate the path from the arguments. This will split at the first
7969  # space.
7970  complete="$FOUND_MAKE"
7971  path="${complete%% *}"
7972  tmp="$complete EOL"
7973  arguments="${tmp#* }"
7974
7975  # Input might be given as Windows format, start by converting to
7976  # unix format.
7977  new_path=`$CYGPATH -u "$path"`
7978
7979  # Now try to locate executable using which
7980  new_path=`$WHICH "$new_path" 2> /dev/null`
7981  # bat and cmd files are not always considered executable in cygwin causing which
7982  # to not find them
7983  if test "x$new_path" = x \
7984           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7985           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7986    new_path=`$CYGPATH -u "$path"`
7987  fi
7988  if test "x$new_path" = x; then
7989    # Oops. Which didn't find the executable.
7990    # The splitting of arguments from the executable at a space might have been incorrect,
7991    # since paths with space are more likely in Windows. Give it another try with the whole
7992    # argument.
7993    path="$complete"
7994    arguments="EOL"
7995    new_path=`$CYGPATH -u "$path"`
7996    new_path=`$WHICH "$new_path" 2> /dev/null`
7997    # bat and cmd files are not always considered executable in cygwin causing which
7998    # to not find them
7999    if test "x$new_path" = x \
8000             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8001             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8002      new_path=`$CYGPATH -u "$path"`
8003    fi
8004    if test "x$new_path" = x; then
8005      # It's still not found. Now this is an unrecoverable error.
8006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8007$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8008      has_space=`$ECHO "$complete" | $GREP " "`
8009      if test "x$has_space" != x; then
8010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8012      fi
8013      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8014    fi
8015  fi
8016
8017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8020  # "foo.exe" is OK but "foo" is an error.
8021  #
8022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8023  # It is also a way to make sure we got the proper file name for the real test later on.
8024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8025  if test "x$test_shortpath" = x; then
8026    # Short path failed, file does not exist as specified.
8027    # Try adding .exe or .cmd
8028    if test -f "${new_path}.exe"; then
8029       input_to_shortpath="${new_path}.exe"
8030    elif test -f "${new_path}.cmd"; then
8031       input_to_shortpath="${new_path}.cmd"
8032    else
8033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8034$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8037      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8038    fi
8039  else
8040    input_to_shortpath="$new_path"
8041  fi
8042
8043  # Call helper function which possibly converts this using DOS-style short mode.
8044  # If so, the updated path is stored in $new_path.
8045  new_path="$input_to_shortpath"
8046
8047  input_path="$input_to_shortpath"
8048  # Check if we need to convert this using DOS-style short mode. If the path
8049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8050  # take no chances and rewrite it.
8051  # Note: m4 eats our [], so we need to use [ and ] instead.
8052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8053  if test "x$has_forbidden_chars" != x; then
8054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8058      # Going to short mode and back again did indeed matter. Since short mode is
8059      # case insensitive, let's make it lowercase to improve readability.
8060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8061      # Now convert it back to Unix-stile (cygpath)
8062      input_path=`$CYGPATH -u "$shortmode_path"`
8063      new_path="$input_path"
8064    fi
8065  fi
8066
8067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8068  if test "x$test_cygdrive_prefix" = x; then
8069    # As a simple fix, exclude /usr/bin since it's not a real path.
8070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8072      # a path prefixed by /cygdrive for fixpath to work.
8073      new_path="$CYGWIN_ROOT_PATH$input_path"
8074    fi
8075  fi
8076
8077  # remove trailing .exe if any
8078  new_path="${new_path/%.exe/}"
8079
8080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8081
8082  # First separate the path from the arguments. This will split at the first
8083  # space.
8084  complete="$FOUND_MAKE"
8085  path="${complete%% *}"
8086  tmp="$complete EOL"
8087  arguments="${tmp#* }"
8088
8089  # Input might be given as Windows format, start by converting to
8090  # unix format.
8091  new_path="$path"
8092
8093  windows_path="$new_path"
8094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8095    unix_path=`$CYGPATH -u "$windows_path"`
8096    new_path="$unix_path"
8097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8099    new_path="$unix_path"
8100  fi
8101
8102
8103  # Now try to locate executable using which
8104  new_path=`$WHICH "$new_path" 2> /dev/null`
8105
8106  if test "x$new_path" = x; then
8107    # Oops. Which didn't find the executable.
8108    # The splitting of arguments from the executable at a space might have been incorrect,
8109    # since paths with space are more likely in Windows. Give it another try with the whole
8110    # argument.
8111    path="$complete"
8112    arguments="EOL"
8113    new_path="$path"
8114
8115  windows_path="$new_path"
8116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8117    unix_path=`$CYGPATH -u "$windows_path"`
8118    new_path="$unix_path"
8119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8121    new_path="$unix_path"
8122  fi
8123
8124
8125    new_path=`$WHICH "$new_path" 2> /dev/null`
8126
8127    if test "x$new_path" = x; then
8128      # It's still not found. Now this is an unrecoverable error.
8129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8130$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8131      has_space=`$ECHO "$complete" | $GREP " "`
8132      if test "x$has_space" != x; then
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8134$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8135      fi
8136      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8137    fi
8138  fi
8139
8140  # Now new_path has a complete unix path to the binary
8141  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8142    # Keep paths in /bin as-is, but remove trailing .exe if any
8143    new_path="${new_path/%.exe/}"
8144    # Do not save /bin paths to all_fixpath_prefixes!
8145  else
8146    # Not in mixed or Windows style, start by that.
8147    new_path=`cmd //c echo $new_path`
8148
8149  input_path="$new_path"
8150  # Check if we need to convert this using DOS-style short mode. If the path
8151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8152  # take no chances and rewrite it.
8153  # Note: m4 eats our [], so we need to use [ and ] instead.
8154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8155  if test "x$has_forbidden_chars" != x; then
8156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8158  fi
8159
8160    # Output is in $new_path
8161
8162  windows_path="$new_path"
8163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8164    unix_path=`$CYGPATH -u "$windows_path"`
8165    new_path="$unix_path"
8166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8168    new_path="$unix_path"
8169  fi
8170
8171    # remove trailing .exe if any
8172    new_path="${new_path/%.exe/}"
8173
8174    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8175    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8176  fi
8177
8178  else
8179    # We're on a posix platform. Hooray! :)
8180    # First separate the path from the arguments. This will split at the first
8181    # space.
8182    complete="$FOUND_MAKE"
8183    path="${complete%% *}"
8184    tmp="$complete EOL"
8185    arguments="${tmp#* }"
8186
8187    # Cannot rely on the command "which" here since it doesn't always work.
8188    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8189    if test -z "$is_absolute_path"; then
8190      # Path to executable is not absolute. Find it.
8191      IFS_save="$IFS"
8192      IFS=:
8193      for p in $PATH; do
8194        if test -f "$p/$path" && test -x "$p/$path"; then
8195          new_path="$p/$path"
8196          break
8197        fi
8198      done
8199      IFS="$IFS_save"
8200    else
8201      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8202$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8203      new_path="$path"
8204    fi
8205
8206    if test "x$new_path" = x; then
8207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8209        has_space=`$ECHO "$complete" | $GREP " "`
8210        if test "x$has_space" != x; then
8211          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8213        fi
8214        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8215      fi
8216  fi
8217
8218      # Now join together the path and the arguments once again
8219      if test "x$arguments" != xEOL; then
8220        new_complete="$new_path ${arguments% *}"
8221      else
8222        new_complete="$new_path"
8223      fi
8224
8225  if test "x$complete" != "x$new_complete"; then
8226      FOUND_MAKE="$new_complete"
8227      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8228$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8229    fi
8230
8231        fi
8232      fi
8233    fi
8234  fi
8235
8236    if test "x$FOUND_MAKE" = x; then
8237      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8238    fi
8239  else
8240    # Try our hardest to locate a correct version of GNU make
8241    for ac_prog in gmake
8242do
8243  # Extract the first word of "$ac_prog", so it can be a program name with args.
8244set dummy $ac_prog; ac_word=$2
8245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8246$as_echo_n "checking for $ac_word... " >&6; }
8247if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8248  $as_echo_n "(cached) " >&6
8249else
8250  case $CHECK_GMAKE in
8251  [\\/]* | ?:[\\/]*)
8252  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8253  ;;
8254  *)
8255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8256for as_dir in $PATH
8257do
8258  IFS=$as_save_IFS
8259  test -z "$as_dir" && as_dir=.
8260    for ac_exec_ext in '' $ac_executable_extensions; do
8261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8262    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8264    break 2
8265  fi
8266done
8267  done
8268IFS=$as_save_IFS
8269
8270  ;;
8271esac
8272fi
8273CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8274if test -n "$CHECK_GMAKE"; then
8275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8276$as_echo "$CHECK_GMAKE" >&6; }
8277else
8278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8279$as_echo "no" >&6; }
8280fi
8281
8282
8283  test -n "$CHECK_GMAKE" && break
8284done
8285
8286
8287  MAKE_CANDIDATE=""$CHECK_GMAKE""
8288  DESCRIPTION="gmake in PATH"
8289  if test "x$MAKE_CANDIDATE" != x; then
8290    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8291$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8292    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8293    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8294    if test "x$IS_GNU_MAKE" = x; then
8295      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8296$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8297    else
8298      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8299      if test "x$IS_MODERN_MAKE" = x; then
8300        { $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
8301$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;}
8302      else
8303        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8304          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8305            MAKE_EXPECTED_ENV='cygwin'
8306          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8307            MAKE_EXPECTED_ENV='msys'
8308          else
8309            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8310          fi
8311          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8312          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8313        else
8314          # Not relevant for non-Windows
8315          IS_MAKE_CORRECT_ENV=true
8316        fi
8317        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8318          { $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
8319$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;}
8320        else
8321          FOUND_MAKE=$MAKE_CANDIDATE
8322
8323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8324
8325  # First separate the path from the arguments. This will split at the first
8326  # space.
8327  complete="$FOUND_MAKE"
8328  path="${complete%% *}"
8329  tmp="$complete EOL"
8330  arguments="${tmp#* }"
8331
8332  # Input might be given as Windows format, start by converting to
8333  # unix format.
8334  new_path=`$CYGPATH -u "$path"`
8335
8336  # Now try to locate executable using which
8337  new_path=`$WHICH "$new_path" 2> /dev/null`
8338  # bat and cmd files are not always considered executable in cygwin causing which
8339  # to not find them
8340  if test "x$new_path" = x \
8341           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8342           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8343    new_path=`$CYGPATH -u "$path"`
8344  fi
8345  if test "x$new_path" = x; then
8346    # Oops. Which didn't find the executable.
8347    # The splitting of arguments from the executable at a space might have been incorrect,
8348    # since paths with space are more likely in Windows. Give it another try with the whole
8349    # argument.
8350    path="$complete"
8351    arguments="EOL"
8352    new_path=`$CYGPATH -u "$path"`
8353    new_path=`$WHICH "$new_path" 2> /dev/null`
8354    # bat and cmd files are not always considered executable in cygwin causing which
8355    # to not find them
8356    if test "x$new_path" = x \
8357             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8358             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8359      new_path=`$CYGPATH -u "$path"`
8360    fi
8361    if test "x$new_path" = x; then
8362      # It's still not found. Now this is an unrecoverable error.
8363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8364$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8365      has_space=`$ECHO "$complete" | $GREP " "`
8366      if test "x$has_space" != x; then
8367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8369      fi
8370      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8371    fi
8372  fi
8373
8374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8377  # "foo.exe" is OK but "foo" is an error.
8378  #
8379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8380  # It is also a way to make sure we got the proper file name for the real test later on.
8381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8382  if test "x$test_shortpath" = x; then
8383    # Short path failed, file does not exist as specified.
8384    # Try adding .exe or .cmd
8385    if test -f "${new_path}.exe"; then
8386       input_to_shortpath="${new_path}.exe"
8387    elif test -f "${new_path}.cmd"; then
8388       input_to_shortpath="${new_path}.cmd"
8389    else
8390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8391$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8392      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8393$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8394      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8395    fi
8396  else
8397    input_to_shortpath="$new_path"
8398  fi
8399
8400  # Call helper function which possibly converts this using DOS-style short mode.
8401  # If so, the updated path is stored in $new_path.
8402  new_path="$input_to_shortpath"
8403
8404  input_path="$input_to_shortpath"
8405  # Check if we need to convert this using DOS-style short mode. If the path
8406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8407  # take no chances and rewrite it.
8408  # Note: m4 eats our [], so we need to use [ and ] instead.
8409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8410  if test "x$has_forbidden_chars" != x; then
8411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8415      # Going to short mode and back again did indeed matter. Since short mode is
8416      # case insensitive, let's make it lowercase to improve readability.
8417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8418      # Now convert it back to Unix-stile (cygpath)
8419      input_path=`$CYGPATH -u "$shortmode_path"`
8420      new_path="$input_path"
8421    fi
8422  fi
8423
8424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8425  if test "x$test_cygdrive_prefix" = x; then
8426    # As a simple fix, exclude /usr/bin since it's not a real path.
8427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8429      # a path prefixed by /cygdrive for fixpath to work.
8430      new_path="$CYGWIN_ROOT_PATH$input_path"
8431    fi
8432  fi
8433
8434  # remove trailing .exe if any
8435  new_path="${new_path/%.exe/}"
8436
8437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8438
8439  # First separate the path from the arguments. This will split at the first
8440  # space.
8441  complete="$FOUND_MAKE"
8442  path="${complete%% *}"
8443  tmp="$complete EOL"
8444  arguments="${tmp#* }"
8445
8446  # Input might be given as Windows format, start by converting to
8447  # unix format.
8448  new_path="$path"
8449
8450  windows_path="$new_path"
8451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8452    unix_path=`$CYGPATH -u "$windows_path"`
8453    new_path="$unix_path"
8454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8456    new_path="$unix_path"
8457  fi
8458
8459
8460  # Now try to locate executable using which
8461  new_path=`$WHICH "$new_path" 2> /dev/null`
8462
8463  if test "x$new_path" = x; then
8464    # Oops. Which didn't find the executable.
8465    # The splitting of arguments from the executable at a space might have been incorrect,
8466    # since paths with space are more likely in Windows. Give it another try with the whole
8467    # argument.
8468    path="$complete"
8469    arguments="EOL"
8470    new_path="$path"
8471
8472  windows_path="$new_path"
8473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8474    unix_path=`$CYGPATH -u "$windows_path"`
8475    new_path="$unix_path"
8476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8478    new_path="$unix_path"
8479  fi
8480
8481
8482    new_path=`$WHICH "$new_path" 2> /dev/null`
8483
8484    if test "x$new_path" = x; then
8485      # It's still not found. Now this is an unrecoverable error.
8486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8488      has_space=`$ECHO "$complete" | $GREP " "`
8489      if test "x$has_space" != x; then
8490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8492      fi
8493      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8494    fi
8495  fi
8496
8497  # Now new_path has a complete unix path to the binary
8498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8499    # Keep paths in /bin as-is, but remove trailing .exe if any
8500    new_path="${new_path/%.exe/}"
8501    # Do not save /bin paths to all_fixpath_prefixes!
8502  else
8503    # Not in mixed or Windows style, start by that.
8504    new_path=`cmd //c echo $new_path`
8505
8506  input_path="$new_path"
8507  # Check if we need to convert this using DOS-style short mode. If the path
8508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8509  # take no chances and rewrite it.
8510  # Note: m4 eats our [], so we need to use [ and ] instead.
8511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8512  if test "x$has_forbidden_chars" != x; then
8513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8515  fi
8516
8517    # Output is in $new_path
8518
8519  windows_path="$new_path"
8520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8521    unix_path=`$CYGPATH -u "$windows_path"`
8522    new_path="$unix_path"
8523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8525    new_path="$unix_path"
8526  fi
8527
8528    # remove trailing .exe if any
8529    new_path="${new_path/%.exe/}"
8530
8531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8533  fi
8534
8535  else
8536    # We're on a posix platform. Hooray! :)
8537    # First separate the path from the arguments. This will split at the first
8538    # space.
8539    complete="$FOUND_MAKE"
8540    path="${complete%% *}"
8541    tmp="$complete EOL"
8542    arguments="${tmp#* }"
8543
8544    # Cannot rely on the command "which" here since it doesn't always work.
8545    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8546    if test -z "$is_absolute_path"; then
8547      # Path to executable is not absolute. Find it.
8548      IFS_save="$IFS"
8549      IFS=:
8550      for p in $PATH; do
8551        if test -f "$p/$path" && test -x "$p/$path"; then
8552          new_path="$p/$path"
8553          break
8554        fi
8555      done
8556      IFS="$IFS_save"
8557    else
8558      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8559$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8560      new_path="$path"
8561    fi
8562
8563    if test "x$new_path" = x; then
8564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8566        has_space=`$ECHO "$complete" | $GREP " "`
8567        if test "x$has_space" != x; then
8568          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8569$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8570        fi
8571        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8572      fi
8573  fi
8574
8575      # Now join together the path and the arguments once again
8576      if test "x$arguments" != xEOL; then
8577        new_complete="$new_path ${arguments% *}"
8578      else
8579        new_complete="$new_path"
8580      fi
8581
8582  if test "x$complete" != "x$new_complete"; then
8583      FOUND_MAKE="$new_complete"
8584      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8585$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8586    fi
8587
8588        fi
8589      fi
8590    fi
8591  fi
8592
8593
8594    if test "x$FOUND_MAKE" = x; then
8595      for ac_prog in make
8596do
8597  # Extract the first word of "$ac_prog", so it can be a program name with args.
8598set dummy $ac_prog; ac_word=$2
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600$as_echo_n "checking for $ac_word... " >&6; }
8601if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8602  $as_echo_n "(cached) " >&6
8603else
8604  case $CHECK_MAKE in
8605  [\\/]* | ?:[\\/]*)
8606  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8607  ;;
8608  *)
8609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610for as_dir in $PATH
8611do
8612  IFS=$as_save_IFS
8613  test -z "$as_dir" && as_dir=.
8614    for ac_exec_ext in '' $ac_executable_extensions; do
8615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8616    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8618    break 2
8619  fi
8620done
8621  done
8622IFS=$as_save_IFS
8623
8624  ;;
8625esac
8626fi
8627CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8628if test -n "$CHECK_MAKE"; then
8629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8630$as_echo "$CHECK_MAKE" >&6; }
8631else
8632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8633$as_echo "no" >&6; }
8634fi
8635
8636
8637  test -n "$CHECK_MAKE" && break
8638done
8639
8640
8641  MAKE_CANDIDATE=""$CHECK_MAKE""
8642  DESCRIPTION="make in PATH"
8643  if test "x$MAKE_CANDIDATE" != x; then
8644    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8645$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8646    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8647    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8648    if test "x$IS_GNU_MAKE" = x; then
8649      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8650$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8651    else
8652      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8653      if test "x$IS_MODERN_MAKE" = x; then
8654        { $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
8655$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;}
8656      else
8657        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8658          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8659            MAKE_EXPECTED_ENV='cygwin'
8660          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8661            MAKE_EXPECTED_ENV='msys'
8662          else
8663            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8664          fi
8665          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8666          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8667        else
8668          # Not relevant for non-Windows
8669          IS_MAKE_CORRECT_ENV=true
8670        fi
8671        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8672          { $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
8673$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;}
8674        else
8675          FOUND_MAKE=$MAKE_CANDIDATE
8676
8677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8678
8679  # First separate the path from the arguments. This will split at the first
8680  # space.
8681  complete="$FOUND_MAKE"
8682  path="${complete%% *}"
8683  tmp="$complete EOL"
8684  arguments="${tmp#* }"
8685
8686  # Input might be given as Windows format, start by converting to
8687  # unix format.
8688  new_path=`$CYGPATH -u "$path"`
8689
8690  # Now try to locate executable using which
8691  new_path=`$WHICH "$new_path" 2> /dev/null`
8692  # bat and cmd files are not always considered executable in cygwin causing which
8693  # to not find them
8694  if test "x$new_path" = x \
8695           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8696           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8697    new_path=`$CYGPATH -u "$path"`
8698  fi
8699  if test "x$new_path" = x; then
8700    # Oops. Which didn't find the executable.
8701    # The splitting of arguments from the executable at a space might have been incorrect,
8702    # since paths with space are more likely in Windows. Give it another try with the whole
8703    # argument.
8704    path="$complete"
8705    arguments="EOL"
8706    new_path=`$CYGPATH -u "$path"`
8707    new_path=`$WHICH "$new_path" 2> /dev/null`
8708    # bat and cmd files are not always considered executable in cygwin causing which
8709    # to not find them
8710    if test "x$new_path" = x \
8711             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8712             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8713      new_path=`$CYGPATH -u "$path"`
8714    fi
8715    if test "x$new_path" = x; then
8716      # It's still not found. Now this is an unrecoverable error.
8717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8718$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8719      has_space=`$ECHO "$complete" | $GREP " "`
8720      if test "x$has_space" != x; then
8721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8723      fi
8724      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8725    fi
8726  fi
8727
8728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8731  # "foo.exe" is OK but "foo" is an error.
8732  #
8733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8734  # It is also a way to make sure we got the proper file name for the real test later on.
8735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8736  if test "x$test_shortpath" = x; then
8737    # Short path failed, file does not exist as specified.
8738    # Try adding .exe or .cmd
8739    if test -f "${new_path}.exe"; then
8740       input_to_shortpath="${new_path}.exe"
8741    elif test -f "${new_path}.cmd"; then
8742       input_to_shortpath="${new_path}.cmd"
8743    else
8744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8745$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8748      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8749    fi
8750  else
8751    input_to_shortpath="$new_path"
8752  fi
8753
8754  # Call helper function which possibly converts this using DOS-style short mode.
8755  # If so, the updated path is stored in $new_path.
8756  new_path="$input_to_shortpath"
8757
8758  input_path="$input_to_shortpath"
8759  # Check if we need to convert this using DOS-style short mode. If the path
8760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8761  # take no chances and rewrite it.
8762  # Note: m4 eats our [], so we need to use [ and ] instead.
8763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8764  if test "x$has_forbidden_chars" != x; then
8765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8769      # Going to short mode and back again did indeed matter. Since short mode is
8770      # case insensitive, let's make it lowercase to improve readability.
8771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8772      # Now convert it back to Unix-stile (cygpath)
8773      input_path=`$CYGPATH -u "$shortmode_path"`
8774      new_path="$input_path"
8775    fi
8776  fi
8777
8778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8779  if test "x$test_cygdrive_prefix" = x; then
8780    # As a simple fix, exclude /usr/bin since it's not a real path.
8781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8783      # a path prefixed by /cygdrive for fixpath to work.
8784      new_path="$CYGWIN_ROOT_PATH$input_path"
8785    fi
8786  fi
8787
8788  # remove trailing .exe if any
8789  new_path="${new_path/%.exe/}"
8790
8791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8792
8793  # First separate the path from the arguments. This will split at the first
8794  # space.
8795  complete="$FOUND_MAKE"
8796  path="${complete%% *}"
8797  tmp="$complete EOL"
8798  arguments="${tmp#* }"
8799
8800  # Input might be given as Windows format, start by converting to
8801  # unix format.
8802  new_path="$path"
8803
8804  windows_path="$new_path"
8805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8806    unix_path=`$CYGPATH -u "$windows_path"`
8807    new_path="$unix_path"
8808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8810    new_path="$unix_path"
8811  fi
8812
8813
8814  # Now try to locate executable using which
8815  new_path=`$WHICH "$new_path" 2> /dev/null`
8816
8817  if test "x$new_path" = x; then
8818    # Oops. Which didn't find the executable.
8819    # The splitting of arguments from the executable at a space might have been incorrect,
8820    # since paths with space are more likely in Windows. Give it another try with the whole
8821    # argument.
8822    path="$complete"
8823    arguments="EOL"
8824    new_path="$path"
8825
8826  windows_path="$new_path"
8827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8828    unix_path=`$CYGPATH -u "$windows_path"`
8829    new_path="$unix_path"
8830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8832    new_path="$unix_path"
8833  fi
8834
8835
8836    new_path=`$WHICH "$new_path" 2> /dev/null`
8837
8838    if test "x$new_path" = x; then
8839      # It's still not found. Now this is an unrecoverable error.
8840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8841$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8842      has_space=`$ECHO "$complete" | $GREP " "`
8843      if test "x$has_space" != x; then
8844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8846      fi
8847      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8848    fi
8849  fi
8850
8851  # Now new_path has a complete unix path to the binary
8852  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8853    # Keep paths in /bin as-is, but remove trailing .exe if any
8854    new_path="${new_path/%.exe/}"
8855    # Do not save /bin paths to all_fixpath_prefixes!
8856  else
8857    # Not in mixed or Windows style, start by that.
8858    new_path=`cmd //c echo $new_path`
8859
8860  input_path="$new_path"
8861  # Check if we need to convert this using DOS-style short mode. If the path
8862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8863  # take no chances and rewrite it.
8864  # Note: m4 eats our [], so we need to use [ and ] instead.
8865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8866  if test "x$has_forbidden_chars" != x; then
8867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8869  fi
8870
8871    # Output is in $new_path
8872
8873  windows_path="$new_path"
8874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8875    unix_path=`$CYGPATH -u "$windows_path"`
8876    new_path="$unix_path"
8877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8879    new_path="$unix_path"
8880  fi
8881
8882    # remove trailing .exe if any
8883    new_path="${new_path/%.exe/}"
8884
8885    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8886    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8887  fi
8888
8889  else
8890    # We're on a posix platform. Hooray! :)
8891    # First separate the path from the arguments. This will split at the first
8892    # space.
8893    complete="$FOUND_MAKE"
8894    path="${complete%% *}"
8895    tmp="$complete EOL"
8896    arguments="${tmp#* }"
8897
8898    # Cannot rely on the command "which" here since it doesn't always work.
8899    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8900    if test -z "$is_absolute_path"; then
8901      # Path to executable is not absolute. Find it.
8902      IFS_save="$IFS"
8903      IFS=:
8904      for p in $PATH; do
8905        if test -f "$p/$path" && test -x "$p/$path"; then
8906          new_path="$p/$path"
8907          break
8908        fi
8909      done
8910      IFS="$IFS_save"
8911    else
8912      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8913$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8914      new_path="$path"
8915    fi
8916
8917    if test "x$new_path" = x; then
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8920        has_space=`$ECHO "$complete" | $GREP " "`
8921        if test "x$has_space" != x; then
8922          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8923$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8924        fi
8925        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8926      fi
8927  fi
8928
8929      # Now join together the path and the arguments once again
8930      if test "x$arguments" != xEOL; then
8931        new_complete="$new_path ${arguments% *}"
8932      else
8933        new_complete="$new_path"
8934      fi
8935
8936  if test "x$complete" != "x$new_complete"; then
8937      FOUND_MAKE="$new_complete"
8938      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8939$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8940    fi
8941
8942        fi
8943      fi
8944    fi
8945  fi
8946
8947    fi
8948
8949    if test "x$FOUND_MAKE" = x; then
8950      if test "x$TOOLS_DIR" != x; then
8951        # We have a tools-dir, check that as well before giving up.
8952        OLD_PATH=$PATH
8953        PATH=$TOOLS_DIR:$PATH
8954        for ac_prog in gmake
8955do
8956  # Extract the first word of "$ac_prog", so it can be a program name with args.
8957set dummy $ac_prog; ac_word=$2
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8959$as_echo_n "checking for $ac_word... " >&6; }
8960if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8961  $as_echo_n "(cached) " >&6
8962else
8963  case $CHECK_TOOLSDIR_GMAKE in
8964  [\\/]* | ?:[\\/]*)
8965  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8966  ;;
8967  *)
8968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8969for as_dir in $PATH
8970do
8971  IFS=$as_save_IFS
8972  test -z "$as_dir" && as_dir=.
8973    for ac_exec_ext in '' $ac_executable_extensions; do
8974  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8975    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8977    break 2
8978  fi
8979done
8980  done
8981IFS=$as_save_IFS
8982
8983  ;;
8984esac
8985fi
8986CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8987if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8989$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8990else
8991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
8993fi
8994
8995
8996  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8997done
8998
8999
9000  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9001  DESCRIPTION="gmake in tools-dir"
9002  if test "x$MAKE_CANDIDATE" != x; then
9003    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9004$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9005    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9006    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9007    if test "x$IS_GNU_MAKE" = x; then
9008      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9009$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9010    else
9011      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9012      if test "x$IS_MODERN_MAKE" = x; then
9013        { $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
9014$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;}
9015      else
9016        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9017          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9018            MAKE_EXPECTED_ENV='cygwin'
9019          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9020            MAKE_EXPECTED_ENV='msys'
9021          else
9022            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9023          fi
9024          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9025          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9026        else
9027          # Not relevant for non-Windows
9028          IS_MAKE_CORRECT_ENV=true
9029        fi
9030        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9031          { $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
9032$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;}
9033        else
9034          FOUND_MAKE=$MAKE_CANDIDATE
9035
9036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9037
9038  # First separate the path from the arguments. This will split at the first
9039  # space.
9040  complete="$FOUND_MAKE"
9041  path="${complete%% *}"
9042  tmp="$complete EOL"
9043  arguments="${tmp#* }"
9044
9045  # Input might be given as Windows format, start by converting to
9046  # unix format.
9047  new_path=`$CYGPATH -u "$path"`
9048
9049  # Now try to locate executable using which
9050  new_path=`$WHICH "$new_path" 2> /dev/null`
9051  # bat and cmd files are not always considered executable in cygwin causing which
9052  # to not find them
9053  if test "x$new_path" = x \
9054           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9055           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9056    new_path=`$CYGPATH -u "$path"`
9057  fi
9058  if test "x$new_path" = x; then
9059    # Oops. Which didn't find the executable.
9060    # The splitting of arguments from the executable at a space might have been incorrect,
9061    # since paths with space are more likely in Windows. Give it another try with the whole
9062    # argument.
9063    path="$complete"
9064    arguments="EOL"
9065    new_path=`$CYGPATH -u "$path"`
9066    new_path=`$WHICH "$new_path" 2> /dev/null`
9067    # bat and cmd files are not always considered executable in cygwin causing which
9068    # to not find them
9069    if test "x$new_path" = x \
9070             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9071             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9072      new_path=`$CYGPATH -u "$path"`
9073    fi
9074    if test "x$new_path" = x; then
9075      # It's still not found. Now this is an unrecoverable error.
9076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9078      has_space=`$ECHO "$complete" | $GREP " "`
9079      if test "x$has_space" != x; then
9080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9082      fi
9083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9084    fi
9085  fi
9086
9087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9090  # "foo.exe" is OK but "foo" is an error.
9091  #
9092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9093  # It is also a way to make sure we got the proper file name for the real test later on.
9094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9095  if test "x$test_shortpath" = x; then
9096    # Short path failed, file does not exist as specified.
9097    # Try adding .exe or .cmd
9098    if test -f "${new_path}.exe"; then
9099       input_to_shortpath="${new_path}.exe"
9100    elif test -f "${new_path}.cmd"; then
9101       input_to_shortpath="${new_path}.cmd"
9102    else
9103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9104$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9108    fi
9109  else
9110    input_to_shortpath="$new_path"
9111  fi
9112
9113  # Call helper function which possibly converts this using DOS-style short mode.
9114  # If so, the updated path is stored in $new_path.
9115  new_path="$input_to_shortpath"
9116
9117  input_path="$input_to_shortpath"
9118  # Check if we need to convert this using DOS-style short mode. If the path
9119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9120  # take no chances and rewrite it.
9121  # Note: m4 eats our [], so we need to use [ and ] instead.
9122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9123  if test "x$has_forbidden_chars" != x; then
9124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9128      # Going to short mode and back again did indeed matter. Since short mode is
9129      # case insensitive, let's make it lowercase to improve readability.
9130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9131      # Now convert it back to Unix-stile (cygpath)
9132      input_path=`$CYGPATH -u "$shortmode_path"`
9133      new_path="$input_path"
9134    fi
9135  fi
9136
9137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9138  if test "x$test_cygdrive_prefix" = x; then
9139    # As a simple fix, exclude /usr/bin since it's not a real path.
9140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9142      # a path prefixed by /cygdrive for fixpath to work.
9143      new_path="$CYGWIN_ROOT_PATH$input_path"
9144    fi
9145  fi
9146
9147  # remove trailing .exe if any
9148  new_path="${new_path/%.exe/}"
9149
9150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9151
9152  # First separate the path from the arguments. This will split at the first
9153  # space.
9154  complete="$FOUND_MAKE"
9155  path="${complete%% *}"
9156  tmp="$complete EOL"
9157  arguments="${tmp#* }"
9158
9159  # Input might be given as Windows format, start by converting to
9160  # unix format.
9161  new_path="$path"
9162
9163  windows_path="$new_path"
9164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9165    unix_path=`$CYGPATH -u "$windows_path"`
9166    new_path="$unix_path"
9167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9169    new_path="$unix_path"
9170  fi
9171
9172
9173  # Now try to locate executable using which
9174  new_path=`$WHICH "$new_path" 2> /dev/null`
9175
9176  if test "x$new_path" = x; then
9177    # Oops. Which didn't find the executable.
9178    # The splitting of arguments from the executable at a space might have been incorrect,
9179    # since paths with space are more likely in Windows. Give it another try with the whole
9180    # argument.
9181    path="$complete"
9182    arguments="EOL"
9183    new_path="$path"
9184
9185  windows_path="$new_path"
9186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9187    unix_path=`$CYGPATH -u "$windows_path"`
9188    new_path="$unix_path"
9189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9191    new_path="$unix_path"
9192  fi
9193
9194
9195    new_path=`$WHICH "$new_path" 2> /dev/null`
9196
9197    if test "x$new_path" = x; then
9198      # It's still not found. Now this is an unrecoverable error.
9199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9201      has_space=`$ECHO "$complete" | $GREP " "`
9202      if test "x$has_space" != x; then
9203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9205      fi
9206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9207    fi
9208  fi
9209
9210  # Now new_path has a complete unix path to the binary
9211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9212    # Keep paths in /bin as-is, but remove trailing .exe if any
9213    new_path="${new_path/%.exe/}"
9214    # Do not save /bin paths to all_fixpath_prefixes!
9215  else
9216    # Not in mixed or Windows style, start by that.
9217    new_path=`cmd //c echo $new_path`
9218
9219  input_path="$new_path"
9220  # Check if we need to convert this using DOS-style short mode. If the path
9221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9222  # take no chances and rewrite it.
9223  # Note: m4 eats our [], so we need to use [ and ] instead.
9224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9225  if test "x$has_forbidden_chars" != x; then
9226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9228  fi
9229
9230    # Output is in $new_path
9231
9232  windows_path="$new_path"
9233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9234    unix_path=`$CYGPATH -u "$windows_path"`
9235    new_path="$unix_path"
9236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9238    new_path="$unix_path"
9239  fi
9240
9241    # remove trailing .exe if any
9242    new_path="${new_path/%.exe/}"
9243
9244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9246  fi
9247
9248  else
9249    # We're on a posix platform. Hooray! :)
9250    # First separate the path from the arguments. This will split at the first
9251    # space.
9252    complete="$FOUND_MAKE"
9253    path="${complete%% *}"
9254    tmp="$complete EOL"
9255    arguments="${tmp#* }"
9256
9257    # Cannot rely on the command "which" here since it doesn't always work.
9258    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9259    if test -z "$is_absolute_path"; then
9260      # Path to executable is not absolute. Find it.
9261      IFS_save="$IFS"
9262      IFS=:
9263      for p in $PATH; do
9264        if test -f "$p/$path" && test -x "$p/$path"; then
9265          new_path="$p/$path"
9266          break
9267        fi
9268      done
9269      IFS="$IFS_save"
9270    else
9271      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9272$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9273      new_path="$path"
9274    fi
9275
9276    if test "x$new_path" = x; then
9277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9278$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9279        has_space=`$ECHO "$complete" | $GREP " "`
9280        if test "x$has_space" != x; then
9281          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9282$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9283        fi
9284        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9285      fi
9286  fi
9287
9288      # Now join together the path and the arguments once again
9289      if test "x$arguments" != xEOL; then
9290        new_complete="$new_path ${arguments% *}"
9291      else
9292        new_complete="$new_path"
9293      fi
9294
9295  if test "x$complete" != "x$new_complete"; then
9296      FOUND_MAKE="$new_complete"
9297      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9298$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9299    fi
9300
9301        fi
9302      fi
9303    fi
9304  fi
9305
9306        if test "x$FOUND_MAKE" = x; then
9307          for ac_prog in make
9308do
9309  # Extract the first word of "$ac_prog", so it can be a program name with args.
9310set dummy $ac_prog; ac_word=$2
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9312$as_echo_n "checking for $ac_word... " >&6; }
9313if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9314  $as_echo_n "(cached) " >&6
9315else
9316  case $CHECK_TOOLSDIR_MAKE in
9317  [\\/]* | ?:[\\/]*)
9318  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9319  ;;
9320  *)
9321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9322for as_dir in $PATH
9323do
9324  IFS=$as_save_IFS
9325  test -z "$as_dir" && as_dir=.
9326    for ac_exec_ext in '' $ac_executable_extensions; do
9327  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9328    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9330    break 2
9331  fi
9332done
9333  done
9334IFS=$as_save_IFS
9335
9336  ;;
9337esac
9338fi
9339CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9340if test -n "$CHECK_TOOLSDIR_MAKE"; then
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9342$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9343else
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
9346fi
9347
9348
9349  test -n "$CHECK_TOOLSDIR_MAKE" && break
9350done
9351
9352
9353  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9354  DESCRIPTION="make in tools-dir"
9355  if test "x$MAKE_CANDIDATE" != x; then
9356    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9357$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9358    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9359    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9360    if test "x$IS_GNU_MAKE" = x; then
9361      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9362$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9363    else
9364      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9365      if test "x$IS_MODERN_MAKE" = x; then
9366        { $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
9367$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;}
9368      else
9369        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9370          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9371            MAKE_EXPECTED_ENV='cygwin'
9372          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9373            MAKE_EXPECTED_ENV='msys'
9374          else
9375            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9376          fi
9377          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9378          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9379        else
9380          # Not relevant for non-Windows
9381          IS_MAKE_CORRECT_ENV=true
9382        fi
9383        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9384          { $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
9385$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;}
9386        else
9387          FOUND_MAKE=$MAKE_CANDIDATE
9388
9389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9390
9391  # First separate the path from the arguments. This will split at the first
9392  # space.
9393  complete="$FOUND_MAKE"
9394  path="${complete%% *}"
9395  tmp="$complete EOL"
9396  arguments="${tmp#* }"
9397
9398  # Input might be given as Windows format, start by converting to
9399  # unix format.
9400  new_path=`$CYGPATH -u "$path"`
9401
9402  # Now try to locate executable using which
9403  new_path=`$WHICH "$new_path" 2> /dev/null`
9404  # bat and cmd files are not always considered executable in cygwin causing which
9405  # to not find them
9406  if test "x$new_path" = x \
9407           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9408           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9409    new_path=`$CYGPATH -u "$path"`
9410  fi
9411  if test "x$new_path" = x; then
9412    # Oops. Which didn't find the executable.
9413    # The splitting of arguments from the executable at a space might have been incorrect,
9414    # since paths with space are more likely in Windows. Give it another try with the whole
9415    # argument.
9416    path="$complete"
9417    arguments="EOL"
9418    new_path=`$CYGPATH -u "$path"`
9419    new_path=`$WHICH "$new_path" 2> /dev/null`
9420    # bat and cmd files are not always considered executable in cygwin causing which
9421    # to not find them
9422    if test "x$new_path" = x \
9423             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9424             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9425      new_path=`$CYGPATH -u "$path"`
9426    fi
9427    if test "x$new_path" = x; then
9428      # It's still not found. Now this is an unrecoverable error.
9429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9430$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9431      has_space=`$ECHO "$complete" | $GREP " "`
9432      if test "x$has_space" != x; then
9433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9435      fi
9436      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9437    fi
9438  fi
9439
9440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9443  # "foo.exe" is OK but "foo" is an error.
9444  #
9445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9446  # It is also a way to make sure we got the proper file name for the real test later on.
9447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9448  if test "x$test_shortpath" = x; then
9449    # Short path failed, file does not exist as specified.
9450    # Try adding .exe or .cmd
9451    if test -f "${new_path}.exe"; then
9452       input_to_shortpath="${new_path}.exe"
9453    elif test -f "${new_path}.cmd"; then
9454       input_to_shortpath="${new_path}.cmd"
9455    else
9456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9457$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9460      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9461    fi
9462  else
9463    input_to_shortpath="$new_path"
9464  fi
9465
9466  # Call helper function which possibly converts this using DOS-style short mode.
9467  # If so, the updated path is stored in $new_path.
9468  new_path="$input_to_shortpath"
9469
9470  input_path="$input_to_shortpath"
9471  # Check if we need to convert this using DOS-style short mode. If the path
9472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9473  # take no chances and rewrite it.
9474  # Note: m4 eats our [], so we need to use [ and ] instead.
9475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9476  if test "x$has_forbidden_chars" != x; then
9477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9481      # Going to short mode and back again did indeed matter. Since short mode is
9482      # case insensitive, let's make it lowercase to improve readability.
9483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9484      # Now convert it back to Unix-stile (cygpath)
9485      input_path=`$CYGPATH -u "$shortmode_path"`
9486      new_path="$input_path"
9487    fi
9488  fi
9489
9490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9491  if test "x$test_cygdrive_prefix" = x; then
9492    # As a simple fix, exclude /usr/bin since it's not a real path.
9493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9495      # a path prefixed by /cygdrive for fixpath to work.
9496      new_path="$CYGWIN_ROOT_PATH$input_path"
9497    fi
9498  fi
9499
9500  # remove trailing .exe if any
9501  new_path="${new_path/%.exe/}"
9502
9503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9504
9505  # First separate the path from the arguments. This will split at the first
9506  # space.
9507  complete="$FOUND_MAKE"
9508  path="${complete%% *}"
9509  tmp="$complete EOL"
9510  arguments="${tmp#* }"
9511
9512  # Input might be given as Windows format, start by converting to
9513  # unix format.
9514  new_path="$path"
9515
9516  windows_path="$new_path"
9517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9518    unix_path=`$CYGPATH -u "$windows_path"`
9519    new_path="$unix_path"
9520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9522    new_path="$unix_path"
9523  fi
9524
9525
9526  # Now try to locate executable using which
9527  new_path=`$WHICH "$new_path" 2> /dev/null`
9528
9529  if test "x$new_path" = x; then
9530    # Oops. Which didn't find the executable.
9531    # The splitting of arguments from the executable at a space might have been incorrect,
9532    # since paths with space are more likely in Windows. Give it another try with the whole
9533    # argument.
9534    path="$complete"
9535    arguments="EOL"
9536    new_path="$path"
9537
9538  windows_path="$new_path"
9539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9540    unix_path=`$CYGPATH -u "$windows_path"`
9541    new_path="$unix_path"
9542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9544    new_path="$unix_path"
9545  fi
9546
9547
9548    new_path=`$WHICH "$new_path" 2> /dev/null`
9549
9550    if test "x$new_path" = x; then
9551      # It's still not found. Now this is an unrecoverable error.
9552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9553$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9554      has_space=`$ECHO "$complete" | $GREP " "`
9555      if test "x$has_space" != x; then
9556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9558      fi
9559      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9560    fi
9561  fi
9562
9563  # Now new_path has a complete unix path to the binary
9564  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9565    # Keep paths in /bin as-is, but remove trailing .exe if any
9566    new_path="${new_path/%.exe/}"
9567    # Do not save /bin paths to all_fixpath_prefixes!
9568  else
9569    # Not in mixed or Windows style, start by that.
9570    new_path=`cmd //c echo $new_path`
9571
9572  input_path="$new_path"
9573  # Check if we need to convert this using DOS-style short mode. If the path
9574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9575  # take no chances and rewrite it.
9576  # Note: m4 eats our [], so we need to use [ and ] instead.
9577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9578  if test "x$has_forbidden_chars" != x; then
9579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9581  fi
9582
9583    # Output is in $new_path
9584
9585  windows_path="$new_path"
9586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9587    unix_path=`$CYGPATH -u "$windows_path"`
9588    new_path="$unix_path"
9589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9591    new_path="$unix_path"
9592  fi
9593
9594    # remove trailing .exe if any
9595    new_path="${new_path/%.exe/}"
9596
9597    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9598    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9599  fi
9600
9601  else
9602    # We're on a posix platform. Hooray! :)
9603    # First separate the path from the arguments. This will split at the first
9604    # space.
9605    complete="$FOUND_MAKE"
9606    path="${complete%% *}"
9607    tmp="$complete EOL"
9608    arguments="${tmp#* }"
9609
9610    # Cannot rely on the command "which" here since it doesn't always work.
9611    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9612    if test -z "$is_absolute_path"; then
9613      # Path to executable is not absolute. Find it.
9614      IFS_save="$IFS"
9615      IFS=:
9616      for p in $PATH; do
9617        if test -f "$p/$path" && test -x "$p/$path"; then
9618          new_path="$p/$path"
9619          break
9620        fi
9621      done
9622      IFS="$IFS_save"
9623    else
9624      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9625$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9626      new_path="$path"
9627    fi
9628
9629    if test "x$new_path" = x; then
9630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9631$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9632        has_space=`$ECHO "$complete" | $GREP " "`
9633        if test "x$has_space" != x; then
9634          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9635$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9636        fi
9637        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9638      fi
9639  fi
9640
9641      # Now join together the path and the arguments once again
9642      if test "x$arguments" != xEOL; then
9643        new_complete="$new_path ${arguments% *}"
9644      else
9645        new_complete="$new_path"
9646      fi
9647
9648  if test "x$complete" != "x$new_complete"; then
9649      FOUND_MAKE="$new_complete"
9650      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9651$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9652    fi
9653
9654        fi
9655      fi
9656    fi
9657  fi
9658
9659        fi
9660        PATH=$OLD_PATH
9661      fi
9662    fi
9663
9664    if test "x$FOUND_MAKE" = x; then
9665      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
9666    fi
9667  fi
9668
9669  MAKE=$FOUND_MAKE
9670
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9672$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9673
9674
9675
9676    # Test if find supports -delete
9677    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9678$as_echo_n "checking if find supports -delete... " >&6; }
9679    FIND_DELETE="-delete"
9680
9681    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9682
9683    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9684
9685    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9686    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9687        # No, it does not.
9688        rm $DELETEDIR/TestIfFindSupportsDelete
9689        FIND_DELETE="-exec rm \{\} \+"
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9691$as_echo "no" >&6; }
9692    else
9693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9694$as_echo "yes" >&6; }
9695    fi
9696    rmdir $DELETEDIR
9697
9698
9699
9700# These tools might not be installed by default,
9701# need hint on how to install them.
9702
9703    for ac_prog in unzip
9704do
9705  # Extract the first word of "$ac_prog", so it can be a program name with args.
9706set dummy $ac_prog; ac_word=$2
9707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9708$as_echo_n "checking for $ac_word... " >&6; }
9709if test "${ac_cv_path_UNZIP+set}" = set; then :
9710  $as_echo_n "(cached) " >&6
9711else
9712  case $UNZIP in
9713  [\\/]* | ?:[\\/]*)
9714  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9715  ;;
9716  *)
9717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9718for as_dir in $PATH
9719do
9720  IFS=$as_save_IFS
9721  test -z "$as_dir" && as_dir=.
9722    for ac_exec_ext in '' $ac_executable_extensions; do
9723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9724    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9726    break 2
9727  fi
9728done
9729  done
9730IFS=$as_save_IFS
9731
9732  ;;
9733esac
9734fi
9735UNZIP=$ac_cv_path_UNZIP
9736if test -n "$UNZIP"; then
9737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9738$as_echo "$UNZIP" >&6; }
9739else
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9741$as_echo "no" >&6; }
9742fi
9743
9744
9745  test -n "$UNZIP" && break
9746done
9747
9748
9749    if test "x$UNZIP" = x; then
9750        if test "xunzip" = x; then
9751          PROG_NAME=unzip
9752        else
9753          PROG_NAME=unzip
9754        fi
9755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9757        as_fn_error $? "Cannot continue" "$LINENO" 5
9758    fi
9759
9760
9761
9762    for ac_prog in zip
9763do
9764  # Extract the first word of "$ac_prog", so it can be a program name with args.
9765set dummy $ac_prog; ac_word=$2
9766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9767$as_echo_n "checking for $ac_word... " >&6; }
9768if test "${ac_cv_path_ZIP+set}" = set; then :
9769  $as_echo_n "(cached) " >&6
9770else
9771  case $ZIP in
9772  [\\/]* | ?:[\\/]*)
9773  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9774  ;;
9775  *)
9776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9777for as_dir in $PATH
9778do
9779  IFS=$as_save_IFS
9780  test -z "$as_dir" && as_dir=.
9781    for ac_exec_ext in '' $ac_executable_extensions; do
9782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9783    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9785    break 2
9786  fi
9787done
9788  done
9789IFS=$as_save_IFS
9790
9791  ;;
9792esac
9793fi
9794ZIP=$ac_cv_path_ZIP
9795if test -n "$ZIP"; then
9796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9797$as_echo "$ZIP" >&6; }
9798else
9799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800$as_echo "no" >&6; }
9801fi
9802
9803
9804  test -n "$ZIP" && break
9805done
9806
9807
9808    if test "x$ZIP" = x; then
9809        if test "xzip" = x; then
9810          PROG_NAME=zip
9811        else
9812          PROG_NAME=zip
9813        fi
9814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9816        as_fn_error $? "Cannot continue" "$LINENO" 5
9817    fi
9818
9819
9820
9821# Non-required basic tools
9822
9823# Extract the first word of "ldd", so it can be a program name with args.
9824set dummy ldd; ac_word=$2
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9826$as_echo_n "checking for $ac_word... " >&6; }
9827if test "${ac_cv_path_LDD+set}" = set; then :
9828  $as_echo_n "(cached) " >&6
9829else
9830  case $LDD in
9831  [\\/]* | ?:[\\/]*)
9832  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9833  ;;
9834  *)
9835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9836for as_dir in $PATH
9837do
9838  IFS=$as_save_IFS
9839  test -z "$as_dir" && as_dir=.
9840    for ac_exec_ext in '' $ac_executable_extensions; do
9841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9842    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9844    break 2
9845  fi
9846done
9847  done
9848IFS=$as_save_IFS
9849
9850  ;;
9851esac
9852fi
9853LDD=$ac_cv_path_LDD
9854if test -n "$LDD"; then
9855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9856$as_echo "$LDD" >&6; }
9857else
9858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9859$as_echo "no" >&6; }
9860fi
9861
9862
9863if test "x$LDD" = "x"; then
9864    # List shared lib dependencies is used for
9865    # debug output and checking for forbidden dependencies.
9866    # We can build without it.
9867    LDD="true"
9868fi
9869# Extract the first word of "otool", so it can be a program name with args.
9870set dummy otool; ac_word=$2
9871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9872$as_echo_n "checking for $ac_word... " >&6; }
9873if test "${ac_cv_path_OTOOL+set}" = set; then :
9874  $as_echo_n "(cached) " >&6
9875else
9876  case $OTOOL in
9877  [\\/]* | ?:[\\/]*)
9878  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9879  ;;
9880  *)
9881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9882for as_dir in $PATH
9883do
9884  IFS=$as_save_IFS
9885  test -z "$as_dir" && as_dir=.
9886    for ac_exec_ext in '' $ac_executable_extensions; do
9887  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9888    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9890    break 2
9891  fi
9892done
9893  done
9894IFS=$as_save_IFS
9895
9896  ;;
9897esac
9898fi
9899OTOOL=$ac_cv_path_OTOOL
9900if test -n "$OTOOL"; then
9901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9902$as_echo "$OTOOL" >&6; }
9903else
9904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9905$as_echo "no" >&6; }
9906fi
9907
9908
9909if test "x$OTOOL" = "x"; then
9910   OTOOL="true"
9911fi
9912for ac_prog in readelf greadelf
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if test "${ac_cv_path_READELF+set}" = set; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $READELF in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9933    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944READELF=$ac_cv_path_READELF
9945if test -n "$READELF"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9947$as_echo "$READELF" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$READELF" && break
9955done
9956
9957# Extract the first word of "hg", so it can be a program name with args.
9958set dummy hg; ac_word=$2
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9960$as_echo_n "checking for $ac_word... " >&6; }
9961if test "${ac_cv_path_HG+set}" = set; then :
9962  $as_echo_n "(cached) " >&6
9963else
9964  case $HG in
9965  [\\/]* | ?:[\\/]*)
9966  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9967  ;;
9968  *)
9969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9970for as_dir in $PATH
9971do
9972  IFS=$as_save_IFS
9973  test -z "$as_dir" && as_dir=.
9974    for ac_exec_ext in '' $ac_executable_extensions; do
9975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9976    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9978    break 2
9979  fi
9980done
9981  done
9982IFS=$as_save_IFS
9983
9984  ;;
9985esac
9986fi
9987HG=$ac_cv_path_HG
9988if test -n "$HG"; then
9989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9990$as_echo "$HG" >&6; }
9991else
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993$as_echo "no" >&6; }
9994fi
9995
9996
9997# Extract the first word of "stat", so it can be a program name with args.
9998set dummy stat; ac_word=$2
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10000$as_echo_n "checking for $ac_word... " >&6; }
10001if test "${ac_cv_path_STAT+set}" = set; then :
10002  $as_echo_n "(cached) " >&6
10003else
10004  case $STAT in
10005  [\\/]* | ?:[\\/]*)
10006  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10007  ;;
10008  *)
10009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10010for as_dir in $PATH
10011do
10012  IFS=$as_save_IFS
10013  test -z "$as_dir" && as_dir=.
10014    for ac_exec_ext in '' $ac_executable_extensions; do
10015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10016    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10018    break 2
10019  fi
10020done
10021  done
10022IFS=$as_save_IFS
10023
10024  ;;
10025esac
10026fi
10027STAT=$ac_cv_path_STAT
10028if test -n "$STAT"; then
10029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10030$as_echo "$STAT" >&6; }
10031else
10032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033$as_echo "no" >&6; }
10034fi
10035
10036
10037# Extract the first word of "time", so it can be a program name with args.
10038set dummy time; ac_word=$2
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10040$as_echo_n "checking for $ac_word... " >&6; }
10041if test "${ac_cv_path_TIME+set}" = set; then :
10042  $as_echo_n "(cached) " >&6
10043else
10044  case $TIME in
10045  [\\/]* | ?:[\\/]*)
10046  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10047  ;;
10048  *)
10049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10050for as_dir in $PATH
10051do
10052  IFS=$as_save_IFS
10053  test -z "$as_dir" && as_dir=.
10054    for ac_exec_ext in '' $ac_executable_extensions; do
10055  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10056    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10058    break 2
10059  fi
10060done
10061  done
10062IFS=$as_save_IFS
10063
10064  ;;
10065esac
10066fi
10067TIME=$ac_cv_path_TIME
10068if test -n "$TIME"; then
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10070$as_echo "$TIME" >&6; }
10071else
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
10074fi
10075
10076
10077
10078if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10079
10080    for ac_prog in comm
10081do
10082  # Extract the first word of "$ac_prog", so it can be a program name with args.
10083set dummy $ac_prog; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if test "${ac_cv_path_COMM+set}" = set; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $COMM in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10101    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112COMM=$ac_cv_path_COMM
10113if test -n "$COMM"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10115$as_echo "$COMM" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122  test -n "$COMM" && break
10123done
10124
10125
10126    if test "x$COMM" = x; then
10127        if test "xcomm" = x; then
10128          PROG_NAME=comm
10129        else
10130          PROG_NAME=comm
10131        fi
10132        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10133$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10134        as_fn_error $? "Cannot continue" "$LINENO" 5
10135    fi
10136
10137
10138fi
10139
10140
10141# Check if pkg-config is available.
10142
10143
10144if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10145	if test -n "$ac_tool_prefix"; then
10146  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10147set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10149$as_echo_n "checking for $ac_word... " >&6; }
10150if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10151  $as_echo_n "(cached) " >&6
10152else
10153  case $PKG_CONFIG in
10154  [\\/]* | ?:[\\/]*)
10155  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10156  ;;
10157  *)
10158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10159for as_dir in $PATH
10160do
10161  IFS=$as_save_IFS
10162  test -z "$as_dir" && as_dir=.
10163    for ac_exec_ext in '' $ac_executable_extensions; do
10164  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10165    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10167    break 2
10168  fi
10169done
10170  done
10171IFS=$as_save_IFS
10172
10173  ;;
10174esac
10175fi
10176PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10177if test -n "$PKG_CONFIG"; then
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10179$as_echo "$PKG_CONFIG" >&6; }
10180else
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10182$as_echo "no" >&6; }
10183fi
10184
10185
10186fi
10187if test -z "$ac_cv_path_PKG_CONFIG"; then
10188  ac_pt_PKG_CONFIG=$PKG_CONFIG
10189  # Extract the first word of "pkg-config", so it can be a program name with args.
10190set dummy pkg-config; ac_word=$2
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10192$as_echo_n "checking for $ac_word... " >&6; }
10193if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10194  $as_echo_n "(cached) " >&6
10195else
10196  case $ac_pt_PKG_CONFIG in
10197  [\\/]* | ?:[\\/]*)
10198  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10199  ;;
10200  *)
10201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10202for as_dir in $PATH
10203do
10204  IFS=$as_save_IFS
10205  test -z "$as_dir" && as_dir=.
10206    for ac_exec_ext in '' $ac_executable_extensions; do
10207  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10208    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10210    break 2
10211  fi
10212done
10213  done
10214IFS=$as_save_IFS
10215
10216  ;;
10217esac
10218fi
10219ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10220if test -n "$ac_pt_PKG_CONFIG"; then
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10222$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10223else
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10225$as_echo "no" >&6; }
10226fi
10227
10228  if test "x$ac_pt_PKG_CONFIG" = x; then
10229    PKG_CONFIG=""
10230  else
10231    case $cross_compiling:$ac_tool_warned in
10232yes:)
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10234$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10235ac_tool_warned=yes ;;
10236esac
10237    PKG_CONFIG=$ac_pt_PKG_CONFIG
10238  fi
10239else
10240  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10241fi
10242
10243fi
10244if test -n "$PKG_CONFIG"; then
10245	_pkg_min_version=0.9.0
10246	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10247$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10248	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10249		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10250$as_echo "yes" >&6; }
10251	else
10252		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10253$as_echo "no" >&6; }
10254		PKG_CONFIG=""
10255	fi
10256
10257fi
10258
10259# After basic tools have been setup, we can check build os specific details.
10260
10261###############################################################################
10262
10263# Note that this is the build platform OS version!
10264
10265OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10266OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10267OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10268OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10269
10270
10271
10272
10273
10274# Setup builddeps, for automatic downloading of tools we need.
10275# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10276# boot-jdk setup, but we need to have basic tools setup first.
10277
10278
10279# Check whether --with-builddeps-conf was given.
10280if test "${with_builddeps_conf+set}" = set; then :
10281  withval=$with_builddeps_conf;
10282fi
10283
10284
10285
10286# Check whether --with-builddeps-server was given.
10287if test "${with_builddeps_server+set}" = set; then :
10288  withval=$with_builddeps_server;
10289fi
10290
10291
10292
10293# Check whether --with-builddeps-dir was given.
10294if test "${with_builddeps_dir+set}" = set; then :
10295  withval=$with_builddeps_dir;
10296else
10297  with_builddeps_dir=/localhome/builddeps
10298fi
10299
10300
10301
10302# Check whether --with-builddeps-group was given.
10303if test "${with_builddeps_group+set}" = set; then :
10304  withval=$with_builddeps_group;
10305fi
10306
10307
10308
10309
10310    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10311        if test "x$with_builddeps_conf" != x; then
10312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10313$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10314            builddepsfile=$with_builddeps_conf
10315            if test -s $builddepsfile; then
10316                . $builddepsfile
10317                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10318$as_echo "loaded!" >&6; }
10319            else
10320               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10321           fi
10322        else
10323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10324$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10325            builddepsfile=`mktemp`
10326            touch $builddepsfile
10327            # Put all found confs into a single file.
10328            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10329            # Source the file to acquire the variables
10330            if test -s $builddepsfile; then
10331                . $builddepsfile
10332                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10333$as_echo "found at least one!" >&6; }
10334            else
10335               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10336           fi
10337        fi
10338        # Create build and target names that use _ instead of "-" and ".".
10339        # This is necessary to use them in variable names.
10340        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10341        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10342        # Extract rewrite information for build and target
10343        eval rewritten_build=\${REWRITE_${build_var}}
10344        if test "x$rewritten_build" = x; then
10345            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10346            echo Build stays the same $rewritten_build
10347        else
10348            echo Rewriting build for builddeps into $rewritten_build
10349        fi
10350        eval rewritten_target=\${REWRITE_${target_var}}
10351        if test "x$rewritten_target" = x; then
10352            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10353            echo Target stays the same $rewritten_target
10354        else
10355            echo Rewriting target for builddeps into $rewritten_target
10356        fi
10357        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10358        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10359    fi
10360    for ac_prog in 7z unzip
10361do
10362  # Extract the first word of "$ac_prog", so it can be a program name with args.
10363set dummy $ac_prog; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10367  $as_echo_n "(cached) " >&6
10368else
10369  if test -n "$BDEPS_UNZIP"; then
10370  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10371else
10372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10373for as_dir in $PATH
10374do
10375  IFS=$as_save_IFS
10376  test -z "$as_dir" && as_dir=.
10377    for ac_exec_ext in '' $ac_executable_extensions; do
10378  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10379    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10381    break 2
10382  fi
10383done
10384  done
10385IFS=$as_save_IFS
10386
10387fi
10388fi
10389BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10390if test -n "$BDEPS_UNZIP"; then
10391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10392$as_echo "$BDEPS_UNZIP" >&6; }
10393else
10394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395$as_echo "no" >&6; }
10396fi
10397
10398
10399  test -n "$BDEPS_UNZIP" && break
10400done
10401
10402    if test "x$BDEPS_UNZIP" = x7z; then
10403        BDEPS_UNZIP="7z x"
10404    fi
10405
10406    for ac_prog in wget lftp ftp
10407do
10408  # Extract the first word of "$ac_prog", so it can be a program name with args.
10409set dummy $ac_prog; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  if test -n "$BDEPS_FTP"; then
10416  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10417else
10418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10425    ac_cv_prog_BDEPS_FTP="$ac_prog"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433fi
10434fi
10435BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10436if test -n "$BDEPS_FTP"; then
10437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10438$as_echo "$BDEPS_FTP" >&6; }
10439else
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441$as_echo "no" >&6; }
10442fi
10443
10444
10445  test -n "$BDEPS_FTP" && break
10446done
10447
10448
10449
10450###############################################################################
10451#
10452# Determine OpenJDK variants, options and version numbers.
10453#
10454###############################################################################
10455
10456# We need build & target for this.
10457
10458
10459###############################################################################
10460#
10461# Should we build only OpenJDK even if closed sources are present?
10462#
10463# Check whether --enable-openjdk-only was given.
10464if test "${enable_openjdk_only+set}" = set; then :
10465  enableval=$enable_openjdk_only;
10466else
10467  enable_openjdk_only="no"
10468fi
10469
10470
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10472$as_echo_n "checking for presence of closed sources... " >&6; }
10473if test -d "$SRC_ROOT/jdk/src/closed"; then
10474    CLOSED_SOURCE_PRESENT=yes
10475else
10476    CLOSED_SOURCE_PRESENT=no
10477fi
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10479$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10480
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10482$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10483SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10485$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10486
10487if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10488  OPENJDK=true
10489  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10490    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10491$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10492  fi
10493else
10494  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10495    OPENJDK=true
10496  else
10497    OPENJDK=false
10498  fi
10499fi
10500
10501if test "x$OPENJDK" = "xtrue"; then
10502    SET_OPENJDK="OPENJDK=true"
10503fi
10504
10505
10506
10507###############################################################################
10508#
10509# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10510# We always build headless support.
10511#
10512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10513$as_echo_n "checking headful support... " >&6; }
10514# Check whether --enable-headful was given.
10515if test "${enable_headful+set}" = set; then :
10516  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10517else
10518  SUPPORT_HEADFUL=yes
10519fi
10520
10521
10522SUPPORT_HEADLESS=yes
10523BUILD_HEADLESS="BUILD_HEADLESS:=true"
10524
10525if test "x$SUPPORT_HEADFUL" = xyes; then
10526    # We are building both headful and headless.
10527    headful_msg="inlude support for both headful and headless"
10528fi
10529
10530if test "x$SUPPORT_HEADFUL" = xno; then
10531    # Thus we are building headless only.
10532    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10533    headful_msg="headless only"
10534fi
10535
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10537$as_echo "$headful_msg" >&6; }
10538
10539
10540
10541
10542
10543# Control wether Hotspot runs Queens test after build.
10544# Check whether --enable-hotspot-test-in-build was given.
10545if test "${enable_hotspot_test_in_build+set}" = set; then :
10546  enableval=$enable_hotspot_test_in_build;
10547else
10548  enable_hotspot_test_in_build=no
10549fi
10550
10551if test "x$enable_hotspot_test_in_build" = "xyes"; then
10552    TEST_IN_BUILD=true
10553else
10554    TEST_IN_BUILD=false
10555fi
10556
10557
10558###############################################################################
10559#
10560# Choose cacerts source file
10561#
10562
10563# Check whether --with-cacerts-file was given.
10564if test "${with_cacerts_file+set}" = set; then :
10565  withval=$with_cacerts_file;
10566fi
10567
10568if test "x$with_cacerts_file" != x; then
10569    CACERTS_FILE=$with_cacerts_file
10570else
10571    if test "x$OPENJDK" = "xtrue"; then
10572        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10573    else
10574        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10575    fi
10576fi
10577
10578
10579###############################################################################
10580#
10581# Enable or disable unlimited crypto
10582#
10583# Check whether --enable-unlimited-crypto was given.
10584if test "${enable_unlimited_crypto+set}" = set; then :
10585  enableval=$enable_unlimited_crypto;
10586else
10587  enable_unlimited_crypto=no
10588fi
10589
10590if test "x$enable_unlimited_crypto" = "xyes"; then
10591    UNLIMITED_CRYPTO=true
10592else
10593    UNLIMITED_CRYPTO=false
10594fi
10595
10596
10597###############################################################################
10598#
10599# Compress jars
10600#
10601COMPRESS_JARS=false
10602
10603
10604
10605
10606# Source the version numbers
10607. $AUTOCONF_DIR/version.numbers
10608if test "x$OPENJDK" = "xfalse"; then
10609    . $AUTOCONF_DIR/closed.version.numbers
10610fi
10611# Now set the JDK version, milestone, build number etc.
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626COPYRIGHT_YEAR=`date +'%Y'`
10627
10628
10629RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10630
10631
10632if test "x$JDK_UPDATE_VERSION" != x; then
10633    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10634else
10635    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10636fi
10637
10638
10639if test "x$MILESTONE" != x; then
10640    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10641else
10642    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10643fi
10644
10645
10646if test "x$JDK_BUILD_NUMBER" != x; then
10647    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10648else
10649    JDK_BUILD_NUMBER=b00
10650    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10651    # Avoid [:alnum:] since it depends on the locale.
10652    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10653    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10654    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10655fi
10656
10657COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10658
10659
10660
10661###############################################################################
10662#
10663# Setup BootJDK, used to bootstrap the build.
10664#
10665###############################################################################
10666
10667
10668BOOT_JDK_FOUND=no
10669
10670# Check whether --with-boot-jdk was given.
10671if test "${with_boot_jdk+set}" = set; then :
10672  withval=$with_boot_jdk;
10673fi
10674
10675
10676# We look for the Boot JDK through various means, going from more certain to
10677# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10678# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10679# must check if this is indeed valid; otherwise we'll continue looking.
10680
10681# Test: Is bootjdk explicitely set by command line arguments?
10682
10683  if test "x$BOOT_JDK_FOUND" = xno; then
10684    # Now execute the test
10685
10686if test "x$with_boot_jdk" != x; then
10687    BOOT_JDK=$with_boot_jdk
10688    BOOT_JDK_FOUND=maybe
10689    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10690$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10691fi
10692
10693
10694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10696      # Do we have a bin/java?
10697      if test ! -x "$BOOT_JDK/bin/java"; then
10698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10700        BOOT_JDK_FOUND=no
10701      else
10702        # Do we have a bin/javac?
10703        if test ! -x "$BOOT_JDK/bin/javac"; then
10704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10708          BOOT_JDK_FOUND=no
10709        else
10710          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10711          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10712            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10714            BOOT_JDK_FOUND=no
10715          else
10716            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10717            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10718
10719            # Extra M4 quote needed to protect [] in grep expression.
10720            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10721            if test "x$FOUND_VERSION_78" = x; then
10722              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10724              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10725$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10726              BOOT_JDK_FOUND=no
10727            else
10728              # We're done! :-)
10729              BOOT_JDK_FOUND=yes
10730
10731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10732
10733  # Input might be given as Windows format, start by converting to
10734  # unix format.
10735  path="$BOOT_JDK"
10736  new_path=`$CYGPATH -u "$path"`
10737
10738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10741  # "foo.exe" is OK but "foo" is an error.
10742  #
10743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10744  # It is also a way to make sure we got the proper file name for the real test later on.
10745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10746  if test "x$test_shortpath" = x; then
10747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10749    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10750  fi
10751
10752  # Call helper function which possibly converts this using DOS-style short mode.
10753  # If so, the updated path is stored in $new_path.
10754
10755  input_path="$new_path"
10756  # Check if we need to convert this using DOS-style short mode. If the path
10757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10758  # take no chances and rewrite it.
10759  # Note: m4 eats our [], so we need to use [ and ] instead.
10760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10761  if test "x$has_forbidden_chars" != x; then
10762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10766      # Going to short mode and back again did indeed matter. Since short mode is
10767      # case insensitive, let's make it lowercase to improve readability.
10768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10769      # Now convert it back to Unix-stile (cygpath)
10770      input_path=`$CYGPATH -u "$shortmode_path"`
10771      new_path="$input_path"
10772    fi
10773  fi
10774
10775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10776  if test "x$test_cygdrive_prefix" = x; then
10777    # As a simple fix, exclude /usr/bin since it's not a real path.
10778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10780      # a path prefixed by /cygdrive for fixpath to work.
10781      new_path="$CYGWIN_ROOT_PATH$input_path"
10782    fi
10783  fi
10784
10785
10786  if test "x$path" != "x$new_path"; then
10787    BOOT_JDK="$new_path"
10788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10790  fi
10791
10792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10793
10794  path="$BOOT_JDK"
10795  has_colon=`$ECHO $path | $GREP ^.:`
10796  new_path="$path"
10797  if test "x$has_colon" = x; then
10798    # Not in mixed or Windows style, start by that.
10799    new_path=`cmd //c echo $path`
10800  fi
10801
10802
10803  input_path="$new_path"
10804  # Check if we need to convert this using DOS-style short mode. If the path
10805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10806  # take no chances and rewrite it.
10807  # Note: m4 eats our [], so we need to use [ and ] instead.
10808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10809  if test "x$has_forbidden_chars" != x; then
10810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10812  fi
10813
10814
10815  windows_path="$new_path"
10816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10817    unix_path=`$CYGPATH -u "$windows_path"`
10818    new_path="$unix_path"
10819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10821    new_path="$unix_path"
10822  fi
10823
10824  if test "x$path" != "x$new_path"; then
10825    BOOT_JDK="$new_path"
10826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10828  fi
10829
10830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10832
10833  else
10834    # We're on a posix platform. Hooray! :)
10835    path="$BOOT_JDK"
10836
10837    if test ! -f "$path" && test ! -d "$path"; then
10838      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10839    fi
10840
10841    has_space=`$ECHO "$path" | $GREP " "`
10842    if test "x$has_space" != x; then
10843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10845      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10846    fi
10847  fi
10848
10849              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10850$as_echo_n "checking for Boot JDK... " >&6; }
10851              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10852$as_echo "$BOOT_JDK" >&6; }
10853              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10854$as_echo_n "checking Boot JDK version... " >&6; }
10855              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10856              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10857$as_echo "$BOOT_JDK_VERSION" >&6; }
10858            fi # end check jdk version
10859          fi # end check rt.jar
10860        fi # end check javac
10861      fi # end check java
10862    fi # end check boot jdk found
10863  fi
10864
10865if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10866  # Having specified an argument which is incorrect will produce an instant failure;
10867  # we should not go on looking
10868  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10869fi
10870
10871# Test: Is bootjdk available from builddeps?
10872
10873  if test "x$BOOT_JDK_FOUND" = xno; then
10874    # Now execute the test
10875
10876
10877
10878    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10879        # Source the builddeps file again, to make sure it uses the latest variables!
10880        . $builddepsfile
10881        # Look for a target and build machine specific resource!
10882        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10883        if test "x$resource" = x; then
10884            # Ok, lets instead look for a target specific resource
10885            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10886        fi
10887        if test "x$resource" = x; then
10888            # Ok, lets instead look for a build specific resource
10889            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10890        fi
10891        if test "x$resource" = x; then
10892            # Ok, lets instead look for a generic resource
10893            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10894            resource=${builddep_bootjdk}
10895        fi
10896        if test "x$resource" != x; then
10897            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10898$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10899	    # If the resource in the builddeps.conf file is an existing directory,
10900	    # for example /java/linux/cups
10901	    if test -d ${resource}; then
10902	       depdir=${resource}
10903	    else
10904
10905# bootjdk is for example mymodule
10906# $resource is for example libs/general/libmymod_1_2_3.zip
10907# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10908# $with_builddeps_dir is for example /localhome/builddeps
10909# depdir is the name of the variable into which we store the depdir, eg MYMOD
10910# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10911# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10912    filename=`basename $resource`
10913    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10914    filebase=${filename%%.*}
10915    extension=${filename#*.}
10916    installdir=$with_builddeps_dir/$filebase
10917    if test ! -f $installdir/$filename.unpacked; then
10918        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10919$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10920        if test ! -d $installdir; then
10921            mkdir -p $installdir
10922        fi
10923        if test ! -d $installdir; then
10924            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10925        fi
10926        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10927        touch $tmpfile
10928        if test ! -f $tmpfile; then
10929            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10930        fi
10931
10932    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10933    # $tmpfile is the local file name for the downloaded file.
10934    VALID_TOOL=no
10935    if test "x$BDEPS_FTP" = xwget; then
10936       VALID_TOOL=yes
10937       wget -O $tmpfile $with_builddeps_server/$resource
10938    fi
10939    if test "x$BDEPS_FTP" = xlftp; then
10940       VALID_TOOL=yes
10941       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10942    fi
10943    if test "x$BDEPS_FTP" = xftp; then
10944        VALID_TOOL=yes
10945        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10946        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10947        FTPUSERPWD=${FTPSERVER%%@*}
10948        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10949            FTPUSER=${userpwd%%:*}
10950            FTPPWD=${userpwd#*@}
10951            FTPSERVER=${FTPSERVER#*@}
10952        else
10953            FTPUSER=ftp
10954            FTPPWD=ftp
10955        fi
10956        # the "pass" command does not work on some
10957        # ftp clients (read ftp.exe) but if it works,
10958        # passive mode is better!
10959        (\
10960            echo "user $FTPUSER $FTPPWD"        ;\
10961            echo "pass"                         ;\
10962            echo "bin"                          ;\
10963            echo "get $FTPPATH $tmpfile"              ;\
10964        ) | ftp -in $FTPSERVER
10965    fi
10966    if test "x$VALID_TOOL" != xyes; then
10967       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10968    fi
10969
10970        mv $tmpfile $installdir/$filename
10971        if test ! -s $installdir/$filename; then
10972            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10973        fi
10974        case "$extension" in
10975            zip)  echo "Unzipping $installdir/$filename..."
10976               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10977            ;;
10978            tar.gz) echo "Untaring $installdir/$filename..."
10979               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10980            ;;
10981            tgz) echo "Untaring $installdir/$filename..."
10982               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10983            ;;
10984            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10985            ;;
10986        esac
10987    fi
10988    if test -f $installdir/$filename.unpacked; then
10989        depdir=$installdir
10990    fi
10991
10992	    fi
10993            # Source the builddeps file again, because in the previous command, the depdir
10994            # was updated to point at the current build dependency install directory.
10995            . $builddepsfile
10996            # Now extract variables from the builddeps.conf files.
10997            theroot=${builddep_bootjdk_ROOT}
10998            thecflags=${builddep_bootjdk_CFLAGS}
10999            thelibs=${builddep_bootjdk_LIBS}
11000            if test "x$depdir" = x; then
11001                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11002            fi
11003            BOOT_JDK=$depdir
11004            if test "x$theroot" != x; then
11005               BOOT_JDK="$theroot"
11006            fi
11007            if test "x$thecflags" != x; then
11008               BOOT_JDK_CFLAGS="$thecflags"
11009            fi
11010            if test "x$thelibs" != x; then
11011               BOOT_JDK_LIBS="$thelibs"
11012            fi
11013            BOOT_JDK_FOUND=maybe
11014            else BOOT_JDK_FOUND=no
11015
11016        fi
11017        else BOOT_JDK_FOUND=no
11018
11019    fi
11020
11021
11022
11023    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11024    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11025      # Do we have a bin/java?
11026      if test ! -x "$BOOT_JDK/bin/java"; then
11027        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11029        BOOT_JDK_FOUND=no
11030      else
11031        # Do we have a bin/javac?
11032        if test ! -x "$BOOT_JDK/bin/javac"; then
11033          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11035          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11036$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11037          BOOT_JDK_FOUND=no
11038        else
11039          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11040          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11041            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11043            BOOT_JDK_FOUND=no
11044          else
11045            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11046            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11047
11048            # Extra M4 quote needed to protect [] in grep expression.
11049            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11050            if test "x$FOUND_VERSION_78" = x; then
11051              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11053              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11054$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11055              BOOT_JDK_FOUND=no
11056            else
11057              # We're done! :-)
11058              BOOT_JDK_FOUND=yes
11059
11060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11061
11062  # Input might be given as Windows format, start by converting to
11063  # unix format.
11064  path="$BOOT_JDK"
11065  new_path=`$CYGPATH -u "$path"`
11066
11067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11070  # "foo.exe" is OK but "foo" is an error.
11071  #
11072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11073  # It is also a way to make sure we got the proper file name for the real test later on.
11074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11075  if test "x$test_shortpath" = x; then
11076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11078    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11079  fi
11080
11081  # Call helper function which possibly converts this using DOS-style short mode.
11082  # If so, the updated path is stored in $new_path.
11083
11084  input_path="$new_path"
11085  # Check if we need to convert this using DOS-style short mode. If the path
11086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11087  # take no chances and rewrite it.
11088  # Note: m4 eats our [], so we need to use [ and ] instead.
11089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11090  if test "x$has_forbidden_chars" != x; then
11091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11095      # Going to short mode and back again did indeed matter. Since short mode is
11096      # case insensitive, let's make it lowercase to improve readability.
11097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11098      # Now convert it back to Unix-stile (cygpath)
11099      input_path=`$CYGPATH -u "$shortmode_path"`
11100      new_path="$input_path"
11101    fi
11102  fi
11103
11104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11105  if test "x$test_cygdrive_prefix" = x; then
11106    # As a simple fix, exclude /usr/bin since it's not a real path.
11107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11109      # a path prefixed by /cygdrive for fixpath to work.
11110      new_path="$CYGWIN_ROOT_PATH$input_path"
11111    fi
11112  fi
11113
11114
11115  if test "x$path" != "x$new_path"; then
11116    BOOT_JDK="$new_path"
11117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11119  fi
11120
11121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11122
11123  path="$BOOT_JDK"
11124  has_colon=`$ECHO $path | $GREP ^.:`
11125  new_path="$path"
11126  if test "x$has_colon" = x; then
11127    # Not in mixed or Windows style, start by that.
11128    new_path=`cmd //c echo $path`
11129  fi
11130
11131
11132  input_path="$new_path"
11133  # Check if we need to convert this using DOS-style short mode. If the path
11134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11135  # take no chances and rewrite it.
11136  # Note: m4 eats our [], so we need to use [ and ] instead.
11137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11138  if test "x$has_forbidden_chars" != x; then
11139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11141  fi
11142
11143
11144  windows_path="$new_path"
11145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11146    unix_path=`$CYGPATH -u "$windows_path"`
11147    new_path="$unix_path"
11148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11150    new_path="$unix_path"
11151  fi
11152
11153  if test "x$path" != "x$new_path"; then
11154    BOOT_JDK="$new_path"
11155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11157  fi
11158
11159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11161
11162  else
11163    # We're on a posix platform. Hooray! :)
11164    path="$BOOT_JDK"
11165
11166    if test ! -f "$path" && test ! -d "$path"; then
11167      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11168    fi
11169
11170    has_space=`$ECHO "$path" | $GREP " "`
11171    if test "x$has_space" != x; then
11172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11174      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11175    fi
11176  fi
11177
11178              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11179$as_echo_n "checking for Boot JDK... " >&6; }
11180              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11181$as_echo "$BOOT_JDK" >&6; }
11182              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11183$as_echo_n "checking Boot JDK version... " >&6; }
11184              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11185              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11186$as_echo "$BOOT_JDK_VERSION" >&6; }
11187            fi # end check jdk version
11188          fi # end check rt.jar
11189        fi # end check javac
11190      fi # end check java
11191    fi # end check boot jdk found
11192  fi
11193
11194
11195# Test: Is $JAVA_HOME set?
11196
11197  if test "x$BOOT_JDK_FOUND" = xno; then
11198    # Now execute the test
11199
11200    if test "x$JAVA_HOME" != x; then
11201        JAVA_HOME_PROCESSED="$JAVA_HOME"
11202
11203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11204
11205  # Input might be given as Windows format, start by converting to
11206  # unix format.
11207  path="$JAVA_HOME_PROCESSED"
11208  new_path=`$CYGPATH -u "$path"`
11209
11210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11213  # "foo.exe" is OK but "foo" is an error.
11214  #
11215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11216  # It is also a way to make sure we got the proper file name for the real test later on.
11217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11218  if test "x$test_shortpath" = x; then
11219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11220$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11221    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11222  fi
11223
11224  # Call helper function which possibly converts this using DOS-style short mode.
11225  # If so, the updated path is stored in $new_path.
11226
11227  input_path="$new_path"
11228  # Check if we need to convert this using DOS-style short mode. If the path
11229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11230  # take no chances and rewrite it.
11231  # Note: m4 eats our [], so we need to use [ and ] instead.
11232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11233  if test "x$has_forbidden_chars" != x; then
11234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11238      # Going to short mode and back again did indeed matter. Since short mode is
11239      # case insensitive, let's make it lowercase to improve readability.
11240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11241      # Now convert it back to Unix-stile (cygpath)
11242      input_path=`$CYGPATH -u "$shortmode_path"`
11243      new_path="$input_path"
11244    fi
11245  fi
11246
11247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11248  if test "x$test_cygdrive_prefix" = x; then
11249    # As a simple fix, exclude /usr/bin since it's not a real path.
11250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11252      # a path prefixed by /cygdrive for fixpath to work.
11253      new_path="$CYGWIN_ROOT_PATH$input_path"
11254    fi
11255  fi
11256
11257
11258  if test "x$path" != "x$new_path"; then
11259    JAVA_HOME_PROCESSED="$new_path"
11260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11261$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11262  fi
11263
11264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11265
11266  path="$JAVA_HOME_PROCESSED"
11267  has_colon=`$ECHO $path | $GREP ^.:`
11268  new_path="$path"
11269  if test "x$has_colon" = x; then
11270    # Not in mixed or Windows style, start by that.
11271    new_path=`cmd //c echo $path`
11272  fi
11273
11274
11275  input_path="$new_path"
11276  # Check if we need to convert this using DOS-style short mode. If the path
11277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11278  # take no chances and rewrite it.
11279  # Note: m4 eats our [], so we need to use [ and ] instead.
11280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11281  if test "x$has_forbidden_chars" != x; then
11282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11284  fi
11285
11286
11287  windows_path="$new_path"
11288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11289    unix_path=`$CYGPATH -u "$windows_path"`
11290    new_path="$unix_path"
11291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11293    new_path="$unix_path"
11294  fi
11295
11296  if test "x$path" != "x$new_path"; then
11297    JAVA_HOME_PROCESSED="$new_path"
11298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11299$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11300  fi
11301
11302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11304
11305  else
11306    # We're on a posix platform. Hooray! :)
11307    path="$JAVA_HOME_PROCESSED"
11308
11309    if test ! -f "$path" && test ! -d "$path"; then
11310      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11311    fi
11312
11313    has_space=`$ECHO "$path" | $GREP " "`
11314    if test "x$has_space" != x; then
11315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11316$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11317      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11318    fi
11319  fi
11320
11321        if test ! -d "$JAVA_HOME_PROCESSED"; then
11322            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11323$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11324        else
11325          # Aha, the user has set a JAVA_HOME
11326          # let us use that as the Boot JDK.
11327          BOOT_JDK="$JAVA_HOME_PROCESSED"
11328          BOOT_JDK_FOUND=maybe
11329          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11330$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11331        fi
11332    fi
11333
11334
11335    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11336    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11337      # Do we have a bin/java?
11338      if test ! -x "$BOOT_JDK/bin/java"; then
11339        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11341        BOOT_JDK_FOUND=no
11342      else
11343        # Do we have a bin/javac?
11344        if test ! -x "$BOOT_JDK/bin/javac"; then
11345          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11346$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11347          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11348$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11349          BOOT_JDK_FOUND=no
11350        else
11351          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11352          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11353            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11355            BOOT_JDK_FOUND=no
11356          else
11357            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11358            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11359
11360            # Extra M4 quote needed to protect [] in grep expression.
11361            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11362            if test "x$FOUND_VERSION_78" = x; then
11363              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11365              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11366$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11367              BOOT_JDK_FOUND=no
11368            else
11369              # We're done! :-)
11370              BOOT_JDK_FOUND=yes
11371
11372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11373
11374  # Input might be given as Windows format, start by converting to
11375  # unix format.
11376  path="$BOOT_JDK"
11377  new_path=`$CYGPATH -u "$path"`
11378
11379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11382  # "foo.exe" is OK but "foo" is an error.
11383  #
11384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11385  # It is also a way to make sure we got the proper file name for the real test later on.
11386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11387  if test "x$test_shortpath" = x; then
11388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11390    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11391  fi
11392
11393  # Call helper function which possibly converts this using DOS-style short mode.
11394  # If so, the updated path is stored in $new_path.
11395
11396  input_path="$new_path"
11397  # Check if we need to convert this using DOS-style short mode. If the path
11398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11399  # take no chances and rewrite it.
11400  # Note: m4 eats our [], so we need to use [ and ] instead.
11401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11402  if test "x$has_forbidden_chars" != x; then
11403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11407      # Going to short mode and back again did indeed matter. Since short mode is
11408      # case insensitive, let's make it lowercase to improve readability.
11409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11410      # Now convert it back to Unix-stile (cygpath)
11411      input_path=`$CYGPATH -u "$shortmode_path"`
11412      new_path="$input_path"
11413    fi
11414  fi
11415
11416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11417  if test "x$test_cygdrive_prefix" = x; then
11418    # As a simple fix, exclude /usr/bin since it's not a real path.
11419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11421      # a path prefixed by /cygdrive for fixpath to work.
11422      new_path="$CYGWIN_ROOT_PATH$input_path"
11423    fi
11424  fi
11425
11426
11427  if test "x$path" != "x$new_path"; then
11428    BOOT_JDK="$new_path"
11429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11431  fi
11432
11433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11434
11435  path="$BOOT_JDK"
11436  has_colon=`$ECHO $path | $GREP ^.:`
11437  new_path="$path"
11438  if test "x$has_colon" = x; then
11439    # Not in mixed or Windows style, start by that.
11440    new_path=`cmd //c echo $path`
11441  fi
11442
11443
11444  input_path="$new_path"
11445  # Check if we need to convert this using DOS-style short mode. If the path
11446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11447  # take no chances and rewrite it.
11448  # Note: m4 eats our [], so we need to use [ and ] instead.
11449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11450  if test "x$has_forbidden_chars" != x; then
11451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11453  fi
11454
11455
11456  windows_path="$new_path"
11457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11458    unix_path=`$CYGPATH -u "$windows_path"`
11459    new_path="$unix_path"
11460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11462    new_path="$unix_path"
11463  fi
11464
11465  if test "x$path" != "x$new_path"; then
11466    BOOT_JDK="$new_path"
11467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11469  fi
11470
11471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11473
11474  else
11475    # We're on a posix platform. Hooray! :)
11476    path="$BOOT_JDK"
11477
11478    if test ! -f "$path" && test ! -d "$path"; then
11479      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11480    fi
11481
11482    has_space=`$ECHO "$path" | $GREP " "`
11483    if test "x$has_space" != x; then
11484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11486      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11487    fi
11488  fi
11489
11490              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11491$as_echo_n "checking for Boot JDK... " >&6; }
11492              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11493$as_echo "$BOOT_JDK" >&6; }
11494              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11495$as_echo_n "checking Boot JDK version... " >&6; }
11496              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11497              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11498$as_echo "$BOOT_JDK_VERSION" >&6; }
11499            fi # end check jdk version
11500          fi # end check rt.jar
11501        fi # end check javac
11502      fi # end check java
11503    fi # end check boot jdk found
11504  fi
11505
11506
11507# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11508
11509  if test "x$BOOT_JDK_FOUND" = xno; then
11510    # Now execute the test
11511
11512    if test -x /usr/libexec/java_home; then
11513        BOOT_JDK=`/usr/libexec/java_home`
11514        BOOT_JDK_FOUND=maybe
11515        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11516$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11517    fi
11518
11519
11520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11522      # Do we have a bin/java?
11523      if test ! -x "$BOOT_JDK/bin/java"; then
11524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11526        BOOT_JDK_FOUND=no
11527      else
11528        # Do we have a bin/javac?
11529        if test ! -x "$BOOT_JDK/bin/javac"; then
11530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11534          BOOT_JDK_FOUND=no
11535        else
11536          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11537          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11538            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11540            BOOT_JDK_FOUND=no
11541          else
11542            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11543            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11544
11545            # Extra M4 quote needed to protect [] in grep expression.
11546            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11547            if test "x$FOUND_VERSION_78" = x; then
11548              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11550              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11551$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11552              BOOT_JDK_FOUND=no
11553            else
11554              # We're done! :-)
11555              BOOT_JDK_FOUND=yes
11556
11557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11558
11559  # Input might be given as Windows format, start by converting to
11560  # unix format.
11561  path="$BOOT_JDK"
11562  new_path=`$CYGPATH -u "$path"`
11563
11564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11567  # "foo.exe" is OK but "foo" is an error.
11568  #
11569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11570  # It is also a way to make sure we got the proper file name for the real test later on.
11571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11572  if test "x$test_shortpath" = x; then
11573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11574$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11575    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11576  fi
11577
11578  # Call helper function which possibly converts this using DOS-style short mode.
11579  # If so, the updated path is stored in $new_path.
11580
11581  input_path="$new_path"
11582  # Check if we need to convert this using DOS-style short mode. If the path
11583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11584  # take no chances and rewrite it.
11585  # Note: m4 eats our [], so we need to use [ and ] instead.
11586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11587  if test "x$has_forbidden_chars" != x; then
11588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11592      # Going to short mode and back again did indeed matter. Since short mode is
11593      # case insensitive, let's make it lowercase to improve readability.
11594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11595      # Now convert it back to Unix-stile (cygpath)
11596      input_path=`$CYGPATH -u "$shortmode_path"`
11597      new_path="$input_path"
11598    fi
11599  fi
11600
11601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11602  if test "x$test_cygdrive_prefix" = x; then
11603    # As a simple fix, exclude /usr/bin since it's not a real path.
11604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11606      # a path prefixed by /cygdrive for fixpath to work.
11607      new_path="$CYGWIN_ROOT_PATH$input_path"
11608    fi
11609  fi
11610
11611
11612  if test "x$path" != "x$new_path"; then
11613    BOOT_JDK="$new_path"
11614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11616  fi
11617
11618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11619
11620  path="$BOOT_JDK"
11621  has_colon=`$ECHO $path | $GREP ^.:`
11622  new_path="$path"
11623  if test "x$has_colon" = x; then
11624    # Not in mixed or Windows style, start by that.
11625    new_path=`cmd //c echo $path`
11626  fi
11627
11628
11629  input_path="$new_path"
11630  # Check if we need to convert this using DOS-style short mode. If the path
11631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11632  # take no chances and rewrite it.
11633  # Note: m4 eats our [], so we need to use [ and ] instead.
11634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11635  if test "x$has_forbidden_chars" != x; then
11636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11638  fi
11639
11640
11641  windows_path="$new_path"
11642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11643    unix_path=`$CYGPATH -u "$windows_path"`
11644    new_path="$unix_path"
11645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11647    new_path="$unix_path"
11648  fi
11649
11650  if test "x$path" != "x$new_path"; then
11651    BOOT_JDK="$new_path"
11652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11653$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11654  fi
11655
11656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11658
11659  else
11660    # We're on a posix platform. Hooray! :)
11661    path="$BOOT_JDK"
11662
11663    if test ! -f "$path" && test ! -d "$path"; then
11664      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11665    fi
11666
11667    has_space=`$ECHO "$path" | $GREP " "`
11668    if test "x$has_space" != x; then
11669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11671      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11672    fi
11673  fi
11674
11675              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11676$as_echo_n "checking for Boot JDK... " >&6; }
11677              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11678$as_echo "$BOOT_JDK" >&6; }
11679              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11680$as_echo_n "checking Boot JDK version... " >&6; }
11681              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11682              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11683$as_echo "$BOOT_JDK_VERSION" >&6; }
11684            fi # end check jdk version
11685          fi # end check rt.jar
11686        fi # end check javac
11687      fi # end check java
11688    fi # end check boot jdk found
11689  fi
11690
11691
11692# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11693
11694  if test "x$BOOT_JDK_FOUND" = xno; then
11695    # Now execute the test
11696
11697    # Extract the first word of "javac", so it can be a program name with args.
11698set dummy javac; ac_word=$2
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11700$as_echo_n "checking for $ac_word... " >&6; }
11701if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11702  $as_echo_n "(cached) " >&6
11703else
11704  case $JAVAC_CHECK in
11705  [\\/]* | ?:[\\/]*)
11706  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11707  ;;
11708  *)
11709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11710for as_dir in $PATH
11711do
11712  IFS=$as_save_IFS
11713  test -z "$as_dir" && as_dir=.
11714    for ac_exec_ext in '' $ac_executable_extensions; do
11715  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11716    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11718    break 2
11719  fi
11720done
11721  done
11722IFS=$as_save_IFS
11723
11724  ;;
11725esac
11726fi
11727JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11728if test -n "$JAVAC_CHECK"; then
11729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11730$as_echo "$JAVAC_CHECK" >&6; }
11731else
11732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11733$as_echo "no" >&6; }
11734fi
11735
11736
11737    # Extract the first word of "java", so it can be a program name with args.
11738set dummy java; ac_word=$2
11739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11740$as_echo_n "checking for $ac_word... " >&6; }
11741if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11742  $as_echo_n "(cached) " >&6
11743else
11744  case $JAVA_CHECK in
11745  [\\/]* | ?:[\\/]*)
11746  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11747  ;;
11748  *)
11749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11750for as_dir in $PATH
11751do
11752  IFS=$as_save_IFS
11753  test -z "$as_dir" && as_dir=.
11754    for ac_exec_ext in '' $ac_executable_extensions; do
11755  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11756    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11758    break 2
11759  fi
11760done
11761  done
11762IFS=$as_save_IFS
11763
11764  ;;
11765esac
11766fi
11767JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11768if test -n "$JAVA_CHECK"; then
11769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11770$as_echo "$JAVA_CHECK" >&6; }
11771else
11772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773$as_echo "no" >&6; }
11774fi
11775
11776
11777    BINARY="$JAVAC_CHECK"
11778    if test "x$JAVAC_CHECK" = x; then
11779        BINARY="$JAVA_CHECK"
11780    fi
11781    if test "x$BINARY" != x; then
11782        # So there is a java(c) binary, it might be part of a JDK.
11783        # Lets find the JDK/JRE directory by following symbolic links.
11784        # Linux/GNU systems often have links from /usr/bin/java to
11785        # /etc/alternatives/java to the real JDK binary.
11786
11787    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11788        # Follow a chain of symbolic links. Use readlink
11789        # where it exists, else fall back to horribly
11790        # complicated shell code.
11791        if test "x$READLINK_TESTED" != yes; then
11792            # On MacOSX there is a readlink tool with a different
11793            # purpose than the GNU readlink tool. Check the found readlink.
11794            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11795            if test "x$ISGNU" = x; then
11796                 # A readlink that we do not know how to use.
11797                 # Are there other non-GNU readlinks out there?
11798                 READLINK_TESTED=yes
11799                 READLINK=
11800            fi
11801        fi
11802
11803        if test "x$READLINK" != x; then
11804            BINARY=`$READLINK -f $BINARY`
11805        else
11806            # Save the current directory for restoring afterwards
11807            STARTDIR=$PWD
11808            COUNTER=0
11809            sym_link_dir=`$DIRNAME $BINARY`
11810            sym_link_file=`$BASENAME $BINARY`
11811            # Use the system pwd and not the shell builtin to resolve directory symlinks
11812            cd $sym_link_dir
11813            cd `$THEPWDCMD`
11814            sym_link_dir=`$THEPWDCMD`
11815            # Resolve file symlinks
11816            while test $COUNTER -lt 20; do
11817                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11818                if test "x$ISLINK" == x; then
11819                    # This is not a symbolic link! We are done!
11820                    break
11821                fi
11822                # Again resolve directory symlinks since the target of the just found
11823                # link could be in a different directory
11824                cd `$DIRNAME $ISLINK`
11825                sym_link_dir=`$THEPWDCMD`
11826                sym_link_file=`$BASENAME $ISLINK`
11827                let COUNTER=COUNTER+1
11828            done
11829            cd $STARTDIR
11830            BINARY=$sym_link_dir/$sym_link_file
11831        fi
11832    fi
11833
11834        BOOT_JDK=`dirname "$BINARY"`
11835        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11836        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11837            # Looks like we found ourselves an JDK
11838            BOOT_JDK_FOUND=maybe
11839            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11840$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11841        fi
11842    fi
11843
11844
11845    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11846    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11847      # Do we have a bin/java?
11848      if test ! -x "$BOOT_JDK/bin/java"; then
11849        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11851        BOOT_JDK_FOUND=no
11852      else
11853        # Do we have a bin/javac?
11854        if test ! -x "$BOOT_JDK/bin/javac"; then
11855          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11857          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11858$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11859          BOOT_JDK_FOUND=no
11860        else
11861          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11862          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11863            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11865            BOOT_JDK_FOUND=no
11866          else
11867            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11869
11870            # Extra M4 quote needed to protect [] in grep expression.
11871            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11872            if test "x$FOUND_VERSION_78" = x; then
11873              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11875              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11876$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11877              BOOT_JDK_FOUND=no
11878            else
11879              # We're done! :-)
11880              BOOT_JDK_FOUND=yes
11881
11882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11883
11884  # Input might be given as Windows format, start by converting to
11885  # unix format.
11886  path="$BOOT_JDK"
11887  new_path=`$CYGPATH -u "$path"`
11888
11889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11892  # "foo.exe" is OK but "foo" is an error.
11893  #
11894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11895  # It is also a way to make sure we got the proper file name for the real test later on.
11896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11897  if test "x$test_shortpath" = x; then
11898    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11899$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11900    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11901  fi
11902
11903  # Call helper function which possibly converts this using DOS-style short mode.
11904  # If so, the updated path is stored in $new_path.
11905
11906  input_path="$new_path"
11907  # Check if we need to convert this using DOS-style short mode. If the path
11908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11909  # take no chances and rewrite it.
11910  # Note: m4 eats our [], so we need to use [ and ] instead.
11911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11912  if test "x$has_forbidden_chars" != x; then
11913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11917      # Going to short mode and back again did indeed matter. Since short mode is
11918      # case insensitive, let's make it lowercase to improve readability.
11919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11920      # Now convert it back to Unix-stile (cygpath)
11921      input_path=`$CYGPATH -u "$shortmode_path"`
11922      new_path="$input_path"
11923    fi
11924  fi
11925
11926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11927  if test "x$test_cygdrive_prefix" = x; then
11928    # As a simple fix, exclude /usr/bin since it's not a real path.
11929    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11931      # a path prefixed by /cygdrive for fixpath to work.
11932      new_path="$CYGWIN_ROOT_PATH$input_path"
11933    fi
11934  fi
11935
11936
11937  if test "x$path" != "x$new_path"; then
11938    BOOT_JDK="$new_path"
11939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11940$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11941  fi
11942
11943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11944
11945  path="$BOOT_JDK"
11946  has_colon=`$ECHO $path | $GREP ^.:`
11947  new_path="$path"
11948  if test "x$has_colon" = x; then
11949    # Not in mixed or Windows style, start by that.
11950    new_path=`cmd //c echo $path`
11951  fi
11952
11953
11954  input_path="$new_path"
11955  # Check if we need to convert this using DOS-style short mode. If the path
11956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11957  # take no chances and rewrite it.
11958  # Note: m4 eats our [], so we need to use [ and ] instead.
11959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11960  if test "x$has_forbidden_chars" != x; then
11961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11962    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11963  fi
11964
11965
11966  windows_path="$new_path"
11967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11968    unix_path=`$CYGPATH -u "$windows_path"`
11969    new_path="$unix_path"
11970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11972    new_path="$unix_path"
11973  fi
11974
11975  if test "x$path" != "x$new_path"; then
11976    BOOT_JDK="$new_path"
11977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11979  fi
11980
11981  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11982  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11983
11984  else
11985    # We're on a posix platform. Hooray! :)
11986    path="$BOOT_JDK"
11987
11988    if test ! -f "$path" && test ! -d "$path"; then
11989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11990    fi
11991
11992    has_space=`$ECHO "$path" | $GREP " "`
11993    if test "x$has_space" != x; then
11994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11996      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11997    fi
11998  fi
11999
12000              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12001$as_echo_n "checking for Boot JDK... " >&6; }
12002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12003$as_echo "$BOOT_JDK" >&6; }
12004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12005$as_echo_n "checking Boot JDK version... " >&6; }
12006              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12008$as_echo "$BOOT_JDK_VERSION" >&6; }
12009            fi # end check jdk version
12010          fi # end check rt.jar
12011        fi # end check javac
12012      fi # end check java
12013    fi # end check boot jdk found
12014  fi
12015
12016
12017# Test: Is there a JDK installed in default, well-known locations?
12018
12019  if test "x$BOOT_JDK_FOUND" = xno; then
12020    # Now execute the test
12021
12022  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12023
12024  if test "x$BOOT_JDK_FOUND" = xno; then
12025    # Now execute the test
12026
12027  if test "x$ProgramW6432" != x; then
12028    VIRTUAL_DIR="$ProgramW6432/Java"
12029
12030  windows_path="$VIRTUAL_DIR"
12031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12032    unix_path=`$CYGPATH -u "$windows_path"`
12033    VIRTUAL_DIR="$unix_path"
12034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12036    VIRTUAL_DIR="$unix_path"
12037  fi
12038
12039
12040  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12041  BOOT_JDK_SUFFIX=""
12042  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12043  if test "x$ALL_JDKS_FOUND" != x; then
12044    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12045
12046  if test "x$BOOT_JDK_FOUND" = xno; then
12047    # Now execute the test
12048
12049        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12050        if test -d "$BOOT_JDK"; then
12051          BOOT_JDK_FOUND=maybe
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12053$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12054        fi
12055
12056
12057    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12058    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12059      # Do we have a bin/java?
12060      if test ! -x "$BOOT_JDK/bin/java"; then
12061        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12063        BOOT_JDK_FOUND=no
12064      else
12065        # Do we have a bin/javac?
12066        if test ! -x "$BOOT_JDK/bin/javac"; then
12067          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12069          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12070$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12071          BOOT_JDK_FOUND=no
12072        else
12073          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12074          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12077            BOOT_JDK_FOUND=no
12078          else
12079            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12080            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12081
12082            # Extra M4 quote needed to protect [] in grep expression.
12083            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12084            if test "x$FOUND_VERSION_78" = x; then
12085              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12087              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12088$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12089              BOOT_JDK_FOUND=no
12090            else
12091              # We're done! :-)
12092              BOOT_JDK_FOUND=yes
12093
12094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12095
12096  # Input might be given as Windows format, start by converting to
12097  # unix format.
12098  path="$BOOT_JDK"
12099  new_path=`$CYGPATH -u "$path"`
12100
12101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12104  # "foo.exe" is OK but "foo" is an error.
12105  #
12106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12107  # It is also a way to make sure we got the proper file name for the real test later on.
12108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12109  if test "x$test_shortpath" = x; then
12110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12112    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12113  fi
12114
12115  # Call helper function which possibly converts this using DOS-style short mode.
12116  # If so, the updated path is stored in $new_path.
12117
12118  input_path="$new_path"
12119  # Check if we need to convert this using DOS-style short mode. If the path
12120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12121  # take no chances and rewrite it.
12122  # Note: m4 eats our [], so we need to use [ and ] instead.
12123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12124  if test "x$has_forbidden_chars" != x; then
12125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12129      # Going to short mode and back again did indeed matter. Since short mode is
12130      # case insensitive, let's make it lowercase to improve readability.
12131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12132      # Now convert it back to Unix-stile (cygpath)
12133      input_path=`$CYGPATH -u "$shortmode_path"`
12134      new_path="$input_path"
12135    fi
12136  fi
12137
12138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12139  if test "x$test_cygdrive_prefix" = x; then
12140    # As a simple fix, exclude /usr/bin since it's not a real path.
12141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12143      # a path prefixed by /cygdrive for fixpath to work.
12144      new_path="$CYGWIN_ROOT_PATH$input_path"
12145    fi
12146  fi
12147
12148
12149  if test "x$path" != "x$new_path"; then
12150    BOOT_JDK="$new_path"
12151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12153  fi
12154
12155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12156
12157  path="$BOOT_JDK"
12158  has_colon=`$ECHO $path | $GREP ^.:`
12159  new_path="$path"
12160  if test "x$has_colon" = x; then
12161    # Not in mixed or Windows style, start by that.
12162    new_path=`cmd //c echo $path`
12163  fi
12164
12165
12166  input_path="$new_path"
12167  # Check if we need to convert this using DOS-style short mode. If the path
12168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12169  # take no chances and rewrite it.
12170  # Note: m4 eats our [], so we need to use [ and ] instead.
12171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12172  if test "x$has_forbidden_chars" != x; then
12173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12175  fi
12176
12177
12178  windows_path="$new_path"
12179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12180    unix_path=`$CYGPATH -u "$windows_path"`
12181    new_path="$unix_path"
12182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12184    new_path="$unix_path"
12185  fi
12186
12187  if test "x$path" != "x$new_path"; then
12188    BOOT_JDK="$new_path"
12189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12191  fi
12192
12193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12195
12196  else
12197    # We're on a posix platform. Hooray! :)
12198    path="$BOOT_JDK"
12199
12200    if test ! -f "$path" && test ! -d "$path"; then
12201      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12202    fi
12203
12204    has_space=`$ECHO "$path" | $GREP " "`
12205    if test "x$has_space" != x; then
12206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12208      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12209    fi
12210  fi
12211
12212              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12213$as_echo_n "checking for Boot JDK... " >&6; }
12214              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12215$as_echo "$BOOT_JDK" >&6; }
12216              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12217$as_echo_n "checking Boot JDK version... " >&6; }
12218              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12219              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12220$as_echo "$BOOT_JDK_VERSION" >&6; }
12221            fi # end check jdk version
12222          fi # end check rt.jar
12223        fi # end check javac
12224      fi # end check java
12225    fi # end check boot jdk found
12226  fi
12227
12228    done
12229  fi
12230
12231  fi
12232
12233
12234    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12235    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12236      # Do we have a bin/java?
12237      if test ! -x "$BOOT_JDK/bin/java"; then
12238        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12239$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12240        BOOT_JDK_FOUND=no
12241      else
12242        # Do we have a bin/javac?
12243        if test ! -x "$BOOT_JDK/bin/javac"; then
12244          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12246          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12247$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12248          BOOT_JDK_FOUND=no
12249        else
12250          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12251          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12252            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12254            BOOT_JDK_FOUND=no
12255          else
12256            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12257            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12258
12259            # Extra M4 quote needed to protect [] in grep expression.
12260            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12261            if test "x$FOUND_VERSION_78" = x; then
12262              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12264              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12265$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12266              BOOT_JDK_FOUND=no
12267            else
12268              # We're done! :-)
12269              BOOT_JDK_FOUND=yes
12270
12271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12272
12273  # Input might be given as Windows format, start by converting to
12274  # unix format.
12275  path="$BOOT_JDK"
12276  new_path=`$CYGPATH -u "$path"`
12277
12278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12281  # "foo.exe" is OK but "foo" is an error.
12282  #
12283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12284  # It is also a way to make sure we got the proper file name for the real test later on.
12285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12286  if test "x$test_shortpath" = x; then
12287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12288$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12289    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12290  fi
12291
12292  # Call helper function which possibly converts this using DOS-style short mode.
12293  # If so, the updated path is stored in $new_path.
12294
12295  input_path="$new_path"
12296  # Check if we need to convert this using DOS-style short mode. If the path
12297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12298  # take no chances and rewrite it.
12299  # Note: m4 eats our [], so we need to use [ and ] instead.
12300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12301  if test "x$has_forbidden_chars" != x; then
12302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12306      # Going to short mode and back again did indeed matter. Since short mode is
12307      # case insensitive, let's make it lowercase to improve readability.
12308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12309      # Now convert it back to Unix-stile (cygpath)
12310      input_path=`$CYGPATH -u "$shortmode_path"`
12311      new_path="$input_path"
12312    fi
12313  fi
12314
12315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12316  if test "x$test_cygdrive_prefix" = x; then
12317    # As a simple fix, exclude /usr/bin since it's not a real path.
12318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12320      # a path prefixed by /cygdrive for fixpath to work.
12321      new_path="$CYGWIN_ROOT_PATH$input_path"
12322    fi
12323  fi
12324
12325
12326  if test "x$path" != "x$new_path"; then
12327    BOOT_JDK="$new_path"
12328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12329$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12330  fi
12331
12332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12333
12334  path="$BOOT_JDK"
12335  has_colon=`$ECHO $path | $GREP ^.:`
12336  new_path="$path"
12337  if test "x$has_colon" = x; then
12338    # Not in mixed or Windows style, start by that.
12339    new_path=`cmd //c echo $path`
12340  fi
12341
12342
12343  input_path="$new_path"
12344  # Check if we need to convert this using DOS-style short mode. If the path
12345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12346  # take no chances and rewrite it.
12347  # Note: m4 eats our [], so we need to use [ and ] instead.
12348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12349  if test "x$has_forbidden_chars" != x; then
12350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12352  fi
12353
12354
12355  windows_path="$new_path"
12356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12357    unix_path=`$CYGPATH -u "$windows_path"`
12358    new_path="$unix_path"
12359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12361    new_path="$unix_path"
12362  fi
12363
12364  if test "x$path" != "x$new_path"; then
12365    BOOT_JDK="$new_path"
12366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12367$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12368  fi
12369
12370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12372
12373  else
12374    # We're on a posix platform. Hooray! :)
12375    path="$BOOT_JDK"
12376
12377    if test ! -f "$path" && test ! -d "$path"; then
12378      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12379    fi
12380
12381    has_space=`$ECHO "$path" | $GREP " "`
12382    if test "x$has_space" != x; then
12383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12385      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12386    fi
12387  fi
12388
12389              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12390$as_echo_n "checking for Boot JDK... " >&6; }
12391              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12392$as_echo "$BOOT_JDK" >&6; }
12393              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12394$as_echo_n "checking Boot JDK version... " >&6; }
12395              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12396              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12397$as_echo "$BOOT_JDK_VERSION" >&6; }
12398            fi # end check jdk version
12399          fi # end check rt.jar
12400        fi # end check javac
12401      fi # end check java
12402    fi # end check boot jdk found
12403  fi
12404
12405
12406  if test "x$BOOT_JDK_FOUND" = xno; then
12407    # Now execute the test
12408
12409  if test "x$PROGRAMW6432" != x; then
12410    VIRTUAL_DIR="$PROGRAMW6432/Java"
12411
12412  windows_path="$VIRTUAL_DIR"
12413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12414    unix_path=`$CYGPATH -u "$windows_path"`
12415    VIRTUAL_DIR="$unix_path"
12416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12418    VIRTUAL_DIR="$unix_path"
12419  fi
12420
12421
12422  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12423  BOOT_JDK_SUFFIX=""
12424  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12425  if test "x$ALL_JDKS_FOUND" != x; then
12426    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12427
12428  if test "x$BOOT_JDK_FOUND" = xno; then
12429    # Now execute the test
12430
12431        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12432        if test -d "$BOOT_JDK"; then
12433          BOOT_JDK_FOUND=maybe
12434          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12435$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12436        fi
12437
12438
12439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12441      # Do we have a bin/java?
12442      if test ! -x "$BOOT_JDK/bin/java"; then
12443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12445        BOOT_JDK_FOUND=no
12446      else
12447        # Do we have a bin/javac?
12448        if test ! -x "$BOOT_JDK/bin/javac"; then
12449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12453          BOOT_JDK_FOUND=no
12454        else
12455          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12456          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12459            BOOT_JDK_FOUND=no
12460          else
12461            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12463
12464            # Extra M4 quote needed to protect [] in grep expression.
12465            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12466            if test "x$FOUND_VERSION_78" = x; then
12467              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12469              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12470$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12471              BOOT_JDK_FOUND=no
12472            else
12473              # We're done! :-)
12474              BOOT_JDK_FOUND=yes
12475
12476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12477
12478  # Input might be given as Windows format, start by converting to
12479  # unix format.
12480  path="$BOOT_JDK"
12481  new_path=`$CYGPATH -u "$path"`
12482
12483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12486  # "foo.exe" is OK but "foo" is an error.
12487  #
12488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12489  # It is also a way to make sure we got the proper file name for the real test later on.
12490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12491  if test "x$test_shortpath" = x; then
12492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12494    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12495  fi
12496
12497  # Call helper function which possibly converts this using DOS-style short mode.
12498  # If so, the updated path is stored in $new_path.
12499
12500  input_path="$new_path"
12501  # Check if we need to convert this using DOS-style short mode. If the path
12502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12503  # take no chances and rewrite it.
12504  # Note: m4 eats our [], so we need to use [ and ] instead.
12505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12506  if test "x$has_forbidden_chars" != x; then
12507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12511      # Going to short mode and back again did indeed matter. Since short mode is
12512      # case insensitive, let's make it lowercase to improve readability.
12513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12514      # Now convert it back to Unix-stile (cygpath)
12515      input_path=`$CYGPATH -u "$shortmode_path"`
12516      new_path="$input_path"
12517    fi
12518  fi
12519
12520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12521  if test "x$test_cygdrive_prefix" = x; then
12522    # As a simple fix, exclude /usr/bin since it's not a real path.
12523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12525      # a path prefixed by /cygdrive for fixpath to work.
12526      new_path="$CYGWIN_ROOT_PATH$input_path"
12527    fi
12528  fi
12529
12530
12531  if test "x$path" != "x$new_path"; then
12532    BOOT_JDK="$new_path"
12533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12535  fi
12536
12537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12538
12539  path="$BOOT_JDK"
12540  has_colon=`$ECHO $path | $GREP ^.:`
12541  new_path="$path"
12542  if test "x$has_colon" = x; then
12543    # Not in mixed or Windows style, start by that.
12544    new_path=`cmd //c echo $path`
12545  fi
12546
12547
12548  input_path="$new_path"
12549  # Check if we need to convert this using DOS-style short mode. If the path
12550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12551  # take no chances and rewrite it.
12552  # Note: m4 eats our [], so we need to use [ and ] instead.
12553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12554  if test "x$has_forbidden_chars" != x; then
12555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12557  fi
12558
12559
12560  windows_path="$new_path"
12561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12562    unix_path=`$CYGPATH -u "$windows_path"`
12563    new_path="$unix_path"
12564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12566    new_path="$unix_path"
12567  fi
12568
12569  if test "x$path" != "x$new_path"; then
12570    BOOT_JDK="$new_path"
12571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12573  fi
12574
12575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12577
12578  else
12579    # We're on a posix platform. Hooray! :)
12580    path="$BOOT_JDK"
12581
12582    if test ! -f "$path" && test ! -d "$path"; then
12583      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12584    fi
12585
12586    has_space=`$ECHO "$path" | $GREP " "`
12587    if test "x$has_space" != x; then
12588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12590      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12591    fi
12592  fi
12593
12594              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12595$as_echo_n "checking for Boot JDK... " >&6; }
12596              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12597$as_echo "$BOOT_JDK" >&6; }
12598              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12599$as_echo_n "checking Boot JDK version... " >&6; }
12600              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12602$as_echo "$BOOT_JDK_VERSION" >&6; }
12603            fi # end check jdk version
12604          fi # end check rt.jar
12605        fi # end check javac
12606      fi # end check java
12607    fi # end check boot jdk found
12608  fi
12609
12610    done
12611  fi
12612
12613  fi
12614
12615
12616    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12617    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12618      # Do we have a bin/java?
12619      if test ! -x "$BOOT_JDK/bin/java"; then
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12622        BOOT_JDK_FOUND=no
12623      else
12624        # Do we have a bin/javac?
12625        if test ! -x "$BOOT_JDK/bin/javac"; then
12626          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12628          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12629$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12630          BOOT_JDK_FOUND=no
12631        else
12632          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12633          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12636            BOOT_JDK_FOUND=no
12637          else
12638            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12639            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12640
12641            # Extra M4 quote needed to protect [] in grep expression.
12642            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12643            if test "x$FOUND_VERSION_78" = x; then
12644              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12646              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12647$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12648              BOOT_JDK_FOUND=no
12649            else
12650              # We're done! :-)
12651              BOOT_JDK_FOUND=yes
12652
12653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12654
12655  # Input might be given as Windows format, start by converting to
12656  # unix format.
12657  path="$BOOT_JDK"
12658  new_path=`$CYGPATH -u "$path"`
12659
12660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12663  # "foo.exe" is OK but "foo" is an error.
12664  #
12665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12666  # It is also a way to make sure we got the proper file name for the real test later on.
12667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12668  if test "x$test_shortpath" = x; then
12669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12671    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12672  fi
12673
12674  # Call helper function which possibly converts this using DOS-style short mode.
12675  # If so, the updated path is stored in $new_path.
12676
12677  input_path="$new_path"
12678  # Check if we need to convert this using DOS-style short mode. If the path
12679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12680  # take no chances and rewrite it.
12681  # Note: m4 eats our [], so we need to use [ and ] instead.
12682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12683  if test "x$has_forbidden_chars" != x; then
12684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12688      # Going to short mode and back again did indeed matter. Since short mode is
12689      # case insensitive, let's make it lowercase to improve readability.
12690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12691      # Now convert it back to Unix-stile (cygpath)
12692      input_path=`$CYGPATH -u "$shortmode_path"`
12693      new_path="$input_path"
12694    fi
12695  fi
12696
12697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12698  if test "x$test_cygdrive_prefix" = x; then
12699    # As a simple fix, exclude /usr/bin since it's not a real path.
12700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12702      # a path prefixed by /cygdrive for fixpath to work.
12703      new_path="$CYGWIN_ROOT_PATH$input_path"
12704    fi
12705  fi
12706
12707
12708  if test "x$path" != "x$new_path"; then
12709    BOOT_JDK="$new_path"
12710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12712  fi
12713
12714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12715
12716  path="$BOOT_JDK"
12717  has_colon=`$ECHO $path | $GREP ^.:`
12718  new_path="$path"
12719  if test "x$has_colon" = x; then
12720    # Not in mixed or Windows style, start by that.
12721    new_path=`cmd //c echo $path`
12722  fi
12723
12724
12725  input_path="$new_path"
12726  # Check if we need to convert this using DOS-style short mode. If the path
12727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12728  # take no chances and rewrite it.
12729  # Note: m4 eats our [], so we need to use [ and ] instead.
12730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12731  if test "x$has_forbidden_chars" != x; then
12732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12734  fi
12735
12736
12737  windows_path="$new_path"
12738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12739    unix_path=`$CYGPATH -u "$windows_path"`
12740    new_path="$unix_path"
12741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12743    new_path="$unix_path"
12744  fi
12745
12746  if test "x$path" != "x$new_path"; then
12747    BOOT_JDK="$new_path"
12748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12750  fi
12751
12752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12754
12755  else
12756    # We're on a posix platform. Hooray! :)
12757    path="$BOOT_JDK"
12758
12759    if test ! -f "$path" && test ! -d "$path"; then
12760      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12761    fi
12762
12763    has_space=`$ECHO "$path" | $GREP " "`
12764    if test "x$has_space" != x; then
12765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12768    fi
12769  fi
12770
12771              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12772$as_echo_n "checking for Boot JDK... " >&6; }
12773              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12774$as_echo "$BOOT_JDK" >&6; }
12775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12776$as_echo_n "checking Boot JDK version... " >&6; }
12777              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12778              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12779$as_echo "$BOOT_JDK_VERSION" >&6; }
12780            fi # end check jdk version
12781          fi # end check rt.jar
12782        fi # end check javac
12783      fi # end check java
12784    fi # end check boot jdk found
12785  fi
12786
12787
12788  if test "x$BOOT_JDK_FOUND" = xno; then
12789    # Now execute the test
12790
12791  if test "x$PROGRAMFILES" != x; then
12792    VIRTUAL_DIR="$PROGRAMFILES/Java"
12793
12794  windows_path="$VIRTUAL_DIR"
12795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12796    unix_path=`$CYGPATH -u "$windows_path"`
12797    VIRTUAL_DIR="$unix_path"
12798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12800    VIRTUAL_DIR="$unix_path"
12801  fi
12802
12803
12804  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12805  BOOT_JDK_SUFFIX=""
12806  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12807  if test "x$ALL_JDKS_FOUND" != x; then
12808    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12809
12810  if test "x$BOOT_JDK_FOUND" = xno; then
12811    # Now execute the test
12812
12813        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12814        if test -d "$BOOT_JDK"; then
12815          BOOT_JDK_FOUND=maybe
12816          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12817$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12818        fi
12819
12820
12821    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12822    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12823      # Do we have a bin/java?
12824      if test ! -x "$BOOT_JDK/bin/java"; then
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12827        BOOT_JDK_FOUND=no
12828      else
12829        # Do we have a bin/javac?
12830        if test ! -x "$BOOT_JDK/bin/javac"; then
12831          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12833          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12834$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12835          BOOT_JDK_FOUND=no
12836        else
12837          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12838          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12839            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12841            BOOT_JDK_FOUND=no
12842          else
12843            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12844            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12845
12846            # Extra M4 quote needed to protect [] in grep expression.
12847            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12848            if test "x$FOUND_VERSION_78" = x; then
12849              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12851              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12852$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12853              BOOT_JDK_FOUND=no
12854            else
12855              # We're done! :-)
12856              BOOT_JDK_FOUND=yes
12857
12858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12859
12860  # Input might be given as Windows format, start by converting to
12861  # unix format.
12862  path="$BOOT_JDK"
12863  new_path=`$CYGPATH -u "$path"`
12864
12865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12868  # "foo.exe" is OK but "foo" is an error.
12869  #
12870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12871  # It is also a way to make sure we got the proper file name for the real test later on.
12872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12873  if test "x$test_shortpath" = x; then
12874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12876    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12877  fi
12878
12879  # Call helper function which possibly converts this using DOS-style short mode.
12880  # If so, the updated path is stored in $new_path.
12881
12882  input_path="$new_path"
12883  # Check if we need to convert this using DOS-style short mode. If the path
12884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12885  # take no chances and rewrite it.
12886  # Note: m4 eats our [], so we need to use [ and ] instead.
12887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12888  if test "x$has_forbidden_chars" != x; then
12889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12893      # Going to short mode and back again did indeed matter. Since short mode is
12894      # case insensitive, let's make it lowercase to improve readability.
12895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12896      # Now convert it back to Unix-stile (cygpath)
12897      input_path=`$CYGPATH -u "$shortmode_path"`
12898      new_path="$input_path"
12899    fi
12900  fi
12901
12902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12903  if test "x$test_cygdrive_prefix" = x; then
12904    # As a simple fix, exclude /usr/bin since it's not a real path.
12905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12907      # a path prefixed by /cygdrive for fixpath to work.
12908      new_path="$CYGWIN_ROOT_PATH$input_path"
12909    fi
12910  fi
12911
12912
12913  if test "x$path" != "x$new_path"; then
12914    BOOT_JDK="$new_path"
12915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12917  fi
12918
12919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12920
12921  path="$BOOT_JDK"
12922  has_colon=`$ECHO $path | $GREP ^.:`
12923  new_path="$path"
12924  if test "x$has_colon" = x; then
12925    # Not in mixed or Windows style, start by that.
12926    new_path=`cmd //c echo $path`
12927  fi
12928
12929
12930  input_path="$new_path"
12931  # Check if we need to convert this using DOS-style short mode. If the path
12932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12933  # take no chances and rewrite it.
12934  # Note: m4 eats our [], so we need to use [ and ] instead.
12935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12936  if test "x$has_forbidden_chars" != x; then
12937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12939  fi
12940
12941
12942  windows_path="$new_path"
12943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12944    unix_path=`$CYGPATH -u "$windows_path"`
12945    new_path="$unix_path"
12946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12948    new_path="$unix_path"
12949  fi
12950
12951  if test "x$path" != "x$new_path"; then
12952    BOOT_JDK="$new_path"
12953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12955  fi
12956
12957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12959
12960  else
12961    # We're on a posix platform. Hooray! :)
12962    path="$BOOT_JDK"
12963
12964    if test ! -f "$path" && test ! -d "$path"; then
12965      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12966    fi
12967
12968    has_space=`$ECHO "$path" | $GREP " "`
12969    if test "x$has_space" != x; then
12970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12971$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12972      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12973    fi
12974  fi
12975
12976              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12977$as_echo_n "checking for Boot JDK... " >&6; }
12978              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12979$as_echo "$BOOT_JDK" >&6; }
12980              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12981$as_echo_n "checking Boot JDK version... " >&6; }
12982              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12983              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12984$as_echo "$BOOT_JDK_VERSION" >&6; }
12985            fi # end check jdk version
12986          fi # end check rt.jar
12987        fi # end check javac
12988      fi # end check java
12989    fi # end check boot jdk found
12990  fi
12991
12992    done
12993  fi
12994
12995  fi
12996
12997
12998    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12999    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13000      # Do we have a bin/java?
13001      if test ! -x "$BOOT_JDK/bin/java"; then
13002        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13004        BOOT_JDK_FOUND=no
13005      else
13006        # Do we have a bin/javac?
13007        if test ! -x "$BOOT_JDK/bin/javac"; then
13008          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13010          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13011$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13012          BOOT_JDK_FOUND=no
13013        else
13014          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13015          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13016            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13018            BOOT_JDK_FOUND=no
13019          else
13020            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13021            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13022
13023            # Extra M4 quote needed to protect [] in grep expression.
13024            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13025            if test "x$FOUND_VERSION_78" = x; then
13026              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13028              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13029$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13030              BOOT_JDK_FOUND=no
13031            else
13032              # We're done! :-)
13033              BOOT_JDK_FOUND=yes
13034
13035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13036
13037  # Input might be given as Windows format, start by converting to
13038  # unix format.
13039  path="$BOOT_JDK"
13040  new_path=`$CYGPATH -u "$path"`
13041
13042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13045  # "foo.exe" is OK but "foo" is an error.
13046  #
13047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13048  # It is also a way to make sure we got the proper file name for the real test later on.
13049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13050  if test "x$test_shortpath" = x; then
13051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13053    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13054  fi
13055
13056  # Call helper function which possibly converts this using DOS-style short mode.
13057  # If so, the updated path is stored in $new_path.
13058
13059  input_path="$new_path"
13060  # Check if we need to convert this using DOS-style short mode. If the path
13061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13062  # take no chances and rewrite it.
13063  # Note: m4 eats our [], so we need to use [ and ] instead.
13064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13065  if test "x$has_forbidden_chars" != x; then
13066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13070      # Going to short mode and back again did indeed matter. Since short mode is
13071      # case insensitive, let's make it lowercase to improve readability.
13072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13073      # Now convert it back to Unix-stile (cygpath)
13074      input_path=`$CYGPATH -u "$shortmode_path"`
13075      new_path="$input_path"
13076    fi
13077  fi
13078
13079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13080  if test "x$test_cygdrive_prefix" = x; then
13081    # As a simple fix, exclude /usr/bin since it's not a real path.
13082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13084      # a path prefixed by /cygdrive for fixpath to work.
13085      new_path="$CYGWIN_ROOT_PATH$input_path"
13086    fi
13087  fi
13088
13089
13090  if test "x$path" != "x$new_path"; then
13091    BOOT_JDK="$new_path"
13092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13094  fi
13095
13096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13097
13098  path="$BOOT_JDK"
13099  has_colon=`$ECHO $path | $GREP ^.:`
13100  new_path="$path"
13101  if test "x$has_colon" = x; then
13102    # Not in mixed or Windows style, start by that.
13103    new_path=`cmd //c echo $path`
13104  fi
13105
13106
13107  input_path="$new_path"
13108  # Check if we need to convert this using DOS-style short mode. If the path
13109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13110  # take no chances and rewrite it.
13111  # Note: m4 eats our [], so we need to use [ and ] instead.
13112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13113  if test "x$has_forbidden_chars" != x; then
13114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13116  fi
13117
13118
13119  windows_path="$new_path"
13120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13121    unix_path=`$CYGPATH -u "$windows_path"`
13122    new_path="$unix_path"
13123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13125    new_path="$unix_path"
13126  fi
13127
13128  if test "x$path" != "x$new_path"; then
13129    BOOT_JDK="$new_path"
13130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13132  fi
13133
13134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13136
13137  else
13138    # We're on a posix platform. Hooray! :)
13139    path="$BOOT_JDK"
13140
13141    if test ! -f "$path" && test ! -d "$path"; then
13142      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13143    fi
13144
13145    has_space=`$ECHO "$path" | $GREP " "`
13146    if test "x$has_space" != x; then
13147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13149      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13150    fi
13151  fi
13152
13153              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13154$as_echo_n "checking for Boot JDK... " >&6; }
13155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13156$as_echo "$BOOT_JDK" >&6; }
13157              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13158$as_echo_n "checking Boot JDK version... " >&6; }
13159              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13160              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13161$as_echo "$BOOT_JDK_VERSION" >&6; }
13162            fi # end check jdk version
13163          fi # end check rt.jar
13164        fi # end check javac
13165      fi # end check java
13166    fi # end check boot jdk found
13167  fi
13168
13169
13170  if test "x$BOOT_JDK_FOUND" = xno; then
13171    # Now execute the test
13172
13173  if test "x$ProgramFiles" != x; then
13174    VIRTUAL_DIR="$ProgramFiles/Java"
13175
13176  windows_path="$VIRTUAL_DIR"
13177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13178    unix_path=`$CYGPATH -u "$windows_path"`
13179    VIRTUAL_DIR="$unix_path"
13180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13182    VIRTUAL_DIR="$unix_path"
13183  fi
13184
13185
13186  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13187  BOOT_JDK_SUFFIX=""
13188  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13189  if test "x$ALL_JDKS_FOUND" != x; then
13190    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13191
13192  if test "x$BOOT_JDK_FOUND" = xno; then
13193    # Now execute the test
13194
13195        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13196        if test -d "$BOOT_JDK"; then
13197          BOOT_JDK_FOUND=maybe
13198          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13199$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13200        fi
13201
13202
13203    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13204    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13205      # Do we have a bin/java?
13206      if test ! -x "$BOOT_JDK/bin/java"; then
13207        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13209        BOOT_JDK_FOUND=no
13210      else
13211        # Do we have a bin/javac?
13212        if test ! -x "$BOOT_JDK/bin/javac"; then
13213          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13215          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13216$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13217          BOOT_JDK_FOUND=no
13218        else
13219          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13220          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13221            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13223            BOOT_JDK_FOUND=no
13224          else
13225            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13226            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13227
13228            # Extra M4 quote needed to protect [] in grep expression.
13229            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13230            if test "x$FOUND_VERSION_78" = x; then
13231              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13233              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13234$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13235              BOOT_JDK_FOUND=no
13236            else
13237              # We're done! :-)
13238              BOOT_JDK_FOUND=yes
13239
13240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13241
13242  # Input might be given as Windows format, start by converting to
13243  # unix format.
13244  path="$BOOT_JDK"
13245  new_path=`$CYGPATH -u "$path"`
13246
13247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13250  # "foo.exe" is OK but "foo" is an error.
13251  #
13252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13253  # It is also a way to make sure we got the proper file name for the real test later on.
13254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13255  if test "x$test_shortpath" = x; then
13256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13258    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13259  fi
13260
13261  # Call helper function which possibly converts this using DOS-style short mode.
13262  # If so, the updated path is stored in $new_path.
13263
13264  input_path="$new_path"
13265  # Check if we need to convert this using DOS-style short mode. If the path
13266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13267  # take no chances and rewrite it.
13268  # Note: m4 eats our [], so we need to use [ and ] instead.
13269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13270  if test "x$has_forbidden_chars" != x; then
13271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13275      # Going to short mode and back again did indeed matter. Since short mode is
13276      # case insensitive, let's make it lowercase to improve readability.
13277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13278      # Now convert it back to Unix-stile (cygpath)
13279      input_path=`$CYGPATH -u "$shortmode_path"`
13280      new_path="$input_path"
13281    fi
13282  fi
13283
13284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13285  if test "x$test_cygdrive_prefix" = x; then
13286    # As a simple fix, exclude /usr/bin since it's not a real path.
13287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13289      # a path prefixed by /cygdrive for fixpath to work.
13290      new_path="$CYGWIN_ROOT_PATH$input_path"
13291    fi
13292  fi
13293
13294
13295  if test "x$path" != "x$new_path"; then
13296    BOOT_JDK="$new_path"
13297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13299  fi
13300
13301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13302
13303  path="$BOOT_JDK"
13304  has_colon=`$ECHO $path | $GREP ^.:`
13305  new_path="$path"
13306  if test "x$has_colon" = x; then
13307    # Not in mixed or Windows style, start by that.
13308    new_path=`cmd //c echo $path`
13309  fi
13310
13311
13312  input_path="$new_path"
13313  # Check if we need to convert this using DOS-style short mode. If the path
13314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13315  # take no chances and rewrite it.
13316  # Note: m4 eats our [], so we need to use [ and ] instead.
13317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13318  if test "x$has_forbidden_chars" != x; then
13319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13321  fi
13322
13323
13324  windows_path="$new_path"
13325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13326    unix_path=`$CYGPATH -u "$windows_path"`
13327    new_path="$unix_path"
13328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13330    new_path="$unix_path"
13331  fi
13332
13333  if test "x$path" != "x$new_path"; then
13334    BOOT_JDK="$new_path"
13335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13336$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13337  fi
13338
13339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13341
13342  else
13343    # We're on a posix platform. Hooray! :)
13344    path="$BOOT_JDK"
13345
13346    if test ! -f "$path" && test ! -d "$path"; then
13347      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13348    fi
13349
13350    has_space=`$ECHO "$path" | $GREP " "`
13351    if test "x$has_space" != x; then
13352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13353$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13354      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13355    fi
13356  fi
13357
13358              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13359$as_echo_n "checking for Boot JDK... " >&6; }
13360              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13361$as_echo "$BOOT_JDK" >&6; }
13362              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13363$as_echo_n "checking Boot JDK version... " >&6; }
13364              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13365              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13366$as_echo "$BOOT_JDK_VERSION" >&6; }
13367            fi # end check jdk version
13368          fi # end check rt.jar
13369        fi # end check javac
13370      fi # end check java
13371    fi # end check boot jdk found
13372  fi
13373
13374    done
13375  fi
13376
13377  fi
13378
13379
13380    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13381    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13382      # Do we have a bin/java?
13383      if test ! -x "$BOOT_JDK/bin/java"; then
13384        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13386        BOOT_JDK_FOUND=no
13387      else
13388        # Do we have a bin/javac?
13389        if test ! -x "$BOOT_JDK/bin/javac"; then
13390          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13392          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13393$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13394          BOOT_JDK_FOUND=no
13395        else
13396          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13397          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13400            BOOT_JDK_FOUND=no
13401          else
13402            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13403            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13404
13405            # Extra M4 quote needed to protect [] in grep expression.
13406            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13407            if test "x$FOUND_VERSION_78" = x; then
13408              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13410              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13411$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13412              BOOT_JDK_FOUND=no
13413            else
13414              # We're done! :-)
13415              BOOT_JDK_FOUND=yes
13416
13417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13418
13419  # Input might be given as Windows format, start by converting to
13420  # unix format.
13421  path="$BOOT_JDK"
13422  new_path=`$CYGPATH -u "$path"`
13423
13424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13427  # "foo.exe" is OK but "foo" is an error.
13428  #
13429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13430  # It is also a way to make sure we got the proper file name for the real test later on.
13431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13432  if test "x$test_shortpath" = x; then
13433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13436  fi
13437
13438  # Call helper function which possibly converts this using DOS-style short mode.
13439  # If so, the updated path is stored in $new_path.
13440
13441  input_path="$new_path"
13442  # Check if we need to convert this using DOS-style short mode. If the path
13443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13444  # take no chances and rewrite it.
13445  # Note: m4 eats our [], so we need to use [ and ] instead.
13446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13447  if test "x$has_forbidden_chars" != x; then
13448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13452      # Going to short mode and back again did indeed matter. Since short mode is
13453      # case insensitive, let's make it lowercase to improve readability.
13454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13455      # Now convert it back to Unix-stile (cygpath)
13456      input_path=`$CYGPATH -u "$shortmode_path"`
13457      new_path="$input_path"
13458    fi
13459  fi
13460
13461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13462  if test "x$test_cygdrive_prefix" = x; then
13463    # As a simple fix, exclude /usr/bin since it's not a real path.
13464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13466      # a path prefixed by /cygdrive for fixpath to work.
13467      new_path="$CYGWIN_ROOT_PATH$input_path"
13468    fi
13469  fi
13470
13471
13472  if test "x$path" != "x$new_path"; then
13473    BOOT_JDK="$new_path"
13474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13476  fi
13477
13478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13479
13480  path="$BOOT_JDK"
13481  has_colon=`$ECHO $path | $GREP ^.:`
13482  new_path="$path"
13483  if test "x$has_colon" = x; then
13484    # Not in mixed or Windows style, start by that.
13485    new_path=`cmd //c echo $path`
13486  fi
13487
13488
13489  input_path="$new_path"
13490  # Check if we need to convert this using DOS-style short mode. If the path
13491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13492  # take no chances and rewrite it.
13493  # Note: m4 eats our [], so we need to use [ and ] instead.
13494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13495  if test "x$has_forbidden_chars" != x; then
13496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13498  fi
13499
13500
13501  windows_path="$new_path"
13502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13503    unix_path=`$CYGPATH -u "$windows_path"`
13504    new_path="$unix_path"
13505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13507    new_path="$unix_path"
13508  fi
13509
13510  if test "x$path" != "x$new_path"; then
13511    BOOT_JDK="$new_path"
13512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13514  fi
13515
13516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13518
13519  else
13520    # We're on a posix platform. Hooray! :)
13521    path="$BOOT_JDK"
13522
13523    if test ! -f "$path" && test ! -d "$path"; then
13524      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13525    fi
13526
13527    has_space=`$ECHO "$path" | $GREP " "`
13528    if test "x$has_space" != x; then
13529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13531      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13532    fi
13533  fi
13534
13535              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13536$as_echo_n "checking for Boot JDK... " >&6; }
13537              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13538$as_echo "$BOOT_JDK" >&6; }
13539              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13540$as_echo_n "checking Boot JDK version... " >&6; }
13541              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13542              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13543$as_echo "$BOOT_JDK_VERSION" >&6; }
13544            fi # end check jdk version
13545          fi # end check rt.jar
13546        fi # end check javac
13547      fi # end check java
13548    fi # end check boot jdk found
13549  fi
13550
13551
13552  if test "x$BOOT_JDK_FOUND" = xno; then
13553    # Now execute the test
13554
13555  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13556  BOOT_JDK_SUFFIX=""
13557  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13558  if test "x$ALL_JDKS_FOUND" != x; then
13559    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13560
13561  if test "x$BOOT_JDK_FOUND" = xno; then
13562    # Now execute the test
13563
13564        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13565        if test -d "$BOOT_JDK"; then
13566          BOOT_JDK_FOUND=maybe
13567          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13568$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13569        fi
13570
13571
13572    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13573    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13574      # Do we have a bin/java?
13575      if test ! -x "$BOOT_JDK/bin/java"; then
13576        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13578        BOOT_JDK_FOUND=no
13579      else
13580        # Do we have a bin/javac?
13581        if test ! -x "$BOOT_JDK/bin/javac"; then
13582          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13584          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13585$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13586          BOOT_JDK_FOUND=no
13587        else
13588          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13589          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13590            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13592            BOOT_JDK_FOUND=no
13593          else
13594            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13595            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13596
13597            # Extra M4 quote needed to protect [] in grep expression.
13598            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13599            if test "x$FOUND_VERSION_78" = x; then
13600              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13602              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13603$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13604              BOOT_JDK_FOUND=no
13605            else
13606              # We're done! :-)
13607              BOOT_JDK_FOUND=yes
13608
13609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13610
13611  # Input might be given as Windows format, start by converting to
13612  # unix format.
13613  path="$BOOT_JDK"
13614  new_path=`$CYGPATH -u "$path"`
13615
13616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13619  # "foo.exe" is OK but "foo" is an error.
13620  #
13621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13622  # It is also a way to make sure we got the proper file name for the real test later on.
13623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13624  if test "x$test_shortpath" = x; then
13625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13627    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13628  fi
13629
13630  # Call helper function which possibly converts this using DOS-style short mode.
13631  # If so, the updated path is stored in $new_path.
13632
13633  input_path="$new_path"
13634  # Check if we need to convert this using DOS-style short mode. If the path
13635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13636  # take no chances and rewrite it.
13637  # Note: m4 eats our [], so we need to use [ and ] instead.
13638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13639  if test "x$has_forbidden_chars" != x; then
13640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13644      # Going to short mode and back again did indeed matter. Since short mode is
13645      # case insensitive, let's make it lowercase to improve readability.
13646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13647      # Now convert it back to Unix-stile (cygpath)
13648      input_path=`$CYGPATH -u "$shortmode_path"`
13649      new_path="$input_path"
13650    fi
13651  fi
13652
13653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13654  if test "x$test_cygdrive_prefix" = x; then
13655    # As a simple fix, exclude /usr/bin since it's not a real path.
13656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13658      # a path prefixed by /cygdrive for fixpath to work.
13659      new_path="$CYGWIN_ROOT_PATH$input_path"
13660    fi
13661  fi
13662
13663
13664  if test "x$path" != "x$new_path"; then
13665    BOOT_JDK="$new_path"
13666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13668  fi
13669
13670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13671
13672  path="$BOOT_JDK"
13673  has_colon=`$ECHO $path | $GREP ^.:`
13674  new_path="$path"
13675  if test "x$has_colon" = x; then
13676    # Not in mixed or Windows style, start by that.
13677    new_path=`cmd //c echo $path`
13678  fi
13679
13680
13681  input_path="$new_path"
13682  # Check if we need to convert this using DOS-style short mode. If the path
13683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13684  # take no chances and rewrite it.
13685  # Note: m4 eats our [], so we need to use [ and ] instead.
13686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13687  if test "x$has_forbidden_chars" != x; then
13688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13690  fi
13691
13692
13693  windows_path="$new_path"
13694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13695    unix_path=`$CYGPATH -u "$windows_path"`
13696    new_path="$unix_path"
13697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13699    new_path="$unix_path"
13700  fi
13701
13702  if test "x$path" != "x$new_path"; then
13703    BOOT_JDK="$new_path"
13704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13706  fi
13707
13708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13710
13711  else
13712    # We're on a posix platform. Hooray! :)
13713    path="$BOOT_JDK"
13714
13715    if test ! -f "$path" && test ! -d "$path"; then
13716      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13717    fi
13718
13719    has_space=`$ECHO "$path" | $GREP " "`
13720    if test "x$has_space" != x; then
13721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13723      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13724    fi
13725  fi
13726
13727              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13728$as_echo_n "checking for Boot JDK... " >&6; }
13729              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13730$as_echo "$BOOT_JDK" >&6; }
13731              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13732$as_echo_n "checking Boot JDK version... " >&6; }
13733              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13734              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13735$as_echo "$BOOT_JDK_VERSION" >&6; }
13736            fi # end check jdk version
13737          fi # end check rt.jar
13738        fi # end check javac
13739      fi # end check java
13740    fi # end check boot jdk found
13741  fi
13742
13743    done
13744  fi
13745
13746
13747    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13748    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13749      # Do we have a bin/java?
13750      if test ! -x "$BOOT_JDK/bin/java"; then
13751        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13753        BOOT_JDK_FOUND=no
13754      else
13755        # Do we have a bin/javac?
13756        if test ! -x "$BOOT_JDK/bin/javac"; then
13757          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13759          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13760$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13761          BOOT_JDK_FOUND=no
13762        else
13763          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13764          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13765            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13767            BOOT_JDK_FOUND=no
13768          else
13769            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13771
13772            # Extra M4 quote needed to protect [] in grep expression.
13773            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13774            if test "x$FOUND_VERSION_78" = x; then
13775              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13777              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13778$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13779              BOOT_JDK_FOUND=no
13780            else
13781              # We're done! :-)
13782              BOOT_JDK_FOUND=yes
13783
13784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13785
13786  # Input might be given as Windows format, start by converting to
13787  # unix format.
13788  path="$BOOT_JDK"
13789  new_path=`$CYGPATH -u "$path"`
13790
13791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13794  # "foo.exe" is OK but "foo" is an error.
13795  #
13796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13797  # It is also a way to make sure we got the proper file name for the real test later on.
13798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13799  if test "x$test_shortpath" = x; then
13800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13802    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13803  fi
13804
13805  # Call helper function which possibly converts this using DOS-style short mode.
13806  # If so, the updated path is stored in $new_path.
13807
13808  input_path="$new_path"
13809  # Check if we need to convert this using DOS-style short mode. If the path
13810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13811  # take no chances and rewrite it.
13812  # Note: m4 eats our [], so we need to use [ and ] instead.
13813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13814  if test "x$has_forbidden_chars" != x; then
13815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13819      # Going to short mode and back again did indeed matter. Since short mode is
13820      # case insensitive, let's make it lowercase to improve readability.
13821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13822      # Now convert it back to Unix-stile (cygpath)
13823      input_path=`$CYGPATH -u "$shortmode_path"`
13824      new_path="$input_path"
13825    fi
13826  fi
13827
13828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13829  if test "x$test_cygdrive_prefix" = x; then
13830    # As a simple fix, exclude /usr/bin since it's not a real path.
13831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13833      # a path prefixed by /cygdrive for fixpath to work.
13834      new_path="$CYGWIN_ROOT_PATH$input_path"
13835    fi
13836  fi
13837
13838
13839  if test "x$path" != "x$new_path"; then
13840    BOOT_JDK="$new_path"
13841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13843  fi
13844
13845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13846
13847  path="$BOOT_JDK"
13848  has_colon=`$ECHO $path | $GREP ^.:`
13849  new_path="$path"
13850  if test "x$has_colon" = x; then
13851    # Not in mixed or Windows style, start by that.
13852    new_path=`cmd //c echo $path`
13853  fi
13854
13855
13856  input_path="$new_path"
13857  # Check if we need to convert this using DOS-style short mode. If the path
13858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13859  # take no chances and rewrite it.
13860  # Note: m4 eats our [], so we need to use [ and ] instead.
13861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13862  if test "x$has_forbidden_chars" != x; then
13863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13865  fi
13866
13867
13868  windows_path="$new_path"
13869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13870    unix_path=`$CYGPATH -u "$windows_path"`
13871    new_path="$unix_path"
13872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13874    new_path="$unix_path"
13875  fi
13876
13877  if test "x$path" != "x$new_path"; then
13878    BOOT_JDK="$new_path"
13879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13881  fi
13882
13883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13885
13886  else
13887    # We're on a posix platform. Hooray! :)
13888    path="$BOOT_JDK"
13889
13890    if test ! -f "$path" && test ! -d "$path"; then
13891      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13892    fi
13893
13894    has_space=`$ECHO "$path" | $GREP " "`
13895    if test "x$has_space" != x; then
13896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13898      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13899    fi
13900  fi
13901
13902              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13903$as_echo_n "checking for Boot JDK... " >&6; }
13904              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13905$as_echo "$BOOT_JDK" >&6; }
13906              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13907$as_echo_n "checking Boot JDK version... " >&6; }
13908              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13909              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13910$as_echo "$BOOT_JDK_VERSION" >&6; }
13911            fi # end check jdk version
13912          fi # end check rt.jar
13913        fi # end check javac
13914      fi # end check java
13915    fi # end check boot jdk found
13916  fi
13917
13918  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13919
13920  if test "x$BOOT_JDK_FOUND" = xno; then
13921    # Now execute the test
13922
13923  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13924  BOOT_JDK_SUFFIX="/Contents/Home"
13925  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13926  if test "x$ALL_JDKS_FOUND" != x; then
13927    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13928
13929  if test "x$BOOT_JDK_FOUND" = xno; then
13930    # Now execute the test
13931
13932        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13933        if test -d "$BOOT_JDK"; then
13934          BOOT_JDK_FOUND=maybe
13935          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13936$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13937        fi
13938
13939
13940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13942      # Do we have a bin/java?
13943      if test ! -x "$BOOT_JDK/bin/java"; then
13944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13946        BOOT_JDK_FOUND=no
13947      else
13948        # Do we have a bin/javac?
13949        if test ! -x "$BOOT_JDK/bin/javac"; then
13950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13954          BOOT_JDK_FOUND=no
13955        else
13956          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13957          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13958            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13960            BOOT_JDK_FOUND=no
13961          else
13962            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13964
13965            # Extra M4 quote needed to protect [] in grep expression.
13966            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13967            if test "x$FOUND_VERSION_78" = x; then
13968              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13970              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13971$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13972              BOOT_JDK_FOUND=no
13973            else
13974              # We're done! :-)
13975              BOOT_JDK_FOUND=yes
13976
13977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13978
13979  # Input might be given as Windows format, start by converting to
13980  # unix format.
13981  path="$BOOT_JDK"
13982  new_path=`$CYGPATH -u "$path"`
13983
13984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13987  # "foo.exe" is OK but "foo" is an error.
13988  #
13989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13990  # It is also a way to make sure we got the proper file name for the real test later on.
13991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13992  if test "x$test_shortpath" = x; then
13993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13995    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13996  fi
13997
13998  # Call helper function which possibly converts this using DOS-style short mode.
13999  # If so, the updated path is stored in $new_path.
14000
14001  input_path="$new_path"
14002  # Check if we need to convert this using DOS-style short mode. If the path
14003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14004  # take no chances and rewrite it.
14005  # Note: m4 eats our [], so we need to use [ and ] instead.
14006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14007  if test "x$has_forbidden_chars" != x; then
14008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14012      # Going to short mode and back again did indeed matter. Since short mode is
14013      # case insensitive, let's make it lowercase to improve readability.
14014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14015      # Now convert it back to Unix-stile (cygpath)
14016      input_path=`$CYGPATH -u "$shortmode_path"`
14017      new_path="$input_path"
14018    fi
14019  fi
14020
14021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14022  if test "x$test_cygdrive_prefix" = x; then
14023    # As a simple fix, exclude /usr/bin since it's not a real path.
14024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14026      # a path prefixed by /cygdrive for fixpath to work.
14027      new_path="$CYGWIN_ROOT_PATH$input_path"
14028    fi
14029  fi
14030
14031
14032  if test "x$path" != "x$new_path"; then
14033    BOOT_JDK="$new_path"
14034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14036  fi
14037
14038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14039
14040  path="$BOOT_JDK"
14041  has_colon=`$ECHO $path | $GREP ^.:`
14042  new_path="$path"
14043  if test "x$has_colon" = x; then
14044    # Not in mixed or Windows style, start by that.
14045    new_path=`cmd //c echo $path`
14046  fi
14047
14048
14049  input_path="$new_path"
14050  # Check if we need to convert this using DOS-style short mode. If the path
14051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14052  # take no chances and rewrite it.
14053  # Note: m4 eats our [], so we need to use [ and ] instead.
14054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14055  if test "x$has_forbidden_chars" != x; then
14056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14058  fi
14059
14060
14061  windows_path="$new_path"
14062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14063    unix_path=`$CYGPATH -u "$windows_path"`
14064    new_path="$unix_path"
14065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14067    new_path="$unix_path"
14068  fi
14069
14070  if test "x$path" != "x$new_path"; then
14071    BOOT_JDK="$new_path"
14072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14074  fi
14075
14076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14078
14079  else
14080    # We're on a posix platform. Hooray! :)
14081    path="$BOOT_JDK"
14082
14083    if test ! -f "$path" && test ! -d "$path"; then
14084      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14085    fi
14086
14087    has_space=`$ECHO "$path" | $GREP " "`
14088    if test "x$has_space" != x; then
14089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14091      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14092    fi
14093  fi
14094
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14096$as_echo_n "checking for Boot JDK... " >&6; }
14097              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14098$as_echo "$BOOT_JDK" >&6; }
14099              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14100$as_echo_n "checking Boot JDK version... " >&6; }
14101              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14102              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14103$as_echo "$BOOT_JDK_VERSION" >&6; }
14104            fi # end check jdk version
14105          fi # end check rt.jar
14106        fi # end check javac
14107      fi # end check java
14108    fi # end check boot jdk found
14109  fi
14110
14111    done
14112  fi
14113
14114
14115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14117      # Do we have a bin/java?
14118      if test ! -x "$BOOT_JDK/bin/java"; then
14119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14121        BOOT_JDK_FOUND=no
14122      else
14123        # Do we have a bin/javac?
14124        if test ! -x "$BOOT_JDK/bin/javac"; then
14125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14129          BOOT_JDK_FOUND=no
14130        else
14131          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14132          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14133            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14135            BOOT_JDK_FOUND=no
14136          else
14137            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14138            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14139
14140            # Extra M4 quote needed to protect [] in grep expression.
14141            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14142            if test "x$FOUND_VERSION_78" = x; then
14143              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14145              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14146$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14147              BOOT_JDK_FOUND=no
14148            else
14149              # We're done! :-)
14150              BOOT_JDK_FOUND=yes
14151
14152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14153
14154  # Input might be given as Windows format, start by converting to
14155  # unix format.
14156  path="$BOOT_JDK"
14157  new_path=`$CYGPATH -u "$path"`
14158
14159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14162  # "foo.exe" is OK but "foo" is an error.
14163  #
14164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14165  # It is also a way to make sure we got the proper file name for the real test later on.
14166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14167  if test "x$test_shortpath" = x; then
14168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14171  fi
14172
14173  # Call helper function which possibly converts this using DOS-style short mode.
14174  # If so, the updated path is stored in $new_path.
14175
14176  input_path="$new_path"
14177  # Check if we need to convert this using DOS-style short mode. If the path
14178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14179  # take no chances and rewrite it.
14180  # Note: m4 eats our [], so we need to use [ and ] instead.
14181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14182  if test "x$has_forbidden_chars" != x; then
14183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14187      # Going to short mode and back again did indeed matter. Since short mode is
14188      # case insensitive, let's make it lowercase to improve readability.
14189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14190      # Now convert it back to Unix-stile (cygpath)
14191      input_path=`$CYGPATH -u "$shortmode_path"`
14192      new_path="$input_path"
14193    fi
14194  fi
14195
14196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14197  if test "x$test_cygdrive_prefix" = x; then
14198    # As a simple fix, exclude /usr/bin since it's not a real path.
14199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14201      # a path prefixed by /cygdrive for fixpath to work.
14202      new_path="$CYGWIN_ROOT_PATH$input_path"
14203    fi
14204  fi
14205
14206
14207  if test "x$path" != "x$new_path"; then
14208    BOOT_JDK="$new_path"
14209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14211  fi
14212
14213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14214
14215  path="$BOOT_JDK"
14216  has_colon=`$ECHO $path | $GREP ^.:`
14217  new_path="$path"
14218  if test "x$has_colon" = x; then
14219    # Not in mixed or Windows style, start by that.
14220    new_path=`cmd //c echo $path`
14221  fi
14222
14223
14224  input_path="$new_path"
14225  # Check if we need to convert this using DOS-style short mode. If the path
14226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14227  # take no chances and rewrite it.
14228  # Note: m4 eats our [], so we need to use [ and ] instead.
14229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14230  if test "x$has_forbidden_chars" != x; then
14231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14233  fi
14234
14235
14236  windows_path="$new_path"
14237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14238    unix_path=`$CYGPATH -u "$windows_path"`
14239    new_path="$unix_path"
14240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14242    new_path="$unix_path"
14243  fi
14244
14245  if test "x$path" != "x$new_path"; then
14246    BOOT_JDK="$new_path"
14247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14249  fi
14250
14251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14253
14254  else
14255    # We're on a posix platform. Hooray! :)
14256    path="$BOOT_JDK"
14257
14258    if test ! -f "$path" && test ! -d "$path"; then
14259      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14260    fi
14261
14262    has_space=`$ECHO "$path" | $GREP " "`
14263    if test "x$has_space" != x; then
14264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14266      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14267    fi
14268  fi
14269
14270              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14271$as_echo_n "checking for Boot JDK... " >&6; }
14272              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14273$as_echo "$BOOT_JDK" >&6; }
14274              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14275$as_echo_n "checking Boot JDK version... " >&6; }
14276              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14277              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14278$as_echo "$BOOT_JDK_VERSION" >&6; }
14279            fi # end check jdk version
14280          fi # end check rt.jar
14281        fi # end check javac
14282      fi # end check java
14283    fi # end check boot jdk found
14284  fi
14285
14286
14287  if test "x$BOOT_JDK_FOUND" = xno; then
14288    # Now execute the test
14289
14290  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14291  BOOT_JDK_SUFFIX="/Contents/Home"
14292  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14293  if test "x$ALL_JDKS_FOUND" != x; then
14294    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14295
14296  if test "x$BOOT_JDK_FOUND" = xno; then
14297    # Now execute the test
14298
14299        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14300        if test -d "$BOOT_JDK"; then
14301          BOOT_JDK_FOUND=maybe
14302          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14303$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14304        fi
14305
14306
14307    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14308    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14309      # Do we have a bin/java?
14310      if test ! -x "$BOOT_JDK/bin/java"; then
14311        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14313        BOOT_JDK_FOUND=no
14314      else
14315        # Do we have a bin/javac?
14316        if test ! -x "$BOOT_JDK/bin/javac"; then
14317          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14319          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14320$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14321          BOOT_JDK_FOUND=no
14322        else
14323          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14324          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14325            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14327            BOOT_JDK_FOUND=no
14328          else
14329            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14330            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14331
14332            # Extra M4 quote needed to protect [] in grep expression.
14333            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14334            if test "x$FOUND_VERSION_78" = x; then
14335              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14337              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14338$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14339              BOOT_JDK_FOUND=no
14340            else
14341              # We're done! :-)
14342              BOOT_JDK_FOUND=yes
14343
14344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14345
14346  # Input might be given as Windows format, start by converting to
14347  # unix format.
14348  path="$BOOT_JDK"
14349  new_path=`$CYGPATH -u "$path"`
14350
14351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14354  # "foo.exe" is OK but "foo" is an error.
14355  #
14356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14357  # It is also a way to make sure we got the proper file name for the real test later on.
14358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14359  if test "x$test_shortpath" = x; then
14360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14361$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14362    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14363  fi
14364
14365  # Call helper function which possibly converts this using DOS-style short mode.
14366  # If so, the updated path is stored in $new_path.
14367
14368  input_path="$new_path"
14369  # Check if we need to convert this using DOS-style short mode. If the path
14370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14371  # take no chances and rewrite it.
14372  # Note: m4 eats our [], so we need to use [ and ] instead.
14373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14374  if test "x$has_forbidden_chars" != x; then
14375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14379      # Going to short mode and back again did indeed matter. Since short mode is
14380      # case insensitive, let's make it lowercase to improve readability.
14381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14382      # Now convert it back to Unix-stile (cygpath)
14383      input_path=`$CYGPATH -u "$shortmode_path"`
14384      new_path="$input_path"
14385    fi
14386  fi
14387
14388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14389  if test "x$test_cygdrive_prefix" = x; then
14390    # As a simple fix, exclude /usr/bin since it's not a real path.
14391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14393      # a path prefixed by /cygdrive for fixpath to work.
14394      new_path="$CYGWIN_ROOT_PATH$input_path"
14395    fi
14396  fi
14397
14398
14399  if test "x$path" != "x$new_path"; then
14400    BOOT_JDK="$new_path"
14401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14403  fi
14404
14405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14406
14407  path="$BOOT_JDK"
14408  has_colon=`$ECHO $path | $GREP ^.:`
14409  new_path="$path"
14410  if test "x$has_colon" = x; then
14411    # Not in mixed or Windows style, start by that.
14412    new_path=`cmd //c echo $path`
14413  fi
14414
14415
14416  input_path="$new_path"
14417  # Check if we need to convert this using DOS-style short mode. If the path
14418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14419  # take no chances and rewrite it.
14420  # Note: m4 eats our [], so we need to use [ and ] instead.
14421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14422  if test "x$has_forbidden_chars" != x; then
14423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14425  fi
14426
14427
14428  windows_path="$new_path"
14429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14430    unix_path=`$CYGPATH -u "$windows_path"`
14431    new_path="$unix_path"
14432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14434    new_path="$unix_path"
14435  fi
14436
14437  if test "x$path" != "x$new_path"; then
14438    BOOT_JDK="$new_path"
14439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14441  fi
14442
14443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14445
14446  else
14447    # We're on a posix platform. Hooray! :)
14448    path="$BOOT_JDK"
14449
14450    if test ! -f "$path" && test ! -d "$path"; then
14451      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14452    fi
14453
14454    has_space=`$ECHO "$path" | $GREP " "`
14455    if test "x$has_space" != x; then
14456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14458      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14459    fi
14460  fi
14461
14462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14463$as_echo_n "checking for Boot JDK... " >&6; }
14464              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14465$as_echo "$BOOT_JDK" >&6; }
14466              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14467$as_echo_n "checking Boot JDK version... " >&6; }
14468              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14470$as_echo "$BOOT_JDK_VERSION" >&6; }
14471            fi # end check jdk version
14472          fi # end check rt.jar
14473        fi # end check javac
14474      fi # end check java
14475    fi # end check boot jdk found
14476  fi
14477
14478    done
14479  fi
14480
14481
14482    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14483    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14484      # Do we have a bin/java?
14485      if test ! -x "$BOOT_JDK/bin/java"; then
14486        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14488        BOOT_JDK_FOUND=no
14489      else
14490        # Do we have a bin/javac?
14491        if test ! -x "$BOOT_JDK/bin/javac"; then
14492          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14494          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14495$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14496          BOOT_JDK_FOUND=no
14497        else
14498          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14499          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14500            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14502            BOOT_JDK_FOUND=no
14503          else
14504            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14506
14507            # Extra M4 quote needed to protect [] in grep expression.
14508            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14509            if test "x$FOUND_VERSION_78" = x; then
14510              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14512              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14513$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14514              BOOT_JDK_FOUND=no
14515            else
14516              # We're done! :-)
14517              BOOT_JDK_FOUND=yes
14518
14519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14520
14521  # Input might be given as Windows format, start by converting to
14522  # unix format.
14523  path="$BOOT_JDK"
14524  new_path=`$CYGPATH -u "$path"`
14525
14526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14529  # "foo.exe" is OK but "foo" is an error.
14530  #
14531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14532  # It is also a way to make sure we got the proper file name for the real test later on.
14533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14534  if test "x$test_shortpath" = x; then
14535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14537    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14538  fi
14539
14540  # Call helper function which possibly converts this using DOS-style short mode.
14541  # If so, the updated path is stored in $new_path.
14542
14543  input_path="$new_path"
14544  # Check if we need to convert this using DOS-style short mode. If the path
14545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14546  # take no chances and rewrite it.
14547  # Note: m4 eats our [], so we need to use [ and ] instead.
14548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14549  if test "x$has_forbidden_chars" != x; then
14550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14554      # Going to short mode and back again did indeed matter. Since short mode is
14555      # case insensitive, let's make it lowercase to improve readability.
14556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14557      # Now convert it back to Unix-stile (cygpath)
14558      input_path=`$CYGPATH -u "$shortmode_path"`
14559      new_path="$input_path"
14560    fi
14561  fi
14562
14563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14564  if test "x$test_cygdrive_prefix" = x; then
14565    # As a simple fix, exclude /usr/bin since it's not a real path.
14566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14568      # a path prefixed by /cygdrive for fixpath to work.
14569      new_path="$CYGWIN_ROOT_PATH$input_path"
14570    fi
14571  fi
14572
14573
14574  if test "x$path" != "x$new_path"; then
14575    BOOT_JDK="$new_path"
14576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14578  fi
14579
14580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14581
14582  path="$BOOT_JDK"
14583  has_colon=`$ECHO $path | $GREP ^.:`
14584  new_path="$path"
14585  if test "x$has_colon" = x; then
14586    # Not in mixed or Windows style, start by that.
14587    new_path=`cmd //c echo $path`
14588  fi
14589
14590
14591  input_path="$new_path"
14592  # Check if we need to convert this using DOS-style short mode. If the path
14593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14594  # take no chances and rewrite it.
14595  # Note: m4 eats our [], so we need to use [ and ] instead.
14596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14597  if test "x$has_forbidden_chars" != x; then
14598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14600  fi
14601
14602
14603  windows_path="$new_path"
14604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14605    unix_path=`$CYGPATH -u "$windows_path"`
14606    new_path="$unix_path"
14607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14609    new_path="$unix_path"
14610  fi
14611
14612  if test "x$path" != "x$new_path"; then
14613    BOOT_JDK="$new_path"
14614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14616  fi
14617
14618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14620
14621  else
14622    # We're on a posix platform. Hooray! :)
14623    path="$BOOT_JDK"
14624
14625    if test ! -f "$path" && test ! -d "$path"; then
14626      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14627    fi
14628
14629    has_space=`$ECHO "$path" | $GREP " "`
14630    if test "x$has_space" != x; then
14631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14633      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14634    fi
14635  fi
14636
14637              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14638$as_echo_n "checking for Boot JDK... " >&6; }
14639              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14640$as_echo "$BOOT_JDK" >&6; }
14641              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14642$as_echo_n "checking Boot JDK version... " >&6; }
14643              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14644              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14645$as_echo "$BOOT_JDK_VERSION" >&6; }
14646            fi # end check jdk version
14647          fi # end check rt.jar
14648        fi # end check javac
14649      fi # end check java
14650    fi # end check boot jdk found
14651  fi
14652
14653  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14654
14655  if test "x$BOOT_JDK_FOUND" = xno; then
14656    # Now execute the test
14657
14658  BOOT_JDK_PREFIX="/usr/lib/jvm"
14659  BOOT_JDK_SUFFIX=""
14660  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14661  if test "x$ALL_JDKS_FOUND" != x; then
14662    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14663
14664  if test "x$BOOT_JDK_FOUND" = xno; then
14665    # Now execute the test
14666
14667        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14668        if test -d "$BOOT_JDK"; then
14669          BOOT_JDK_FOUND=maybe
14670          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14671$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14672        fi
14673
14674
14675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14677      # Do we have a bin/java?
14678      if test ! -x "$BOOT_JDK/bin/java"; then
14679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14681        BOOT_JDK_FOUND=no
14682      else
14683        # Do we have a bin/javac?
14684        if test ! -x "$BOOT_JDK/bin/javac"; then
14685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14689          BOOT_JDK_FOUND=no
14690        else
14691          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14692          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14693            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14695            BOOT_JDK_FOUND=no
14696          else
14697            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14698            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14699
14700            # Extra M4 quote needed to protect [] in grep expression.
14701            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14702            if test "x$FOUND_VERSION_78" = x; then
14703              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14705              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14706$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14707              BOOT_JDK_FOUND=no
14708            else
14709              # We're done! :-)
14710              BOOT_JDK_FOUND=yes
14711
14712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14713
14714  # Input might be given as Windows format, start by converting to
14715  # unix format.
14716  path="$BOOT_JDK"
14717  new_path=`$CYGPATH -u "$path"`
14718
14719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14722  # "foo.exe" is OK but "foo" is an error.
14723  #
14724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14725  # It is also a way to make sure we got the proper file name for the real test later on.
14726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14727  if test "x$test_shortpath" = x; then
14728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14731  fi
14732
14733  # Call helper function which possibly converts this using DOS-style short mode.
14734  # If so, the updated path is stored in $new_path.
14735
14736  input_path="$new_path"
14737  # Check if we need to convert this using DOS-style short mode. If the path
14738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14739  # take no chances and rewrite it.
14740  # Note: m4 eats our [], so we need to use [ and ] instead.
14741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14742  if test "x$has_forbidden_chars" != x; then
14743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14747      # Going to short mode and back again did indeed matter. Since short mode is
14748      # case insensitive, let's make it lowercase to improve readability.
14749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14750      # Now convert it back to Unix-stile (cygpath)
14751      input_path=`$CYGPATH -u "$shortmode_path"`
14752      new_path="$input_path"
14753    fi
14754  fi
14755
14756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14757  if test "x$test_cygdrive_prefix" = x; then
14758    # As a simple fix, exclude /usr/bin since it's not a real path.
14759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14761      # a path prefixed by /cygdrive for fixpath to work.
14762      new_path="$CYGWIN_ROOT_PATH$input_path"
14763    fi
14764  fi
14765
14766
14767  if test "x$path" != "x$new_path"; then
14768    BOOT_JDK="$new_path"
14769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14771  fi
14772
14773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14774
14775  path="$BOOT_JDK"
14776  has_colon=`$ECHO $path | $GREP ^.:`
14777  new_path="$path"
14778  if test "x$has_colon" = x; then
14779    # Not in mixed or Windows style, start by that.
14780    new_path=`cmd //c echo $path`
14781  fi
14782
14783
14784  input_path="$new_path"
14785  # Check if we need to convert this using DOS-style short mode. If the path
14786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14787  # take no chances and rewrite it.
14788  # Note: m4 eats our [], so we need to use [ and ] instead.
14789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14790  if test "x$has_forbidden_chars" != x; then
14791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14793  fi
14794
14795
14796  windows_path="$new_path"
14797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14798    unix_path=`$CYGPATH -u "$windows_path"`
14799    new_path="$unix_path"
14800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14802    new_path="$unix_path"
14803  fi
14804
14805  if test "x$path" != "x$new_path"; then
14806    BOOT_JDK="$new_path"
14807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14809  fi
14810
14811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14813
14814  else
14815    # We're on a posix platform. Hooray! :)
14816    path="$BOOT_JDK"
14817
14818    if test ! -f "$path" && test ! -d "$path"; then
14819      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14820    fi
14821
14822    has_space=`$ECHO "$path" | $GREP " "`
14823    if test "x$has_space" != x; then
14824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14827    fi
14828  fi
14829
14830              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14831$as_echo_n "checking for Boot JDK... " >&6; }
14832              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14833$as_echo "$BOOT_JDK" >&6; }
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14835$as_echo_n "checking Boot JDK version... " >&6; }
14836              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14837              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14838$as_echo "$BOOT_JDK_VERSION" >&6; }
14839            fi # end check jdk version
14840          fi # end check rt.jar
14841        fi # end check javac
14842      fi # end check java
14843    fi # end check boot jdk found
14844  fi
14845
14846    done
14847  fi
14848
14849
14850    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14851    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14852      # Do we have a bin/java?
14853      if test ! -x "$BOOT_JDK/bin/java"; then
14854        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14856        BOOT_JDK_FOUND=no
14857      else
14858        # Do we have a bin/javac?
14859        if test ! -x "$BOOT_JDK/bin/javac"; then
14860          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14862          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14863$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14864          BOOT_JDK_FOUND=no
14865        else
14866          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14867          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14868            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14870            BOOT_JDK_FOUND=no
14871          else
14872            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14873            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14874
14875            # Extra M4 quote needed to protect [] in grep expression.
14876            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14877            if test "x$FOUND_VERSION_78" = x; then
14878              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14880              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14881$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14882              BOOT_JDK_FOUND=no
14883            else
14884              # We're done! :-)
14885              BOOT_JDK_FOUND=yes
14886
14887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14888
14889  # Input might be given as Windows format, start by converting to
14890  # unix format.
14891  path="$BOOT_JDK"
14892  new_path=`$CYGPATH -u "$path"`
14893
14894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14897  # "foo.exe" is OK but "foo" is an error.
14898  #
14899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14900  # It is also a way to make sure we got the proper file name for the real test later on.
14901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14902  if test "x$test_shortpath" = x; then
14903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14904$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14905    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14906  fi
14907
14908  # Call helper function which possibly converts this using DOS-style short mode.
14909  # If so, the updated path is stored in $new_path.
14910
14911  input_path="$new_path"
14912  # Check if we need to convert this using DOS-style short mode. If the path
14913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14914  # take no chances and rewrite it.
14915  # Note: m4 eats our [], so we need to use [ and ] instead.
14916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14917  if test "x$has_forbidden_chars" != x; then
14918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14922      # Going to short mode and back again did indeed matter. Since short mode is
14923      # case insensitive, let's make it lowercase to improve readability.
14924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14925      # Now convert it back to Unix-stile (cygpath)
14926      input_path=`$CYGPATH -u "$shortmode_path"`
14927      new_path="$input_path"
14928    fi
14929  fi
14930
14931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14932  if test "x$test_cygdrive_prefix" = x; then
14933    # As a simple fix, exclude /usr/bin since it's not a real path.
14934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14936      # a path prefixed by /cygdrive for fixpath to work.
14937      new_path="$CYGWIN_ROOT_PATH$input_path"
14938    fi
14939  fi
14940
14941
14942  if test "x$path" != "x$new_path"; then
14943    BOOT_JDK="$new_path"
14944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14945$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14946  fi
14947
14948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14949
14950  path="$BOOT_JDK"
14951  has_colon=`$ECHO $path | $GREP ^.:`
14952  new_path="$path"
14953  if test "x$has_colon" = x; then
14954    # Not in mixed or Windows style, start by that.
14955    new_path=`cmd //c echo $path`
14956  fi
14957
14958
14959  input_path="$new_path"
14960  # Check if we need to convert this using DOS-style short mode. If the path
14961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14962  # take no chances and rewrite it.
14963  # Note: m4 eats our [], so we need to use [ and ] instead.
14964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14965  if test "x$has_forbidden_chars" != x; then
14966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14968  fi
14969
14970
14971  windows_path="$new_path"
14972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14973    unix_path=`$CYGPATH -u "$windows_path"`
14974    new_path="$unix_path"
14975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14977    new_path="$unix_path"
14978  fi
14979
14980  if test "x$path" != "x$new_path"; then
14981    BOOT_JDK="$new_path"
14982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14983$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14984  fi
14985
14986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14988
14989  else
14990    # We're on a posix platform. Hooray! :)
14991    path="$BOOT_JDK"
14992
14993    if test ! -f "$path" && test ! -d "$path"; then
14994      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14995    fi
14996
14997    has_space=`$ECHO "$path" | $GREP " "`
14998    if test "x$has_space" != x; then
14999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15001      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15002    fi
15003  fi
15004
15005              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15006$as_echo_n "checking for Boot JDK... " >&6; }
15007              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15008$as_echo "$BOOT_JDK" >&6; }
15009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15010$as_echo_n "checking Boot JDK version... " >&6; }
15011              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15012              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15013$as_echo "$BOOT_JDK_VERSION" >&6; }
15014            fi # end check jdk version
15015          fi # end check rt.jar
15016        fi # end check javac
15017      fi # end check java
15018    fi # end check boot jdk found
15019  fi
15020
15021  fi
15022
15023
15024    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15025    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15026      # Do we have a bin/java?
15027      if test ! -x "$BOOT_JDK/bin/java"; then
15028        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15030        BOOT_JDK_FOUND=no
15031      else
15032        # Do we have a bin/javac?
15033        if test ! -x "$BOOT_JDK/bin/javac"; then
15034          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15036          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15037$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15038          BOOT_JDK_FOUND=no
15039        else
15040          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15041          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15042            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15044            BOOT_JDK_FOUND=no
15045          else
15046            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15047            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15048
15049            # Extra M4 quote needed to protect [] in grep expression.
15050            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15051            if test "x$FOUND_VERSION_78" = x; then
15052              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15054              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15055$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15056              BOOT_JDK_FOUND=no
15057            else
15058              # We're done! :-)
15059              BOOT_JDK_FOUND=yes
15060
15061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15062
15063  # Input might be given as Windows format, start by converting to
15064  # unix format.
15065  path="$BOOT_JDK"
15066  new_path=`$CYGPATH -u "$path"`
15067
15068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15071  # "foo.exe" is OK but "foo" is an error.
15072  #
15073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15074  # It is also a way to make sure we got the proper file name for the real test later on.
15075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15076  if test "x$test_shortpath" = x; then
15077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15079    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15080  fi
15081
15082  # Call helper function which possibly converts this using DOS-style short mode.
15083  # If so, the updated path is stored in $new_path.
15084
15085  input_path="$new_path"
15086  # Check if we need to convert this using DOS-style short mode. If the path
15087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15088  # take no chances and rewrite it.
15089  # Note: m4 eats our [], so we need to use [ and ] instead.
15090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15091  if test "x$has_forbidden_chars" != x; then
15092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15096      # Going to short mode and back again did indeed matter. Since short mode is
15097      # case insensitive, let's make it lowercase to improve readability.
15098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15099      # Now convert it back to Unix-stile (cygpath)
15100      input_path=`$CYGPATH -u "$shortmode_path"`
15101      new_path="$input_path"
15102    fi
15103  fi
15104
15105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15106  if test "x$test_cygdrive_prefix" = x; then
15107    # As a simple fix, exclude /usr/bin since it's not a real path.
15108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15110      # a path prefixed by /cygdrive for fixpath to work.
15111      new_path="$CYGWIN_ROOT_PATH$input_path"
15112    fi
15113  fi
15114
15115
15116  if test "x$path" != "x$new_path"; then
15117    BOOT_JDK="$new_path"
15118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15120  fi
15121
15122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15123
15124  path="$BOOT_JDK"
15125  has_colon=`$ECHO $path | $GREP ^.:`
15126  new_path="$path"
15127  if test "x$has_colon" = x; then
15128    # Not in mixed or Windows style, start by that.
15129    new_path=`cmd //c echo $path`
15130  fi
15131
15132
15133  input_path="$new_path"
15134  # Check if we need to convert this using DOS-style short mode. If the path
15135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15136  # take no chances and rewrite it.
15137  # Note: m4 eats our [], so we need to use [ and ] instead.
15138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15139  if test "x$has_forbidden_chars" != x; then
15140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15142  fi
15143
15144
15145  windows_path="$new_path"
15146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15147    unix_path=`$CYGPATH -u "$windows_path"`
15148    new_path="$unix_path"
15149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15151    new_path="$unix_path"
15152  fi
15153
15154  if test "x$path" != "x$new_path"; then
15155    BOOT_JDK="$new_path"
15156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15158  fi
15159
15160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15162
15163  else
15164    # We're on a posix platform. Hooray! :)
15165    path="$BOOT_JDK"
15166
15167    if test ! -f "$path" && test ! -d "$path"; then
15168      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15169    fi
15170
15171    has_space=`$ECHO "$path" | $GREP " "`
15172    if test "x$has_space" != x; then
15173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15175      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15176    fi
15177  fi
15178
15179              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15180$as_echo_n "checking for Boot JDK... " >&6; }
15181              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15182$as_echo "$BOOT_JDK" >&6; }
15183              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15184$as_echo_n "checking Boot JDK version... " >&6; }
15185              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15186              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15187$as_echo "$BOOT_JDK_VERSION" >&6; }
15188            fi # end check jdk version
15189          fi # end check rt.jar
15190        fi # end check javac
15191      fi # end check java
15192    fi # end check boot jdk found
15193  fi
15194
15195
15196# If we haven't found anything yet, we've truly lost. Give up.
15197if test "x$BOOT_JDK_FOUND" = xno; then
15198
15199    # Print a helpful message on how to acquire the necessary build dependency.
15200    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15201    MISSING_DEPENDENCY=openjdk
15202    PKGHANDLER_COMMAND=
15203
15204    case $PKGHANDLER in
15205	apt-get)
15206                apt_help     $MISSING_DEPENDENCY ;;
15207    yum)
15208                yum_help     $MISSING_DEPENDENCY ;;
15209	port)
15210                port_help    $MISSING_DEPENDENCY ;;
15211	pkgutil)
15212                pkgutil_help $MISSING_DEPENDENCY ;;
15213	pkgadd)
15214                pkgadd_help  $MISSING_DEPENDENCY ;;
15215    * )
15216      break ;;
15217    esac
15218
15219    if test "x$PKGHANDLER_COMMAND" != x; then
15220        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15221    fi
15222
15223  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15224$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15225  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15226$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15227  as_fn_error $? "Cannot continue" "$LINENO" 5
15228fi
15229
15230# Setup proper paths for what we found
15231BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15232if test ! -f "$BOOT_RTJAR"; then
15233    # On MacOSX it is called classes.jar
15234    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15235    if test -f "$BOOT_RTJAR"; then
15236      # Remove the ..
15237      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15238    fi
15239fi
15240BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15241BOOT_JDK="$BOOT_JDK"
15242
15243
15244
15245
15246# Setup tools from the Boot JDK.
15247
15248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15249$as_echo_n "checking for java in Boot JDK... " >&6; }
15250  JAVA=$BOOT_JDK/bin/java
15251  if test ! -x $JAVA; then
15252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15253$as_echo "not found" >&6; }
15254      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15255$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15256      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15257  fi
15258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15259$as_echo "ok" >&6; }
15260
15261
15262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15263$as_echo_n "checking for javac in Boot JDK... " >&6; }
15264  JAVAC=$BOOT_JDK/bin/javac
15265  if test ! -x $JAVAC; then
15266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15267$as_echo "not found" >&6; }
15268      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15269$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15270      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15271  fi
15272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15273$as_echo "ok" >&6; }
15274
15275
15276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15277$as_echo_n "checking for javah in Boot JDK... " >&6; }
15278  JAVAH=$BOOT_JDK/bin/javah
15279  if test ! -x $JAVAH; then
15280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15281$as_echo "not found" >&6; }
15282      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15283$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15284      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15285  fi
15286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15287$as_echo "ok" >&6; }
15288
15289
15290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15291$as_echo_n "checking for javap in Boot JDK... " >&6; }
15292  JAVAP=$BOOT_JDK/bin/javap
15293  if test ! -x $JAVAP; then
15294      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15295$as_echo "not found" >&6; }
15296      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15297$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15298      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15299  fi
15300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15301$as_echo "ok" >&6; }
15302
15303
15304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15305$as_echo_n "checking for jar in Boot JDK... " >&6; }
15306  JAR=$BOOT_JDK/bin/jar
15307  if test ! -x $JAR; then
15308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15309$as_echo "not found" >&6; }
15310      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15311$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15312      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15313  fi
15314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15315$as_echo "ok" >&6; }
15316
15317
15318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15319$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15320  RMIC=$BOOT_JDK/bin/rmic
15321  if test ! -x $RMIC; then
15322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15323$as_echo "not found" >&6; }
15324      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15325$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15326      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15327  fi
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15329$as_echo "ok" >&6; }
15330
15331
15332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15333$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15334  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15335  if test ! -x $NATIVE2ASCII; then
15336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15337$as_echo "not found" >&6; }
15338      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15339$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15340      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15341  fi
15342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15343$as_echo "ok" >&6; }
15344
15345
15346# Finally, set some other options...
15347
15348# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15349BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15350
15351
15352
15353
15354##############################################################################
15355#
15356# Specify options for anything that is run with the Boot JDK.
15357#
15358
15359# Check whether --with-boot-jdk-jvmargs was given.
15360if test "${with_boot_jdk_jvmargs+set}" = set; then :
15361  withval=$with_boot_jdk_jvmargs;
15362fi
15363
15364
15365if test "x$with_boot_jdk_jvmargs" = x; then
15366    # Not all JVM:s accept the same arguments on the command line.
15367    # OpenJDK specific increase in thread stack for JDK build,
15368    # well more specifically, when running javac.
15369    if test "x$BUILD_NUM_BITS" = x32; then
15370       STACK_SIZE=768
15371    else
15372       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15373       # since 64-bit pointers are pushed on the stach. Apparently, we need
15374       # to increase the stack space when javacing the JDK....
15375       STACK_SIZE=1536
15376    fi
15377
15378    # Minimum amount of heap memory.
15379
15380    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15381    # If so, then append -Xms64M to boot_jdk_jvmargs
15382    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15383    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15384    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15385        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15386    fi
15387
15388    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15389        # Why does macosx need more heap? Its the huge JDK batch.
15390
15391    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15392    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15393    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15394    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15395    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15396        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15397    fi
15398
15399    else
15400
15401    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15402    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15403    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15404    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15405    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15406        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15407    fi
15408
15409    fi
15410    # When is adding -client something that speeds up the JVM?
15411    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15412
15413    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15414    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15415    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15416    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15417    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15418        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15419    fi
15420
15421
15422    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15423    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15424    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15425    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15426    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15427        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15428    fi
15429
15430
15431    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15432    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15433    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15434    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15435    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15436        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15437    fi
15438
15439    # Disable special log output when a debug build is used as Boot JDK...
15440
15441    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15442    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15443    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15444    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15445    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15446        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15447    fi
15448
15449fi
15450
15451BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15452
15453
15454
15455###############################################################################
15456#
15457# Configure the sources to use. We can add or override individual directories.
15458#
15459###############################################################################
15460
15461
15462
15463# Where are the sources. Any of these can be overridden
15464# using --with-override-corba and the likes.
15465LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15466CORBA_TOPDIR="$SRC_ROOT/corba"
15467JAXP_TOPDIR="$SRC_ROOT/jaxp"
15468JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15469HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15470JDK_TOPDIR="$SRC_ROOT/jdk"
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480###############################################################################
15481#
15482# Pickup additional source for a component from outside of the source root
15483# or override source for a component.
15484#
15485
15486# Check whether --with-add-source-root was given.
15487if test "${with_add_source_root+set}" = set; then :
15488  withval=$with_add_source_root;
15489fi
15490
15491
15492
15493# Check whether --with-override-source-root was given.
15494if test "${with_override_source_root+set}" = set; then :
15495  withval=$with_override_source_root;
15496fi
15497
15498
15499
15500# Check whether --with-adds-and-overrides was given.
15501if test "${with_adds_and_overrides+set}" = set; then :
15502  withval=$with_adds_and_overrides;
15503fi
15504
15505
15506if test "x$with_adds_and_overrides" != x; then
15507    with_add_source_root="$with_adds_and_overrides/adds"
15508    with_override_source_root="$with_adds_and_overrides/overrides"
15509fi
15510
15511if test "x$with_add_source_root" != x; then
15512    if ! test -d $with_add_source_root; then
15513       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15514    fi
15515    CURDIR="$PWD"
15516    cd "$with_add_source_root"
15517    ADD_SRC_ROOT="`pwd`"
15518    cd "$CURDIR"
15519    # Verify that the addon source root does not have any root makefiles.
15520    # If it does, then it is usually an error, prevent this.
15521    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15522       test -f $with_add_source_root/langtools/make/Makefile; then
15523        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
15524    fi
15525    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15526       test -f $with_add_source_root/corba/make/Makefile; then
15527        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
15528    fi
15529    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15530       test -f $with_add_source_root/jaxp/make/Makefile; then
15531        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
15532    fi
15533    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15534       test -f $with_add_source_root/jaxws/make/Makefile; then
15535        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
15536    fi
15537    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15538       test -f $with_add_source_root/hotspot/make/Makefile; then
15539        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
15540    fi
15541    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15542       test -f $with_add_source_root/jdk/make/Makefile; then
15543        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
15544    fi
15545fi
15546
15547
15548if test "x$with_override_source_root" != x; then
15549    if ! test -d $with_override_source_root; then
15550       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15551    fi
15552    CURDIR="$PWD"
15553    cd "$with_override_source_root"
15554    OVERRIDE_SRC_ROOT="`pwd`"
15555    cd "$CURDIR"
15556    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15557       test -f $with_override_source_root/langtools/make/Makefile; then
15558        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
15559    fi
15560    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15561       test -f $with_override_source_root/corba/make/Makefile; then
15562        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
15563    fi
15564    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15565       test -f $with_override_source_root/jaxp/make/Makefile; then
15566        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
15567    fi
15568    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15569       test -f $with_override_source_root/jaxws/make/Makefile; then
15570        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
15571    fi
15572    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15573       test -f $with_override_source_root/hotspot/make/Makefile; then
15574        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
15575    fi
15576    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15577       test -f $with_override_source_root/jdk/make/Makefile; then
15578        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
15579    fi
15580fi
15581
15582
15583###############################################################################
15584#
15585# Override a repo completely, this is used for example when you have 3 small
15586# development sandboxes of the langtools sources and want to avoid having 3 full
15587# OpenJDK sources checked out on disk.
15588#
15589# Assuming that the 3 langtools sandboxes are located here:
15590# /home/fredrik/sandbox1/langtools
15591# /home/fredrik/sandbox2/langtools
15592# /home/fredrik/sandbox3/langtools
15593#
15594# From the source root you create build subdirs manually:
15595#     mkdir -p build1 build2 build3
15596# in each build directory run:
15597#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15598#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15599#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15600#
15601
15602
15603# Check whether --with-override-langtools was given.
15604if test "${with_override_langtools+set}" = set; then :
15605  withval=$with_override_langtools;
15606fi
15607
15608
15609
15610# Check whether --with-override-corba was given.
15611if test "${with_override_corba+set}" = set; then :
15612  withval=$with_override_corba;
15613fi
15614
15615
15616
15617# Check whether --with-override-jaxp was given.
15618if test "${with_override_jaxp+set}" = set; then :
15619  withval=$with_override_jaxp;
15620fi
15621
15622
15623
15624# Check whether --with-override-jaxws was given.
15625if test "${with_override_jaxws+set}" = set; then :
15626  withval=$with_override_jaxws;
15627fi
15628
15629
15630
15631# Check whether --with-override-hotspot was given.
15632if test "${with_override_hotspot+set}" = set; then :
15633  withval=$with_override_hotspot;
15634fi
15635
15636
15637
15638# Check whether --with-override-jdk was given.
15639if test "${with_override_jdk+set}" = set; then :
15640  withval=$with_override_jdk;
15641fi
15642
15643
15644if test "x$with_override_langtools" != x; then
15645    CURDIR="$PWD"
15646    cd "$with_override_langtools"
15647    LANGTOOLS_TOPDIR="`pwd`"
15648    cd "$CURDIR"
15649    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15650        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15651    fi
15652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15653$as_echo_n "checking if langtools should be overridden... " >&6; }
15654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15655$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15656fi
15657if test "x$with_override_corba" != x; then
15658    CURDIR="$PWD"
15659    cd "$with_override_corba"
15660    CORBA_TOPDIR="`pwd`"
15661    cd "$CURDIR"
15662    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15663        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15664    fi
15665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15666$as_echo_n "checking if corba should be overridden... " >&6; }
15667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15668$as_echo "yes with $CORBA_TOPDIR" >&6; }
15669fi
15670if test "x$with_override_jaxp" != x; then
15671    CURDIR="$PWD"
15672    cd "$with_override_jaxp"
15673    JAXP_TOPDIR="`pwd`"
15674    cd "$CURDIR"
15675    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15676        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15677    fi
15678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15679$as_echo_n "checking if jaxp should be overridden... " >&6; }
15680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15681$as_echo "yes with $JAXP_TOPDIR" >&6; }
15682fi
15683if test "x$with_override_jaxws" != x; then
15684    CURDIR="$PWD"
15685    cd "$with_override_jaxws"
15686    JAXWS_TOPDIR="`pwd`"
15687    cd "$CURDIR"
15688    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15689        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15690    fi
15691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15692$as_echo_n "checking if jaxws should be overridden... " >&6; }
15693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15694$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15695fi
15696if test "x$with_override_hotspot" != x; then
15697    CURDIR="$PWD"
15698    cd "$with_override_hotspot"
15699    HOTSPOT_TOPDIR="`pwd`"
15700    cd "$CURDIR"
15701    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15702       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15703        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15704    fi
15705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15706$as_echo_n "checking if hotspot should be overridden... " >&6; }
15707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15708$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15709fi
15710if test "x$with_override_jdk" != x; then
15711    CURDIR="$PWD"
15712    cd "$with_override_jdk"
15713    JDK_TOPDIR="`pwd`"
15714    cd "$CURDIR"
15715    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15716        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15717    fi
15718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15719$as_echo_n "checking if JDK should be overridden... " >&6; }
15720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15721$as_echo "yes with $JDK_TOPDIR" >&6; }
15722fi
15723
15724
15725
15726BUILD_OUTPUT="$OUTPUT_ROOT"
15727
15728
15729HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15730BUILD_HOTSPOT=true
15731
15732
15733
15734# Check whether --with-import-hotspot was given.
15735if test "${with_import_hotspot+set}" = set; then :
15736  withval=$with_import_hotspot;
15737fi
15738
15739if test "x$with_import_hotspot" != x; then
15740    CURDIR="$PWD"
15741    cd "$with_import_hotspot"
15742    HOTSPOT_DIST="`pwd`"
15743    cd "$CURDIR"
15744    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15745        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15746    fi
15747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15748$as_echo_n "checking if hotspot should be imported... " >&6; }
15749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15750$as_echo "yes from $HOTSPOT_DIST" >&6; }
15751    BUILD_HOTSPOT=false
15752fi
15753
15754JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15755
15756
15757###############################################################################
15758#
15759# Setup the toolchain (compilers etc), i.e. the tools that need to be
15760# cross-compilation aware.
15761#
15762###############################################################################
15763
15764
15765###############################################################################
15766#
15767# Configure the development tool paths and potential sysroot.
15768#
15769ac_ext=cpp
15770ac_cpp='$CXXCPP $CPPFLAGS'
15771ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15772ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15773ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15774
15775
15776# The option used to specify the target .o,.a or .so file.
15777# When compiling, how to specify the to be created object file.
15778CC_OUT_OPTION='-o$(SPACE)'
15779# When linking, how to specify the to be created executable.
15780EXE_OUT_OPTION='-o$(SPACE)'
15781# When linking, how to specify the to be created dynamically linkable library.
15782LD_OUT_OPTION='-o$(SPACE)'
15783# When archiving, how to specify the to be create static archive for object files.
15784AR_OUT_OPTION='rcs$(SPACE)'
15785
15786
15787
15788
15789
15790# Locate the actual tools
15791
15792if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15793
15794  # Store path to cygwin link.exe to help excluding it when searching for
15795  # VS linker. This must be done before changing the PATH when looking for VS.
15796  # Extract the first word of "link", so it can be a program name with args.
15797set dummy link; ac_word=$2
15798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15799$as_echo_n "checking for $ac_word... " >&6; }
15800if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15801  $as_echo_n "(cached) " >&6
15802else
15803  case $CYGWIN_LINK in
15804  [\\/]* | ?:[\\/]*)
15805  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15806  ;;
15807  *)
15808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15809for as_dir in $PATH
15810do
15811  IFS=$as_save_IFS
15812  test -z "$as_dir" && as_dir=.
15813    for ac_exec_ext in '' $ac_executable_extensions; do
15814  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15815    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15817    break 2
15818  fi
15819done
15820  done
15821IFS=$as_save_IFS
15822
15823  ;;
15824esac
15825fi
15826CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15827if test -n "$CYGWIN_LINK"; then
15828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15829$as_echo "$CYGWIN_LINK" >&6; }
15830else
15831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15832$as_echo "no" >&6; }
15833fi
15834
15835
15836  if test "x$CYGWIN_LINK" != x; then
15837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15838$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15839    "$CYGWIN_LINK" --version > /dev/null
15840    if test $? -eq 0 ; then
15841      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15842$as_echo "yes" >&6; }
15843    else
15844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15845$as_echo "no" >&6; }
15846      # This might be the VS linker. Don't exclude it later on.
15847      CYGWIN_LINK=""
15848    fi
15849  fi
15850
15851  # First-hand choice is to locate and run the vsvars bat file.
15852
15853  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15854    VCVARSFILE="vc/bin/vcvars32.bat"
15855  else
15856    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15857  fi
15858
15859  VS_ENV_CMD=""
15860  VS_ENV_ARGS=""
15861  if test "x$with_toolsdir" != x; then
15862
15863  if test "x$VS_ENV_CMD" = x; then
15864    VS100BASE="$with_toolsdir/../.."
15865    METHOD="--with-tools-dir"
15866
15867  windows_path="$VS100BASE"
15868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15869    unix_path=`$CYGPATH -u "$windows_path"`
15870    VS100BASE="$unix_path"
15871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15873    VS100BASE="$unix_path"
15874  fi
15875
15876    if test -d "$VS100BASE"; then
15877      if test -f "$VS100BASE/$VCVARSFILE"; then
15878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15879$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15880        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15881      else
15882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15883$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15884        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15885$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15886      fi
15887    fi
15888  fi
15889
15890  fi
15891
15892  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15893    # Having specified an argument which is incorrect will produce an instant failure;
15894    # we should not go on looking
15895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15896$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15897    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15898$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15899    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15900  fi
15901
15902  if test "x$ProgramW6432" != x; then
15903
15904  if test "x$VS_ENV_CMD" = x; then
15905    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15906    METHOD="well-known name"
15907
15908  windows_path="$WIN_SDK_BASE"
15909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15910    unix_path=`$CYGPATH -u "$windows_path"`
15911    WIN_SDK_BASE="$unix_path"
15912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15914    WIN_SDK_BASE="$unix_path"
15915  fi
15916
15917    if test -d "$WIN_SDK_BASE"; then
15918      # There have been cases of partial or broken SDK installations. A missing
15919      # lib dir is not going to work.
15920      if test ! -d "$WIN_SDK_BASE/../lib"; then
15921        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15922$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15923        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15924$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15925      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15927$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15928        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15929        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15930          VS_ENV_ARGS="/x86"
15931        else
15932          VS_ENV_ARGS="/x64"
15933        fi
15934      else
15935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15936$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15937        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15938$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15939      fi
15940    fi
15941  fi
15942
15943  fi
15944  if test "x$PROGRAMW6432" != x; then
15945
15946  if test "x$VS_ENV_CMD" = x; then
15947    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15948    METHOD="well-known name"
15949
15950  windows_path="$WIN_SDK_BASE"
15951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15952    unix_path=`$CYGPATH -u "$windows_path"`
15953    WIN_SDK_BASE="$unix_path"
15954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15956    WIN_SDK_BASE="$unix_path"
15957  fi
15958
15959    if test -d "$WIN_SDK_BASE"; then
15960      # There have been cases of partial or broken SDK installations. A missing
15961      # lib dir is not going to work.
15962      if test ! -d "$WIN_SDK_BASE/../lib"; then
15963        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15964$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15965        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15966$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15967      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15968        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15969$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15970        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15971        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15972          VS_ENV_ARGS="/x86"
15973        else
15974          VS_ENV_ARGS="/x64"
15975        fi
15976      else
15977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15978$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15979        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15980$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15981      fi
15982    fi
15983  fi
15984
15985  fi
15986  if test "x$PROGRAMFILES" != x; then
15987
15988  if test "x$VS_ENV_CMD" = x; then
15989    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15990    METHOD="well-known name"
15991
15992  windows_path="$WIN_SDK_BASE"
15993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15994    unix_path=`$CYGPATH -u "$windows_path"`
15995    WIN_SDK_BASE="$unix_path"
15996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15998    WIN_SDK_BASE="$unix_path"
15999  fi
16000
16001    if test -d "$WIN_SDK_BASE"; then
16002      # There have been cases of partial or broken SDK installations. A missing
16003      # lib dir is not going to work.
16004      if test ! -d "$WIN_SDK_BASE/../lib"; then
16005        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16006$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16007        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16008$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16009      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; 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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16013        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16014          VS_ENV_ARGS="/x86"
16015        else
16016          VS_ENV_ARGS="/x64"
16017        fi
16018      else
16019        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16020$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16021        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16022$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16023      fi
16024    fi
16025  fi
16026
16027  fi
16028
16029  if test "x$VS_ENV_CMD" = x; then
16030    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16031    METHOD="well-known name"
16032
16033  windows_path="$WIN_SDK_BASE"
16034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16035    unix_path=`$CYGPATH -u "$windows_path"`
16036    WIN_SDK_BASE="$unix_path"
16037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16039    WIN_SDK_BASE="$unix_path"
16040  fi
16041
16042    if test -d "$WIN_SDK_BASE"; then
16043      # There have been cases of partial or broken SDK installations. A missing
16044      # lib dir is not going to work.
16045      if test ! -d "$WIN_SDK_BASE/../lib"; then
16046        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16047$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16048        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16049$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16050      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16051        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16052$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16053        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16054        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16055          VS_ENV_ARGS="/x86"
16056        else
16057          VS_ENV_ARGS="/x64"
16058        fi
16059      else
16060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16061$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16062        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16063$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16064      fi
16065    fi
16066  fi
16067
16068
16069  if test "x$VS_ENV_CMD" = x; then
16070    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16071    METHOD="well-known name"
16072
16073  windows_path="$WIN_SDK_BASE"
16074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16075    unix_path=`$CYGPATH -u "$windows_path"`
16076    WIN_SDK_BASE="$unix_path"
16077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16079    WIN_SDK_BASE="$unix_path"
16080  fi
16081
16082    if test -d "$WIN_SDK_BASE"; then
16083      # There have been cases of partial or broken SDK installations. A missing
16084      # lib dir is not going to work.
16085      if test ! -d "$WIN_SDK_BASE/../lib"; then
16086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16088        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16089$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16090      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16091        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16092$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16093        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16094        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16095          VS_ENV_ARGS="/x86"
16096        else
16097          VS_ENV_ARGS="/x64"
16098        fi
16099      else
16100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16103$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16104      fi
16105    fi
16106  fi
16107
16108
16109  if test "x$VS100COMNTOOLS" != x; then
16110
16111  if test "x$VS_ENV_CMD" = x; then
16112    VS100BASE="$VS100COMNTOOLS/../.."
16113    METHOD="VS100COMNTOOLS variable"
16114
16115  windows_path="$VS100BASE"
16116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16117    unix_path=`$CYGPATH -u "$windows_path"`
16118    VS100BASE="$unix_path"
16119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16121    VS100BASE="$unix_path"
16122  fi
16123
16124    if test -d "$VS100BASE"; then
16125      if test -f "$VS100BASE/$VCVARSFILE"; then
16126        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16127$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16128        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16129      else
16130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16131$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16132        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16133$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16134      fi
16135    fi
16136  fi
16137
16138  fi
16139  if test "x$PROGRAMFILES" != x; then
16140
16141  if test "x$VS_ENV_CMD" = x; then
16142    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16143    METHOD="well-known name"
16144
16145  windows_path="$VS100BASE"
16146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16147    unix_path=`$CYGPATH -u "$windows_path"`
16148    VS100BASE="$unix_path"
16149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16151    VS100BASE="$unix_path"
16152  fi
16153
16154    if test -d "$VS100BASE"; then
16155      if test -f "$VS100BASE/$VCVARSFILE"; then
16156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16157$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16158        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16159      else
16160        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16161$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16162        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16163$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16164      fi
16165    fi
16166  fi
16167
16168  fi
16169
16170  if test "x$VS_ENV_CMD" = x; then
16171    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16172    METHOD="well-known name"
16173
16174  windows_path="$VS100BASE"
16175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16176    unix_path=`$CYGPATH -u "$windows_path"`
16177    VS100BASE="$unix_path"
16178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16180    VS100BASE="$unix_path"
16181  fi
16182
16183    if test -d "$VS100BASE"; then
16184      if test -f "$VS100BASE/$VCVARSFILE"; then
16185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16186$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16187        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16188      else
16189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16190$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16191        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16192$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16193      fi
16194    fi
16195  fi
16196
16197
16198  if test "x$VS_ENV_CMD" = x; then
16199    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16200    METHOD="well-known name"
16201
16202  windows_path="$VS100BASE"
16203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204    unix_path=`$CYGPATH -u "$windows_path"`
16205    VS100BASE="$unix_path"
16206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16208    VS100BASE="$unix_path"
16209  fi
16210
16211    if test -d "$VS100BASE"; then
16212      if test -f "$VS100BASE/$VCVARSFILE"; then
16213        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16214$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16215        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16216      else
16217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16218$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16219        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16220$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16221      fi
16222    fi
16223  fi
16224
16225
16226  if test "x$VS_ENV_CMD" != x; then
16227    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16228
16229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16230
16231  # First separate the path from the arguments. This will split at the first
16232  # space.
16233  complete="$VS_ENV_CMD"
16234  path="${complete%% *}"
16235  tmp="$complete EOL"
16236  arguments="${tmp#* }"
16237
16238  # Input might be given as Windows format, start by converting to
16239  # unix format.
16240  new_path=`$CYGPATH -u "$path"`
16241
16242  # Now try to locate executable using which
16243  new_path=`$WHICH "$new_path" 2> /dev/null`
16244  # bat and cmd files are not always considered executable in cygwin causing which
16245  # to not find them
16246  if test "x$new_path" = x \
16247           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16248           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16249    new_path=`$CYGPATH -u "$path"`
16250  fi
16251  if test "x$new_path" = x; then
16252    # Oops. Which didn't find the executable.
16253    # The splitting of arguments from the executable at a space might have been incorrect,
16254    # since paths with space are more likely in Windows. Give it another try with the whole
16255    # argument.
16256    path="$complete"
16257    arguments="EOL"
16258    new_path=`$CYGPATH -u "$path"`
16259    new_path=`$WHICH "$new_path" 2> /dev/null`
16260    # bat and cmd files are not always considered executable in cygwin causing which
16261    # to not find them
16262    if test "x$new_path" = x \
16263             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16264             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16265      new_path=`$CYGPATH -u "$path"`
16266    fi
16267    if test "x$new_path" = x; then
16268      # It's still not found. Now this is an unrecoverable error.
16269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16270$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16271      has_space=`$ECHO "$complete" | $GREP " "`
16272      if test "x$has_space" != x; then
16273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16275      fi
16276      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16277    fi
16278  fi
16279
16280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16283  # "foo.exe" is OK but "foo" is an error.
16284  #
16285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16286  # It is also a way to make sure we got the proper file name for the real test later on.
16287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16288  if test "x$test_shortpath" = x; then
16289    # Short path failed, file does not exist as specified.
16290    # Try adding .exe or .cmd
16291    if test -f "${new_path}.exe"; then
16292       input_to_shortpath="${new_path}.exe"
16293    elif test -f "${new_path}.cmd"; then
16294       input_to_shortpath="${new_path}.cmd"
16295    else
16296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16297$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16300      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16301    fi
16302  else
16303    input_to_shortpath="$new_path"
16304  fi
16305
16306  # Call helper function which possibly converts this using DOS-style short mode.
16307  # If so, the updated path is stored in $new_path.
16308  new_path="$input_to_shortpath"
16309
16310  input_path="$input_to_shortpath"
16311  # Check if we need to convert this using DOS-style short mode. If the path
16312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16313  # take no chances and rewrite it.
16314  # Note: m4 eats our [], so we need to use [ and ] instead.
16315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16316  if test "x$has_forbidden_chars" != x; then
16317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16321      # Going to short mode and back again did indeed matter. Since short mode is
16322      # case insensitive, let's make it lowercase to improve readability.
16323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16324      # Now convert it back to Unix-stile (cygpath)
16325      input_path=`$CYGPATH -u "$shortmode_path"`
16326      new_path="$input_path"
16327    fi
16328  fi
16329
16330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16331  if test "x$test_cygdrive_prefix" = x; then
16332    # As a simple fix, exclude /usr/bin since it's not a real path.
16333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16335      # a path prefixed by /cygdrive for fixpath to work.
16336      new_path="$CYGWIN_ROOT_PATH$input_path"
16337    fi
16338  fi
16339
16340  # remove trailing .exe if any
16341  new_path="${new_path/%.exe/}"
16342
16343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16344
16345  # First separate the path from the arguments. This will split at the first
16346  # space.
16347  complete="$VS_ENV_CMD"
16348  path="${complete%% *}"
16349  tmp="$complete EOL"
16350  arguments="${tmp#* }"
16351
16352  # Input might be given as Windows format, start by converting to
16353  # unix format.
16354  new_path="$path"
16355
16356  windows_path="$new_path"
16357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16358    unix_path=`$CYGPATH -u "$windows_path"`
16359    new_path="$unix_path"
16360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16362    new_path="$unix_path"
16363  fi
16364
16365
16366  # Now try to locate executable using which
16367  new_path=`$WHICH "$new_path" 2> /dev/null`
16368
16369  if test "x$new_path" = x; then
16370    # Oops. Which didn't find the executable.
16371    # The splitting of arguments from the executable at a space might have been incorrect,
16372    # since paths with space are more likely in Windows. Give it another try with the whole
16373    # argument.
16374    path="$complete"
16375    arguments="EOL"
16376    new_path="$path"
16377
16378  windows_path="$new_path"
16379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16380    unix_path=`$CYGPATH -u "$windows_path"`
16381    new_path="$unix_path"
16382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16384    new_path="$unix_path"
16385  fi
16386
16387
16388    new_path=`$WHICH "$new_path" 2> /dev/null`
16389
16390    if test "x$new_path" = x; then
16391      # It's still not found. Now this is an unrecoverable error.
16392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16393$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16394      has_space=`$ECHO "$complete" | $GREP " "`
16395      if test "x$has_space" != x; then
16396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16398      fi
16399      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16400    fi
16401  fi
16402
16403  # Now new_path has a complete unix path to the binary
16404  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16405    # Keep paths in /bin as-is, but remove trailing .exe if any
16406    new_path="${new_path/%.exe/}"
16407    # Do not save /bin paths to all_fixpath_prefixes!
16408  else
16409    # Not in mixed or Windows style, start by that.
16410    new_path=`cmd //c echo $new_path`
16411
16412  input_path="$new_path"
16413  # Check if we need to convert this using DOS-style short mode. If the path
16414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16415  # take no chances and rewrite it.
16416  # Note: m4 eats our [], so we need to use [ and ] instead.
16417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16418  if test "x$has_forbidden_chars" != x; then
16419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16421  fi
16422
16423    # Output is in $new_path
16424
16425  windows_path="$new_path"
16426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16427    unix_path=`$CYGPATH -u "$windows_path"`
16428    new_path="$unix_path"
16429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16431    new_path="$unix_path"
16432  fi
16433
16434    # remove trailing .exe if any
16435    new_path="${new_path/%.exe/}"
16436
16437    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16438    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16439  fi
16440
16441  else
16442    # We're on a posix platform. Hooray! :)
16443    # First separate the path from the arguments. This will split at the first
16444    # space.
16445    complete="$VS_ENV_CMD"
16446    path="${complete%% *}"
16447    tmp="$complete EOL"
16448    arguments="${tmp#* }"
16449
16450    # Cannot rely on the command "which" here since it doesn't always work.
16451    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16452    if test -z "$is_absolute_path"; then
16453      # Path to executable is not absolute. Find it.
16454      IFS_save="$IFS"
16455      IFS=:
16456      for p in $PATH; do
16457        if test -f "$p/$path" && test -x "$p/$path"; then
16458          new_path="$p/$path"
16459          break
16460        fi
16461      done
16462      IFS="$IFS_save"
16463    else
16464      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16465$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16466      new_path="$path"
16467    fi
16468
16469    if test "x$new_path" = x; then
16470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16471$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16472        has_space=`$ECHO "$complete" | $GREP " "`
16473        if test "x$has_space" != x; then
16474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16476        fi
16477        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16478      fi
16479  fi
16480
16481      # Now join together the path and the arguments once again
16482      if test "x$arguments" != xEOL; then
16483        new_complete="$new_path ${arguments% *}"
16484      else
16485        new_complete="$new_path"
16486      fi
16487
16488  if test "x$complete" != "x$new_complete"; then
16489      VS_ENV_CMD="$new_complete"
16490      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16491$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16492    fi
16493
16494
16495    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16496    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16497$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16498    cd $OUTPUT_ROOT
16499    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16500    # to autoconf standards.
16501
16502    #----
16503
16504    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16505    # but calculate the difference in Cygwin environment before/after running it and then
16506    # apply the diff.
16507
16508    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16509      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16510      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16511      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16512    else
16513      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16514      _dosbash=`cmd //c echo \`which bash\``
16515    fi
16516
16517    # generate the set of exported vars before/after the vs10 setup
16518    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16519    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16520    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16521    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16522
16523    # Now execute the newly created bat file.
16524    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16525    cmd /c localdevenvtmp.bat | cat
16526
16527    # apply the diff (less some non-vs10 vars named by "!")
16528    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16529    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16530    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16531
16532    # cleanup
16533    $RM localdevenvtmp*
16534    #----
16535    cd $CURDIR
16536    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16538$as_echo "no" >&6; }
16539      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16540$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16541      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16542$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16543      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16544$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16545      as_fn_error $? "Cannot continue" "$LINENO" 5
16546    fi
16547
16548    # Now set all paths and other env variables. This will allow the rest of
16549    # the configure script to find and run the compiler in the proper way.
16550    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16551$as_echo "$as_me: Setting extracted environment variables" >&6;}
16552    . $OUTPUT_ROOT/localdevenv.sh
16553  else
16554    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16555    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16556$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16557  fi
16558
16559  # At this point, we should have corrent variables in the environment, or we can't continue.
16560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16561$as_echo_n "checking for Visual Studio variables... " >&6; }
16562
16563  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16564    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16566$as_echo "present but broken" >&6; }
16567      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16568    else
16569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16570$as_echo "ok" >&6; }
16571      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16572      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16573      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16574      VS_PATH="$PATH"
16575
16576
16577
16578    fi
16579  else
16580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16581$as_echo "not found" >&6; }
16582
16583    if test "x$VS_ENV_CMD" = x; then
16584      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16585$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16586      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16587$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16588    else
16589      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16590$as_echo "$as_me: Running the extraction script failed." >&6;}
16591    fi
16592    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16593$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16594    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16595$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16596    as_fn_error $? "Cannot continue" "$LINENO" 5
16597  fi
16598
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16600$as_echo_n "checking for msvcr100.dll... " >&6; }
16601
16602# Check whether --with-msvcr-dll was given.
16603if test "${with_msvcr_dll+set}" = set; then :
16604  withval=$with_msvcr_dll;
16605fi
16606
16607  if test "x$with_msvcr_dll" != x; then
16608    MSVCR_DLL="$with_msvcr_dll"
16609  else
16610    if test "x$VCINSTALLDIR" != x; then
16611      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16612        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16613      else
16614        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16615        if test "x$MSVCR_DLL" = x; then
16616          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16617        fi
16618      fi
16619      if test "x$MSVCR_DLL" != x; then
16620        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16621$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16622      else
16623        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16624$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16625      fi
16626    fi
16627    if test "x$MSVCR_DLL" = x; then
16628      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16629        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16630$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16631        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16632      fi
16633    fi
16634  fi
16635  if test "x$MSVCR_DLL" = x; then
16636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16637$as_echo "no" >&6; }
16638    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16639  fi
16640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16641$as_echo "$MSVCR_DLL" >&6; }
16642
16643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16644
16645  # Input might be given as Windows format, start by converting to
16646  # unix format.
16647  path="$MSVCR_DLL"
16648  new_path=`$CYGPATH -u "$path"`
16649
16650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16653  # "foo.exe" is OK but "foo" is an error.
16654  #
16655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16656  # It is also a way to make sure we got the proper file name for the real test later on.
16657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16658  if test "x$test_shortpath" = x; then
16659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16660$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16661    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16662  fi
16663
16664  # Call helper function which possibly converts this using DOS-style short mode.
16665  # If so, the updated path is stored in $new_path.
16666
16667  input_path="$new_path"
16668  # Check if we need to convert this using DOS-style short mode. If the path
16669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16670  # take no chances and rewrite it.
16671  # Note: m4 eats our [], so we need to use [ and ] instead.
16672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16673  if test "x$has_forbidden_chars" != x; then
16674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16678      # Going to short mode and back again did indeed matter. Since short mode is
16679      # case insensitive, let's make it lowercase to improve readability.
16680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16681      # Now convert it back to Unix-stile (cygpath)
16682      input_path=`$CYGPATH -u "$shortmode_path"`
16683      new_path="$input_path"
16684    fi
16685  fi
16686
16687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16688  if test "x$test_cygdrive_prefix" = x; then
16689    # As a simple fix, exclude /usr/bin since it's not a real path.
16690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16692      # a path prefixed by /cygdrive for fixpath to work.
16693      new_path="$CYGWIN_ROOT_PATH$input_path"
16694    fi
16695  fi
16696
16697
16698  if test "x$path" != "x$new_path"; then
16699    MSVCR_DLL="$new_path"
16700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16701$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16702  fi
16703
16704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16705
16706  path="$MSVCR_DLL"
16707  has_colon=`$ECHO $path | $GREP ^.:`
16708  new_path="$path"
16709  if test "x$has_colon" = x; then
16710    # Not in mixed or Windows style, start by that.
16711    new_path=`cmd //c echo $path`
16712  fi
16713
16714
16715  input_path="$new_path"
16716  # Check if we need to convert this using DOS-style short mode. If the path
16717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16718  # take no chances and rewrite it.
16719  # Note: m4 eats our [], so we need to use [ and ] instead.
16720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16721  if test "x$has_forbidden_chars" != x; then
16722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16724  fi
16725
16726
16727  windows_path="$new_path"
16728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16729    unix_path=`$CYGPATH -u "$windows_path"`
16730    new_path="$unix_path"
16731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16733    new_path="$unix_path"
16734  fi
16735
16736  if test "x$path" != "x$new_path"; then
16737    MSVCR_DLL="$new_path"
16738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16739$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16740  fi
16741
16742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16744
16745  else
16746    # We're on a posix platform. Hooray! :)
16747    path="$MSVCR_DLL"
16748
16749    if test ! -f "$path" && test ! -d "$path"; then
16750      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16751    fi
16752
16753    has_space=`$ECHO "$path" | $GREP " "`
16754    if test "x$has_space" != x; then
16755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16756$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16757      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16758    fi
16759  fi
16760
16761
16762fi
16763
16764
16765
16766# If --build AND --host is set, then the configure script will find any
16767# cross compilation tools in the PATH. Cross compilation tools
16768# follows the cross compilation standard where they are prefixed with ${host}.
16769# For example the binary i686-sun-solaris2.10-gcc
16770# will cross compile for i686-sun-solaris2.10
16771# If neither of build and host is not set, then build=host and the
16772# default compiler found in the path will be used.
16773# Setting only --host, does not seem to be really supported.
16774# Please set both --build and --host if you want to cross compile.
16775
16776if test "x$COMPILE_TYPE" = "xcross"; then
16777    # Now we to find a C/C++ compiler that can build executables for the build
16778    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16779    # once. Also, we need to do this before adding a tools dir to the path,
16780    # otherwise we might pick up cross-compilers which don't use standard naming.
16781    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16782    # to wait until they are properly discovered.
16783    for ac_prog in cl cc gcc
16784do
16785  # Extract the first word of "$ac_prog", so it can be a program name with args.
16786set dummy $ac_prog; ac_word=$2
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16788$as_echo_n "checking for $ac_word... " >&6; }
16789if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16790  $as_echo_n "(cached) " >&6
16791else
16792  case $BUILD_CC in
16793  [\\/]* | ?:[\\/]*)
16794  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16795  ;;
16796  *)
16797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16798for as_dir in $PATH
16799do
16800  IFS=$as_save_IFS
16801  test -z "$as_dir" && as_dir=.
16802    for ac_exec_ext in '' $ac_executable_extensions; do
16803  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16804    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16806    break 2
16807  fi
16808done
16809  done
16810IFS=$as_save_IFS
16811
16812  ;;
16813esac
16814fi
16815BUILD_CC=$ac_cv_path_BUILD_CC
16816if test -n "$BUILD_CC"; then
16817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16818$as_echo "$BUILD_CC" >&6; }
16819else
16820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16821$as_echo "no" >&6; }
16822fi
16823
16824
16825  test -n "$BUILD_CC" && break
16826done
16827
16828
16829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16830
16831  # First separate the path from the arguments. This will split at the first
16832  # space.
16833  complete="$BUILD_CC"
16834  path="${complete%% *}"
16835  tmp="$complete EOL"
16836  arguments="${tmp#* }"
16837
16838  # Input might be given as Windows format, start by converting to
16839  # unix format.
16840  new_path=`$CYGPATH -u "$path"`
16841
16842  # Now try to locate executable using which
16843  new_path=`$WHICH "$new_path" 2> /dev/null`
16844  # bat and cmd files are not always considered executable in cygwin causing which
16845  # to not find them
16846  if test "x$new_path" = x \
16847           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16848           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16849    new_path=`$CYGPATH -u "$path"`
16850  fi
16851  if test "x$new_path" = x; then
16852    # Oops. Which didn't find the executable.
16853    # The splitting of arguments from the executable at a space might have been incorrect,
16854    # since paths with space are more likely in Windows. Give it another try with the whole
16855    # argument.
16856    path="$complete"
16857    arguments="EOL"
16858    new_path=`$CYGPATH -u "$path"`
16859    new_path=`$WHICH "$new_path" 2> /dev/null`
16860    # bat and cmd files are not always considered executable in cygwin causing which
16861    # to not find them
16862    if test "x$new_path" = x \
16863             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16864             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16865      new_path=`$CYGPATH -u "$path"`
16866    fi
16867    if test "x$new_path" = x; then
16868      # It's still not found. Now this is an unrecoverable error.
16869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16870$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16871      has_space=`$ECHO "$complete" | $GREP " "`
16872      if test "x$has_space" != x; then
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16875      fi
16876      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16877    fi
16878  fi
16879
16880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16883  # "foo.exe" is OK but "foo" is an error.
16884  #
16885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16886  # It is also a way to make sure we got the proper file name for the real test later on.
16887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16888  if test "x$test_shortpath" = x; then
16889    # Short path failed, file does not exist as specified.
16890    # Try adding .exe or .cmd
16891    if test -f "${new_path}.exe"; then
16892       input_to_shortpath="${new_path}.exe"
16893    elif test -f "${new_path}.cmd"; then
16894       input_to_shortpath="${new_path}.cmd"
16895    else
16896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16897$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16898      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16899$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16900      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16901    fi
16902  else
16903    input_to_shortpath="$new_path"
16904  fi
16905
16906  # Call helper function which possibly converts this using DOS-style short mode.
16907  # If so, the updated path is stored in $new_path.
16908  new_path="$input_to_shortpath"
16909
16910  input_path="$input_to_shortpath"
16911  # Check if we need to convert this using DOS-style short mode. If the path
16912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16913  # take no chances and rewrite it.
16914  # Note: m4 eats our [], so we need to use [ and ] instead.
16915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16916  if test "x$has_forbidden_chars" != x; then
16917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16921      # Going to short mode and back again did indeed matter. Since short mode is
16922      # case insensitive, let's make it lowercase to improve readability.
16923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16924      # Now convert it back to Unix-stile (cygpath)
16925      input_path=`$CYGPATH -u "$shortmode_path"`
16926      new_path="$input_path"
16927    fi
16928  fi
16929
16930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16931  if test "x$test_cygdrive_prefix" = x; then
16932    # As a simple fix, exclude /usr/bin since it's not a real path.
16933    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16935      # a path prefixed by /cygdrive for fixpath to work.
16936      new_path="$CYGWIN_ROOT_PATH$input_path"
16937    fi
16938  fi
16939
16940  # remove trailing .exe if any
16941  new_path="${new_path/%.exe/}"
16942
16943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16944
16945  # First separate the path from the arguments. This will split at the first
16946  # space.
16947  complete="$BUILD_CC"
16948  path="${complete%% *}"
16949  tmp="$complete EOL"
16950  arguments="${tmp#* }"
16951
16952  # Input might be given as Windows format, start by converting to
16953  # unix format.
16954  new_path="$path"
16955
16956  windows_path="$new_path"
16957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16958    unix_path=`$CYGPATH -u "$windows_path"`
16959    new_path="$unix_path"
16960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16962    new_path="$unix_path"
16963  fi
16964
16965
16966  # Now try to locate executable using which
16967  new_path=`$WHICH "$new_path" 2> /dev/null`
16968
16969  if test "x$new_path" = x; then
16970    # Oops. Which didn't find the executable.
16971    # The splitting of arguments from the executable at a space might have been incorrect,
16972    # since paths with space are more likely in Windows. Give it another try with the whole
16973    # argument.
16974    path="$complete"
16975    arguments="EOL"
16976    new_path="$path"
16977
16978  windows_path="$new_path"
16979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16980    unix_path=`$CYGPATH -u "$windows_path"`
16981    new_path="$unix_path"
16982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16984    new_path="$unix_path"
16985  fi
16986
16987
16988    new_path=`$WHICH "$new_path" 2> /dev/null`
16989
16990    if test "x$new_path" = x; then
16991      # It's still not found. Now this is an unrecoverable error.
16992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16993$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16994      has_space=`$ECHO "$complete" | $GREP " "`
16995      if test "x$has_space" != x; then
16996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16998      fi
16999      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17000    fi
17001  fi
17002
17003  # Now new_path has a complete unix path to the binary
17004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17005    # Keep paths in /bin as-is, but remove trailing .exe if any
17006    new_path="${new_path/%.exe/}"
17007    # Do not save /bin paths to all_fixpath_prefixes!
17008  else
17009    # Not in mixed or Windows style, start by that.
17010    new_path=`cmd //c echo $new_path`
17011
17012  input_path="$new_path"
17013  # Check if we need to convert this using DOS-style short mode. If the path
17014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17015  # take no chances and rewrite it.
17016  # Note: m4 eats our [], so we need to use [ and ] instead.
17017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17018  if test "x$has_forbidden_chars" != x; then
17019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17021  fi
17022
17023    # Output is in $new_path
17024
17025  windows_path="$new_path"
17026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17027    unix_path=`$CYGPATH -u "$windows_path"`
17028    new_path="$unix_path"
17029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17031    new_path="$unix_path"
17032  fi
17033
17034    # remove trailing .exe if any
17035    new_path="${new_path/%.exe/}"
17036
17037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17039  fi
17040
17041  else
17042    # We're on a posix platform. Hooray! :)
17043    # First separate the path from the arguments. This will split at the first
17044    # space.
17045    complete="$BUILD_CC"
17046    path="${complete%% *}"
17047    tmp="$complete EOL"
17048    arguments="${tmp#* }"
17049
17050    # Cannot rely on the command "which" here since it doesn't always work.
17051    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17052    if test -z "$is_absolute_path"; then
17053      # Path to executable is not absolute. Find it.
17054      IFS_save="$IFS"
17055      IFS=:
17056      for p in $PATH; do
17057        if test -f "$p/$path" && test -x "$p/$path"; then
17058          new_path="$p/$path"
17059          break
17060        fi
17061      done
17062      IFS="$IFS_save"
17063    else
17064      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17065$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17066      new_path="$path"
17067    fi
17068
17069    if test "x$new_path" = x; then
17070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17071$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17072        has_space=`$ECHO "$complete" | $GREP " "`
17073        if test "x$has_space" != x; then
17074          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17075$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17076        fi
17077        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17078      fi
17079  fi
17080
17081      # Now join together the path and the arguments once again
17082      if test "x$arguments" != xEOL; then
17083        new_complete="$new_path ${arguments% *}"
17084      else
17085        new_complete="$new_path"
17086      fi
17087
17088  if test "x$complete" != "x$new_complete"; then
17089      BUILD_CC="$new_complete"
17090      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17091$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17092    fi
17093
17094    for ac_prog in cl CC g++
17095do
17096  # Extract the first word of "$ac_prog", so it can be a program name with args.
17097set dummy $ac_prog; ac_word=$2
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17099$as_echo_n "checking for $ac_word... " >&6; }
17100if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17101  $as_echo_n "(cached) " >&6
17102else
17103  case $BUILD_CXX in
17104  [\\/]* | ?:[\\/]*)
17105  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17106  ;;
17107  *)
17108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17109for as_dir in $PATH
17110do
17111  IFS=$as_save_IFS
17112  test -z "$as_dir" && as_dir=.
17113    for ac_exec_ext in '' $ac_executable_extensions; do
17114  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17115    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17117    break 2
17118  fi
17119done
17120  done
17121IFS=$as_save_IFS
17122
17123  ;;
17124esac
17125fi
17126BUILD_CXX=$ac_cv_path_BUILD_CXX
17127if test -n "$BUILD_CXX"; then
17128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17129$as_echo "$BUILD_CXX" >&6; }
17130else
17131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17132$as_echo "no" >&6; }
17133fi
17134
17135
17136  test -n "$BUILD_CXX" && break
17137done
17138
17139
17140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141
17142  # First separate the path from the arguments. This will split at the first
17143  # space.
17144  complete="$BUILD_CXX"
17145  path="${complete%% *}"
17146  tmp="$complete EOL"
17147  arguments="${tmp#* }"
17148
17149  # Input might be given as Windows format, start by converting to
17150  # unix format.
17151  new_path=`$CYGPATH -u "$path"`
17152
17153  # Now try to locate executable using which
17154  new_path=`$WHICH "$new_path" 2> /dev/null`
17155  # bat and cmd files are not always considered executable in cygwin causing which
17156  # to not find them
17157  if test "x$new_path" = x \
17158           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17159           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17160    new_path=`$CYGPATH -u "$path"`
17161  fi
17162  if test "x$new_path" = x; then
17163    # Oops. Which didn't find the executable.
17164    # The splitting of arguments from the executable at a space might have been incorrect,
17165    # since paths with space are more likely in Windows. Give it another try with the whole
17166    # argument.
17167    path="$complete"
17168    arguments="EOL"
17169    new_path=`$CYGPATH -u "$path"`
17170    new_path=`$WHICH "$new_path" 2> /dev/null`
17171    # bat and cmd files are not always considered executable in cygwin causing which
17172    # to not find them
17173    if test "x$new_path" = x \
17174             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17175             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17176      new_path=`$CYGPATH -u "$path"`
17177    fi
17178    if test "x$new_path" = x; then
17179      # It's still not found. Now this is an unrecoverable error.
17180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17181$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17182      has_space=`$ECHO "$complete" | $GREP " "`
17183      if test "x$has_space" != x; then
17184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17186      fi
17187      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17188    fi
17189  fi
17190
17191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17194  # "foo.exe" is OK but "foo" is an error.
17195  #
17196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17197  # It is also a way to make sure we got the proper file name for the real test later on.
17198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17199  if test "x$test_shortpath" = x; then
17200    # Short path failed, file does not exist as specified.
17201    # Try adding .exe or .cmd
17202    if test -f "${new_path}.exe"; then
17203       input_to_shortpath="${new_path}.exe"
17204    elif test -f "${new_path}.cmd"; then
17205       input_to_shortpath="${new_path}.cmd"
17206    else
17207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17208$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17209      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17210$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17211      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17212    fi
17213  else
17214    input_to_shortpath="$new_path"
17215  fi
17216
17217  # Call helper function which possibly converts this using DOS-style short mode.
17218  # If so, the updated path is stored in $new_path.
17219  new_path="$input_to_shortpath"
17220
17221  input_path="$input_to_shortpath"
17222  # Check if we need to convert this using DOS-style short mode. If the path
17223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17224  # take no chances and rewrite it.
17225  # Note: m4 eats our [], so we need to use [ and ] instead.
17226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17227  if test "x$has_forbidden_chars" != x; then
17228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17232      # Going to short mode and back again did indeed matter. Since short mode is
17233      # case insensitive, let's make it lowercase to improve readability.
17234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17235      # Now convert it back to Unix-stile (cygpath)
17236      input_path=`$CYGPATH -u "$shortmode_path"`
17237      new_path="$input_path"
17238    fi
17239  fi
17240
17241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17242  if test "x$test_cygdrive_prefix" = x; then
17243    # As a simple fix, exclude /usr/bin since it's not a real path.
17244    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17246      # a path prefixed by /cygdrive for fixpath to work.
17247      new_path="$CYGWIN_ROOT_PATH$input_path"
17248    fi
17249  fi
17250
17251  # remove trailing .exe if any
17252  new_path="${new_path/%.exe/}"
17253
17254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17255
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  # Input might be given as Windows format, start by converting to
17264  # unix format.
17265  new_path="$path"
17266
17267  windows_path="$new_path"
17268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17269    unix_path=`$CYGPATH -u "$windows_path"`
17270    new_path="$unix_path"
17271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17273    new_path="$unix_path"
17274  fi
17275
17276
17277  # Now try to locate executable using which
17278  new_path=`$WHICH "$new_path" 2> /dev/null`
17279
17280  if test "x$new_path" = x; then
17281    # Oops. Which didn't find the executable.
17282    # The splitting of arguments from the executable at a space might have been incorrect,
17283    # since paths with space are more likely in Windows. Give it another try with the whole
17284    # argument.
17285    path="$complete"
17286    arguments="EOL"
17287    new_path="$path"
17288
17289  windows_path="$new_path"
17290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17291    unix_path=`$CYGPATH -u "$windows_path"`
17292    new_path="$unix_path"
17293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17295    new_path="$unix_path"
17296  fi
17297
17298
17299    new_path=`$WHICH "$new_path" 2> /dev/null`
17300
17301    if test "x$new_path" = x; then
17302      # It's still not found. Now this is an unrecoverable error.
17303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17304$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17305      has_space=`$ECHO "$complete" | $GREP " "`
17306      if test "x$has_space" != x; then
17307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17309      fi
17310      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17311    fi
17312  fi
17313
17314  # Now new_path has a complete unix path to the binary
17315  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17316    # Keep paths in /bin as-is, but remove trailing .exe if any
17317    new_path="${new_path/%.exe/}"
17318    # Do not save /bin paths to all_fixpath_prefixes!
17319  else
17320    # Not in mixed or Windows style, start by that.
17321    new_path=`cmd //c echo $new_path`
17322
17323  input_path="$new_path"
17324  # Check if we need to convert this using DOS-style short mode. If the path
17325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17326  # take no chances and rewrite it.
17327  # Note: m4 eats our [], so we need to use [ and ] instead.
17328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17329  if test "x$has_forbidden_chars" != x; then
17330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17332  fi
17333
17334    # Output is in $new_path
17335
17336  windows_path="$new_path"
17337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17338    unix_path=`$CYGPATH -u "$windows_path"`
17339    new_path="$unix_path"
17340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17342    new_path="$unix_path"
17343  fi
17344
17345    # remove trailing .exe if any
17346    new_path="${new_path/%.exe/}"
17347
17348    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17349    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17350  fi
17351
17352  else
17353    # We're on a posix platform. Hooray! :)
17354    # First separate the path from the arguments. This will split at the first
17355    # space.
17356    complete="$BUILD_CXX"
17357    path="${complete%% *}"
17358    tmp="$complete EOL"
17359    arguments="${tmp#* }"
17360
17361    # Cannot rely on the command "which" here since it doesn't always work.
17362    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17363    if test -z "$is_absolute_path"; then
17364      # Path to executable is not absolute. Find it.
17365      IFS_save="$IFS"
17366      IFS=:
17367      for p in $PATH; do
17368        if test -f "$p/$path" && test -x "$p/$path"; then
17369          new_path="$p/$path"
17370          break
17371        fi
17372      done
17373      IFS="$IFS_save"
17374    else
17375      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17376$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17377      new_path="$path"
17378    fi
17379
17380    if test "x$new_path" = x; then
17381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17382$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17383        has_space=`$ECHO "$complete" | $GREP " "`
17384        if test "x$has_space" != x; then
17385          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17387        fi
17388        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17389      fi
17390  fi
17391
17392      # Now join together the path and the arguments once again
17393      if test "x$arguments" != xEOL; then
17394        new_complete="$new_path ${arguments% *}"
17395      else
17396        new_complete="$new_path"
17397      fi
17398
17399  if test "x$complete" != "x$new_complete"; then
17400      BUILD_CXX="$new_complete"
17401      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17402$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17403    fi
17404
17405    # Extract the first word of "ld", so it can be a program name with args.
17406set dummy ld; ac_word=$2
17407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17408$as_echo_n "checking for $ac_word... " >&6; }
17409if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17410  $as_echo_n "(cached) " >&6
17411else
17412  case $BUILD_LD in
17413  [\\/]* | ?:[\\/]*)
17414  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17415  ;;
17416  *)
17417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17418for as_dir in $PATH
17419do
17420  IFS=$as_save_IFS
17421  test -z "$as_dir" && as_dir=.
17422    for ac_exec_ext in '' $ac_executable_extensions; do
17423  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17424    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17426    break 2
17427  fi
17428done
17429  done
17430IFS=$as_save_IFS
17431
17432  ;;
17433esac
17434fi
17435BUILD_LD=$ac_cv_path_BUILD_LD
17436if test -n "$BUILD_LD"; then
17437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17438$as_echo "$BUILD_LD" >&6; }
17439else
17440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17441$as_echo "no" >&6; }
17442fi
17443
17444
17445
17446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17447
17448  # First separate the path from the arguments. This will split at the first
17449  # space.
17450  complete="$BUILD_LD"
17451  path="${complete%% *}"
17452  tmp="$complete EOL"
17453  arguments="${tmp#* }"
17454
17455  # Input might be given as Windows format, start by converting to
17456  # unix format.
17457  new_path=`$CYGPATH -u "$path"`
17458
17459  # Now try to locate executable using which
17460  new_path=`$WHICH "$new_path" 2> /dev/null`
17461  # bat and cmd files are not always considered executable in cygwin causing which
17462  # to not find them
17463  if test "x$new_path" = x \
17464           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17465           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17466    new_path=`$CYGPATH -u "$path"`
17467  fi
17468  if test "x$new_path" = x; then
17469    # Oops. Which didn't find the executable.
17470    # The splitting of arguments from the executable at a space might have been incorrect,
17471    # since paths with space are more likely in Windows. Give it another try with the whole
17472    # argument.
17473    path="$complete"
17474    arguments="EOL"
17475    new_path=`$CYGPATH -u "$path"`
17476    new_path=`$WHICH "$new_path" 2> /dev/null`
17477    # bat and cmd files are not always considered executable in cygwin causing which
17478    # to not find them
17479    if test "x$new_path" = x \
17480             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17481             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17482      new_path=`$CYGPATH -u "$path"`
17483    fi
17484    if test "x$new_path" = x; then
17485      # It's still not found. Now this is an unrecoverable error.
17486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17487$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17488      has_space=`$ECHO "$complete" | $GREP " "`
17489      if test "x$has_space" != x; then
17490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17492      fi
17493      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17494    fi
17495  fi
17496
17497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17500  # "foo.exe" is OK but "foo" is an error.
17501  #
17502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17503  # It is also a way to make sure we got the proper file name for the real test later on.
17504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17505  if test "x$test_shortpath" = x; then
17506    # Short path failed, file does not exist as specified.
17507    # Try adding .exe or .cmd
17508    if test -f "${new_path}.exe"; then
17509       input_to_shortpath="${new_path}.exe"
17510    elif test -f "${new_path}.cmd"; then
17511       input_to_shortpath="${new_path}.cmd"
17512    else
17513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17514$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17515      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17516$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17517      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17518    fi
17519  else
17520    input_to_shortpath="$new_path"
17521  fi
17522
17523  # Call helper function which possibly converts this using DOS-style short mode.
17524  # If so, the updated path is stored in $new_path.
17525  new_path="$input_to_shortpath"
17526
17527  input_path="$input_to_shortpath"
17528  # Check if we need to convert this using DOS-style short mode. If the path
17529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17530  # take no chances and rewrite it.
17531  # Note: m4 eats our [], so we need to use [ and ] instead.
17532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17533  if test "x$has_forbidden_chars" != x; then
17534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17538      # Going to short mode and back again did indeed matter. Since short mode is
17539      # case insensitive, let's make it lowercase to improve readability.
17540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17541      # Now convert it back to Unix-stile (cygpath)
17542      input_path=`$CYGPATH -u "$shortmode_path"`
17543      new_path="$input_path"
17544    fi
17545  fi
17546
17547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17548  if test "x$test_cygdrive_prefix" = x; then
17549    # As a simple fix, exclude /usr/bin since it's not a real path.
17550    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17552      # a path prefixed by /cygdrive for fixpath to work.
17553      new_path="$CYGWIN_ROOT_PATH$input_path"
17554    fi
17555  fi
17556
17557  # remove trailing .exe if any
17558  new_path="${new_path/%.exe/}"
17559
17560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17561
17562  # First separate the path from the arguments. This will split at the first
17563  # space.
17564  complete="$BUILD_LD"
17565  path="${complete%% *}"
17566  tmp="$complete EOL"
17567  arguments="${tmp#* }"
17568
17569  # Input might be given as Windows format, start by converting to
17570  # unix format.
17571  new_path="$path"
17572
17573  windows_path="$new_path"
17574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17575    unix_path=`$CYGPATH -u "$windows_path"`
17576    new_path="$unix_path"
17577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17579    new_path="$unix_path"
17580  fi
17581
17582
17583  # Now try to locate executable using which
17584  new_path=`$WHICH "$new_path" 2> /dev/null`
17585
17586  if test "x$new_path" = x; then
17587    # Oops. Which didn't find the executable.
17588    # The splitting of arguments from the executable at a space might have been incorrect,
17589    # since paths with space are more likely in Windows. Give it another try with the whole
17590    # argument.
17591    path="$complete"
17592    arguments="EOL"
17593    new_path="$path"
17594
17595  windows_path="$new_path"
17596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17597    unix_path=`$CYGPATH -u "$windows_path"`
17598    new_path="$unix_path"
17599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17601    new_path="$unix_path"
17602  fi
17603
17604
17605    new_path=`$WHICH "$new_path" 2> /dev/null`
17606
17607    if test "x$new_path" = x; then
17608      # It's still not found. Now this is an unrecoverable error.
17609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17610$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17611      has_space=`$ECHO "$complete" | $GREP " "`
17612      if test "x$has_space" != x; then
17613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17615      fi
17616      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17617    fi
17618  fi
17619
17620  # Now new_path has a complete unix path to the binary
17621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17622    # Keep paths in /bin as-is, but remove trailing .exe if any
17623    new_path="${new_path/%.exe/}"
17624    # Do not save /bin paths to all_fixpath_prefixes!
17625  else
17626    # Not in mixed or Windows style, start by that.
17627    new_path=`cmd //c echo $new_path`
17628
17629  input_path="$new_path"
17630  # Check if we need to convert this using DOS-style short mode. If the path
17631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17632  # take no chances and rewrite it.
17633  # Note: m4 eats our [], so we need to use [ and ] instead.
17634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17635  if test "x$has_forbidden_chars" != x; then
17636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17638  fi
17639
17640    # Output is in $new_path
17641
17642  windows_path="$new_path"
17643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17644    unix_path=`$CYGPATH -u "$windows_path"`
17645    new_path="$unix_path"
17646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17648    new_path="$unix_path"
17649  fi
17650
17651    # remove trailing .exe if any
17652    new_path="${new_path/%.exe/}"
17653
17654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17656  fi
17657
17658  else
17659    # We're on a posix platform. Hooray! :)
17660    # First separate the path from the arguments. This will split at the first
17661    # space.
17662    complete="$BUILD_LD"
17663    path="${complete%% *}"
17664    tmp="$complete EOL"
17665    arguments="${tmp#* }"
17666
17667    # Cannot rely on the command "which" here since it doesn't always work.
17668    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17669    if test -z "$is_absolute_path"; then
17670      # Path to executable is not absolute. Find it.
17671      IFS_save="$IFS"
17672      IFS=:
17673      for p in $PATH; do
17674        if test -f "$p/$path" && test -x "$p/$path"; then
17675          new_path="$p/$path"
17676          break
17677        fi
17678      done
17679      IFS="$IFS_save"
17680    else
17681      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17682$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17683      new_path="$path"
17684    fi
17685
17686    if test "x$new_path" = x; then
17687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17688$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17689        has_space=`$ECHO "$complete" | $GREP " "`
17690        if test "x$has_space" != x; then
17691          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17692$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17693        fi
17694        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17695      fi
17696  fi
17697
17698      # Now join together the path and the arguments once again
17699      if test "x$arguments" != xEOL; then
17700        new_complete="$new_path ${arguments% *}"
17701      else
17702        new_complete="$new_path"
17703      fi
17704
17705  if test "x$complete" != "x$new_complete"; then
17706      BUILD_LD="$new_complete"
17707      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17708$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17709    fi
17710
17711fi
17712
17713
17714
17715
17716# If a devkit is found on the builddeps server, then prepend its path to the
17717# PATH variable. If there are cross compilers available in the devkit, these
17718# will be found by AC_PROG_CC et al.
17719DEVKIT=
17720
17721
17722    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17723        # Source the builddeps file again, to make sure it uses the latest variables!
17724        . $builddepsfile
17725        # Look for a target and build machine specific resource!
17726        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17727        if test "x$resource" = x; then
17728            # Ok, lets instead look for a target specific resource
17729            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17730        fi
17731        if test "x$resource" = x; then
17732            # Ok, lets instead look for a build specific resource
17733            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17734        fi
17735        if test "x$resource" = x; then
17736            # Ok, lets instead look for a generic resource
17737            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17738            resource=${builddep_devkit}
17739        fi
17740        if test "x$resource" != x; then
17741            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17742$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17743	    # If the resource in the builddeps.conf file is an existing directory,
17744	    # for example /java/linux/cups
17745	    if test -d ${resource}; then
17746	       depdir=${resource}
17747	    else
17748
17749# devkit is for example mymodule
17750# $resource is for example libs/general/libmymod_1_2_3.zip
17751# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17752# $with_builddeps_dir is for example /localhome/builddeps
17753# depdir is the name of the variable into which we store the depdir, eg MYMOD
17754# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17755# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17756    filename=`basename $resource`
17757    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17758    filebase=${filename%%.*}
17759    extension=${filename#*.}
17760    installdir=$with_builddeps_dir/$filebase
17761    if test ! -f $installdir/$filename.unpacked; then
17762        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17763$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17764        if test ! -d $installdir; then
17765            mkdir -p $installdir
17766        fi
17767        if test ! -d $installdir; then
17768            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17769        fi
17770        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17771        touch $tmpfile
17772        if test ! -f $tmpfile; then
17773            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17774        fi
17775
17776    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17777    # $tmpfile is the local file name for the downloaded file.
17778    VALID_TOOL=no
17779    if test "x$BDEPS_FTP" = xwget; then
17780       VALID_TOOL=yes
17781       wget -O $tmpfile $with_builddeps_server/$resource
17782    fi
17783    if test "x$BDEPS_FTP" = xlftp; then
17784       VALID_TOOL=yes
17785       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17786    fi
17787    if test "x$BDEPS_FTP" = xftp; then
17788        VALID_TOOL=yes
17789        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17790        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17791        FTPUSERPWD=${FTPSERVER%%@*}
17792        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17793            FTPUSER=${userpwd%%:*}
17794            FTPPWD=${userpwd#*@}
17795            FTPSERVER=${FTPSERVER#*@}
17796        else
17797            FTPUSER=ftp
17798            FTPPWD=ftp
17799        fi
17800        # the "pass" command does not work on some
17801        # ftp clients (read ftp.exe) but if it works,
17802        # passive mode is better!
17803        (\
17804            echo "user $FTPUSER $FTPPWD"        ;\
17805            echo "pass"                         ;\
17806            echo "bin"                          ;\
17807            echo "get $FTPPATH $tmpfile"              ;\
17808        ) | ftp -in $FTPSERVER
17809    fi
17810    if test "x$VALID_TOOL" != xyes; then
17811       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17812    fi
17813
17814        mv $tmpfile $installdir/$filename
17815        if test ! -s $installdir/$filename; then
17816            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17817        fi
17818        case "$extension" in
17819            zip)  echo "Unzipping $installdir/$filename..."
17820               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17821            ;;
17822            tar.gz) echo "Untaring $installdir/$filename..."
17823               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17824            ;;
17825            tgz) echo "Untaring $installdir/$filename..."
17826               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17827            ;;
17828            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17829            ;;
17830        esac
17831    fi
17832    if test -f $installdir/$filename.unpacked; then
17833        depdir=$installdir
17834    fi
17835
17836	    fi
17837            # Source the builddeps file again, because in the previous command, the depdir
17838            # was updated to point at the current build dependency install directory.
17839            . $builddepsfile
17840            # Now extract variables from the builddeps.conf files.
17841            theroot=${builddep_devkit_ROOT}
17842            thecflags=${builddep_devkit_CFLAGS}
17843            thelibs=${builddep_devkit_LIBS}
17844            if test "x$depdir" = x; then
17845                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17846            fi
17847            DEVKIT=$depdir
17848            if test "x$theroot" != x; then
17849               DEVKIT="$theroot"
17850            fi
17851            if test "x$thecflags" != x; then
17852               DEVKIT_CFLAGS="$thecflags"
17853            fi
17854            if test "x$thelibs" != x; then
17855               DEVKIT_LIBS="$thelibs"
17856            fi
17857            # Found devkit
17858                     PATH="$DEVKIT/bin:$PATH"
17859                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17860                     if test "x$x_includes" = "xNONE"; then
17861                         x_includes="$SYS_ROOT/usr/include/X11"
17862                     fi
17863                     if test "x$x_libraries" = "xNONE"; then
17864                         x_libraries="$SYS_ROOT/usr/lib"
17865                     fi
17866
17867
17868        fi
17869
17870    fi
17871
17872
17873if test "x$SYS_ROOT" != "x/" ; then
17874    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17875    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17876    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17877    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17878    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17879    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17880fi
17881
17882# Store the CFLAGS etal passed to the configure script.
17883ORG_CFLAGS="$CFLAGS"
17884ORG_CXXFLAGS="$CXXFLAGS"
17885ORG_OBJCFLAGS="$OBJCFLAGS"
17886
17887# autoconf magic only relies on PATH, so update it if tools dir is specified
17888OLD_PATH="$PATH"
17889if test "x$TOOLS_DIR" != x; then
17890  PATH=$TOOLS_DIR:$PATH
17891fi
17892
17893
17894### Locate C compiler (CC)
17895
17896# gcc is almost always present, but on Windows we
17897# prefer cl.exe and on Solaris we prefer CC.
17898# Thus test for them in this order.
17899if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17900  # Do not probe for cc on MacOSX.
17901  COMPILER_CHECK_LIST="cl gcc"
17902else
17903  COMPILER_CHECK_LIST="cl cc gcc"
17904fi
17905
17906
17907  COMPILER_NAME=C
17908
17909  CC=
17910  # If TOOLS_DIR is set, check for all compiler names in there first
17911  # before checking the rest of the PATH.
17912  if test -n "$TOOLS_DIR"; then
17913    PATH_save="$PATH"
17914    PATH="$TOOLS_DIR"
17915    for ac_prog in $COMPILER_CHECK_LIST
17916do
17917  # Extract the first word of "$ac_prog", so it can be a program name with args.
17918set dummy $ac_prog; ac_word=$2
17919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17920$as_echo_n "checking for $ac_word... " >&6; }
17921if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
17922  $as_echo_n "(cached) " >&6
17923else
17924  case $TOOLS_DIR_CC in
17925  [\\/]* | ?:[\\/]*)
17926  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
17927  ;;
17928  *)
17929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17930for as_dir in $PATH
17931do
17932  IFS=$as_save_IFS
17933  test -z "$as_dir" && as_dir=.
17934    for ac_exec_ext in '' $ac_executable_extensions; do
17935  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17936    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
17937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17938    break 2
17939  fi
17940done
17941  done
17942IFS=$as_save_IFS
17943
17944  ;;
17945esac
17946fi
17947TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
17948if test -n "$TOOLS_DIR_CC"; then
17949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
17950$as_echo "$TOOLS_DIR_CC" >&6; }
17951else
17952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17953$as_echo "no" >&6; }
17954fi
17955
17956
17957  test -n "$TOOLS_DIR_CC" && break
17958done
17959
17960    CC=$TOOLS_DIR_CC
17961    PATH="$PATH_save"
17962  fi
17963
17964  # AC_PATH_PROGS can't be run multiple times with the same variable,
17965  # so create a new name for this run.
17966  if test "x$CC" = x; then
17967    for ac_prog in $COMPILER_CHECK_LIST
17968do
17969  # Extract the first word of "$ac_prog", so it can be a program name with args.
17970set dummy $ac_prog; ac_word=$2
17971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17972$as_echo_n "checking for $ac_word... " >&6; }
17973if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17974  $as_echo_n "(cached) " >&6
17975else
17976  case $POTENTIAL_CC in
17977  [\\/]* | ?:[\\/]*)
17978  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17979  ;;
17980  *)
17981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17982for as_dir in $PATH
17983do
17984  IFS=$as_save_IFS
17985  test -z "$as_dir" && as_dir=.
17986    for ac_exec_ext in '' $ac_executable_extensions; do
17987  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17988    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17990    break 2
17991  fi
17992done
17993  done
17994IFS=$as_save_IFS
17995
17996  ;;
17997esac
17998fi
17999POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18000if test -n "$POTENTIAL_CC"; then
18001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18002$as_echo "$POTENTIAL_CC" >&6; }
18003else
18004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18005$as_echo "no" >&6; }
18006fi
18007
18008
18009  test -n "$POTENTIAL_CC" && break
18010done
18011
18012    CC=$POTENTIAL_CC
18013  fi
18014
18015  if test "x$CC" = x; then
18016
18017    # Print a helpful message on how to acquire the necessary build dependency.
18018    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18019    MISSING_DEPENDENCY=devkit
18020    PKGHANDLER_COMMAND=
18021
18022    case $PKGHANDLER in
18023	apt-get)
18024                apt_help     $MISSING_DEPENDENCY ;;
18025    yum)
18026                yum_help     $MISSING_DEPENDENCY ;;
18027	port)
18028                port_help    $MISSING_DEPENDENCY ;;
18029	pkgutil)
18030                pkgutil_help $MISSING_DEPENDENCY ;;
18031	pkgadd)
18032                pkgadd_help  $MISSING_DEPENDENCY ;;
18033    * )
18034      break ;;
18035    esac
18036
18037    if test "x$PKGHANDLER_COMMAND" != x; then
18038        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18039    fi
18040
18041      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18042  fi
18043
18044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18045
18046  # First separate the path from the arguments. This will split at the first
18047  # space.
18048  complete="$CC"
18049  path="${complete%% *}"
18050  tmp="$complete EOL"
18051  arguments="${tmp#* }"
18052
18053  # Input might be given as Windows format, start by converting to
18054  # unix format.
18055  new_path=`$CYGPATH -u "$path"`
18056
18057  # Now try to locate executable using which
18058  new_path=`$WHICH "$new_path" 2> /dev/null`
18059  # bat and cmd files are not always considered executable in cygwin causing which
18060  # to not find them
18061  if test "x$new_path" = x \
18062           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18063           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18064    new_path=`$CYGPATH -u "$path"`
18065  fi
18066  if test "x$new_path" = x; then
18067    # Oops. Which didn't find the executable.
18068    # The splitting of arguments from the executable at a space might have been incorrect,
18069    # since paths with space are more likely in Windows. Give it another try with the whole
18070    # argument.
18071    path="$complete"
18072    arguments="EOL"
18073    new_path=`$CYGPATH -u "$path"`
18074    new_path=`$WHICH "$new_path" 2> /dev/null`
18075    # bat and cmd files are not always considered executable in cygwin causing which
18076    # to not find them
18077    if test "x$new_path" = x \
18078             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18079             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18080      new_path=`$CYGPATH -u "$path"`
18081    fi
18082    if test "x$new_path" = x; then
18083      # It's still not found. Now this is an unrecoverable error.
18084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18085$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18086      has_space=`$ECHO "$complete" | $GREP " "`
18087      if test "x$has_space" != x; then
18088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18090      fi
18091      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18092    fi
18093  fi
18094
18095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18098  # "foo.exe" is OK but "foo" is an error.
18099  #
18100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18101  # It is also a way to make sure we got the proper file name for the real test later on.
18102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18103  if test "x$test_shortpath" = x; then
18104    # Short path failed, file does not exist as specified.
18105    # Try adding .exe or .cmd
18106    if test -f "${new_path}.exe"; then
18107       input_to_shortpath="${new_path}.exe"
18108    elif test -f "${new_path}.cmd"; then
18109       input_to_shortpath="${new_path}.cmd"
18110    else
18111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18112$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18115      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18116    fi
18117  else
18118    input_to_shortpath="$new_path"
18119  fi
18120
18121  # Call helper function which possibly converts this using DOS-style short mode.
18122  # If so, the updated path is stored in $new_path.
18123  new_path="$input_to_shortpath"
18124
18125  input_path="$input_to_shortpath"
18126  # Check if we need to convert this using DOS-style short mode. If the path
18127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18128  # take no chances and rewrite it.
18129  # Note: m4 eats our [], so we need to use [ and ] instead.
18130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18131  if test "x$has_forbidden_chars" != x; then
18132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18136      # Going to short mode and back again did indeed matter. Since short mode is
18137      # case insensitive, let's make it lowercase to improve readability.
18138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18139      # Now convert it back to Unix-stile (cygpath)
18140      input_path=`$CYGPATH -u "$shortmode_path"`
18141      new_path="$input_path"
18142    fi
18143  fi
18144
18145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18146  if test "x$test_cygdrive_prefix" = x; then
18147    # As a simple fix, exclude /usr/bin since it's not a real path.
18148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18150      # a path prefixed by /cygdrive for fixpath to work.
18151      new_path="$CYGWIN_ROOT_PATH$input_path"
18152    fi
18153  fi
18154
18155  # remove trailing .exe if any
18156  new_path="${new_path/%.exe/}"
18157
18158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18159
18160  # First separate the path from the arguments. This will split at the first
18161  # space.
18162  complete="$CC"
18163  path="${complete%% *}"
18164  tmp="$complete EOL"
18165  arguments="${tmp#* }"
18166
18167  # Input might be given as Windows format, start by converting to
18168  # unix format.
18169  new_path="$path"
18170
18171  windows_path="$new_path"
18172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18173    unix_path=`$CYGPATH -u "$windows_path"`
18174    new_path="$unix_path"
18175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18177    new_path="$unix_path"
18178  fi
18179
18180
18181  # Now try to locate executable using which
18182  new_path=`$WHICH "$new_path" 2> /dev/null`
18183
18184  if test "x$new_path" = x; then
18185    # Oops. Which didn't find the executable.
18186    # The splitting of arguments from the executable at a space might have been incorrect,
18187    # since paths with space are more likely in Windows. Give it another try with the whole
18188    # argument.
18189    path="$complete"
18190    arguments="EOL"
18191    new_path="$path"
18192
18193  windows_path="$new_path"
18194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18195    unix_path=`$CYGPATH -u "$windows_path"`
18196    new_path="$unix_path"
18197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18199    new_path="$unix_path"
18200  fi
18201
18202
18203    new_path=`$WHICH "$new_path" 2> /dev/null`
18204
18205    if test "x$new_path" = x; then
18206      # It's still not found. Now this is an unrecoverable error.
18207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18208$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18209      has_space=`$ECHO "$complete" | $GREP " "`
18210      if test "x$has_space" != x; then
18211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18213      fi
18214      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18215    fi
18216  fi
18217
18218  # Now new_path has a complete unix path to the binary
18219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18220    # Keep paths in /bin as-is, but remove trailing .exe if any
18221    new_path="${new_path/%.exe/}"
18222    # Do not save /bin paths to all_fixpath_prefixes!
18223  else
18224    # Not in mixed or Windows style, start by that.
18225    new_path=`cmd //c echo $new_path`
18226
18227  input_path="$new_path"
18228  # Check if we need to convert this using DOS-style short mode. If the path
18229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18230  # take no chances and rewrite it.
18231  # Note: m4 eats our [], so we need to use [ and ] instead.
18232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18233  if test "x$has_forbidden_chars" != x; then
18234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18236  fi
18237
18238    # Output is in $new_path
18239
18240  windows_path="$new_path"
18241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18242    unix_path=`$CYGPATH -u "$windows_path"`
18243    new_path="$unix_path"
18244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18246    new_path="$unix_path"
18247  fi
18248
18249    # remove trailing .exe if any
18250    new_path="${new_path/%.exe/}"
18251
18252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18254  fi
18255
18256  else
18257    # We're on a posix platform. Hooray! :)
18258    # First separate the path from the arguments. This will split at the first
18259    # space.
18260    complete="$CC"
18261    path="${complete%% *}"
18262    tmp="$complete EOL"
18263    arguments="${tmp#* }"
18264
18265    # Cannot rely on the command "which" here since it doesn't always work.
18266    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18267    if test -z "$is_absolute_path"; then
18268      # Path to executable is not absolute. Find it.
18269      IFS_save="$IFS"
18270      IFS=:
18271      for p in $PATH; do
18272        if test -f "$p/$path" && test -x "$p/$path"; then
18273          new_path="$p/$path"
18274          break
18275        fi
18276      done
18277      IFS="$IFS_save"
18278    else
18279      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18280$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18281      new_path="$path"
18282    fi
18283
18284    if test "x$new_path" = x; then
18285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18286$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18287        has_space=`$ECHO "$complete" | $GREP " "`
18288        if test "x$has_space" != x; then
18289          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18291        fi
18292        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18293      fi
18294  fi
18295
18296      # Now join together the path and the arguments once again
18297      if test "x$arguments" != xEOL; then
18298        new_complete="$new_path ${arguments% *}"
18299      else
18300        new_complete="$new_path"
18301      fi
18302
18303  if test "x$complete" != "x$new_complete"; then
18304      CC="$new_complete"
18305      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18306$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18307    fi
18308
18309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18310$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18311  TEST_COMPILER="$CC"
18312
18313    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18314        # Follow a chain of symbolic links. Use readlink
18315        # where it exists, else fall back to horribly
18316        # complicated shell code.
18317        if test "x$READLINK_TESTED" != yes; then
18318            # On MacOSX there is a readlink tool with a different
18319            # purpose than the GNU readlink tool. Check the found readlink.
18320            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18321            if test "x$ISGNU" = x; then
18322                 # A readlink that we do not know how to use.
18323                 # Are there other non-GNU readlinks out there?
18324                 READLINK_TESTED=yes
18325                 READLINK=
18326            fi
18327        fi
18328
18329        if test "x$READLINK" != x; then
18330            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18331        else
18332            # Save the current directory for restoring afterwards
18333            STARTDIR=$PWD
18334            COUNTER=0
18335            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18336            sym_link_file=`$BASENAME $TEST_COMPILER`
18337            # Use the system pwd and not the shell builtin to resolve directory symlinks
18338            cd $sym_link_dir
18339            cd `$THEPWDCMD`
18340            sym_link_dir=`$THEPWDCMD`
18341            # Resolve file symlinks
18342            while test $COUNTER -lt 20; do
18343                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18344                if test "x$ISLINK" == x; then
18345                    # This is not a symbolic link! We are done!
18346                    break
18347                fi
18348                # Again resolve directory symlinks since the target of the just found
18349                # link could be in a different directory
18350                cd `$DIRNAME $ISLINK`
18351                sym_link_dir=`$THEPWDCMD`
18352                sym_link_file=`$BASENAME $ISLINK`
18353                let COUNTER=COUNTER+1
18354            done
18355            cd $STARTDIR
18356            TEST_COMPILER=$sym_link_dir/$sym_link_file
18357        fi
18358    fi
18359
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18361$as_echo "$TEST_COMPILER" >&6; }
18362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18363$as_echo_n "checking if CC is disguised ccache... " >&6; }
18364
18365  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18366  if test "x$COMPILER_BASENAME" = "xccache"; then
18367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18368$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18369    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18370    # We want to control ccache invocation ourselves, so ignore this cc and try
18371    # searching again.
18372
18373    # Remove the path to the fake ccache cc from the PATH
18374    RETRY_COMPILER_SAVED_PATH="$PATH"
18375    COMPILER_DIRNAME=`$DIRNAME $CC`
18376    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18377
18378    # Try again looking for our compiler
18379    if test -n "$ac_tool_prefix"; then
18380  for ac_prog in $COMPILER_CHECK_LIST
18381  do
18382    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18383set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18385$as_echo_n "checking for $ac_word... " >&6; }
18386if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18387  $as_echo_n "(cached) " >&6
18388else
18389  if test -n "$PROPER_COMPILER_CC"; then
18390  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18391else
18392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18393for as_dir in $PATH
18394do
18395  IFS=$as_save_IFS
18396  test -z "$as_dir" && as_dir=.
18397    for ac_exec_ext in '' $ac_executable_extensions; do
18398  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18399    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18401    break 2
18402  fi
18403done
18404  done
18405IFS=$as_save_IFS
18406
18407fi
18408fi
18409PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18410if test -n "$PROPER_COMPILER_CC"; then
18411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18412$as_echo "$PROPER_COMPILER_CC" >&6; }
18413else
18414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18415$as_echo "no" >&6; }
18416fi
18417
18418
18419    test -n "$PROPER_COMPILER_CC" && break
18420  done
18421fi
18422if test -z "$PROPER_COMPILER_CC"; then
18423  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18424  for ac_prog in $COMPILER_CHECK_LIST
18425do
18426  # Extract the first word of "$ac_prog", so it can be a program name with args.
18427set dummy $ac_prog; ac_word=$2
18428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18429$as_echo_n "checking for $ac_word... " >&6; }
18430if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18431  $as_echo_n "(cached) " >&6
18432else
18433  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18434  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18435else
18436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18437for as_dir in $PATH
18438do
18439  IFS=$as_save_IFS
18440  test -z "$as_dir" && as_dir=.
18441    for ac_exec_ext in '' $ac_executable_extensions; do
18442  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18443    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18445    break 2
18446  fi
18447done
18448  done
18449IFS=$as_save_IFS
18450
18451fi
18452fi
18453ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18454if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18456$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18457else
18458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18459$as_echo "no" >&6; }
18460fi
18461
18462
18463  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18464done
18465
18466  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18467    PROPER_COMPILER_CC=""
18468  else
18469    case $cross_compiling:$ac_tool_warned in
18470yes:)
18471{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18472$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18473ac_tool_warned=yes ;;
18474esac
18475    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18476  fi
18477fi
18478
18479
18480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18481
18482  # First separate the path from the arguments. This will split at the first
18483  # space.
18484  complete="$PROPER_COMPILER_CC"
18485  path="${complete%% *}"
18486  tmp="$complete EOL"
18487  arguments="${tmp#* }"
18488
18489  # Input might be given as Windows format, start by converting to
18490  # unix format.
18491  new_path=`$CYGPATH -u "$path"`
18492
18493  # Now try to locate executable using which
18494  new_path=`$WHICH "$new_path" 2> /dev/null`
18495  # bat and cmd files are not always considered executable in cygwin causing which
18496  # to not find them
18497  if test "x$new_path" = x \
18498           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18499           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18500    new_path=`$CYGPATH -u "$path"`
18501  fi
18502  if test "x$new_path" = x; then
18503    # Oops. Which didn't find the executable.
18504    # The splitting of arguments from the executable at a space might have been incorrect,
18505    # since paths with space are more likely in Windows. Give it another try with the whole
18506    # argument.
18507    path="$complete"
18508    arguments="EOL"
18509    new_path=`$CYGPATH -u "$path"`
18510    new_path=`$WHICH "$new_path" 2> /dev/null`
18511    # bat and cmd files are not always considered executable in cygwin causing which
18512    # to not find them
18513    if test "x$new_path" = x \
18514             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18515             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18516      new_path=`$CYGPATH -u "$path"`
18517    fi
18518    if test "x$new_path" = x; then
18519      # It's still not found. Now this is an unrecoverable error.
18520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18521$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18522      has_space=`$ECHO "$complete" | $GREP " "`
18523      if test "x$has_space" != x; then
18524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18526      fi
18527      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18528    fi
18529  fi
18530
18531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18534  # "foo.exe" is OK but "foo" is an error.
18535  #
18536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18537  # It is also a way to make sure we got the proper file name for the real test later on.
18538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18539  if test "x$test_shortpath" = x; then
18540    # Short path failed, file does not exist as specified.
18541    # Try adding .exe or .cmd
18542    if test -f "${new_path}.exe"; then
18543       input_to_shortpath="${new_path}.exe"
18544    elif test -f "${new_path}.cmd"; then
18545       input_to_shortpath="${new_path}.cmd"
18546    else
18547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18548$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18551      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18552    fi
18553  else
18554    input_to_shortpath="$new_path"
18555  fi
18556
18557  # Call helper function which possibly converts this using DOS-style short mode.
18558  # If so, the updated path is stored in $new_path.
18559  new_path="$input_to_shortpath"
18560
18561  input_path="$input_to_shortpath"
18562  # Check if we need to convert this using DOS-style short mode. If the path
18563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18564  # take no chances and rewrite it.
18565  # Note: m4 eats our [], so we need to use [ and ] instead.
18566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18567  if test "x$has_forbidden_chars" != x; then
18568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18572      # Going to short mode and back again did indeed matter. Since short mode is
18573      # case insensitive, let's make it lowercase to improve readability.
18574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18575      # Now convert it back to Unix-stile (cygpath)
18576      input_path=`$CYGPATH -u "$shortmode_path"`
18577      new_path="$input_path"
18578    fi
18579  fi
18580
18581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18582  if test "x$test_cygdrive_prefix" = x; then
18583    # As a simple fix, exclude /usr/bin since it's not a real path.
18584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18586      # a path prefixed by /cygdrive for fixpath to work.
18587      new_path="$CYGWIN_ROOT_PATH$input_path"
18588    fi
18589  fi
18590
18591  # remove trailing .exe if any
18592  new_path="${new_path/%.exe/}"
18593
18594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18595
18596  # First separate the path from the arguments. This will split at the first
18597  # space.
18598  complete="$PROPER_COMPILER_CC"
18599  path="${complete%% *}"
18600  tmp="$complete EOL"
18601  arguments="${tmp#* }"
18602
18603  # Input might be given as Windows format, start by converting to
18604  # unix format.
18605  new_path="$path"
18606
18607  windows_path="$new_path"
18608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18609    unix_path=`$CYGPATH -u "$windows_path"`
18610    new_path="$unix_path"
18611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18613    new_path="$unix_path"
18614  fi
18615
18616
18617  # Now try to locate executable using which
18618  new_path=`$WHICH "$new_path" 2> /dev/null`
18619
18620  if test "x$new_path" = x; then
18621    # Oops. Which didn't find the executable.
18622    # The splitting of arguments from the executable at a space might have been incorrect,
18623    # since paths with space are more likely in Windows. Give it another try with the whole
18624    # argument.
18625    path="$complete"
18626    arguments="EOL"
18627    new_path="$path"
18628
18629  windows_path="$new_path"
18630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18631    unix_path=`$CYGPATH -u "$windows_path"`
18632    new_path="$unix_path"
18633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18635    new_path="$unix_path"
18636  fi
18637
18638
18639    new_path=`$WHICH "$new_path" 2> /dev/null`
18640
18641    if test "x$new_path" = x; then
18642      # It's still not found. Now this is an unrecoverable error.
18643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18644$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18645      has_space=`$ECHO "$complete" | $GREP " "`
18646      if test "x$has_space" != x; then
18647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18649      fi
18650      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18651    fi
18652  fi
18653
18654  # Now new_path has a complete unix path to the binary
18655  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18656    # Keep paths in /bin as-is, but remove trailing .exe if any
18657    new_path="${new_path/%.exe/}"
18658    # Do not save /bin paths to all_fixpath_prefixes!
18659  else
18660    # Not in mixed or Windows style, start by that.
18661    new_path=`cmd //c echo $new_path`
18662
18663  input_path="$new_path"
18664  # Check if we need to convert this using DOS-style short mode. If the path
18665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18666  # take no chances and rewrite it.
18667  # Note: m4 eats our [], so we need to use [ and ] instead.
18668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18669  if test "x$has_forbidden_chars" != x; then
18670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18672  fi
18673
18674    # Output is in $new_path
18675
18676  windows_path="$new_path"
18677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18678    unix_path=`$CYGPATH -u "$windows_path"`
18679    new_path="$unix_path"
18680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18682    new_path="$unix_path"
18683  fi
18684
18685    # remove trailing .exe if any
18686    new_path="${new_path/%.exe/}"
18687
18688    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18689    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18690  fi
18691
18692  else
18693    # We're on a posix platform. Hooray! :)
18694    # First separate the path from the arguments. This will split at the first
18695    # space.
18696    complete="$PROPER_COMPILER_CC"
18697    path="${complete%% *}"
18698    tmp="$complete EOL"
18699    arguments="${tmp#* }"
18700
18701    # Cannot rely on the command "which" here since it doesn't always work.
18702    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18703    if test -z "$is_absolute_path"; then
18704      # Path to executable is not absolute. Find it.
18705      IFS_save="$IFS"
18706      IFS=:
18707      for p in $PATH; do
18708        if test -f "$p/$path" && test -x "$p/$path"; then
18709          new_path="$p/$path"
18710          break
18711        fi
18712      done
18713      IFS="$IFS_save"
18714    else
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18716$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18717      new_path="$path"
18718    fi
18719
18720    if test "x$new_path" = x; then
18721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18722$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18723        has_space=`$ECHO "$complete" | $GREP " "`
18724        if test "x$has_space" != x; then
18725          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18726$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18727        fi
18728        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18729      fi
18730  fi
18731
18732      # Now join together the path and the arguments once again
18733      if test "x$arguments" != xEOL; then
18734        new_complete="$new_path ${arguments% *}"
18735      else
18736        new_complete="$new_path"
18737      fi
18738
18739  if test "x$complete" != "x$new_complete"; then
18740      PROPER_COMPILER_CC="$new_complete"
18741      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18742$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18743    fi
18744
18745    PATH="$RETRY_COMPILER_SAVED_PATH"
18746
18747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18748$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18749
18750    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18751        # Follow a chain of symbolic links. Use readlink
18752        # where it exists, else fall back to horribly
18753        # complicated shell code.
18754        if test "x$READLINK_TESTED" != yes; then
18755            # On MacOSX there is a readlink tool with a different
18756            # purpose than the GNU readlink tool. Check the found readlink.
18757            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18758            if test "x$ISGNU" = x; then
18759                 # A readlink that we do not know how to use.
18760                 # Are there other non-GNU readlinks out there?
18761                 READLINK_TESTED=yes
18762                 READLINK=
18763            fi
18764        fi
18765
18766        if test "x$READLINK" != x; then
18767            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18768        else
18769            # Save the current directory for restoring afterwards
18770            STARTDIR=$PWD
18771            COUNTER=0
18772            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18773            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18774            # Use the system pwd and not the shell builtin to resolve directory symlinks
18775            cd $sym_link_dir
18776            cd `$THEPWDCMD`
18777            sym_link_dir=`$THEPWDCMD`
18778            # Resolve file symlinks
18779            while test $COUNTER -lt 20; do
18780                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18781                if test "x$ISLINK" == x; then
18782                    # This is not a symbolic link! We are done!
18783                    break
18784                fi
18785                # Again resolve directory symlinks since the target of the just found
18786                # link could be in a different directory
18787                cd `$DIRNAME $ISLINK`
18788                sym_link_dir=`$THEPWDCMD`
18789                sym_link_file=`$BASENAME $ISLINK`
18790                let COUNTER=COUNTER+1
18791            done
18792            cd $STARTDIR
18793            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18794        fi
18795    fi
18796
18797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18798$as_echo "$PROPER_COMPILER_CC" >&6; }
18799    CC="$PROPER_COMPILER_CC"
18800  else
18801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18802$as_echo "no, keeping CC" >&6; }
18803    CC="$TEST_COMPILER"
18804  fi
18805
18806  COMPILER=$CC
18807  COMPILER_NAME=$COMPILER_NAME
18808
18809  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18810    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18811    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18812    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18813    if test $? -ne 0; then
18814      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18815
18816      { $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
18817$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18818      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18819$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18820      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18821    else
18822      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18823      COMPILER_VENDOR="Sun Studio"
18824    fi
18825  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18826    # First line typically looks something like:
18827    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18828    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18829    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18830    COMPILER_VENDOR="Microsoft CL.EXE"
18831    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18832    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18833      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18834        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18835      fi
18836    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18837      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18838        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18839      fi
18840    fi
18841  else
18842    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18843    # Check that this is likely to be GCC.
18844    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18845    if test $? -ne 0; then
18846      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18847$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18848      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18849$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18850      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18851    fi
18852
18853    # First line typically looks something like:
18854    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18855    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18856    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18857  fi
18858  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18859  CC_VERSION="$COMPILER_VERSION"
18860  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18861  CC_VENDOR="$COMPILER_VENDOR"
18862
18863  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18864$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18865
18866
18867# Now that we have resolved CC ourself, let autoconf have it's go at it
18868ac_ext=c
18869ac_cpp='$CPP $CPPFLAGS'
18870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18872ac_compiler_gnu=$ac_cv_c_compiler_gnu
18873if test -n "$ac_tool_prefix"; then
18874  for ac_prog in $CC
18875  do
18876    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18877set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18879$as_echo_n "checking for $ac_word... " >&6; }
18880if test "${ac_cv_prog_CC+set}" = set; then :
18881  $as_echo_n "(cached) " >&6
18882else
18883  if test -n "$CC"; then
18884  ac_cv_prog_CC="$CC" # Let the user override the test.
18885else
18886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18887for as_dir in $PATH
18888do
18889  IFS=$as_save_IFS
18890  test -z "$as_dir" && as_dir=.
18891    for ac_exec_ext in '' $ac_executable_extensions; do
18892  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18893    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18895    break 2
18896  fi
18897done
18898  done
18899IFS=$as_save_IFS
18900
18901fi
18902fi
18903CC=$ac_cv_prog_CC
18904if test -n "$CC"; then
18905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18906$as_echo "$CC" >&6; }
18907else
18908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18909$as_echo "no" >&6; }
18910fi
18911
18912
18913    test -n "$CC" && break
18914  done
18915fi
18916if test -z "$CC"; then
18917  ac_ct_CC=$CC
18918  for ac_prog in $CC
18919do
18920  # Extract the first word of "$ac_prog", so it can be a program name with args.
18921set dummy $ac_prog; ac_word=$2
18922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18923$as_echo_n "checking for $ac_word... " >&6; }
18924if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18925  $as_echo_n "(cached) " >&6
18926else
18927  if test -n "$ac_ct_CC"; then
18928  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18929else
18930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18931for as_dir in $PATH
18932do
18933  IFS=$as_save_IFS
18934  test -z "$as_dir" && as_dir=.
18935    for ac_exec_ext in '' $ac_executable_extensions; do
18936  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18937    ac_cv_prog_ac_ct_CC="$ac_prog"
18938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18939    break 2
18940  fi
18941done
18942  done
18943IFS=$as_save_IFS
18944
18945fi
18946fi
18947ac_ct_CC=$ac_cv_prog_ac_ct_CC
18948if test -n "$ac_ct_CC"; then
18949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18950$as_echo "$ac_ct_CC" >&6; }
18951else
18952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18953$as_echo "no" >&6; }
18954fi
18955
18956
18957  test -n "$ac_ct_CC" && break
18958done
18959
18960  if test "x$ac_ct_CC" = x; then
18961    CC=""
18962  else
18963    case $cross_compiling:$ac_tool_warned in
18964yes:)
18965{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18966$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18967ac_tool_warned=yes ;;
18968esac
18969    CC=$ac_ct_CC
18970  fi
18971fi
18972
18973
18974test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18976as_fn_error $? "no acceptable C compiler found in \$PATH
18977See \`config.log' for more details" "$LINENO" 5 ; }
18978
18979# Provide some information about the compiler.
18980$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18981set X $ac_compile
18982ac_compiler=$2
18983for ac_option in --version -v -V -qversion; do
18984  { { ac_try="$ac_compiler $ac_option >&5"
18985case "(($ac_try" in
18986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18987  *) ac_try_echo=$ac_try;;
18988esac
18989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18990$as_echo "$ac_try_echo"; } >&5
18991  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18992  ac_status=$?
18993  if test -s conftest.err; then
18994    sed '10a\
18995... rest of stderr output deleted ...
18996         10q' conftest.err >conftest.er1
18997    cat conftest.er1 >&5
18998  fi
18999  rm -f conftest.er1 conftest.err
19000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19001  test $ac_status = 0; }
19002done
19003
19004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19005/* end confdefs.h.  */
19006
19007int
19008main ()
19009{
19010
19011  ;
19012  return 0;
19013}
19014_ACEOF
19015ac_clean_files_save=$ac_clean_files
19016ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19017# Try to create an executable without -o first, disregard a.out.
19018# It will help us diagnose broken compilers, and finding out an intuition
19019# of exeext.
19020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19021$as_echo_n "checking whether the C compiler works... " >&6; }
19022ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19023
19024# The possible output files:
19025ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19026
19027ac_rmfiles=
19028for ac_file in $ac_files
19029do
19030  case $ac_file in
19031    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19032    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19033  esac
19034done
19035rm -f $ac_rmfiles
19036
19037if { { ac_try="$ac_link_default"
19038case "(($ac_try" in
19039  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19040  *) ac_try_echo=$ac_try;;
19041esac
19042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19043$as_echo "$ac_try_echo"; } >&5
19044  (eval "$ac_link_default") 2>&5
19045  ac_status=$?
19046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19047  test $ac_status = 0; }; then :
19048  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19049# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19050# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19051# so that the user can short-circuit this test for compilers unknown to
19052# Autoconf.
19053for ac_file in $ac_files ''
19054do
19055  test -f "$ac_file" || continue
19056  case $ac_file in
19057    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19058	;;
19059    [ab].out )
19060	# We found the default executable, but exeext='' is most
19061	# certainly right.
19062	break;;
19063    *.* )
19064	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19065	then :; else
19066	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19067	fi
19068	# We set ac_cv_exeext here because the later test for it is not
19069	# safe: cross compilers may not add the suffix if given an `-o'
19070	# argument, so we may need to know it at that point already.
19071	# Even if this section looks crufty: it has the advantage of
19072	# actually working.
19073	break;;
19074    * )
19075	break;;
19076  esac
19077done
19078test "$ac_cv_exeext" = no && ac_cv_exeext=
19079
19080else
19081  ac_file=''
19082fi
19083if test -z "$ac_file"; then :
19084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19085$as_echo "no" >&6; }
19086$as_echo "$as_me: failed program was:" >&5
19087sed 's/^/| /' conftest.$ac_ext >&5
19088
19089{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19091as_fn_error 77 "C compiler cannot create executables
19092See \`config.log' for more details" "$LINENO" 5 ; }
19093else
19094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19095$as_echo "yes" >&6; }
19096fi
19097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19098$as_echo_n "checking for C compiler default output file name... " >&6; }
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19100$as_echo "$ac_file" >&6; }
19101ac_exeext=$ac_cv_exeext
19102
19103rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19104ac_clean_files=$ac_clean_files_save
19105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19106$as_echo_n "checking for suffix of executables... " >&6; }
19107if { { ac_try="$ac_link"
19108case "(($ac_try" in
19109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19110  *) ac_try_echo=$ac_try;;
19111esac
19112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19113$as_echo "$ac_try_echo"; } >&5
19114  (eval "$ac_link") 2>&5
19115  ac_status=$?
19116  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19117  test $ac_status = 0; }; then :
19118  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19119# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19120# work properly (i.e., refer to `conftest.exe'), while it won't with
19121# `rm'.
19122for ac_file in conftest.exe conftest conftest.*; do
19123  test -f "$ac_file" || continue
19124  case $ac_file in
19125    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19126    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19127	  break;;
19128    * ) break;;
19129  esac
19130done
19131else
19132  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19134as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19135See \`config.log' for more details" "$LINENO" 5 ; }
19136fi
19137rm -f conftest conftest$ac_cv_exeext
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19139$as_echo "$ac_cv_exeext" >&6; }
19140
19141rm -f conftest.$ac_ext
19142EXEEXT=$ac_cv_exeext
19143ac_exeext=$EXEEXT
19144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19145/* end confdefs.h.  */
19146#include <stdio.h>
19147int
19148main ()
19149{
19150FILE *f = fopen ("conftest.out", "w");
19151 return ferror (f) || fclose (f) != 0;
19152
19153  ;
19154  return 0;
19155}
19156_ACEOF
19157ac_clean_files="$ac_clean_files conftest.out"
19158# Check that the compiler produces executables we can run.  If not, either
19159# the compiler is broken, or we cross compile.
19160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19161$as_echo_n "checking whether we are cross compiling... " >&6; }
19162if test "$cross_compiling" != yes; then
19163  { { ac_try="$ac_link"
19164case "(($ac_try" in
19165  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19166  *) ac_try_echo=$ac_try;;
19167esac
19168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19169$as_echo "$ac_try_echo"; } >&5
19170  (eval "$ac_link") 2>&5
19171  ac_status=$?
19172  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19173  test $ac_status = 0; }
19174  if { ac_try='./conftest$ac_cv_exeext'
19175  { { case "(($ac_try" in
19176  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19177  *) ac_try_echo=$ac_try;;
19178esac
19179eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19180$as_echo "$ac_try_echo"; } >&5
19181  (eval "$ac_try") 2>&5
19182  ac_status=$?
19183  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19184  test $ac_status = 0; }; }; then
19185    cross_compiling=no
19186  else
19187    if test "$cross_compiling" = maybe; then
19188	cross_compiling=yes
19189    else
19190	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19192as_fn_error $? "cannot run C compiled programs.
19193If you meant to cross compile, use \`--host'.
19194See \`config.log' for more details" "$LINENO" 5 ; }
19195    fi
19196  fi
19197fi
19198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19199$as_echo "$cross_compiling" >&6; }
19200
19201rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19202ac_clean_files=$ac_clean_files_save
19203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19204$as_echo_n "checking for suffix of object files... " >&6; }
19205if test "${ac_cv_objext+set}" = set; then :
19206  $as_echo_n "(cached) " >&6
19207else
19208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19209/* end confdefs.h.  */
19210
19211int
19212main ()
19213{
19214
19215  ;
19216  return 0;
19217}
19218_ACEOF
19219rm -f conftest.o conftest.obj
19220if { { ac_try="$ac_compile"
19221case "(($ac_try" in
19222  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19223  *) ac_try_echo=$ac_try;;
19224esac
19225eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19226$as_echo "$ac_try_echo"; } >&5
19227  (eval "$ac_compile") 2>&5
19228  ac_status=$?
19229  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19230  test $ac_status = 0; }; then :
19231  for ac_file in conftest.o conftest.obj conftest.*; do
19232  test -f "$ac_file" || continue;
19233  case $ac_file in
19234    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19235    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19236       break;;
19237  esac
19238done
19239else
19240  $as_echo "$as_me: failed program was:" >&5
19241sed 's/^/| /' conftest.$ac_ext >&5
19242
19243{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19245as_fn_error $? "cannot compute suffix of object files: cannot compile
19246See \`config.log' for more details" "$LINENO" 5 ; }
19247fi
19248rm -f conftest.$ac_cv_objext conftest.$ac_ext
19249fi
19250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19251$as_echo "$ac_cv_objext" >&6; }
19252OBJEXT=$ac_cv_objext
19253ac_objext=$OBJEXT
19254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19255$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19256if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19257  $as_echo_n "(cached) " >&6
19258else
19259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19260/* end confdefs.h.  */
19261
19262int
19263main ()
19264{
19265#ifndef __GNUC__
19266       choke me
19267#endif
19268
19269  ;
19270  return 0;
19271}
19272_ACEOF
19273if ac_fn_c_try_compile "$LINENO"; then :
19274  ac_compiler_gnu=yes
19275else
19276  ac_compiler_gnu=no
19277fi
19278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19279ac_cv_c_compiler_gnu=$ac_compiler_gnu
19280
19281fi
19282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19283$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19284if test $ac_compiler_gnu = yes; then
19285  GCC=yes
19286else
19287  GCC=
19288fi
19289ac_test_CFLAGS=${CFLAGS+set}
19290ac_save_CFLAGS=$CFLAGS
19291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19292$as_echo_n "checking whether $CC accepts -g... " >&6; }
19293if test "${ac_cv_prog_cc_g+set}" = set; then :
19294  $as_echo_n "(cached) " >&6
19295else
19296  ac_save_c_werror_flag=$ac_c_werror_flag
19297   ac_c_werror_flag=yes
19298   ac_cv_prog_cc_g=no
19299   CFLAGS="-g"
19300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19301/* end confdefs.h.  */
19302
19303int
19304main ()
19305{
19306
19307  ;
19308  return 0;
19309}
19310_ACEOF
19311if ac_fn_c_try_compile "$LINENO"; then :
19312  ac_cv_prog_cc_g=yes
19313else
19314  CFLAGS=""
19315      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19316/* end confdefs.h.  */
19317
19318int
19319main ()
19320{
19321
19322  ;
19323  return 0;
19324}
19325_ACEOF
19326if ac_fn_c_try_compile "$LINENO"; then :
19327
19328else
19329  ac_c_werror_flag=$ac_save_c_werror_flag
19330	 CFLAGS="-g"
19331	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19332/* end confdefs.h.  */
19333
19334int
19335main ()
19336{
19337
19338  ;
19339  return 0;
19340}
19341_ACEOF
19342if ac_fn_c_try_compile "$LINENO"; then :
19343  ac_cv_prog_cc_g=yes
19344fi
19345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19346fi
19347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19348fi
19349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19350   ac_c_werror_flag=$ac_save_c_werror_flag
19351fi
19352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19353$as_echo "$ac_cv_prog_cc_g" >&6; }
19354if test "$ac_test_CFLAGS" = set; then
19355  CFLAGS=$ac_save_CFLAGS
19356elif test $ac_cv_prog_cc_g = yes; then
19357  if test "$GCC" = yes; then
19358    CFLAGS="-g -O2"
19359  else
19360    CFLAGS="-g"
19361  fi
19362else
19363  if test "$GCC" = yes; then
19364    CFLAGS="-O2"
19365  else
19366    CFLAGS=
19367  fi
19368fi
19369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19370$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19371if test "${ac_cv_prog_cc_c89+set}" = set; then :
19372  $as_echo_n "(cached) " >&6
19373else
19374  ac_cv_prog_cc_c89=no
19375ac_save_CC=$CC
19376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19377/* end confdefs.h.  */
19378#include <stdarg.h>
19379#include <stdio.h>
19380#include <sys/types.h>
19381#include <sys/stat.h>
19382/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19383struct buf { int x; };
19384FILE * (*rcsopen) (struct buf *, struct stat *, int);
19385static char *e (p, i)
19386     char **p;
19387     int i;
19388{
19389  return p[i];
19390}
19391static char *f (char * (*g) (char **, int), char **p, ...)
19392{
19393  char *s;
19394  va_list v;
19395  va_start (v,p);
19396  s = g (p, va_arg (v,int));
19397  va_end (v);
19398  return s;
19399}
19400
19401/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19402   function prototypes and stuff, but not '\xHH' hex character constants.
19403   These don't provoke an error unfortunately, instead are silently treated
19404   as 'x'.  The following induces an error, until -std is added to get
19405   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19406   array size at least.  It's necessary to write '\x00'==0 to get something
19407   that's true only with -std.  */
19408int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19409
19410/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19411   inside strings and character constants.  */
19412#define FOO(x) 'x'
19413int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19414
19415int test (int i, double x);
19416struct s1 {int (*f) (int a);};
19417struct s2 {int (*f) (double a);};
19418int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19419int argc;
19420char **argv;
19421int
19422main ()
19423{
19424return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19425  ;
19426  return 0;
19427}
19428_ACEOF
19429for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19430	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19431do
19432  CC="$ac_save_CC $ac_arg"
19433  if ac_fn_c_try_compile "$LINENO"; then :
19434  ac_cv_prog_cc_c89=$ac_arg
19435fi
19436rm -f core conftest.err conftest.$ac_objext
19437  test "x$ac_cv_prog_cc_c89" != "xno" && break
19438done
19439rm -f conftest.$ac_ext
19440CC=$ac_save_CC
19441
19442fi
19443# AC_CACHE_VAL
19444case "x$ac_cv_prog_cc_c89" in
19445  x)
19446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19447$as_echo "none needed" >&6; } ;;
19448  xno)
19449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19450$as_echo "unsupported" >&6; } ;;
19451  *)
19452    CC="$CC $ac_cv_prog_cc_c89"
19453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19454$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19455esac
19456if test "x$ac_cv_prog_cc_c89" != xno; then :
19457
19458fi
19459
19460ac_ext=cpp
19461ac_cpp='$CXXCPP $CPPFLAGS'
19462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19465
19466
19467### Locate C++ compiler (CXX)
19468
19469if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19470  # Do not probe for CC on MacOSX.
19471  COMPILER_CHECK_LIST="cl g++"
19472else
19473  COMPILER_CHECK_LIST="cl CC g++"
19474fi
19475
19476  COMPILER_NAME=C++
19477
19478  CXX=
19479  # If TOOLS_DIR is set, check for all compiler names in there first
19480  # before checking the rest of the PATH.
19481  if test -n "$TOOLS_DIR"; then
19482    PATH_save="$PATH"
19483    PATH="$TOOLS_DIR"
19484    for ac_prog in $COMPILER_CHECK_LIST
19485do
19486  # Extract the first word of "$ac_prog", so it can be a program name with args.
19487set dummy $ac_prog; ac_word=$2
19488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19489$as_echo_n "checking for $ac_word... " >&6; }
19490if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19491  $as_echo_n "(cached) " >&6
19492else
19493  case $TOOLS_DIR_CXX in
19494  [\\/]* | ?:[\\/]*)
19495  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19496  ;;
19497  *)
19498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19499for as_dir in $PATH
19500do
19501  IFS=$as_save_IFS
19502  test -z "$as_dir" && as_dir=.
19503    for ac_exec_ext in '' $ac_executable_extensions; do
19504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19505    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19507    break 2
19508  fi
19509done
19510  done
19511IFS=$as_save_IFS
19512
19513  ;;
19514esac
19515fi
19516TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19517if test -n "$TOOLS_DIR_CXX"; then
19518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19519$as_echo "$TOOLS_DIR_CXX" >&6; }
19520else
19521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19522$as_echo "no" >&6; }
19523fi
19524
19525
19526  test -n "$TOOLS_DIR_CXX" && break
19527done
19528
19529    CXX=$TOOLS_DIR_CXX
19530    PATH="$PATH_save"
19531  fi
19532
19533  # AC_PATH_PROGS can't be run multiple times with the same variable,
19534  # so create a new name for this run.
19535  if test "x$CXX" = x; then
19536    for ac_prog in $COMPILER_CHECK_LIST
19537do
19538  # Extract the first word of "$ac_prog", so it can be a program name with args.
19539set dummy $ac_prog; ac_word=$2
19540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19541$as_echo_n "checking for $ac_word... " >&6; }
19542if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19543  $as_echo_n "(cached) " >&6
19544else
19545  case $POTENTIAL_CXX in
19546  [\\/]* | ?:[\\/]*)
19547  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19548  ;;
19549  *)
19550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19551for as_dir in $PATH
19552do
19553  IFS=$as_save_IFS
19554  test -z "$as_dir" && as_dir=.
19555    for ac_exec_ext in '' $ac_executable_extensions; do
19556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19557    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19559    break 2
19560  fi
19561done
19562  done
19563IFS=$as_save_IFS
19564
19565  ;;
19566esac
19567fi
19568POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19569if test -n "$POTENTIAL_CXX"; then
19570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19571$as_echo "$POTENTIAL_CXX" >&6; }
19572else
19573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19574$as_echo "no" >&6; }
19575fi
19576
19577
19578  test -n "$POTENTIAL_CXX" && break
19579done
19580
19581    CXX=$POTENTIAL_CXX
19582  fi
19583
19584  if test "x$CXX" = x; then
19585
19586    # Print a helpful message on how to acquire the necessary build dependency.
19587    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19588    MISSING_DEPENDENCY=devkit
19589    PKGHANDLER_COMMAND=
19590
19591    case $PKGHANDLER in
19592	apt-get)
19593                apt_help     $MISSING_DEPENDENCY ;;
19594    yum)
19595                yum_help     $MISSING_DEPENDENCY ;;
19596	port)
19597                port_help    $MISSING_DEPENDENCY ;;
19598	pkgutil)
19599                pkgutil_help $MISSING_DEPENDENCY ;;
19600	pkgadd)
19601                pkgadd_help  $MISSING_DEPENDENCY ;;
19602    * )
19603      break ;;
19604    esac
19605
19606    if test "x$PKGHANDLER_COMMAND" != x; then
19607        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19608    fi
19609
19610      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19611  fi
19612
19613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19614
19615  # First separate the path from the arguments. This will split at the first
19616  # space.
19617  complete="$CXX"
19618  path="${complete%% *}"
19619  tmp="$complete EOL"
19620  arguments="${tmp#* }"
19621
19622  # Input might be given as Windows format, start by converting to
19623  # unix format.
19624  new_path=`$CYGPATH -u "$path"`
19625
19626  # Now try to locate executable using which
19627  new_path=`$WHICH "$new_path" 2> /dev/null`
19628  # bat and cmd files are not always considered executable in cygwin causing which
19629  # to not find them
19630  if test "x$new_path" = x \
19631           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19632           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19633    new_path=`$CYGPATH -u "$path"`
19634  fi
19635  if test "x$new_path" = x; then
19636    # Oops. Which didn't find the executable.
19637    # The splitting of arguments from the executable at a space might have been incorrect,
19638    # since paths with space are more likely in Windows. Give it another try with the whole
19639    # argument.
19640    path="$complete"
19641    arguments="EOL"
19642    new_path=`$CYGPATH -u "$path"`
19643    new_path=`$WHICH "$new_path" 2> /dev/null`
19644    # bat and cmd files are not always considered executable in cygwin causing which
19645    # to not find them
19646    if test "x$new_path" = x \
19647             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19648             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19649      new_path=`$CYGPATH -u "$path"`
19650    fi
19651    if test "x$new_path" = x; then
19652      # It's still not found. Now this is an unrecoverable error.
19653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19654$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19655      has_space=`$ECHO "$complete" | $GREP " "`
19656      if test "x$has_space" != x; then
19657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19659      fi
19660      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19661    fi
19662  fi
19663
19664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19667  # "foo.exe" is OK but "foo" is an error.
19668  #
19669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19670  # It is also a way to make sure we got the proper file name for the real test later on.
19671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19672  if test "x$test_shortpath" = x; then
19673    # Short path failed, file does not exist as specified.
19674    # Try adding .exe or .cmd
19675    if test -f "${new_path}.exe"; then
19676       input_to_shortpath="${new_path}.exe"
19677    elif test -f "${new_path}.cmd"; then
19678       input_to_shortpath="${new_path}.cmd"
19679    else
19680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19681$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19684      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19685    fi
19686  else
19687    input_to_shortpath="$new_path"
19688  fi
19689
19690  # Call helper function which possibly converts this using DOS-style short mode.
19691  # If so, the updated path is stored in $new_path.
19692  new_path="$input_to_shortpath"
19693
19694  input_path="$input_to_shortpath"
19695  # Check if we need to convert this using DOS-style short mode. If the path
19696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19697  # take no chances and rewrite it.
19698  # Note: m4 eats our [], so we need to use [ and ] instead.
19699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19700  if test "x$has_forbidden_chars" != x; then
19701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19705      # Going to short mode and back again did indeed matter. Since short mode is
19706      # case insensitive, let's make it lowercase to improve readability.
19707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19708      # Now convert it back to Unix-stile (cygpath)
19709      input_path=`$CYGPATH -u "$shortmode_path"`
19710      new_path="$input_path"
19711    fi
19712  fi
19713
19714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19715  if test "x$test_cygdrive_prefix" = x; then
19716    # As a simple fix, exclude /usr/bin since it's not a real path.
19717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19719      # a path prefixed by /cygdrive for fixpath to work.
19720      new_path="$CYGWIN_ROOT_PATH$input_path"
19721    fi
19722  fi
19723
19724  # remove trailing .exe if any
19725  new_path="${new_path/%.exe/}"
19726
19727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728
19729  # First separate the path from the arguments. This will split at the first
19730  # space.
19731  complete="$CXX"
19732  path="${complete%% *}"
19733  tmp="$complete EOL"
19734  arguments="${tmp#* }"
19735
19736  # Input might be given as Windows format, start by converting to
19737  # unix format.
19738  new_path="$path"
19739
19740  windows_path="$new_path"
19741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19742    unix_path=`$CYGPATH -u "$windows_path"`
19743    new_path="$unix_path"
19744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19746    new_path="$unix_path"
19747  fi
19748
19749
19750  # Now try to locate executable using which
19751  new_path=`$WHICH "$new_path" 2> /dev/null`
19752
19753  if test "x$new_path" = x; then
19754    # Oops. Which didn't find the executable.
19755    # The splitting of arguments from the executable at a space might have been incorrect,
19756    # since paths with space are more likely in Windows. Give it another try with the whole
19757    # argument.
19758    path="$complete"
19759    arguments="EOL"
19760    new_path="$path"
19761
19762  windows_path="$new_path"
19763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19764    unix_path=`$CYGPATH -u "$windows_path"`
19765    new_path="$unix_path"
19766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19768    new_path="$unix_path"
19769  fi
19770
19771
19772    new_path=`$WHICH "$new_path" 2> /dev/null`
19773
19774    if test "x$new_path" = x; then
19775      # It's still not found. Now this is an unrecoverable error.
19776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19777$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19778      has_space=`$ECHO "$complete" | $GREP " "`
19779      if test "x$has_space" != x; then
19780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19782      fi
19783      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19784    fi
19785  fi
19786
19787  # Now new_path has a complete unix path to the binary
19788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19789    # Keep paths in /bin as-is, but remove trailing .exe if any
19790    new_path="${new_path/%.exe/}"
19791    # Do not save /bin paths to all_fixpath_prefixes!
19792  else
19793    # Not in mixed or Windows style, start by that.
19794    new_path=`cmd //c echo $new_path`
19795
19796  input_path="$new_path"
19797  # Check if we need to convert this using DOS-style short mode. If the path
19798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19799  # take no chances and rewrite it.
19800  # Note: m4 eats our [], so we need to use [ and ] instead.
19801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19802  if test "x$has_forbidden_chars" != x; then
19803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19805  fi
19806
19807    # Output is in $new_path
19808
19809  windows_path="$new_path"
19810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19811    unix_path=`$CYGPATH -u "$windows_path"`
19812    new_path="$unix_path"
19813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19815    new_path="$unix_path"
19816  fi
19817
19818    # remove trailing .exe if any
19819    new_path="${new_path/%.exe/}"
19820
19821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19823  fi
19824
19825  else
19826    # We're on a posix platform. Hooray! :)
19827    # First separate the path from the arguments. This will split at the first
19828    # space.
19829    complete="$CXX"
19830    path="${complete%% *}"
19831    tmp="$complete EOL"
19832    arguments="${tmp#* }"
19833
19834    # Cannot rely on the command "which" here since it doesn't always work.
19835    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19836    if test -z "$is_absolute_path"; then
19837      # Path to executable is not absolute. Find it.
19838      IFS_save="$IFS"
19839      IFS=:
19840      for p in $PATH; do
19841        if test -f "$p/$path" && test -x "$p/$path"; then
19842          new_path="$p/$path"
19843          break
19844        fi
19845      done
19846      IFS="$IFS_save"
19847    else
19848      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
19849$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
19850      new_path="$path"
19851    fi
19852
19853    if test "x$new_path" = x; then
19854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19855$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19856        has_space=`$ECHO "$complete" | $GREP " "`
19857        if test "x$has_space" != x; then
19858          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19859$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19860        fi
19861        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19862      fi
19863  fi
19864
19865      # Now join together the path and the arguments once again
19866      if test "x$arguments" != xEOL; then
19867        new_complete="$new_path ${arguments% *}"
19868      else
19869        new_complete="$new_path"
19870      fi
19871
19872  if test "x$complete" != "x$new_complete"; then
19873      CXX="$new_complete"
19874      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19875$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19876    fi
19877
19878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19879$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19880  TEST_COMPILER="$CXX"
19881
19882    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19883        # Follow a chain of symbolic links. Use readlink
19884        # where it exists, else fall back to horribly
19885        # complicated shell code.
19886        if test "x$READLINK_TESTED" != yes; then
19887            # On MacOSX there is a readlink tool with a different
19888            # purpose than the GNU readlink tool. Check the found readlink.
19889            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19890            if test "x$ISGNU" = x; then
19891                 # A readlink that we do not know how to use.
19892                 # Are there other non-GNU readlinks out there?
19893                 READLINK_TESTED=yes
19894                 READLINK=
19895            fi
19896        fi
19897
19898        if test "x$READLINK" != x; then
19899            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19900        else
19901            # Save the current directory for restoring afterwards
19902            STARTDIR=$PWD
19903            COUNTER=0
19904            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19905            sym_link_file=`$BASENAME $TEST_COMPILER`
19906            # Use the system pwd and not the shell builtin to resolve directory symlinks
19907            cd $sym_link_dir
19908            cd `$THEPWDCMD`
19909            sym_link_dir=`$THEPWDCMD`
19910            # Resolve file symlinks
19911            while test $COUNTER -lt 20; do
19912                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19913                if test "x$ISLINK" == x; then
19914                    # This is not a symbolic link! We are done!
19915                    break
19916                fi
19917                # Again resolve directory symlinks since the target of the just found
19918                # link could be in a different directory
19919                cd `$DIRNAME $ISLINK`
19920                sym_link_dir=`$THEPWDCMD`
19921                sym_link_file=`$BASENAME $ISLINK`
19922                let COUNTER=COUNTER+1
19923            done
19924            cd $STARTDIR
19925            TEST_COMPILER=$sym_link_dir/$sym_link_file
19926        fi
19927    fi
19928
19929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19930$as_echo "$TEST_COMPILER" >&6; }
19931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19932$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19933
19934  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19935  if test "x$COMPILER_BASENAME" = "xccache"; then
19936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19937$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19938    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19939    # We want to control ccache invocation ourselves, so ignore this cc and try
19940    # searching again.
19941
19942    # Remove the path to the fake ccache cc from the PATH
19943    RETRY_COMPILER_SAVED_PATH="$PATH"
19944    COMPILER_DIRNAME=`$DIRNAME $CXX`
19945    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19946
19947    # Try again looking for our compiler
19948    if test -n "$ac_tool_prefix"; then
19949  for ac_prog in $COMPILER_CHECK_LIST
19950  do
19951    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19952set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19954$as_echo_n "checking for $ac_word... " >&6; }
19955if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19956  $as_echo_n "(cached) " >&6
19957else
19958  if test -n "$PROPER_COMPILER_CXX"; then
19959  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19960else
19961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19962for as_dir in $PATH
19963do
19964  IFS=$as_save_IFS
19965  test -z "$as_dir" && as_dir=.
19966    for ac_exec_ext in '' $ac_executable_extensions; do
19967  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19968    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19970    break 2
19971  fi
19972done
19973  done
19974IFS=$as_save_IFS
19975
19976fi
19977fi
19978PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19979if test -n "$PROPER_COMPILER_CXX"; then
19980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19981$as_echo "$PROPER_COMPILER_CXX" >&6; }
19982else
19983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19984$as_echo "no" >&6; }
19985fi
19986
19987
19988    test -n "$PROPER_COMPILER_CXX" && break
19989  done
19990fi
19991if test -z "$PROPER_COMPILER_CXX"; then
19992  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19993  for ac_prog in $COMPILER_CHECK_LIST
19994do
19995  # Extract the first word of "$ac_prog", so it can be a program name with args.
19996set dummy $ac_prog; ac_word=$2
19997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19998$as_echo_n "checking for $ac_word... " >&6; }
19999if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20000  $as_echo_n "(cached) " >&6
20001else
20002  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20003  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20004else
20005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20006for as_dir in $PATH
20007do
20008  IFS=$as_save_IFS
20009  test -z "$as_dir" && as_dir=.
20010    for ac_exec_ext in '' $ac_executable_extensions; do
20011  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20012    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20014    break 2
20015  fi
20016done
20017  done
20018IFS=$as_save_IFS
20019
20020fi
20021fi
20022ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20023if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20025$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20026else
20027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20028$as_echo "no" >&6; }
20029fi
20030
20031
20032  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20033done
20034
20035  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20036    PROPER_COMPILER_CXX=""
20037  else
20038    case $cross_compiling:$ac_tool_warned in
20039yes:)
20040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20042ac_tool_warned=yes ;;
20043esac
20044    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20045  fi
20046fi
20047
20048
20049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20050
20051  # First separate the path from the arguments. This will split at the first
20052  # space.
20053  complete="$PROPER_COMPILER_CXX"
20054  path="${complete%% *}"
20055  tmp="$complete EOL"
20056  arguments="${tmp#* }"
20057
20058  # Input might be given as Windows format, start by converting to
20059  # unix format.
20060  new_path=`$CYGPATH -u "$path"`
20061
20062  # Now try to locate executable using which
20063  new_path=`$WHICH "$new_path" 2> /dev/null`
20064  # bat and cmd files are not always considered executable in cygwin causing which
20065  # to not find them
20066  if test "x$new_path" = x \
20067           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20068           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20069    new_path=`$CYGPATH -u "$path"`
20070  fi
20071  if test "x$new_path" = x; then
20072    # Oops. Which didn't find the executable.
20073    # The splitting of arguments from the executable at a space might have been incorrect,
20074    # since paths with space are more likely in Windows. Give it another try with the whole
20075    # argument.
20076    path="$complete"
20077    arguments="EOL"
20078    new_path=`$CYGPATH -u "$path"`
20079    new_path=`$WHICH "$new_path" 2> /dev/null`
20080    # bat and cmd files are not always considered executable in cygwin causing which
20081    # to not find them
20082    if test "x$new_path" = x \
20083             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20084             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20085      new_path=`$CYGPATH -u "$path"`
20086    fi
20087    if test "x$new_path" = x; then
20088      # It's still not found. Now this is an unrecoverable error.
20089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20090$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20091      has_space=`$ECHO "$complete" | $GREP " "`
20092      if test "x$has_space" != x; then
20093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20095      fi
20096      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20097    fi
20098  fi
20099
20100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20103  # "foo.exe" is OK but "foo" is an error.
20104  #
20105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20106  # It is also a way to make sure we got the proper file name for the real test later on.
20107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20108  if test "x$test_shortpath" = x; then
20109    # Short path failed, file does not exist as specified.
20110    # Try adding .exe or .cmd
20111    if test -f "${new_path}.exe"; then
20112       input_to_shortpath="${new_path}.exe"
20113    elif test -f "${new_path}.cmd"; then
20114       input_to_shortpath="${new_path}.cmd"
20115    else
20116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20117$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20118      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20119$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20120      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20121    fi
20122  else
20123    input_to_shortpath="$new_path"
20124  fi
20125
20126  # Call helper function which possibly converts this using DOS-style short mode.
20127  # If so, the updated path is stored in $new_path.
20128  new_path="$input_to_shortpath"
20129
20130  input_path="$input_to_shortpath"
20131  # Check if we need to convert this using DOS-style short mode. If the path
20132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20133  # take no chances and rewrite it.
20134  # Note: m4 eats our [], so we need to use [ and ] instead.
20135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20136  if test "x$has_forbidden_chars" != x; then
20137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20141      # Going to short mode and back again did indeed matter. Since short mode is
20142      # case insensitive, let's make it lowercase to improve readability.
20143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20144      # Now convert it back to Unix-stile (cygpath)
20145      input_path=`$CYGPATH -u "$shortmode_path"`
20146      new_path="$input_path"
20147    fi
20148  fi
20149
20150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20151  if test "x$test_cygdrive_prefix" = x; then
20152    # As a simple fix, exclude /usr/bin since it's not a real path.
20153    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20155      # a path prefixed by /cygdrive for fixpath to work.
20156      new_path="$CYGWIN_ROOT_PATH$input_path"
20157    fi
20158  fi
20159
20160  # remove trailing .exe if any
20161  new_path="${new_path/%.exe/}"
20162
20163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20164
20165  # First separate the path from the arguments. This will split at the first
20166  # space.
20167  complete="$PROPER_COMPILER_CXX"
20168  path="${complete%% *}"
20169  tmp="$complete EOL"
20170  arguments="${tmp#* }"
20171
20172  # Input might be given as Windows format, start by converting to
20173  # unix format.
20174  new_path="$path"
20175
20176  windows_path="$new_path"
20177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20178    unix_path=`$CYGPATH -u "$windows_path"`
20179    new_path="$unix_path"
20180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20182    new_path="$unix_path"
20183  fi
20184
20185
20186  # Now try to locate executable using which
20187  new_path=`$WHICH "$new_path" 2> /dev/null`
20188
20189  if test "x$new_path" = x; then
20190    # Oops. Which didn't find the executable.
20191    # The splitting of arguments from the executable at a space might have been incorrect,
20192    # since paths with space are more likely in Windows. Give it another try with the whole
20193    # argument.
20194    path="$complete"
20195    arguments="EOL"
20196    new_path="$path"
20197
20198  windows_path="$new_path"
20199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20200    unix_path=`$CYGPATH -u "$windows_path"`
20201    new_path="$unix_path"
20202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20204    new_path="$unix_path"
20205  fi
20206
20207
20208    new_path=`$WHICH "$new_path" 2> /dev/null`
20209
20210    if test "x$new_path" = x; then
20211      # It's still not found. Now this is an unrecoverable error.
20212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20213$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20214      has_space=`$ECHO "$complete" | $GREP " "`
20215      if test "x$has_space" != x; then
20216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20218      fi
20219      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20220    fi
20221  fi
20222
20223  # Now new_path has a complete unix path to the binary
20224  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20225    # Keep paths in /bin as-is, but remove trailing .exe if any
20226    new_path="${new_path/%.exe/}"
20227    # Do not save /bin paths to all_fixpath_prefixes!
20228  else
20229    # Not in mixed or Windows style, start by that.
20230    new_path=`cmd //c echo $new_path`
20231
20232  input_path="$new_path"
20233  # Check if we need to convert this using DOS-style short mode. If the path
20234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20235  # take no chances and rewrite it.
20236  # Note: m4 eats our [], so we need to use [ and ] instead.
20237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20238  if test "x$has_forbidden_chars" != x; then
20239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20241  fi
20242
20243    # Output is in $new_path
20244
20245  windows_path="$new_path"
20246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20247    unix_path=`$CYGPATH -u "$windows_path"`
20248    new_path="$unix_path"
20249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20251    new_path="$unix_path"
20252  fi
20253
20254    # remove trailing .exe if any
20255    new_path="${new_path/%.exe/}"
20256
20257    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20258    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20259  fi
20260
20261  else
20262    # We're on a posix platform. Hooray! :)
20263    # First separate the path from the arguments. This will split at the first
20264    # space.
20265    complete="$PROPER_COMPILER_CXX"
20266    path="${complete%% *}"
20267    tmp="$complete EOL"
20268    arguments="${tmp#* }"
20269
20270    # Cannot rely on the command "which" here since it doesn't always work.
20271    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20272    if test -z "$is_absolute_path"; then
20273      # Path to executable is not absolute. Find it.
20274      IFS_save="$IFS"
20275      IFS=:
20276      for p in $PATH; do
20277        if test -f "$p/$path" && test -x "$p/$path"; then
20278          new_path="$p/$path"
20279          break
20280        fi
20281      done
20282      IFS="$IFS_save"
20283    else
20284      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20285$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20286      new_path="$path"
20287    fi
20288
20289    if test "x$new_path" = x; then
20290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20291$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20292        has_space=`$ECHO "$complete" | $GREP " "`
20293        if test "x$has_space" != x; then
20294          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20296        fi
20297        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20298      fi
20299  fi
20300
20301      # Now join together the path and the arguments once again
20302      if test "x$arguments" != xEOL; then
20303        new_complete="$new_path ${arguments% *}"
20304      else
20305        new_complete="$new_path"
20306      fi
20307
20308  if test "x$complete" != "x$new_complete"; then
20309      PROPER_COMPILER_CXX="$new_complete"
20310      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20311$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20312    fi
20313
20314    PATH="$RETRY_COMPILER_SAVED_PATH"
20315
20316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20317$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20318
20319    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20320        # Follow a chain of symbolic links. Use readlink
20321        # where it exists, else fall back to horribly
20322        # complicated shell code.
20323        if test "x$READLINK_TESTED" != yes; then
20324            # On MacOSX there is a readlink tool with a different
20325            # purpose than the GNU readlink tool. Check the found readlink.
20326            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20327            if test "x$ISGNU" = x; then
20328                 # A readlink that we do not know how to use.
20329                 # Are there other non-GNU readlinks out there?
20330                 READLINK_TESTED=yes
20331                 READLINK=
20332            fi
20333        fi
20334
20335        if test "x$READLINK" != x; then
20336            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20337        else
20338            # Save the current directory for restoring afterwards
20339            STARTDIR=$PWD
20340            COUNTER=0
20341            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20342            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20343            # Use the system pwd and not the shell builtin to resolve directory symlinks
20344            cd $sym_link_dir
20345            cd `$THEPWDCMD`
20346            sym_link_dir=`$THEPWDCMD`
20347            # Resolve file symlinks
20348            while test $COUNTER -lt 20; do
20349                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20350                if test "x$ISLINK" == x; then
20351                    # This is not a symbolic link! We are done!
20352                    break
20353                fi
20354                # Again resolve directory symlinks since the target of the just found
20355                # link could be in a different directory
20356                cd `$DIRNAME $ISLINK`
20357                sym_link_dir=`$THEPWDCMD`
20358                sym_link_file=`$BASENAME $ISLINK`
20359                let COUNTER=COUNTER+1
20360            done
20361            cd $STARTDIR
20362            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20363        fi
20364    fi
20365
20366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20367$as_echo "$PROPER_COMPILER_CXX" >&6; }
20368    CXX="$PROPER_COMPILER_CXX"
20369  else
20370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20371$as_echo "no, keeping CXX" >&6; }
20372    CXX="$TEST_COMPILER"
20373  fi
20374
20375  COMPILER=$CXX
20376  COMPILER_NAME=$COMPILER_NAME
20377
20378  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20379    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20380    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20381    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20382    if test $? -ne 0; then
20383      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20384
20385      { $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
20386$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20387      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20388$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20389      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20390    else
20391      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20392      COMPILER_VENDOR="Sun Studio"
20393    fi
20394  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20395    # First line typically looks something like:
20396    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20397    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20398    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20399    COMPILER_VENDOR="Microsoft CL.EXE"
20400    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20401    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20402      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20403        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20404      fi
20405    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20406      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20407        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20408      fi
20409    fi
20410  else
20411    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20412    # Check that this is likely to be GCC.
20413    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20414    if test $? -ne 0; then
20415      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20416$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20417      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20418$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20419      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20420    fi
20421
20422    # First line typically looks something like:
20423    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20424    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20425    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20426  fi
20427  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20428  CXX_VERSION="$COMPILER_VERSION"
20429  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20430  CXX_VENDOR="$COMPILER_VENDOR"
20431
20432  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20433$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20434
20435
20436# Now that we have resolved CXX ourself, let autoconf have it's go at it
20437ac_ext=cpp
20438ac_cpp='$CXXCPP $CPPFLAGS'
20439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20442if test -z "$CXX"; then
20443  if test -n "$CCC"; then
20444    CXX=$CCC
20445  else
20446    if test -n "$ac_tool_prefix"; then
20447  for ac_prog in $CXX
20448  do
20449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20452$as_echo_n "checking for $ac_word... " >&6; }
20453if test "${ac_cv_prog_CXX+set}" = set; then :
20454  $as_echo_n "(cached) " >&6
20455else
20456  if test -n "$CXX"; then
20457  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20458else
20459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20460for as_dir in $PATH
20461do
20462  IFS=$as_save_IFS
20463  test -z "$as_dir" && as_dir=.
20464    for ac_exec_ext in '' $ac_executable_extensions; do
20465  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20466    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20468    break 2
20469  fi
20470done
20471  done
20472IFS=$as_save_IFS
20473
20474fi
20475fi
20476CXX=$ac_cv_prog_CXX
20477if test -n "$CXX"; then
20478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20479$as_echo "$CXX" >&6; }
20480else
20481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20482$as_echo "no" >&6; }
20483fi
20484
20485
20486    test -n "$CXX" && break
20487  done
20488fi
20489if test -z "$CXX"; then
20490  ac_ct_CXX=$CXX
20491  for ac_prog in $CXX
20492do
20493  # Extract the first word of "$ac_prog", so it can be a program name with args.
20494set dummy $ac_prog; ac_word=$2
20495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20496$as_echo_n "checking for $ac_word... " >&6; }
20497if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20498  $as_echo_n "(cached) " >&6
20499else
20500  if test -n "$ac_ct_CXX"; then
20501  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20502else
20503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20504for as_dir in $PATH
20505do
20506  IFS=$as_save_IFS
20507  test -z "$as_dir" && as_dir=.
20508    for ac_exec_ext in '' $ac_executable_extensions; do
20509  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20510    ac_cv_prog_ac_ct_CXX="$ac_prog"
20511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20512    break 2
20513  fi
20514done
20515  done
20516IFS=$as_save_IFS
20517
20518fi
20519fi
20520ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20521if test -n "$ac_ct_CXX"; then
20522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20523$as_echo "$ac_ct_CXX" >&6; }
20524else
20525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20526$as_echo "no" >&6; }
20527fi
20528
20529
20530  test -n "$ac_ct_CXX" && break
20531done
20532
20533  if test "x$ac_ct_CXX" = x; then
20534    CXX="g++"
20535  else
20536    case $cross_compiling:$ac_tool_warned in
20537yes:)
20538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20540ac_tool_warned=yes ;;
20541esac
20542    CXX=$ac_ct_CXX
20543  fi
20544fi
20545
20546  fi
20547fi
20548# Provide some information about the compiler.
20549$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20550set X $ac_compile
20551ac_compiler=$2
20552for ac_option in --version -v -V -qversion; do
20553  { { ac_try="$ac_compiler $ac_option >&5"
20554case "(($ac_try" in
20555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556  *) ac_try_echo=$ac_try;;
20557esac
20558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20559$as_echo "$ac_try_echo"; } >&5
20560  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20561  ac_status=$?
20562  if test -s conftest.err; then
20563    sed '10a\
20564... rest of stderr output deleted ...
20565         10q' conftest.err >conftest.er1
20566    cat conftest.er1 >&5
20567  fi
20568  rm -f conftest.er1 conftest.err
20569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20570  test $ac_status = 0; }
20571done
20572
20573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20574$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20575if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20576  $as_echo_n "(cached) " >&6
20577else
20578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20579/* end confdefs.h.  */
20580
20581int
20582main ()
20583{
20584#ifndef __GNUC__
20585       choke me
20586#endif
20587
20588  ;
20589  return 0;
20590}
20591_ACEOF
20592if ac_fn_cxx_try_compile "$LINENO"; then :
20593  ac_compiler_gnu=yes
20594else
20595  ac_compiler_gnu=no
20596fi
20597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20598ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20599
20600fi
20601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20602$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20603if test $ac_compiler_gnu = yes; then
20604  GXX=yes
20605else
20606  GXX=
20607fi
20608ac_test_CXXFLAGS=${CXXFLAGS+set}
20609ac_save_CXXFLAGS=$CXXFLAGS
20610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20611$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20612if test "${ac_cv_prog_cxx_g+set}" = set; then :
20613  $as_echo_n "(cached) " >&6
20614else
20615  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20616   ac_cxx_werror_flag=yes
20617   ac_cv_prog_cxx_g=no
20618   CXXFLAGS="-g"
20619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20620/* end confdefs.h.  */
20621
20622int
20623main ()
20624{
20625
20626  ;
20627  return 0;
20628}
20629_ACEOF
20630if ac_fn_cxx_try_compile "$LINENO"; then :
20631  ac_cv_prog_cxx_g=yes
20632else
20633  CXXFLAGS=""
20634      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20635/* end confdefs.h.  */
20636
20637int
20638main ()
20639{
20640
20641  ;
20642  return 0;
20643}
20644_ACEOF
20645if ac_fn_cxx_try_compile "$LINENO"; then :
20646
20647else
20648  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20649	 CXXFLAGS="-g"
20650	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20651/* end confdefs.h.  */
20652
20653int
20654main ()
20655{
20656
20657  ;
20658  return 0;
20659}
20660_ACEOF
20661if ac_fn_cxx_try_compile "$LINENO"; then :
20662  ac_cv_prog_cxx_g=yes
20663fi
20664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20665fi
20666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20667fi
20668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20669   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20670fi
20671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20672$as_echo "$ac_cv_prog_cxx_g" >&6; }
20673if test "$ac_test_CXXFLAGS" = set; then
20674  CXXFLAGS=$ac_save_CXXFLAGS
20675elif test $ac_cv_prog_cxx_g = yes; then
20676  if test "$GXX" = yes; then
20677    CXXFLAGS="-g -O2"
20678  else
20679    CXXFLAGS="-g"
20680  fi
20681else
20682  if test "$GXX" = yes; then
20683    CXXFLAGS="-O2"
20684  else
20685    CXXFLAGS=
20686  fi
20687fi
20688ac_ext=cpp
20689ac_cpp='$CXXCPP $CPPFLAGS'
20690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20693
20694
20695### Locate other tools
20696
20697if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20698    ac_ext=m
20699ac_cpp='$OBJCPP $CPPFLAGS'
20700ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20701ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20702ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20703if test -n "$ac_tool_prefix"; then
20704  for ac_prog in gcc objcc objc cc CC
20705  do
20706    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20707set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20709$as_echo_n "checking for $ac_word... " >&6; }
20710if test "${ac_cv_prog_OBJC+set}" = set; then :
20711  $as_echo_n "(cached) " >&6
20712else
20713  if test -n "$OBJC"; then
20714  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20715else
20716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20717for as_dir in $PATH
20718do
20719  IFS=$as_save_IFS
20720  test -z "$as_dir" && as_dir=.
20721    for ac_exec_ext in '' $ac_executable_extensions; do
20722  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20723    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20725    break 2
20726  fi
20727done
20728  done
20729IFS=$as_save_IFS
20730
20731fi
20732fi
20733OBJC=$ac_cv_prog_OBJC
20734if test -n "$OBJC"; then
20735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20736$as_echo "$OBJC" >&6; }
20737else
20738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20739$as_echo "no" >&6; }
20740fi
20741
20742
20743    test -n "$OBJC" && break
20744  done
20745fi
20746if test -z "$OBJC"; then
20747  ac_ct_OBJC=$OBJC
20748  for ac_prog in gcc objcc objc cc CC
20749do
20750  # Extract the first word of "$ac_prog", so it can be a program name with args.
20751set dummy $ac_prog; ac_word=$2
20752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20753$as_echo_n "checking for $ac_word... " >&6; }
20754if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20755  $as_echo_n "(cached) " >&6
20756else
20757  if test -n "$ac_ct_OBJC"; then
20758  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20759else
20760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20761for as_dir in $PATH
20762do
20763  IFS=$as_save_IFS
20764  test -z "$as_dir" && as_dir=.
20765    for ac_exec_ext in '' $ac_executable_extensions; do
20766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20767    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20769    break 2
20770  fi
20771done
20772  done
20773IFS=$as_save_IFS
20774
20775fi
20776fi
20777ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20778if test -n "$ac_ct_OBJC"; then
20779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20780$as_echo "$ac_ct_OBJC" >&6; }
20781else
20782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20783$as_echo "no" >&6; }
20784fi
20785
20786
20787  test -n "$ac_ct_OBJC" && break
20788done
20789
20790  if test "x$ac_ct_OBJC" = x; then
20791    OBJC="gcc"
20792  else
20793    case $cross_compiling:$ac_tool_warned in
20794yes:)
20795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20797ac_tool_warned=yes ;;
20798esac
20799    OBJC=$ac_ct_OBJC
20800  fi
20801fi
20802
20803# Provide some information about the compiler.
20804$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20805set X $ac_compile
20806ac_compiler=$2
20807for ac_option in --version -v -V -qversion; do
20808  { { ac_try="$ac_compiler $ac_option >&5"
20809case "(($ac_try" in
20810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20811  *) ac_try_echo=$ac_try;;
20812esac
20813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20814$as_echo "$ac_try_echo"; } >&5
20815  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20816  ac_status=$?
20817  if test -s conftest.err; then
20818    sed '10a\
20819... rest of stderr output deleted ...
20820         10q' conftest.err >conftest.er1
20821    cat conftest.er1 >&5
20822  fi
20823  rm -f conftest.er1 conftest.err
20824  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20825  test $ac_status = 0; }
20826done
20827
20828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20829$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20830if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20831  $as_echo_n "(cached) " >&6
20832else
20833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20834/* end confdefs.h.  */
20835
20836int
20837main ()
20838{
20839#ifndef __GNUC__
20840       choke me
20841#endif
20842
20843  ;
20844  return 0;
20845}
20846_ACEOF
20847if ac_fn_objc_try_compile "$LINENO"; then :
20848  ac_compiler_gnu=yes
20849else
20850  ac_compiler_gnu=no
20851fi
20852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20853ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20854
20855fi
20856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20857$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20858if test $ac_compiler_gnu = yes; then
20859  GOBJC=yes
20860else
20861  GOBJC=
20862fi
20863ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20864ac_save_OBJCFLAGS=$OBJCFLAGS
20865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20866$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20867if test "${ac_cv_prog_objc_g+set}" = set; then :
20868  $as_echo_n "(cached) " >&6
20869else
20870  ac_save_objc_werror_flag=$ac_objc_werror_flag
20871   ac_objc_werror_flag=yes
20872   ac_cv_prog_objc_g=no
20873   OBJCFLAGS="-g"
20874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20875/* end confdefs.h.  */
20876
20877int
20878main ()
20879{
20880
20881  ;
20882  return 0;
20883}
20884_ACEOF
20885if ac_fn_objc_try_compile "$LINENO"; then :
20886  ac_cv_prog_objc_g=yes
20887else
20888  OBJCFLAGS=""
20889      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20890/* end confdefs.h.  */
20891
20892int
20893main ()
20894{
20895
20896  ;
20897  return 0;
20898}
20899_ACEOF
20900if ac_fn_objc_try_compile "$LINENO"; then :
20901
20902else
20903  ac_objc_werror_flag=$ac_save_objc_werror_flag
20904	 OBJCFLAGS="-g"
20905	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20906/* end confdefs.h.  */
20907
20908int
20909main ()
20910{
20911
20912  ;
20913  return 0;
20914}
20915_ACEOF
20916if ac_fn_objc_try_compile "$LINENO"; then :
20917  ac_cv_prog_objc_g=yes
20918fi
20919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20920fi
20921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20922fi
20923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20924   ac_objc_werror_flag=$ac_save_objc_werror_flag
20925fi
20926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20927$as_echo "$ac_cv_prog_objc_g" >&6; }
20928if test "$ac_test_OBJCFLAGS" = set; then
20929  OBJCFLAGS=$ac_save_OBJCFLAGS
20930elif test $ac_cv_prog_objc_g = yes; then
20931  if test "$GOBJC" = yes; then
20932    OBJCFLAGS="-g -O2"
20933  else
20934    OBJCFLAGS="-g"
20935  fi
20936else
20937  if test "$GOBJC" = yes; then
20938    OBJCFLAGS="-O2"
20939  else
20940    OBJCFLAGS=
20941  fi
20942fi
20943ac_ext=cpp
20944ac_cpp='$CXXCPP $CPPFLAGS'
20945ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20946ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20947ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20948
20949
20950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20951
20952  # First separate the path from the arguments. This will split at the first
20953  # space.
20954  complete="$OBJC"
20955  path="${complete%% *}"
20956  tmp="$complete EOL"
20957  arguments="${tmp#* }"
20958
20959  # Input might be given as Windows format, start by converting to
20960  # unix format.
20961  new_path=`$CYGPATH -u "$path"`
20962
20963  # Now try to locate executable using which
20964  new_path=`$WHICH "$new_path" 2> /dev/null`
20965  # bat and cmd files are not always considered executable in cygwin causing which
20966  # to not find them
20967  if test "x$new_path" = x \
20968           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20969           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20970    new_path=`$CYGPATH -u "$path"`
20971  fi
20972  if test "x$new_path" = x; then
20973    # Oops. Which didn't find the executable.
20974    # The splitting of arguments from the executable at a space might have been incorrect,
20975    # since paths with space are more likely in Windows. Give it another try with the whole
20976    # argument.
20977    path="$complete"
20978    arguments="EOL"
20979    new_path=`$CYGPATH -u "$path"`
20980    new_path=`$WHICH "$new_path" 2> /dev/null`
20981    # bat and cmd files are not always considered executable in cygwin causing which
20982    # to not find them
20983    if test "x$new_path" = x \
20984             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20985             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20986      new_path=`$CYGPATH -u "$path"`
20987    fi
20988    if test "x$new_path" = x; then
20989      # It's still not found. Now this is an unrecoverable error.
20990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20991$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20992      has_space=`$ECHO "$complete" | $GREP " "`
20993      if test "x$has_space" != x; then
20994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20996      fi
20997      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20998    fi
20999  fi
21000
21001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21004  # "foo.exe" is OK but "foo" is an error.
21005  #
21006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21007  # It is also a way to make sure we got the proper file name for the real test later on.
21008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21009  if test "x$test_shortpath" = x; then
21010    # Short path failed, file does not exist as specified.
21011    # Try adding .exe or .cmd
21012    if test -f "${new_path}.exe"; then
21013       input_to_shortpath="${new_path}.exe"
21014    elif test -f "${new_path}.cmd"; then
21015       input_to_shortpath="${new_path}.cmd"
21016    else
21017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21018$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21019      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21020$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21021      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21022    fi
21023  else
21024    input_to_shortpath="$new_path"
21025  fi
21026
21027  # Call helper function which possibly converts this using DOS-style short mode.
21028  # If so, the updated path is stored in $new_path.
21029  new_path="$input_to_shortpath"
21030
21031  input_path="$input_to_shortpath"
21032  # Check if we need to convert this using DOS-style short mode. If the path
21033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21034  # take no chances and rewrite it.
21035  # Note: m4 eats our [], so we need to use [ and ] instead.
21036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21037  if test "x$has_forbidden_chars" != x; then
21038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21042      # Going to short mode and back again did indeed matter. Since short mode is
21043      # case insensitive, let's make it lowercase to improve readability.
21044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21045      # Now convert it back to Unix-stile (cygpath)
21046      input_path=`$CYGPATH -u "$shortmode_path"`
21047      new_path="$input_path"
21048    fi
21049  fi
21050
21051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21052  if test "x$test_cygdrive_prefix" = x; then
21053    # As a simple fix, exclude /usr/bin since it's not a real path.
21054    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21056      # a path prefixed by /cygdrive for fixpath to work.
21057      new_path="$CYGWIN_ROOT_PATH$input_path"
21058    fi
21059  fi
21060
21061  # remove trailing .exe if any
21062  new_path="${new_path/%.exe/}"
21063
21064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21065
21066  # First separate the path from the arguments. This will split at the first
21067  # space.
21068  complete="$OBJC"
21069  path="${complete%% *}"
21070  tmp="$complete EOL"
21071  arguments="${tmp#* }"
21072
21073  # Input might be given as Windows format, start by converting to
21074  # unix format.
21075  new_path="$path"
21076
21077  windows_path="$new_path"
21078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21079    unix_path=`$CYGPATH -u "$windows_path"`
21080    new_path="$unix_path"
21081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21083    new_path="$unix_path"
21084  fi
21085
21086
21087  # Now try to locate executable using which
21088  new_path=`$WHICH "$new_path" 2> /dev/null`
21089
21090  if test "x$new_path" = x; then
21091    # Oops. Which didn't find the executable.
21092    # The splitting of arguments from the executable at a space might have been incorrect,
21093    # since paths with space are more likely in Windows. Give it another try with the whole
21094    # argument.
21095    path="$complete"
21096    arguments="EOL"
21097    new_path="$path"
21098
21099  windows_path="$new_path"
21100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21101    unix_path=`$CYGPATH -u "$windows_path"`
21102    new_path="$unix_path"
21103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21105    new_path="$unix_path"
21106  fi
21107
21108
21109    new_path=`$WHICH "$new_path" 2> /dev/null`
21110
21111    if test "x$new_path" = x; then
21112      # It's still not found. Now this is an unrecoverable error.
21113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21114$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21115      has_space=`$ECHO "$complete" | $GREP " "`
21116      if test "x$has_space" != x; then
21117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21119      fi
21120      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21121    fi
21122  fi
21123
21124  # Now new_path has a complete unix path to the binary
21125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21126    # Keep paths in /bin as-is, but remove trailing .exe if any
21127    new_path="${new_path/%.exe/}"
21128    # Do not save /bin paths to all_fixpath_prefixes!
21129  else
21130    # Not in mixed or Windows style, start by that.
21131    new_path=`cmd //c echo $new_path`
21132
21133  input_path="$new_path"
21134  # Check if we need to convert this using DOS-style short mode. If the path
21135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21136  # take no chances and rewrite it.
21137  # Note: m4 eats our [], so we need to use [ and ] instead.
21138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21139  if test "x$has_forbidden_chars" != x; then
21140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21142  fi
21143
21144    # Output is in $new_path
21145
21146  windows_path="$new_path"
21147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21148    unix_path=`$CYGPATH -u "$windows_path"`
21149    new_path="$unix_path"
21150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21152    new_path="$unix_path"
21153  fi
21154
21155    # remove trailing .exe if any
21156    new_path="${new_path/%.exe/}"
21157
21158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21160  fi
21161
21162  else
21163    # We're on a posix platform. Hooray! :)
21164    # First separate the path from the arguments. This will split at the first
21165    # space.
21166    complete="$OBJC"
21167    path="${complete%% *}"
21168    tmp="$complete EOL"
21169    arguments="${tmp#* }"
21170
21171    # Cannot rely on the command "which" here since it doesn't always work.
21172    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21173    if test -z "$is_absolute_path"; then
21174      # Path to executable is not absolute. Find it.
21175      IFS_save="$IFS"
21176      IFS=:
21177      for p in $PATH; do
21178        if test -f "$p/$path" && test -x "$p/$path"; then
21179          new_path="$p/$path"
21180          break
21181        fi
21182      done
21183      IFS="$IFS_save"
21184    else
21185      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21186$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21187      new_path="$path"
21188    fi
21189
21190    if test "x$new_path" = x; then
21191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21192$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21193        has_space=`$ECHO "$complete" | $GREP " "`
21194        if test "x$has_space" != x; then
21195          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21196$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21197        fi
21198        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21199      fi
21200  fi
21201
21202      # Now join together the path and the arguments once again
21203      if test "x$arguments" != xEOL; then
21204        new_complete="$new_path ${arguments% *}"
21205      else
21206        new_complete="$new_path"
21207      fi
21208
21209  if test "x$complete" != "x$new_complete"; then
21210      OBJC="$new_complete"
21211      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21212$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21213    fi
21214
21215else
21216    OBJC=
21217fi
21218
21219# Restore the flags to the user specified values.
21220# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21221CFLAGS="$ORG_CFLAGS"
21222CXXFLAGS="$ORG_CXXFLAGS"
21223OBJCFLAGS="$ORG_OBJCFLAGS"
21224
21225LD="$CC"
21226LDEXE="$CC"
21227LDCXX="$CXX"
21228LDEXECXX="$CXX"
21229
21230# LDEXE is the linker to use, when creating executables.
21231
21232# Linking C++ libraries.
21233
21234# Linking C++ executables.
21235
21236
21237if test "x$OPENJDK_TARGET_OS" != xwindows; then
21238    if test -n "$ac_tool_prefix"; then
21239  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21240set dummy ${ac_tool_prefix}ar; ac_word=$2
21241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21242$as_echo_n "checking for $ac_word... " >&6; }
21243if test "${ac_cv_prog_AR+set}" = set; then :
21244  $as_echo_n "(cached) " >&6
21245else
21246  if test -n "$AR"; then
21247  ac_cv_prog_AR="$AR" # Let the user override the test.
21248else
21249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21250for as_dir in $PATH
21251do
21252  IFS=$as_save_IFS
21253  test -z "$as_dir" && as_dir=.
21254    for ac_exec_ext in '' $ac_executable_extensions; do
21255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21256    ac_cv_prog_AR="${ac_tool_prefix}ar"
21257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21258    break 2
21259  fi
21260done
21261  done
21262IFS=$as_save_IFS
21263
21264fi
21265fi
21266AR=$ac_cv_prog_AR
21267if test -n "$AR"; then
21268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21269$as_echo "$AR" >&6; }
21270else
21271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21272$as_echo "no" >&6; }
21273fi
21274
21275
21276fi
21277if test -z "$ac_cv_prog_AR"; then
21278  ac_ct_AR=$AR
21279  # Extract the first word of "ar", so it can be a program name with args.
21280set dummy ar; ac_word=$2
21281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21282$as_echo_n "checking for $ac_word... " >&6; }
21283if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21284  $as_echo_n "(cached) " >&6
21285else
21286  if test -n "$ac_ct_AR"; then
21287  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21288else
21289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21290for as_dir in $PATH
21291do
21292  IFS=$as_save_IFS
21293  test -z "$as_dir" && as_dir=.
21294    for ac_exec_ext in '' $ac_executable_extensions; do
21295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21296    ac_cv_prog_ac_ct_AR="ar"
21297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21298    break 2
21299  fi
21300done
21301  done
21302IFS=$as_save_IFS
21303
21304fi
21305fi
21306ac_ct_AR=$ac_cv_prog_ac_ct_AR
21307if test -n "$ac_ct_AR"; then
21308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21309$as_echo "$ac_ct_AR" >&6; }
21310else
21311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21312$as_echo "no" >&6; }
21313fi
21314
21315  if test "x$ac_ct_AR" = x; then
21316    AR=""
21317  else
21318    case $cross_compiling:$ac_tool_warned in
21319yes:)
21320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21322ac_tool_warned=yes ;;
21323esac
21324    AR=$ac_ct_AR
21325  fi
21326else
21327  AR="$ac_cv_prog_AR"
21328fi
21329
21330
21331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21332
21333  # First separate the path from the arguments. This will split at the first
21334  # space.
21335  complete="$AR"
21336  path="${complete%% *}"
21337  tmp="$complete EOL"
21338  arguments="${tmp#* }"
21339
21340  # Input might be given as Windows format, start by converting to
21341  # unix format.
21342  new_path=`$CYGPATH -u "$path"`
21343
21344  # Now try to locate executable using which
21345  new_path=`$WHICH "$new_path" 2> /dev/null`
21346  # bat and cmd files are not always considered executable in cygwin causing which
21347  # to not find them
21348  if test "x$new_path" = x \
21349           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21350           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21351    new_path=`$CYGPATH -u "$path"`
21352  fi
21353  if test "x$new_path" = x; then
21354    # Oops. Which didn't find the executable.
21355    # The splitting of arguments from the executable at a space might have been incorrect,
21356    # since paths with space are more likely in Windows. Give it another try with the whole
21357    # argument.
21358    path="$complete"
21359    arguments="EOL"
21360    new_path=`$CYGPATH -u "$path"`
21361    new_path=`$WHICH "$new_path" 2> /dev/null`
21362    # bat and cmd files are not always considered executable in cygwin causing which
21363    # to not find them
21364    if test "x$new_path" = x \
21365             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21366             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21367      new_path=`$CYGPATH -u "$path"`
21368    fi
21369    if test "x$new_path" = x; then
21370      # It's still not found. Now this is an unrecoverable error.
21371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21372$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21373      has_space=`$ECHO "$complete" | $GREP " "`
21374      if test "x$has_space" != x; then
21375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21377      fi
21378      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21379    fi
21380  fi
21381
21382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21385  # "foo.exe" is OK but "foo" is an error.
21386  #
21387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21388  # It is also a way to make sure we got the proper file name for the real test later on.
21389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21390  if test "x$test_shortpath" = x; then
21391    # Short path failed, file does not exist as specified.
21392    # Try adding .exe or .cmd
21393    if test -f "${new_path}.exe"; then
21394       input_to_shortpath="${new_path}.exe"
21395    elif test -f "${new_path}.cmd"; then
21396       input_to_shortpath="${new_path}.cmd"
21397    else
21398      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21399$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21400      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21401$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21402      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21403    fi
21404  else
21405    input_to_shortpath="$new_path"
21406  fi
21407
21408  # Call helper function which possibly converts this using DOS-style short mode.
21409  # If so, the updated path is stored in $new_path.
21410  new_path="$input_to_shortpath"
21411
21412  input_path="$input_to_shortpath"
21413  # Check if we need to convert this using DOS-style short mode. If the path
21414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21415  # take no chances and rewrite it.
21416  # Note: m4 eats our [], so we need to use [ and ] instead.
21417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21418  if test "x$has_forbidden_chars" != x; then
21419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21423      # Going to short mode and back again did indeed matter. Since short mode is
21424      # case insensitive, let's make it lowercase to improve readability.
21425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21426      # Now convert it back to Unix-stile (cygpath)
21427      input_path=`$CYGPATH -u "$shortmode_path"`
21428      new_path="$input_path"
21429    fi
21430  fi
21431
21432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21433  if test "x$test_cygdrive_prefix" = x; then
21434    # As a simple fix, exclude /usr/bin since it's not a real path.
21435    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21437      # a path prefixed by /cygdrive for fixpath to work.
21438      new_path="$CYGWIN_ROOT_PATH$input_path"
21439    fi
21440  fi
21441
21442  # remove trailing .exe if any
21443  new_path="${new_path/%.exe/}"
21444
21445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21446
21447  # First separate the path from the arguments. This will split at the first
21448  # space.
21449  complete="$AR"
21450  path="${complete%% *}"
21451  tmp="$complete EOL"
21452  arguments="${tmp#* }"
21453
21454  # Input might be given as Windows format, start by converting to
21455  # unix format.
21456  new_path="$path"
21457
21458  windows_path="$new_path"
21459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21460    unix_path=`$CYGPATH -u "$windows_path"`
21461    new_path="$unix_path"
21462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21464    new_path="$unix_path"
21465  fi
21466
21467
21468  # Now try to locate executable using which
21469  new_path=`$WHICH "$new_path" 2> /dev/null`
21470
21471  if test "x$new_path" = x; then
21472    # Oops. Which didn't find the executable.
21473    # The splitting of arguments from the executable at a space might have been incorrect,
21474    # since paths with space are more likely in Windows. Give it another try with the whole
21475    # argument.
21476    path="$complete"
21477    arguments="EOL"
21478    new_path="$path"
21479
21480  windows_path="$new_path"
21481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21482    unix_path=`$CYGPATH -u "$windows_path"`
21483    new_path="$unix_path"
21484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21486    new_path="$unix_path"
21487  fi
21488
21489
21490    new_path=`$WHICH "$new_path" 2> /dev/null`
21491
21492    if test "x$new_path" = x; then
21493      # It's still not found. Now this is an unrecoverable error.
21494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21495$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21496      has_space=`$ECHO "$complete" | $GREP " "`
21497      if test "x$has_space" != x; then
21498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21500      fi
21501      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21502    fi
21503  fi
21504
21505  # Now new_path has a complete unix path to the binary
21506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21507    # Keep paths in /bin as-is, but remove trailing .exe if any
21508    new_path="${new_path/%.exe/}"
21509    # Do not save /bin paths to all_fixpath_prefixes!
21510  else
21511    # Not in mixed or Windows style, start by that.
21512    new_path=`cmd //c echo $new_path`
21513
21514  input_path="$new_path"
21515  # Check if we need to convert this using DOS-style short mode. If the path
21516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21517  # take no chances and rewrite it.
21518  # Note: m4 eats our [], so we need to use [ and ] instead.
21519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21520  if test "x$has_forbidden_chars" != x; then
21521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21523  fi
21524
21525    # Output is in $new_path
21526
21527  windows_path="$new_path"
21528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21529    unix_path=`$CYGPATH -u "$windows_path"`
21530    new_path="$unix_path"
21531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21533    new_path="$unix_path"
21534  fi
21535
21536    # remove trailing .exe if any
21537    new_path="${new_path/%.exe/}"
21538
21539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21541  fi
21542
21543  else
21544    # We're on a posix platform. Hooray! :)
21545    # First separate the path from the arguments. This will split at the first
21546    # space.
21547    complete="$AR"
21548    path="${complete%% *}"
21549    tmp="$complete EOL"
21550    arguments="${tmp#* }"
21551
21552    # Cannot rely on the command "which" here since it doesn't always work.
21553    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21554    if test -z "$is_absolute_path"; then
21555      # Path to executable is not absolute. Find it.
21556      IFS_save="$IFS"
21557      IFS=:
21558      for p in $PATH; do
21559        if test -f "$p/$path" && test -x "$p/$path"; then
21560          new_path="$p/$path"
21561          break
21562        fi
21563      done
21564      IFS="$IFS_save"
21565    else
21566      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21567$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21568      new_path="$path"
21569    fi
21570
21571    if test "x$new_path" = x; then
21572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21573$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21574        has_space=`$ECHO "$complete" | $GREP " "`
21575        if test "x$has_space" != x; then
21576          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21577$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21578        fi
21579        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21580      fi
21581  fi
21582
21583      # Now join together the path and the arguments once again
21584      if test "x$arguments" != xEOL; then
21585        new_complete="$new_path ${arguments% *}"
21586      else
21587        new_complete="$new_path"
21588      fi
21589
21590  if test "x$complete" != "x$new_complete"; then
21591      AR="$new_complete"
21592      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21593$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21594    fi
21595
21596fi
21597if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21598    ARFLAGS="-r"
21599else
21600    ARFLAGS=""
21601fi
21602
21603
21604# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21605HOTSPOT_CXX="$CXX"
21606HOTSPOT_LD="$LD"
21607
21608
21609
21610COMPILER_NAME=gcc
21611COMPILER_TYPE=CC
21612if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21613
21614    # For now, assume that we are always compiling using cl.exe.
21615    CC_OUT_OPTION=-Fo
21616    EXE_OUT_OPTION=-out:
21617    LD_OUT_OPTION=-out:
21618    AR_OUT_OPTION=-out:
21619    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21620    # program for something completely different.
21621    # Extract the first word of "link", so it can be a program name with args.
21622set dummy link; ac_word=$2
21623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21624$as_echo_n "checking for $ac_word... " >&6; }
21625if test "${ac_cv_prog_WINLD+set}" = set; then :
21626  $as_echo_n "(cached) " >&6
21627else
21628  if test -n "$WINLD"; then
21629  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21630else
21631  ac_prog_rejected=no
21632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21633for as_dir in $PATH
21634do
21635  IFS=$as_save_IFS
21636  test -z "$as_dir" && as_dir=.
21637    for ac_exec_ext in '' $ac_executable_extensions; do
21638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21639    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21640       ac_prog_rejected=yes
21641       continue
21642     fi
21643    ac_cv_prog_WINLD="link"
21644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21645    break 2
21646  fi
21647done
21648  done
21649IFS=$as_save_IFS
21650
21651if test $ac_prog_rejected = yes; then
21652  # We found a bogon in the path, so make sure we never use it.
21653  set dummy $ac_cv_prog_WINLD
21654  shift
21655  if test $# != 0; then
21656    # We chose a different compiler from the bogus one.
21657    # However, it has the same basename, so the bogon will be chosen
21658    # first if we set WINLD to just the basename; use the full file name.
21659    shift
21660    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21661  fi
21662fi
21663fi
21664fi
21665WINLD=$ac_cv_prog_WINLD
21666if test -n "$WINLD"; then
21667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21668$as_echo "$WINLD" >&6; }
21669else
21670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21671$as_echo "no" >&6; }
21672fi
21673
21674
21675    # Since we must ignore the first found link, WINLD will contain
21676    # the full path to the link.exe program.
21677
21678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21679
21680  # First separate the path from the arguments. This will split at the first
21681  # space.
21682  complete="$WINLD"
21683  path="${complete%% *}"
21684  tmp="$complete EOL"
21685  arguments="${tmp#* }"
21686
21687  # Input might be given as Windows format, start by converting to
21688  # unix format.
21689  new_path=`$CYGPATH -u "$path"`
21690
21691  # Now try to locate executable using which
21692  new_path=`$WHICH "$new_path" 2> /dev/null`
21693  # bat and cmd files are not always considered executable in cygwin causing which
21694  # to not find them
21695  if test "x$new_path" = x \
21696           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21697           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21698    new_path=`$CYGPATH -u "$path"`
21699  fi
21700  if test "x$new_path" = x; then
21701    # Oops. Which didn't find the executable.
21702    # The splitting of arguments from the executable at a space might have been incorrect,
21703    # since paths with space are more likely in Windows. Give it another try with the whole
21704    # argument.
21705    path="$complete"
21706    arguments="EOL"
21707    new_path=`$CYGPATH -u "$path"`
21708    new_path=`$WHICH "$new_path" 2> /dev/null`
21709    # bat and cmd files are not always considered executable in cygwin causing which
21710    # to not find them
21711    if test "x$new_path" = x \
21712             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21713             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21714      new_path=`$CYGPATH -u "$path"`
21715    fi
21716    if test "x$new_path" = x; then
21717      # It's still not found. Now this is an unrecoverable error.
21718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21719$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21720      has_space=`$ECHO "$complete" | $GREP " "`
21721      if test "x$has_space" != x; then
21722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21724      fi
21725      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21726    fi
21727  fi
21728
21729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21732  # "foo.exe" is OK but "foo" is an error.
21733  #
21734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21735  # It is also a way to make sure we got the proper file name for the real test later on.
21736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21737  if test "x$test_shortpath" = x; then
21738    # Short path failed, file does not exist as specified.
21739    # Try adding .exe or .cmd
21740    if test -f "${new_path}.exe"; then
21741       input_to_shortpath="${new_path}.exe"
21742    elif test -f "${new_path}.cmd"; then
21743       input_to_shortpath="${new_path}.cmd"
21744    else
21745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21746$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21749      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21750    fi
21751  else
21752    input_to_shortpath="$new_path"
21753  fi
21754
21755  # Call helper function which possibly converts this using DOS-style short mode.
21756  # If so, the updated path is stored in $new_path.
21757  new_path="$input_to_shortpath"
21758
21759  input_path="$input_to_shortpath"
21760  # Check if we need to convert this using DOS-style short mode. If the path
21761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21762  # take no chances and rewrite it.
21763  # Note: m4 eats our [], so we need to use [ and ] instead.
21764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21765  if test "x$has_forbidden_chars" != x; then
21766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21770      # Going to short mode and back again did indeed matter. Since short mode is
21771      # case insensitive, let's make it lowercase to improve readability.
21772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21773      # Now convert it back to Unix-stile (cygpath)
21774      input_path=`$CYGPATH -u "$shortmode_path"`
21775      new_path="$input_path"
21776    fi
21777  fi
21778
21779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21780  if test "x$test_cygdrive_prefix" = x; then
21781    # As a simple fix, exclude /usr/bin since it's not a real path.
21782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21784      # a path prefixed by /cygdrive for fixpath to work.
21785      new_path="$CYGWIN_ROOT_PATH$input_path"
21786    fi
21787  fi
21788
21789  # remove trailing .exe if any
21790  new_path="${new_path/%.exe/}"
21791
21792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21793
21794  # First separate the path from the arguments. This will split at the first
21795  # space.
21796  complete="$WINLD"
21797  path="${complete%% *}"
21798  tmp="$complete EOL"
21799  arguments="${tmp#* }"
21800
21801  # Input might be given as Windows format, start by converting to
21802  # unix format.
21803  new_path="$path"
21804
21805  windows_path="$new_path"
21806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21807    unix_path=`$CYGPATH -u "$windows_path"`
21808    new_path="$unix_path"
21809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21811    new_path="$unix_path"
21812  fi
21813
21814
21815  # Now try to locate executable using which
21816  new_path=`$WHICH "$new_path" 2> /dev/null`
21817
21818  if test "x$new_path" = x; then
21819    # Oops. Which didn't find the executable.
21820    # The splitting of arguments from the executable at a space might have been incorrect,
21821    # since paths with space are more likely in Windows. Give it another try with the whole
21822    # argument.
21823    path="$complete"
21824    arguments="EOL"
21825    new_path="$path"
21826
21827  windows_path="$new_path"
21828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21829    unix_path=`$CYGPATH -u "$windows_path"`
21830    new_path="$unix_path"
21831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21833    new_path="$unix_path"
21834  fi
21835
21836
21837    new_path=`$WHICH "$new_path" 2> /dev/null`
21838
21839    if test "x$new_path" = x; then
21840      # It's still not found. Now this is an unrecoverable error.
21841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21842$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21843      has_space=`$ECHO "$complete" | $GREP " "`
21844      if test "x$has_space" != x; then
21845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21847      fi
21848      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21849    fi
21850  fi
21851
21852  # Now new_path has a complete unix path to the binary
21853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21854    # Keep paths in /bin as-is, but remove trailing .exe if any
21855    new_path="${new_path/%.exe/}"
21856    # Do not save /bin paths to all_fixpath_prefixes!
21857  else
21858    # Not in mixed or Windows style, start by that.
21859    new_path=`cmd //c echo $new_path`
21860
21861  input_path="$new_path"
21862  # Check if we need to convert this using DOS-style short mode. If the path
21863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21864  # take no chances and rewrite it.
21865  # Note: m4 eats our [], so we need to use [ and ] instead.
21866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21867  if test "x$has_forbidden_chars" != x; then
21868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21870  fi
21871
21872    # Output is in $new_path
21873
21874  windows_path="$new_path"
21875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21876    unix_path=`$CYGPATH -u "$windows_path"`
21877    new_path="$unix_path"
21878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21880    new_path="$unix_path"
21881  fi
21882
21883    # remove trailing .exe if any
21884    new_path="${new_path/%.exe/}"
21885
21886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21888  fi
21889
21890  else
21891    # We're on a posix platform. Hooray! :)
21892    # First separate the path from the arguments. This will split at the first
21893    # space.
21894    complete="$WINLD"
21895    path="${complete%% *}"
21896    tmp="$complete EOL"
21897    arguments="${tmp#* }"
21898
21899    # Cannot rely on the command "which" here since it doesn't always work.
21900    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21901    if test -z "$is_absolute_path"; then
21902      # Path to executable is not absolute. Find it.
21903      IFS_save="$IFS"
21904      IFS=:
21905      for p in $PATH; do
21906        if test -f "$p/$path" && test -x "$p/$path"; then
21907          new_path="$p/$path"
21908          break
21909        fi
21910      done
21911      IFS="$IFS_save"
21912    else
21913      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
21914$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
21915      new_path="$path"
21916    fi
21917
21918    if test "x$new_path" = x; then
21919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21920$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21921        has_space=`$ECHO "$complete" | $GREP " "`
21922        if test "x$has_space" != x; then
21923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21925        fi
21926        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21927      fi
21928  fi
21929
21930      # Now join together the path and the arguments once again
21931      if test "x$arguments" != xEOL; then
21932        new_complete="$new_path ${arguments% *}"
21933      else
21934        new_complete="$new_path"
21935      fi
21936
21937  if test "x$complete" != "x$new_complete"; then
21938      WINLD="$new_complete"
21939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21940$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21941    fi
21942
21943    printf "Windows linker was found at $WINLD\n"
21944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21945$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21946    "$WINLD" --version > /dev/null
21947    if test $? -eq 0 ; then
21948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21949$as_echo "no" >&6; }
21950      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21951    else
21952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21953$as_echo "yes" >&6; }
21954    fi
21955    LD="$WINLD"
21956    LDEXE="$WINLD"
21957    LDCXX="$WINLD"
21958    LDEXECXX="$WINLD"
21959
21960    # Extract the first word of "mt", so it can be a program name with args.
21961set dummy mt; ac_word=$2
21962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21963$as_echo_n "checking for $ac_word... " >&6; }
21964if test "${ac_cv_prog_MT+set}" = set; then :
21965  $as_echo_n "(cached) " >&6
21966else
21967  if test -n "$MT"; then
21968  ac_cv_prog_MT="$MT" # Let the user override the test.
21969else
21970  ac_prog_rejected=no
21971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21972for as_dir in $PATH
21973do
21974  IFS=$as_save_IFS
21975  test -z "$as_dir" && as_dir=.
21976    for ac_exec_ext in '' $ac_executable_extensions; do
21977  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21978    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21979       ac_prog_rejected=yes
21980       continue
21981     fi
21982    ac_cv_prog_MT="mt"
21983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21984    break 2
21985  fi
21986done
21987  done
21988IFS=$as_save_IFS
21989
21990if test $ac_prog_rejected = yes; then
21991  # We found a bogon in the path, so make sure we never use it.
21992  set dummy $ac_cv_prog_MT
21993  shift
21994  if test $# != 0; then
21995    # We chose a different compiler from the bogus one.
21996    # However, it has the same basename, so the bogon will be chosen
21997    # first if we set MT to just the basename; use the full file name.
21998    shift
21999    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22000  fi
22001fi
22002fi
22003fi
22004MT=$ac_cv_prog_MT
22005if test -n "$MT"; then
22006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22007$as_echo "$MT" >&6; }
22008else
22009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22010$as_echo "no" >&6; }
22011fi
22012
22013
22014
22015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22016
22017  # First separate the path from the arguments. This will split at the first
22018  # space.
22019  complete="$MT"
22020  path="${complete%% *}"
22021  tmp="$complete EOL"
22022  arguments="${tmp#* }"
22023
22024  # Input might be given as Windows format, start by converting to
22025  # unix format.
22026  new_path=`$CYGPATH -u "$path"`
22027
22028  # Now try to locate executable using which
22029  new_path=`$WHICH "$new_path" 2> /dev/null`
22030  # bat and cmd files are not always considered executable in cygwin causing which
22031  # to not find them
22032  if test "x$new_path" = x \
22033           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22034           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22035    new_path=`$CYGPATH -u "$path"`
22036  fi
22037  if test "x$new_path" = x; then
22038    # Oops. Which didn't find the executable.
22039    # The splitting of arguments from the executable at a space might have been incorrect,
22040    # since paths with space are more likely in Windows. Give it another try with the whole
22041    # argument.
22042    path="$complete"
22043    arguments="EOL"
22044    new_path=`$CYGPATH -u "$path"`
22045    new_path=`$WHICH "$new_path" 2> /dev/null`
22046    # bat and cmd files are not always considered executable in cygwin causing which
22047    # to not find them
22048    if test "x$new_path" = x \
22049             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22050             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22051      new_path=`$CYGPATH -u "$path"`
22052    fi
22053    if test "x$new_path" = x; then
22054      # It's still not found. Now this is an unrecoverable error.
22055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22056$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22057      has_space=`$ECHO "$complete" | $GREP " "`
22058      if test "x$has_space" != x; then
22059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22061      fi
22062      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22063    fi
22064  fi
22065
22066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22069  # "foo.exe" is OK but "foo" is an error.
22070  #
22071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22072  # It is also a way to make sure we got the proper file name for the real test later on.
22073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22074  if test "x$test_shortpath" = x; then
22075    # Short path failed, file does not exist as specified.
22076    # Try adding .exe or .cmd
22077    if test -f "${new_path}.exe"; then
22078       input_to_shortpath="${new_path}.exe"
22079    elif test -f "${new_path}.cmd"; then
22080       input_to_shortpath="${new_path}.cmd"
22081    else
22082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22083$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22086      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22087    fi
22088  else
22089    input_to_shortpath="$new_path"
22090  fi
22091
22092  # Call helper function which possibly converts this using DOS-style short mode.
22093  # If so, the updated path is stored in $new_path.
22094  new_path="$input_to_shortpath"
22095
22096  input_path="$input_to_shortpath"
22097  # Check if we need to convert this using DOS-style short mode. If the path
22098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22099  # take no chances and rewrite it.
22100  # Note: m4 eats our [], so we need to use [ and ] instead.
22101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22102  if test "x$has_forbidden_chars" != x; then
22103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22107      # Going to short mode and back again did indeed matter. Since short mode is
22108      # case insensitive, let's make it lowercase to improve readability.
22109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22110      # Now convert it back to Unix-stile (cygpath)
22111      input_path=`$CYGPATH -u "$shortmode_path"`
22112      new_path="$input_path"
22113    fi
22114  fi
22115
22116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22117  if test "x$test_cygdrive_prefix" = x; then
22118    # As a simple fix, exclude /usr/bin since it's not a real path.
22119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22121      # a path prefixed by /cygdrive for fixpath to work.
22122      new_path="$CYGWIN_ROOT_PATH$input_path"
22123    fi
22124  fi
22125
22126  # remove trailing .exe if any
22127  new_path="${new_path/%.exe/}"
22128
22129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22130
22131  # First separate the path from the arguments. This will split at the first
22132  # space.
22133  complete="$MT"
22134  path="${complete%% *}"
22135  tmp="$complete EOL"
22136  arguments="${tmp#* }"
22137
22138  # Input might be given as Windows format, start by converting to
22139  # unix format.
22140  new_path="$path"
22141
22142  windows_path="$new_path"
22143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22144    unix_path=`$CYGPATH -u "$windows_path"`
22145    new_path="$unix_path"
22146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22148    new_path="$unix_path"
22149  fi
22150
22151
22152  # Now try to locate executable using which
22153  new_path=`$WHICH "$new_path" 2> /dev/null`
22154
22155  if test "x$new_path" = x; then
22156    # Oops. Which didn't find the executable.
22157    # The splitting of arguments from the executable at a space might have been incorrect,
22158    # since paths with space are more likely in Windows. Give it another try with the whole
22159    # argument.
22160    path="$complete"
22161    arguments="EOL"
22162    new_path="$path"
22163
22164  windows_path="$new_path"
22165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22166    unix_path=`$CYGPATH -u "$windows_path"`
22167    new_path="$unix_path"
22168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22170    new_path="$unix_path"
22171  fi
22172
22173
22174    new_path=`$WHICH "$new_path" 2> /dev/null`
22175
22176    if test "x$new_path" = x; then
22177      # It's still not found. Now this is an unrecoverable error.
22178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22179$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22180      has_space=`$ECHO "$complete" | $GREP " "`
22181      if test "x$has_space" != x; then
22182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22184      fi
22185      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22186    fi
22187  fi
22188
22189  # Now new_path has a complete unix path to the binary
22190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22191    # Keep paths in /bin as-is, but remove trailing .exe if any
22192    new_path="${new_path/%.exe/}"
22193    # Do not save /bin paths to all_fixpath_prefixes!
22194  else
22195    # Not in mixed or Windows style, start by that.
22196    new_path=`cmd //c echo $new_path`
22197
22198  input_path="$new_path"
22199  # Check if we need to convert this using DOS-style short mode. If the path
22200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22201  # take no chances and rewrite it.
22202  # Note: m4 eats our [], so we need to use [ and ] instead.
22203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22204  if test "x$has_forbidden_chars" != x; then
22205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22207  fi
22208
22209    # Output is in $new_path
22210
22211  windows_path="$new_path"
22212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22213    unix_path=`$CYGPATH -u "$windows_path"`
22214    new_path="$unix_path"
22215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22217    new_path="$unix_path"
22218  fi
22219
22220    # remove trailing .exe if any
22221    new_path="${new_path/%.exe/}"
22222
22223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22225  fi
22226
22227  else
22228    # We're on a posix platform. Hooray! :)
22229    # First separate the path from the arguments. This will split at the first
22230    # space.
22231    complete="$MT"
22232    path="${complete%% *}"
22233    tmp="$complete EOL"
22234    arguments="${tmp#* }"
22235
22236    # Cannot rely on the command "which" here since it doesn't always work.
22237    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22238    if test -z "$is_absolute_path"; then
22239      # Path to executable is not absolute. Find it.
22240      IFS_save="$IFS"
22241      IFS=:
22242      for p in $PATH; do
22243        if test -f "$p/$path" && test -x "$p/$path"; then
22244          new_path="$p/$path"
22245          break
22246        fi
22247      done
22248      IFS="$IFS_save"
22249    else
22250      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22251$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22252      new_path="$path"
22253    fi
22254
22255    if test "x$new_path" = x; then
22256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22257$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22258        has_space=`$ECHO "$complete" | $GREP " "`
22259        if test "x$has_space" != x; then
22260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22262        fi
22263        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22264      fi
22265  fi
22266
22267      # Now join together the path and the arguments once again
22268      if test "x$arguments" != xEOL; then
22269        new_complete="$new_path ${arguments% *}"
22270      else
22271        new_complete="$new_path"
22272      fi
22273
22274  if test "x$complete" != "x$new_complete"; then
22275      MT="$new_complete"
22276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22277$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22278    fi
22279
22280    # The resource compiler
22281    # Extract the first word of "rc", so it can be a program name with args.
22282set dummy rc; ac_word=$2
22283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22284$as_echo_n "checking for $ac_word... " >&6; }
22285if test "${ac_cv_prog_RC+set}" = set; then :
22286  $as_echo_n "(cached) " >&6
22287else
22288  if test -n "$RC"; then
22289  ac_cv_prog_RC="$RC" # Let the user override the test.
22290else
22291  ac_prog_rejected=no
22292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22293for as_dir in $PATH
22294do
22295  IFS=$as_save_IFS
22296  test -z "$as_dir" && as_dir=.
22297    for ac_exec_ext in '' $ac_executable_extensions; do
22298  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22299    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22300       ac_prog_rejected=yes
22301       continue
22302     fi
22303    ac_cv_prog_RC="rc"
22304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22305    break 2
22306  fi
22307done
22308  done
22309IFS=$as_save_IFS
22310
22311if test $ac_prog_rejected = yes; then
22312  # We found a bogon in the path, so make sure we never use it.
22313  set dummy $ac_cv_prog_RC
22314  shift
22315  if test $# != 0; then
22316    # We chose a different compiler from the bogus one.
22317    # However, it has the same basename, so the bogon will be chosen
22318    # first if we set RC to just the basename; use the full file name.
22319    shift
22320    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22321  fi
22322fi
22323fi
22324fi
22325RC=$ac_cv_prog_RC
22326if test -n "$RC"; then
22327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22328$as_echo "$RC" >&6; }
22329else
22330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22331$as_echo "no" >&6; }
22332fi
22333
22334
22335
22336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22337
22338  # First separate the path from the arguments. This will split at the first
22339  # space.
22340  complete="$RC"
22341  path="${complete%% *}"
22342  tmp="$complete EOL"
22343  arguments="${tmp#* }"
22344
22345  # Input might be given as Windows format, start by converting to
22346  # unix format.
22347  new_path=`$CYGPATH -u "$path"`
22348
22349  # Now try to locate executable using which
22350  new_path=`$WHICH "$new_path" 2> /dev/null`
22351  # bat and cmd files are not always considered executable in cygwin causing which
22352  # to not find them
22353  if test "x$new_path" = x \
22354           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22355           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22356    new_path=`$CYGPATH -u "$path"`
22357  fi
22358  if test "x$new_path" = x; then
22359    # Oops. Which didn't find the executable.
22360    # The splitting of arguments from the executable at a space might have been incorrect,
22361    # since paths with space are more likely in Windows. Give it another try with the whole
22362    # argument.
22363    path="$complete"
22364    arguments="EOL"
22365    new_path=`$CYGPATH -u "$path"`
22366    new_path=`$WHICH "$new_path" 2> /dev/null`
22367    # bat and cmd files are not always considered executable in cygwin causing which
22368    # to not find them
22369    if test "x$new_path" = x \
22370             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22371             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22372      new_path=`$CYGPATH -u "$path"`
22373    fi
22374    if test "x$new_path" = x; then
22375      # It's still not found. Now this is an unrecoverable error.
22376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22377$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22378      has_space=`$ECHO "$complete" | $GREP " "`
22379      if test "x$has_space" != x; then
22380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22382      fi
22383      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22384    fi
22385  fi
22386
22387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22390  # "foo.exe" is OK but "foo" is an error.
22391  #
22392  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22393  # It is also a way to make sure we got the proper file name for the real test later on.
22394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22395  if test "x$test_shortpath" = x; then
22396    # Short path failed, file does not exist as specified.
22397    # Try adding .exe or .cmd
22398    if test -f "${new_path}.exe"; then
22399       input_to_shortpath="${new_path}.exe"
22400    elif test -f "${new_path}.cmd"; then
22401       input_to_shortpath="${new_path}.cmd"
22402    else
22403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22404$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22407      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22408    fi
22409  else
22410    input_to_shortpath="$new_path"
22411  fi
22412
22413  # Call helper function which possibly converts this using DOS-style short mode.
22414  # If so, the updated path is stored in $new_path.
22415  new_path="$input_to_shortpath"
22416
22417  input_path="$input_to_shortpath"
22418  # Check if we need to convert this using DOS-style short mode. If the path
22419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22420  # take no chances and rewrite it.
22421  # Note: m4 eats our [], so we need to use [ and ] instead.
22422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22423  if test "x$has_forbidden_chars" != x; then
22424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22428      # Going to short mode and back again did indeed matter. Since short mode is
22429      # case insensitive, let's make it lowercase to improve readability.
22430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22431      # Now convert it back to Unix-stile (cygpath)
22432      input_path=`$CYGPATH -u "$shortmode_path"`
22433      new_path="$input_path"
22434    fi
22435  fi
22436
22437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22438  if test "x$test_cygdrive_prefix" = x; then
22439    # As a simple fix, exclude /usr/bin since it's not a real path.
22440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22442      # a path prefixed by /cygdrive for fixpath to work.
22443      new_path="$CYGWIN_ROOT_PATH$input_path"
22444    fi
22445  fi
22446
22447  # remove trailing .exe if any
22448  new_path="${new_path/%.exe/}"
22449
22450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22451
22452  # First separate the path from the arguments. This will split at the first
22453  # space.
22454  complete="$RC"
22455  path="${complete%% *}"
22456  tmp="$complete EOL"
22457  arguments="${tmp#* }"
22458
22459  # Input might be given as Windows format, start by converting to
22460  # unix format.
22461  new_path="$path"
22462
22463  windows_path="$new_path"
22464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22465    unix_path=`$CYGPATH -u "$windows_path"`
22466    new_path="$unix_path"
22467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22469    new_path="$unix_path"
22470  fi
22471
22472
22473  # Now try to locate executable using which
22474  new_path=`$WHICH "$new_path" 2> /dev/null`
22475
22476  if test "x$new_path" = x; then
22477    # Oops. Which didn't find the executable.
22478    # The splitting of arguments from the executable at a space might have been incorrect,
22479    # since paths with space are more likely in Windows. Give it another try with the whole
22480    # argument.
22481    path="$complete"
22482    arguments="EOL"
22483    new_path="$path"
22484
22485  windows_path="$new_path"
22486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22487    unix_path=`$CYGPATH -u "$windows_path"`
22488    new_path="$unix_path"
22489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22491    new_path="$unix_path"
22492  fi
22493
22494
22495    new_path=`$WHICH "$new_path" 2> /dev/null`
22496
22497    if test "x$new_path" = x; then
22498      # It's still not found. Now this is an unrecoverable error.
22499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22500$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22501      has_space=`$ECHO "$complete" | $GREP " "`
22502      if test "x$has_space" != x; then
22503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22505      fi
22506      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22507    fi
22508  fi
22509
22510  # Now new_path has a complete unix path to the binary
22511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22512    # Keep paths in /bin as-is, but remove trailing .exe if any
22513    new_path="${new_path/%.exe/}"
22514    # Do not save /bin paths to all_fixpath_prefixes!
22515  else
22516    # Not in mixed or Windows style, start by that.
22517    new_path=`cmd //c echo $new_path`
22518
22519  input_path="$new_path"
22520  # Check if we need to convert this using DOS-style short mode. If the path
22521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22522  # take no chances and rewrite it.
22523  # Note: m4 eats our [], so we need to use [ and ] instead.
22524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22525  if test "x$has_forbidden_chars" != x; then
22526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22528  fi
22529
22530    # Output is in $new_path
22531
22532  windows_path="$new_path"
22533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22534    unix_path=`$CYGPATH -u "$windows_path"`
22535    new_path="$unix_path"
22536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22538    new_path="$unix_path"
22539  fi
22540
22541    # remove trailing .exe if any
22542    new_path="${new_path/%.exe/}"
22543
22544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22546  fi
22547
22548  else
22549    # We're on a posix platform. Hooray! :)
22550    # First separate the path from the arguments. This will split at the first
22551    # space.
22552    complete="$RC"
22553    path="${complete%% *}"
22554    tmp="$complete EOL"
22555    arguments="${tmp#* }"
22556
22557    # Cannot rely on the command "which" here since it doesn't always work.
22558    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22559    if test -z "$is_absolute_path"; then
22560      # Path to executable is not absolute. Find it.
22561      IFS_save="$IFS"
22562      IFS=:
22563      for p in $PATH; do
22564        if test -f "$p/$path" && test -x "$p/$path"; then
22565          new_path="$p/$path"
22566          break
22567        fi
22568      done
22569      IFS="$IFS_save"
22570    else
22571      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22572$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22573      new_path="$path"
22574    fi
22575
22576    if test "x$new_path" = x; then
22577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22578$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22579        has_space=`$ECHO "$complete" | $GREP " "`
22580        if test "x$has_space" != x; then
22581          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22583        fi
22584        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22585      fi
22586  fi
22587
22588      # Now join together the path and the arguments once again
22589      if test "x$arguments" != xEOL; then
22590        new_complete="$new_path ${arguments% *}"
22591      else
22592        new_complete="$new_path"
22593      fi
22594
22595  if test "x$complete" != "x$new_complete"; then
22596      RC="$new_complete"
22597      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22598$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22599    fi
22600
22601
22602    # For hotspot, we need these in Windows mixed path,
22603    # so rewrite them all. Need added .exe suffix.
22604    HOTSPOT_CXX="$CXX.exe"
22605    HOTSPOT_LD="$LD.exe"
22606    HOTSPOT_MT="$MT.exe"
22607    HOTSPOT_RC="$RC.exe"
22608
22609  unix_path="$HOTSPOT_CXX"
22610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22611    windows_path=`$CYGPATH -m "$unix_path"`
22612    HOTSPOT_CXX="$windows_path"
22613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22614    windows_path=`cmd //c echo $unix_path`
22615    HOTSPOT_CXX="$windows_path"
22616  fi
22617
22618
22619  unix_path="$HOTSPOT_LD"
22620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22621    windows_path=`$CYGPATH -m "$unix_path"`
22622    HOTSPOT_LD="$windows_path"
22623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22624    windows_path=`cmd //c echo $unix_path`
22625    HOTSPOT_LD="$windows_path"
22626  fi
22627
22628
22629  unix_path="$HOTSPOT_MT"
22630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22631    windows_path=`$CYGPATH -m "$unix_path"`
22632    HOTSPOT_MT="$windows_path"
22633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22634    windows_path=`cmd //c echo $unix_path`
22635    HOTSPOT_MT="$windows_path"
22636  fi
22637
22638
22639  unix_path="$HOTSPOT_RC"
22640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22641    windows_path=`$CYGPATH -m "$unix_path"`
22642    HOTSPOT_RC="$windows_path"
22643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22644    windows_path=`cmd //c echo $unix_path`
22645    HOTSPOT_RC="$windows_path"
22646  fi
22647
22648
22649
22650
22651    RC_FLAGS="-nologo -l 0x409 -r"
22652    if test "x$VARIANT" = xOPT; then :
22653
22654        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22655
22656fi
22657    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22658    if test "x$JDK_UPDATE_VERSION" = x; then :
22659
22660        JDK_UPDATE_VERSION_NOTNULL=0
22661
22662fi
22663    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22664    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22665    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22666    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22667    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22668    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22669    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22670
22671    # lib.exe is used to create static libraries.
22672    # Extract the first word of "lib", so it can be a program name with args.
22673set dummy lib; ac_word=$2
22674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22675$as_echo_n "checking for $ac_word... " >&6; }
22676if test "${ac_cv_prog_WINAR+set}" = set; then :
22677  $as_echo_n "(cached) " >&6
22678else
22679  if test -n "$WINAR"; then
22680  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22681else
22682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22683for as_dir in $PATH
22684do
22685  IFS=$as_save_IFS
22686  test -z "$as_dir" && as_dir=.
22687    for ac_exec_ext in '' $ac_executable_extensions; do
22688  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22689    ac_cv_prog_WINAR="lib"
22690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22691    break 2
22692  fi
22693done
22694  done
22695IFS=$as_save_IFS
22696
22697fi
22698fi
22699WINAR=$ac_cv_prog_WINAR
22700if test -n "$WINAR"; then
22701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22702$as_echo "$WINAR" >&6; }
22703else
22704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22705$as_echo "no" >&6; }
22706fi
22707
22708
22709
22710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22711
22712  # First separate the path from the arguments. This will split at the first
22713  # space.
22714  complete="$WINAR"
22715  path="${complete%% *}"
22716  tmp="$complete EOL"
22717  arguments="${tmp#* }"
22718
22719  # Input might be given as Windows format, start by converting to
22720  # unix format.
22721  new_path=`$CYGPATH -u "$path"`
22722
22723  # Now try to locate executable using which
22724  new_path=`$WHICH "$new_path" 2> /dev/null`
22725  # bat and cmd files are not always considered executable in cygwin causing which
22726  # to not find them
22727  if test "x$new_path" = x \
22728           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22729           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22730    new_path=`$CYGPATH -u "$path"`
22731  fi
22732  if test "x$new_path" = x; then
22733    # Oops. Which didn't find the executable.
22734    # The splitting of arguments from the executable at a space might have been incorrect,
22735    # since paths with space are more likely in Windows. Give it another try with the whole
22736    # argument.
22737    path="$complete"
22738    arguments="EOL"
22739    new_path=`$CYGPATH -u "$path"`
22740    new_path=`$WHICH "$new_path" 2> /dev/null`
22741    # bat and cmd files are not always considered executable in cygwin causing which
22742    # to not find them
22743    if test "x$new_path" = x \
22744             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22745             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22746      new_path=`$CYGPATH -u "$path"`
22747    fi
22748    if test "x$new_path" = x; then
22749      # It's still not found. Now this is an unrecoverable error.
22750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22751$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22752      has_space=`$ECHO "$complete" | $GREP " "`
22753      if test "x$has_space" != x; then
22754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22756      fi
22757      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22758    fi
22759  fi
22760
22761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22764  # "foo.exe" is OK but "foo" is an error.
22765  #
22766  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22767  # It is also a way to make sure we got the proper file name for the real test later on.
22768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22769  if test "x$test_shortpath" = x; then
22770    # Short path failed, file does not exist as specified.
22771    # Try adding .exe or .cmd
22772    if test -f "${new_path}.exe"; then
22773       input_to_shortpath="${new_path}.exe"
22774    elif test -f "${new_path}.cmd"; then
22775       input_to_shortpath="${new_path}.cmd"
22776    else
22777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22778$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22779      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22780$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22781      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22782    fi
22783  else
22784    input_to_shortpath="$new_path"
22785  fi
22786
22787  # Call helper function which possibly converts this using DOS-style short mode.
22788  # If so, the updated path is stored in $new_path.
22789  new_path="$input_to_shortpath"
22790
22791  input_path="$input_to_shortpath"
22792  # Check if we need to convert this using DOS-style short mode. If the path
22793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22794  # take no chances and rewrite it.
22795  # Note: m4 eats our [], so we need to use [ and ] instead.
22796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22797  if test "x$has_forbidden_chars" != x; then
22798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22802      # Going to short mode and back again did indeed matter. Since short mode is
22803      # case insensitive, let's make it lowercase to improve readability.
22804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22805      # Now convert it back to Unix-stile (cygpath)
22806      input_path=`$CYGPATH -u "$shortmode_path"`
22807      new_path="$input_path"
22808    fi
22809  fi
22810
22811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22812  if test "x$test_cygdrive_prefix" = x; then
22813    # As a simple fix, exclude /usr/bin since it's not a real path.
22814    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22816      # a path prefixed by /cygdrive for fixpath to work.
22817      new_path="$CYGWIN_ROOT_PATH$input_path"
22818    fi
22819  fi
22820
22821  # remove trailing .exe if any
22822  new_path="${new_path/%.exe/}"
22823
22824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22825
22826  # First separate the path from the arguments. This will split at the first
22827  # space.
22828  complete="$WINAR"
22829  path="${complete%% *}"
22830  tmp="$complete EOL"
22831  arguments="${tmp#* }"
22832
22833  # Input might be given as Windows format, start by converting to
22834  # unix format.
22835  new_path="$path"
22836
22837  windows_path="$new_path"
22838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22839    unix_path=`$CYGPATH -u "$windows_path"`
22840    new_path="$unix_path"
22841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22843    new_path="$unix_path"
22844  fi
22845
22846
22847  # Now try to locate executable using which
22848  new_path=`$WHICH "$new_path" 2> /dev/null`
22849
22850  if test "x$new_path" = x; then
22851    # Oops. Which didn't find the executable.
22852    # The splitting of arguments from the executable at a space might have been incorrect,
22853    # since paths with space are more likely in Windows. Give it another try with the whole
22854    # argument.
22855    path="$complete"
22856    arguments="EOL"
22857    new_path="$path"
22858
22859  windows_path="$new_path"
22860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22861    unix_path=`$CYGPATH -u "$windows_path"`
22862    new_path="$unix_path"
22863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22865    new_path="$unix_path"
22866  fi
22867
22868
22869    new_path=`$WHICH "$new_path" 2> /dev/null`
22870
22871    if test "x$new_path" = x; then
22872      # It's still not found. Now this is an unrecoverable error.
22873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22874$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22875      has_space=`$ECHO "$complete" | $GREP " "`
22876      if test "x$has_space" != x; then
22877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22879      fi
22880      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22881    fi
22882  fi
22883
22884  # Now new_path has a complete unix path to the binary
22885  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22886    # Keep paths in /bin as-is, but remove trailing .exe if any
22887    new_path="${new_path/%.exe/}"
22888    # Do not save /bin paths to all_fixpath_prefixes!
22889  else
22890    # Not in mixed or Windows style, start by that.
22891    new_path=`cmd //c echo $new_path`
22892
22893  input_path="$new_path"
22894  # Check if we need to convert this using DOS-style short mode. If the path
22895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22896  # take no chances and rewrite it.
22897  # Note: m4 eats our [], so we need to use [ and ] instead.
22898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22899  if test "x$has_forbidden_chars" != x; then
22900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22902  fi
22903
22904    # Output is in $new_path
22905
22906  windows_path="$new_path"
22907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22908    unix_path=`$CYGPATH -u "$windows_path"`
22909    new_path="$unix_path"
22910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22912    new_path="$unix_path"
22913  fi
22914
22915    # remove trailing .exe if any
22916    new_path="${new_path/%.exe/}"
22917
22918    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22919    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22920  fi
22921
22922  else
22923    # We're on a posix platform. Hooray! :)
22924    # First separate the path from the arguments. This will split at the first
22925    # space.
22926    complete="$WINAR"
22927    path="${complete%% *}"
22928    tmp="$complete EOL"
22929    arguments="${tmp#* }"
22930
22931    # Cannot rely on the command "which" here since it doesn't always work.
22932    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22933    if test -z "$is_absolute_path"; then
22934      # Path to executable is not absolute. Find it.
22935      IFS_save="$IFS"
22936      IFS=:
22937      for p in $PATH; do
22938        if test -f "$p/$path" && test -x "$p/$path"; then
22939          new_path="$p/$path"
22940          break
22941        fi
22942      done
22943      IFS="$IFS_save"
22944    else
22945      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
22946$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
22947      new_path="$path"
22948    fi
22949
22950    if test "x$new_path" = x; then
22951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22952$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22953        has_space=`$ECHO "$complete" | $GREP " "`
22954        if test "x$has_space" != x; then
22955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22957        fi
22958        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22959      fi
22960  fi
22961
22962      # Now join together the path and the arguments once again
22963      if test "x$arguments" != xEOL; then
22964        new_complete="$new_path ${arguments% *}"
22965      else
22966        new_complete="$new_path"
22967      fi
22968
22969  if test "x$complete" != "x$new_complete"; then
22970      WINAR="$new_complete"
22971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22972$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22973    fi
22974
22975    AR="$WINAR"
22976    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22977
22978    # Extract the first word of "dumpbin", so it can be a program name with args.
22979set dummy dumpbin; ac_word=$2
22980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22981$as_echo_n "checking for $ac_word... " >&6; }
22982if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22983  $as_echo_n "(cached) " >&6
22984else
22985  if test -n "$DUMPBIN"; then
22986  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22987else
22988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22989for as_dir in $PATH
22990do
22991  IFS=$as_save_IFS
22992  test -z "$as_dir" && as_dir=.
22993    for ac_exec_ext in '' $ac_executable_extensions; do
22994  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22995    ac_cv_prog_DUMPBIN="dumpbin"
22996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22997    break 2
22998  fi
22999done
23000  done
23001IFS=$as_save_IFS
23002
23003fi
23004fi
23005DUMPBIN=$ac_cv_prog_DUMPBIN
23006if test -n "$DUMPBIN"; then
23007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23008$as_echo "$DUMPBIN" >&6; }
23009else
23010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23011$as_echo "no" >&6; }
23012fi
23013
23014
23015
23016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23017
23018  # First separate the path from the arguments. This will split at the first
23019  # space.
23020  complete="$DUMPBIN"
23021  path="${complete%% *}"
23022  tmp="$complete EOL"
23023  arguments="${tmp#* }"
23024
23025  # Input might be given as Windows format, start by converting to
23026  # unix format.
23027  new_path=`$CYGPATH -u "$path"`
23028
23029  # Now try to locate executable using which
23030  new_path=`$WHICH "$new_path" 2> /dev/null`
23031  # bat and cmd files are not always considered executable in cygwin causing which
23032  # to not find them
23033  if test "x$new_path" = x \
23034           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23035           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23036    new_path=`$CYGPATH -u "$path"`
23037  fi
23038  if test "x$new_path" = x; then
23039    # Oops. Which didn't find the executable.
23040    # The splitting of arguments from the executable at a space might have been incorrect,
23041    # since paths with space are more likely in Windows. Give it another try with the whole
23042    # argument.
23043    path="$complete"
23044    arguments="EOL"
23045    new_path=`$CYGPATH -u "$path"`
23046    new_path=`$WHICH "$new_path" 2> /dev/null`
23047    # bat and cmd files are not always considered executable in cygwin causing which
23048    # to not find them
23049    if test "x$new_path" = x \
23050             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23051             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23052      new_path=`$CYGPATH -u "$path"`
23053    fi
23054    if test "x$new_path" = x; then
23055      # It's still not found. Now this is an unrecoverable error.
23056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23057$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23058      has_space=`$ECHO "$complete" | $GREP " "`
23059      if test "x$has_space" != x; then
23060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23062      fi
23063      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23064    fi
23065  fi
23066
23067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23070  # "foo.exe" is OK but "foo" is an error.
23071  #
23072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23073  # It is also a way to make sure we got the proper file name for the real test later on.
23074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23075  if test "x$test_shortpath" = x; then
23076    # Short path failed, file does not exist as specified.
23077    # Try adding .exe or .cmd
23078    if test -f "${new_path}.exe"; then
23079       input_to_shortpath="${new_path}.exe"
23080    elif test -f "${new_path}.cmd"; then
23081       input_to_shortpath="${new_path}.cmd"
23082    else
23083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23084$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23087      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23088    fi
23089  else
23090    input_to_shortpath="$new_path"
23091  fi
23092
23093  # Call helper function which possibly converts this using DOS-style short mode.
23094  # If so, the updated path is stored in $new_path.
23095  new_path="$input_to_shortpath"
23096
23097  input_path="$input_to_shortpath"
23098  # Check if we need to convert this using DOS-style short mode. If the path
23099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23100  # take no chances and rewrite it.
23101  # Note: m4 eats our [], so we need to use [ and ] instead.
23102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23103  if test "x$has_forbidden_chars" != x; then
23104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23108      # Going to short mode and back again did indeed matter. Since short mode is
23109      # case insensitive, let's make it lowercase to improve readability.
23110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23111      # Now convert it back to Unix-stile (cygpath)
23112      input_path=`$CYGPATH -u "$shortmode_path"`
23113      new_path="$input_path"
23114    fi
23115  fi
23116
23117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23118  if test "x$test_cygdrive_prefix" = x; then
23119    # As a simple fix, exclude /usr/bin since it's not a real path.
23120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23122      # a path prefixed by /cygdrive for fixpath to work.
23123      new_path="$CYGWIN_ROOT_PATH$input_path"
23124    fi
23125  fi
23126
23127  # remove trailing .exe if any
23128  new_path="${new_path/%.exe/}"
23129
23130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23131
23132  # First separate the path from the arguments. This will split at the first
23133  # space.
23134  complete="$DUMPBIN"
23135  path="${complete%% *}"
23136  tmp="$complete EOL"
23137  arguments="${tmp#* }"
23138
23139  # Input might be given as Windows format, start by converting to
23140  # unix format.
23141  new_path="$path"
23142
23143  windows_path="$new_path"
23144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23145    unix_path=`$CYGPATH -u "$windows_path"`
23146    new_path="$unix_path"
23147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23149    new_path="$unix_path"
23150  fi
23151
23152
23153  # Now try to locate executable using which
23154  new_path=`$WHICH "$new_path" 2> /dev/null`
23155
23156  if test "x$new_path" = x; then
23157    # Oops. Which didn't find the executable.
23158    # The splitting of arguments from the executable at a space might have been incorrect,
23159    # since paths with space are more likely in Windows. Give it another try with the whole
23160    # argument.
23161    path="$complete"
23162    arguments="EOL"
23163    new_path="$path"
23164
23165  windows_path="$new_path"
23166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23167    unix_path=`$CYGPATH -u "$windows_path"`
23168    new_path="$unix_path"
23169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23171    new_path="$unix_path"
23172  fi
23173
23174
23175    new_path=`$WHICH "$new_path" 2> /dev/null`
23176
23177    if test "x$new_path" = x; then
23178      # It's still not found. Now this is an unrecoverable error.
23179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23180$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23181      has_space=`$ECHO "$complete" | $GREP " "`
23182      if test "x$has_space" != x; then
23183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23185      fi
23186      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23187    fi
23188  fi
23189
23190  # Now new_path has a complete unix path to the binary
23191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23192    # Keep paths in /bin as-is, but remove trailing .exe if any
23193    new_path="${new_path/%.exe/}"
23194    # Do not save /bin paths to all_fixpath_prefixes!
23195  else
23196    # Not in mixed or Windows style, start by that.
23197    new_path=`cmd //c echo $new_path`
23198
23199  input_path="$new_path"
23200  # Check if we need to convert this using DOS-style short mode. If the path
23201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23202  # take no chances and rewrite it.
23203  # Note: m4 eats our [], so we need to use [ and ] instead.
23204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23205  if test "x$has_forbidden_chars" != x; then
23206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23208  fi
23209
23210    # Output is in $new_path
23211
23212  windows_path="$new_path"
23213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23214    unix_path=`$CYGPATH -u "$windows_path"`
23215    new_path="$unix_path"
23216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23218    new_path="$unix_path"
23219  fi
23220
23221    # remove trailing .exe if any
23222    new_path="${new_path/%.exe/}"
23223
23224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23226  fi
23227
23228  else
23229    # We're on a posix platform. Hooray! :)
23230    # First separate the path from the arguments. This will split at the first
23231    # space.
23232    complete="$DUMPBIN"
23233    path="${complete%% *}"
23234    tmp="$complete EOL"
23235    arguments="${tmp#* }"
23236
23237    # Cannot rely on the command "which" here since it doesn't always work.
23238    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23239    if test -z "$is_absolute_path"; then
23240      # Path to executable is not absolute. Find it.
23241      IFS_save="$IFS"
23242      IFS=:
23243      for p in $PATH; do
23244        if test -f "$p/$path" && test -x "$p/$path"; then
23245          new_path="$p/$path"
23246          break
23247        fi
23248      done
23249      IFS="$IFS_save"
23250    else
23251      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23252$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23253      new_path="$path"
23254    fi
23255
23256    if test "x$new_path" = x; then
23257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23258$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23259        has_space=`$ECHO "$complete" | $GREP " "`
23260        if test "x$has_space" != x; then
23261          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23263        fi
23264        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23265      fi
23266  fi
23267
23268      # Now join together the path and the arguments once again
23269      if test "x$arguments" != xEOL; then
23270        new_complete="$new_path ${arguments% *}"
23271      else
23272        new_complete="$new_path"
23273      fi
23274
23275  if test "x$complete" != "x$new_complete"; then
23276      DUMPBIN="$new_complete"
23277      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23278$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23279    fi
23280
23281
23282    COMPILER_TYPE=CL
23283    CCXXFLAGS="$CCXXFLAGS -nologo"
23284
23285fi
23286
23287
23288
23289ac_ext=c
23290ac_cpp='$CPP $CPPFLAGS'
23291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23293ac_compiler_gnu=$ac_cv_c_compiler_gnu
23294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23295$as_echo_n "checking how to run the C preprocessor... " >&6; }
23296# On Suns, sometimes $CPP names a directory.
23297if test -n "$CPP" && test -d "$CPP"; then
23298  CPP=
23299fi
23300if test -z "$CPP"; then
23301  if test "${ac_cv_prog_CPP+set}" = set; then :
23302  $as_echo_n "(cached) " >&6
23303else
23304      # Double quotes because CPP needs to be expanded
23305    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23306    do
23307      ac_preproc_ok=false
23308for ac_c_preproc_warn_flag in '' yes
23309do
23310  # Use a header file that comes with gcc, so configuring glibc
23311  # with a fresh cross-compiler works.
23312  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23313  # <limits.h> exists even on freestanding compilers.
23314  # On the NeXT, cc -E runs the code through the compiler's parser,
23315  # not just through cpp. "Syntax error" is here to catch this case.
23316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23317/* end confdefs.h.  */
23318#ifdef __STDC__
23319# include <limits.h>
23320#else
23321# include <assert.h>
23322#endif
23323		     Syntax error
23324_ACEOF
23325if ac_fn_c_try_cpp "$LINENO"; then :
23326
23327else
23328  # Broken: fails on valid input.
23329continue
23330fi
23331rm -f conftest.err conftest.i conftest.$ac_ext
23332
23333  # OK, works on sane cases.  Now check whether nonexistent headers
23334  # can be detected and how.
23335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23336/* end confdefs.h.  */
23337#include <ac_nonexistent.h>
23338_ACEOF
23339if ac_fn_c_try_cpp "$LINENO"; then :
23340  # Broken: success on invalid input.
23341continue
23342else
23343  # Passes both tests.
23344ac_preproc_ok=:
23345break
23346fi
23347rm -f conftest.err conftest.i conftest.$ac_ext
23348
23349done
23350# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23351rm -f conftest.i conftest.err conftest.$ac_ext
23352if $ac_preproc_ok; then :
23353  break
23354fi
23355
23356    done
23357    ac_cv_prog_CPP=$CPP
23358
23359fi
23360  CPP=$ac_cv_prog_CPP
23361else
23362  ac_cv_prog_CPP=$CPP
23363fi
23364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23365$as_echo "$CPP" >&6; }
23366ac_preproc_ok=false
23367for ac_c_preproc_warn_flag in '' yes
23368do
23369  # Use a header file that comes with gcc, so configuring glibc
23370  # with a fresh cross-compiler works.
23371  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23372  # <limits.h> exists even on freestanding compilers.
23373  # On the NeXT, cc -E runs the code through the compiler's parser,
23374  # not just through cpp. "Syntax error" is here to catch this case.
23375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23376/* end confdefs.h.  */
23377#ifdef __STDC__
23378# include <limits.h>
23379#else
23380# include <assert.h>
23381#endif
23382		     Syntax error
23383_ACEOF
23384if ac_fn_c_try_cpp "$LINENO"; then :
23385
23386else
23387  # Broken: fails on valid input.
23388continue
23389fi
23390rm -f conftest.err conftest.i conftest.$ac_ext
23391
23392  # OK, works on sane cases.  Now check whether nonexistent headers
23393  # can be detected and how.
23394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23395/* end confdefs.h.  */
23396#include <ac_nonexistent.h>
23397_ACEOF
23398if ac_fn_c_try_cpp "$LINENO"; then :
23399  # Broken: success on invalid input.
23400continue
23401else
23402  # Passes both tests.
23403ac_preproc_ok=:
23404break
23405fi
23406rm -f conftest.err conftest.i conftest.$ac_ext
23407
23408done
23409# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23410rm -f conftest.i conftest.err conftest.$ac_ext
23411if $ac_preproc_ok; then :
23412
23413else
23414  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23416as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23417See \`config.log' for more details" "$LINENO" 5 ; }
23418fi
23419
23420ac_ext=cpp
23421ac_cpp='$CXXCPP $CPPFLAGS'
23422ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23423ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23424ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23425
23426
23427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23428
23429  # First separate the path from the arguments. This will split at the first
23430  # space.
23431  complete="$CPP"
23432  path="${complete%% *}"
23433  tmp="$complete EOL"
23434  arguments="${tmp#* }"
23435
23436  # Input might be given as Windows format, start by converting to
23437  # unix format.
23438  new_path=`$CYGPATH -u "$path"`
23439
23440  # Now try to locate executable using which
23441  new_path=`$WHICH "$new_path" 2> /dev/null`
23442  # bat and cmd files are not always considered executable in cygwin causing which
23443  # to not find them
23444  if test "x$new_path" = x \
23445           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23446           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23447    new_path=`$CYGPATH -u "$path"`
23448  fi
23449  if test "x$new_path" = x; then
23450    # Oops. Which didn't find the executable.
23451    # The splitting of arguments from the executable at a space might have been incorrect,
23452    # since paths with space are more likely in Windows. Give it another try with the whole
23453    # argument.
23454    path="$complete"
23455    arguments="EOL"
23456    new_path=`$CYGPATH -u "$path"`
23457    new_path=`$WHICH "$new_path" 2> /dev/null`
23458    # bat and cmd files are not always considered executable in cygwin causing which
23459    # to not find them
23460    if test "x$new_path" = x \
23461             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23462             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23463      new_path=`$CYGPATH -u "$path"`
23464    fi
23465    if test "x$new_path" = x; then
23466      # It's still not found. Now this is an unrecoverable error.
23467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23468$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23469      has_space=`$ECHO "$complete" | $GREP " "`
23470      if test "x$has_space" != x; then
23471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23473      fi
23474      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23475    fi
23476  fi
23477
23478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23481  # "foo.exe" is OK but "foo" is an error.
23482  #
23483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23484  # It is also a way to make sure we got the proper file name for the real test later on.
23485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23486  if test "x$test_shortpath" = x; then
23487    # Short path failed, file does not exist as specified.
23488    # Try adding .exe or .cmd
23489    if test -f "${new_path}.exe"; then
23490       input_to_shortpath="${new_path}.exe"
23491    elif test -f "${new_path}.cmd"; then
23492       input_to_shortpath="${new_path}.cmd"
23493    else
23494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23495$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23498      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23499    fi
23500  else
23501    input_to_shortpath="$new_path"
23502  fi
23503
23504  # Call helper function which possibly converts this using DOS-style short mode.
23505  # If so, the updated path is stored in $new_path.
23506  new_path="$input_to_shortpath"
23507
23508  input_path="$input_to_shortpath"
23509  # Check if we need to convert this using DOS-style short mode. If the path
23510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23511  # take no chances and rewrite it.
23512  # Note: m4 eats our [], so we need to use [ and ] instead.
23513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23514  if test "x$has_forbidden_chars" != x; then
23515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23519      # Going to short mode and back again did indeed matter. Since short mode is
23520      # case insensitive, let's make it lowercase to improve readability.
23521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23522      # Now convert it back to Unix-stile (cygpath)
23523      input_path=`$CYGPATH -u "$shortmode_path"`
23524      new_path="$input_path"
23525    fi
23526  fi
23527
23528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23529  if test "x$test_cygdrive_prefix" = x; then
23530    # As a simple fix, exclude /usr/bin since it's not a real path.
23531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23533      # a path prefixed by /cygdrive for fixpath to work.
23534      new_path="$CYGWIN_ROOT_PATH$input_path"
23535    fi
23536  fi
23537
23538  # remove trailing .exe if any
23539  new_path="${new_path/%.exe/}"
23540
23541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23542
23543  # First separate the path from the arguments. This will split at the first
23544  # space.
23545  complete="$CPP"
23546  path="${complete%% *}"
23547  tmp="$complete EOL"
23548  arguments="${tmp#* }"
23549
23550  # Input might be given as Windows format, start by converting to
23551  # unix format.
23552  new_path="$path"
23553
23554  windows_path="$new_path"
23555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23556    unix_path=`$CYGPATH -u "$windows_path"`
23557    new_path="$unix_path"
23558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23560    new_path="$unix_path"
23561  fi
23562
23563
23564  # Now try to locate executable using which
23565  new_path=`$WHICH "$new_path" 2> /dev/null`
23566
23567  if test "x$new_path" = x; then
23568    # Oops. Which didn't find the executable.
23569    # The splitting of arguments from the executable at a space might have been incorrect,
23570    # since paths with space are more likely in Windows. Give it another try with the whole
23571    # argument.
23572    path="$complete"
23573    arguments="EOL"
23574    new_path="$path"
23575
23576  windows_path="$new_path"
23577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23578    unix_path=`$CYGPATH -u "$windows_path"`
23579    new_path="$unix_path"
23580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23582    new_path="$unix_path"
23583  fi
23584
23585
23586    new_path=`$WHICH "$new_path" 2> /dev/null`
23587
23588    if test "x$new_path" = x; then
23589      # It's still not found. Now this is an unrecoverable error.
23590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23591$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23592      has_space=`$ECHO "$complete" | $GREP " "`
23593      if test "x$has_space" != x; then
23594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23596      fi
23597      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23598    fi
23599  fi
23600
23601  # Now new_path has a complete unix path to the binary
23602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23603    # Keep paths in /bin as-is, but remove trailing .exe if any
23604    new_path="${new_path/%.exe/}"
23605    # Do not save /bin paths to all_fixpath_prefixes!
23606  else
23607    # Not in mixed or Windows style, start by that.
23608    new_path=`cmd //c echo $new_path`
23609
23610  input_path="$new_path"
23611  # Check if we need to convert this using DOS-style short mode. If the path
23612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23613  # take no chances and rewrite it.
23614  # Note: m4 eats our [], so we need to use [ and ] instead.
23615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23616  if test "x$has_forbidden_chars" != x; then
23617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23619  fi
23620
23621    # Output is in $new_path
23622
23623  windows_path="$new_path"
23624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23625    unix_path=`$CYGPATH -u "$windows_path"`
23626    new_path="$unix_path"
23627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23629    new_path="$unix_path"
23630  fi
23631
23632    # remove trailing .exe if any
23633    new_path="${new_path/%.exe/}"
23634
23635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23637  fi
23638
23639  else
23640    # We're on a posix platform. Hooray! :)
23641    # First separate the path from the arguments. This will split at the first
23642    # space.
23643    complete="$CPP"
23644    path="${complete%% *}"
23645    tmp="$complete EOL"
23646    arguments="${tmp#* }"
23647
23648    # Cannot rely on the command "which" here since it doesn't always work.
23649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23650    if test -z "$is_absolute_path"; then
23651      # Path to executable is not absolute. Find it.
23652      IFS_save="$IFS"
23653      IFS=:
23654      for p in $PATH; do
23655        if test -f "$p/$path" && test -x "$p/$path"; then
23656          new_path="$p/$path"
23657          break
23658        fi
23659      done
23660      IFS="$IFS_save"
23661    else
23662      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23663$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23664      new_path="$path"
23665    fi
23666
23667    if test "x$new_path" = x; then
23668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23669$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23670        has_space=`$ECHO "$complete" | $GREP " "`
23671        if test "x$has_space" != x; then
23672          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23674        fi
23675        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23676      fi
23677  fi
23678
23679      # Now join together the path and the arguments once again
23680      if test "x$arguments" != xEOL; then
23681        new_complete="$new_path ${arguments% *}"
23682      else
23683        new_complete="$new_path"
23684      fi
23685
23686  if test "x$complete" != "x$new_complete"; then
23687      CPP="$new_complete"
23688      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23689$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23690    fi
23691
23692
23693ac_ext=cpp
23694ac_cpp='$CXXCPP $CPPFLAGS'
23695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23699$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23700if test -z "$CXXCPP"; then
23701  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23702  $as_echo_n "(cached) " >&6
23703else
23704      # Double quotes because CXXCPP needs to be expanded
23705    for CXXCPP in "$CXX -E" "/lib/cpp"
23706    do
23707      ac_preproc_ok=false
23708for ac_cxx_preproc_warn_flag in '' yes
23709do
23710  # Use a header file that comes with gcc, so configuring glibc
23711  # with a fresh cross-compiler works.
23712  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23713  # <limits.h> exists even on freestanding compilers.
23714  # On the NeXT, cc -E runs the code through the compiler's parser,
23715  # not just through cpp. "Syntax error" is here to catch this case.
23716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23717/* end confdefs.h.  */
23718#ifdef __STDC__
23719# include <limits.h>
23720#else
23721# include <assert.h>
23722#endif
23723		     Syntax error
23724_ACEOF
23725if ac_fn_cxx_try_cpp "$LINENO"; then :
23726
23727else
23728  # Broken: fails on valid input.
23729continue
23730fi
23731rm -f conftest.err conftest.i conftest.$ac_ext
23732
23733  # OK, works on sane cases.  Now check whether nonexistent headers
23734  # can be detected and how.
23735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23736/* end confdefs.h.  */
23737#include <ac_nonexistent.h>
23738_ACEOF
23739if ac_fn_cxx_try_cpp "$LINENO"; then :
23740  # Broken: success on invalid input.
23741continue
23742else
23743  # Passes both tests.
23744ac_preproc_ok=:
23745break
23746fi
23747rm -f conftest.err conftest.i conftest.$ac_ext
23748
23749done
23750# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23751rm -f conftest.i conftest.err conftest.$ac_ext
23752if $ac_preproc_ok; then :
23753  break
23754fi
23755
23756    done
23757    ac_cv_prog_CXXCPP=$CXXCPP
23758
23759fi
23760  CXXCPP=$ac_cv_prog_CXXCPP
23761else
23762  ac_cv_prog_CXXCPP=$CXXCPP
23763fi
23764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23765$as_echo "$CXXCPP" >&6; }
23766ac_preproc_ok=false
23767for ac_cxx_preproc_warn_flag in '' yes
23768do
23769  # Use a header file that comes with gcc, so configuring glibc
23770  # with a fresh cross-compiler works.
23771  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23772  # <limits.h> exists even on freestanding compilers.
23773  # On the NeXT, cc -E runs the code through the compiler's parser,
23774  # not just through cpp. "Syntax error" is here to catch this case.
23775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23776/* end confdefs.h.  */
23777#ifdef __STDC__
23778# include <limits.h>
23779#else
23780# include <assert.h>
23781#endif
23782		     Syntax error
23783_ACEOF
23784if ac_fn_cxx_try_cpp "$LINENO"; then :
23785
23786else
23787  # Broken: fails on valid input.
23788continue
23789fi
23790rm -f conftest.err conftest.i conftest.$ac_ext
23791
23792  # OK, works on sane cases.  Now check whether nonexistent headers
23793  # can be detected and how.
23794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23795/* end confdefs.h.  */
23796#include <ac_nonexistent.h>
23797_ACEOF
23798if ac_fn_cxx_try_cpp "$LINENO"; then :
23799  # Broken: success on invalid input.
23800continue
23801else
23802  # Passes both tests.
23803ac_preproc_ok=:
23804break
23805fi
23806rm -f conftest.err conftest.i conftest.$ac_ext
23807
23808done
23809# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23810rm -f conftest.i conftest.err conftest.$ac_ext
23811if $ac_preproc_ok; then :
23812
23813else
23814  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23816as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23817See \`config.log' for more details" "$LINENO" 5 ; }
23818fi
23819
23820ac_ext=cpp
23821ac_cpp='$CXXCPP $CPPFLAGS'
23822ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23823ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23824ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23825
23826
23827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23828
23829  # First separate the path from the arguments. This will split at the first
23830  # space.
23831  complete="$CXXCPP"
23832  path="${complete%% *}"
23833  tmp="$complete EOL"
23834  arguments="${tmp#* }"
23835
23836  # Input might be given as Windows format, start by converting to
23837  # unix format.
23838  new_path=`$CYGPATH -u "$path"`
23839
23840  # Now try to locate executable using which
23841  new_path=`$WHICH "$new_path" 2> /dev/null`
23842  # bat and cmd files are not always considered executable in cygwin causing which
23843  # to not find them
23844  if test "x$new_path" = x \
23845           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23846           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23847    new_path=`$CYGPATH -u "$path"`
23848  fi
23849  if test "x$new_path" = x; then
23850    # Oops. Which didn't find the executable.
23851    # The splitting of arguments from the executable at a space might have been incorrect,
23852    # since paths with space are more likely in Windows. Give it another try with the whole
23853    # argument.
23854    path="$complete"
23855    arguments="EOL"
23856    new_path=`$CYGPATH -u "$path"`
23857    new_path=`$WHICH "$new_path" 2> /dev/null`
23858    # bat and cmd files are not always considered executable in cygwin causing which
23859    # to not find them
23860    if test "x$new_path" = x \
23861             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23862             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23863      new_path=`$CYGPATH -u "$path"`
23864    fi
23865    if test "x$new_path" = x; then
23866      # It's still not found. Now this is an unrecoverable error.
23867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23868$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23869      has_space=`$ECHO "$complete" | $GREP " "`
23870      if test "x$has_space" != x; then
23871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23873      fi
23874      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23875    fi
23876  fi
23877
23878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23881  # "foo.exe" is OK but "foo" is an error.
23882  #
23883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23884  # It is also a way to make sure we got the proper file name for the real test later on.
23885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23886  if test "x$test_shortpath" = x; then
23887    # Short path failed, file does not exist as specified.
23888    # Try adding .exe or .cmd
23889    if test -f "${new_path}.exe"; then
23890       input_to_shortpath="${new_path}.exe"
23891    elif test -f "${new_path}.cmd"; then
23892       input_to_shortpath="${new_path}.cmd"
23893    else
23894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23895$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23896      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23897$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23898      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23899    fi
23900  else
23901    input_to_shortpath="$new_path"
23902  fi
23903
23904  # Call helper function which possibly converts this using DOS-style short mode.
23905  # If so, the updated path is stored in $new_path.
23906  new_path="$input_to_shortpath"
23907
23908  input_path="$input_to_shortpath"
23909  # Check if we need to convert this using DOS-style short mode. If the path
23910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23911  # take no chances and rewrite it.
23912  # Note: m4 eats our [], so we need to use [ and ] instead.
23913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23914  if test "x$has_forbidden_chars" != x; then
23915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23919      # Going to short mode and back again did indeed matter. Since short mode is
23920      # case insensitive, let's make it lowercase to improve readability.
23921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23922      # Now convert it back to Unix-stile (cygpath)
23923      input_path=`$CYGPATH -u "$shortmode_path"`
23924      new_path="$input_path"
23925    fi
23926  fi
23927
23928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23929  if test "x$test_cygdrive_prefix" = x; then
23930    # As a simple fix, exclude /usr/bin since it's not a real path.
23931    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23933      # a path prefixed by /cygdrive for fixpath to work.
23934      new_path="$CYGWIN_ROOT_PATH$input_path"
23935    fi
23936  fi
23937
23938  # remove trailing .exe if any
23939  new_path="${new_path/%.exe/}"
23940
23941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23942
23943  # First separate the path from the arguments. This will split at the first
23944  # space.
23945  complete="$CXXCPP"
23946  path="${complete%% *}"
23947  tmp="$complete EOL"
23948  arguments="${tmp#* }"
23949
23950  # Input might be given as Windows format, start by converting to
23951  # unix format.
23952  new_path="$path"
23953
23954  windows_path="$new_path"
23955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23956    unix_path=`$CYGPATH -u "$windows_path"`
23957    new_path="$unix_path"
23958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23960    new_path="$unix_path"
23961  fi
23962
23963
23964  # Now try to locate executable using which
23965  new_path=`$WHICH "$new_path" 2> /dev/null`
23966
23967  if test "x$new_path" = x; then
23968    # Oops. Which didn't find the executable.
23969    # The splitting of arguments from the executable at a space might have been incorrect,
23970    # since paths with space are more likely in Windows. Give it another try with the whole
23971    # argument.
23972    path="$complete"
23973    arguments="EOL"
23974    new_path="$path"
23975
23976  windows_path="$new_path"
23977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23978    unix_path=`$CYGPATH -u "$windows_path"`
23979    new_path="$unix_path"
23980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23982    new_path="$unix_path"
23983  fi
23984
23985
23986    new_path=`$WHICH "$new_path" 2> /dev/null`
23987
23988    if test "x$new_path" = x; then
23989      # It's still not found. Now this is an unrecoverable error.
23990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23991$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23992      has_space=`$ECHO "$complete" | $GREP " "`
23993      if test "x$has_space" != x; then
23994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23996      fi
23997      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23998    fi
23999  fi
24000
24001  # Now new_path has a complete unix path to the binary
24002  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24003    # Keep paths in /bin as-is, but remove trailing .exe if any
24004    new_path="${new_path/%.exe/}"
24005    # Do not save /bin paths to all_fixpath_prefixes!
24006  else
24007    # Not in mixed or Windows style, start by that.
24008    new_path=`cmd //c echo $new_path`
24009
24010  input_path="$new_path"
24011  # Check if we need to convert this using DOS-style short mode. If the path
24012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24013  # take no chances and rewrite it.
24014  # Note: m4 eats our [], so we need to use [ and ] instead.
24015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24016  if test "x$has_forbidden_chars" != x; then
24017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24019  fi
24020
24021    # Output is in $new_path
24022
24023  windows_path="$new_path"
24024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24025    unix_path=`$CYGPATH -u "$windows_path"`
24026    new_path="$unix_path"
24027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24029    new_path="$unix_path"
24030  fi
24031
24032    # remove trailing .exe if any
24033    new_path="${new_path/%.exe/}"
24034
24035    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24036    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24037  fi
24038
24039  else
24040    # We're on a posix platform. Hooray! :)
24041    # First separate the path from the arguments. This will split at the first
24042    # space.
24043    complete="$CXXCPP"
24044    path="${complete%% *}"
24045    tmp="$complete EOL"
24046    arguments="${tmp#* }"
24047
24048    # Cannot rely on the command "which" here since it doesn't always work.
24049    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24050    if test -z "$is_absolute_path"; then
24051      # Path to executable is not absolute. Find it.
24052      IFS_save="$IFS"
24053      IFS=:
24054      for p in $PATH; do
24055        if test -f "$p/$path" && test -x "$p/$path"; then
24056          new_path="$p/$path"
24057          break
24058        fi
24059      done
24060      IFS="$IFS_save"
24061    else
24062      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24063$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24064      new_path="$path"
24065    fi
24066
24067    if test "x$new_path" = x; then
24068        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24069$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24070        has_space=`$ECHO "$complete" | $GREP " "`
24071        if test "x$has_space" != x; then
24072          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24073$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24074        fi
24075        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24076      fi
24077  fi
24078
24079      # Now join together the path and the arguments once again
24080      if test "x$arguments" != xEOL; then
24081        new_complete="$new_path ${arguments% *}"
24082      else
24083        new_complete="$new_path"
24084      fi
24085
24086  if test "x$complete" != "x$new_complete"; then
24087      CXXCPP="$new_complete"
24088      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24089$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24090    fi
24091
24092
24093if test "x$COMPILE_TYPE" != "xcross"; then
24094    # If we are not cross compiling, use the same compilers for
24095    # building the build platform executables. The cross-compilation
24096    # case needed to be done earlier, but this can only be done after
24097    # the native tools have been localized.
24098    BUILD_CC="$CC"
24099    BUILD_CXX="$CXX"
24100    BUILD_LD="$LD"
24101fi
24102
24103# for solaris we really need solaris tools, and not gnu equivalent
24104#   these seems to normally reside in /usr/ccs/bin so add that to path before
24105#   starting to probe
24106#
24107#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24108#         so that it can be overriden --with-tools-dir
24109if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24110    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24111fi
24112
24113# Find the right assembler.
24114if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24115    # Extract the first word of "as", so it can be a program name with args.
24116set dummy as; ac_word=$2
24117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24118$as_echo_n "checking for $ac_word... " >&6; }
24119if test "${ac_cv_path_AS+set}" = set; then :
24120  $as_echo_n "(cached) " >&6
24121else
24122  case $AS in
24123  [\\/]* | ?:[\\/]*)
24124  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24125  ;;
24126  *)
24127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24128for as_dir in $PATH
24129do
24130  IFS=$as_save_IFS
24131  test -z "$as_dir" && as_dir=.
24132    for ac_exec_ext in '' $ac_executable_extensions; do
24133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24134    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24136    break 2
24137  fi
24138done
24139  done
24140IFS=$as_save_IFS
24141
24142  ;;
24143esac
24144fi
24145AS=$ac_cv_path_AS
24146if test -n "$AS"; then
24147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24148$as_echo "$AS" >&6; }
24149else
24150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24151$as_echo "no" >&6; }
24152fi
24153
24154
24155
24156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24157
24158  # First separate the path from the arguments. This will split at the first
24159  # space.
24160  complete="$AS"
24161  path="${complete%% *}"
24162  tmp="$complete EOL"
24163  arguments="${tmp#* }"
24164
24165  # Input might be given as Windows format, start by converting to
24166  # unix format.
24167  new_path=`$CYGPATH -u "$path"`
24168
24169  # Now try to locate executable using which
24170  new_path=`$WHICH "$new_path" 2> /dev/null`
24171  # bat and cmd files are not always considered executable in cygwin causing which
24172  # to not find them
24173  if test "x$new_path" = x \
24174           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24175           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24176    new_path=`$CYGPATH -u "$path"`
24177  fi
24178  if test "x$new_path" = x; then
24179    # Oops. Which didn't find the executable.
24180    # The splitting of arguments from the executable at a space might have been incorrect,
24181    # since paths with space are more likely in Windows. Give it another try with the whole
24182    # argument.
24183    path="$complete"
24184    arguments="EOL"
24185    new_path=`$CYGPATH -u "$path"`
24186    new_path=`$WHICH "$new_path" 2> /dev/null`
24187    # bat and cmd files are not always considered executable in cygwin causing which
24188    # to not find them
24189    if test "x$new_path" = x \
24190             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24191             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24192      new_path=`$CYGPATH -u "$path"`
24193    fi
24194    if test "x$new_path" = x; then
24195      # It's still not found. Now this is an unrecoverable error.
24196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24197$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24198      has_space=`$ECHO "$complete" | $GREP " "`
24199      if test "x$has_space" != x; then
24200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24202      fi
24203      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24204    fi
24205  fi
24206
24207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24210  # "foo.exe" is OK but "foo" is an error.
24211  #
24212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24213  # It is also a way to make sure we got the proper file name for the real test later on.
24214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24215  if test "x$test_shortpath" = x; then
24216    # Short path failed, file does not exist as specified.
24217    # Try adding .exe or .cmd
24218    if test -f "${new_path}.exe"; then
24219       input_to_shortpath="${new_path}.exe"
24220    elif test -f "${new_path}.cmd"; then
24221       input_to_shortpath="${new_path}.cmd"
24222    else
24223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24224$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24225      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24226$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24227      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24228    fi
24229  else
24230    input_to_shortpath="$new_path"
24231  fi
24232
24233  # Call helper function which possibly converts this using DOS-style short mode.
24234  # If so, the updated path is stored in $new_path.
24235  new_path="$input_to_shortpath"
24236
24237  input_path="$input_to_shortpath"
24238  # Check if we need to convert this using DOS-style short mode. If the path
24239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24240  # take no chances and rewrite it.
24241  # Note: m4 eats our [], so we need to use [ and ] instead.
24242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24243  if test "x$has_forbidden_chars" != x; then
24244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24248      # Going to short mode and back again did indeed matter. Since short mode is
24249      # case insensitive, let's make it lowercase to improve readability.
24250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24251      # Now convert it back to Unix-stile (cygpath)
24252      input_path=`$CYGPATH -u "$shortmode_path"`
24253      new_path="$input_path"
24254    fi
24255  fi
24256
24257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24258  if test "x$test_cygdrive_prefix" = x; then
24259    # As a simple fix, exclude /usr/bin since it's not a real path.
24260    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24262      # a path prefixed by /cygdrive for fixpath to work.
24263      new_path="$CYGWIN_ROOT_PATH$input_path"
24264    fi
24265  fi
24266
24267  # remove trailing .exe if any
24268  new_path="${new_path/%.exe/}"
24269
24270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24271
24272  # First separate the path from the arguments. This will split at the first
24273  # space.
24274  complete="$AS"
24275  path="${complete%% *}"
24276  tmp="$complete EOL"
24277  arguments="${tmp#* }"
24278
24279  # Input might be given as Windows format, start by converting to
24280  # unix format.
24281  new_path="$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
24293  # Now try to locate executable using which
24294  new_path=`$WHICH "$new_path" 2> /dev/null`
24295
24296  if test "x$new_path" = x; then
24297    # Oops. Which didn't find the executable.
24298    # The splitting of arguments from the executable at a space might have been incorrect,
24299    # since paths with space are more likely in Windows. Give it another try with the whole
24300    # argument.
24301    path="$complete"
24302    arguments="EOL"
24303    new_path="$path"
24304
24305  windows_path="$new_path"
24306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24307    unix_path=`$CYGPATH -u "$windows_path"`
24308    new_path="$unix_path"
24309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24311    new_path="$unix_path"
24312  fi
24313
24314
24315    new_path=`$WHICH "$new_path" 2> /dev/null`
24316
24317    if test "x$new_path" = x; then
24318      # It's still not found. Now this is an unrecoverable error.
24319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24320$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24321      has_space=`$ECHO "$complete" | $GREP " "`
24322      if test "x$has_space" != x; then
24323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24325      fi
24326      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24327    fi
24328  fi
24329
24330  # Now new_path has a complete unix path to the binary
24331  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24332    # Keep paths in /bin as-is, but remove trailing .exe if any
24333    new_path="${new_path/%.exe/}"
24334    # Do not save /bin paths to all_fixpath_prefixes!
24335  else
24336    # Not in mixed or Windows style, start by that.
24337    new_path=`cmd //c echo $new_path`
24338
24339  input_path="$new_path"
24340  # Check if we need to convert this using DOS-style short mode. If the path
24341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24342  # take no chances and rewrite it.
24343  # Note: m4 eats our [], so we need to use [ and ] instead.
24344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24345  if test "x$has_forbidden_chars" != x; then
24346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24348  fi
24349
24350    # Output is in $new_path
24351
24352  windows_path="$new_path"
24353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24354    unix_path=`$CYGPATH -u "$windows_path"`
24355    new_path="$unix_path"
24356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24358    new_path="$unix_path"
24359  fi
24360
24361    # remove trailing .exe if any
24362    new_path="${new_path/%.exe/}"
24363
24364    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24365    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24366  fi
24367
24368  else
24369    # We're on a posix platform. Hooray! :)
24370    # First separate the path from the arguments. This will split at the first
24371    # space.
24372    complete="$AS"
24373    path="${complete%% *}"
24374    tmp="$complete EOL"
24375    arguments="${tmp#* }"
24376
24377    # Cannot rely on the command "which" here since it doesn't always work.
24378    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24379    if test -z "$is_absolute_path"; then
24380      # Path to executable is not absolute. Find it.
24381      IFS_save="$IFS"
24382      IFS=:
24383      for p in $PATH; do
24384        if test -f "$p/$path" && test -x "$p/$path"; then
24385          new_path="$p/$path"
24386          break
24387        fi
24388      done
24389      IFS="$IFS_save"
24390    else
24391      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24392$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24393      new_path="$path"
24394    fi
24395
24396    if test "x$new_path" = x; then
24397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24398$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24399        has_space=`$ECHO "$complete" | $GREP " "`
24400        if test "x$has_space" != x; then
24401          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24402$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24403        fi
24404        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24405      fi
24406  fi
24407
24408      # Now join together the path and the arguments once again
24409      if test "x$arguments" != xEOL; then
24410        new_complete="$new_path ${arguments% *}"
24411      else
24412        new_complete="$new_path"
24413      fi
24414
24415  if test "x$complete" != "x$new_complete"; then
24416      AS="$new_complete"
24417      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24418$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24419    fi
24420
24421else
24422    AS="$CC -c"
24423fi
24424
24425
24426if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24427    for ac_prog in gnm nm
24428do
24429  # Extract the first word of "$ac_prog", so it can be a program name with args.
24430set dummy $ac_prog; ac_word=$2
24431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24432$as_echo_n "checking for $ac_word... " >&6; }
24433if test "${ac_cv_path_NM+set}" = set; then :
24434  $as_echo_n "(cached) " >&6
24435else
24436  case $NM in
24437  [\\/]* | ?:[\\/]*)
24438  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24439  ;;
24440  *)
24441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24442for as_dir in $PATH
24443do
24444  IFS=$as_save_IFS
24445  test -z "$as_dir" && as_dir=.
24446    for ac_exec_ext in '' $ac_executable_extensions; do
24447  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24448    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24450    break 2
24451  fi
24452done
24453  done
24454IFS=$as_save_IFS
24455
24456  ;;
24457esac
24458fi
24459NM=$ac_cv_path_NM
24460if test -n "$NM"; then
24461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24462$as_echo "$NM" >&6; }
24463else
24464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24465$as_echo "no" >&6; }
24466fi
24467
24468
24469  test -n "$NM" && break
24470done
24471
24472
24473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24474
24475  # First separate the path from the arguments. This will split at the first
24476  # space.
24477  complete="$NM"
24478  path="${complete%% *}"
24479  tmp="$complete EOL"
24480  arguments="${tmp#* }"
24481
24482  # Input might be given as Windows format, start by converting to
24483  # unix format.
24484  new_path=`$CYGPATH -u "$path"`
24485
24486  # Now try to locate executable using which
24487  new_path=`$WHICH "$new_path" 2> /dev/null`
24488  # bat and cmd files are not always considered executable in cygwin causing which
24489  # to not find them
24490  if test "x$new_path" = x \
24491           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24492           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24493    new_path=`$CYGPATH -u "$path"`
24494  fi
24495  if test "x$new_path" = x; then
24496    # Oops. Which didn't find the executable.
24497    # The splitting of arguments from the executable at a space might have been incorrect,
24498    # since paths with space are more likely in Windows. Give it another try with the whole
24499    # argument.
24500    path="$complete"
24501    arguments="EOL"
24502    new_path=`$CYGPATH -u "$path"`
24503    new_path=`$WHICH "$new_path" 2> /dev/null`
24504    # bat and cmd files are not always considered executable in cygwin causing which
24505    # to not find them
24506    if test "x$new_path" = x \
24507             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24508             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24509      new_path=`$CYGPATH -u "$path"`
24510    fi
24511    if test "x$new_path" = x; then
24512      # It's still not found. Now this is an unrecoverable error.
24513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24514$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24515      has_space=`$ECHO "$complete" | $GREP " "`
24516      if test "x$has_space" != x; then
24517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24519      fi
24520      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24521    fi
24522  fi
24523
24524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24527  # "foo.exe" is OK but "foo" is an error.
24528  #
24529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24530  # It is also a way to make sure we got the proper file name for the real test later on.
24531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24532  if test "x$test_shortpath" = x; then
24533    # Short path failed, file does not exist as specified.
24534    # Try adding .exe or .cmd
24535    if test -f "${new_path}.exe"; then
24536       input_to_shortpath="${new_path}.exe"
24537    elif test -f "${new_path}.cmd"; then
24538       input_to_shortpath="${new_path}.cmd"
24539    else
24540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24541$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24542      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24543$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24544      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24545    fi
24546  else
24547    input_to_shortpath="$new_path"
24548  fi
24549
24550  # Call helper function which possibly converts this using DOS-style short mode.
24551  # If so, the updated path is stored in $new_path.
24552  new_path="$input_to_shortpath"
24553
24554  input_path="$input_to_shortpath"
24555  # Check if we need to convert this using DOS-style short mode. If the path
24556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24557  # take no chances and rewrite it.
24558  # Note: m4 eats our [], so we need to use [ and ] instead.
24559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24560  if test "x$has_forbidden_chars" != x; then
24561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24565      # Going to short mode and back again did indeed matter. Since short mode is
24566      # case insensitive, let's make it lowercase to improve readability.
24567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24568      # Now convert it back to Unix-stile (cygpath)
24569      input_path=`$CYGPATH -u "$shortmode_path"`
24570      new_path="$input_path"
24571    fi
24572  fi
24573
24574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24575  if test "x$test_cygdrive_prefix" = x; then
24576    # As a simple fix, exclude /usr/bin since it's not a real path.
24577    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24579      # a path prefixed by /cygdrive for fixpath to work.
24580      new_path="$CYGWIN_ROOT_PATH$input_path"
24581    fi
24582  fi
24583
24584  # remove trailing .exe if any
24585  new_path="${new_path/%.exe/}"
24586
24587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24588
24589  # First separate the path from the arguments. This will split at the first
24590  # space.
24591  complete="$NM"
24592  path="${complete%% *}"
24593  tmp="$complete EOL"
24594  arguments="${tmp#* }"
24595
24596  # Input might be given as Windows format, start by converting to
24597  # unix format.
24598  new_path="$path"
24599
24600  windows_path="$new_path"
24601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24602    unix_path=`$CYGPATH -u "$windows_path"`
24603    new_path="$unix_path"
24604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24606    new_path="$unix_path"
24607  fi
24608
24609
24610  # Now try to locate executable using which
24611  new_path=`$WHICH "$new_path" 2> /dev/null`
24612
24613  if test "x$new_path" = x; then
24614    # Oops. Which didn't find the executable.
24615    # The splitting of arguments from the executable at a space might have been incorrect,
24616    # since paths with space are more likely in Windows. Give it another try with the whole
24617    # argument.
24618    path="$complete"
24619    arguments="EOL"
24620    new_path="$path"
24621
24622  windows_path="$new_path"
24623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24624    unix_path=`$CYGPATH -u "$windows_path"`
24625    new_path="$unix_path"
24626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24628    new_path="$unix_path"
24629  fi
24630
24631
24632    new_path=`$WHICH "$new_path" 2> /dev/null`
24633
24634    if test "x$new_path" = x; then
24635      # It's still not found. Now this is an unrecoverable error.
24636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24637$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24638      has_space=`$ECHO "$complete" | $GREP " "`
24639      if test "x$has_space" != x; then
24640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24642      fi
24643      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24644    fi
24645  fi
24646
24647  # Now new_path has a complete unix path to the binary
24648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24649    # Keep paths in /bin as-is, but remove trailing .exe if any
24650    new_path="${new_path/%.exe/}"
24651    # Do not save /bin paths to all_fixpath_prefixes!
24652  else
24653    # Not in mixed or Windows style, start by that.
24654    new_path=`cmd //c echo $new_path`
24655
24656  input_path="$new_path"
24657  # Check if we need to convert this using DOS-style short mode. If the path
24658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24659  # take no chances and rewrite it.
24660  # Note: m4 eats our [], so we need to use [ and ] instead.
24661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24662  if test "x$has_forbidden_chars" != x; then
24663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24665  fi
24666
24667    # Output is in $new_path
24668
24669  windows_path="$new_path"
24670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24671    unix_path=`$CYGPATH -u "$windows_path"`
24672    new_path="$unix_path"
24673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24675    new_path="$unix_path"
24676  fi
24677
24678    # remove trailing .exe if any
24679    new_path="${new_path/%.exe/}"
24680
24681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24683  fi
24684
24685  else
24686    # We're on a posix platform. Hooray! :)
24687    # First separate the path from the arguments. This will split at the first
24688    # space.
24689    complete="$NM"
24690    path="${complete%% *}"
24691    tmp="$complete EOL"
24692    arguments="${tmp#* }"
24693
24694    # Cannot rely on the command "which" here since it doesn't always work.
24695    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24696    if test -z "$is_absolute_path"; then
24697      # Path to executable is not absolute. Find it.
24698      IFS_save="$IFS"
24699      IFS=:
24700      for p in $PATH; do
24701        if test -f "$p/$path" && test -x "$p/$path"; then
24702          new_path="$p/$path"
24703          break
24704        fi
24705      done
24706      IFS="$IFS_save"
24707    else
24708      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24709$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24710      new_path="$path"
24711    fi
24712
24713    if test "x$new_path" = x; then
24714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24715$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24716        has_space=`$ECHO "$complete" | $GREP " "`
24717        if test "x$has_space" != x; then
24718          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24719$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24720        fi
24721        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24722      fi
24723  fi
24724
24725      # Now join together the path and the arguments once again
24726      if test "x$arguments" != xEOL; then
24727        new_complete="$new_path ${arguments% *}"
24728      else
24729        new_complete="$new_path"
24730      fi
24731
24732  if test "x$complete" != "x$new_complete"; then
24733      NM="$new_complete"
24734      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24735$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24736    fi
24737
24738    # Extract the first word of "strip", so it can be a program name with args.
24739set dummy strip; ac_word=$2
24740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24741$as_echo_n "checking for $ac_word... " >&6; }
24742if test "${ac_cv_path_STRIP+set}" = set; then :
24743  $as_echo_n "(cached) " >&6
24744else
24745  case $STRIP in
24746  [\\/]* | ?:[\\/]*)
24747  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24748  ;;
24749  *)
24750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24751for as_dir in $PATH
24752do
24753  IFS=$as_save_IFS
24754  test -z "$as_dir" && as_dir=.
24755    for ac_exec_ext in '' $ac_executable_extensions; do
24756  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24757    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24759    break 2
24760  fi
24761done
24762  done
24763IFS=$as_save_IFS
24764
24765  ;;
24766esac
24767fi
24768STRIP=$ac_cv_path_STRIP
24769if test -n "$STRIP"; then
24770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24771$as_echo "$STRIP" >&6; }
24772else
24773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24774$as_echo "no" >&6; }
24775fi
24776
24777
24778
24779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24780
24781  # First separate the path from the arguments. This will split at the first
24782  # space.
24783  complete="$STRIP"
24784  path="${complete%% *}"
24785  tmp="$complete EOL"
24786  arguments="${tmp#* }"
24787
24788  # Input might be given as Windows format, start by converting to
24789  # unix format.
24790  new_path=`$CYGPATH -u "$path"`
24791
24792  # Now try to locate executable using which
24793  new_path=`$WHICH "$new_path" 2> /dev/null`
24794  # bat and cmd files are not always considered executable in cygwin causing which
24795  # to not find them
24796  if test "x$new_path" = x \
24797           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24798           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24799    new_path=`$CYGPATH -u "$path"`
24800  fi
24801  if test "x$new_path" = x; then
24802    # Oops. Which didn't find the executable.
24803    # The splitting of arguments from the executable at a space might have been incorrect,
24804    # since paths with space are more likely in Windows. Give it another try with the whole
24805    # argument.
24806    path="$complete"
24807    arguments="EOL"
24808    new_path=`$CYGPATH -u "$path"`
24809    new_path=`$WHICH "$new_path" 2> /dev/null`
24810    # bat and cmd files are not always considered executable in cygwin causing which
24811    # to not find them
24812    if test "x$new_path" = x \
24813             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24814             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24815      new_path=`$CYGPATH -u "$path"`
24816    fi
24817    if test "x$new_path" = x; then
24818      # It's still not found. Now this is an unrecoverable error.
24819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24820$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24821      has_space=`$ECHO "$complete" | $GREP " "`
24822      if test "x$has_space" != x; then
24823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24825      fi
24826      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24827    fi
24828  fi
24829
24830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24833  # "foo.exe" is OK but "foo" is an error.
24834  #
24835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24836  # It is also a way to make sure we got the proper file name for the real test later on.
24837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24838  if test "x$test_shortpath" = x; then
24839    # Short path failed, file does not exist as specified.
24840    # Try adding .exe or .cmd
24841    if test -f "${new_path}.exe"; then
24842       input_to_shortpath="${new_path}.exe"
24843    elif test -f "${new_path}.cmd"; then
24844       input_to_shortpath="${new_path}.cmd"
24845    else
24846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24847$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24850      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24851    fi
24852  else
24853    input_to_shortpath="$new_path"
24854  fi
24855
24856  # Call helper function which possibly converts this using DOS-style short mode.
24857  # If so, the updated path is stored in $new_path.
24858  new_path="$input_to_shortpath"
24859
24860  input_path="$input_to_shortpath"
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24871      # Going to short mode and back again did indeed matter. Since short mode is
24872      # case insensitive, let's make it lowercase to improve readability.
24873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24874      # Now convert it back to Unix-stile (cygpath)
24875      input_path=`$CYGPATH -u "$shortmode_path"`
24876      new_path="$input_path"
24877    fi
24878  fi
24879
24880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24881  if test "x$test_cygdrive_prefix" = x; then
24882    # As a simple fix, exclude /usr/bin since it's not a real path.
24883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24885      # a path prefixed by /cygdrive for fixpath to work.
24886      new_path="$CYGWIN_ROOT_PATH$input_path"
24887    fi
24888  fi
24889
24890  # remove trailing .exe if any
24891  new_path="${new_path/%.exe/}"
24892
24893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24894
24895  # First separate the path from the arguments. This will split at the first
24896  # space.
24897  complete="$STRIP"
24898  path="${complete%% *}"
24899  tmp="$complete EOL"
24900  arguments="${tmp#* }"
24901
24902  # Input might be given as Windows format, start by converting to
24903  # unix format.
24904  new_path="$path"
24905
24906  windows_path="$new_path"
24907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24908    unix_path=`$CYGPATH -u "$windows_path"`
24909    new_path="$unix_path"
24910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24912    new_path="$unix_path"
24913  fi
24914
24915
24916  # Now try to locate executable using which
24917  new_path=`$WHICH "$new_path" 2> /dev/null`
24918
24919  if test "x$new_path" = x; then
24920    # Oops. Which didn't find the executable.
24921    # The splitting of arguments from the executable at a space might have been incorrect,
24922    # since paths with space are more likely in Windows. Give it another try with the whole
24923    # argument.
24924    path="$complete"
24925    arguments="EOL"
24926    new_path="$path"
24927
24928  windows_path="$new_path"
24929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24930    unix_path=`$CYGPATH -u "$windows_path"`
24931    new_path="$unix_path"
24932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24934    new_path="$unix_path"
24935  fi
24936
24937
24938    new_path=`$WHICH "$new_path" 2> /dev/null`
24939
24940    if test "x$new_path" = x; then
24941      # It's still not found. Now this is an unrecoverable error.
24942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24943$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24944      has_space=`$ECHO "$complete" | $GREP " "`
24945      if test "x$has_space" != x; then
24946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24948      fi
24949      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24950    fi
24951  fi
24952
24953  # Now new_path has a complete unix path to the binary
24954  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24955    # Keep paths in /bin as-is, but remove trailing .exe if any
24956    new_path="${new_path/%.exe/}"
24957    # Do not save /bin paths to all_fixpath_prefixes!
24958  else
24959    # Not in mixed or Windows style, start by that.
24960    new_path=`cmd //c echo $new_path`
24961
24962  input_path="$new_path"
24963  # Check if we need to convert this using DOS-style short mode. If the path
24964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24965  # take no chances and rewrite it.
24966  # Note: m4 eats our [], so we need to use [ and ] instead.
24967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24968  if test "x$has_forbidden_chars" != x; then
24969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24971  fi
24972
24973    # Output is in $new_path
24974
24975  windows_path="$new_path"
24976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24977    unix_path=`$CYGPATH -u "$windows_path"`
24978    new_path="$unix_path"
24979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24981    new_path="$unix_path"
24982  fi
24983
24984    # remove trailing .exe if any
24985    new_path="${new_path/%.exe/}"
24986
24987    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24988    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24989  fi
24990
24991  else
24992    # We're on a posix platform. Hooray! :)
24993    # First separate the path from the arguments. This will split at the first
24994    # space.
24995    complete="$STRIP"
24996    path="${complete%% *}"
24997    tmp="$complete EOL"
24998    arguments="${tmp#* }"
24999
25000    # Cannot rely on the command "which" here since it doesn't always work.
25001    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25002    if test -z "$is_absolute_path"; then
25003      # Path to executable is not absolute. Find it.
25004      IFS_save="$IFS"
25005      IFS=:
25006      for p in $PATH; do
25007        if test -f "$p/$path" && test -x "$p/$path"; then
25008          new_path="$p/$path"
25009          break
25010        fi
25011      done
25012      IFS="$IFS_save"
25013    else
25014      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25015$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25016      new_path="$path"
25017    fi
25018
25019    if test "x$new_path" = x; then
25020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25021$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25022        has_space=`$ECHO "$complete" | $GREP " "`
25023        if test "x$has_space" != x; then
25024          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25025$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25026        fi
25027        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25028      fi
25029  fi
25030
25031      # Now join together the path and the arguments once again
25032      if test "x$arguments" != xEOL; then
25033        new_complete="$new_path ${arguments% *}"
25034      else
25035        new_complete="$new_path"
25036      fi
25037
25038  if test "x$complete" != "x$new_complete"; then
25039      STRIP="$new_complete"
25040      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25041$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25042    fi
25043
25044    # Extract the first word of "mcs", so it can be a program name with args.
25045set dummy mcs; ac_word=$2
25046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25047$as_echo_n "checking for $ac_word... " >&6; }
25048if test "${ac_cv_path_MCS+set}" = set; then :
25049  $as_echo_n "(cached) " >&6
25050else
25051  case $MCS in
25052  [\\/]* | ?:[\\/]*)
25053  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25054  ;;
25055  *)
25056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25057for as_dir in $PATH
25058do
25059  IFS=$as_save_IFS
25060  test -z "$as_dir" && as_dir=.
25061    for ac_exec_ext in '' $ac_executable_extensions; do
25062  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25063    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25065    break 2
25066  fi
25067done
25068  done
25069IFS=$as_save_IFS
25070
25071  ;;
25072esac
25073fi
25074MCS=$ac_cv_path_MCS
25075if test -n "$MCS"; then
25076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25077$as_echo "$MCS" >&6; }
25078else
25079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25080$as_echo "no" >&6; }
25081fi
25082
25083
25084
25085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25086
25087  # First separate the path from the arguments. This will split at the first
25088  # space.
25089  complete="$MCS"
25090  path="${complete%% *}"
25091  tmp="$complete EOL"
25092  arguments="${tmp#* }"
25093
25094  # Input might be given as Windows format, start by converting to
25095  # unix format.
25096  new_path=`$CYGPATH -u "$path"`
25097
25098  # Now try to locate executable using which
25099  new_path=`$WHICH "$new_path" 2> /dev/null`
25100  # bat and cmd files are not always considered executable in cygwin causing which
25101  # to not find them
25102  if test "x$new_path" = x \
25103           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25104           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25105    new_path=`$CYGPATH -u "$path"`
25106  fi
25107  if test "x$new_path" = x; then
25108    # Oops. Which didn't find the executable.
25109    # The splitting of arguments from the executable at a space might have been incorrect,
25110    # since paths with space are more likely in Windows. Give it another try with the whole
25111    # argument.
25112    path="$complete"
25113    arguments="EOL"
25114    new_path=`$CYGPATH -u "$path"`
25115    new_path=`$WHICH "$new_path" 2> /dev/null`
25116    # bat and cmd files are not always considered executable in cygwin causing which
25117    # to not find them
25118    if test "x$new_path" = x \
25119             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25120             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25121      new_path=`$CYGPATH -u "$path"`
25122    fi
25123    if test "x$new_path" = x; then
25124      # It's still not found. Now this is an unrecoverable error.
25125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25126$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25127      has_space=`$ECHO "$complete" | $GREP " "`
25128      if test "x$has_space" != x; then
25129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25131      fi
25132      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25133    fi
25134  fi
25135
25136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25139  # "foo.exe" is OK but "foo" is an error.
25140  #
25141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25142  # It is also a way to make sure we got the proper file name for the real test later on.
25143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25144  if test "x$test_shortpath" = x; then
25145    # Short path failed, file does not exist as specified.
25146    # Try adding .exe or .cmd
25147    if test -f "${new_path}.exe"; then
25148       input_to_shortpath="${new_path}.exe"
25149    elif test -f "${new_path}.cmd"; then
25150       input_to_shortpath="${new_path}.cmd"
25151    else
25152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25153$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25154      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25155$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25156      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25157    fi
25158  else
25159    input_to_shortpath="$new_path"
25160  fi
25161
25162  # Call helper function which possibly converts this using DOS-style short mode.
25163  # If so, the updated path is stored in $new_path.
25164  new_path="$input_to_shortpath"
25165
25166  input_path="$input_to_shortpath"
25167  # Check if we need to convert this using DOS-style short mode. If the path
25168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25169  # take no chances and rewrite it.
25170  # Note: m4 eats our [], so we need to use [ and ] instead.
25171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25172  if test "x$has_forbidden_chars" != x; then
25173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25177      # Going to short mode and back again did indeed matter. Since short mode is
25178      # case insensitive, let's make it lowercase to improve readability.
25179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25180      # Now convert it back to Unix-stile (cygpath)
25181      input_path=`$CYGPATH -u "$shortmode_path"`
25182      new_path="$input_path"
25183    fi
25184  fi
25185
25186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25187  if test "x$test_cygdrive_prefix" = x; then
25188    # As a simple fix, exclude /usr/bin since it's not a real path.
25189    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25191      # a path prefixed by /cygdrive for fixpath to work.
25192      new_path="$CYGWIN_ROOT_PATH$input_path"
25193    fi
25194  fi
25195
25196  # remove trailing .exe if any
25197  new_path="${new_path/%.exe/}"
25198
25199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25200
25201  # First separate the path from the arguments. This will split at the first
25202  # space.
25203  complete="$MCS"
25204  path="${complete%% *}"
25205  tmp="$complete EOL"
25206  arguments="${tmp#* }"
25207
25208  # Input might be given as Windows format, start by converting to
25209  # unix format.
25210  new_path="$path"
25211
25212  windows_path="$new_path"
25213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25214    unix_path=`$CYGPATH -u "$windows_path"`
25215    new_path="$unix_path"
25216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25218    new_path="$unix_path"
25219  fi
25220
25221
25222  # Now try to locate executable using which
25223  new_path=`$WHICH "$new_path" 2> /dev/null`
25224
25225  if test "x$new_path" = x; then
25226    # Oops. Which didn't find the executable.
25227    # The splitting of arguments from the executable at a space might have been incorrect,
25228    # since paths with space are more likely in Windows. Give it another try with the whole
25229    # argument.
25230    path="$complete"
25231    arguments="EOL"
25232    new_path="$path"
25233
25234  windows_path="$new_path"
25235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25236    unix_path=`$CYGPATH -u "$windows_path"`
25237    new_path="$unix_path"
25238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25240    new_path="$unix_path"
25241  fi
25242
25243
25244    new_path=`$WHICH "$new_path" 2> /dev/null`
25245
25246    if test "x$new_path" = x; then
25247      # It's still not found. Now this is an unrecoverable error.
25248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25249$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25250      has_space=`$ECHO "$complete" | $GREP " "`
25251      if test "x$has_space" != x; then
25252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25254      fi
25255      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25256    fi
25257  fi
25258
25259  # Now new_path has a complete unix path to the binary
25260  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25261    # Keep paths in /bin as-is, but remove trailing .exe if any
25262    new_path="${new_path/%.exe/}"
25263    # Do not save /bin paths to all_fixpath_prefixes!
25264  else
25265    # Not in mixed or Windows style, start by that.
25266    new_path=`cmd //c echo $new_path`
25267
25268  input_path="$new_path"
25269  # Check if we need to convert this using DOS-style short mode. If the path
25270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25271  # take no chances and rewrite it.
25272  # Note: m4 eats our [], so we need to use [ and ] instead.
25273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25274  if test "x$has_forbidden_chars" != x; then
25275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25277  fi
25278
25279    # Output is in $new_path
25280
25281  windows_path="$new_path"
25282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25283    unix_path=`$CYGPATH -u "$windows_path"`
25284    new_path="$unix_path"
25285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25287    new_path="$unix_path"
25288  fi
25289
25290    # remove trailing .exe if any
25291    new_path="${new_path/%.exe/}"
25292
25293    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25294    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25295  fi
25296
25297  else
25298    # We're on a posix platform. Hooray! :)
25299    # First separate the path from the arguments. This will split at the first
25300    # space.
25301    complete="$MCS"
25302    path="${complete%% *}"
25303    tmp="$complete EOL"
25304    arguments="${tmp#* }"
25305
25306    # Cannot rely on the command "which" here since it doesn't always work.
25307    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25308    if test -z "$is_absolute_path"; then
25309      # Path to executable is not absolute. Find it.
25310      IFS_save="$IFS"
25311      IFS=:
25312      for p in $PATH; do
25313        if test -f "$p/$path" && test -x "$p/$path"; then
25314          new_path="$p/$path"
25315          break
25316        fi
25317      done
25318      IFS="$IFS_save"
25319    else
25320      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25321$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25322      new_path="$path"
25323    fi
25324
25325    if test "x$new_path" = x; then
25326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25327$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25328        has_space=`$ECHO "$complete" | $GREP " "`
25329        if test "x$has_space" != x; then
25330          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25331$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25332        fi
25333        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25334      fi
25335  fi
25336
25337      # Now join together the path and the arguments once again
25338      if test "x$arguments" != xEOL; then
25339        new_complete="$new_path ${arguments% *}"
25340      else
25341        new_complete="$new_path"
25342      fi
25343
25344  if test "x$complete" != "x$new_complete"; then
25345      MCS="$new_complete"
25346      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25347$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25348    fi
25349
25350elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25351    if test -n "$ac_tool_prefix"; then
25352  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25353set dummy ${ac_tool_prefix}nm; ac_word=$2
25354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25355$as_echo_n "checking for $ac_word... " >&6; }
25356if test "${ac_cv_prog_NM+set}" = set; then :
25357  $as_echo_n "(cached) " >&6
25358else
25359  if test -n "$NM"; then
25360  ac_cv_prog_NM="$NM" # Let the user override the test.
25361else
25362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25363for as_dir in $PATH
25364do
25365  IFS=$as_save_IFS
25366  test -z "$as_dir" && as_dir=.
25367    for ac_exec_ext in '' $ac_executable_extensions; do
25368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25369    ac_cv_prog_NM="${ac_tool_prefix}nm"
25370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25371    break 2
25372  fi
25373done
25374  done
25375IFS=$as_save_IFS
25376
25377fi
25378fi
25379NM=$ac_cv_prog_NM
25380if test -n "$NM"; then
25381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25382$as_echo "$NM" >&6; }
25383else
25384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25385$as_echo "no" >&6; }
25386fi
25387
25388
25389fi
25390if test -z "$ac_cv_prog_NM"; then
25391  ac_ct_NM=$NM
25392  # Extract the first word of "nm", so it can be a program name with args.
25393set dummy nm; ac_word=$2
25394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25395$as_echo_n "checking for $ac_word... " >&6; }
25396if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25397  $as_echo_n "(cached) " >&6
25398else
25399  if test -n "$ac_ct_NM"; then
25400  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25401else
25402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25403for as_dir in $PATH
25404do
25405  IFS=$as_save_IFS
25406  test -z "$as_dir" && as_dir=.
25407    for ac_exec_ext in '' $ac_executable_extensions; do
25408  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25409    ac_cv_prog_ac_ct_NM="nm"
25410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25411    break 2
25412  fi
25413done
25414  done
25415IFS=$as_save_IFS
25416
25417fi
25418fi
25419ac_ct_NM=$ac_cv_prog_ac_ct_NM
25420if test -n "$ac_ct_NM"; then
25421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25422$as_echo "$ac_ct_NM" >&6; }
25423else
25424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25425$as_echo "no" >&6; }
25426fi
25427
25428  if test "x$ac_ct_NM" = x; then
25429    NM=""
25430  else
25431    case $cross_compiling:$ac_tool_warned in
25432yes:)
25433{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25434$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25435ac_tool_warned=yes ;;
25436esac
25437    NM=$ac_ct_NM
25438  fi
25439else
25440  NM="$ac_cv_prog_NM"
25441fi
25442
25443
25444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25445
25446  # First separate the path from the arguments. This will split at the first
25447  # space.
25448  complete="$NM"
25449  path="${complete%% *}"
25450  tmp="$complete EOL"
25451  arguments="${tmp#* }"
25452
25453  # Input might be given as Windows format, start by converting to
25454  # unix format.
25455  new_path=`$CYGPATH -u "$path"`
25456
25457  # Now try to locate executable using which
25458  new_path=`$WHICH "$new_path" 2> /dev/null`
25459  # bat and cmd files are not always considered executable in cygwin causing which
25460  # to not find them
25461  if test "x$new_path" = x \
25462           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25463           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25464    new_path=`$CYGPATH -u "$path"`
25465  fi
25466  if test "x$new_path" = x; then
25467    # Oops. Which didn't find the executable.
25468    # The splitting of arguments from the executable at a space might have been incorrect,
25469    # since paths with space are more likely in Windows. Give it another try with the whole
25470    # argument.
25471    path="$complete"
25472    arguments="EOL"
25473    new_path=`$CYGPATH -u "$path"`
25474    new_path=`$WHICH "$new_path" 2> /dev/null`
25475    # bat and cmd files are not always considered executable in cygwin causing which
25476    # to not find them
25477    if test "x$new_path" = x \
25478             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25479             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25480      new_path=`$CYGPATH -u "$path"`
25481    fi
25482    if test "x$new_path" = x; then
25483      # It's still not found. Now this is an unrecoverable error.
25484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25485$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25486      has_space=`$ECHO "$complete" | $GREP " "`
25487      if test "x$has_space" != x; then
25488        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25489$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25490      fi
25491      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25492    fi
25493  fi
25494
25495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25498  # "foo.exe" is OK but "foo" is an error.
25499  #
25500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25501  # It is also a way to make sure we got the proper file name for the real test later on.
25502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25503  if test "x$test_shortpath" = x; then
25504    # Short path failed, file does not exist as specified.
25505    # Try adding .exe or .cmd
25506    if test -f "${new_path}.exe"; then
25507       input_to_shortpath="${new_path}.exe"
25508    elif test -f "${new_path}.cmd"; then
25509       input_to_shortpath="${new_path}.cmd"
25510    else
25511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25512$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25513      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25514$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25515      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25516    fi
25517  else
25518    input_to_shortpath="$new_path"
25519  fi
25520
25521  # Call helper function which possibly converts this using DOS-style short mode.
25522  # If so, the updated path is stored in $new_path.
25523  new_path="$input_to_shortpath"
25524
25525  input_path="$input_to_shortpath"
25526  # Check if we need to convert this using DOS-style short mode. If the path
25527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25528  # take no chances and rewrite it.
25529  # Note: m4 eats our [], so we need to use [ and ] instead.
25530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25531  if test "x$has_forbidden_chars" != x; then
25532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25536      # Going to short mode and back again did indeed matter. Since short mode is
25537      # case insensitive, let's make it lowercase to improve readability.
25538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25539      # Now convert it back to Unix-stile (cygpath)
25540      input_path=`$CYGPATH -u "$shortmode_path"`
25541      new_path="$input_path"
25542    fi
25543  fi
25544
25545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25546  if test "x$test_cygdrive_prefix" = x; then
25547    # As a simple fix, exclude /usr/bin since it's not a real path.
25548    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25550      # a path prefixed by /cygdrive for fixpath to work.
25551      new_path="$CYGWIN_ROOT_PATH$input_path"
25552    fi
25553  fi
25554
25555  # remove trailing .exe if any
25556  new_path="${new_path/%.exe/}"
25557
25558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25559
25560  # First separate the path from the arguments. This will split at the first
25561  # space.
25562  complete="$NM"
25563  path="${complete%% *}"
25564  tmp="$complete EOL"
25565  arguments="${tmp#* }"
25566
25567  # Input might be given as Windows format, start by converting to
25568  # unix format.
25569  new_path="$path"
25570
25571  windows_path="$new_path"
25572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25573    unix_path=`$CYGPATH -u "$windows_path"`
25574    new_path="$unix_path"
25575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25577    new_path="$unix_path"
25578  fi
25579
25580
25581  # Now try to locate executable using which
25582  new_path=`$WHICH "$new_path" 2> /dev/null`
25583
25584  if test "x$new_path" = x; then
25585    # Oops. Which didn't find the executable.
25586    # The splitting of arguments from the executable at a space might have been incorrect,
25587    # since paths with space are more likely in Windows. Give it another try with the whole
25588    # argument.
25589    path="$complete"
25590    arguments="EOL"
25591    new_path="$path"
25592
25593  windows_path="$new_path"
25594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25595    unix_path=`$CYGPATH -u "$windows_path"`
25596    new_path="$unix_path"
25597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25599    new_path="$unix_path"
25600  fi
25601
25602
25603    new_path=`$WHICH "$new_path" 2> /dev/null`
25604
25605    if test "x$new_path" = x; then
25606      # It's still not found. Now this is an unrecoverable error.
25607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25608$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25609      has_space=`$ECHO "$complete" | $GREP " "`
25610      if test "x$has_space" != x; then
25611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25613      fi
25614      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25615    fi
25616  fi
25617
25618  # Now new_path has a complete unix path to the binary
25619  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25620    # Keep paths in /bin as-is, but remove trailing .exe if any
25621    new_path="${new_path/%.exe/}"
25622    # Do not save /bin paths to all_fixpath_prefixes!
25623  else
25624    # Not in mixed or Windows style, start by that.
25625    new_path=`cmd //c echo $new_path`
25626
25627  input_path="$new_path"
25628  # Check if we need to convert this using DOS-style short mode. If the path
25629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25630  # take no chances and rewrite it.
25631  # Note: m4 eats our [], so we need to use [ and ] instead.
25632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25633  if test "x$has_forbidden_chars" != x; then
25634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25636  fi
25637
25638    # Output is in $new_path
25639
25640  windows_path="$new_path"
25641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25642    unix_path=`$CYGPATH -u "$windows_path"`
25643    new_path="$unix_path"
25644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25646    new_path="$unix_path"
25647  fi
25648
25649    # remove trailing .exe if any
25650    new_path="${new_path/%.exe/}"
25651
25652    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25653    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25654  fi
25655
25656  else
25657    # We're on a posix platform. Hooray! :)
25658    # First separate the path from the arguments. This will split at the first
25659    # space.
25660    complete="$NM"
25661    path="${complete%% *}"
25662    tmp="$complete EOL"
25663    arguments="${tmp#* }"
25664
25665    # Cannot rely on the command "which" here since it doesn't always work.
25666    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25667    if test -z "$is_absolute_path"; then
25668      # Path to executable is not absolute. Find it.
25669      IFS_save="$IFS"
25670      IFS=:
25671      for p in $PATH; do
25672        if test -f "$p/$path" && test -x "$p/$path"; then
25673          new_path="$p/$path"
25674          break
25675        fi
25676      done
25677      IFS="$IFS_save"
25678    else
25679      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25680$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25681      new_path="$path"
25682    fi
25683
25684    if test "x$new_path" = x; then
25685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25686$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25687        has_space=`$ECHO "$complete" | $GREP " "`
25688        if test "x$has_space" != x; then
25689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25691        fi
25692        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25693      fi
25694  fi
25695
25696      # Now join together the path and the arguments once again
25697      if test "x$arguments" != xEOL; then
25698        new_complete="$new_path ${arguments% *}"
25699      else
25700        new_complete="$new_path"
25701      fi
25702
25703  if test "x$complete" != "x$new_complete"; then
25704      NM="$new_complete"
25705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25706$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25707    fi
25708
25709    if test -n "$ac_tool_prefix"; then
25710  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25711set dummy ${ac_tool_prefix}strip; ac_word=$2
25712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25713$as_echo_n "checking for $ac_word... " >&6; }
25714if test "${ac_cv_prog_STRIP+set}" = set; then :
25715  $as_echo_n "(cached) " >&6
25716else
25717  if test -n "$STRIP"; then
25718  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25719else
25720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25721for as_dir in $PATH
25722do
25723  IFS=$as_save_IFS
25724  test -z "$as_dir" && as_dir=.
25725    for ac_exec_ext in '' $ac_executable_extensions; do
25726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25727    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25729    break 2
25730  fi
25731done
25732  done
25733IFS=$as_save_IFS
25734
25735fi
25736fi
25737STRIP=$ac_cv_prog_STRIP
25738if test -n "$STRIP"; then
25739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25740$as_echo "$STRIP" >&6; }
25741else
25742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25743$as_echo "no" >&6; }
25744fi
25745
25746
25747fi
25748if test -z "$ac_cv_prog_STRIP"; then
25749  ac_ct_STRIP=$STRIP
25750  # Extract the first word of "strip", so it can be a program name with args.
25751set dummy strip; ac_word=$2
25752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25753$as_echo_n "checking for $ac_word... " >&6; }
25754if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25755  $as_echo_n "(cached) " >&6
25756else
25757  if test -n "$ac_ct_STRIP"; then
25758  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25759else
25760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25761for as_dir in $PATH
25762do
25763  IFS=$as_save_IFS
25764  test -z "$as_dir" && as_dir=.
25765    for ac_exec_ext in '' $ac_executable_extensions; do
25766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25767    ac_cv_prog_ac_ct_STRIP="strip"
25768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25769    break 2
25770  fi
25771done
25772  done
25773IFS=$as_save_IFS
25774
25775fi
25776fi
25777ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25778if test -n "$ac_ct_STRIP"; then
25779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25780$as_echo "$ac_ct_STRIP" >&6; }
25781else
25782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25783$as_echo "no" >&6; }
25784fi
25785
25786  if test "x$ac_ct_STRIP" = x; then
25787    STRIP=""
25788  else
25789    case $cross_compiling:$ac_tool_warned in
25790yes:)
25791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25793ac_tool_warned=yes ;;
25794esac
25795    STRIP=$ac_ct_STRIP
25796  fi
25797else
25798  STRIP="$ac_cv_prog_STRIP"
25799fi
25800
25801
25802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25803
25804  # First separate the path from the arguments. This will split at the first
25805  # space.
25806  complete="$STRIP"
25807  path="${complete%% *}"
25808  tmp="$complete EOL"
25809  arguments="${tmp#* }"
25810
25811  # Input might be given as Windows format, start by converting to
25812  # unix format.
25813  new_path=`$CYGPATH -u "$path"`
25814
25815  # Now try to locate executable using which
25816  new_path=`$WHICH "$new_path" 2> /dev/null`
25817  # bat and cmd files are not always considered executable in cygwin causing which
25818  # to not find them
25819  if test "x$new_path" = x \
25820           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25821           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25822    new_path=`$CYGPATH -u "$path"`
25823  fi
25824  if test "x$new_path" = x; then
25825    # Oops. Which didn't find the executable.
25826    # The splitting of arguments from the executable at a space might have been incorrect,
25827    # since paths with space are more likely in Windows. Give it another try with the whole
25828    # argument.
25829    path="$complete"
25830    arguments="EOL"
25831    new_path=`$CYGPATH -u "$path"`
25832    new_path=`$WHICH "$new_path" 2> /dev/null`
25833    # bat and cmd files are not always considered executable in cygwin causing which
25834    # to not find them
25835    if test "x$new_path" = x \
25836             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25837             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25838      new_path=`$CYGPATH -u "$path"`
25839    fi
25840    if test "x$new_path" = x; then
25841      # It's still not found. Now this is an unrecoverable error.
25842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25843$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25844      has_space=`$ECHO "$complete" | $GREP " "`
25845      if test "x$has_space" != x; then
25846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25848      fi
25849      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25850    fi
25851  fi
25852
25853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25856  # "foo.exe" is OK but "foo" is an error.
25857  #
25858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25859  # It is also a way to make sure we got the proper file name for the real test later on.
25860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25861  if test "x$test_shortpath" = x; then
25862    # Short path failed, file does not exist as specified.
25863    # Try adding .exe or .cmd
25864    if test -f "${new_path}.exe"; then
25865       input_to_shortpath="${new_path}.exe"
25866    elif test -f "${new_path}.cmd"; then
25867       input_to_shortpath="${new_path}.cmd"
25868    else
25869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25870$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25873      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25874    fi
25875  else
25876    input_to_shortpath="$new_path"
25877  fi
25878
25879  # Call helper function which possibly converts this using DOS-style short mode.
25880  # If so, the updated path is stored in $new_path.
25881  new_path="$input_to_shortpath"
25882
25883  input_path="$input_to_shortpath"
25884  # Check if we need to convert this using DOS-style short mode. If the path
25885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25886  # take no chances and rewrite it.
25887  # Note: m4 eats our [], so we need to use [ and ] instead.
25888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25889  if test "x$has_forbidden_chars" != x; then
25890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25894      # Going to short mode and back again did indeed matter. Since short mode is
25895      # case insensitive, let's make it lowercase to improve readability.
25896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25897      # Now convert it back to Unix-stile (cygpath)
25898      input_path=`$CYGPATH -u "$shortmode_path"`
25899      new_path="$input_path"
25900    fi
25901  fi
25902
25903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25904  if test "x$test_cygdrive_prefix" = x; then
25905    # As a simple fix, exclude /usr/bin since it's not a real path.
25906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25908      # a path prefixed by /cygdrive for fixpath to work.
25909      new_path="$CYGWIN_ROOT_PATH$input_path"
25910    fi
25911  fi
25912
25913  # remove trailing .exe if any
25914  new_path="${new_path/%.exe/}"
25915
25916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25917
25918  # First separate the path from the arguments. This will split at the first
25919  # space.
25920  complete="$STRIP"
25921  path="${complete%% *}"
25922  tmp="$complete EOL"
25923  arguments="${tmp#* }"
25924
25925  # Input might be given as Windows format, start by converting to
25926  # unix format.
25927  new_path="$path"
25928
25929  windows_path="$new_path"
25930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25931    unix_path=`$CYGPATH -u "$windows_path"`
25932    new_path="$unix_path"
25933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25935    new_path="$unix_path"
25936  fi
25937
25938
25939  # Now try to locate executable using which
25940  new_path=`$WHICH "$new_path" 2> /dev/null`
25941
25942  if test "x$new_path" = x; then
25943    # Oops. Which didn't find the executable.
25944    # The splitting of arguments from the executable at a space might have been incorrect,
25945    # since paths with space are more likely in Windows. Give it another try with the whole
25946    # argument.
25947    path="$complete"
25948    arguments="EOL"
25949    new_path="$path"
25950
25951  windows_path="$new_path"
25952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25953    unix_path=`$CYGPATH -u "$windows_path"`
25954    new_path="$unix_path"
25955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25957    new_path="$unix_path"
25958  fi
25959
25960
25961    new_path=`$WHICH "$new_path" 2> /dev/null`
25962
25963    if test "x$new_path" = x; then
25964      # It's still not found. Now this is an unrecoverable error.
25965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25966$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25967      has_space=`$ECHO "$complete" | $GREP " "`
25968      if test "x$has_space" != x; then
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25971      fi
25972      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25973    fi
25974  fi
25975
25976  # Now new_path has a complete unix path to the binary
25977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25978    # Keep paths in /bin as-is, but remove trailing .exe if any
25979    new_path="${new_path/%.exe/}"
25980    # Do not save /bin paths to all_fixpath_prefixes!
25981  else
25982    # Not in mixed or Windows style, start by that.
25983    new_path=`cmd //c echo $new_path`
25984
25985  input_path="$new_path"
25986  # Check if we need to convert this using DOS-style short mode. If the path
25987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25988  # take no chances and rewrite it.
25989  # Note: m4 eats our [], so we need to use [ and ] instead.
25990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25991  if test "x$has_forbidden_chars" != x; then
25992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25994  fi
25995
25996    # Output is in $new_path
25997
25998  windows_path="$new_path"
25999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26000    unix_path=`$CYGPATH -u "$windows_path"`
26001    new_path="$unix_path"
26002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26004    new_path="$unix_path"
26005  fi
26006
26007    # remove trailing .exe if any
26008    new_path="${new_path/%.exe/}"
26009
26010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26012  fi
26013
26014  else
26015    # We're on a posix platform. Hooray! :)
26016    # First separate the path from the arguments. This will split at the first
26017    # space.
26018    complete="$STRIP"
26019    path="${complete%% *}"
26020    tmp="$complete EOL"
26021    arguments="${tmp#* }"
26022
26023    # Cannot rely on the command "which" here since it doesn't always work.
26024    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26025    if test -z "$is_absolute_path"; then
26026      # Path to executable is not absolute. Find it.
26027      IFS_save="$IFS"
26028      IFS=:
26029      for p in $PATH; do
26030        if test -f "$p/$path" && test -x "$p/$path"; then
26031          new_path="$p/$path"
26032          break
26033        fi
26034      done
26035      IFS="$IFS_save"
26036    else
26037      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26038$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26039      new_path="$path"
26040    fi
26041
26042    if test "x$new_path" = x; then
26043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26044$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26045        has_space=`$ECHO "$complete" | $GREP " "`
26046        if test "x$has_space" != x; then
26047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26049        fi
26050        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26051      fi
26052  fi
26053
26054      # Now join together the path and the arguments once again
26055      if test "x$arguments" != xEOL; then
26056        new_complete="$new_path ${arguments% *}"
26057      else
26058        new_complete="$new_path"
26059      fi
26060
26061  if test "x$complete" != "x$new_complete"; then
26062      STRIP="$new_complete"
26063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26064$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26065    fi
26066
26067fi
26068
26069# objcopy is used for moving debug symbols to separate files when
26070# full debug symbols are enabled.
26071if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26072    if test -n "$ac_tool_prefix"; then
26073  for ac_prog in gobjcopy objcopy
26074  do
26075    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26078$as_echo_n "checking for $ac_word... " >&6; }
26079if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26080  $as_echo_n "(cached) " >&6
26081else
26082  if test -n "$OBJCOPY"; then
26083  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26084else
26085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26086for as_dir in $PATH
26087do
26088  IFS=$as_save_IFS
26089  test -z "$as_dir" && as_dir=.
26090    for ac_exec_ext in '' $ac_executable_extensions; do
26091  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26092    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26094    break 2
26095  fi
26096done
26097  done
26098IFS=$as_save_IFS
26099
26100fi
26101fi
26102OBJCOPY=$ac_cv_prog_OBJCOPY
26103if test -n "$OBJCOPY"; then
26104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26105$as_echo "$OBJCOPY" >&6; }
26106else
26107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26108$as_echo "no" >&6; }
26109fi
26110
26111
26112    test -n "$OBJCOPY" && break
26113  done
26114fi
26115if test -z "$OBJCOPY"; then
26116  ac_ct_OBJCOPY=$OBJCOPY
26117  for ac_prog in gobjcopy objcopy
26118do
26119  # Extract the first word of "$ac_prog", so it can be a program name with args.
26120set dummy $ac_prog; ac_word=$2
26121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26122$as_echo_n "checking for $ac_word... " >&6; }
26123if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26124  $as_echo_n "(cached) " >&6
26125else
26126  if test -n "$ac_ct_OBJCOPY"; then
26127  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26128else
26129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26130for as_dir in $PATH
26131do
26132  IFS=$as_save_IFS
26133  test -z "$as_dir" && as_dir=.
26134    for ac_exec_ext in '' $ac_executable_extensions; do
26135  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26136    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26138    break 2
26139  fi
26140done
26141  done
26142IFS=$as_save_IFS
26143
26144fi
26145fi
26146ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26147if test -n "$ac_ct_OBJCOPY"; then
26148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26149$as_echo "$ac_ct_OBJCOPY" >&6; }
26150else
26151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26152$as_echo "no" >&6; }
26153fi
26154
26155
26156  test -n "$ac_ct_OBJCOPY" && break
26157done
26158
26159  if test "x$ac_ct_OBJCOPY" = x; then
26160    OBJCOPY=""
26161  else
26162    case $cross_compiling:$ac_tool_warned in
26163yes:)
26164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26166ac_tool_warned=yes ;;
26167esac
26168    OBJCOPY=$ac_ct_OBJCOPY
26169  fi
26170fi
26171
26172    # Only call fixup if objcopy was found.
26173    if test -n "$OBJCOPY"; then
26174
26175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26176
26177  # First separate the path from the arguments. This will split at the first
26178  # space.
26179  complete="$OBJCOPY"
26180  path="${complete%% *}"
26181  tmp="$complete EOL"
26182  arguments="${tmp#* }"
26183
26184  # Input might be given as Windows format, start by converting to
26185  # unix format.
26186  new_path=`$CYGPATH -u "$path"`
26187
26188  # Now try to locate executable using which
26189  new_path=`$WHICH "$new_path" 2> /dev/null`
26190  # bat and cmd files are not always considered executable in cygwin causing which
26191  # to not find them
26192  if test "x$new_path" = x \
26193           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26194           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26195    new_path=`$CYGPATH -u "$path"`
26196  fi
26197  if test "x$new_path" = x; then
26198    # Oops. Which didn't find the executable.
26199    # The splitting of arguments from the executable at a space might have been incorrect,
26200    # since paths with space are more likely in Windows. Give it another try with the whole
26201    # argument.
26202    path="$complete"
26203    arguments="EOL"
26204    new_path=`$CYGPATH -u "$path"`
26205    new_path=`$WHICH "$new_path" 2> /dev/null`
26206    # bat and cmd files are not always considered executable in cygwin causing which
26207    # to not find them
26208    if test "x$new_path" = x \
26209             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26210             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26211      new_path=`$CYGPATH -u "$path"`
26212    fi
26213    if test "x$new_path" = x; then
26214      # It's still not found. Now this is an unrecoverable error.
26215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26216$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26217      has_space=`$ECHO "$complete" | $GREP " "`
26218      if test "x$has_space" != x; then
26219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26221      fi
26222      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26223    fi
26224  fi
26225
26226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26229  # "foo.exe" is OK but "foo" is an error.
26230  #
26231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26232  # It is also a way to make sure we got the proper file name for the real test later on.
26233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26234  if test "x$test_shortpath" = x; then
26235    # Short path failed, file does not exist as specified.
26236    # Try adding .exe or .cmd
26237    if test -f "${new_path}.exe"; then
26238       input_to_shortpath="${new_path}.exe"
26239    elif test -f "${new_path}.cmd"; then
26240       input_to_shortpath="${new_path}.cmd"
26241    else
26242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26243$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26246      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26247    fi
26248  else
26249    input_to_shortpath="$new_path"
26250  fi
26251
26252  # Call helper function which possibly converts this using DOS-style short mode.
26253  # If so, the updated path is stored in $new_path.
26254  new_path="$input_to_shortpath"
26255
26256  input_path="$input_to_shortpath"
26257  # Check if we need to convert this using DOS-style short mode. If the path
26258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26259  # take no chances and rewrite it.
26260  # Note: m4 eats our [], so we need to use [ and ] instead.
26261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26262  if test "x$has_forbidden_chars" != x; then
26263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26267      # Going to short mode and back again did indeed matter. Since short mode is
26268      # case insensitive, let's make it lowercase to improve readability.
26269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26270      # Now convert it back to Unix-stile (cygpath)
26271      input_path=`$CYGPATH -u "$shortmode_path"`
26272      new_path="$input_path"
26273    fi
26274  fi
26275
26276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26277  if test "x$test_cygdrive_prefix" = x; then
26278    # As a simple fix, exclude /usr/bin since it's not a real path.
26279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26281      # a path prefixed by /cygdrive for fixpath to work.
26282      new_path="$CYGWIN_ROOT_PATH$input_path"
26283    fi
26284  fi
26285
26286  # remove trailing .exe if any
26287  new_path="${new_path/%.exe/}"
26288
26289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26290
26291  # First separate the path from the arguments. This will split at the first
26292  # space.
26293  complete="$OBJCOPY"
26294  path="${complete%% *}"
26295  tmp="$complete EOL"
26296  arguments="${tmp#* }"
26297
26298  # Input might be given as Windows format, start by converting to
26299  # unix format.
26300  new_path="$path"
26301
26302  windows_path="$new_path"
26303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26304    unix_path=`$CYGPATH -u "$windows_path"`
26305    new_path="$unix_path"
26306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26308    new_path="$unix_path"
26309  fi
26310
26311
26312  # Now try to locate executable using which
26313  new_path=`$WHICH "$new_path" 2> /dev/null`
26314
26315  if test "x$new_path" = x; then
26316    # Oops. Which didn't find the executable.
26317    # The splitting of arguments from the executable at a space might have been incorrect,
26318    # since paths with space are more likely in Windows. Give it another try with the whole
26319    # argument.
26320    path="$complete"
26321    arguments="EOL"
26322    new_path="$path"
26323
26324  windows_path="$new_path"
26325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26326    unix_path=`$CYGPATH -u "$windows_path"`
26327    new_path="$unix_path"
26328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26330    new_path="$unix_path"
26331  fi
26332
26333
26334    new_path=`$WHICH "$new_path" 2> /dev/null`
26335
26336    if test "x$new_path" = x; then
26337      # It's still not found. Now this is an unrecoverable error.
26338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26339$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26340      has_space=`$ECHO "$complete" | $GREP " "`
26341      if test "x$has_space" != x; then
26342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26344      fi
26345      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26346    fi
26347  fi
26348
26349  # Now new_path has a complete unix path to the binary
26350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26351    # Keep paths in /bin as-is, but remove trailing .exe if any
26352    new_path="${new_path/%.exe/}"
26353    # Do not save /bin paths to all_fixpath_prefixes!
26354  else
26355    # Not in mixed or Windows style, start by that.
26356    new_path=`cmd //c echo $new_path`
26357
26358  input_path="$new_path"
26359  # Check if we need to convert this using DOS-style short mode. If the path
26360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26361  # take no chances and rewrite it.
26362  # Note: m4 eats our [], so we need to use [ and ] instead.
26363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26364  if test "x$has_forbidden_chars" != x; then
26365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26367  fi
26368
26369    # Output is in $new_path
26370
26371  windows_path="$new_path"
26372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26373    unix_path=`$CYGPATH -u "$windows_path"`
26374    new_path="$unix_path"
26375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26377    new_path="$unix_path"
26378  fi
26379
26380    # remove trailing .exe if any
26381    new_path="${new_path/%.exe/}"
26382
26383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26385  fi
26386
26387  else
26388    # We're on a posix platform. Hooray! :)
26389    # First separate the path from the arguments. This will split at the first
26390    # space.
26391    complete="$OBJCOPY"
26392    path="${complete%% *}"
26393    tmp="$complete EOL"
26394    arguments="${tmp#* }"
26395
26396    # Cannot rely on the command "which" here since it doesn't always work.
26397    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26398    if test -z "$is_absolute_path"; then
26399      # Path to executable is not absolute. Find it.
26400      IFS_save="$IFS"
26401      IFS=:
26402      for p in $PATH; do
26403        if test -f "$p/$path" && test -x "$p/$path"; then
26404          new_path="$p/$path"
26405          break
26406        fi
26407      done
26408      IFS="$IFS_save"
26409    else
26410      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26411$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26412      new_path="$path"
26413    fi
26414
26415    if test "x$new_path" = x; then
26416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26417$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26418        has_space=`$ECHO "$complete" | $GREP " "`
26419        if test "x$has_space" != x; then
26420          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26421$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26422        fi
26423        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26424      fi
26425  fi
26426
26427      # Now join together the path and the arguments once again
26428      if test "x$arguments" != xEOL; then
26429        new_complete="$new_path ${arguments% *}"
26430      else
26431        new_complete="$new_path"
26432      fi
26433
26434  if test "x$complete" != "x$new_complete"; then
26435      OBJCOPY="$new_complete"
26436      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26437$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26438    fi
26439
26440    fi
26441fi
26442
26443if test -n "$ac_tool_prefix"; then
26444  for ac_prog in gobjdump objdump
26445  do
26446    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26447set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26449$as_echo_n "checking for $ac_word... " >&6; }
26450if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26451  $as_echo_n "(cached) " >&6
26452else
26453  if test -n "$OBJDUMP"; then
26454  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26455else
26456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26457for as_dir in $PATH
26458do
26459  IFS=$as_save_IFS
26460  test -z "$as_dir" && as_dir=.
26461    for ac_exec_ext in '' $ac_executable_extensions; do
26462  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26463    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26465    break 2
26466  fi
26467done
26468  done
26469IFS=$as_save_IFS
26470
26471fi
26472fi
26473OBJDUMP=$ac_cv_prog_OBJDUMP
26474if test -n "$OBJDUMP"; then
26475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26476$as_echo "$OBJDUMP" >&6; }
26477else
26478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26479$as_echo "no" >&6; }
26480fi
26481
26482
26483    test -n "$OBJDUMP" && break
26484  done
26485fi
26486if test -z "$OBJDUMP"; then
26487  ac_ct_OBJDUMP=$OBJDUMP
26488  for ac_prog in gobjdump objdump
26489do
26490  # Extract the first word of "$ac_prog", so it can be a program name with args.
26491set dummy $ac_prog; ac_word=$2
26492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26493$as_echo_n "checking for $ac_word... " >&6; }
26494if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26495  $as_echo_n "(cached) " >&6
26496else
26497  if test -n "$ac_ct_OBJDUMP"; then
26498  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26499else
26500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26501for as_dir in $PATH
26502do
26503  IFS=$as_save_IFS
26504  test -z "$as_dir" && as_dir=.
26505    for ac_exec_ext in '' $ac_executable_extensions; do
26506  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26507    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26509    break 2
26510  fi
26511done
26512  done
26513IFS=$as_save_IFS
26514
26515fi
26516fi
26517ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26518if test -n "$ac_ct_OBJDUMP"; then
26519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26520$as_echo "$ac_ct_OBJDUMP" >&6; }
26521else
26522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26523$as_echo "no" >&6; }
26524fi
26525
26526
26527  test -n "$ac_ct_OBJDUMP" && break
26528done
26529
26530  if test "x$ac_ct_OBJDUMP" = x; then
26531    OBJDUMP=""
26532  else
26533    case $cross_compiling:$ac_tool_warned in
26534yes:)
26535{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26536$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26537ac_tool_warned=yes ;;
26538esac
26539    OBJDUMP=$ac_ct_OBJDUMP
26540  fi
26541fi
26542
26543if test "x$OBJDUMP" != x; then
26544  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26545
26546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26547
26548  # First separate the path from the arguments. This will split at the first
26549  # space.
26550  complete="$OBJDUMP"
26551  path="${complete%% *}"
26552  tmp="$complete EOL"
26553  arguments="${tmp#* }"
26554
26555  # Input might be given as Windows format, start by converting to
26556  # unix format.
26557  new_path=`$CYGPATH -u "$path"`
26558
26559  # Now try to locate executable using which
26560  new_path=`$WHICH "$new_path" 2> /dev/null`
26561  # bat and cmd files are not always considered executable in cygwin causing which
26562  # to not find them
26563  if test "x$new_path" = x \
26564           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26565           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26566    new_path=`$CYGPATH -u "$path"`
26567  fi
26568  if test "x$new_path" = x; then
26569    # Oops. Which didn't find the executable.
26570    # The splitting of arguments from the executable at a space might have been incorrect,
26571    # since paths with space are more likely in Windows. Give it another try with the whole
26572    # argument.
26573    path="$complete"
26574    arguments="EOL"
26575    new_path=`$CYGPATH -u "$path"`
26576    new_path=`$WHICH "$new_path" 2> /dev/null`
26577    # bat and cmd files are not always considered executable in cygwin causing which
26578    # to not find them
26579    if test "x$new_path" = x \
26580             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26581             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26582      new_path=`$CYGPATH -u "$path"`
26583    fi
26584    if test "x$new_path" = x; then
26585      # It's still not found. Now this is an unrecoverable error.
26586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26587$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26588      has_space=`$ECHO "$complete" | $GREP " "`
26589      if test "x$has_space" != x; then
26590        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26591$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26592      fi
26593      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26594    fi
26595  fi
26596
26597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26600  # "foo.exe" is OK but "foo" is an error.
26601  #
26602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26603  # It is also a way to make sure we got the proper file name for the real test later on.
26604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26605  if test "x$test_shortpath" = x; then
26606    # Short path failed, file does not exist as specified.
26607    # Try adding .exe or .cmd
26608    if test -f "${new_path}.exe"; then
26609       input_to_shortpath="${new_path}.exe"
26610    elif test -f "${new_path}.cmd"; then
26611       input_to_shortpath="${new_path}.cmd"
26612    else
26613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26614$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26615      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26616$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26617      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26618    fi
26619  else
26620    input_to_shortpath="$new_path"
26621  fi
26622
26623  # Call helper function which possibly converts this using DOS-style short mode.
26624  # If so, the updated path is stored in $new_path.
26625  new_path="$input_to_shortpath"
26626
26627  input_path="$input_to_shortpath"
26628  # Check if we need to convert this using DOS-style short mode. If the path
26629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26630  # take no chances and rewrite it.
26631  # Note: m4 eats our [], so we need to use [ and ] instead.
26632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26633  if test "x$has_forbidden_chars" != x; then
26634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26638      # Going to short mode and back again did indeed matter. Since short mode is
26639      # case insensitive, let's make it lowercase to improve readability.
26640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26641      # Now convert it back to Unix-stile (cygpath)
26642      input_path=`$CYGPATH -u "$shortmode_path"`
26643      new_path="$input_path"
26644    fi
26645  fi
26646
26647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26648  if test "x$test_cygdrive_prefix" = x; then
26649    # As a simple fix, exclude /usr/bin since it's not a real path.
26650    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26652      # a path prefixed by /cygdrive for fixpath to work.
26653      new_path="$CYGWIN_ROOT_PATH$input_path"
26654    fi
26655  fi
26656
26657  # remove trailing .exe if any
26658  new_path="${new_path/%.exe/}"
26659
26660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26661
26662  # First separate the path from the arguments. This will split at the first
26663  # space.
26664  complete="$OBJDUMP"
26665  path="${complete%% *}"
26666  tmp="$complete EOL"
26667  arguments="${tmp#* }"
26668
26669  # Input might be given as Windows format, start by converting to
26670  # unix format.
26671  new_path="$path"
26672
26673  windows_path="$new_path"
26674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26675    unix_path=`$CYGPATH -u "$windows_path"`
26676    new_path="$unix_path"
26677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26679    new_path="$unix_path"
26680  fi
26681
26682
26683  # Now try to locate executable using which
26684  new_path=`$WHICH "$new_path" 2> /dev/null`
26685
26686  if test "x$new_path" = x; then
26687    # Oops. Which didn't find the executable.
26688    # The splitting of arguments from the executable at a space might have been incorrect,
26689    # since paths with space are more likely in Windows. Give it another try with the whole
26690    # argument.
26691    path="$complete"
26692    arguments="EOL"
26693    new_path="$path"
26694
26695  windows_path="$new_path"
26696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26697    unix_path=`$CYGPATH -u "$windows_path"`
26698    new_path="$unix_path"
26699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26701    new_path="$unix_path"
26702  fi
26703
26704
26705    new_path=`$WHICH "$new_path" 2> /dev/null`
26706
26707    if test "x$new_path" = x; then
26708      # It's still not found. Now this is an unrecoverable error.
26709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26710$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26711      has_space=`$ECHO "$complete" | $GREP " "`
26712      if test "x$has_space" != x; then
26713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26715      fi
26716      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26717    fi
26718  fi
26719
26720  # Now new_path has a complete unix path to the binary
26721  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26722    # Keep paths in /bin as-is, but remove trailing .exe if any
26723    new_path="${new_path/%.exe/}"
26724    # Do not save /bin paths to all_fixpath_prefixes!
26725  else
26726    # Not in mixed or Windows style, start by that.
26727    new_path=`cmd //c echo $new_path`
26728
26729  input_path="$new_path"
26730  # Check if we need to convert this using DOS-style short mode. If the path
26731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26732  # take no chances and rewrite it.
26733  # Note: m4 eats our [], so we need to use [ and ] instead.
26734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26735  if test "x$has_forbidden_chars" != x; then
26736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26738  fi
26739
26740    # Output is in $new_path
26741
26742  windows_path="$new_path"
26743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26744    unix_path=`$CYGPATH -u "$windows_path"`
26745    new_path="$unix_path"
26746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26748    new_path="$unix_path"
26749  fi
26750
26751    # remove trailing .exe if any
26752    new_path="${new_path/%.exe/}"
26753
26754    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26755    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26756  fi
26757
26758  else
26759    # We're on a posix platform. Hooray! :)
26760    # First separate the path from the arguments. This will split at the first
26761    # space.
26762    complete="$OBJDUMP"
26763    path="${complete%% *}"
26764    tmp="$complete EOL"
26765    arguments="${tmp#* }"
26766
26767    # Cannot rely on the command "which" here since it doesn't always work.
26768    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26769    if test -z "$is_absolute_path"; then
26770      # Path to executable is not absolute. Find it.
26771      IFS_save="$IFS"
26772      IFS=:
26773      for p in $PATH; do
26774        if test -f "$p/$path" && test -x "$p/$path"; then
26775          new_path="$p/$path"
26776          break
26777        fi
26778      done
26779      IFS="$IFS_save"
26780    else
26781      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26782$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26783      new_path="$path"
26784    fi
26785
26786    if test "x$new_path" = x; then
26787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26788$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26789        has_space=`$ECHO "$complete" | $GREP " "`
26790        if test "x$has_space" != x; then
26791          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26792$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26793        fi
26794        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26795      fi
26796  fi
26797
26798      # Now join together the path and the arguments once again
26799      if test "x$arguments" != xEOL; then
26800        new_complete="$new_path ${arguments% *}"
26801      else
26802        new_complete="$new_path"
26803      fi
26804
26805  if test "x$complete" != "x$new_complete"; then
26806      OBJDUMP="$new_complete"
26807      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26808$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26809    fi
26810
26811fi
26812
26813if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26814   # Extract the first word of "lipo", so it can be a program name with args.
26815set dummy lipo; ac_word=$2
26816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26817$as_echo_n "checking for $ac_word... " >&6; }
26818if test "${ac_cv_path_LIPO+set}" = set; then :
26819  $as_echo_n "(cached) " >&6
26820else
26821  case $LIPO in
26822  [\\/]* | ?:[\\/]*)
26823  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26824  ;;
26825  *)
26826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26827for as_dir in $PATH
26828do
26829  IFS=$as_save_IFS
26830  test -z "$as_dir" && as_dir=.
26831    for ac_exec_ext in '' $ac_executable_extensions; do
26832  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26833    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26835    break 2
26836  fi
26837done
26838  done
26839IFS=$as_save_IFS
26840
26841  ;;
26842esac
26843fi
26844LIPO=$ac_cv_path_LIPO
26845if test -n "$LIPO"; then
26846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26847$as_echo "$LIPO" >&6; }
26848else
26849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26850$as_echo "no" >&6; }
26851fi
26852
26853
26854
26855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26856
26857  # First separate the path from the arguments. This will split at the first
26858  # space.
26859  complete="$LIPO"
26860  path="${complete%% *}"
26861  tmp="$complete EOL"
26862  arguments="${tmp#* }"
26863
26864  # Input might be given as Windows format, start by converting to
26865  # unix format.
26866  new_path=`$CYGPATH -u "$path"`
26867
26868  # Now try to locate executable using which
26869  new_path=`$WHICH "$new_path" 2> /dev/null`
26870  # bat and cmd files are not always considered executable in cygwin causing which
26871  # to not find them
26872  if test "x$new_path" = x \
26873           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26874           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26875    new_path=`$CYGPATH -u "$path"`
26876  fi
26877  if test "x$new_path" = x; then
26878    # Oops. Which didn't find the executable.
26879    # The splitting of arguments from the executable at a space might have been incorrect,
26880    # since paths with space are more likely in Windows. Give it another try with the whole
26881    # argument.
26882    path="$complete"
26883    arguments="EOL"
26884    new_path=`$CYGPATH -u "$path"`
26885    new_path=`$WHICH "$new_path" 2> /dev/null`
26886    # bat and cmd files are not always considered executable in cygwin causing which
26887    # to not find them
26888    if test "x$new_path" = x \
26889             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26890             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26891      new_path=`$CYGPATH -u "$path"`
26892    fi
26893    if test "x$new_path" = x; then
26894      # It's still not found. Now this is an unrecoverable error.
26895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26896$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26897      has_space=`$ECHO "$complete" | $GREP " "`
26898      if test "x$has_space" != x; then
26899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26901      fi
26902      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26903    fi
26904  fi
26905
26906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26909  # "foo.exe" is OK but "foo" is an error.
26910  #
26911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26912  # It is also a way to make sure we got the proper file name for the real test later on.
26913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26914  if test "x$test_shortpath" = x; then
26915    # Short path failed, file does not exist as specified.
26916    # Try adding .exe or .cmd
26917    if test -f "${new_path}.exe"; then
26918       input_to_shortpath="${new_path}.exe"
26919    elif test -f "${new_path}.cmd"; then
26920       input_to_shortpath="${new_path}.cmd"
26921    else
26922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26923$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26924      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26925$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26926      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26927    fi
26928  else
26929    input_to_shortpath="$new_path"
26930  fi
26931
26932  # Call helper function which possibly converts this using DOS-style short mode.
26933  # If so, the updated path is stored in $new_path.
26934  new_path="$input_to_shortpath"
26935
26936  input_path="$input_to_shortpath"
26937  # Check if we need to convert this using DOS-style short mode. If the path
26938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26939  # take no chances and rewrite it.
26940  # Note: m4 eats our [], so we need to use [ and ] instead.
26941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26942  if test "x$has_forbidden_chars" != x; then
26943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26947      # Going to short mode and back again did indeed matter. Since short mode is
26948      # case insensitive, let's make it lowercase to improve readability.
26949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26950      # Now convert it back to Unix-stile (cygpath)
26951      input_path=`$CYGPATH -u "$shortmode_path"`
26952      new_path="$input_path"
26953    fi
26954  fi
26955
26956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26957  if test "x$test_cygdrive_prefix" = x; then
26958    # As a simple fix, exclude /usr/bin since it's not a real path.
26959    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26961      # a path prefixed by /cygdrive for fixpath to work.
26962      new_path="$CYGWIN_ROOT_PATH$input_path"
26963    fi
26964  fi
26965
26966  # remove trailing .exe if any
26967  new_path="${new_path/%.exe/}"
26968
26969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26970
26971  # First separate the path from the arguments. This will split at the first
26972  # space.
26973  complete="$LIPO"
26974  path="${complete%% *}"
26975  tmp="$complete EOL"
26976  arguments="${tmp#* }"
26977
26978  # Input might be given as Windows format, start by converting to
26979  # unix format.
26980  new_path="$path"
26981
26982  windows_path="$new_path"
26983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26984    unix_path=`$CYGPATH -u "$windows_path"`
26985    new_path="$unix_path"
26986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26988    new_path="$unix_path"
26989  fi
26990
26991
26992  # Now try to locate executable using which
26993  new_path=`$WHICH "$new_path" 2> /dev/null`
26994
26995  if test "x$new_path" = x; then
26996    # Oops. Which didn't find the executable.
26997    # The splitting of arguments from the executable at a space might have been incorrect,
26998    # since paths with space are more likely in Windows. Give it another try with the whole
26999    # argument.
27000    path="$complete"
27001    arguments="EOL"
27002    new_path="$path"
27003
27004  windows_path="$new_path"
27005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27006    unix_path=`$CYGPATH -u "$windows_path"`
27007    new_path="$unix_path"
27008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27010    new_path="$unix_path"
27011  fi
27012
27013
27014    new_path=`$WHICH "$new_path" 2> /dev/null`
27015
27016    if test "x$new_path" = x; then
27017      # It's still not found. Now this is an unrecoverable error.
27018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27019$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27020      has_space=`$ECHO "$complete" | $GREP " "`
27021      if test "x$has_space" != x; then
27022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27024      fi
27025      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27026    fi
27027  fi
27028
27029  # Now new_path has a complete unix path to the binary
27030  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27031    # Keep paths in /bin as-is, but remove trailing .exe if any
27032    new_path="${new_path/%.exe/}"
27033    # Do not save /bin paths to all_fixpath_prefixes!
27034  else
27035    # Not in mixed or Windows style, start by that.
27036    new_path=`cmd //c echo $new_path`
27037
27038  input_path="$new_path"
27039  # Check if we need to convert this using DOS-style short mode. If the path
27040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27041  # take no chances and rewrite it.
27042  # Note: m4 eats our [], so we need to use [ and ] instead.
27043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27044  if test "x$has_forbidden_chars" != x; then
27045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27047  fi
27048
27049    # Output is in $new_path
27050
27051  windows_path="$new_path"
27052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27053    unix_path=`$CYGPATH -u "$windows_path"`
27054    new_path="$unix_path"
27055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27057    new_path="$unix_path"
27058  fi
27059
27060    # remove trailing .exe if any
27061    new_path="${new_path/%.exe/}"
27062
27063    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27064    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27065  fi
27066
27067  else
27068    # We're on a posix platform. Hooray! :)
27069    # First separate the path from the arguments. This will split at the first
27070    # space.
27071    complete="$LIPO"
27072    path="${complete%% *}"
27073    tmp="$complete EOL"
27074    arguments="${tmp#* }"
27075
27076    # Cannot rely on the command "which" here since it doesn't always work.
27077    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27078    if test -z "$is_absolute_path"; then
27079      # Path to executable is not absolute. Find it.
27080      IFS_save="$IFS"
27081      IFS=:
27082      for p in $PATH; do
27083        if test -f "$p/$path" && test -x "$p/$path"; then
27084          new_path="$p/$path"
27085          break
27086        fi
27087      done
27088      IFS="$IFS_save"
27089    else
27090      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27091$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27092      new_path="$path"
27093    fi
27094
27095    if test "x$new_path" = x; then
27096        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27097$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27098        has_space=`$ECHO "$complete" | $GREP " "`
27099        if test "x$has_space" != x; then
27100          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27101$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27102        fi
27103        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27104      fi
27105  fi
27106
27107      # Now join together the path and the arguments once again
27108      if test "x$arguments" != xEOL; then
27109        new_complete="$new_path ${arguments% *}"
27110      else
27111        new_complete="$new_path"
27112      fi
27113
27114  if test "x$complete" != "x$new_complete"; then
27115      LIPO="$new_complete"
27116      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27117$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27118    fi
27119
27120fi
27121
27122# Restore old path without tools dir
27123PATH="$OLD_PATH"
27124
27125
27126# FIXME: Currently we must test this after paths but before flags. Fix!
27127
27128# And we can test some aspects on the target using configure macros.
27129
27130
27131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27132$as_echo_n "checking for ANSI C header files... " >&6; }
27133if test "${ac_cv_header_stdc+set}" = set; then :
27134  $as_echo_n "(cached) " >&6
27135else
27136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27137/* end confdefs.h.  */
27138#include <stdlib.h>
27139#include <stdarg.h>
27140#include <string.h>
27141#include <float.h>
27142
27143int
27144main ()
27145{
27146
27147  ;
27148  return 0;
27149}
27150_ACEOF
27151if ac_fn_cxx_try_compile "$LINENO"; then :
27152  ac_cv_header_stdc=yes
27153else
27154  ac_cv_header_stdc=no
27155fi
27156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27157
27158if test $ac_cv_header_stdc = yes; then
27159  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27161/* end confdefs.h.  */
27162#include <string.h>
27163
27164_ACEOF
27165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27166  $EGREP "memchr" >/dev/null 2>&1; then :
27167
27168else
27169  ac_cv_header_stdc=no
27170fi
27171rm -f conftest*
27172
27173fi
27174
27175if test $ac_cv_header_stdc = yes; then
27176  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27178/* end confdefs.h.  */
27179#include <stdlib.h>
27180
27181_ACEOF
27182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27183  $EGREP "free" >/dev/null 2>&1; then :
27184
27185else
27186  ac_cv_header_stdc=no
27187fi
27188rm -f conftest*
27189
27190fi
27191
27192if test $ac_cv_header_stdc = yes; then
27193  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27194  if test "$cross_compiling" = yes; then :
27195  :
27196else
27197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27198/* end confdefs.h.  */
27199#include <ctype.h>
27200#include <stdlib.h>
27201#if ((' ' & 0x0FF) == 0x020)
27202# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27203# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27204#else
27205# define ISLOWER(c) \
27206		   (('a' <= (c) && (c) <= 'i') \
27207		     || ('j' <= (c) && (c) <= 'r') \
27208		     || ('s' <= (c) && (c) <= 'z'))
27209# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27210#endif
27211
27212#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27213int
27214main ()
27215{
27216  int i;
27217  for (i = 0; i < 256; i++)
27218    if (XOR (islower (i), ISLOWER (i))
27219	|| toupper (i) != TOUPPER (i))
27220      return 2;
27221  return 0;
27222}
27223_ACEOF
27224if ac_fn_cxx_try_run "$LINENO"; then :
27225
27226else
27227  ac_cv_header_stdc=no
27228fi
27229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27230  conftest.$ac_objext conftest.beam conftest.$ac_ext
27231fi
27232
27233fi
27234fi
27235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27236$as_echo "$ac_cv_header_stdc" >&6; }
27237if test $ac_cv_header_stdc = yes; then
27238
27239$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27240
27241fi
27242
27243# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27244for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27245		  inttypes.h stdint.h unistd.h
27246do :
27247  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27248ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27249"
27250if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27251  cat >>confdefs.h <<_ACEOF
27252#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27253_ACEOF
27254
27255fi
27256
27257done
27258
27259
27260
27261###############################################################################
27262#
27263# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27264# (The JVM can use 32 or 64 bit Java pointers but that decision
27265# is made at runtime.)
27266#
27267if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27268  # Always specify -m flags on Solaris
27269
27270  # keep track of c/cxx flags that we added outselves...
27271  #   to prevent emitting warning...
27272  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27273  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27274  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27275
27276  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27277  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27278  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27279
27280  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27281  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27282  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27283
27284elif test "x$COMPILE_TYPE" = xreduced; then
27285  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27286    # Specify -m if running reduced on other Posix platforms
27287
27288  # keep track of c/cxx flags that we added outselves...
27289  #   to prevent emitting warning...
27290  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27291  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27292  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27293
27294  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27295  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27296  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27297
27298  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27299  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27300  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27301
27302  fi
27303fi
27304
27305# Make compilation sanity check
27306for ac_header in stdio.h
27307do :
27308  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27309if test "x$ac_cv_header_stdio_h" = x""yes; then :
27310  cat >>confdefs.h <<_ACEOF
27311#define HAVE_STDIO_H 1
27312_ACEOF
27313
27314else
27315
27316  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27317$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27318  if test "x$COMPILE_TYPE" = xreduced; then
27319    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27320$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27321  elif test "x$COMPILE_TYPE" = xcross; then
27322    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27323$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27324  fi
27325  as_fn_error $? "Cannot continue." "$LINENO" 5
27326
27327fi
27328
27329done
27330
27331
27332# The cast to long int works around a bug in the HP C Compiler
27333# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27334# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27335# This bug is HP SR number 8606223364.
27336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27337$as_echo_n "checking size of int *... " >&6; }
27338if test "${ac_cv_sizeof_int_p+set}" = set; then :
27339  $as_echo_n "(cached) " >&6
27340else
27341  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27342
27343else
27344  if test "$ac_cv_type_int_p" = yes; then
27345     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27347as_fn_error 77 "cannot compute sizeof (int *)
27348See \`config.log' for more details" "$LINENO" 5 ; }
27349   else
27350     ac_cv_sizeof_int_p=0
27351   fi
27352fi
27353
27354fi
27355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27356$as_echo "$ac_cv_sizeof_int_p" >&6; }
27357
27358
27359
27360cat >>confdefs.h <<_ACEOF
27361#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27362_ACEOF
27363
27364
27365
27366if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27367  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27368  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27369fi
27370
27371if test "x$SIZEOF_INT_P" = x; then
27372    # The test failed, lets stick to the assumed value.
27373    { $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
27374$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27375else
27376    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27377
27378    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27379        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
27380    fi
27381fi
27382
27383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27384$as_echo_n "checking for target address size... " >&6; }
27385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27386$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27387
27388
27389###############################################################################
27390#
27391# Is the target little of big endian?
27392#
27393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27394$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27395if test "${ac_cv_c_bigendian+set}" = set; then :
27396  $as_echo_n "(cached) " >&6
27397else
27398  ac_cv_c_bigendian=unknown
27399    # See if we're dealing with a universal compiler.
27400    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27401/* end confdefs.h.  */
27402#ifndef __APPLE_CC__
27403	       not a universal capable compiler
27404	     #endif
27405	     typedef int dummy;
27406
27407_ACEOF
27408if ac_fn_cxx_try_compile "$LINENO"; then :
27409
27410	# Check for potential -arch flags.  It is not universal unless
27411	# there are at least two -arch flags with different values.
27412	ac_arch=
27413	ac_prev=
27414	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27415	 if test -n "$ac_prev"; then
27416	   case $ac_word in
27417	     i?86 | x86_64 | ppc | ppc64)
27418	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27419		 ac_arch=$ac_word
27420	       else
27421		 ac_cv_c_bigendian=universal
27422		 break
27423	       fi
27424	       ;;
27425	   esac
27426	   ac_prev=
27427	 elif test "x$ac_word" = "x-arch"; then
27428	   ac_prev=arch
27429	 fi
27430       done
27431fi
27432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27433    if test $ac_cv_c_bigendian = unknown; then
27434      # See if sys/param.h defines the BYTE_ORDER macro.
27435      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27436/* end confdefs.h.  */
27437#include <sys/types.h>
27438	     #include <sys/param.h>
27439
27440int
27441main ()
27442{
27443#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27444		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27445		     && LITTLE_ENDIAN)
27446	      bogus endian macros
27447	     #endif
27448
27449  ;
27450  return 0;
27451}
27452_ACEOF
27453if ac_fn_cxx_try_compile "$LINENO"; then :
27454  # It does; now see whether it defined to BIG_ENDIAN or not.
27455	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27456/* end confdefs.h.  */
27457#include <sys/types.h>
27458		#include <sys/param.h>
27459
27460int
27461main ()
27462{
27463#if BYTE_ORDER != BIG_ENDIAN
27464		 not big endian
27465		#endif
27466
27467  ;
27468  return 0;
27469}
27470_ACEOF
27471if ac_fn_cxx_try_compile "$LINENO"; then :
27472  ac_cv_c_bigendian=yes
27473else
27474  ac_cv_c_bigendian=no
27475fi
27476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27477fi
27478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27479    fi
27480    if test $ac_cv_c_bigendian = unknown; then
27481      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27482      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27483/* end confdefs.h.  */
27484#include <limits.h>
27485
27486int
27487main ()
27488{
27489#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27490	      bogus endian macros
27491	     #endif
27492
27493  ;
27494  return 0;
27495}
27496_ACEOF
27497if ac_fn_cxx_try_compile "$LINENO"; then :
27498  # It does; now see whether it defined to _BIG_ENDIAN or not.
27499	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27500/* end confdefs.h.  */
27501#include <limits.h>
27502
27503int
27504main ()
27505{
27506#ifndef _BIG_ENDIAN
27507		 not big endian
27508		#endif
27509
27510  ;
27511  return 0;
27512}
27513_ACEOF
27514if ac_fn_cxx_try_compile "$LINENO"; then :
27515  ac_cv_c_bigendian=yes
27516else
27517  ac_cv_c_bigendian=no
27518fi
27519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27520fi
27521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27522    fi
27523    if test $ac_cv_c_bigendian = unknown; then
27524      # Compile a test program.
27525      if test "$cross_compiling" = yes; then :
27526  # Try to guess by grepping values from an object file.
27527	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27528/* end confdefs.h.  */
27529short int ascii_mm[] =
27530		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27531		short int ascii_ii[] =
27532		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27533		int use_ascii (int i) {
27534		  return ascii_mm[i] + ascii_ii[i];
27535		}
27536		short int ebcdic_ii[] =
27537		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27538		short int ebcdic_mm[] =
27539		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27540		int use_ebcdic (int i) {
27541		  return ebcdic_mm[i] + ebcdic_ii[i];
27542		}
27543		extern int foo;
27544
27545int
27546main ()
27547{
27548return use_ascii (foo) == use_ebcdic (foo);
27549  ;
27550  return 0;
27551}
27552_ACEOF
27553if ac_fn_cxx_try_compile "$LINENO"; then :
27554  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27555	      ac_cv_c_bigendian=yes
27556	    fi
27557	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27558	      if test "$ac_cv_c_bigendian" = unknown; then
27559		ac_cv_c_bigendian=no
27560	      else
27561		# finding both strings is unlikely to happen, but who knows?
27562		ac_cv_c_bigendian=unknown
27563	      fi
27564	    fi
27565fi
27566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27567else
27568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27569/* end confdefs.h.  */
27570$ac_includes_default
27571int
27572main ()
27573{
27574
27575	     /* Are we little or big endian?  From Harbison&Steele.  */
27576	     union
27577	     {
27578	       long int l;
27579	       char c[sizeof (long int)];
27580	     } u;
27581	     u.l = 1;
27582	     return u.c[sizeof (long int) - 1] == 1;
27583
27584  ;
27585  return 0;
27586}
27587_ACEOF
27588if ac_fn_cxx_try_run "$LINENO"; then :
27589  ac_cv_c_bigendian=no
27590else
27591  ac_cv_c_bigendian=yes
27592fi
27593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27594  conftest.$ac_objext conftest.beam conftest.$ac_ext
27595fi
27596
27597    fi
27598fi
27599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27600$as_echo "$ac_cv_c_bigendian" >&6; }
27601 case $ac_cv_c_bigendian in #(
27602   yes)
27603     ENDIAN="big";; #(
27604   no)
27605     ENDIAN="little" ;; #(
27606   universal)
27607     ENDIAN="universal_endianness"
27608     ;; #(
27609   *)
27610     ENDIAN="unknown" ;;
27611 esac
27612
27613
27614if test "x$ENDIAN" = xuniversal_endianness; then
27615    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27616fi
27617if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27618    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
27619fi
27620
27621
27622# Configure flags for the tools
27623
27624
27625###############################################################################
27626#
27627# How to compile shared libraries.
27628#
27629
27630if test "x$GCC" = xyes; then
27631    COMPILER_NAME=gcc
27632    PICFLAG="-fPIC"
27633    LIBRARY_PREFIX=lib
27634    SHARED_LIBRARY='lib$1.so'
27635    STATIC_LIBRARY='lib$1.a'
27636    SHARED_LIBRARY_FLAGS="-shared"
27637    SHARED_LIBRARY_SUFFIX='.so'
27638    STATIC_LIBRARY_SUFFIX='.a'
27639    OBJ_SUFFIX='.o'
27640    EXE_SUFFIX=''
27641    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27642    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27643    C_FLAG_REORDER=''
27644    CXX_FLAG_REORDER=''
27645    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27646    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27647    LD="$CC"
27648    LDEXE="$CC"
27649    LDCXX="$CXX"
27650    LDEXECXX="$CXX"
27651    POST_STRIP_CMD="$STRIP -g"
27652
27653    # Linking is different on MacOSX
27654    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27655        # Might change in the future to clang.
27656        COMPILER_NAME=gcc
27657        SHARED_LIBRARY='lib$1.dylib'
27658        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27659        SHARED_LIBRARY_SUFFIX='.dylib'
27660        EXE_SUFFIX=''
27661        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27662        SET_SHARED_LIBRARY_MAPFILE=''
27663        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27664        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27665        POST_STRIP_CMD="$STRIP -S"
27666    fi
27667else
27668    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27669        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27670        COMPILER_NAME=ossc
27671        PICFLAG="-KPIC"
27672        LIBRARY_PREFIX=lib
27673        SHARED_LIBRARY='lib$1.so'
27674        STATIC_LIBRARY='lib$1.a'
27675        SHARED_LIBRARY_FLAGS="-G"
27676        SHARED_LIBRARY_SUFFIX='.so'
27677        STATIC_LIBRARY_SUFFIX='.a'
27678        OBJ_SUFFIX='.o'
27679        EXE_SUFFIX=''
27680        SET_SHARED_LIBRARY_NAME=''
27681        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27682	C_FLAG_REORDER='-xF'
27683	CXX_FLAG_REORDER='-xF'
27684        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27685        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27686        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27687        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27688        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27689        POST_STRIP_CMD="$STRIP -x"
27690        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27691    fi
27692    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27693        # If it is not gcc, then assume it is the MS Visual Studio compiler
27694        COMPILER_NAME=cl
27695        PICFLAG=""
27696        LIBRARY_PREFIX=
27697        SHARED_LIBRARY='$1.dll'
27698        STATIC_LIBRARY='$1.lib'
27699        SHARED_LIBRARY_FLAGS="-LD"
27700        SHARED_LIBRARY_SUFFIX='.dll'
27701        STATIC_LIBRARY_SUFFIX='.lib'
27702        OBJ_SUFFIX='.obj'
27703        EXE_SUFFIX='.exe'
27704        SET_SHARED_LIBRARY_NAME=''
27705        SET_SHARED_LIBRARY_MAPFILE=''
27706        SET_SHARED_LIBRARY_ORIGIN=''
27707        SET_EXECUTABLE_ORIGIN=''
27708    fi
27709fi
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728# The (cross) compiler is now configured, we can now test capabilities
27729# of the target platform.
27730
27731
27732
27733###############################################################################
27734#
27735# Setup the opt flags for different compilers
27736# and different operating systems.
27737#
27738
27739#
27740# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27741#
27742if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27743    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27744    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27745    CFLAGS="$CFLAGS -mstackrealign"
27746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27747$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27748    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27749/* end confdefs.h.  */
27750int main() { return 0; }
27751_ACEOF
27752if ac_fn_cxx_try_link "$LINENO"; then :
27753
27754		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27755$as_echo "yes" >&6; }
27756
27757else
27758
27759		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27760$as_echo "no" >&6; }
27761	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27762
27763fi
27764rm -f core conftest.err conftest.$ac_objext \
27765    conftest$ac_exeext conftest.$ac_ext
27766fi
27767
27768C_FLAG_DEPS="-MMD -MF"
27769CXX_FLAG_DEPS="-MMD -MF"
27770
27771case $COMPILER_TYPE in
27772  CC )
27773    D_FLAG="-g"
27774    case $COMPILER_NAME in
27775      gcc )
27776      	case $OPENJDK_TARGET_OS in
27777	  macosx )
27778	    # On MacOSX we optimize for size, something
27779	    # we should do for all platforms?
27780	    C_O_FLAG_HI="-Os"
27781	    C_O_FLAG_NORM="-Os"
27782	    C_O_FLAG_NONE=""
27783	    ;;
27784	  *)
27785	    C_O_FLAG_HI="-O3"
27786	    C_O_FLAG_NORM="-O2"
27787	    C_O_FLAG_NONE="-O0"
27788	    CFLAGS_DEBUG_SYMBOLS="-g"
27789	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27790	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27791	       CFLAGS_DEBUG_SYMBOLS="-g1"
27792	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27793	    fi
27794	    ;;
27795	esac
27796        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27797        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27798        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27799        ;;
27800      ossc )
27801        #
27802        # Forte has different names for this with their C++ compiler...
27803        #
27804        C_FLAG_DEPS="-xMMD -xMF"
27805        CXX_FLAG_DEPS="-xMMD -xMF"
27806
27807        # Extra options used with HIGHEST
27808        #
27809        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27810        #          done with care, there are some assumptions below that need to
27811        #          be understood about the use of pointers, and IEEE behavior.
27812        #
27813        # Use non-standard floating point mode (not IEEE 754)
27814        CC_HIGHEST="$CC_HIGHEST -fns"
27815        # Do some simplification of floating point arithmetic (not IEEE 754)
27816        CC_HIGHEST="$CC_HIGHEST -fsimple"
27817        # Use single precision floating point with 'float'
27818        CC_HIGHEST="$CC_HIGHEST -fsingle"
27819        # Assume memory references via basic pointer types do not alias
27820        #   (Source with excessing pointer casting and data access with mixed
27821        #    pointer types are not recommended)
27822        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27823        # Use intrinsic or inline versions for math/std functions
27824        #   (If you expect perfect errno behavior, do not use this)
27825        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27826        # Loop data dependency optimizations (need -xO3 or higher)
27827        CC_HIGHEST="$CC_HIGHEST -xdepend"
27828        # Pointer parameters to functions do not overlap
27829        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27830        #    If you pass in multiple pointers to the same data, do not use this)
27831        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27832        # Inline some library routines
27833        #   (If you expect perfect errno behavior, do not use this)
27834        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27835        # Use optimized math routines
27836        #   (If you expect perfect errno behavior, do not use this)
27837        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27838        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27839
27840        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27841          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27842          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27843        fi
27844
27845        case $OPENJDK_TARGET_CPU_ARCH in
27846          x86)
27847            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27848            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27849            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27850            C_O_FLAG_NONE="-xregs=no%frameptr"
27851            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27852            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27853            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27854            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27855            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27856               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27857               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27858            fi
27859            ;;
27860          sparc)
27861            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27862            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27863            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27864            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27865            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27866            C_O_FLAG_NONE=""
27867            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27868            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27869            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27870            CXX_O_FLAG_NONE=""
27871            ;;
27872        esac
27873
27874    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27875    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27876    esac
27877    ;;
27878  CL )
27879    D_FLAG=
27880    C_O_FLAG_HIGHEST="-O2"
27881    C_O_FLAG_HI="-O1"
27882    C_O_FLAG_NORM="-O1"
27883    C_O_FLAG_NONE="-Od"
27884    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27885    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27886    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27887    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27888    ;;
27889esac
27890
27891if test -z "$C_O_FLAG_HIGHEST"; then
27892   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27893fi
27894
27895if test -z "$CXX_O_FLAG_HIGHEST"; then
27896   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27897fi
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27913   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27914$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27915fi
27916
27917if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27918   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27919$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27920fi
27921
27922if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27923   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27924$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27925fi
27926
27927
27928# Check whether --with-extra-cflags was given.
27929if test "${with_extra_cflags+set}" = set; then :
27930  withval=$with_extra_cflags;
27931fi
27932
27933
27934
27935# Check whether --with-extra-cxxflags was given.
27936if test "${with_extra_cxxflags+set}" = set; then :
27937  withval=$with_extra_cxxflags;
27938fi
27939
27940
27941
27942# Check whether --with-extra-ldflags was given.
27943if test "${with_extra_ldflags+set}" = set; then :
27944  withval=$with_extra_ldflags;
27945fi
27946
27947
27948CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27949CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27950LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27951
27952# Hotspot needs these set in their legacy form
27953LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27954LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27955LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27956
27957
27958
27959
27960
27961###############################################################################
27962#
27963# Now setup the CFLAGS and LDFLAGS for the JDK build.
27964# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27965#
27966case $COMPILER_NAME in
27967      gcc )
27968      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27969                          -pipe \
27970                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27971	  case $OPENJDK_TARGET_CPU_ARCH in
27972	  arm )
27973            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27974	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27975	  ;;
27976	  ppc )
27977            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27978	  ;;
27979	  * )
27980	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27981	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27982          ;;
27983	  esac
27984          ;;
27985      ossc )
27986          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27987          case $OPENJDK_TARGET_CPU_ARCH in
27988          x86 )
27989            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27990       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27991          ;;
27992          esac
27993
27994      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27995      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27996
27997          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27998          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27999          ;;
28000      cl )
28001          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28002               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28003	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28004	       -DWIN32 -DIAL"
28005          case $OPENJDK_TARGET_CPU in
28006              x86 )
28007                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28008                  ;;
28009              x86_64 )
28010                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28011                  ;;
28012          esac
28013          ;;
28014esac
28015
28016###############################################################################
28017
28018CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28019
28020# The package path is used only on macosx?
28021PACKAGE_PATH=/opt/local
28022
28023
28024if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28025    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28026    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28027    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28028    #   Note: -Dmacro         is the same as    #define macro 1
28029    #         -Dmacro=	    is the same as    #define macro
28030    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28031        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28032    else
28033        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28034    fi
28035else
28036    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28037fi
28038if test "x$OPENJDK_TARGET_OS" = xlinux; then
28039    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28040fi
28041if test "x$OPENJDK_TARGET_OS" = xwindows; then
28042    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28043fi
28044if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28045    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28046fi
28047if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28048    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28049fi
28050if test "x$OPENJDK_TARGET_OS" = xbsd; then
28051    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28052fi
28053if test "x$DEBUG_LEVEL" = xrelease; then
28054    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28055    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28056        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28057    fi
28058else
28059    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28060fi
28061
28062CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28063CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28064
28065CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28066        -I${JDK_OUTPUTDIR}/include \
28067        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28068        -I${JDK_TOPDIR}/src/share/javavm/export \
28069        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28070        -I${JDK_TOPDIR}/src/share/native/common \
28071        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28072
28073# The shared libraries are compiled using the picflag.
28074CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28075CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28076
28077# Executable flags
28078CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28079CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28080
28081# Now this is odd. The JDK native libraries have to link against libjvm.so
28082# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28083# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28084# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28085# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28086# libraries will link to whatever is in memory. Yuck.
28087#
28088# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28089if test "x$COMPILER_NAME" = xcl; then
28090    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28091    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28092        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28093    fi
28094    # TODO: make -debug optional "--disable-full-debug-symbols"
28095    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28096    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28097    LDFLAGS_JDKLIB_SUFFIX=""
28098    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28099        LDFLAGS_STACK_SIZE=1048576
28100    else
28101        LDFLAGS_STACK_SIZE=327680
28102    fi
28103    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28104else
28105    if test "x$COMPILER_NAME" = xgcc; then
28106        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28107        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28108        if test -n "$HAS_GNU_HASH"; then
28109            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28110        fi
28111        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28112          # And since we now know that the linker is gnu, then add -z defs, to forbid
28113          # undefined symbols in object files.
28114          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28115          if test "x$DEBUG_LEVEL" = "xrelease"; then
28116              # When building release libraries, tell the linker optimize them.
28117              # Should this be supplied to the OSS linker as well?
28118              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28119          fi
28120        fi
28121    fi
28122    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28123                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28124
28125    # On some platforms (mac) the linker warns about non existing -L dirs.
28126    # Add server first if available. Linking aginst client does not always produce the same results.
28127    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28128    # Default to server for other variants.
28129    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28130        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28131    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28132        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28133    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28134        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28135    else
28136        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28137    fi
28138
28139    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28140    if test "x$COMPILER_NAME" = xossc; then
28141        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28142    fi
28143
28144    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28145    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28146        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28147    fi
28148fi
28149
28150# Adjust flags according to debug level.
28151case $DEBUG_LEVEL in
28152      fastdebug )
28153              CFLAGS="$CFLAGS $D_FLAG"
28154              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28155              ;;
28156      slowdebug )
28157              CFLAGS="$CFLAGS $D_FLAG"
28158	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28159	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28160	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28161	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28162              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28163              ;;
28164esac
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180# Setup debug symbols (need objcopy from the toolchain for that)
28181
28182#
28183# ENABLE_DEBUG_SYMBOLS
28184# This must be done after the toolchain is setup, since we're looking at objcopy.
28185#
28186# Check whether --enable-debug-symbols was given.
28187if test "${enable_debug_symbols+set}" = set; then :
28188  enableval=$enable_debug_symbols;
28189fi
28190
28191
28192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28193$as_echo_n "checking if we should generate debug symbols... " >&6; }
28194
28195if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28196   # explicit enabling of enable-debug-symbols and can't find objcopy
28197   #   this is an error
28198   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28199fi
28200
28201if test "x$enable_debug_symbols" = "xyes"; then
28202  ENABLE_DEBUG_SYMBOLS=true
28203elif test "x$enable_debug_symbols" = "xno"; then
28204  ENABLE_DEBUG_SYMBOLS=false
28205else
28206  # default on macosx is false
28207  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28208    ENABLE_DEBUG_SYMBOLS=false
28209  # Default is on if objcopy is found, otherwise off
28210  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28211    ENABLE_DEBUG_SYMBOLS=true
28212  else
28213    ENABLE_DEBUG_SYMBOLS=false
28214  fi
28215fi
28216
28217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28218$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28219
28220#
28221# ZIP_DEBUGINFO_FILES
28222#
28223# Check whether --enable-zip-debug-info was given.
28224if test "${enable_zip_debug_info+set}" = set; then :
28225  enableval=$enable_zip_debug_info;
28226fi
28227
28228
28229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28230$as_echo_n "checking if we should zip debug-info files... " >&6; }
28231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28232$as_echo "${enable_zip_debug_info}" >&6; }
28233
28234if test "x${enable_zip_debug_info}" = "xno"; then
28235   ZIP_DEBUGINFO_FILES=false
28236else
28237   ZIP_DEBUGINFO_FILES=true
28238fi
28239
28240
28241
28242
28243
28244
28245
28246###############################################################################
28247#
28248# Check dependencies for external and internal libraries.
28249#
28250###############################################################################
28251
28252
28253
28254###############################################################################
28255#
28256# OS specific settings that we never will need to probe.
28257#
28258if test "x$OPENJDK_TARGET_OS" = xlinux; then
28259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28260$as_echo_n "checking what is not needed on Linux?... " >&6; }
28261    PULSE_NOT_NEEDED=yes
28262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28263$as_echo "pulse" >&6; }
28264fi
28265
28266if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28268$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28269    ALSA_NOT_NEEDED=yes
28270    PULSE_NOT_NEEDED=yes
28271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28272$as_echo "alsa pulse" >&6; }
28273fi
28274
28275if test "x$OPENJDK_TARGET_OS" = xwindows; then
28276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28277$as_echo_n "checking what is not needed on Windows?... " >&6; }
28278    CUPS_NOT_NEEDED=yes
28279    ALSA_NOT_NEEDED=yes
28280    PULSE_NOT_NEEDED=yes
28281    X11_NOT_NEEDED=yes
28282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28283$as_echo "alsa cups pulse x11" >&6; }
28284fi
28285
28286if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28288$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28289    ALSA_NOT_NEEDED=yes
28290    PULSE_NOT_NEEDED=yes
28291    X11_NOT_NEEDED=yes
28292    FREETYPE2_NOT_NEEDED=yes
28293    # If the java runtime framework is disabled, then we need X11.
28294    # This will be adjusted below.
28295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28296$as_echo "alsa pulse x11" >&6; }
28297fi
28298
28299if test "x$OPENJDK_TARGET_OS" = xbsd; then
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28301$as_echo_n "checking what is not needed on bsd?... " >&6; }
28302    ALSA_NOT_NEEDED=yes
28303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28304$as_echo "alsa" >&6; }
28305fi
28306
28307if test "x$OPENJDK" = "xfalse"; then
28308    FREETYPE2_NOT_NEEDED=yes
28309fi
28310
28311if test "x$SUPPORT_HEADFUL" = xno; then
28312    X11_NOT_NEEDED=yes
28313fi
28314
28315###############################################################################
28316#
28317# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28318# that uses this API.
28319#
28320# Check whether --enable-macosx-runtime-support was given.
28321if test "${enable_macosx_runtime_support+set}" = set; then :
28322  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28323else
28324  MACOSX_RUNTIME_SUPPORT="no"
28325fi
28326
28327
28328USE_MACOSX_RUNTIME_SUPPORT=no
28329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28330$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28331if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28332    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28333        MACOSX_RUNTIME_SUPPORT=yes
28334        USE_MACOSX_RUNTIME_SUPPORT=yes
28335        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28336$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28337    else
28338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28339$as_echo "yes, but explicitly disabled." >&6; }
28340    fi
28341else
28342    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28343$as_echo "no" >&6; }
28344fi
28345
28346if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28348$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28349    X11_NOT_NEEDED=
28350    FREETYPE2_NOT_NEEDED=
28351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28352$as_echo "alsa pulse" >&6; }
28353fi
28354
28355
28356
28357
28358###############################################################################
28359#
28360# Check for X Windows
28361#
28362
28363# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28364# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28365# --x-libraries for the sysroot, if that seems to be correct.
28366if test "x$SYS_ROOT" != "x/"; then
28367  if test "x$x_includes" = xNONE; then
28368    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28369      x_includes="$SYS_ROOT/usr/X11R6/include"
28370    fi
28371  fi
28372  if test "x$x_libraries" = xNONE; then
28373    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28374      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28375    fi
28376  fi
28377fi
28378
28379# Now let autoconf do it's magic
28380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28381$as_echo_n "checking for X... " >&6; }
28382
28383
28384# Check whether --with-x was given.
28385if test "${with_x+set}" = set; then :
28386  withval=$with_x;
28387fi
28388
28389# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28390if test "x$with_x" = xno; then
28391  # The user explicitly disabled X.
28392  have_x=disabled
28393else
28394  case $x_includes,$x_libraries in #(
28395    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28396    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28397  $as_echo_n "(cached) " >&6
28398else
28399  # One or both of the vars are not set, and there is no cached value.
28400ac_x_includes=no ac_x_libraries=no
28401rm -f -r conftest.dir
28402if mkdir conftest.dir; then
28403  cd conftest.dir
28404  cat >Imakefile <<'_ACEOF'
28405incroot:
28406	@echo incroot='${INCROOT}'
28407usrlibdir:
28408	@echo usrlibdir='${USRLIBDIR}'
28409libdir:
28410	@echo libdir='${LIBDIR}'
28411_ACEOF
28412  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28413    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28414    for ac_var in incroot usrlibdir libdir; do
28415      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28416    done
28417    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28418    for ac_extension in a so sl dylib la dll; do
28419      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28420	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28421	ac_im_usrlibdir=$ac_im_libdir; break
28422      fi
28423    done
28424    # Screen out bogus values from the imake configuration.  They are
28425    # bogus both because they are the default anyway, and because
28426    # using them would break gcc on systems where it needs fixed includes.
28427    case $ac_im_incroot in
28428	/usr/include) ac_x_includes= ;;
28429	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28430    esac
28431    case $ac_im_usrlibdir in
28432	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28433	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28434    esac
28435  fi
28436  cd ..
28437  rm -f -r conftest.dir
28438fi
28439
28440# Standard set of common directories for X headers.
28441# Check X11 before X11Rn because it is often a symlink to the current release.
28442ac_x_header_dirs='
28443/usr/X11/include
28444/usr/X11R7/include
28445/usr/X11R6/include
28446/usr/X11R5/include
28447/usr/X11R4/include
28448
28449/usr/include/X11
28450/usr/include/X11R7
28451/usr/include/X11R6
28452/usr/include/X11R5
28453/usr/include/X11R4
28454
28455/usr/local/X11/include
28456/usr/local/X11R7/include
28457/usr/local/X11R6/include
28458/usr/local/X11R5/include
28459/usr/local/X11R4/include
28460
28461/usr/local/include/X11
28462/usr/local/include/X11R7
28463/usr/local/include/X11R6
28464/usr/local/include/X11R5
28465/usr/local/include/X11R4
28466
28467/usr/X386/include
28468/usr/x386/include
28469/usr/XFree86/include/X11
28470
28471/usr/include
28472/usr/local/include
28473/usr/unsupported/include
28474/usr/athena/include
28475/usr/local/x11r5/include
28476/usr/lpp/Xamples/include
28477
28478/usr/openwin/include
28479/usr/openwin/share/include'
28480
28481if test "$ac_x_includes" = no; then
28482  # Guess where to find include files, by looking for Xlib.h.
28483  # First, try using that file with no special directory specified.
28484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28485/* end confdefs.h.  */
28486#include <X11/Xlib.h>
28487_ACEOF
28488if ac_fn_cxx_try_cpp "$LINENO"; then :
28489  # We can compile using X headers with no special include directory.
28490ac_x_includes=
28491else
28492  for ac_dir in $ac_x_header_dirs; do
28493  if test -r "$ac_dir/X11/Xlib.h"; then
28494    ac_x_includes=$ac_dir
28495    break
28496  fi
28497done
28498fi
28499rm -f conftest.err conftest.i conftest.$ac_ext
28500fi # $ac_x_includes = no
28501
28502if test "$ac_x_libraries" = no; then
28503  # Check for the libraries.
28504  # See if we find them without any special options.
28505  # Don't add to $LIBS permanently.
28506  ac_save_LIBS=$LIBS
28507  LIBS="-lX11 $LIBS"
28508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28509/* end confdefs.h.  */
28510#include <X11/Xlib.h>
28511int
28512main ()
28513{
28514XrmInitialize ()
28515  ;
28516  return 0;
28517}
28518_ACEOF
28519if ac_fn_cxx_try_link "$LINENO"; then :
28520  LIBS=$ac_save_LIBS
28521# We can link X programs with no special library path.
28522ac_x_libraries=
28523else
28524  LIBS=$ac_save_LIBS
28525for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28526do
28527  # Don't even attempt the hair of trying to link an X program!
28528  for ac_extension in a so sl dylib la dll; do
28529    if test -r "$ac_dir/libX11.$ac_extension"; then
28530      ac_x_libraries=$ac_dir
28531      break 2
28532    fi
28533  done
28534done
28535fi
28536rm -f core conftest.err conftest.$ac_objext \
28537    conftest$ac_exeext conftest.$ac_ext
28538fi # $ac_x_libraries = no
28539
28540case $ac_x_includes,$ac_x_libraries in #(
28541  no,* | *,no | *\'*)
28542    # Didn't find X, or a directory has "'" in its name.
28543    ac_cv_have_x="have_x=no";; #(
28544  *)
28545    # Record where we found X for the cache.
28546    ac_cv_have_x="have_x=yes\
28547	ac_x_includes='$ac_x_includes'\
28548	ac_x_libraries='$ac_x_libraries'"
28549esac
28550fi
28551;; #(
28552    *) have_x=yes;;
28553  esac
28554  eval "$ac_cv_have_x"
28555fi # $with_x != no
28556
28557if test "$have_x" != yes; then
28558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28559$as_echo "$have_x" >&6; }
28560  no_x=yes
28561else
28562  # If each of the values was on the command line, it overrides each guess.
28563  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28564  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28565  # Update the cache value to reflect the command line values.
28566  ac_cv_have_x="have_x=yes\
28567	ac_x_includes='$x_includes'\
28568	ac_x_libraries='$x_libraries'"
28569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28570$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28571fi
28572
28573if test "$no_x" = yes; then
28574  # Not all programs may use this symbol, but it does not hurt to define it.
28575
28576$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28577
28578  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28579else
28580  if test -n "$x_includes"; then
28581    X_CFLAGS="$X_CFLAGS -I$x_includes"
28582  fi
28583
28584  # It would also be nice to do this for all -L options, not just this one.
28585  if test -n "$x_libraries"; then
28586    X_LIBS="$X_LIBS -L$x_libraries"
28587    # For Solaris; some versions of Sun CC require a space after -R and
28588    # others require no space.  Words are not sufficient . . . .
28589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28590$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28591    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28592    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28593    ac_cxx_werror_flag=yes
28594    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28595/* end confdefs.h.  */
28596
28597int
28598main ()
28599{
28600
28601  ;
28602  return 0;
28603}
28604_ACEOF
28605if ac_fn_cxx_try_link "$LINENO"; then :
28606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28607$as_echo "no" >&6; }
28608       X_LIBS="$X_LIBS -R$x_libraries"
28609else
28610  LIBS="$ac_xsave_LIBS -R $x_libraries"
28611       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28612/* end confdefs.h.  */
28613
28614int
28615main ()
28616{
28617
28618  ;
28619  return 0;
28620}
28621_ACEOF
28622if ac_fn_cxx_try_link "$LINENO"; then :
28623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28624$as_echo "yes" >&6; }
28625	  X_LIBS="$X_LIBS -R $x_libraries"
28626else
28627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28628$as_echo "neither works" >&6; }
28629fi
28630rm -f core conftest.err conftest.$ac_objext \
28631    conftest$ac_exeext conftest.$ac_ext
28632fi
28633rm -f core conftest.err conftest.$ac_objext \
28634    conftest$ac_exeext conftest.$ac_ext
28635    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28636    LIBS=$ac_xsave_LIBS
28637  fi
28638
28639  # Check for system-dependent libraries X programs must link with.
28640  # Do this before checking for the system-independent R6 libraries
28641  # (-lICE), since we may need -lsocket or whatever for X linking.
28642
28643  if test "$ISC" = yes; then
28644    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28645  else
28646    # Martyn Johnson says this is needed for Ultrix, if the X
28647    # libraries were built with DECnet support.  And Karl Berry says
28648    # the Alpha needs dnet_stub (dnet does not exist).
28649    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28650    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28651/* end confdefs.h.  */
28652
28653/* Override any GCC internal prototype to avoid an error.
28654   Use char because int might match the return type of a GCC
28655   builtin and then its argument prototype would still apply.  */
28656#ifdef __cplusplus
28657extern "C"
28658#endif
28659char XOpenDisplay ();
28660int
28661main ()
28662{
28663return XOpenDisplay ();
28664  ;
28665  return 0;
28666}
28667_ACEOF
28668if ac_fn_cxx_try_link "$LINENO"; then :
28669
28670else
28671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28672$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28673if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28674  $as_echo_n "(cached) " >&6
28675else
28676  ac_check_lib_save_LIBS=$LIBS
28677LIBS="-ldnet  $LIBS"
28678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28679/* end confdefs.h.  */
28680
28681/* Override any GCC internal prototype to avoid an error.
28682   Use char because int might match the return type of a GCC
28683   builtin and then its argument prototype would still apply.  */
28684#ifdef __cplusplus
28685extern "C"
28686#endif
28687char dnet_ntoa ();
28688int
28689main ()
28690{
28691return dnet_ntoa ();
28692  ;
28693  return 0;
28694}
28695_ACEOF
28696if ac_fn_cxx_try_link "$LINENO"; then :
28697  ac_cv_lib_dnet_dnet_ntoa=yes
28698else
28699  ac_cv_lib_dnet_dnet_ntoa=no
28700fi
28701rm -f core conftest.err conftest.$ac_objext \
28702    conftest$ac_exeext conftest.$ac_ext
28703LIBS=$ac_check_lib_save_LIBS
28704fi
28705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28706$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28707if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28708  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28709fi
28710
28711    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28713$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28714if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28715  $as_echo_n "(cached) " >&6
28716else
28717  ac_check_lib_save_LIBS=$LIBS
28718LIBS="-ldnet_stub  $LIBS"
28719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28720/* end confdefs.h.  */
28721
28722/* Override any GCC internal prototype to avoid an error.
28723   Use char because int might match the return type of a GCC
28724   builtin and then its argument prototype would still apply.  */
28725#ifdef __cplusplus
28726extern "C"
28727#endif
28728char dnet_ntoa ();
28729int
28730main ()
28731{
28732return dnet_ntoa ();
28733  ;
28734  return 0;
28735}
28736_ACEOF
28737if ac_fn_cxx_try_link "$LINENO"; then :
28738  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28739else
28740  ac_cv_lib_dnet_stub_dnet_ntoa=no
28741fi
28742rm -f core conftest.err conftest.$ac_objext \
28743    conftest$ac_exeext conftest.$ac_ext
28744LIBS=$ac_check_lib_save_LIBS
28745fi
28746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28747$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28748if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28749  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28750fi
28751
28752    fi
28753fi
28754rm -f core conftest.err conftest.$ac_objext \
28755    conftest$ac_exeext conftest.$ac_ext
28756    LIBS="$ac_xsave_LIBS"
28757
28758    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28759    # to get the SysV transport functions.
28760    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28761    # needs -lnsl.
28762    # The nsl library prevents programs from opening the X display
28763    # on Irix 5.2, according to T.E. Dickey.
28764    # The functions gethostbyname, getservbyname, and inet_addr are
28765    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28766    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28767if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28768
28769fi
28770
28771    if test $ac_cv_func_gethostbyname = no; then
28772      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28773$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28774if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28775  $as_echo_n "(cached) " >&6
28776else
28777  ac_check_lib_save_LIBS=$LIBS
28778LIBS="-lnsl  $LIBS"
28779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28780/* end confdefs.h.  */
28781
28782/* Override any GCC internal prototype to avoid an error.
28783   Use char because int might match the return type of a GCC
28784   builtin and then its argument prototype would still apply.  */
28785#ifdef __cplusplus
28786extern "C"
28787#endif
28788char gethostbyname ();
28789int
28790main ()
28791{
28792return gethostbyname ();
28793  ;
28794  return 0;
28795}
28796_ACEOF
28797if ac_fn_cxx_try_link "$LINENO"; then :
28798  ac_cv_lib_nsl_gethostbyname=yes
28799else
28800  ac_cv_lib_nsl_gethostbyname=no
28801fi
28802rm -f core conftest.err conftest.$ac_objext \
28803    conftest$ac_exeext conftest.$ac_ext
28804LIBS=$ac_check_lib_save_LIBS
28805fi
28806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28807$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28808if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28809  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28810fi
28811
28812      if test $ac_cv_lib_nsl_gethostbyname = no; then
28813	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28814$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28815if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28816  $as_echo_n "(cached) " >&6
28817else
28818  ac_check_lib_save_LIBS=$LIBS
28819LIBS="-lbsd  $LIBS"
28820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28821/* end confdefs.h.  */
28822
28823/* Override any GCC internal prototype to avoid an error.
28824   Use char because int might match the return type of a GCC
28825   builtin and then its argument prototype would still apply.  */
28826#ifdef __cplusplus
28827extern "C"
28828#endif
28829char gethostbyname ();
28830int
28831main ()
28832{
28833return gethostbyname ();
28834  ;
28835  return 0;
28836}
28837_ACEOF
28838if ac_fn_cxx_try_link "$LINENO"; then :
28839  ac_cv_lib_bsd_gethostbyname=yes
28840else
28841  ac_cv_lib_bsd_gethostbyname=no
28842fi
28843rm -f core conftest.err conftest.$ac_objext \
28844    conftest$ac_exeext conftest.$ac_ext
28845LIBS=$ac_check_lib_save_LIBS
28846fi
28847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28848$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28849if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28850  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28851fi
28852
28853      fi
28854    fi
28855
28856    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28857    # socket/setsockopt and other routines are undefined under SCO ODT
28858    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28859    # on later versions), says Simon Leinen: it contains gethostby*
28860    # variants that don't use the name server (or something).  -lsocket
28861    # must be given before -lnsl if both are needed.  We assume that
28862    # if connect needs -lnsl, so does gethostbyname.
28863    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28864if test "x$ac_cv_func_connect" = x""yes; then :
28865
28866fi
28867
28868    if test $ac_cv_func_connect = no; then
28869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28870$as_echo_n "checking for connect in -lsocket... " >&6; }
28871if test "${ac_cv_lib_socket_connect+set}" = set; then :
28872  $as_echo_n "(cached) " >&6
28873else
28874  ac_check_lib_save_LIBS=$LIBS
28875LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28877/* end confdefs.h.  */
28878
28879/* Override any GCC internal prototype to avoid an error.
28880   Use char because int might match the return type of a GCC
28881   builtin and then its argument prototype would still apply.  */
28882#ifdef __cplusplus
28883extern "C"
28884#endif
28885char connect ();
28886int
28887main ()
28888{
28889return connect ();
28890  ;
28891  return 0;
28892}
28893_ACEOF
28894if ac_fn_cxx_try_link "$LINENO"; then :
28895  ac_cv_lib_socket_connect=yes
28896else
28897  ac_cv_lib_socket_connect=no
28898fi
28899rm -f core conftest.err conftest.$ac_objext \
28900    conftest$ac_exeext conftest.$ac_ext
28901LIBS=$ac_check_lib_save_LIBS
28902fi
28903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28904$as_echo "$ac_cv_lib_socket_connect" >&6; }
28905if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28906  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28907fi
28908
28909    fi
28910
28911    # Guillermo Gomez says -lposix is necessary on A/UX.
28912    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28913if test "x$ac_cv_func_remove" = x""yes; then :
28914
28915fi
28916
28917    if test $ac_cv_func_remove = no; then
28918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28919$as_echo_n "checking for remove in -lposix... " >&6; }
28920if test "${ac_cv_lib_posix_remove+set}" = set; then :
28921  $as_echo_n "(cached) " >&6
28922else
28923  ac_check_lib_save_LIBS=$LIBS
28924LIBS="-lposix  $LIBS"
28925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28926/* end confdefs.h.  */
28927
28928/* Override any GCC internal prototype to avoid an error.
28929   Use char because int might match the return type of a GCC
28930   builtin and then its argument prototype would still apply.  */
28931#ifdef __cplusplus
28932extern "C"
28933#endif
28934char remove ();
28935int
28936main ()
28937{
28938return remove ();
28939  ;
28940  return 0;
28941}
28942_ACEOF
28943if ac_fn_cxx_try_link "$LINENO"; then :
28944  ac_cv_lib_posix_remove=yes
28945else
28946  ac_cv_lib_posix_remove=no
28947fi
28948rm -f core conftest.err conftest.$ac_objext \
28949    conftest$ac_exeext conftest.$ac_ext
28950LIBS=$ac_check_lib_save_LIBS
28951fi
28952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28953$as_echo "$ac_cv_lib_posix_remove" >&6; }
28954if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28955  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28956fi
28957
28958    fi
28959
28960    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28961    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28962if test "x$ac_cv_func_shmat" = x""yes; then :
28963
28964fi
28965
28966    if test $ac_cv_func_shmat = no; then
28967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28968$as_echo_n "checking for shmat in -lipc... " >&6; }
28969if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28970  $as_echo_n "(cached) " >&6
28971else
28972  ac_check_lib_save_LIBS=$LIBS
28973LIBS="-lipc  $LIBS"
28974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28975/* end confdefs.h.  */
28976
28977/* Override any GCC internal prototype to avoid an error.
28978   Use char because int might match the return type of a GCC
28979   builtin and then its argument prototype would still apply.  */
28980#ifdef __cplusplus
28981extern "C"
28982#endif
28983char shmat ();
28984int
28985main ()
28986{
28987return shmat ();
28988  ;
28989  return 0;
28990}
28991_ACEOF
28992if ac_fn_cxx_try_link "$LINENO"; then :
28993  ac_cv_lib_ipc_shmat=yes
28994else
28995  ac_cv_lib_ipc_shmat=no
28996fi
28997rm -f core conftest.err conftest.$ac_objext \
28998    conftest$ac_exeext conftest.$ac_ext
28999LIBS=$ac_check_lib_save_LIBS
29000fi
29001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29002$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29003if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29004  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29005fi
29006
29007    fi
29008  fi
29009
29010  # Check for libraries that X11R6 Xt/Xaw programs need.
29011  ac_save_LDFLAGS=$LDFLAGS
29012  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29013  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29014  # check for ICE first), but we must link in the order -lSM -lICE or
29015  # we get undefined symbols.  So assume we have SM if we have ICE.
29016  # These have to be linked with before -lX11, unlike the other
29017  # libraries we check for below, so use a different variable.
29018  # John Interrante, Karl Berry
29019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29020$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29021if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29022  $as_echo_n "(cached) " >&6
29023else
29024  ac_check_lib_save_LIBS=$LIBS
29025LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29027/* end confdefs.h.  */
29028
29029/* Override any GCC internal prototype to avoid an error.
29030   Use char because int might match the return type of a GCC
29031   builtin and then its argument prototype would still apply.  */
29032#ifdef __cplusplus
29033extern "C"
29034#endif
29035char IceConnectionNumber ();
29036int
29037main ()
29038{
29039return IceConnectionNumber ();
29040  ;
29041  return 0;
29042}
29043_ACEOF
29044if ac_fn_cxx_try_link "$LINENO"; then :
29045  ac_cv_lib_ICE_IceConnectionNumber=yes
29046else
29047  ac_cv_lib_ICE_IceConnectionNumber=no
29048fi
29049rm -f core conftest.err conftest.$ac_objext \
29050    conftest$ac_exeext conftest.$ac_ext
29051LIBS=$ac_check_lib_save_LIBS
29052fi
29053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29054$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29055if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29056  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29057fi
29058
29059  LDFLAGS=$ac_save_LDFLAGS
29060
29061fi
29062
29063
29064if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29065
29066    # Print a helpful message on how to acquire the necessary build dependency.
29067    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29068    MISSING_DEPENDENCY=x11
29069    PKGHANDLER_COMMAND=
29070
29071    case $PKGHANDLER in
29072	apt-get)
29073                apt_help     $MISSING_DEPENDENCY ;;
29074    yum)
29075                yum_help     $MISSING_DEPENDENCY ;;
29076	port)
29077                port_help    $MISSING_DEPENDENCY ;;
29078	pkgutil)
29079                pkgutil_help $MISSING_DEPENDENCY ;;
29080	pkgadd)
29081                pkgadd_help  $MISSING_DEPENDENCY ;;
29082    * )
29083      break ;;
29084    esac
29085
29086    if test "x$PKGHANDLER_COMMAND" != x; then
29087        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29088    fi
29089
29090    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29091fi
29092
29093# Some of the old makefiles require a setting of OPENWIN_HOME
29094# Since the X11R6 directory has disappeared on later Linuxes,
29095# we need to probe for it.
29096if test "x$OPENJDK_TARGET_OS" = xlinux; then
29097    if test -d "$SYS_ROOT/usr/X11R6"; then
29098        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29099    fi
29100    if test -d "$SYS_ROOT/usr/include/X11"; then
29101        OPENWIN_HOME="$SYS_ROOT/usr"
29102    fi
29103fi
29104if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29105    OPENWIN_HOME="/usr/openwin"
29106fi
29107
29108
29109
29110#
29111# Weird Sol10 something check...TODO change to try compile
29112#
29113if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29114  if test "`uname -r`" = "5.10"; then
29115     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29116     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29117     fi
29118  fi
29119fi
29120
29121ac_ext=c
29122ac_cpp='$CPP $CPPFLAGS'
29123ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29124ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29125ac_compiler_gnu=$ac_cv_c_compiler_gnu
29126
29127OLD_CFLAGS="$CFLAGS"
29128CFLAGS="$CFLAGS $X_CFLAGS"
29129
29130# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29131for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29132do :
29133  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29134ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29135                   # include <X11/Xutil.h>
29136
29137"
29138if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29139  cat >>confdefs.h <<_ACEOF
29140#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29141_ACEOF
29142 X11_A_OK=yes
29143else
29144  X11_A_OK=no
29145fi
29146
29147done
29148
29149
29150CFLAGS="$OLD_CFLAGS"
29151ac_ext=cpp
29152ac_cpp='$CXXCPP $CPPFLAGS'
29153ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29154ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29155ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29156
29157
29158if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29159
29160    # Print a helpful message on how to acquire the necessary build dependency.
29161    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29162    MISSING_DEPENDENCY=x11
29163    PKGHANDLER_COMMAND=
29164
29165    case $PKGHANDLER in
29166	apt-get)
29167                apt_help     $MISSING_DEPENDENCY ;;
29168    yum)
29169                yum_help     $MISSING_DEPENDENCY ;;
29170	port)
29171                port_help    $MISSING_DEPENDENCY ;;
29172	pkgutil)
29173                pkgutil_help $MISSING_DEPENDENCY ;;
29174	pkgadd)
29175                pkgadd_help  $MISSING_DEPENDENCY ;;
29176    * )
29177      break ;;
29178    esac
29179
29180    if test "x$PKGHANDLER_COMMAND" != x; then
29181        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29182    fi
29183
29184    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29185fi
29186
29187
29188
29189
29190
29191
29192###############################################################################
29193#
29194# The common unix printing system cups is used to print from java.
29195#
29196
29197# Check whether --with-cups was given.
29198if test "${with_cups+set}" = set; then :
29199  withval=$with_cups;
29200fi
29201
29202
29203# Check whether --with-cups-include was given.
29204if test "${with_cups_include+set}" = set; then :
29205  withval=$with_cups_include;
29206fi
29207
29208
29209if test "x$CUPS_NOT_NEEDED" = xyes; then
29210	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29211		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29212$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29213	fi
29214	CUPS_CFLAGS=
29215else
29216	CUPS_FOUND=no
29217
29218	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29219	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29220	fi
29221
29222	if test "x${with_cups}" != x; then
29223	    CUPS_CFLAGS="-I${with_cups}/include"
29224	    CUPS_FOUND=yes
29225	fi
29226	if test "x${with_cups_include}" != x; then
29227	    CUPS_CFLAGS="-I${with_cups_include}"
29228	    CUPS_FOUND=yes
29229	fi
29230	if test "x$CUPS_FOUND" = xno; then
29231
29232
29233    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29234        # Source the builddeps file again, to make sure it uses the latest variables!
29235        . $builddepsfile
29236        # Look for a target and build machine specific resource!
29237        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29238        if test "x$resource" = x; then
29239            # Ok, lets instead look for a target specific resource
29240            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29241        fi
29242        if test "x$resource" = x; then
29243            # Ok, lets instead look for a build specific resource
29244            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29245        fi
29246        if test "x$resource" = x; then
29247            # Ok, lets instead look for a generic resource
29248            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29249            resource=${builddep_cups}
29250        fi
29251        if test "x$resource" != x; then
29252            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29253$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29254	    # If the resource in the builddeps.conf file is an existing directory,
29255	    # for example /java/linux/cups
29256	    if test -d ${resource}; then
29257	       depdir=${resource}
29258	    else
29259
29260# cups is for example mymodule
29261# $resource is for example libs/general/libmymod_1_2_3.zip
29262# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29263# $with_builddeps_dir is for example /localhome/builddeps
29264# depdir is the name of the variable into which we store the depdir, eg MYMOD
29265# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29266# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29267    filename=`basename $resource`
29268    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29269    filebase=${filename%%.*}
29270    extension=${filename#*.}
29271    installdir=$with_builddeps_dir/$filebase
29272    if test ! -f $installdir/$filename.unpacked; then
29273        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29274$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29275        if test ! -d $installdir; then
29276            mkdir -p $installdir
29277        fi
29278        if test ! -d $installdir; then
29279            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29280        fi
29281        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29282        touch $tmpfile
29283        if test ! -f $tmpfile; then
29284            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29285        fi
29286
29287    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29288    # $tmpfile is the local file name for the downloaded file.
29289    VALID_TOOL=no
29290    if test "x$BDEPS_FTP" = xwget; then
29291       VALID_TOOL=yes
29292       wget -O $tmpfile $with_builddeps_server/$resource
29293    fi
29294    if test "x$BDEPS_FTP" = xlftp; then
29295       VALID_TOOL=yes
29296       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29297    fi
29298    if test "x$BDEPS_FTP" = xftp; then
29299        VALID_TOOL=yes
29300        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29301        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29302        FTPUSERPWD=${FTPSERVER%%@*}
29303        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29304            FTPUSER=${userpwd%%:*}
29305            FTPPWD=${userpwd#*@}
29306            FTPSERVER=${FTPSERVER#*@}
29307        else
29308            FTPUSER=ftp
29309            FTPPWD=ftp
29310        fi
29311        # the "pass" command does not work on some
29312        # ftp clients (read ftp.exe) but if it works,
29313        # passive mode is better!
29314        (\
29315            echo "user $FTPUSER $FTPPWD"        ;\
29316            echo "pass"                         ;\
29317            echo "bin"                          ;\
29318            echo "get $FTPPATH $tmpfile"              ;\
29319        ) | ftp -in $FTPSERVER
29320    fi
29321    if test "x$VALID_TOOL" != xyes; then
29322       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29323    fi
29324
29325        mv $tmpfile $installdir/$filename
29326        if test ! -s $installdir/$filename; then
29327            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29328        fi
29329        case "$extension" in
29330            zip)  echo "Unzipping $installdir/$filename..."
29331               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29332            ;;
29333            tar.gz) echo "Untaring $installdir/$filename..."
29334               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29335            ;;
29336            tgz) echo "Untaring $installdir/$filename..."
29337               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29338            ;;
29339            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29340            ;;
29341        esac
29342    fi
29343    if test -f $installdir/$filename.unpacked; then
29344        depdir=$installdir
29345    fi
29346
29347	    fi
29348            # Source the builddeps file again, because in the previous command, the depdir
29349            # was updated to point at the current build dependency install directory.
29350            . $builddepsfile
29351            # Now extract variables from the builddeps.conf files.
29352            theroot=${builddep_cups_ROOT}
29353            thecflags=${builddep_cups_CFLAGS}
29354            thelibs=${builddep_cups_LIBS}
29355            if test "x$depdir" = x; then
29356                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29357            fi
29358            CUPS=$depdir
29359            if test "x$theroot" != x; then
29360               CUPS="$theroot"
29361            fi
29362            if test "x$thecflags" != x; then
29363               CUPS_CFLAGS="$thecflags"
29364            fi
29365            if test "x$thelibs" != x; then
29366               CUPS_LIBS="$thelibs"
29367            fi
29368            CUPS_FOUND=yes
29369
29370        fi
29371
29372    fi
29373
29374	fi
29375	if test "x$CUPS_FOUND" = xno; then
29376	    # Are the cups headers installed in the default /usr/include location?
29377	    for ac_header in cups/cups.h cups/ppd.h
29378do :
29379  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29380ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29381if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29382  cat >>confdefs.h <<_ACEOF
29383#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29384_ACEOF
29385 CUPS_FOUND=yes
29386	                      CUPS_CFLAGS=
29387	                      DEFAULT_CUPS=yes
29388fi
29389
29390done
29391
29392	fi
29393	if test "x$CUPS_FOUND" = xno; then
29394	    # Getting nervous now? Lets poke around for standard Solaris third-party
29395	    # package installation locations.
29396	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29397$as_echo_n "checking for cups headers... " >&6; }
29398	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29399	       # An SFW package seems to be installed!
29400	       CUPS_FOUND=yes
29401	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29402	    elif test -s /opt/csw/include/cups/cups.h; then
29403	       # A CSW package seems to be installed!
29404	       CUPS_FOUND=yes
29405	       CUPS_CFLAGS="-I/opt/csw/include"
29406	    fi
29407	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29408$as_echo "$CUPS_FOUND" >&6; }
29409	fi
29410	if test "x$CUPS_FOUND" = xno; then
29411
29412    # Print a helpful message on how to acquire the necessary build dependency.
29413    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29414    MISSING_DEPENDENCY=cups
29415    PKGHANDLER_COMMAND=
29416
29417    case $PKGHANDLER in
29418	apt-get)
29419                apt_help     $MISSING_DEPENDENCY ;;
29420    yum)
29421                yum_help     $MISSING_DEPENDENCY ;;
29422	port)
29423                port_help    $MISSING_DEPENDENCY ;;
29424	pkgutil)
29425                pkgutil_help $MISSING_DEPENDENCY ;;
29426	pkgadd)
29427                pkgadd_help  $MISSING_DEPENDENCY ;;
29428    * )
29429      break ;;
29430    esac
29431
29432    if test "x$PKGHANDLER_COMMAND" != x; then
29433        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29434    fi
29435
29436	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29437	fi
29438fi
29439
29440
29441
29442
29443
29444
29445###############################################################################
29446#
29447# The ubiquitous freetype2 library is used to render fonts.
29448#
29449
29450# Check whether --with-freetype was given.
29451if test "${with_freetype+set}" = set; then :
29452  withval=$with_freetype;
29453fi
29454
29455
29456# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29457USING_SYSTEM_FT_LIB=false
29458
29459if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29460	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29461		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29462$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29463	fi
29464	FREETYPE2_CFLAGS=
29465	FREETYPE2_LIBS=
29466        FREETYPE2_LIB_PATH=
29467else
29468	FREETYPE2_FOUND=no
29469
29470	if test "x$with_freetype" != x; then
29471
29472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29473
29474  # Input might be given as Windows format, start by converting to
29475  # unix format.
29476  path="$with_freetype"
29477  new_path=`$CYGPATH -u "$path"`
29478
29479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29482  # "foo.exe" is OK but "foo" is an error.
29483  #
29484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29485  # It is also a way to make sure we got the proper file name for the real test later on.
29486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29487  if test "x$test_shortpath" = x; then
29488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29489$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29490    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29491  fi
29492
29493  # Call helper function which possibly converts this using DOS-style short mode.
29494  # If so, the updated path is stored in $new_path.
29495
29496  input_path="$new_path"
29497  # Check if we need to convert this using DOS-style short mode. If the path
29498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29499  # take no chances and rewrite it.
29500  # Note: m4 eats our [], so we need to use [ and ] instead.
29501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29502  if test "x$has_forbidden_chars" != x; then
29503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29507      # Going to short mode and back again did indeed matter. Since short mode is
29508      # case insensitive, let's make it lowercase to improve readability.
29509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29510      # Now convert it back to Unix-stile (cygpath)
29511      input_path=`$CYGPATH -u "$shortmode_path"`
29512      new_path="$input_path"
29513    fi
29514  fi
29515
29516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29517  if test "x$test_cygdrive_prefix" = x; then
29518    # As a simple fix, exclude /usr/bin since it's not a real path.
29519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29521      # a path prefixed by /cygdrive for fixpath to work.
29522      new_path="$CYGWIN_ROOT_PATH$input_path"
29523    fi
29524  fi
29525
29526
29527  if test "x$path" != "x$new_path"; then
29528    with_freetype="$new_path"
29529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29530$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29531  fi
29532
29533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29534
29535  path="$with_freetype"
29536  has_colon=`$ECHO $path | $GREP ^.:`
29537  new_path="$path"
29538  if test "x$has_colon" = x; then
29539    # Not in mixed or Windows style, start by that.
29540    new_path=`cmd //c echo $path`
29541  fi
29542
29543
29544  input_path="$new_path"
29545  # Check if we need to convert this using DOS-style short mode. If the path
29546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29547  # take no chances and rewrite it.
29548  # Note: m4 eats our [], so we need to use [ and ] instead.
29549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29550  if test "x$has_forbidden_chars" != x; then
29551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29553  fi
29554
29555
29556  windows_path="$new_path"
29557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29558    unix_path=`$CYGPATH -u "$windows_path"`
29559    new_path="$unix_path"
29560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29562    new_path="$unix_path"
29563  fi
29564
29565  if test "x$path" != "x$new_path"; then
29566    with_freetype="$new_path"
29567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29568$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29569  fi
29570
29571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29573
29574  else
29575    # We're on a posix platform. Hooray! :)
29576    path="$with_freetype"
29577
29578    if test ! -f "$path" && test ! -d "$path"; then
29579      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29580    fi
29581
29582    has_space=`$ECHO "$path" | $GREP " "`
29583    if test "x$has_space" != x; then
29584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29585$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29586      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29587    fi
29588  fi
29589
29590	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29591            FREETYPE2_LIB_PATH="$with_freetype/lib"
29592            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29593                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29594                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29595            fi
29596            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29597                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29598            fi
29599	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29600            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29601                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29602            fi
29603 	    FREETYPE2_FOUND=yes
29604   	    if test "x$FREETYPE2_FOUND" = xyes; then
29605	        # Verify that the directories exist
29606                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29607		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29608		fi
29609	        # List the contents of the lib.
29610		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29611                if test "x$FREETYPELIB" = x; then
29612		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29613		fi
29614	        # Check one h-file
29615                if ! test -s "$with_freetype/include/ft2build.h"; then
29616		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29617		fi
29618            fi
29619        fi
29620	if test "x$FREETYPE2_FOUND" = xno; then
29621
29622
29623    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29624        # Source the builddeps file again, to make sure it uses the latest variables!
29625        . $builddepsfile
29626        # Look for a target and build machine specific resource!
29627        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29628        if test "x$resource" = x; then
29629            # Ok, lets instead look for a target specific resource
29630            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29631        fi
29632        if test "x$resource" = x; then
29633            # Ok, lets instead look for a build specific resource
29634            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29635        fi
29636        if test "x$resource" = x; then
29637            # Ok, lets instead look for a generic resource
29638            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29639            resource=${builddep_freetype2}
29640        fi
29641        if test "x$resource" != x; then
29642            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29643$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29644	    # If the resource in the builddeps.conf file is an existing directory,
29645	    # for example /java/linux/cups
29646	    if test -d ${resource}; then
29647	       depdir=${resource}
29648	    else
29649
29650# freetype2 is for example mymodule
29651# $resource is for example libs/general/libmymod_1_2_3.zip
29652# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29653# $with_builddeps_dir is for example /localhome/builddeps
29654# depdir is the name of the variable into which we store the depdir, eg MYMOD
29655# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29656# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29657    filename=`basename $resource`
29658    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29659    filebase=${filename%%.*}
29660    extension=${filename#*.}
29661    installdir=$with_builddeps_dir/$filebase
29662    if test ! -f $installdir/$filename.unpacked; then
29663        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29664$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29665        if test ! -d $installdir; then
29666            mkdir -p $installdir
29667        fi
29668        if test ! -d $installdir; then
29669            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29670        fi
29671        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29672        touch $tmpfile
29673        if test ! -f $tmpfile; then
29674            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29675        fi
29676
29677    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29678    # $tmpfile is the local file name for the downloaded file.
29679    VALID_TOOL=no
29680    if test "x$BDEPS_FTP" = xwget; then
29681       VALID_TOOL=yes
29682       wget -O $tmpfile $with_builddeps_server/$resource
29683    fi
29684    if test "x$BDEPS_FTP" = xlftp; then
29685       VALID_TOOL=yes
29686       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29687    fi
29688    if test "x$BDEPS_FTP" = xftp; then
29689        VALID_TOOL=yes
29690        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29691        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29692        FTPUSERPWD=${FTPSERVER%%@*}
29693        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29694            FTPUSER=${userpwd%%:*}
29695            FTPPWD=${userpwd#*@}
29696            FTPSERVER=${FTPSERVER#*@}
29697        else
29698            FTPUSER=ftp
29699            FTPPWD=ftp
29700        fi
29701        # the "pass" command does not work on some
29702        # ftp clients (read ftp.exe) but if it works,
29703        # passive mode is better!
29704        (\
29705            echo "user $FTPUSER $FTPPWD"        ;\
29706            echo "pass"                         ;\
29707            echo "bin"                          ;\
29708            echo "get $FTPPATH $tmpfile"              ;\
29709        ) | ftp -in $FTPSERVER
29710    fi
29711    if test "x$VALID_TOOL" != xyes; then
29712       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29713    fi
29714
29715        mv $tmpfile $installdir/$filename
29716        if test ! -s $installdir/$filename; then
29717            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29718        fi
29719        case "$extension" in
29720            zip)  echo "Unzipping $installdir/$filename..."
29721               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29722            ;;
29723            tar.gz) echo "Untaring $installdir/$filename..."
29724               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29725            ;;
29726            tgz) echo "Untaring $installdir/$filename..."
29727               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29728            ;;
29729            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29730            ;;
29731        esac
29732    fi
29733    if test -f $installdir/$filename.unpacked; then
29734        depdir=$installdir
29735    fi
29736
29737	    fi
29738            # Source the builddeps file again, because in the previous command, the depdir
29739            # was updated to point at the current build dependency install directory.
29740            . $builddepsfile
29741            # Now extract variables from the builddeps.conf files.
29742            theroot=${builddep_freetype2_ROOT}
29743            thecflags=${builddep_freetype2_CFLAGS}
29744            thelibs=${builddep_freetype2_LIBS}
29745            if test "x$depdir" = x; then
29746                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29747            fi
29748            FREETYPE2=$depdir
29749            if test "x$theroot" != x; then
29750               FREETYPE2="$theroot"
29751            fi
29752            if test "x$thecflags" != x; then
29753               FREETYPE2_CFLAGS="$thecflags"
29754            fi
29755            if test "x$thelibs" != x; then
29756               FREETYPE2_LIBS="$thelibs"
29757            fi
29758            FREETYPE2_FOUND=yes
29759            else FREETYPE2_FOUND=no
29760
29761        fi
29762        else FREETYPE2_FOUND=no
29763
29764    fi
29765
29766            USING_SYSTEM_FT_LIB=true
29767	fi
29768	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29769            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29770
29771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29772
29773  # Input might be given as Windows format, start by converting to
29774  # unix format.
29775  path="$FREETYPELOCATION"
29776  new_path=`$CYGPATH -u "$path"`
29777
29778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29781  # "foo.exe" is OK but "foo" is an error.
29782  #
29783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29784  # It is also a way to make sure we got the proper file name for the real test later on.
29785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29786  if test "x$test_shortpath" = x; then
29787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29788$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29789    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29790  fi
29791
29792  # Call helper function which possibly converts this using DOS-style short mode.
29793  # If so, the updated path is stored in $new_path.
29794
29795  input_path="$new_path"
29796  # Check if we need to convert this using DOS-style short mode. If the path
29797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29798  # take no chances and rewrite it.
29799  # Note: m4 eats our [], so we need to use [ and ] instead.
29800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29801  if test "x$has_forbidden_chars" != x; then
29802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29806      # Going to short mode and back again did indeed matter. Since short mode is
29807      # case insensitive, let's make it lowercase to improve readability.
29808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29809      # Now convert it back to Unix-stile (cygpath)
29810      input_path=`$CYGPATH -u "$shortmode_path"`
29811      new_path="$input_path"
29812    fi
29813  fi
29814
29815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29816  if test "x$test_cygdrive_prefix" = x; then
29817    # As a simple fix, exclude /usr/bin since it's not a real path.
29818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29820      # a path prefixed by /cygdrive for fixpath to work.
29821      new_path="$CYGWIN_ROOT_PATH$input_path"
29822    fi
29823  fi
29824
29825
29826  if test "x$path" != "x$new_path"; then
29827    FREETYPELOCATION="$new_path"
29828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29829$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29830  fi
29831
29832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29833
29834  path="$FREETYPELOCATION"
29835  has_colon=`$ECHO $path | $GREP ^.:`
29836  new_path="$path"
29837  if test "x$has_colon" = x; then
29838    # Not in mixed or Windows style, start by that.
29839    new_path=`cmd //c echo $path`
29840  fi
29841
29842
29843  input_path="$new_path"
29844  # Check if we need to convert this using DOS-style short mode. If the path
29845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29846  # take no chances and rewrite it.
29847  # Note: m4 eats our [], so we need to use [ and ] instead.
29848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29849  if test "x$has_forbidden_chars" != x; then
29850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29852  fi
29853
29854
29855  windows_path="$new_path"
29856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29857    unix_path=`$CYGPATH -u "$windows_path"`
29858    new_path="$unix_path"
29859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29861    new_path="$unix_path"
29862  fi
29863
29864  if test "x$path" != "x$new_path"; then
29865    FREETYPELOCATION="$new_path"
29866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29867$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29868  fi
29869
29870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29872
29873  else
29874    # We're on a posix platform. Hooray! :)
29875    path="$FREETYPELOCATION"
29876
29877    if test ! -f "$path" && test ! -d "$path"; then
29878      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29879    fi
29880
29881    has_space=`$ECHO "$path" | $GREP " "`
29882    if test "x$has_space" != x; then
29883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29884$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29885      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29886    fi
29887  fi
29888
29889	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29890$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29891	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29892	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29893	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29894 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29895                if ! test -s "$FREETYPE2_LIBS"; then
29896		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29897		fi
29898                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29899		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29900		fi
29901                USING_SYSTEM_FT_LIB=true
29902                FREETYPE2_FOUND=yes
29903	    fi
29904	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29905$as_echo "$FREETYPE2_FOUND" >&6; }
29906        fi
29907	if test "x$FREETYPE2_FOUND" = xno; then
29908
29909pkg_failed=no
29910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29911$as_echo_n "checking for FREETYPE2... " >&6; }
29912
29913if test -n "$FREETYPE2_CFLAGS"; then
29914    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29915 elif test -n "$PKG_CONFIG"; then
29916    if test -n "$PKG_CONFIG" && \
29917    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29918  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29919  ac_status=$?
29920  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29921  test $ac_status = 0; }; then
29922  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29923else
29924  pkg_failed=yes
29925fi
29926 else
29927    pkg_failed=untried
29928fi
29929if test -n "$FREETYPE2_LIBS"; then
29930    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29931 elif test -n "$PKG_CONFIG"; then
29932    if test -n "$PKG_CONFIG" && \
29933    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29934  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29935  ac_status=$?
29936  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29937  test $ac_status = 0; }; then
29938  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29939else
29940  pkg_failed=yes
29941fi
29942 else
29943    pkg_failed=untried
29944fi
29945
29946
29947
29948if test $pkg_failed = yes; then
29949
29950if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29951        _pkg_short_errors_supported=yes
29952else
29953        _pkg_short_errors_supported=no
29954fi
29955        if test $_pkg_short_errors_supported = yes; then
29956	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29957        else
29958	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29959        fi
29960	# Put the nasty error message in config.log where it belongs
29961	echo "$FREETYPE2_PKG_ERRORS" >&5
29962
29963	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29964$as_echo "no" >&6; }
29965                FREETYPE2_FOUND=no
29966elif test $pkg_failed = untried; then
29967	FREETYPE2_FOUND=no
29968else
29969	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29970	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29972$as_echo "yes" >&6; }
29973	FREETYPE2_FOUND=yes
29974fi
29975            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29976            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29977            USING_SYSTEM_FT_LIB=true
29978            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29979            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29980              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29981            fi
29982	fi
29983	if test "x$FREETYPE2_FOUND" = xno; then
29984	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29985$as_echo_n "checking for freetype in some standard locations... " >&6; }
29986
29987	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29988	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29989	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29990	    fi
29991	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29992	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29993	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29994	    fi
29995
29996	    PREV_CXXCFLAGS="$CXXFLAGS"
29997	    PREV_LDFLAGS="$LDFLAGS"
29998	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29999	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30000	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30001/* end confdefs.h.  */
30002#include<ft2build.h>
30003	                    #include FT_FREETYPE_H
30004	                   int main() { return 0; }
30005
30006_ACEOF
30007if ac_fn_cxx_try_link "$LINENO"; then :
30008
30009	                      # Yes, the default cflags and libs did the trick.
30010	                      FREETYPE2_FOUND=yes
30011	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30012	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30013
30014else
30015
30016	                      FREETYPE2_FOUND=no
30017
30018fi
30019rm -f core conftest.err conftest.$ac_objext \
30020    conftest$ac_exeext conftest.$ac_ext
30021            CXXCFLAGS="$PREV_CXXFLAGS"
30022	    LDFLAGS="$PREV_LDFLAGS"
30023	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30024$as_echo "$FREETYPE2_FOUND" >&6; }
30025            USING_SYSTEM_FT_LIB=true
30026	fi
30027	if test "x$FREETYPE2_FOUND" = xno; then
30028
30029    # Print a helpful message on how to acquire the necessary build dependency.
30030    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30031    MISSING_DEPENDENCY=freetype2
30032    PKGHANDLER_COMMAND=
30033
30034    case $PKGHANDLER in
30035	apt-get)
30036                apt_help     $MISSING_DEPENDENCY ;;
30037    yum)
30038                yum_help     $MISSING_DEPENDENCY ;;
30039	port)
30040                port_help    $MISSING_DEPENDENCY ;;
30041	pkgutil)
30042                pkgutil_help $MISSING_DEPENDENCY ;;
30043	pkgadd)
30044                pkgadd_help  $MISSING_DEPENDENCY ;;
30045    * )
30046      break ;;
30047    esac
30048
30049    if test "x$PKGHANDLER_COMMAND" != x; then
30050        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30051    fi
30052
30053		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30054	fi
30055
30056        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30057            # AC_CHECK_LIB does not support use of cl.exe
30058            PREV_LDFLAGS="$LDFLAGS"
30059            LDFLAGS="$FREETYPE2_LIBS"
30060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30061$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30062if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30063  $as_echo_n "(cached) " >&6
30064else
30065  ac_check_lib_save_LIBS=$LIBS
30066LIBS="-lfreetype  $LIBS"
30067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30068/* end confdefs.h.  */
30069
30070/* Override any GCC internal prototype to avoid an error.
30071   Use char because int might match the return type of a GCC
30072   builtin and then its argument prototype would still apply.  */
30073#ifdef __cplusplus
30074extern "C"
30075#endif
30076char FT_Init_FreeType ();
30077int
30078main ()
30079{
30080return FT_Init_FreeType ();
30081  ;
30082  return 0;
30083}
30084_ACEOF
30085if ac_fn_cxx_try_link "$LINENO"; then :
30086  ac_cv_lib_freetype_FT_Init_FreeType=yes
30087else
30088  ac_cv_lib_freetype_FT_Init_FreeType=no
30089fi
30090rm -f core conftest.err conftest.$ac_objext \
30091    conftest$ac_exeext conftest.$ac_ext
30092LIBS=$ac_check_lib_save_LIBS
30093fi
30094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30095$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30096if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30097  FREETYPE2_FOUND=true
30098else
30099  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30100fi
30101
30102            LDFLAGS="$PREV_LDFLAGS"
30103        fi
30104fi
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114###############################################################################
30115#
30116# Check for alsa headers and libraries. Used on Linux/GNU systems.
30117#
30118
30119# Check whether --with-alsa was given.
30120if test "${with_alsa+set}" = set; then :
30121  withval=$with_alsa;
30122fi
30123
30124
30125# Check whether --with-alsa-include was given.
30126if test "${with_alsa_include+set}" = set; then :
30127  withval=$with_alsa_include;
30128fi
30129
30130
30131# Check whether --with-alsa-lib was given.
30132if test "${with_alsa_lib+set}" = set; then :
30133  withval=$with_alsa_lib;
30134fi
30135
30136
30137if test "x$ALSA_NOT_NEEDED" = xyes; then
30138	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30139		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30140$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30141	fi
30142	ALSA_CFLAGS=
30143	ALSA_LIBS=
30144else
30145	ALSA_FOUND=no
30146
30147	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30148	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30149	fi
30150
30151	if test "x${with_alsa}" != x; then
30152	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30153	    ALSA_CFLAGS="-I${with_alsa}/include"
30154	    ALSA_FOUND=yes
30155	fi
30156	if test "x${with_alsa_include}" != x; then
30157	    ALSA_CFLAGS="-I${with_alsa_include}"
30158	    ALSA_FOUND=yes
30159	fi
30160	if test "x${with_alsa_lib}" != x; then
30161	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30162	    ALSA_FOUND=yes
30163	fi
30164	if test "x$ALSA_FOUND" = xno; then
30165
30166
30167    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30168        # Source the builddeps file again, to make sure it uses the latest variables!
30169        . $builddepsfile
30170        # Look for a target and build machine specific resource!
30171        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30172        if test "x$resource" = x; then
30173            # Ok, lets instead look for a target specific resource
30174            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30175        fi
30176        if test "x$resource" = x; then
30177            # Ok, lets instead look for a build specific resource
30178            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30179        fi
30180        if test "x$resource" = x; then
30181            # Ok, lets instead look for a generic resource
30182            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30183            resource=${builddep_alsa}
30184        fi
30185        if test "x$resource" != x; then
30186            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30187$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30188	    # If the resource in the builddeps.conf file is an existing directory,
30189	    # for example /java/linux/cups
30190	    if test -d ${resource}; then
30191	       depdir=${resource}
30192	    else
30193
30194# alsa is for example mymodule
30195# $resource is for example libs/general/libmymod_1_2_3.zip
30196# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30197# $with_builddeps_dir is for example /localhome/builddeps
30198# depdir is the name of the variable into which we store the depdir, eg MYMOD
30199# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30200# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30201    filename=`basename $resource`
30202    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30203    filebase=${filename%%.*}
30204    extension=${filename#*.}
30205    installdir=$with_builddeps_dir/$filebase
30206    if test ! -f $installdir/$filename.unpacked; then
30207        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30208$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30209        if test ! -d $installdir; then
30210            mkdir -p $installdir
30211        fi
30212        if test ! -d $installdir; then
30213            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30214        fi
30215        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30216        touch $tmpfile
30217        if test ! -f $tmpfile; then
30218            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30219        fi
30220
30221    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30222    # $tmpfile is the local file name for the downloaded file.
30223    VALID_TOOL=no
30224    if test "x$BDEPS_FTP" = xwget; then
30225       VALID_TOOL=yes
30226       wget -O $tmpfile $with_builddeps_server/$resource
30227    fi
30228    if test "x$BDEPS_FTP" = xlftp; then
30229       VALID_TOOL=yes
30230       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30231    fi
30232    if test "x$BDEPS_FTP" = xftp; then
30233        VALID_TOOL=yes
30234        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30235        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30236        FTPUSERPWD=${FTPSERVER%%@*}
30237        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30238            FTPUSER=${userpwd%%:*}
30239            FTPPWD=${userpwd#*@}
30240            FTPSERVER=${FTPSERVER#*@}
30241        else
30242            FTPUSER=ftp
30243            FTPPWD=ftp
30244        fi
30245        # the "pass" command does not work on some
30246        # ftp clients (read ftp.exe) but if it works,
30247        # passive mode is better!
30248        (\
30249            echo "user $FTPUSER $FTPPWD"        ;\
30250            echo "pass"                         ;\
30251            echo "bin"                          ;\
30252            echo "get $FTPPATH $tmpfile"              ;\
30253        ) | ftp -in $FTPSERVER
30254    fi
30255    if test "x$VALID_TOOL" != xyes; then
30256       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30257    fi
30258
30259        mv $tmpfile $installdir/$filename
30260        if test ! -s $installdir/$filename; then
30261            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30262        fi
30263        case "$extension" in
30264            zip)  echo "Unzipping $installdir/$filename..."
30265               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30266            ;;
30267            tar.gz) echo "Untaring $installdir/$filename..."
30268               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30269            ;;
30270            tgz) echo "Untaring $installdir/$filename..."
30271               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30272            ;;
30273            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30274            ;;
30275        esac
30276    fi
30277    if test -f $installdir/$filename.unpacked; then
30278        depdir=$installdir
30279    fi
30280
30281	    fi
30282            # Source the builddeps file again, because in the previous command, the depdir
30283            # was updated to point at the current build dependency install directory.
30284            . $builddepsfile
30285            # Now extract variables from the builddeps.conf files.
30286            theroot=${builddep_alsa_ROOT}
30287            thecflags=${builddep_alsa_CFLAGS}
30288            thelibs=${builddep_alsa_LIBS}
30289            if test "x$depdir" = x; then
30290                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30291            fi
30292            ALSA=$depdir
30293            if test "x$theroot" != x; then
30294               ALSA="$theroot"
30295            fi
30296            if test "x$thecflags" != x; then
30297               ALSA_CFLAGS="$thecflags"
30298            fi
30299            if test "x$thelibs" != x; then
30300               ALSA_LIBS="$thelibs"
30301            fi
30302            ALSA_FOUND=yes
30303            else ALSA_FOUND=no
30304
30305        fi
30306        else ALSA_FOUND=no
30307
30308    fi
30309
30310	fi
30311	if test "x$ALSA_FOUND" = xno; then
30312
30313pkg_failed=no
30314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30315$as_echo_n "checking for ALSA... " >&6; }
30316
30317if test -n "$ALSA_CFLAGS"; then
30318    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30319 elif test -n "$PKG_CONFIG"; then
30320    if test -n "$PKG_CONFIG" && \
30321    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30322  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30323  ac_status=$?
30324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30325  test $ac_status = 0; }; then
30326  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30327else
30328  pkg_failed=yes
30329fi
30330 else
30331    pkg_failed=untried
30332fi
30333if test -n "$ALSA_LIBS"; then
30334    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30335 elif test -n "$PKG_CONFIG"; then
30336    if test -n "$PKG_CONFIG" && \
30337    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30338  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30339  ac_status=$?
30340  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30341  test $ac_status = 0; }; then
30342  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30343else
30344  pkg_failed=yes
30345fi
30346 else
30347    pkg_failed=untried
30348fi
30349
30350
30351
30352if test $pkg_failed = yes; then
30353
30354if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30355        _pkg_short_errors_supported=yes
30356else
30357        _pkg_short_errors_supported=no
30358fi
30359        if test $_pkg_short_errors_supported = yes; then
30360	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30361        else
30362	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30363        fi
30364	# Put the nasty error message in config.log where it belongs
30365	echo "$ALSA_PKG_ERRORS" >&5
30366
30367	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30368$as_echo "no" >&6; }
30369                ALSA_FOUND=no
30370elif test $pkg_failed = untried; then
30371	ALSA_FOUND=no
30372else
30373	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30374	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30376$as_echo "yes" >&6; }
30377	ALSA_FOUND=yes
30378fi
30379	fi
30380	if test "x$ALSA_FOUND" = xno; then
30381	    for ac_header in alsa/asoundlib.h
30382do :
30383  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30384if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30385  cat >>confdefs.h <<_ACEOF
30386#define HAVE_ALSA_ASOUNDLIB_H 1
30387_ACEOF
30388 ALSA_FOUND=yes
30389	                      ALSA_CFLAGS=-Iignoreme
30390	                      ALSA_LIBS=-lasound
30391	                      DEFAULT_ALSA=yes
30392else
30393  ALSA_FOUND=no
30394fi
30395
30396done
30397
30398	fi
30399	if test "x$ALSA_FOUND" = xno; then
30400
30401    # Print a helpful message on how to acquire the necessary build dependency.
30402    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30403    MISSING_DEPENDENCY=alsa
30404    PKGHANDLER_COMMAND=
30405
30406    case $PKGHANDLER in
30407	apt-get)
30408                apt_help     $MISSING_DEPENDENCY ;;
30409    yum)
30410                yum_help     $MISSING_DEPENDENCY ;;
30411	port)
30412                port_help    $MISSING_DEPENDENCY ;;
30413	pkgutil)
30414                pkgutil_help $MISSING_DEPENDENCY ;;
30415	pkgadd)
30416                pkgadd_help  $MISSING_DEPENDENCY ;;
30417    * )
30418      break ;;
30419    esac
30420
30421    if test "x$PKGHANDLER_COMMAND" != x; then
30422        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30423    fi
30424
30425	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30426	fi
30427fi
30428
30429
30430
30431
30432
30433
30434
30435###############################################################################
30436#
30437# Check for the jpeg library
30438#
30439
30440USE_EXTERNAL_LIBJPEG=true
30441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30442$as_echo_n "checking for main in -ljpeg... " >&6; }
30443if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30444  $as_echo_n "(cached) " >&6
30445else
30446  ac_check_lib_save_LIBS=$LIBS
30447LIBS="-ljpeg  $LIBS"
30448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30449/* end confdefs.h.  */
30450
30451
30452int
30453main ()
30454{
30455return main ();
30456  ;
30457  return 0;
30458}
30459_ACEOF
30460if ac_fn_cxx_try_link "$LINENO"; then :
30461  ac_cv_lib_jpeg_main=yes
30462else
30463  ac_cv_lib_jpeg_main=no
30464fi
30465rm -f core conftest.err conftest.$ac_objext \
30466    conftest$ac_exeext conftest.$ac_ext
30467LIBS=$ac_check_lib_save_LIBS
30468fi
30469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30470$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30471if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30472  cat >>confdefs.h <<_ACEOF
30473#define HAVE_LIBJPEG 1
30474_ACEOF
30475
30476  LIBS="-ljpeg $LIBS"
30477
30478else
30479   USE_EXTERNAL_LIBJPEG=false
30480               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30481$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30482
30483fi
30484
30485
30486
30487###############################################################################
30488#
30489# Check for the gif library
30490#
30491
30492USE_EXTERNAL_LIBJPEG=true
30493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30494$as_echo_n "checking for main in -lgif... " >&6; }
30495if test "${ac_cv_lib_gif_main+set}" = set; then :
30496  $as_echo_n "(cached) " >&6
30497else
30498  ac_check_lib_save_LIBS=$LIBS
30499LIBS="-lgif  $LIBS"
30500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30501/* end confdefs.h.  */
30502
30503
30504int
30505main ()
30506{
30507return main ();
30508  ;
30509  return 0;
30510}
30511_ACEOF
30512if ac_fn_cxx_try_link "$LINENO"; then :
30513  ac_cv_lib_gif_main=yes
30514else
30515  ac_cv_lib_gif_main=no
30516fi
30517rm -f core conftest.err conftest.$ac_objext \
30518    conftest$ac_exeext conftest.$ac_ext
30519LIBS=$ac_check_lib_save_LIBS
30520fi
30521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30522$as_echo "$ac_cv_lib_gif_main" >&6; }
30523if test "x$ac_cv_lib_gif_main" = x""yes; then :
30524  cat >>confdefs.h <<_ACEOF
30525#define HAVE_LIBGIF 1
30526_ACEOF
30527
30528  LIBS="-lgif $LIBS"
30529
30530else
30531   USE_EXTERNAL_LIBGIF=false
30532               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30533$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30534
30535fi
30536
30537
30538
30539###############################################################################
30540#
30541# Check for the zlib library
30542#
30543
30544
30545# Check whether --with-zlib was given.
30546if test "${with_zlib+set}" = set; then :
30547  withval=$with_zlib;
30548fi
30549
30550
30551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30552$as_echo_n "checking for compress in -lz... " >&6; }
30553if test "${ac_cv_lib_z_compress+set}" = set; then :
30554  $as_echo_n "(cached) " >&6
30555else
30556  ac_check_lib_save_LIBS=$LIBS
30557LIBS="-lz  $LIBS"
30558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30559/* end confdefs.h.  */
30560
30561/* Override any GCC internal prototype to avoid an error.
30562   Use char because int might match the return type of a GCC
30563   builtin and then its argument prototype would still apply.  */
30564#ifdef __cplusplus
30565extern "C"
30566#endif
30567char compress ();
30568int
30569main ()
30570{
30571return compress ();
30572  ;
30573  return 0;
30574}
30575_ACEOF
30576if ac_fn_cxx_try_link "$LINENO"; then :
30577  ac_cv_lib_z_compress=yes
30578else
30579  ac_cv_lib_z_compress=no
30580fi
30581rm -f core conftest.err conftest.$ac_objext \
30582    conftest$ac_exeext conftest.$ac_ext
30583LIBS=$ac_check_lib_save_LIBS
30584fi
30585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30586$as_echo "$ac_cv_lib_z_compress" >&6; }
30587if test "x$ac_cv_lib_z_compress" = x""yes; then :
30588   ZLIB_FOUND=yes
30589else
30590   ZLIB_FOUND=no
30591fi
30592
30593
30594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30595$as_echo_n "checking for which zlib to use... " >&6; }
30596
30597DEFAULT_ZLIB=bundled
30598if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30599#
30600# On macosx default is system...on others default is
30601#
30602    DEFAULT_ZLIB=system
30603fi
30604
30605if test "x${ZLIB_FOUND}" != "xyes"; then
30606#
30607# If we don't find any system...set default to bundled
30608#
30609    DEFAULT_ZLIB=bundled
30610fi
30611
30612#
30613# If user didn't specify, use DEFAULT_ZLIB
30614#
30615if test "x${with_zlib}" = "x"; then
30616    with_zlib=${DEFAULT_ZLIB}
30617fi
30618
30619if test "x${with_zlib}" = "xbundled"; then
30620    USE_EXTERNAL_LIBZ=false
30621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30622$as_echo "bundled" >&6; }
30623elif test "x${with_zlib}" = "xsystem"; then
30624    if test "x${ZLIB_FOUND}" = "xyes"; then
30625        USE_EXTERNAL_LIBZ=true
30626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30627$as_echo "system" >&6; }
30628    else
30629        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30630$as_echo "system not found" >&6; }
30631        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30632    fi
30633else
30634    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30635fi
30636
30637
30638
30639###############################################################################
30640LIBZIP_CAN_USE_MMAP=true
30641
30642
30643
30644###############################################################################
30645#
30646# Check if altzone exists in time.h
30647#
30648
30649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30650/* end confdefs.h.  */
30651#include <time.h>
30652int
30653main ()
30654{
30655return (int)altzone;
30656  ;
30657  return 0;
30658}
30659_ACEOF
30660if ac_fn_cxx_try_link "$LINENO"; then :
30661  has_altzone=yes
30662else
30663  has_altzone=no
30664fi
30665rm -f core conftest.err conftest.$ac_objext \
30666    conftest$ac_exeext conftest.$ac_ext
30667if test "x$has_altzone" = xyes; then
30668
30669$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30670
30671fi
30672
30673###############################################################################
30674#
30675# Check the maths library
30676#
30677
30678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30679$as_echo_n "checking for cos in -lm... " >&6; }
30680if test "${ac_cv_lib_m_cos+set}" = set; then :
30681  $as_echo_n "(cached) " >&6
30682else
30683  ac_check_lib_save_LIBS=$LIBS
30684LIBS="-lm  $LIBS"
30685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30686/* end confdefs.h.  */
30687
30688/* Override any GCC internal prototype to avoid an error.
30689   Use char because int might match the return type of a GCC
30690   builtin and then its argument prototype would still apply.  */
30691#ifdef __cplusplus
30692extern "C"
30693#endif
30694char cos ();
30695int
30696main ()
30697{
30698return cos ();
30699  ;
30700  return 0;
30701}
30702_ACEOF
30703if ac_fn_cxx_try_link "$LINENO"; then :
30704  ac_cv_lib_m_cos=yes
30705else
30706  ac_cv_lib_m_cos=no
30707fi
30708rm -f core conftest.err conftest.$ac_objext \
30709    conftest$ac_exeext conftest.$ac_ext
30710LIBS=$ac_check_lib_save_LIBS
30711fi
30712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30713$as_echo "$ac_cv_lib_m_cos" >&6; }
30714if test "x$ac_cv_lib_m_cos" = x""yes; then :
30715  cat >>confdefs.h <<_ACEOF
30716#define HAVE_LIBM 1
30717_ACEOF
30718
30719  LIBS="-lm $LIBS"
30720
30721else
30722
30723                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30724$as_echo "$as_me: Maths library was not found" >&6;}
30725
30726fi
30727
30728
30729
30730###############################################################################
30731#
30732# Check for libdl.so
30733
30734save_LIBS="$LIBS"
30735LIBS=""
30736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30737$as_echo_n "checking for dlopen in -ldl... " >&6; }
30738if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30739  $as_echo_n "(cached) " >&6
30740else
30741  ac_check_lib_save_LIBS=$LIBS
30742LIBS="-ldl  $LIBS"
30743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30744/* end confdefs.h.  */
30745
30746/* Override any GCC internal prototype to avoid an error.
30747   Use char because int might match the return type of a GCC
30748   builtin and then its argument prototype would still apply.  */
30749#ifdef __cplusplus
30750extern "C"
30751#endif
30752char dlopen ();
30753int
30754main ()
30755{
30756return dlopen ();
30757  ;
30758  return 0;
30759}
30760_ACEOF
30761if ac_fn_cxx_try_link "$LINENO"; then :
30762  ac_cv_lib_dl_dlopen=yes
30763else
30764  ac_cv_lib_dl_dlopen=no
30765fi
30766rm -f core conftest.err conftest.$ac_objext \
30767    conftest$ac_exeext conftest.$ac_ext
30768LIBS=$ac_check_lib_save_LIBS
30769fi
30770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30771$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30772if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30773  cat >>confdefs.h <<_ACEOF
30774#define HAVE_LIBDL 1
30775_ACEOF
30776
30777  LIBS="-ldl $LIBS"
30778
30779fi
30780
30781LIBDL="$LIBS"
30782
30783LIBS="$save_LIBS"
30784
30785
30786
30787###############################################################################
30788#
30789# statically link libstdc++ before C++ ABI is stablized on Linux unless
30790# dynamic build is configured on command line.
30791#
30792
30793# Check whether --with-stdc++lib was given.
30794if test "${with_stdc__lib+set}" = set; then :
30795  withval=$with_stdc__lib;
30796    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30797        && test "x$with_stdc__lib" != xdefault; then
30798      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30799    fi
30800
30801else
30802  with_stdc__lib=default
30803
30804fi
30805
30806
30807if test "x$OPENJDK_TARGET_OS" = xlinux; then
30808    # Test if -lstdc++ works.
30809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30810$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30811    ac_ext=cpp
30812ac_cpp='$CXXCPP $CPPFLAGS'
30813ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30814ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30815ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30816
30817    OLD_CXXFLAGS="$CXXFLAGS"
30818    CXXFLAGS="$CXXFLAGS -lstdc++"
30819    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30820/* end confdefs.h.  */
30821
30822int
30823main ()
30824{
30825return 0;
30826  ;
30827  return 0;
30828}
30829_ACEOF
30830if ac_fn_cxx_try_link "$LINENO"; then :
30831  has_dynamic_libstdcxx=yes
30832else
30833  has_dynamic_libstdcxx=no
30834fi
30835rm -f core conftest.err conftest.$ac_objext \
30836    conftest$ac_exeext conftest.$ac_ext
30837    CXXFLAGS="$OLD_CXXFLAGS"
30838    ac_ext=cpp
30839ac_cpp='$CXXCPP $CPPFLAGS'
30840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30843
30844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30845$as_echo "$has_dynamic_libstdcxx" >&6; }
30846
30847    # Test if stdc++ can be linked statically.
30848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30849$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30850    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30851    ac_ext=cpp
30852ac_cpp='$CXXCPP $CPPFLAGS'
30853ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30854ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30855ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30856
30857    OLD_LIBS="$LIBS"
30858    OLD_CXX="$CXX"
30859    LIBS="$STATIC_STDCXX_FLAGS"
30860    CXX="$CC"
30861    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30862/* end confdefs.h.  */
30863
30864int
30865main ()
30866{
30867return 0;
30868  ;
30869  return 0;
30870}
30871_ACEOF
30872if ac_fn_cxx_try_link "$LINENO"; then :
30873  has_static_libstdcxx=yes
30874else
30875  has_static_libstdcxx=no
30876fi
30877rm -f core conftest.err conftest.$ac_objext \
30878    conftest$ac_exeext conftest.$ac_ext
30879    LIBS="$OLD_LIBS"
30880    CXX="$OLD_CXX"
30881    ac_ext=cpp
30882ac_cpp='$CXXCPP $CPPFLAGS'
30883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30886
30887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30888$as_echo "$has_static_libstdcxx" >&6; }
30889
30890    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30891        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30892    fi
30893
30894    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30895        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30896    fi
30897
30898    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30899        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30900    fi
30901
30902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30903$as_echo_n "checking how to link with libstdc++... " >&6; }
30904    # If dynamic was requested, it's available since it would fail above otherwise.
30905    # If dynamic wasn't requested, go with static unless it isn't available.
30906    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30907        LIBCXX="$LIBCXX -lstdc++"
30908        LDCXX="$CXX"
30909        STATIC_CXX_SETTING="STATIC_CXX=false"
30910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30911$as_echo "dynamic" >&6; }
30912    else
30913        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30914        LDCXX="$CC"
30915        STATIC_CXX_SETTING="STATIC_CXX=true"
30916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30917$as_echo "static" >&6; }
30918    fi
30919fi
30920
30921
30922# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30923if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30924    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30925fi
30926
30927# TODO better (platform agnostic) test
30928if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30929    LIBCXX="-lstdc++"
30930fi
30931
30932
30933
30934
30935
30936# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30937
30938# When using cygwin or msys, we need a wrapper binary that renames
30939# /cygdrive/c/ arguments into c:/ arguments and peeks into
30940# @files and rewrites these too! This wrapper binary is
30941# called fixpath.
30942FIXPATH=
30943if test "x$OPENJDK_BUILD_OS" = xwindows; then
30944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30945$as_echo_n "checking if fixpath can be created... " >&6; }
30946    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30947    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30948    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30949      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30950      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30951      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30952      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30953    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30954      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30955      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30956
30957      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30958      # @ was chosen as separator to minimize risk of other tools messing around with it
30959      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30960      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30961
30962      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30963    fi
30964    rm -f $OUTPUT_ROOT/fixpath*
30965    cd $OUTPUT_ROOT
30966    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30967    cd $CURDIR
30968
30969    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30971$as_echo "no" >&6; }
30972        cat $OUTPUT_ROOT/fixpath1.log
30973        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30974    fi
30975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30976$as_echo "yes" >&6; }
30977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30978$as_echo_n "checking if fixpath.exe works... " >&6; }
30979    cd $OUTPUT_ROOT
30980    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30981    cd $CURDIR
30982    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30984$as_echo "no" >&6; }
30985        cat $OUTPUT_ROOT/fixpath2.log
30986        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30987    fi
30988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30989$as_echo "yes" >&6; }
30990    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30991fi
30992
30993
30994
30995
30996###############################################################################
30997#
30998# We need to do some final tweaking, when everything else is done.
30999#
31000###############################################################################
31001
31002
31003HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31004
31005
31006# The name of the Service Agent jar.
31007SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31008if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31009    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31010fi
31011
31012
31013
31014
31015###############################################################################
31016#
31017# Configure parts of the build that only affect the build performance,
31018# not the result.
31019#
31020###############################################################################
31021
31022
31023# How many cores do we have on this build system?
31024
31025# Check whether --with-num-cores was given.
31026if test "${with_num_cores+set}" = set; then :
31027  withval=$with_num_cores;
31028fi
31029
31030if test "x$with_num_cores" = x; then
31031    # The number of cores were not specified, try to probe them.
31032
31033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31034$as_echo_n "checking for number of cores... " >&6; }
31035    NUM_CORES=1
31036    FOUND_CORES=no
31037
31038    if test -f /proc/cpuinfo; then
31039        # Looks like a Linux (or cygwin) system
31040        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31041        FOUND_CORES=yes
31042    elif test -x /usr/sbin/psrinfo; then
31043        # Looks like a Solaris system
31044        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31045        FOUND_CORES=yes
31046    elif test -x /usr/sbin/system_profiler; then
31047        # Looks like a MacOSX system
31048        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31049        FOUND_CORES=yes
31050    elif test -n "$NUMBER_OF_PROCESSORS"; then
31051        # On windows, look in the env
31052        NUM_CORES=$NUMBER_OF_PROCESSORS
31053        FOUND_CORES=yes
31054    fi
31055
31056    # For c/c++ code we run twice as many concurrent build
31057    # jobs than we have cores, otherwise we will stall on io.
31058    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31059
31060    if test "x$FOUND_CORES" = xyes; then
31061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31062$as_echo "$NUM_CORES" >&6; }
31063    else
31064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31065$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31067$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31068    fi
31069
31070
31071else
31072    NUM_CORES=$with_num_cores
31073    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31074fi
31075
31076
31077
31078
31079# How much memory do we have on this build system?
31080
31081# Check whether --with-memory-size was given.
31082if test "${with_memory_size+set}" = set; then :
31083  withval=$with_memory_size;
31084fi
31085
31086if test "x$with_memory_size" = x; then
31087    # The memory size was not specified, try to probe it.
31088
31089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31090$as_echo_n "checking for memory size... " >&6; }
31091    # Default to 1024 MB
31092    MEMORY_SIZE=1024
31093    FOUND_MEM=no
31094
31095    if test -f /proc/meminfo; then
31096        # Looks like a Linux (or cygwin) system
31097        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31098        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31099        FOUND_MEM=yes
31100    elif test -x /usr/sbin/prtconf; then
31101        # Looks like a Solaris system
31102        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31103        FOUND_MEM=yes
31104    elif test -x /usr/sbin/system_profiler; then
31105        # Looks like a MacOSX system
31106        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31107        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31108        FOUND_MEM=yes
31109    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31110        # Windows, but without cygwin
31111        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31112        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31113        FOUND_MEM=yes
31114    fi
31115
31116    if test "x$FOUND_MEM" = xyes; then
31117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31118$as_echo "$MEMORY_SIZE MB" >&6; }
31119    else
31120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31121$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31123$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31124    fi
31125
31126else
31127    MEMORY_SIZE=$with_memory_size
31128fi
31129
31130
31131
31132# Setup smart javac (after cores and memory have been setup)
31133
31134
31135# Check whether --with-sjavac-server-java was given.
31136if test "${with_sjavac_server_java+set}" = set; then :
31137  withval=$with_sjavac_server_java;
31138fi
31139
31140
31141if test "x$with_sjavac_server_java" != x; then
31142    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31143    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31144    if test "x$FOUND_VERSION" = x; then
31145        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31146    fi
31147else
31148    SJAVAC_SERVER_JAVA=""
31149    # Hotspot specific options.
31150
31151    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31152    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31153    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31154    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31155    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31156        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31157    fi
31158
31159    # JRockit specific options.
31160
31161    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31162    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31163    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31164    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31165    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31166        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31167    fi
31168
31169    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31170fi
31171
31172
31173
31174# Check whether --with-sjavac-server-cores was given.
31175if test "${with_sjavac_server_cores+set}" = set; then :
31176  withval=$with_sjavac_server_cores;
31177fi
31178
31179if test "x$with_sjavac_server_cores" != x; then
31180    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31181else
31182    if test "$NUM_CORES" -gt 16; then
31183        # We set this arbitrary limit because we want to limit the heap
31184        # size of the javac server.
31185        # In the future we will make the javac compilers in the server
31186        # share more and more state, thus enabling us to use more and
31187        # more concurrent threads in the server.
31188        SJAVAC_SERVER_CORES="16"
31189    else
31190        SJAVAC_SERVER_CORES="$NUM_CORES"
31191    fi
31192
31193    if test "$MEMORY_SIZE" -gt "17000"; then
31194        MAX_HEAP_MEM=10000
31195
31196    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31197    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31198    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31199    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31200    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31201        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31202    fi
31203
31204
31205    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31206    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31207    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31208    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31209    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31210        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31211    fi
31212
31213    elif test "$MEMORY_SIZE" -gt "10000"; then
31214        MAX_HEAP_MEM=6000
31215
31216    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31217    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31218    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31219    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31220    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31221        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31222    fi
31223
31224
31225    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31226    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31227    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31228    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31229    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31230        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31231    fi
31232
31233    elif test "$MEMORY_SIZE" -gt "5000"; then
31234        MAX_HEAP_MEM=3000
31235
31236    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31237    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31238    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31239    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31240    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31241        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31242    fi
31243
31244
31245    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31246    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31247    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31248    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31249    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31250        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31251    fi
31252
31253    elif test "$MEMORY_SIZE" -gt "3800"; then
31254        MAX_HEAP_MEM=2500
31255
31256    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31257    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31258    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31259    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31260    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31261        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31262    fi
31263
31264    elif test "$MEMORY_SIZE" -gt "1900"; then
31265        MAX_HEAP_MEM=1200
31266
31267    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31268    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31269    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31270    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31271    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31272        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31273    fi
31274
31275    elif test "$MEMORY_SIZE" -gt "1000"; then
31276        MAX_HEAP_MEM=900
31277
31278    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31279    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31280    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31281    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31282    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31283        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31284    fi
31285
31286    else
31287        MAX_HEAP_MEM=512
31288
31289    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31290    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31291    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31292    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31293    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31294        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31295    fi
31296
31297    fi
31298
31299
31300    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31301    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31302    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31303    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31304    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31305        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31306    fi
31307
31308
31309    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31310    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31311    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31312    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31313    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31314        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31315    fi
31316
31317
31318    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31319    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31320    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31321    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31322    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31323        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31324    fi
31325
31326
31327    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31328    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31329        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31330$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31331        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31333$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31334    fi
31335fi
31336
31337
31338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31339$as_echo_n "checking whether to use sjavac... " >&6; }
31340# Check whether --enable-sjavac was given.
31341if test "${enable_sjavac+set}" = set; then :
31342  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31343else
31344  ENABLE_SJAVAC='no'
31345fi
31346
31347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31348$as_echo "$ENABLE_SJAVAC" >&6; }
31349
31350
31351if test "x$ENABLE_SJAVAC" = xyes; then
31352    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31353else
31354    SJAVAC_SERVER_DIR=
31355fi
31356
31357
31358
31359
31360# Can the C/C++ compiler use precompiled headers?
31361
31362
31363###############################################################################
31364#
31365# Can the C/C++ compiler use precompiled headers?
31366#
31367# Check whether --enable-precompiled-headers was given.
31368if test "${enable_precompiled_headers+set}" = set; then :
31369  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31370else
31371  ENABLE_PRECOMPH=yes
31372fi
31373
31374
31375USE_PRECOMPILED_HEADER=1
31376if test "x$ENABLE_PRECOMPH" = xno; then
31377    USE_PRECOMPILED_HEADER=0
31378fi
31379
31380if test "x$ENABLE_PRECOMPH" = xyes; then
31381    # Check that the compiler actually supports precomp headers.
31382    if test "x$GCC" = xyes; then
31383         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31384$as_echo_n "checking that precompiled headers work... " >&6; }
31385         echo "int alfa();" > conftest.h
31386         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31387         if test ! -f conftest.hpp.gch; then
31388             USE_PRECOMPILED_HEADER=0
31389             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31390$as_echo "no" >&6; }
31391         else
31392             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31393$as_echo "yes" >&6; }
31394         fi
31395         rm -f conftest.h conftest.hpp.gch
31396    fi
31397fi
31398
31399
31400
31401
31402# Setup use of ccache, if available
31403
31404    # Check whether --enable-ccache was given.
31405if test "${enable_ccache+set}" = set; then :
31406  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31407else
31408  ENABLE_CCACHE=yes
31409fi
31410
31411    if test "x$ENABLE_CCACHE" = xyes; then
31412        # Extract the first word of "ccache", so it can be a program name with args.
31413set dummy ccache; ac_word=$2
31414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31415$as_echo_n "checking for $ac_word... " >&6; }
31416if test "${ac_cv_path_CCACHE+set}" = set; then :
31417  $as_echo_n "(cached) " >&6
31418else
31419  case $CCACHE in
31420  [\\/]* | ?:[\\/]*)
31421  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31422  ;;
31423  *)
31424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31425for as_dir in $PATH
31426do
31427  IFS=$as_save_IFS
31428  test -z "$as_dir" && as_dir=.
31429    for ac_exec_ext in '' $ac_executable_extensions; do
31430  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31431    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31433    break 2
31434  fi
31435done
31436  done
31437IFS=$as_save_IFS
31438
31439  ;;
31440esac
31441fi
31442CCACHE=$ac_cv_path_CCACHE
31443if test -n "$CCACHE"; then
31444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31445$as_echo "$CCACHE" >&6; }
31446else
31447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31448$as_echo "no" >&6; }
31449fi
31450
31451
31452    else
31453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31454$as_echo_n "checking for ccache... " >&6; }
31455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31456$as_echo "explicitly disabled" >&6; }
31457        CCACHE=
31458    fi
31459
31460
31461
31462# Check whether --with-ccache-dir was given.
31463if test "${with_ccache_dir+set}" = set; then :
31464  withval=$with_ccache_dir;
31465fi
31466
31467
31468    if test "x$with_ccache_dir" != x; then
31469        # When using a non home ccache directory, assume the use is to share ccache files
31470        # with other users. Thus change the umask.
31471        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31472    fi
31473    CCACHE_FOUND=""
31474    if test "x$CCACHE" != x; then
31475
31476    if test "x$CCACHE" != x; then
31477        CCACHE_FOUND="true"
31478        # Only use ccache if it is 3.1.4 or later, which supports
31479        # precompiled headers.
31480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31481$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31482        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31483        if test "x$HAS_GOOD_CCACHE" = x; then
31484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31485$as_echo "no, disabling ccache" >&6; }
31486            CCACHE=
31487        else
31488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31489$as_echo "yes" >&6; }
31490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31491$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31492            PUSHED_FLAGS="$CXXFLAGS"
31493            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31494            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31495/* end confdefs.h.  */
31496
31497int
31498main ()
31499{
31500
31501  ;
31502  return 0;
31503}
31504_ACEOF
31505if ac_fn_cxx_try_compile "$LINENO"; then :
31506  CC_KNOWS_CCACHE_TRICK=yes
31507else
31508  CC_KNOWS_CCACHE_TRICK=no
31509fi
31510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31511            CXXFLAGS="$PUSHED_FLAGS"
31512            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31513                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31514$as_echo "yes" >&6; }
31515            else
31516                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31517$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31518                CCACHE=
31519            fi
31520        fi
31521    fi
31522
31523    if test "x$CCACHE" != x; then
31524        CCACHE_SLOPPINESS=time_macros
31525        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31526        CCACHE_FLAGS=-fpch-preprocess
31527
31528        if test "x$SET_CCACHE_DIR" != x; then
31529            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31530	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31531        fi
31532    fi
31533
31534    fi
31535
31536
31537###############################################################################
31538#
31539# And now the finish...
31540#
31541###############################################################################
31542
31543# Check for some common pitfalls
31544
31545  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31546    file_to_test="$SRC_ROOT/LICENSE"
31547    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31548      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
31549    fi
31550  fi
31551
31552
31553
31554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31555$as_echo_n "checking if build directory is on local disk... " >&6; }
31556
31557	# df -l lists only local disks; if the given directory is not found then
31558	# a non-zero exit code is given
31559  if test "x$DF" = x; then
31560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31561      # msys does not have df; use Windows "net use" instead.
31562      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31563      if test "x$IS_NETWORK_DISK" = x; then
31564        OUTPUT_DIR_IS_LOCAL="yes"
31565      else
31566        OUTPUT_DIR_IS_LOCAL="no"
31567      fi
31568    else
31569      # No df here, say it's local
31570      OUTPUT_DIR_IS_LOCAL="yes"
31571    fi
31572  else
31573    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31574      OUTPUT_DIR_IS_LOCAL="yes"
31575    else
31576      OUTPUT_DIR_IS_LOCAL="no"
31577    fi
31578  fi
31579
31580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31581$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31582
31583
31584
31585# Check if the user has any old-style ALT_ variables set.
31586FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31587
31588# Before generating output files, test if they exist. If they do, this is a reconfigure.
31589# Since we can't properly handle the dependencies for this, warn the user about the situation
31590if test -e $OUTPUT_ROOT/spec.gmk; then
31591  IS_RECONFIGURE=yes
31592else
31593  IS_RECONFIGURE=no
31594fi
31595
31596if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31597  HIDE_PERFORMANCE_HINTS=yes
31598else
31599  HIDE_PERFORMANCE_HINTS=no
31600  # Hide it the next time around...
31601  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31602fi
31603
31604
31605
31606# At the end, call the custom hook. (Dummy macro if no custom sources available)
31607
31608
31609# We're messing a bit with internal autoconf variables to put the config.status
31610# in the output directory instead of the current directory.
31611CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31612# Create the actual output files. Now the main work of configure is done.
31613cat >confcache <<\_ACEOF
31614# This file is a shell script that caches the results of configure
31615# tests run on this system so they can be shared between configure
31616# scripts and configure runs, see configure's option --config-cache.
31617# It is not useful on other systems.  If it contains results you don't
31618# want to keep, you may remove or edit it.
31619#
31620# config.status only pays attention to the cache file if you give it
31621# the --recheck option to rerun configure.
31622#
31623# `ac_cv_env_foo' variables (set or unset) will be overridden when
31624# loading this file, other *unset* `ac_cv_foo' will be assigned the
31625# following values.
31626
31627_ACEOF
31628
31629# The following way of writing the cache mishandles newlines in values,
31630# but we know of no workaround that is simple, portable, and efficient.
31631# So, we kill variables containing newlines.
31632# Ultrix sh set writes to stderr and can't be redirected directly,
31633# and sets the high bit in the cache file unless we assign to the vars.
31634(
31635  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31636    eval ac_val=\$$ac_var
31637    case $ac_val in #(
31638    *${as_nl}*)
31639      case $ac_var in #(
31640      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31641$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31642      esac
31643      case $ac_var in #(
31644      _ | IFS | as_nl) ;; #(
31645      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31646      *) { eval $ac_var=; unset $ac_var;} ;;
31647      esac ;;
31648    esac
31649  done
31650
31651  (set) 2>&1 |
31652    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31653    *${as_nl}ac_space=\ *)
31654      # `set' does not quote correctly, so add quotes: double-quote
31655      # substitution turns \\\\ into \\, and sed turns \\ into \.
31656      sed -n \
31657	"s/'/'\\\\''/g;
31658	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31659      ;; #(
31660    *)
31661      # `set' quotes correctly as required by POSIX, so do not add quotes.
31662      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31663      ;;
31664    esac |
31665    sort
31666) |
31667  sed '
31668     /^ac_cv_env_/b end
31669     t clear
31670     :clear
31671     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31672     t end
31673     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31674     :end' >>confcache
31675if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31676  if test -w "$cache_file"; then
31677    test "x$cache_file" != "x/dev/null" &&
31678      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31679$as_echo "$as_me: updating cache $cache_file" >&6;}
31680    cat confcache >$cache_file
31681  else
31682    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31683$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31684  fi
31685fi
31686rm -f confcache
31687
31688test "x$prefix" = xNONE && prefix=$ac_default_prefix
31689# Let make expand exec_prefix.
31690test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31691
31692DEFS=-DHAVE_CONFIG_H
31693
31694ac_libobjs=
31695ac_ltlibobjs=
31696U=
31697for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31698  # 1. Remove the extension, and $U if already installed.
31699  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31700  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31701  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31702  #    will be set to the directory where LIBOBJS objects are built.
31703  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31704  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31705done
31706LIBOBJS=$ac_libobjs
31707
31708LTLIBOBJS=$ac_ltlibobjs
31709
31710
31711
31712: ${CONFIG_STATUS=./config.status}
31713ac_write_fail=0
31714ac_clean_files_save=$ac_clean_files
31715ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31716{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31717$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31718as_write_fail=0
31719cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31720#! $SHELL
31721# Generated by $as_me.
31722# Run this file to recreate the current configuration.
31723# Compiler output produced by configure, useful for debugging
31724# configure, is in config.log if it exists.
31725
31726debug=false
31727ac_cs_recheck=false
31728ac_cs_silent=false
31729
31730SHELL=\${CONFIG_SHELL-$SHELL}
31731export SHELL
31732_ASEOF
31733cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31734## -------------------- ##
31735## M4sh Initialization. ##
31736## -------------------- ##
31737
31738# Be more Bourne compatible
31739DUALCASE=1; export DUALCASE # for MKS sh
31740if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31741  emulate sh
31742  NULLCMD=:
31743  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31744  # is contrary to our usage.  Disable this feature.
31745  alias -g '${1+"$@"}'='"$@"'
31746  setopt NO_GLOB_SUBST
31747else
31748  case `(set -o) 2>/dev/null` in #(
31749  *posix*) :
31750    set -o posix ;; #(
31751  *) :
31752     ;;
31753esac
31754fi
31755
31756
31757as_nl='
31758'
31759export as_nl
31760# Printing a long string crashes Solaris 7 /usr/bin/printf.
31761as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31762as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31763as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31764# Prefer a ksh shell builtin over an external printf program on Solaris,
31765# but without wasting forks for bash or zsh.
31766if test -z "$BASH_VERSION$ZSH_VERSION" \
31767    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31768  as_echo='print -r --'
31769  as_echo_n='print -rn --'
31770elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31771  as_echo='printf %s\n'
31772  as_echo_n='printf %s'
31773else
31774  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31775    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31776    as_echo_n='/usr/ucb/echo -n'
31777  else
31778    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31779    as_echo_n_body='eval
31780      arg=$1;
31781      case $arg in #(
31782      *"$as_nl"*)
31783	expr "X$arg" : "X\\(.*\\)$as_nl";
31784	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31785      esac;
31786      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31787    '
31788    export as_echo_n_body
31789    as_echo_n='sh -c $as_echo_n_body as_echo'
31790  fi
31791  export as_echo_body
31792  as_echo='sh -c $as_echo_body as_echo'
31793fi
31794
31795# The user is always right.
31796if test "${PATH_SEPARATOR+set}" != set; then
31797  PATH_SEPARATOR=:
31798  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31799    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31800      PATH_SEPARATOR=';'
31801  }
31802fi
31803
31804
31805# IFS
31806# We need space, tab and new line, in precisely that order.  Quoting is
31807# there to prevent editors from complaining about space-tab.
31808# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31809# splitting by setting IFS to empty value.)
31810IFS=" ""	$as_nl"
31811
31812# Find who we are.  Look in the path if we contain no directory separator.
31813case $0 in #((
31814  *[\\/]* ) as_myself=$0 ;;
31815  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31816for as_dir in $PATH
31817do
31818  IFS=$as_save_IFS
31819  test -z "$as_dir" && as_dir=.
31820    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31821  done
31822IFS=$as_save_IFS
31823
31824     ;;
31825esac
31826# We did not find ourselves, most probably we were run as `sh COMMAND'
31827# in which case we are not to be found in the path.
31828if test "x$as_myself" = x; then
31829  as_myself=$0
31830fi
31831if test ! -f "$as_myself"; then
31832  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31833  exit 1
31834fi
31835
31836# Unset variables that we do not need and which cause bugs (e.g. in
31837# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31838# suppresses any "Segmentation fault" message there.  '((' could
31839# trigger a bug in pdksh 5.2.14.
31840for as_var in BASH_ENV ENV MAIL MAILPATH
31841do eval test x\${$as_var+set} = xset \
31842  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31843done
31844PS1='$ '
31845PS2='> '
31846PS4='+ '
31847
31848# NLS nuisances.
31849LC_ALL=C
31850export LC_ALL
31851LANGUAGE=C
31852export LANGUAGE
31853
31854# CDPATH.
31855(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31856
31857
31858# as_fn_error STATUS ERROR [LINENO LOG_FD]
31859# ----------------------------------------
31860# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31861# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31862# script with STATUS, using 1 if that was 0.
31863as_fn_error ()
31864{
31865  as_status=$1; test $as_status -eq 0 && as_status=1
31866  if test "$4"; then
31867    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31868    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31869  fi
31870  $as_echo "$as_me: error: $2" >&2
31871  as_fn_exit $as_status
31872} # as_fn_error
31873
31874
31875# as_fn_set_status STATUS
31876# -----------------------
31877# Set $? to STATUS, without forking.
31878as_fn_set_status ()
31879{
31880  return $1
31881} # as_fn_set_status
31882
31883# as_fn_exit STATUS
31884# -----------------
31885# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31886as_fn_exit ()
31887{
31888  set +e
31889  as_fn_set_status $1
31890  exit $1
31891} # as_fn_exit
31892
31893# as_fn_unset VAR
31894# ---------------
31895# Portably unset VAR.
31896as_fn_unset ()
31897{
31898  { eval $1=; unset $1;}
31899}
31900as_unset=as_fn_unset
31901# as_fn_append VAR VALUE
31902# ----------------------
31903# Append the text in VALUE to the end of the definition contained in VAR. Take
31904# advantage of any shell optimizations that allow amortized linear growth over
31905# repeated appends, instead of the typical quadratic growth present in naive
31906# implementations.
31907if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31908  eval 'as_fn_append ()
31909  {
31910    eval $1+=\$2
31911  }'
31912else
31913  as_fn_append ()
31914  {
31915    eval $1=\$$1\$2
31916  }
31917fi # as_fn_append
31918
31919# as_fn_arith ARG...
31920# ------------------
31921# Perform arithmetic evaluation on the ARGs, and store the result in the
31922# global $as_val. Take advantage of shells that can avoid forks. The arguments
31923# must be portable across $(()) and expr.
31924if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31925  eval 'as_fn_arith ()
31926  {
31927    as_val=$(( $* ))
31928  }'
31929else
31930  as_fn_arith ()
31931  {
31932    as_val=`expr "$@" || test $? -eq 1`
31933  }
31934fi # as_fn_arith
31935
31936
31937if expr a : '\(a\)' >/dev/null 2>&1 &&
31938   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31939  as_expr=expr
31940else
31941  as_expr=false
31942fi
31943
31944if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31945  as_basename=basename
31946else
31947  as_basename=false
31948fi
31949
31950if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31951  as_dirname=dirname
31952else
31953  as_dirname=false
31954fi
31955
31956as_me=`$as_basename -- "$0" ||
31957$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31958	 X"$0" : 'X\(//\)$' \| \
31959	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31960$as_echo X/"$0" |
31961    sed '/^.*\/\([^/][^/]*\)\/*$/{
31962	    s//\1/
31963	    q
31964	  }
31965	  /^X\/\(\/\/\)$/{
31966	    s//\1/
31967	    q
31968	  }
31969	  /^X\/\(\/\).*/{
31970	    s//\1/
31971	    q
31972	  }
31973	  s/.*/./; q'`
31974
31975# Avoid depending upon Character Ranges.
31976as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31977as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31978as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31979as_cr_digits='0123456789'
31980as_cr_alnum=$as_cr_Letters$as_cr_digits
31981
31982ECHO_C= ECHO_N= ECHO_T=
31983case `echo -n x` in #(((((
31984-n*)
31985  case `echo 'xy\c'` in
31986  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31987  xy)  ECHO_C='\c';;
31988  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31989       ECHO_T='	';;
31990  esac;;
31991*)
31992  ECHO_N='-n';;
31993esac
31994
31995rm -f conf$$ conf$$.exe conf$$.file
31996if test -d conf$$.dir; then
31997  rm -f conf$$.dir/conf$$.file
31998else
31999  rm -f conf$$.dir
32000  mkdir conf$$.dir 2>/dev/null
32001fi
32002if (echo >conf$$.file) 2>/dev/null; then
32003  if ln -s conf$$.file conf$$ 2>/dev/null; then
32004    as_ln_s='ln -s'
32005    # ... but there are two gotchas:
32006    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32007    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32008    # In both cases, we have to default to `cp -p'.
32009    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32010      as_ln_s='cp -p'
32011  elif ln conf$$.file conf$$ 2>/dev/null; then
32012    as_ln_s=ln
32013  else
32014    as_ln_s='cp -p'
32015  fi
32016else
32017  as_ln_s='cp -p'
32018fi
32019rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32020rmdir conf$$.dir 2>/dev/null
32021
32022
32023# as_fn_mkdir_p
32024# -------------
32025# Create "$as_dir" as a directory, including parents if necessary.
32026as_fn_mkdir_p ()
32027{
32028
32029  case $as_dir in #(
32030  -*) as_dir=./$as_dir;;
32031  esac
32032  test -d "$as_dir" || eval $as_mkdir_p || {
32033    as_dirs=
32034    while :; do
32035      case $as_dir in #(
32036      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32037      *) as_qdir=$as_dir;;
32038      esac
32039      as_dirs="'$as_qdir' $as_dirs"
32040      as_dir=`$as_dirname -- "$as_dir" ||
32041$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32042	 X"$as_dir" : 'X\(//\)[^/]' \| \
32043	 X"$as_dir" : 'X\(//\)$' \| \
32044	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32045$as_echo X"$as_dir" |
32046    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32047	    s//\1/
32048	    q
32049	  }
32050	  /^X\(\/\/\)[^/].*/{
32051	    s//\1/
32052	    q
32053	  }
32054	  /^X\(\/\/\)$/{
32055	    s//\1/
32056	    q
32057	  }
32058	  /^X\(\/\).*/{
32059	    s//\1/
32060	    q
32061	  }
32062	  s/.*/./; q'`
32063      test -d "$as_dir" && break
32064    done
32065    test -z "$as_dirs" || eval "mkdir $as_dirs"
32066  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32067
32068
32069} # as_fn_mkdir_p
32070if mkdir -p . 2>/dev/null; then
32071  as_mkdir_p='mkdir -p "$as_dir"'
32072else
32073  test -d ./-p && rmdir ./-p
32074  as_mkdir_p=false
32075fi
32076
32077if test -x / >/dev/null 2>&1; then
32078  as_test_x='test -x'
32079else
32080  if ls -dL / >/dev/null 2>&1; then
32081    as_ls_L_option=L
32082  else
32083    as_ls_L_option=
32084  fi
32085  as_test_x='
32086    eval sh -c '\''
32087      if test -d "$1"; then
32088	test -d "$1/.";
32089      else
32090	case $1 in #(
32091	-*)set "./$1";;
32092	esac;
32093	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32094	???[sx]*):;;*)false;;esac;fi
32095    '\'' sh
32096  '
32097fi
32098as_executable_p=$as_test_x
32099
32100# Sed expression to map a string onto a valid CPP name.
32101as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32102
32103# Sed expression to map a string onto a valid variable name.
32104as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32105
32106
32107exec 6>&1
32108## ----------------------------------- ##
32109## Main body of $CONFIG_STATUS script. ##
32110## ----------------------------------- ##
32111_ASEOF
32112test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32113
32114cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32115# Save the log message, to keep $0 and so on meaningful, and to
32116# report actual input values of CONFIG_FILES etc. instead of their
32117# values after options handling.
32118ac_log="
32119This file was extended by OpenJDK $as_me jdk8, which was
32120generated by GNU Autoconf 2.67.  Invocation command line was
32121
32122  CONFIG_FILES    = $CONFIG_FILES
32123  CONFIG_HEADERS  = $CONFIG_HEADERS
32124  CONFIG_LINKS    = $CONFIG_LINKS
32125  CONFIG_COMMANDS = $CONFIG_COMMANDS
32126  $ $0 $@
32127
32128on `(hostname || uname -n) 2>/dev/null | sed 1q`
32129"
32130
32131_ACEOF
32132
32133case $ac_config_files in *"
32134"*) set x $ac_config_files; shift; ac_config_files=$*;;
32135esac
32136
32137case $ac_config_headers in *"
32138"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32139esac
32140
32141
32142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32143# Files that config.status was made for.
32144config_files="$ac_config_files"
32145config_headers="$ac_config_headers"
32146
32147_ACEOF
32148
32149cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32150ac_cs_usage="\
32151\`$as_me' instantiates files and other configuration actions
32152from templates according to the current configuration.  Unless the files
32153and actions are specified as TAGs, all are instantiated by default.
32154
32155Usage: $0 [OPTION]... [TAG]...
32156
32157  -h, --help       print this help, then exit
32158  -V, --version    print version number and configuration settings, then exit
32159      --config     print configuration, then exit
32160  -q, --quiet, --silent
32161                   do not print progress messages
32162  -d, --debug      don't remove temporary files
32163      --recheck    update $as_me by reconfiguring in the same conditions
32164      --file=FILE[:TEMPLATE]
32165                   instantiate the configuration file FILE
32166      --header=FILE[:TEMPLATE]
32167                   instantiate the configuration header FILE
32168
32169Configuration files:
32170$config_files
32171
32172Configuration headers:
32173$config_headers
32174
32175Report bugs to <build-dev@openjdk.java.net>.
32176OpenJDK home page: <http://openjdk.java.net>."
32177
32178_ACEOF
32179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32180ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32181ac_cs_version="\\
32182OpenJDK config.status jdk8
32183configured by $0, generated by GNU Autoconf 2.67,
32184  with options \\"\$ac_cs_config\\"
32185
32186Copyright (C) 2010 Free Software Foundation, Inc.
32187This config.status script is free software; the Free Software Foundation
32188gives unlimited permission to copy, distribute and modify it."
32189
32190ac_pwd='$ac_pwd'
32191srcdir='$srcdir'
32192AWK='$AWK'
32193test -n "\$AWK" || AWK=awk
32194_ACEOF
32195
32196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32197# The default lists apply if the user does not specify any file.
32198ac_need_defaults=:
32199while test $# != 0
32200do
32201  case $1 in
32202  --*=?*)
32203    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32204    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32205    ac_shift=:
32206    ;;
32207  --*=)
32208    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32209    ac_optarg=
32210    ac_shift=:
32211    ;;
32212  *)
32213    ac_option=$1
32214    ac_optarg=$2
32215    ac_shift=shift
32216    ;;
32217  esac
32218
32219  case $ac_option in
32220  # Handling of the options.
32221  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32222    ac_cs_recheck=: ;;
32223  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32224    $as_echo "$ac_cs_version"; exit ;;
32225  --config | --confi | --conf | --con | --co | --c )
32226    $as_echo "$ac_cs_config"; exit ;;
32227  --debug | --debu | --deb | --de | --d | -d )
32228    debug=: ;;
32229  --file | --fil | --fi | --f )
32230    $ac_shift
32231    case $ac_optarg in
32232    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32233    '') as_fn_error $? "missing file argument" ;;
32234    esac
32235    as_fn_append CONFIG_FILES " '$ac_optarg'"
32236    ac_need_defaults=false;;
32237  --header | --heade | --head | --hea )
32238    $ac_shift
32239    case $ac_optarg in
32240    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32241    esac
32242    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32243    ac_need_defaults=false;;
32244  --he | --h)
32245    # Conflict between --help and --header
32246    as_fn_error $? "ambiguous option: \`$1'
32247Try \`$0 --help' for more information.";;
32248  --help | --hel | -h )
32249    $as_echo "$ac_cs_usage"; exit ;;
32250  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32251  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32252    ac_cs_silent=: ;;
32253
32254  # This is an error.
32255  -*) as_fn_error $? "unrecognized option: \`$1'
32256Try \`$0 --help' for more information." ;;
32257
32258  *) as_fn_append ac_config_targets " $1"
32259     ac_need_defaults=false ;;
32260
32261  esac
32262  shift
32263done
32264
32265ac_configure_extra_args=
32266
32267if $ac_cs_silent; then
32268  exec 6>/dev/null
32269  ac_configure_extra_args="$ac_configure_extra_args --silent"
32270fi
32271
32272_ACEOF
32273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32274if \$ac_cs_recheck; then
32275  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32276  shift
32277  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32278  CONFIG_SHELL='$SHELL'
32279  export CONFIG_SHELL
32280  exec "\$@"
32281fi
32282
32283_ACEOF
32284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32285exec 5>>config.log
32286{
32287  echo
32288  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32289## Running $as_me. ##
32290_ASBOX
32291  $as_echo "$ac_log"
32292} >&5
32293
32294_ACEOF
32295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32296_ACEOF
32297
32298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32299
32300# Handling of arguments.
32301for ac_config_target in $ac_config_targets
32302do
32303  case $ac_config_target in
32304    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32305    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32306    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32307    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32308    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32309    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32310    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32311
32312  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32313  esac
32314done
32315
32316
32317# If the user did not use the arguments to specify the items to instantiate,
32318# then the envvar interface is used.  Set only those that are not.
32319# We use the long form for the default assignment because of an extremely
32320# bizarre bug on SunOS 4.1.3.
32321if $ac_need_defaults; then
32322  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32323  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32324fi
32325
32326# Have a temporary directory for convenience.  Make it in the build tree
32327# simply because there is no reason against having it here, and in addition,
32328# creating and moving files from /tmp can sometimes cause problems.
32329# Hook for its removal unless debugging.
32330# Note that there is a small window in which the directory will not be cleaned:
32331# after its creation but before its name has been assigned to `$tmp'.
32332$debug ||
32333{
32334  tmp=
32335  trap 'exit_status=$?
32336  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32337' 0
32338  trap 'as_fn_exit 1' 1 2 13 15
32339}
32340# Create a (secure) tmp directory for tmp files.
32341
32342{
32343  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32344  test -n "$tmp" && test -d "$tmp"
32345}  ||
32346{
32347  tmp=./conf$$-$RANDOM
32348  (umask 077 && mkdir "$tmp")
32349} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32350
32351# Set up the scripts for CONFIG_FILES section.
32352# No need to generate them if there are no CONFIG_FILES.
32353# This happens for instance with `./config.status config.h'.
32354if test -n "$CONFIG_FILES"; then
32355
32356
32357ac_cr=`echo X | tr X '\015'`
32358# On cygwin, bash can eat \r inside `` if the user requested igncr.
32359# But we know of no other shell where ac_cr would be empty at this
32360# point, so we can use a bashism as a fallback.
32361if test "x$ac_cr" = x; then
32362  eval ac_cr=\$\'\\r\'
32363fi
32364ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32365if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32366  ac_cs_awk_cr='\\r'
32367else
32368  ac_cs_awk_cr=$ac_cr
32369fi
32370
32371echo 'BEGIN {' >"$tmp/subs1.awk" &&
32372_ACEOF
32373
32374
32375{
32376  echo "cat >conf$$subs.awk <<_ACEOF" &&
32377  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32378  echo "_ACEOF"
32379} >conf$$subs.sh ||
32380  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32381ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32382ac_delim='%!_!# '
32383for ac_last_try in false false false false false :; do
32384  . ./conf$$subs.sh ||
32385    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32386
32387  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32388  if test $ac_delim_n = $ac_delim_num; then
32389    break
32390  elif $ac_last_try; then
32391    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32392  else
32393    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32394  fi
32395done
32396rm -f conf$$subs.sh
32397
32398cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32399cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32400_ACEOF
32401sed -n '
32402h
32403s/^/S["/; s/!.*/"]=/
32404p
32405g
32406s/^[^!]*!//
32407:repl
32408t repl
32409s/'"$ac_delim"'$//
32410t delim
32411:nl
32412h
32413s/\(.\{148\}\)..*/\1/
32414t more1
32415s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32416p
32417n
32418b repl
32419:more1
32420s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32421p
32422g
32423s/.\{148\}//
32424t nl
32425:delim
32426h
32427s/\(.\{148\}\)..*/\1/
32428t more2
32429s/["\\]/\\&/g; s/^/"/; s/$/"/
32430p
32431b
32432:more2
32433s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32434p
32435g
32436s/.\{148\}//
32437t delim
32438' <conf$$subs.awk | sed '
32439/^[^""]/{
32440  N
32441  s/\n//
32442}
32443' >>$CONFIG_STATUS || ac_write_fail=1
32444rm -f conf$$subs.awk
32445cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32446_ACAWK
32447cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32448  for (key in S) S_is_set[key] = 1
32449  FS = ""
32450
32451}
32452{
32453  line = $ 0
32454  nfields = split(line, field, "@")
32455  substed = 0
32456  len = length(field[1])
32457  for (i = 2; i < nfields; i++) {
32458    key = field[i]
32459    keylen = length(key)
32460    if (S_is_set[key]) {
32461      value = S[key]
32462      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32463      len += length(value) + length(field[++i])
32464      substed = 1
32465    } else
32466      len += 1 + keylen
32467  }
32468
32469  print line
32470}
32471
32472_ACAWK
32473_ACEOF
32474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32475if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32476  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32477else
32478  cat
32479fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32480  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32481_ACEOF
32482
32483# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32484# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32485# trailing colons and then remove the whole line if VPATH becomes empty
32486# (actually we leave an empty line to preserve line numbers).
32487if test "x$srcdir" = x.; then
32488  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32489h
32490s///
32491s/^/:/
32492s/[	 ]*$/:/
32493s/:\$(srcdir):/:/g
32494s/:\${srcdir}:/:/g
32495s/:@srcdir@:/:/g
32496s/^:*//
32497s/:*$//
32498x
32499s/\(=[	 ]*\).*/\1/
32500G
32501s/\n//
32502s/^[^=]*=[	 ]*$//
32503}'
32504fi
32505
32506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32507fi # test -n "$CONFIG_FILES"
32508
32509# Set up the scripts for CONFIG_HEADERS section.
32510# No need to generate them if there are no CONFIG_HEADERS.
32511# This happens for instance with `./config.status Makefile'.
32512if test -n "$CONFIG_HEADERS"; then
32513cat >"$tmp/defines.awk" <<\_ACAWK ||
32514BEGIN {
32515_ACEOF
32516
32517# Transform confdefs.h into an awk script `defines.awk', embedded as
32518# here-document in config.status, that substitutes the proper values into
32519# config.h.in to produce config.h.
32520
32521# Create a delimiter string that does not exist in confdefs.h, to ease
32522# handling of long lines.
32523ac_delim='%!_!# '
32524for ac_last_try in false false :; do
32525  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32526  if test -z "$ac_t"; then
32527    break
32528  elif $ac_last_try; then
32529    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32530  else
32531    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32532  fi
32533done
32534
32535# For the awk script, D is an array of macro values keyed by name,
32536# likewise P contains macro parameters if any.  Preserve backslash
32537# newline sequences.
32538
32539ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32540sed -n '
32541s/.\{148\}/&'"$ac_delim"'/g
32542t rset
32543:rset
32544s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32545t def
32546d
32547:def
32548s/\\$//
32549t bsnl
32550s/["\\]/\\&/g
32551s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32552D["\1"]=" \3"/p
32553s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32554d
32555:bsnl
32556s/["\\]/\\&/g
32557s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32558D["\1"]=" \3\\\\\\n"\\/p
32559t cont
32560s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32561t cont
32562d
32563:cont
32564n
32565s/.\{148\}/&'"$ac_delim"'/g
32566t clear
32567:clear
32568s/\\$//
32569t bsnlc
32570s/["\\]/\\&/g; s/^/"/; s/$/"/p
32571d
32572:bsnlc
32573s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32574b cont
32575' <confdefs.h | sed '
32576s/'"$ac_delim"'/"\\\
32577"/g' >>$CONFIG_STATUS || ac_write_fail=1
32578
32579cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32580  for (key in D) D_is_set[key] = 1
32581  FS = ""
32582}
32583/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32584  line = \$ 0
32585  split(line, arg, " ")
32586  if (arg[1] == "#") {
32587    defundef = arg[2]
32588    mac1 = arg[3]
32589  } else {
32590    defundef = substr(arg[1], 2)
32591    mac1 = arg[2]
32592  }
32593  split(mac1, mac2, "(") #)
32594  macro = mac2[1]
32595  prefix = substr(line, 1, index(line, defundef) - 1)
32596  if (D_is_set[macro]) {
32597    # Preserve the white space surrounding the "#".
32598    print prefix "define", macro P[macro] D[macro]
32599    next
32600  } else {
32601    # Replace #undef with comments.  This is necessary, for example,
32602    # in the case of _POSIX_SOURCE, which is predefined and required
32603    # on some systems where configure will not decide to define it.
32604    if (defundef == "undef") {
32605      print "/*", prefix defundef, macro, "*/"
32606      next
32607    }
32608  }
32609}
32610{ print }
32611_ACAWK
32612_ACEOF
32613cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32614  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32615fi # test -n "$CONFIG_HEADERS"
32616
32617
32618eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32619shift
32620for ac_tag
32621do
32622  case $ac_tag in
32623  :[FHLC]) ac_mode=$ac_tag; continue;;
32624  esac
32625  case $ac_mode$ac_tag in
32626  :[FHL]*:*);;
32627  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32628  :[FH]-) ac_tag=-:-;;
32629  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32630  esac
32631  ac_save_IFS=$IFS
32632  IFS=:
32633  set x $ac_tag
32634  IFS=$ac_save_IFS
32635  shift
32636  ac_file=$1
32637  shift
32638
32639  case $ac_mode in
32640  :L) ac_source=$1;;
32641  :[FH])
32642    ac_file_inputs=
32643    for ac_f
32644    do
32645      case $ac_f in
32646      -) ac_f="$tmp/stdin";;
32647      *) # Look for the file first in the build tree, then in the source tree
32648	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32649	 # because $ac_f cannot contain `:'.
32650	 test -f "$ac_f" ||
32651	   case $ac_f in
32652	   [\\/$]*) false;;
32653	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32654	   esac ||
32655	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32656      esac
32657      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32658      as_fn_append ac_file_inputs " '$ac_f'"
32659    done
32660
32661    # Let's still pretend it is `configure' which instantiates (i.e., don't
32662    # use $as_me), people would be surprised to read:
32663    #    /* config.h.  Generated by config.status.  */
32664    configure_input='Generated from '`
32665	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32666	`' by configure.'
32667    if test x"$ac_file" != x-; then
32668      configure_input="$ac_file.  $configure_input"
32669      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32670$as_echo "$as_me: creating $ac_file" >&6;}
32671    fi
32672    # Neutralize special characters interpreted by sed in replacement strings.
32673    case $configure_input in #(
32674    *\&* | *\|* | *\\* )
32675       ac_sed_conf_input=`$as_echo "$configure_input" |
32676       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32677    *) ac_sed_conf_input=$configure_input;;
32678    esac
32679
32680    case $ac_tag in
32681    *:-:* | *:-) cat >"$tmp/stdin" \
32682      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32683    esac
32684    ;;
32685  esac
32686
32687  ac_dir=`$as_dirname -- "$ac_file" ||
32688$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32689	 X"$ac_file" : 'X\(//\)[^/]' \| \
32690	 X"$ac_file" : 'X\(//\)$' \| \
32691	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32692$as_echo X"$ac_file" |
32693    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32694	    s//\1/
32695	    q
32696	  }
32697	  /^X\(\/\/\)[^/].*/{
32698	    s//\1/
32699	    q
32700	  }
32701	  /^X\(\/\/\)$/{
32702	    s//\1/
32703	    q
32704	  }
32705	  /^X\(\/\).*/{
32706	    s//\1/
32707	    q
32708	  }
32709	  s/.*/./; q'`
32710  as_dir="$ac_dir"; as_fn_mkdir_p
32711  ac_builddir=.
32712
32713case "$ac_dir" in
32714.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32715*)
32716  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32717  # A ".." for each directory in $ac_dir_suffix.
32718  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32719  case $ac_top_builddir_sub in
32720  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32721  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32722  esac ;;
32723esac
32724ac_abs_top_builddir=$ac_pwd
32725ac_abs_builddir=$ac_pwd$ac_dir_suffix
32726# for backward compatibility:
32727ac_top_builddir=$ac_top_build_prefix
32728
32729case $srcdir in
32730  .)  # We are building in place.
32731    ac_srcdir=.
32732    ac_top_srcdir=$ac_top_builddir_sub
32733    ac_abs_top_srcdir=$ac_pwd ;;
32734  [\\/]* | ?:[\\/]* )  # Absolute name.
32735    ac_srcdir=$srcdir$ac_dir_suffix;
32736    ac_top_srcdir=$srcdir
32737    ac_abs_top_srcdir=$srcdir ;;
32738  *) # Relative name.
32739    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32740    ac_top_srcdir=$ac_top_build_prefix$srcdir
32741    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32742esac
32743ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32744
32745
32746  case $ac_mode in
32747  :F)
32748  #
32749  # CONFIG_FILE
32750  #
32751
32752_ACEOF
32753
32754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32755# If the template does not know about datarootdir, expand it.
32756# FIXME: This hack should be removed a few years after 2.60.
32757ac_datarootdir_hack=; ac_datarootdir_seen=
32758ac_sed_dataroot='
32759/datarootdir/ {
32760  p
32761  q
32762}
32763/@datadir@/p
32764/@docdir@/p
32765/@infodir@/p
32766/@localedir@/p
32767/@mandir@/p'
32768case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32769*datarootdir*) ac_datarootdir_seen=yes;;
32770*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32771  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32772$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32773_ACEOF
32774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32775  ac_datarootdir_hack='
32776  s&@datadir@&$datadir&g
32777  s&@docdir@&$docdir&g
32778  s&@infodir@&$infodir&g
32779  s&@localedir@&$localedir&g
32780  s&@mandir@&$mandir&g
32781  s&\\\${datarootdir}&$datarootdir&g' ;;
32782esac
32783_ACEOF
32784
32785# Neutralize VPATH when `$srcdir' = `.'.
32786# Shell code in configure.ac might set extrasub.
32787# FIXME: do we really want to maintain this feature?
32788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32789ac_sed_extra="$ac_vpsub
32790$extrasub
32791_ACEOF
32792cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32793:t
32794/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32795s|@configure_input@|$ac_sed_conf_input|;t t
32796s&@top_builddir@&$ac_top_builddir_sub&;t t
32797s&@top_build_prefix@&$ac_top_build_prefix&;t t
32798s&@srcdir@&$ac_srcdir&;t t
32799s&@abs_srcdir@&$ac_abs_srcdir&;t t
32800s&@top_srcdir@&$ac_top_srcdir&;t t
32801s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32802s&@builddir@&$ac_builddir&;t t
32803s&@abs_builddir@&$ac_abs_builddir&;t t
32804s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32805$ac_datarootdir_hack
32806"
32807eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32808  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32809
32810test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32811  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32812  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32813  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32814which seems to be undefined.  Please make sure it is defined" >&5
32815$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32816which seems to be undefined.  Please make sure it is defined" >&2;}
32817
32818  rm -f "$tmp/stdin"
32819  case $ac_file in
32820  -) cat "$tmp/out" && rm -f "$tmp/out";;
32821  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32822  esac \
32823  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32824 ;;
32825  :H)
32826  #
32827  # CONFIG_HEADER
32828  #
32829  if test x"$ac_file" != x-; then
32830    {
32831      $as_echo "/* $configure_input  */" \
32832      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32833    } >"$tmp/config.h" \
32834      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32835    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32836      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32837$as_echo "$as_me: $ac_file is unchanged" >&6;}
32838    else
32839      rm -f "$ac_file"
32840      mv "$tmp/config.h" "$ac_file" \
32841	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32842    fi
32843  else
32844    $as_echo "/* $configure_input  */" \
32845      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32846      || as_fn_error $? "could not create -" "$LINENO" 5
32847  fi
32848 ;;
32849
32850
32851  esac
32852
32853done # for ac_tag
32854
32855
32856as_fn_exit 0
32857_ACEOF
32858ac_clean_files=$ac_clean_files_save
32859
32860test $ac_write_fail = 0 ||
32861  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32862
32863
32864# configure is writing to config.log, and then calls config.status.
32865# config.status does its own redirection, appending to config.log.
32866# Unfortunately, on DOS this fails, as config.log is still kept open
32867# by configure, so config.status won't be able to write to it; its
32868# output is simply discarded.  So we exec the FD to /dev/null,
32869# effectively closing config.log, so it can be properly (re)opened and
32870# appended to by config.status.  When coming back to configure, we
32871# need to make the FD available again.
32872if test "$no_create" != yes; then
32873  ac_cs_success=:
32874  ac_config_status_args=
32875  test "$silent" = yes &&
32876    ac_config_status_args="$ac_config_status_args --quiet"
32877  exec 5>/dev/null
32878  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32879  exec 5>>config.log
32880  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32881  # would make configure fail if this is the last instruction.
32882  $ac_cs_success || as_fn_exit 1
32883fi
32884if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32885  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32886$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32887fi
32888
32889
32890# Make the compare script executable
32891$CHMOD +x $OUTPUT_ROOT/compare.sh
32892
32893# Finally output some useful information to the user
32894
32895# Finally output some useful information to the user
32896
32897if test "x$CCACHE_FOUND" != x; then
32898	if  test "x$HAS_GOOD_CCACHE" = x; then
32899		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32900		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32901	else
32902		CCACHE_STATUS="installed and in use"
32903	fi
32904else
32905	if test "x$GCC" = xyes; then
32906		CCACHE_STATUS="not installed (consider installing)"
32907		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32908	else
32909		CCACHE_STATUS="not available for your system"
32910	fi
32911fi
32912
32913printf "\n"
32914printf "====================================================\n"
32915printf "A new configuration has been successfully created in\n"
32916printf "$OUTPUT_ROOT\n"
32917if test "x$CONFIGURE_COMMAND_LINE" != x; then
32918	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32919else
32920	printf "using default settings.\n"
32921fi
32922
32923printf "\n"
32924printf "Configuration summary:\n"
32925printf "* Debug level:    $DEBUG_LEVEL\n"
32926printf "* JDK variant:    $JDK_VARIANT\n"
32927printf "* JVM variants:   $with_jvm_variants\n"
32928printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32929
32930printf "\n"
32931printf "Tools summary:\n"
32932if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32933  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32934fi
32935printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32936printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32937printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32938
32939printf "\n"
32940printf "Build performance summary:\n"
32941printf "* Cores to use:   $NUM_CORES\n"
32942printf "* Memory limit:   $MEMORY_SIZE MB\n"
32943printf "* ccache status:  $CCACHE_STATUS\n"
32944printf "\n"
32945
32946if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32947	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32948	printf "$CCACHE_HELP_MSG\n"
32949
32950    # Print a helpful message on how to acquire the necessary build dependency.
32951    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32952    MISSING_DEPENDENCY=ccache
32953    PKGHANDLER_COMMAND=
32954
32955    case $PKGHANDLER in
32956	apt-get)
32957                apt_help     $MISSING_DEPENDENCY ;;
32958    yum)
32959                yum_help     $MISSING_DEPENDENCY ;;
32960	port)
32961                port_help    $MISSING_DEPENDENCY ;;
32962	pkgutil)
32963                pkgutil_help $MISSING_DEPENDENCY ;;
32964	pkgadd)
32965                pkgadd_help  $MISSING_DEPENDENCY ;;
32966    * )
32967      break ;;
32968    esac
32969
32970    if test "x$PKGHANDLER_COMMAND" != x; then
32971        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32972    fi
32973
32974	printf "$HELP_MSG\n"
32975	printf "\n"
32976fi
32977
32978if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32979	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32980	printf "will result in longer build times.\n"
32981	printf "\n"
32982fi
32983
32984if test "x$FOUND_ALT_VARIABLES" != "x"; then
32985	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32986	printf "These are not respected, and will be ignored. It is recommended\n"
32987	printf "that you clean your environment. The following variables are set:\n"
32988	printf "$FOUND_ALT_VARIABLES\n"
32989	printf "\n"
32990fi
32991
32992if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32993	printf "WARNING: Your build output directory is not on a local disk.\n"
32994	printf "This will severely degrade build performance!\n"
32995	printf "It is recommended that you create an output directory on a local disk,\n"
32996	printf "and run the configure script again from that directory.\n"
32997	printf "\n"
32998fi
32999
33000if test "x$IS_RECONFIGURE" = "xyes"; then
33001	printf "WARNING: The result of this configuration has overridden an older\n"
33002	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33003	printf "proper build. Failure to do so might result in strange build problems.\n"
33004	printf "\n"
33005fi
33006
33007