generated-configure.sh revision 559:abc8078e070b
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
755USER_RELEASE_SUFFIX
756JDK_VERSION
757RUNTIME_NAME
758COPYRIGHT_YEAR
759MACOSX_BUNDLE_ID_BASE
760MACOSX_BUNDLE_NAME_BASE
761COMPANY_NAME
762JDK_RC_PLATFORM_NAME
763PRODUCT_SUFFIX
764PRODUCT_NAME
765LAUNCHER_NAME
766MILESTONE
767JDK_BUILD_NUMBER
768JDK_UPDATE_VERSION
769JDK_MICRO_VERSION
770JDK_MINOR_VERSION
771JDK_MAJOR_VERSION
772COMPRESS_JARS
773UNLIMITED_CRYPTO
774CACERTS_FILE
775TEST_IN_BUILD
776BUILD_HEADLESS
777SUPPORT_HEADFUL
778SUPPORT_HEADLESS
779SET_OPENJDK
780BDEPS_FTP
781BDEPS_UNZIP
782OS_VERSION_MICRO
783OS_VERSION_MINOR
784OS_VERSION_MAJOR
785PKG_CONFIG
786COMM
787TIME
788STAT
789HG
790READELF
791OTOOL
792LDD
793ZIP
794UNZIP
795FIND_DELETE
796MAKE
797CHECK_TOOLSDIR_MAKE
798CHECK_TOOLSDIR_GMAKE
799CHECK_MAKE
800CHECK_GMAKE
801PKGHANDLER
802OUTPUT_ROOT
803CONF_NAME
804SPEC
805BUILD_VARIANT_RELEASE
806DEBUG_CLASSFILES
807FASTDEBUG
808VARIANT
809DEBUG_LEVEL
810MACOSX_UNIVERSAL
811JVM_VARIANT_ZEROSHARK
812JVM_VARIANT_ZERO
813JVM_VARIANT_KERNEL
814JVM_VARIANT_MINIMAL1
815JVM_VARIANT_CLIENT
816JVM_VARIANT_SERVER
817JVM_VARIANTS
818JDK_VARIANT
819BUILD_LOG_WRAPPER
820BUILD_LOG_PREVIOUS
821BUILD_LOG
822SYS_ROOT
823PATH_SEP
824SRC_ROOT
825DEFINE_CROSS_COMPILE_ARCH
826LP64
827OPENJDK_TARGET_OS_API_DIR
828OPENJDK_TARGET_CPU_JLI_CFLAGS
829OPENJDK_TARGET_CPU_OSARCH
830OPENJDK_TARGET_CPU_ISADIR
831OPENJDK_TARGET_CPU_LIBDIR
832OPENJDK_TARGET_CPU_LEGACY_LIB
833OPENJDK_TARGET_CPU_LEGACY
834REQUIRED_OS_VERSION
835REQUIRED_OS_NAME
836COMPILE_TYPE
837OPENJDK_TARGET_CPU_ENDIAN
838OPENJDK_TARGET_CPU_BITS
839OPENJDK_TARGET_CPU_ARCH
840OPENJDK_TARGET_CPU
841OPENJDK_TARGET_OS_API
842OPENJDK_TARGET_OS
843OPENJDK_BUILD_CPU_ENDIAN
844OPENJDK_BUILD_CPU_BITS
845OPENJDK_BUILD_CPU_ARCH
846OPENJDK_BUILD_CPU
847OPENJDK_BUILD_OS_API
848OPENJDK_BUILD_OS
849OPENJDK_BUILD_AUTOCONF_NAME
850OPENJDK_TARGET_AUTOCONF_NAME
851target_os
852target_vendor
853target_cpu
854target
855host_os
856host_vendor
857host_cpu
858host
859build_os
860build_vendor
861build_cpu
862build
863SETFILE
864DF
865READLINK
866CYGPATH
867NAWK
868SED
869FGREP
870EGREP
871GREP
872AWK
873XARGS
874WHICH
875WC
876UNIQ
877UNAME
878TR
879TOUCH
880TEE
881TAR
882TAIL
883SORT
884SH
885RM
886THEPWDCMD
887PRINTF
888MV
889MKTEMP
890MKDIR
891LS
892LN
893HEAD
894FIND
895FILE
896EXPR
897ECHO
898DIRNAME
899DIFF
900DATE
901CUT
902CP
903CMP
904CHMOD
905CAT
906BASH
907BASENAME
908DATE_WHEN_CONFIGURED
909CONFIGURE_COMMAND_LINE
910CUSTOM_MAKE_DIR
911target_alias
912host_alias
913build_alias
914LIBS
915ECHO_T
916ECHO_N
917ECHO_C
918DEFS
919mandir
920localedir
921libdir
922psdir
923pdfdir
924dvidir
925htmldir
926infodir
927docdir
928oldincludedir
929includedir
930localstatedir
931sharedstatedir
932sysconfdir
933datadir
934datarootdir
935libexecdir
936sbindir
937bindir
938program_transform_name
939prefix
940exec_prefix
941PACKAGE_URL
942PACKAGE_BUGREPORT
943PACKAGE_STRING
944PACKAGE_VERSION
945PACKAGE_TARNAME
946PACKAGE_NAME
947PATH_SEPARATOR
948SHELL'
949ac_subst_files=''
950ac_user_opts='
951enable_option_checking
952with_custom_make_dir
953with_target_bits
954with_sys_root
955with_tools_dir
956with_devkit
957with_jdk_variant
958with_jvm_variants
959enable_debug
960with_debug_level
961with_conf_name
962with_builddeps_conf
963with_builddeps_server
964with_builddeps_dir
965with_builddeps_group
966enable_openjdk_only
967enable_headful
968enable_hotspot_test_in_build
969with_cacerts_file
970enable_unlimited_crypto
971with_milestone
972with_build_number
973with_boot_jdk
974with_boot_jdk_jvmargs
975with_add_source_root
976with_override_source_root
977with_adds_and_overrides
978with_override_langtools
979with_override_corba
980with_override_jaxp
981with_override_jaxws
982with_override_hotspot
983with_override_jdk
984with_import_hotspot
985with_msvcr_dll
986with_extra_cflags
987with_extra_cxxflags
988with_extra_ldflags
989enable_debug_symbols
990enable_zip_debug_info
991enable_macosx_runtime_support
992with_x
993with_cups
994with_cups_include
995with_freetype
996with_alsa
997with_alsa_include
998with_alsa_lib
999with_zlib
1000with_stdc__lib
1001with_num_cores
1002with_memory_size
1003with_sjavac_server_java
1004with_sjavac_server_cores
1005enable_sjavac
1006enable_precompiled_headers
1007enable_ccache
1008with_ccache_dir
1009'
1010      ac_precious_vars='build_alias
1011host_alias
1012target_alias
1013PKG_CONFIG
1014CC
1015CFLAGS
1016LDFLAGS
1017LIBS
1018CPPFLAGS
1019CXX
1020CXXFLAGS
1021CCC
1022OBJC
1023OBJCFLAGS
1024CPP
1025CXXCPP
1026XMKMF
1027FREETYPE2_CFLAGS
1028FREETYPE2_LIBS
1029ALSA_CFLAGS
1030ALSA_LIBS'
1031
1032
1033# Initialize some variables set by options.
1034ac_init_help=
1035ac_init_version=false
1036ac_unrecognized_opts=
1037ac_unrecognized_sep=
1038# The variables have the same names as the options, with
1039# dashes changed to underlines.
1040cache_file=/dev/null
1041exec_prefix=NONE
1042no_create=
1043no_recursion=
1044prefix=NONE
1045program_prefix=NONE
1046program_suffix=NONE
1047program_transform_name=s,x,x,
1048silent=
1049site=
1050srcdir=
1051verbose=
1052x_includes=NONE
1053x_libraries=NONE
1054
1055# Installation directory options.
1056# These are left unexpanded so users can "make install exec_prefix=/foo"
1057# and all the variables that are supposed to be based on exec_prefix
1058# by default will actually change.
1059# Use braces instead of parens because sh, perl, etc. also accept them.
1060# (The list follows the same order as the GNU Coding Standards.)
1061bindir='${exec_prefix}/bin'
1062sbindir='${exec_prefix}/sbin'
1063libexecdir='${exec_prefix}/libexec'
1064datarootdir='${prefix}/share'
1065datadir='${datarootdir}'
1066sysconfdir='${prefix}/etc'
1067sharedstatedir='${prefix}/com'
1068localstatedir='${prefix}/var'
1069includedir='${prefix}/include'
1070oldincludedir='/usr/include'
1071docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1072infodir='${datarootdir}/info'
1073htmldir='${docdir}'
1074dvidir='${docdir}'
1075pdfdir='${docdir}'
1076psdir='${docdir}'
1077libdir='${exec_prefix}/lib'
1078localedir='${datarootdir}/locale'
1079mandir='${datarootdir}/man'
1080
1081ac_prev=
1082ac_dashdash=
1083for ac_option
1084do
1085  # If the previous option needs an argument, assign it.
1086  if test -n "$ac_prev"; then
1087    eval $ac_prev=\$ac_option
1088    ac_prev=
1089    continue
1090  fi
1091
1092  case $ac_option in
1093  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1094  *=)   ac_optarg= ;;
1095  *)    ac_optarg=yes ;;
1096  esac
1097
1098  # Accept the important Cygnus configure options, so we can diagnose typos.
1099
1100  case $ac_dashdash$ac_option in
1101  --)
1102    ac_dashdash=yes ;;
1103
1104  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1105    ac_prev=bindir ;;
1106  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1107    bindir=$ac_optarg ;;
1108
1109  -build | --build | --buil | --bui | --bu)
1110    ac_prev=build_alias ;;
1111  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1112    build_alias=$ac_optarg ;;
1113
1114  -cache-file | --cache-file | --cache-fil | --cache-fi \
1115  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1116    ac_prev=cache_file ;;
1117  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1118  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1119    cache_file=$ac_optarg ;;
1120
1121  --config-cache | -C)
1122    cache_file=config.cache ;;
1123
1124  -datadir | --datadir | --datadi | --datad)
1125    ac_prev=datadir ;;
1126  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1127    datadir=$ac_optarg ;;
1128
1129  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1130  | --dataroo | --dataro | --datar)
1131    ac_prev=datarootdir ;;
1132  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1133  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1134    datarootdir=$ac_optarg ;;
1135
1136  -disable-* | --disable-*)
1137    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1138    # Reject names that are not valid shell variable names.
1139    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1140      as_fn_error $? "invalid feature name: $ac_useropt"
1141    ac_useropt_orig=$ac_useropt
1142    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143    case $ac_user_opts in
1144      *"
1145"enable_$ac_useropt"
1146"*) ;;
1147      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1148	 ac_unrecognized_sep=', ';;
1149    esac
1150    eval enable_$ac_useropt=no ;;
1151
1152  -docdir | --docdir | --docdi | --doc | --do)
1153    ac_prev=docdir ;;
1154  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1155    docdir=$ac_optarg ;;
1156
1157  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1158    ac_prev=dvidir ;;
1159  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1160    dvidir=$ac_optarg ;;
1161
1162  -enable-* | --enable-*)
1163    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1164    # Reject names that are not valid shell variable names.
1165    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1166      as_fn_error $? "invalid feature name: $ac_useropt"
1167    ac_useropt_orig=$ac_useropt
1168    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169    case $ac_user_opts in
1170      *"
1171"enable_$ac_useropt"
1172"*) ;;
1173      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1174	 ac_unrecognized_sep=', ';;
1175    esac
1176    eval enable_$ac_useropt=\$ac_optarg ;;
1177
1178  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1179  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1180  | --exec | --exe | --ex)
1181    ac_prev=exec_prefix ;;
1182  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1183  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1184  | --exec=* | --exe=* | --ex=*)
1185    exec_prefix=$ac_optarg ;;
1186
1187  -gas | --gas | --ga | --g)
1188    # Obsolete; use --with-gas.
1189    with_gas=yes ;;
1190
1191  -help | --help | --hel | --he | -h)
1192    ac_init_help=long ;;
1193  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1194    ac_init_help=recursive ;;
1195  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1196    ac_init_help=short ;;
1197
1198  -host | --host | --hos | --ho)
1199    ac_prev=host_alias ;;
1200  -host=* | --host=* | --hos=* | --ho=*)
1201    host_alias=$ac_optarg ;;
1202
1203  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1204    ac_prev=htmldir ;;
1205  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1206  | --ht=*)
1207    htmldir=$ac_optarg ;;
1208
1209  -includedir | --includedir | --includedi | --included | --include \
1210  | --includ | --inclu | --incl | --inc)
1211    ac_prev=includedir ;;
1212  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1213  | --includ=* | --inclu=* | --incl=* | --inc=*)
1214    includedir=$ac_optarg ;;
1215
1216  -infodir | --infodir | --infodi | --infod | --info | --inf)
1217    ac_prev=infodir ;;
1218  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1219    infodir=$ac_optarg ;;
1220
1221  -libdir | --libdir | --libdi | --libd)
1222    ac_prev=libdir ;;
1223  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1224    libdir=$ac_optarg ;;
1225
1226  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1227  | --libexe | --libex | --libe)
1228    ac_prev=libexecdir ;;
1229  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1230  | --libexe=* | --libex=* | --libe=*)
1231    libexecdir=$ac_optarg ;;
1232
1233  -localedir | --localedir | --localedi | --localed | --locale)
1234    ac_prev=localedir ;;
1235  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1236    localedir=$ac_optarg ;;
1237
1238  -localstatedir | --localstatedir | --localstatedi | --localstated \
1239  | --localstate | --localstat | --localsta | --localst | --locals)
1240    ac_prev=localstatedir ;;
1241  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1242  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1243    localstatedir=$ac_optarg ;;
1244
1245  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1246    ac_prev=mandir ;;
1247  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1248    mandir=$ac_optarg ;;
1249
1250  -nfp | --nfp | --nf)
1251    # Obsolete; use --without-fp.
1252    with_fp=no ;;
1253
1254  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1255  | --no-cr | --no-c | -n)
1256    no_create=yes ;;
1257
1258  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1259  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1260    no_recursion=yes ;;
1261
1262  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1263  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1264  | --oldin | --oldi | --old | --ol | --o)
1265    ac_prev=oldincludedir ;;
1266  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1267  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1268  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1269    oldincludedir=$ac_optarg ;;
1270
1271  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1272    ac_prev=prefix ;;
1273  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1274    prefix=$ac_optarg ;;
1275
1276  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1277  | --program-pre | --program-pr | --program-p)
1278    ac_prev=program_prefix ;;
1279  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1280  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1281    program_prefix=$ac_optarg ;;
1282
1283  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1284  | --program-suf | --program-su | --program-s)
1285    ac_prev=program_suffix ;;
1286  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1287  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1288    program_suffix=$ac_optarg ;;
1289
1290  -program-transform-name | --program-transform-name \
1291  | --program-transform-nam | --program-transform-na \
1292  | --program-transform-n | --program-transform- \
1293  | --program-transform | --program-transfor \
1294  | --program-transfo | --program-transf \
1295  | --program-trans | --program-tran \
1296  | --progr-tra | --program-tr | --program-t)
1297    ac_prev=program_transform_name ;;
1298  -program-transform-name=* | --program-transform-name=* \
1299  | --program-transform-nam=* | --program-transform-na=* \
1300  | --program-transform-n=* | --program-transform-=* \
1301  | --program-transform=* | --program-transfor=* \
1302  | --program-transfo=* | --program-transf=* \
1303  | --program-trans=* | --program-tran=* \
1304  | --progr-tra=* | --program-tr=* | --program-t=*)
1305    program_transform_name=$ac_optarg ;;
1306
1307  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1308    ac_prev=pdfdir ;;
1309  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1310    pdfdir=$ac_optarg ;;
1311
1312  -psdir | --psdir | --psdi | --psd | --ps)
1313    ac_prev=psdir ;;
1314  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1315    psdir=$ac_optarg ;;
1316
1317  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1318  | -silent | --silent | --silen | --sile | --sil)
1319    silent=yes ;;
1320
1321  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1322    ac_prev=sbindir ;;
1323  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1324  | --sbi=* | --sb=*)
1325    sbindir=$ac_optarg ;;
1326
1327  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1328  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1329  | --sharedst | --shareds | --shared | --share | --shar \
1330  | --sha | --sh)
1331    ac_prev=sharedstatedir ;;
1332  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1333  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1334  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1335  | --sha=* | --sh=*)
1336    sharedstatedir=$ac_optarg ;;
1337
1338  -site | --site | --sit)
1339    ac_prev=site ;;
1340  -site=* | --site=* | --sit=*)
1341    site=$ac_optarg ;;
1342
1343  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1344    ac_prev=srcdir ;;
1345  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1346    srcdir=$ac_optarg ;;
1347
1348  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1349  | --syscon | --sysco | --sysc | --sys | --sy)
1350    ac_prev=sysconfdir ;;
1351  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1352  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1353    sysconfdir=$ac_optarg ;;
1354
1355  -target | --target | --targe | --targ | --tar | --ta | --t)
1356    ac_prev=target_alias ;;
1357  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1358    target_alias=$ac_optarg ;;
1359
1360  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1361    verbose=yes ;;
1362
1363  -version | --version | --versio | --versi | --vers | -V)
1364    ac_init_version=: ;;
1365
1366  -with-* | --with-*)
1367    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1368    # Reject names that are not valid shell variable names.
1369    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1370      as_fn_error $? "invalid package name: $ac_useropt"
1371    ac_useropt_orig=$ac_useropt
1372    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1373    case $ac_user_opts in
1374      *"
1375"with_$ac_useropt"
1376"*) ;;
1377      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1378	 ac_unrecognized_sep=', ';;
1379    esac
1380    eval with_$ac_useropt=\$ac_optarg ;;
1381
1382  -without-* | --without-*)
1383    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1384    # Reject names that are not valid shell variable names.
1385    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1386      as_fn_error $? "invalid package name: $ac_useropt"
1387    ac_useropt_orig=$ac_useropt
1388    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1389    case $ac_user_opts in
1390      *"
1391"with_$ac_useropt"
1392"*) ;;
1393      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1394	 ac_unrecognized_sep=', ';;
1395    esac
1396    eval with_$ac_useropt=no ;;
1397
1398  --x)
1399    # Obsolete; use --with-x.
1400    with_x=yes ;;
1401
1402  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1403  | --x-incl | --x-inc | --x-in | --x-i)
1404    ac_prev=x_includes ;;
1405  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1406  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1407    x_includes=$ac_optarg ;;
1408
1409  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1410  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1411    ac_prev=x_libraries ;;
1412  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1413  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1414    x_libraries=$ac_optarg ;;
1415
1416  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1417Try \`$0 --help' for more information"
1418    ;;
1419
1420  *=*)
1421    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1422    # Reject names that are not valid shell variable names.
1423    case $ac_envvar in #(
1424      '' | [0-9]* | *[!_$as_cr_alnum]* )
1425      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1426    esac
1427    eval $ac_envvar=\$ac_optarg
1428    export $ac_envvar ;;
1429
1430  *)
1431    # FIXME: should be removed in autoconf 3.0.
1432    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1433    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1434      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1435    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1436    ;;
1437
1438  esac
1439done
1440
1441if test -n "$ac_prev"; then
1442  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1443  as_fn_error $? "missing argument to $ac_option"
1444fi
1445
1446if test -n "$ac_unrecognized_opts"; then
1447  case $enable_option_checking in
1448    no) ;;
1449    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1450    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1451  esac
1452fi
1453
1454# Check all directory arguments for consistency.
1455for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1456		datadir sysconfdir sharedstatedir localstatedir includedir \
1457		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1458		libdir localedir mandir
1459do
1460  eval ac_val=\$$ac_var
1461  # Remove trailing slashes.
1462  case $ac_val in
1463    */ )
1464      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1465      eval $ac_var=\$ac_val;;
1466  esac
1467  # Be sure to have absolute directory names.
1468  case $ac_val in
1469    [\\/$]* | ?:[\\/]* )  continue;;
1470    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1471  esac
1472  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1473done
1474
1475# There might be people who depend on the old broken behavior: `$host'
1476# used to hold the argument of --host etc.
1477# FIXME: To remove some day.
1478build=$build_alias
1479host=$host_alias
1480target=$target_alias
1481
1482# FIXME: To remove some day.
1483if test "x$host_alias" != x; then
1484  if test "x$build_alias" = x; then
1485    cross_compiling=maybe
1486    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1487    If a cross compiler is detected then cross compile mode will be used" >&2
1488  elif test "x$build_alias" != "x$host_alias"; then
1489    cross_compiling=yes
1490  fi
1491fi
1492
1493ac_tool_prefix=
1494test -n "$host_alias" && ac_tool_prefix=$host_alias-
1495
1496test "$silent" = yes && exec 6>/dev/null
1497
1498
1499ac_pwd=`pwd` && test -n "$ac_pwd" &&
1500ac_ls_di=`ls -di .` &&
1501ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1502  as_fn_error $? "working directory cannot be determined"
1503test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1504  as_fn_error $? "pwd does not report name of working directory"
1505
1506
1507# Find the source files, if location was not specified.
1508if test -z "$srcdir"; then
1509  ac_srcdir_defaulted=yes
1510  # Try the directory containing this script, then the parent directory.
1511  ac_confdir=`$as_dirname -- "$as_myself" ||
1512$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1513	 X"$as_myself" : 'X\(//\)[^/]' \| \
1514	 X"$as_myself" : 'X\(//\)$' \| \
1515	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1516$as_echo X"$as_myself" |
1517    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1518	    s//\1/
1519	    q
1520	  }
1521	  /^X\(\/\/\)[^/].*/{
1522	    s//\1/
1523	    q
1524	  }
1525	  /^X\(\/\/\)$/{
1526	    s//\1/
1527	    q
1528	  }
1529	  /^X\(\/\).*/{
1530	    s//\1/
1531	    q
1532	  }
1533	  s/.*/./; q'`
1534  srcdir=$ac_confdir
1535  if test ! -r "$srcdir/$ac_unique_file"; then
1536    srcdir=..
1537  fi
1538else
1539  ac_srcdir_defaulted=no
1540fi
1541if test ! -r "$srcdir/$ac_unique_file"; then
1542  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1543  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1544fi
1545ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1546ac_abs_confdir=`(
1547	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1548	pwd)`
1549# When building in place, set srcdir=.
1550if test "$ac_abs_confdir" = "$ac_pwd"; then
1551  srcdir=.
1552fi
1553# Remove unnecessary trailing slashes from srcdir.
1554# Double slashes in file names in object file debugging info
1555# mess up M-x gdb in Emacs.
1556case $srcdir in
1557*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1558esac
1559for ac_var in $ac_precious_vars; do
1560  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1561  eval ac_env_${ac_var}_value=\$${ac_var}
1562  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1563  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1564done
1565
1566#
1567# Report the --help message.
1568#
1569if test "$ac_init_help" = "long"; then
1570  # Omit some internal or obsolete options to make the list less imposing.
1571  # This message is too long to be a string in the A/UX 3.1 sh.
1572  cat <<_ACEOF
1573\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1574
1575Usage: $0 [OPTION]... [VAR=VALUE]...
1576
1577To assign environment variables (e.g., CC, CFLAGS...), specify them as
1578VAR=VALUE.  See below for descriptions of some of the useful variables.
1579
1580Defaults for the options are specified in brackets.
1581
1582Configuration:
1583  -h, --help              display this help and exit
1584      --help=short        display options specific to this package
1585      --help=recursive    display the short help of all the included packages
1586  -V, --version           display version information and exit
1587  -q, --quiet, --silent   do not print \`checking ...' messages
1588      --cache-file=FILE   cache test results in FILE [disabled]
1589  -C, --config-cache      alias for \`--cache-file=config.cache'
1590  -n, --no-create         do not create output files
1591      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1592
1593Installation directories:
1594  --prefix=PREFIX         install architecture-independent files in PREFIX
1595                          [$ac_default_prefix]
1596  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1597                          [PREFIX]
1598
1599By default, \`make install' will install all the files in
1600\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1601an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1602for instance \`--prefix=\$HOME'.
1603
1604For better control, use the options below.
1605
1606Fine tuning of the installation directories:
1607  --bindir=DIR            user executables [EPREFIX/bin]
1608  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1609  --libexecdir=DIR        program executables [EPREFIX/libexec]
1610  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1611  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1612  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1613  --libdir=DIR            object code libraries [EPREFIX/lib]
1614  --includedir=DIR        C header files [PREFIX/include]
1615  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1616  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1617  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1618  --infodir=DIR           info documentation [DATAROOTDIR/info]
1619  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1620  --mandir=DIR            man documentation [DATAROOTDIR/man]
1621  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1622  --htmldir=DIR           html documentation [DOCDIR]
1623  --dvidir=DIR            dvi documentation [DOCDIR]
1624  --pdfdir=DIR            pdf documentation [DOCDIR]
1625  --psdir=DIR             ps documentation [DOCDIR]
1626_ACEOF
1627
1628  cat <<\_ACEOF
1629
1630X features:
1631  --x-includes=DIR    X include files are in DIR
1632  --x-libraries=DIR   X library files are in DIR
1633
1634System types:
1635  --build=BUILD     configure for building on BUILD [guessed]
1636  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1637  --target=TARGET   configure for building compilers for TARGET [HOST]
1638_ACEOF
1639fi
1640
1641if test -n "$ac_init_help"; then
1642  case $ac_init_help in
1643     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1644   esac
1645  cat <<\_ACEOF
1646
1647Optional Features:
1648  --disable-option-checking  ignore unrecognized --enable/--with options
1649  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1650  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1651  --enable-debug          set the debug level to fastdebug (shorthand for
1652                          --with-debug-level=fastdebug) [disabled]
1653  --enable-openjdk-only   supress building closed source even if present
1654                          [disabled]
1655  --disable-headful       disable building headful support (graphical UI
1656                          support) [enabled]
1657  --enable-hotspot-test-in-build
1658                          run the Queens test after Hotspot build [disabled]
1659  --enable-unlimited-crypto
1660                          Enable unlimited crypto policy [disabled]
1661  --disable-debug-symbols disable generation of debug symbols [enabled]
1662  --disable-zip-debug-info
1663                          disable zipping of debug-info files [enabled]
1664  --disable-macosx-runtime-support
1665                          disable the use of MacOSX Java runtime support
1666                          framework [enabled]
1667  --enable-sjavac         use sjavac to do fast incremental compiles
1668                          [disabled]
1669  --disable-precompiled-headers
1670                          disable using precompiled headers when compiling C++
1671                          [enabled]
1672  --disable-ccache        disable using ccache to speed up recompilations
1673                          [enabled]
1674
1675Optional Packages:
1676  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1677  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1678  --with-custom-make-dir  use this directory for custom build/make files
1679  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1680                          support it), e.g. --with-target-bits=32 [guessed]
1681  --with-sys-root         pass this sys-root to the compilers and tools (for
1682                          cross-compiling)
1683  --with-tools-dir        search this directory for compilers and tools (for
1684                          cross-compiling)
1685  --with-devkit           use this directory as base for tools-dir and
1686                          sys-root (for cross-compiling)
1687  --with-jdk-variant      JDK variant to build (normal) [normal]
1688  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1689                          client, minimal1, kernel, zero, zeroshark) [server]
1690  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1691                          [release]
1692  --with-conf-name        use this as the name of the configuration [generated
1693                          from important configuration options]
1694  --with-builddeps-conf   use this configuration file for the builddeps
1695  --with-builddeps-server download and use build dependencies from this server
1696                          url
1697  --with-builddeps-dir    store downloaded build dependencies here
1698                          [/localhome/builddeps]
1699  --with-builddeps-group  chgrp the downloaded build dependencies to this
1700                          group
1701  --with-cacerts-file     specify alternative cacerts file
1702  --with-milestone        Set milestone value for build [internal]
1703  --with-build-number     Set build number value for build [b00]
1704  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1705  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1706                          invocations of the Boot JDK, overriding the default
1707                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1708                          -enableassertions"
1709  --with-add-source-root  for each and every source directory, look in this
1710                          additional source root for the same directory; if it
1711                          exists and have files in it, include it in the build
1712  --with-override-source-root
1713                          for each and every source directory, look in this
1714                          override source root for the same directory; if it
1715                          exists, use that directory instead and ignore the
1716                          directory in the original source root
1717  --with-adds-and-overrides
1718                          use the subdirs 'adds' and 'overrides' in the
1719                          specified directory as add-source-root and
1720                          override-source-root
1721  --with-override-langtools
1722                          use this langtools dir for the build
1723  --with-override-corba   use this corba dir for the build
1724  --with-override-jaxp    use this jaxp dir for the build
1725  --with-override-jaxws   use this jaxws dir for the build
1726  --with-override-hotspot use this hotspot dir for the build
1727  --with-override-jdk     use this jdk dir for the build
1728  --with-import-hotspot   import hotspot binaries from this jdk image or
1729                          hotspot build dist dir instead of building from
1730                          source
1731  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1732                          only) [probed]
1733  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1734  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1735  --with-extra-ldflags    extra flags to be used when linking jdk
1736  --with-x                use the X Window System
1737  --with-cups             specify prefix directory for the cups package
1738                          (expecting the headers under PATH/include)
1739  --with-cups-include     specify directory for the cups include files
1740  --with-freetype         specify prefix directory for the freetype2 package
1741                          (expecting the libraries under PATH/lib and the
1742                          headers under PATH/include)
1743  --with-alsa             specify prefix directory for the alsa package
1744                          (expecting the libraries under PATH/lib and the
1745                          headers under PATH/include)
1746  --with-alsa-include     specify directory for the alsa include files
1747  --with-alsa-lib         specify directory for the alsa library
1748  --with-zlib             use zlib from build system or OpenJDK source
1749                          (system, bundled) [bundled]
1750  --with-stdc++lib=<static>,<dynamic>,<default>
1751                          force linking of the C++ runtime on Linux to either
1752                          static or dynamic, default is static with dynamic as
1753                          fallback
1754  --with-num-cores        number of cores in the build system, e.g.
1755                          --with-num-cores=8 [probed]
1756  --with-memory-size      memory (in MB) available in the build system, e.g.
1757                          --with-memory-size=1024 [probed]
1758  --with-sjavac-server-java
1759                          use this java binary for running the sjavac
1760                          background server [Boot JDK java]
1761  --with-sjavac-server-cores
1762                          use at most this number of concurrent threads on the
1763                          sjavac server [probed]
1764  --with-ccache-dir       where to store ccache files [~/.ccache]
1765
1766Some influential environment variables:
1767  PKG_CONFIG  path to pkg-config utility
1768  CC          C compiler command
1769  CFLAGS      C compiler flags
1770  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1771              nonstandard directory <lib dir>
1772  LIBS        libraries to pass to the linker, e.g. -l<library>
1773  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1774              you have headers in a nonstandard directory <include dir>
1775  CXX         C++ compiler command
1776  CXXFLAGS    C++ compiler flags
1777  OBJC        Objective C compiler command
1778  OBJCFLAGS   Objective C compiler flags
1779  CPP         C preprocessor
1780  CXXCPP      C++ preprocessor
1781  XMKMF       Path to xmkmf, Makefile generator for X Window System
1782  FREETYPE2_CFLAGS
1783              C compiler flags for FREETYPE2, overriding pkg-config
1784  FREETYPE2_LIBS
1785              linker flags for FREETYPE2, overriding pkg-config
1786  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1787  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1788
1789Use these variables to override the choices made by `configure' or to help
1790it to find libraries and programs with nonstandard names/locations.
1791
1792Report bugs to <build-dev@openjdk.java.net>.
1793OpenJDK home page: <http://openjdk.java.net>.
1794_ACEOF
1795ac_status=$?
1796fi
1797
1798if test "$ac_init_help" = "recursive"; then
1799  # If there are subdirs, report their specific --help.
1800  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1801    test -d "$ac_dir" ||
1802      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1803      continue
1804    ac_builddir=.
1805
1806case "$ac_dir" in
1807.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1808*)
1809  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1810  # A ".." for each directory in $ac_dir_suffix.
1811  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1812  case $ac_top_builddir_sub in
1813  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1814  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1815  esac ;;
1816esac
1817ac_abs_top_builddir=$ac_pwd
1818ac_abs_builddir=$ac_pwd$ac_dir_suffix
1819# for backward compatibility:
1820ac_top_builddir=$ac_top_build_prefix
1821
1822case $srcdir in
1823  .)  # We are building in place.
1824    ac_srcdir=.
1825    ac_top_srcdir=$ac_top_builddir_sub
1826    ac_abs_top_srcdir=$ac_pwd ;;
1827  [\\/]* | ?:[\\/]* )  # Absolute name.
1828    ac_srcdir=$srcdir$ac_dir_suffix;
1829    ac_top_srcdir=$srcdir
1830    ac_abs_top_srcdir=$srcdir ;;
1831  *) # Relative name.
1832    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1833    ac_top_srcdir=$ac_top_build_prefix$srcdir
1834    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1835esac
1836ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1837
1838    cd "$ac_dir" || { ac_status=$?; continue; }
1839    # Check for guested configure.
1840    if test -f "$ac_srcdir/configure.gnu"; then
1841      echo &&
1842      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1843    elif test -f "$ac_srcdir/configure"; then
1844      echo &&
1845      $SHELL "$ac_srcdir/configure" --help=recursive
1846    else
1847      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1848    fi || ac_status=$?
1849    cd "$ac_pwd" || { ac_status=$?; break; }
1850  done
1851fi
1852
1853test -n "$ac_init_help" && exit $ac_status
1854if $ac_init_version; then
1855  cat <<\_ACEOF
1856OpenJDK configure jdk8
1857generated by GNU Autoconf 2.67
1858
1859Copyright (C) 2010 Free Software Foundation, Inc.
1860This configure script is free software; the Free Software Foundation
1861gives unlimited permission to copy, distribute and modify it.
1862_ACEOF
1863  exit
1864fi
1865
1866## ------------------------ ##
1867## Autoconf initialization. ##
1868## ------------------------ ##
1869
1870# ac_fn_c_try_compile LINENO
1871# --------------------------
1872# Try to compile conftest.$ac_ext, and return whether this succeeded.
1873ac_fn_c_try_compile ()
1874{
1875  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876  rm -f conftest.$ac_objext
1877  if { { ac_try="$ac_compile"
1878case "(($ac_try" in
1879  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880  *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884  (eval "$ac_compile") 2>conftest.err
1885  ac_status=$?
1886  if test -s conftest.err; then
1887    grep -v '^ *+' conftest.err >conftest.er1
1888    cat conftest.er1 >&5
1889    mv -f conftest.er1 conftest.err
1890  fi
1891  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1892  test $ac_status = 0; } && {
1893	 test -z "$ac_c_werror_flag" ||
1894	 test ! -s conftest.err
1895       } && test -s conftest.$ac_objext; then :
1896  ac_retval=0
1897else
1898  $as_echo "$as_me: failed program was:" >&5
1899sed 's/^/| /' conftest.$ac_ext >&5
1900
1901	ac_retval=1
1902fi
1903  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1904  as_fn_set_status $ac_retval
1905
1906} # ac_fn_c_try_compile
1907
1908# ac_fn_cxx_try_compile LINENO
1909# ----------------------------
1910# Try to compile conftest.$ac_ext, and return whether this succeeded.
1911ac_fn_cxx_try_compile ()
1912{
1913  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914  rm -f conftest.$ac_objext
1915  if { { ac_try="$ac_compile"
1916case "(($ac_try" in
1917  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1918  *) ac_try_echo=$ac_try;;
1919esac
1920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1921$as_echo "$ac_try_echo"; } >&5
1922  (eval "$ac_compile") 2>conftest.err
1923  ac_status=$?
1924  if test -s conftest.err; then
1925    grep -v '^ *+' conftest.err >conftest.er1
1926    cat conftest.er1 >&5
1927    mv -f conftest.er1 conftest.err
1928  fi
1929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1930  test $ac_status = 0; } && {
1931	 test -z "$ac_cxx_werror_flag" ||
1932	 test ! -s conftest.err
1933       } && test -s conftest.$ac_objext; then :
1934  ac_retval=0
1935else
1936  $as_echo "$as_me: failed program was:" >&5
1937sed 's/^/| /' conftest.$ac_ext >&5
1938
1939	ac_retval=1
1940fi
1941  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1942  as_fn_set_status $ac_retval
1943
1944} # ac_fn_cxx_try_compile
1945
1946# ac_fn_objc_try_compile LINENO
1947# -----------------------------
1948# Try to compile conftest.$ac_ext, and return whether this succeeded.
1949ac_fn_objc_try_compile ()
1950{
1951  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1952  rm -f conftest.$ac_objext
1953  if { { ac_try="$ac_compile"
1954case "(($ac_try" in
1955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1956  *) ac_try_echo=$ac_try;;
1957esac
1958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1959$as_echo "$ac_try_echo"; } >&5
1960  (eval "$ac_compile") 2>conftest.err
1961  ac_status=$?
1962  if test -s conftest.err; then
1963    grep -v '^ *+' conftest.err >conftest.er1
1964    cat conftest.er1 >&5
1965    mv -f conftest.er1 conftest.err
1966  fi
1967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968  test $ac_status = 0; } && {
1969	 test -z "$ac_objc_werror_flag" ||
1970	 test ! -s conftest.err
1971       } && test -s conftest.$ac_objext; then :
1972  ac_retval=0
1973else
1974  $as_echo "$as_me: failed program was:" >&5
1975sed 's/^/| /' conftest.$ac_ext >&5
1976
1977	ac_retval=1
1978fi
1979  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1980  as_fn_set_status $ac_retval
1981
1982} # ac_fn_objc_try_compile
1983
1984# ac_fn_c_try_cpp LINENO
1985# ----------------------
1986# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1987ac_fn_c_try_cpp ()
1988{
1989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990  if { { ac_try="$ac_cpp conftest.$ac_ext"
1991case "(($ac_try" in
1992  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1993  *) ac_try_echo=$ac_try;;
1994esac
1995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1996$as_echo "$ac_try_echo"; } >&5
1997  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1998  ac_status=$?
1999  if test -s conftest.err; then
2000    grep -v '^ *+' conftest.err >conftest.er1
2001    cat conftest.er1 >&5
2002    mv -f conftest.er1 conftest.err
2003  fi
2004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2005  test $ac_status = 0; } > conftest.i && {
2006	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2007	 test ! -s conftest.err
2008       }; then :
2009  ac_retval=0
2010else
2011  $as_echo "$as_me: failed program was:" >&5
2012sed 's/^/| /' conftest.$ac_ext >&5
2013
2014    ac_retval=1
2015fi
2016  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2017  as_fn_set_status $ac_retval
2018
2019} # ac_fn_c_try_cpp
2020
2021# ac_fn_cxx_try_cpp LINENO
2022# ------------------------
2023# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2024ac_fn_cxx_try_cpp ()
2025{
2026  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027  if { { ac_try="$ac_cpp conftest.$ac_ext"
2028case "(($ac_try" in
2029  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2030  *) ac_try_echo=$ac_try;;
2031esac
2032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2033$as_echo "$ac_try_echo"; } >&5
2034  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2035  ac_status=$?
2036  if test -s conftest.err; then
2037    grep -v '^ *+' conftest.err >conftest.er1
2038    cat conftest.er1 >&5
2039    mv -f conftest.er1 conftest.err
2040  fi
2041  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2042  test $ac_status = 0; } > conftest.i && {
2043	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2044	 test ! -s conftest.err
2045       }; then :
2046  ac_retval=0
2047else
2048  $as_echo "$as_me: failed program was:" >&5
2049sed 's/^/| /' conftest.$ac_ext >&5
2050
2051    ac_retval=1
2052fi
2053  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2054  as_fn_set_status $ac_retval
2055
2056} # ac_fn_cxx_try_cpp
2057
2058# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2059# ---------------------------------------------------------
2060# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2061# the include files in INCLUDES and setting the cache variable VAR
2062# accordingly.
2063ac_fn_cxx_check_header_mongrel ()
2064{
2065  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066  if eval "test \"\${$3+set}\"" = set; then :
2067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2068$as_echo_n "checking for $2... " >&6; }
2069if eval "test \"\${$3+set}\"" = set; then :
2070  $as_echo_n "(cached) " >&6
2071fi
2072eval ac_res=\$$3
2073	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2074$as_echo "$ac_res" >&6; }
2075else
2076  # Is the header compilable?
2077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2078$as_echo_n "checking $2 usability... " >&6; }
2079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h.  */
2081$4
2082#include <$2>
2083_ACEOF
2084if ac_fn_cxx_try_compile "$LINENO"; then :
2085  ac_header_compiler=yes
2086else
2087  ac_header_compiler=no
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2091$as_echo "$ac_header_compiler" >&6; }
2092
2093# Is the header present?
2094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2095$as_echo_n "checking $2 presence... " >&6; }
2096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h.  */
2098#include <$2>
2099_ACEOF
2100if ac_fn_cxx_try_cpp "$LINENO"; then :
2101  ac_header_preproc=yes
2102else
2103  ac_header_preproc=no
2104fi
2105rm -f conftest.err conftest.i conftest.$ac_ext
2106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2107$as_echo "$ac_header_preproc" >&6; }
2108
2109# So?  What about this header?
2110case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2111  yes:no: )
2112    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2113$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2115$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2116    ;;
2117  no:yes:* )
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2119$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2121$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2123$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2125$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2127$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2128( $as_echo "## ----------------------------------------- ##
2129## Report this to build-dev@openjdk.java.net ##
2130## ----------------------------------------- ##"
2131     ) | sed "s/^/$as_me: WARNING:     /" >&2
2132    ;;
2133esac
2134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2135$as_echo_n "checking for $2... " >&6; }
2136if eval "test \"\${$3+set}\"" = set; then :
2137  $as_echo_n "(cached) " >&6
2138else
2139  eval "$3=\$ac_header_compiler"
2140fi
2141eval ac_res=\$$3
2142	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2143$as_echo "$ac_res" >&6; }
2144fi
2145  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2146
2147} # ac_fn_cxx_check_header_mongrel
2148
2149# ac_fn_cxx_try_run LINENO
2150# ------------------------
2151# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2152# that executables *can* be run.
2153ac_fn_cxx_try_run ()
2154{
2155  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2156  if { { ac_try="$ac_link"
2157case "(($ac_try" in
2158  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2159  *) ac_try_echo=$ac_try;;
2160esac
2161eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2162$as_echo "$ac_try_echo"; } >&5
2163  (eval "$ac_link") 2>&5
2164  ac_status=$?
2165  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2166  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2167  { { case "(($ac_try" in
2168  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2169  *) ac_try_echo=$ac_try;;
2170esac
2171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2172$as_echo "$ac_try_echo"; } >&5
2173  (eval "$ac_try") 2>&5
2174  ac_status=$?
2175  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2176  test $ac_status = 0; }; }; then :
2177  ac_retval=0
2178else
2179  $as_echo "$as_me: program exited with status $ac_status" >&5
2180       $as_echo "$as_me: failed program was:" >&5
2181sed 's/^/| /' conftest.$ac_ext >&5
2182
2183       ac_retval=$ac_status
2184fi
2185  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2186  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2187  as_fn_set_status $ac_retval
2188
2189} # ac_fn_cxx_try_run
2190
2191# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2192# ---------------------------------------------------------
2193# Tests whether HEADER exists and can be compiled using the include files in
2194# INCLUDES, setting the cache variable VAR accordingly.
2195ac_fn_cxx_check_header_compile ()
2196{
2197  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2199$as_echo_n "checking for $2... " >&6; }
2200if eval "test \"\${$3+set}\"" = set; then :
2201  $as_echo_n "(cached) " >&6
2202else
2203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h.  */
2205$4
2206#include <$2>
2207_ACEOF
2208if ac_fn_cxx_try_compile "$LINENO"; then :
2209  eval "$3=yes"
2210else
2211  eval "$3=no"
2212fi
2213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214fi
2215eval ac_res=\$$3
2216	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2217$as_echo "$ac_res" >&6; }
2218  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2219
2220} # ac_fn_cxx_check_header_compile
2221
2222# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2223# ----------------------------------------------
2224# Tries to find the compile-time value of EXPR in a program that includes
2225# INCLUDES, setting VAR accordingly. Returns whether the value could be
2226# computed
2227ac_fn_cxx_compute_int ()
2228{
2229  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230  if test "$cross_compiling" = yes; then
2231    # Depending upon the size, compute the lo and hi bounds.
2232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233/* end confdefs.h.  */
2234$4
2235int
2236main ()
2237{
2238static int test_array [1 - 2 * !(($2) >= 0)];
2239test_array [0] = 0
2240
2241  ;
2242  return 0;
2243}
2244_ACEOF
2245if ac_fn_cxx_try_compile "$LINENO"; then :
2246  ac_lo=0 ac_mid=0
2247  while :; do
2248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h.  */
2250$4
2251int
2252main ()
2253{
2254static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2255test_array [0] = 0
2256
2257  ;
2258  return 0;
2259}
2260_ACEOF
2261if ac_fn_cxx_try_compile "$LINENO"; then :
2262  ac_hi=$ac_mid; break
2263else
2264  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2265			if test $ac_lo -le $ac_mid; then
2266			  ac_lo= ac_hi=
2267			  break
2268			fi
2269			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272  done
2273else
2274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277int
2278main ()
2279{
2280static int test_array [1 - 2 * !(($2) < 0)];
2281test_array [0] = 0
2282
2283  ;
2284  return 0;
2285}
2286_ACEOF
2287if ac_fn_cxx_try_compile "$LINENO"; then :
2288  ac_hi=-1 ac_mid=-1
2289  while :; do
2290    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h.  */
2292$4
2293int
2294main ()
2295{
2296static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2297test_array [0] = 0
2298
2299  ;
2300  return 0;
2301}
2302_ACEOF
2303if ac_fn_cxx_try_compile "$LINENO"; then :
2304  ac_lo=$ac_mid; break
2305else
2306  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2307			if test $ac_mid -le $ac_hi; then
2308			  ac_lo= ac_hi=
2309			  break
2310			fi
2311			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314  done
2315else
2316  ac_lo= ac_hi=
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321# Binary search between lo and hi bounds.
2322while test "x$ac_lo" != "x$ac_hi"; do
2323  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325/* end confdefs.h.  */
2326$4
2327int
2328main ()
2329{
2330static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2331test_array [0] = 0
2332
2333  ;
2334  return 0;
2335}
2336_ACEOF
2337if ac_fn_cxx_try_compile "$LINENO"; then :
2338  ac_hi=$ac_mid
2339else
2340  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343done
2344case $ac_lo in #((
2345?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2346'') ac_retval=1 ;;
2347esac
2348  else
2349    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2350/* end confdefs.h.  */
2351$4
2352static long int longval () { return $2; }
2353static unsigned long int ulongval () { return $2; }
2354#include <stdio.h>
2355#include <stdlib.h>
2356int
2357main ()
2358{
2359
2360  FILE *f = fopen ("conftest.val", "w");
2361  if (! f)
2362    return 1;
2363  if (($2) < 0)
2364    {
2365      long int i = longval ();
2366      if (i != ($2))
2367	return 1;
2368      fprintf (f, "%ld", i);
2369    }
2370  else
2371    {
2372      unsigned long int i = ulongval ();
2373      if (i != ($2))
2374	return 1;
2375      fprintf (f, "%lu", i);
2376    }
2377  /* Do not output a trailing newline, as this causes \r\n confusion
2378     on some platforms.  */
2379  return ferror (f) || fclose (f) != 0;
2380
2381  ;
2382  return 0;
2383}
2384_ACEOF
2385if ac_fn_cxx_try_run "$LINENO"; then :
2386  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2387else
2388  ac_retval=1
2389fi
2390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2391  conftest.$ac_objext conftest.beam conftest.$ac_ext
2392rm -f conftest.val
2393
2394  fi
2395  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2396  as_fn_set_status $ac_retval
2397
2398} # ac_fn_cxx_compute_int
2399
2400# ac_fn_cxx_try_link LINENO
2401# -------------------------
2402# Try to link conftest.$ac_ext, and return whether this succeeded.
2403ac_fn_cxx_try_link ()
2404{
2405  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2406  rm -f conftest.$ac_objext conftest$ac_exeext
2407  if { { ac_try="$ac_link"
2408case "(($ac_try" in
2409  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2410  *) ac_try_echo=$ac_try;;
2411esac
2412eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2413$as_echo "$ac_try_echo"; } >&5
2414  (eval "$ac_link") 2>conftest.err
2415  ac_status=$?
2416  if test -s conftest.err; then
2417    grep -v '^ *+' conftest.err >conftest.er1
2418    cat conftest.er1 >&5
2419    mv -f conftest.er1 conftest.err
2420  fi
2421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2422  test $ac_status = 0; } && {
2423	 test -z "$ac_cxx_werror_flag" ||
2424	 test ! -s conftest.err
2425       } && test -s conftest$ac_exeext && {
2426	 test "$cross_compiling" = yes ||
2427	 $as_test_x conftest$ac_exeext
2428       }; then :
2429  ac_retval=0
2430else
2431  $as_echo "$as_me: failed program was:" >&5
2432sed 's/^/| /' conftest.$ac_ext >&5
2433
2434	ac_retval=1
2435fi
2436  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2437  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2438  # interfere with the next link command; also delete a directory that is
2439  # left behind by Apple's compiler.  We do this before executing the actions.
2440  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2441  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2442  as_fn_set_status $ac_retval
2443
2444} # ac_fn_cxx_try_link
2445
2446# ac_fn_cxx_check_func LINENO FUNC VAR
2447# ------------------------------------
2448# Tests whether FUNC exists, setting the cache variable VAR accordingly
2449ac_fn_cxx_check_func ()
2450{
2451  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2453$as_echo_n "checking for $2... " >&6; }
2454if eval "test \"\${$3+set}\"" = set; then :
2455  $as_echo_n "(cached) " >&6
2456else
2457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2458/* end confdefs.h.  */
2459/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2460   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2461#define $2 innocuous_$2
2462
2463/* System header to define __stub macros and hopefully few prototypes,
2464    which can conflict with char $2 (); below.
2465    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2466    <limits.h> exists even on freestanding compilers.  */
2467
2468#ifdef __STDC__
2469# include <limits.h>
2470#else
2471# include <assert.h>
2472#endif
2473
2474#undef $2
2475
2476/* Override any GCC internal prototype to avoid an error.
2477   Use char because int might match the return type of a GCC
2478   builtin and then its argument prototype would still apply.  */
2479#ifdef __cplusplus
2480extern "C"
2481#endif
2482char $2 ();
2483/* The GNU C library defines this for functions which it implements
2484    to always fail with ENOSYS.  Some functions are actually named
2485    something starting with __ and the normal name is an alias.  */
2486#if defined __stub_$2 || defined __stub___$2
2487choke me
2488#endif
2489
2490int
2491main ()
2492{
2493return $2 ();
2494  ;
2495  return 0;
2496}
2497_ACEOF
2498if ac_fn_cxx_try_link "$LINENO"; then :
2499  eval "$3=yes"
2500else
2501  eval "$3=no"
2502fi
2503rm -f core conftest.err conftest.$ac_objext \
2504    conftest$ac_exeext conftest.$ac_ext
2505fi
2506eval ac_res=\$$3
2507	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2508$as_echo "$ac_res" >&6; }
2509  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2510
2511} # ac_fn_cxx_check_func
2512
2513# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2514# -------------------------------------------------------
2515# Tests whether HEADER exists and can be compiled using the include files in
2516# INCLUDES, setting the cache variable VAR accordingly.
2517ac_fn_c_check_header_compile ()
2518{
2519  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2521$as_echo_n "checking for $2... " >&6; }
2522if eval "test \"\${$3+set}\"" = set; then :
2523  $as_echo_n "(cached) " >&6
2524else
2525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2526/* end confdefs.h.  */
2527$4
2528#include <$2>
2529_ACEOF
2530if ac_fn_c_try_compile "$LINENO"; then :
2531  eval "$3=yes"
2532else
2533  eval "$3=no"
2534fi
2535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2536fi
2537eval ac_res=\$$3
2538	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2539$as_echo "$ac_res" >&6; }
2540  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2541
2542} # ac_fn_c_check_header_compile
2543cat >config.log <<_ACEOF
2544This file contains any messages produced by compilers while
2545running configure, to aid debugging if configure makes a mistake.
2546
2547It was created by OpenJDK $as_me jdk8, which was
2548generated by GNU Autoconf 2.67.  Invocation command line was
2549
2550  $ $0 $@
2551
2552_ACEOF
2553exec 5>>config.log
2554{
2555cat <<_ASUNAME
2556## --------- ##
2557## Platform. ##
2558## --------- ##
2559
2560hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2561uname -m = `(uname -m) 2>/dev/null || echo unknown`
2562uname -r = `(uname -r) 2>/dev/null || echo unknown`
2563uname -s = `(uname -s) 2>/dev/null || echo unknown`
2564uname -v = `(uname -v) 2>/dev/null || echo unknown`
2565
2566/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2567/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2568
2569/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2570/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2571/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2572/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2573/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2574/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2575/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2576
2577_ASUNAME
2578
2579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2580for as_dir in $PATH
2581do
2582  IFS=$as_save_IFS
2583  test -z "$as_dir" && as_dir=.
2584    $as_echo "PATH: $as_dir"
2585  done
2586IFS=$as_save_IFS
2587
2588} >&5
2589
2590cat >&5 <<_ACEOF
2591
2592
2593## ----------- ##
2594## Core tests. ##
2595## ----------- ##
2596
2597_ACEOF
2598
2599
2600# Keep a trace of the command line.
2601# Strip out --no-create and --no-recursion so they do not pile up.
2602# Strip out --silent because we don't want to record it for future runs.
2603# Also quote any args containing shell meta-characters.
2604# Make two passes to allow for proper duplicate-argument suppression.
2605ac_configure_args=
2606ac_configure_args0=
2607ac_configure_args1=
2608ac_must_keep_next=false
2609for ac_pass in 1 2
2610do
2611  for ac_arg
2612  do
2613    case $ac_arg in
2614    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2615    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2616    | -silent | --silent | --silen | --sile | --sil)
2617      continue ;;
2618    *\'*)
2619      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2620    esac
2621    case $ac_pass in
2622    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2623    2)
2624      as_fn_append ac_configure_args1 " '$ac_arg'"
2625      if test $ac_must_keep_next = true; then
2626	ac_must_keep_next=false # Got value, back to normal.
2627      else
2628	case $ac_arg in
2629	  *=* | --config-cache | -C | -disable-* | --disable-* \
2630	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2631	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2632	  | -with-* | --with-* | -without-* | --without-* | --x)
2633	    case "$ac_configure_args0 " in
2634	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2635	    esac
2636	    ;;
2637	  -* ) ac_must_keep_next=true ;;
2638	esac
2639      fi
2640      as_fn_append ac_configure_args " '$ac_arg'"
2641      ;;
2642    esac
2643  done
2644done
2645{ ac_configure_args0=; unset ac_configure_args0;}
2646{ ac_configure_args1=; unset ac_configure_args1;}
2647
2648# When interrupted or exit'd, cleanup temporary files, and complete
2649# config.log.  We remove comments because anyway the quotes in there
2650# would cause problems or look ugly.
2651# WARNING: Use '\'' to represent an apostrophe within the trap.
2652# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2653trap 'exit_status=$?
2654  # Save into config.log some information that might help in debugging.
2655  {
2656    echo
2657
2658    $as_echo "## ---------------- ##
2659## Cache variables. ##
2660## ---------------- ##"
2661    echo
2662    # The following way of writing the cache mishandles newlines in values,
2663(
2664  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2665    eval ac_val=\$$ac_var
2666    case $ac_val in #(
2667    *${as_nl}*)
2668      case $ac_var in #(
2669      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2670$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2671      esac
2672      case $ac_var in #(
2673      _ | IFS | as_nl) ;; #(
2674      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2675      *) { eval $ac_var=; unset $ac_var;} ;;
2676      esac ;;
2677    esac
2678  done
2679  (set) 2>&1 |
2680    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2681    *${as_nl}ac_space=\ *)
2682      sed -n \
2683	"s/'\''/'\''\\\\'\'''\''/g;
2684	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2685      ;; #(
2686    *)
2687      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2688      ;;
2689    esac |
2690    sort
2691)
2692    echo
2693
2694    $as_echo "## ----------------- ##
2695## Output variables. ##
2696## ----------------- ##"
2697    echo
2698    for ac_var in $ac_subst_vars
2699    do
2700      eval ac_val=\$$ac_var
2701      case $ac_val in
2702      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2703      esac
2704      $as_echo "$ac_var='\''$ac_val'\''"
2705    done | sort
2706    echo
2707
2708    if test -n "$ac_subst_files"; then
2709      $as_echo "## ------------------- ##
2710## File substitutions. ##
2711## ------------------- ##"
2712      echo
2713      for ac_var in $ac_subst_files
2714      do
2715	eval ac_val=\$$ac_var
2716	case $ac_val in
2717	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2718	esac
2719	$as_echo "$ac_var='\''$ac_val'\''"
2720      done | sort
2721      echo
2722    fi
2723
2724    if test -s confdefs.h; then
2725      $as_echo "## ----------- ##
2726## confdefs.h. ##
2727## ----------- ##"
2728      echo
2729      cat confdefs.h
2730      echo
2731    fi
2732    test "$ac_signal" != 0 &&
2733      $as_echo "$as_me: caught signal $ac_signal"
2734    $as_echo "$as_me: exit $exit_status"
2735  } >&5
2736  rm -f core *.core core.conftest.* &&
2737    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2738    exit $exit_status
2739' 0
2740for ac_signal in 1 2 13 15; do
2741  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2742done
2743ac_signal=0
2744
2745# confdefs.h avoids OS command line length limits that DEFS can exceed.
2746rm -f -r conftest* confdefs.h
2747
2748$as_echo "/* confdefs.h */" > confdefs.h
2749
2750# Predefined preprocessor variables.
2751
2752cat >>confdefs.h <<_ACEOF
2753#define PACKAGE_NAME "$PACKAGE_NAME"
2754_ACEOF
2755
2756cat >>confdefs.h <<_ACEOF
2757#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2758_ACEOF
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_VERSION "$PACKAGE_VERSION"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_STRING "$PACKAGE_STRING"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2770_ACEOF
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_URL "$PACKAGE_URL"
2774_ACEOF
2775
2776
2777# Let the site file select an alternate cache file if it wants to.
2778# Prefer an explicitly selected file to automatically selected ones.
2779ac_site_file1=NONE
2780ac_site_file2=NONE
2781if test -n "$CONFIG_SITE"; then
2782  # We do not want a PATH search for config.site.
2783  case $CONFIG_SITE in #((
2784    -*)  ac_site_file1=./$CONFIG_SITE;;
2785    */*) ac_site_file1=$CONFIG_SITE;;
2786    *)   ac_site_file1=./$CONFIG_SITE;;
2787  esac
2788elif test "x$prefix" != xNONE; then
2789  ac_site_file1=$prefix/share/config.site
2790  ac_site_file2=$prefix/etc/config.site
2791else
2792  ac_site_file1=$ac_default_prefix/share/config.site
2793  ac_site_file2=$ac_default_prefix/etc/config.site
2794fi
2795for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2796do
2797  test "x$ac_site_file" = xNONE && continue
2798  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2799    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2800$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2801    sed 's/^/| /' "$ac_site_file" >&5
2802    . "$ac_site_file" \
2803      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2804$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2805as_fn_error $? "failed to load site script $ac_site_file
2806See \`config.log' for more details" "$LINENO" 5 ; }
2807  fi
2808done
2809
2810if test -r "$cache_file"; then
2811  # Some versions of bash will fail to source /dev/null (special files
2812  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2813  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2814    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2815$as_echo "$as_me: loading cache $cache_file" >&6;}
2816    case $cache_file in
2817      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2818      *)                      . "./$cache_file";;
2819    esac
2820  fi
2821else
2822  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2823$as_echo "$as_me: creating cache $cache_file" >&6;}
2824  >$cache_file
2825fi
2826
2827# Check that the precious variables saved in the cache have kept the same
2828# value.
2829ac_cache_corrupted=false
2830for ac_var in $ac_precious_vars; do
2831  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2832  eval ac_new_set=\$ac_env_${ac_var}_set
2833  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2834  eval ac_new_val=\$ac_env_${ac_var}_value
2835  case $ac_old_set,$ac_new_set in
2836    set,)
2837      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2838$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2839      ac_cache_corrupted=: ;;
2840    ,set)
2841      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2842$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2843      ac_cache_corrupted=: ;;
2844    ,);;
2845    *)
2846      if test "x$ac_old_val" != "x$ac_new_val"; then
2847	# differences in whitespace do not lead to failure.
2848	ac_old_val_w=`echo x $ac_old_val`
2849	ac_new_val_w=`echo x $ac_new_val`
2850	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2851	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2852$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2853	  ac_cache_corrupted=:
2854	else
2855	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2856$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2857	  eval $ac_var=\$ac_old_val
2858	fi
2859	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2860$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2861	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2862$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2863      fi;;
2864  esac
2865  # Pass precious variables to config.status.
2866  if test "$ac_new_set" = set; then
2867    case $ac_new_val in
2868    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2869    *) ac_arg=$ac_var=$ac_new_val ;;
2870    esac
2871    case " $ac_configure_args " in
2872      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2873      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2874    esac
2875  fi
2876done
2877if $ac_cache_corrupted; then
2878  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2880  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2881$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2882  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2883fi
2884## -------------------- ##
2885## Main body of script. ##
2886## -------------------- ##
2887
2888ac_ext=c
2889ac_cpp='$CPP $CPPFLAGS'
2890ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2891ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2892ac_compiler_gnu=$ac_cv_c_compiler_gnu
2893
2894
2895
2896ac_aux_dir=
2897for ac_dir in build-aux "$srcdir"/build-aux; do
2898  if test -f "$ac_dir/install-sh"; then
2899    ac_aux_dir=$ac_dir
2900    ac_install_sh="$ac_aux_dir/install-sh -c"
2901    break
2902  elif test -f "$ac_dir/install.sh"; then
2903    ac_aux_dir=$ac_dir
2904    ac_install_sh="$ac_aux_dir/install.sh -c"
2905    break
2906  elif test -f "$ac_dir/shtool"; then
2907    ac_aux_dir=$ac_dir
2908    ac_install_sh="$ac_aux_dir/shtool install -c"
2909    break
2910  fi
2911done
2912if test -z "$ac_aux_dir"; then
2913  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2914fi
2915
2916# These three variables are undocumented and unsupported,
2917# and are intended to be withdrawn in a future Autoconf release.
2918# They can cause serious problems if a builder's source tree is in a directory
2919# whose full name contains unusual characters.
2920ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2921ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2922ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2923
2924
2925# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2926#
2927# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2928#
2929# This program is free software; you can redistribute it and/or modify
2930# it under the terms of the GNU General Public License as published by
2931# the Free Software Foundation; either version 2 of the License, or
2932# (at your option) any later version.
2933#
2934# This program is distributed in the hope that it will be useful, but
2935# WITHOUT ANY WARRANTY; without even the implied warranty of
2936# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2937# General Public License for more details.
2938#
2939# You should have received a copy of the GNU General Public License
2940# along with this program; if not, write to the Free Software
2941# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2942#
2943# As a special exception to the GNU General Public License, if you
2944# distribute this file as part of a program that contains a
2945# configuration script generated by Autoconf, you may include it under
2946# the same distribution terms that you use for the rest of that program.
2947
2948# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2949# ----------------------------------
2950# PKG_PROG_PKG_CONFIG
2951
2952# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2953#
2954# Check to see whether a particular set of modules exists.  Similar
2955# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2956#
2957#
2958# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2959# this or PKG_CHECK_MODULES is called, or make sure to call
2960# PKG_CHECK_EXISTS manually
2961# --------------------------------------------------------------
2962
2963
2964
2965# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2966# ---------------------------------------------
2967# _PKG_CONFIG
2968
2969# _PKG_SHORT_ERRORS_SUPPORTED
2970# -----------------------------
2971# _PKG_SHORT_ERRORS_SUPPORTED
2972
2973
2974# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2975# [ACTION-IF-NOT-FOUND])
2976#
2977#
2978# Note that if there is a possibility the first call to
2979# PKG_CHECK_MODULES might not happen, you should be sure to include an
2980# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2981#
2982#
2983# --------------------------------------------------------------
2984# PKG_CHECK_MODULES
2985
2986
2987# Include these first...
2988#
2989# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2990# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2991#
2992# This code is free software; you can redistribute it and/or modify it
2993# under the terms of the GNU General Public License version 2 only, as
2994# published by the Free Software Foundation.  Oracle designates this
2995# particular file as subject to the "Classpath" exception as provided
2996# by Oracle in the LICENSE file that accompanied this code.
2997#
2998# This code is distributed in the hope that it will be useful, but WITHOUT
2999# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3000# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3001# version 2 for more details (a copy is included in the LICENSE file that
3002# accompanied this code).
3003#
3004# You should have received a copy of the GNU General Public License version
3005# 2 along with this work; if not, write to the Free Software Foundation,
3006# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3007#
3008# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3009# or visit www.oracle.com if you need additional information or have any
3010# questions.
3011#
3012
3013
3014
3015# This will make sure the given variable points to a full and proper
3016# path. This means:
3017# 1) There will be no spaces in the path. On posix platforms,
3018#    spaces in the path will result in an error. On Windows,
3019#    the path will be rewritten using short-style to be space-free.
3020# 2) The path will be absolute, and it will be in unix-style (on
3021#     cygwin).
3022# $1: The name of the variable to fix
3023
3024
3025# This will make sure the given variable points to a executable
3026# with a full and proper path. This means:
3027# 1) There will be no spaces in the path. On posix platforms,
3028#    spaces in the path will result in an error. On Windows,
3029#    the path will be rewritten using short-style to be space-free.
3030# 2) The path will be absolute, and it will be in unix-style (on
3031#     cygwin).
3032# Any arguments given to the executable is preserved.
3033# If the input variable does not have a directory specification, then
3034# it need to be in the PATH.
3035# $1: The name of the variable to fix
3036
3037
3038
3039
3040
3041
3042# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3043# $1: variable to check
3044# $2: executable name to print in warning (optional)
3045
3046
3047# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3048# Arguments as AC_PATH_PROG:
3049# $1: variable to set
3050# $2: executable name to look for
3051
3052
3053# Setup the most fundamental tools that relies on not much else to set up,
3054# but is used by much of the early bootstrap code.
3055
3056
3057# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3058
3059
3060
3061
3062
3063
3064
3065#%%% Simple tools %%%
3066
3067# Check if we have found a usable version of make
3068# $1: the path to a potential make binary (or empty)
3069# $2: the description on how we found this
3070
3071
3072# Goes looking for a usable version of GNU make.
3073
3074
3075
3076
3077
3078
3079# Check if build directory is on local disk. If not possible to determine,
3080# we prefer to claim it's local.
3081# Argument 1: directory to test
3082# Argument 2: what to do if it is on local disk
3083# Argument 3: what to do otherwise (remote disk or failure)
3084
3085
3086# Check that source files have basic read permissions set. This might
3087# not be the case in cygwin in certain conditions.
3088
3089
3090
3091
3092#
3093# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3094# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3095#
3096# This code is free software; you can redistribute it and/or modify it
3097# under the terms of the GNU General Public License version 2 only, as
3098# published by the Free Software Foundation.  Oracle designates this
3099# particular file as subject to the "Classpath" exception as provided
3100# by Oracle in the LICENSE file that accompanied this code.
3101#
3102# This code is distributed in the hope that it will be useful, but WITHOUT
3103# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3104# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3105# version 2 for more details (a copy is included in the LICENSE file that
3106# accompanied this code).
3107#
3108# You should have received a copy of the GNU General Public License version
3109# 2 along with this work; if not, write to the Free Software Foundation,
3110# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3111#
3112# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3113# or visit www.oracle.com if you need additional information or have any
3114# questions.
3115#
3116
3117
3118
3119
3120
3121# Helper function which possibly converts a path using DOS-style short mode.
3122# If so, the updated path is stored in $new_path.
3123# $1: The path to check
3124
3125
3126# Helper function which possibly converts a path using DOS-style short mode.
3127# If so, the updated path is stored in $new_path.
3128# $1: The path to check
3129
3130
3131# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3132# and could probably be heavily simplified. However, all changes in this
3133# area tend to need lot of testing in different scenarios, and in lack of
3134# proper unit testing, cleaning this up has not been deemed worth the effort
3135# at the moment.
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3146
3147
3148
3149
3150#
3151# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3152# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3153#
3154# This code is free software; you can redistribute it and/or modify it
3155# under the terms of the GNU General Public License version 2 only, as
3156# published by the Free Software Foundation.  Oracle designates this
3157# particular file as subject to the "Classpath" exception as provided
3158# by Oracle in the LICENSE file that accompanied this code.
3159#
3160# This code is distributed in the hope that it will be useful, but WITHOUT
3161# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3162# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3163# version 2 for more details (a copy is included in the LICENSE file that
3164# accompanied this code).
3165#
3166# You should have received a copy of the GNU General Public License version
3167# 2 along with this work; if not, write to the Free Software Foundation,
3168# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3169#
3170# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3171# or visit www.oracle.com if you need additional information or have any
3172# questions.
3173#
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185# ... then the rest
3186#
3187# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3188# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3189#
3190# This code is free software; you can redistribute it and/or modify it
3191# under the terms of the GNU General Public License version 2 only, as
3192# published by the Free Software Foundation.  Oracle designates this
3193# particular file as subject to the "Classpath" exception as provided
3194# by Oracle in the LICENSE file that accompanied this code.
3195#
3196# This code is distributed in the hope that it will be useful, but WITHOUT
3197# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3198# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3199# version 2 for more details (a copy is included in the LICENSE file that
3200# accompanied this code).
3201#
3202# You should have received a copy of the GNU General Public License version
3203# 2 along with this work; if not, write to the Free Software Foundation,
3204# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3205#
3206# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3207# or visit www.oracle.com if you need additional information or have any
3208# questions.
3209#
3210
3211# Execute the check given as argument, and verify the result
3212# If the Boot JDK was previously found, do nothing
3213# $1 A command line (typically autoconf macro) to execute
3214
3215
3216# Test: Is bootjdk explicitely set by command line arguments?
3217
3218
3219# Test: Is bootjdk available from builddeps?
3220
3221
3222# Test: Is $JAVA_HOME set?
3223
3224
3225# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3226
3227
3228# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3229
3230
3231# Look for a jdk in the given path. If there are multiple, try to select the newest.
3232# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3233# $1 = Path to directory containing jdk installations.
3234# $2 = String to append to the found JDK directory to get the proper JDK home
3235
3236
3237# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3238# environmental variable as base for where to look.
3239# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3240
3241
3242# Test: Is there a JDK installed in default, well-known locations?
3243
3244
3245# Check that a command-line tool in the Boot JDK is correct
3246# $1 = name of variable to assign
3247# $2 = name of binary
3248
3249
3250###############################################################################
3251#
3252# We need a Boot JDK to bootstrap the build.
3253#
3254
3255
3256
3257
3258
3259#
3260# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3262#
3263# This code is free software; you can redistribute it and/or modify it
3264# under the terms of the GNU General Public License version 2 only, as
3265# published by the Free Software Foundation.  Oracle designates this
3266# particular file as subject to the "Classpath" exception as provided
3267# by Oracle in the LICENSE file that accompanied this code.
3268#
3269# This code is distributed in the hope that it will be useful, but WITHOUT
3270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3272# version 2 for more details (a copy is included in the LICENSE file that
3273# accompanied this code).
3274#
3275# You should have received a copy of the GNU General Public License version
3276# 2 along with this work; if not, write to the Free Software Foundation,
3277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3278#
3279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3280# or visit www.oracle.com if you need additional information or have any
3281# questions.
3282#
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301#
3302# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3303# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3304#
3305# This code is free software; you can redistribute it and/or modify it
3306# under the terms of the GNU General Public License version 2 only, as
3307# published by the Free Software Foundation.  Oracle designates this
3308# particular file as subject to the "Classpath" exception as provided
3309# by Oracle in the LICENSE file that accompanied this code.
3310#
3311# This code is distributed in the hope that it will be useful, but WITHOUT
3312# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3313# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3314# version 2 for more details (a copy is included in the LICENSE file that
3315# accompanied this code).
3316#
3317# You should have received a copy of the GNU General Public License version
3318# 2 along with this work; if not, write to the Free Software Foundation,
3319# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3320#
3321# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3322# or visit www.oracle.com if you need additional information or have any
3323# questions.
3324#
3325
3326
3327
3328
3329
3330cygwin_help() {
3331    case $1 in
3332    unzip)
3333        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3334    zip)
3335        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3336    make)
3337        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3338    * )
3339       break ;;
3340    esac
3341}
3342
3343apt_help() {
3344    case $1 in
3345    devkit)
3346        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3347    openjdk)
3348        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3349    alsa)
3350        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3351    cups)
3352        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3353    freetype2)
3354        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3355    pulse)
3356        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3357    x11)
3358        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3359    ccache)
3360        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3361    * )
3362       break ;;
3363    esac
3364}
3365
3366yum_help() {
3367    case $1 in
3368    devkit)
3369        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3370    openjdk)
3371        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3372    alsa)
3373        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3374    cups)
3375        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3376    freetype2)
3377        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3378    pulse)
3379        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3380    x11)
3381        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3382    ccache)
3383        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3384    * )
3385       break ;;
3386    esac
3387}
3388
3389port_help() {
3390    PKGHANDLER_COMMAND=""
3391}
3392
3393pkgutil_help() {
3394    PKGHANDLER_COMMAND=""
3395}
3396
3397pkgadd_help() {
3398    PKGHANDLER_COMMAND=""
3399}
3400
3401
3402
3403#
3404# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3405# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3406#
3407# This code is free software; you can redistribute it and/or modify it
3408# under the terms of the GNU General Public License version 2 only, as
3409# published by the Free Software Foundation.  Oracle designates this
3410# particular file as subject to the "Classpath" exception as provided
3411# by Oracle in the LICENSE file that accompanied this code.
3412#
3413# This code is distributed in the hope that it will be useful, but WITHOUT
3414# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3415# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3416# version 2 for more details (a copy is included in the LICENSE file that
3417# accompanied this code).
3418#
3419# You should have received a copy of the GNU General Public License version
3420# 2 along with this work; if not, write to the Free Software Foundation,
3421# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3422#
3423# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3424# or visit www.oracle.com if you need additional information or have any
3425# questions.
3426#
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442# Support for customization of the build process. Some build files
3443# will include counterparts from this location, if they exist. This allows
3444# for a degree of customization of the build targets and the rules/recipes
3445# to create them
3446
3447# Check whether --with-custom-make-dir was given.
3448if test "${with_custom_make_dir+set}" = set; then :
3449  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3450fi
3451
3452
3453
3454#
3455# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3456# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3457#
3458# This code is free software; you can redistribute it and/or modify it
3459# under the terms of the GNU General Public License version 2 only, as
3460# published by the Free Software Foundation.  Oracle designates this
3461# particular file as subject to the "Classpath" exception as provided
3462# by Oracle in the LICENSE file that accompanied this code.
3463#
3464# This code is distributed in the hope that it will be useful, but WITHOUT
3465# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3466# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3467# version 2 for more details (a copy is included in the LICENSE file that
3468# accompanied this code).
3469#
3470# You should have received a copy of the GNU General Public License version
3471# 2 along with this work; if not, write to the Free Software Foundation,
3472# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3473#
3474# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3475# or visit www.oracle.com if you need additional information or have any
3476# questions.
3477#
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493#
3494# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3495# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3496#
3497# This code is free software; you can redistribute it and/or modify it
3498# under the terms of the GNU General Public License version 2 only, as
3499# published by the Free Software Foundation.  Oracle designates this
3500# particular file as subject to the "Classpath" exception as provided
3501# by Oracle in the LICENSE file that accompanied this code.
3502#
3503# This code is distributed in the hope that it will be useful, but WITHOUT
3504# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3505# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3506# version 2 for more details (a copy is included in the LICENSE file that
3507# accompanied this code).
3508#
3509# You should have received a copy of the GNU General Public License version
3510# 2 along with this work; if not, write to the Free Software Foundation,
3511# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3512#
3513# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3514# or visit www.oracle.com if you need additional information or have any
3515# questions.
3516#
3517
3518# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3519# Converts autoconf style CPU name to OpenJDK style, into
3520# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3521
3522
3523# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3524# Converts autoconf style OS name to OpenJDK style, into
3525# VAR_OS and VAR_OS_API.
3526
3527
3528# Expects $host_os $host_cpu $build_os and $build_cpu
3529# and $with_target_bits to have been setup!
3530#
3531# Translate the standard triplet(quadruplet) definition
3532# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3533# OPENJDK_BUILD_OS, etc.
3534
3535
3536# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3537# accordingly. Must be done after setting up build and target system, but before
3538# doing anything else with these values.
3539
3540
3541    # Setup the legacy variables, for controlling the old makefiles.
3542    #
3543
3544
3545
3546
3547#%%% Build and target systems %%%
3548
3549
3550
3551
3552# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3553# Add -mX to various FLAGS variables.
3554
3555
3556
3557
3558
3559
3560#
3561# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563#
3564# This code is free software; you can redistribute it and/or modify it
3565# under the terms of the GNU General Public License version 2 only, as
3566# published by the Free Software Foundation.  Oracle designates this
3567# particular file as subject to the "Classpath" exception as provided
3568# by Oracle in the LICENSE file that accompanied this code.
3569#
3570# This code is distributed in the hope that it will be useful, but WITHOUT
3571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3573# version 2 for more details (a copy is included in the LICENSE file that
3574# accompanied this code).
3575#
3576# You should have received a copy of the GNU General Public License version
3577# 2 along with this work; if not, write to the Free Software Foundation,
3578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579#
3580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581# or visit www.oracle.com if you need additional information or have any
3582# questions.
3583#
3584
3585
3586
3587
3588
3589
3590
3591
3592#
3593# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3595#
3596# This code is free software; you can redistribute it and/or modify it
3597# under the terms of the GNU General Public License version 2 only, as
3598# published by the Free Software Foundation.  Oracle designates this
3599# particular file as subject to the "Classpath" exception as provided
3600# by Oracle in the LICENSE file that accompanied this code.
3601#
3602# This code is distributed in the hope that it will be useful, but WITHOUT
3603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3605# version 2 for more details (a copy is included in the LICENSE file that
3606# accompanied this code).
3607#
3608# You should have received a copy of the GNU General Public License version
3609# 2 along with this work; if not, write to the Free Software Foundation,
3610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3611#
3612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3613# or visit www.oracle.com if you need additional information or have any
3614# questions.
3615#
3616
3617# $1 = compiler to test (CC or CXX)
3618# $2 = human readable name of compiler (C or C++)
3619
3620
3621
3622
3623
3624# $1 = compiler to test (CC or CXX)
3625# $2 = human readable name of compiler (C or C++)
3626# $3 = list of compiler names to search for
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639#
3640# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3641# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3642#
3643# This code is free software; you can redistribute it and/or modify it
3644# under the terms of the GNU General Public License version 2 only, as
3645# published by the Free Software Foundation.  Oracle designates this
3646# particular file as subject to the "Classpath" exception as provided
3647# by Oracle in the LICENSE file that accompanied this code.
3648#
3649# This code is distributed in the hope that it will be useful, but WITHOUT
3650# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3651# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3652# version 2 for more details (a copy is included in the LICENSE file that
3653# accompanied this code).
3654#
3655# You should have received a copy of the GNU General Public License version
3656# 2 along with this work; if not, write to the Free Software Foundation,
3657# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3658#
3659# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3660# or visit www.oracle.com if you need additional information or have any
3661# questions.
3662#
3663
3664
3665
3666
3667
3668
3669
3670# Check if the VS env variables were setup prior to running configure.
3671# If not, then find vcvarsall.bat and run it automatically, and integrate
3672# the set env variables into the spec file.
3673
3674
3675
3676
3677
3678
3679# This line needs to be here, verbatim, after all includes and the dummy hook
3680# definitions. It is replaced with custom functionality when building
3681# custom sources.
3682#CUSTOM_AUTOCONF_INCLUDE
3683
3684# Do not change or remove the following line, it is needed for consistency checks:
3685DATE_WHEN_GENERATED=1357045896
3686
3687###############################################################################
3688#
3689# Initialization / Boot-strapping
3690#
3691# The bootstrapping process needs to solve the "chicken or the egg" problem,
3692# thus it jumps back and forth, each time gaining something needed later on.
3693#
3694###############################################################################
3695
3696# Basic initialization that must happen first of all
3697
3698# Save the original command line. This is passed to us by the wrapper configure script.
3699
3700DATE_WHEN_CONFIGURED=`LANG=C date`
3701
3702{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3703$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3705$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3706
3707
3708
3709# Start with tools that do not need have cross compilation support
3710# and can be expected to be found in the default PATH. These tools are
3711# used by configure. Nor are these tools expected to be found in the
3712# devkit from the builddeps server either, since they are
3713# needed to download the devkit.
3714
3715# First are all the simple required tools.
3716
3717    for ac_prog in basename
3718do
3719  # Extract the first word of "$ac_prog", so it can be a program name with args.
3720set dummy $ac_prog; ac_word=$2
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3722$as_echo_n "checking for $ac_word... " >&6; }
3723if test "${ac_cv_path_BASENAME+set}" = set; then :
3724  $as_echo_n "(cached) " >&6
3725else
3726  case $BASENAME in
3727  [\\/]* | ?:[\\/]*)
3728  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3729  ;;
3730  *)
3731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3732for as_dir in $PATH
3733do
3734  IFS=$as_save_IFS
3735  test -z "$as_dir" && as_dir=.
3736    for ac_exec_ext in '' $ac_executable_extensions; do
3737  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3738    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3740    break 2
3741  fi
3742done
3743  done
3744IFS=$as_save_IFS
3745
3746  ;;
3747esac
3748fi
3749BASENAME=$ac_cv_path_BASENAME
3750if test -n "$BASENAME"; then
3751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3752$as_echo "$BASENAME" >&6; }
3753else
3754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3755$as_echo "no" >&6; }
3756fi
3757
3758
3759  test -n "$BASENAME" && break
3760done
3761
3762
3763    if test "x$BASENAME" = x; then
3764        if test "xbasename" = x; then
3765          PROG_NAME=basename
3766        else
3767          PROG_NAME=basename
3768        fi
3769        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3770$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3771        as_fn_error $? "Cannot continue" "$LINENO" 5
3772    fi
3773
3774
3775
3776    for ac_prog in bash
3777do
3778  # Extract the first word of "$ac_prog", so it can be a program name with args.
3779set dummy $ac_prog; ac_word=$2
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3781$as_echo_n "checking for $ac_word... " >&6; }
3782if test "${ac_cv_path_BASH+set}" = set; then :
3783  $as_echo_n "(cached) " >&6
3784else
3785  case $BASH in
3786  [\\/]* | ?:[\\/]*)
3787  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3788  ;;
3789  *)
3790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793  IFS=$as_save_IFS
3794  test -z "$as_dir" && as_dir=.
3795    for ac_exec_ext in '' $ac_executable_extensions; do
3796  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3797    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3799    break 2
3800  fi
3801done
3802  done
3803IFS=$as_save_IFS
3804
3805  ;;
3806esac
3807fi
3808BASH=$ac_cv_path_BASH
3809if test -n "$BASH"; then
3810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3811$as_echo "$BASH" >&6; }
3812else
3813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
3815fi
3816
3817
3818  test -n "$BASH" && break
3819done
3820
3821
3822    if test "x$BASH" = x; then
3823        if test "xbash" = x; then
3824          PROG_NAME=bash
3825        else
3826          PROG_NAME=bash
3827        fi
3828        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3829$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3830        as_fn_error $? "Cannot continue" "$LINENO" 5
3831    fi
3832
3833
3834
3835    for ac_prog in cat
3836do
3837  # Extract the first word of "$ac_prog", so it can be a program name with args.
3838set dummy $ac_prog; ac_word=$2
3839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3840$as_echo_n "checking for $ac_word... " >&6; }
3841if test "${ac_cv_path_CAT+set}" = set; then :
3842  $as_echo_n "(cached) " >&6
3843else
3844  case $CAT in
3845  [\\/]* | ?:[\\/]*)
3846  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3847  ;;
3848  *)
3849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850for as_dir in $PATH
3851do
3852  IFS=$as_save_IFS
3853  test -z "$as_dir" && as_dir=.
3854    for ac_exec_ext in '' $ac_executable_extensions; do
3855  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3856    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3858    break 2
3859  fi
3860done
3861  done
3862IFS=$as_save_IFS
3863
3864  ;;
3865esac
3866fi
3867CAT=$ac_cv_path_CAT
3868if test -n "$CAT"; then
3869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3870$as_echo "$CAT" >&6; }
3871else
3872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3873$as_echo "no" >&6; }
3874fi
3875
3876
3877  test -n "$CAT" && break
3878done
3879
3880
3881    if test "x$CAT" = x; then
3882        if test "xcat" = x; then
3883          PROG_NAME=cat
3884        else
3885          PROG_NAME=cat
3886        fi
3887        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3888$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3889        as_fn_error $? "Cannot continue" "$LINENO" 5
3890    fi
3891
3892
3893
3894    for ac_prog in chmod
3895do
3896  # Extract the first word of "$ac_prog", so it can be a program name with args.
3897set dummy $ac_prog; ac_word=$2
3898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3899$as_echo_n "checking for $ac_word... " >&6; }
3900if test "${ac_cv_path_CHMOD+set}" = set; then :
3901  $as_echo_n "(cached) " >&6
3902else
3903  case $CHMOD in
3904  [\\/]* | ?:[\\/]*)
3905  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3906  ;;
3907  *)
3908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3909for as_dir in $PATH
3910do
3911  IFS=$as_save_IFS
3912  test -z "$as_dir" && as_dir=.
3913    for ac_exec_ext in '' $ac_executable_extensions; do
3914  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3915    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3917    break 2
3918  fi
3919done
3920  done
3921IFS=$as_save_IFS
3922
3923  ;;
3924esac
3925fi
3926CHMOD=$ac_cv_path_CHMOD
3927if test -n "$CHMOD"; then
3928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3929$as_echo "$CHMOD" >&6; }
3930else
3931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3932$as_echo "no" >&6; }
3933fi
3934
3935
3936  test -n "$CHMOD" && break
3937done
3938
3939
3940    if test "x$CHMOD" = x; then
3941        if test "xchmod" = x; then
3942          PROG_NAME=chmod
3943        else
3944          PROG_NAME=chmod
3945        fi
3946        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3947$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3948        as_fn_error $? "Cannot continue" "$LINENO" 5
3949    fi
3950
3951
3952
3953    for ac_prog in cmp
3954do
3955  # Extract the first word of "$ac_prog", so it can be a program name with args.
3956set dummy $ac_prog; ac_word=$2
3957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3958$as_echo_n "checking for $ac_word... " >&6; }
3959if test "${ac_cv_path_CMP+set}" = set; then :
3960  $as_echo_n "(cached) " >&6
3961else
3962  case $CMP in
3963  [\\/]* | ?:[\\/]*)
3964  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3965  ;;
3966  *)
3967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3968for as_dir in $PATH
3969do
3970  IFS=$as_save_IFS
3971  test -z "$as_dir" && as_dir=.
3972    for ac_exec_ext in '' $ac_executable_extensions; do
3973  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3974    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3976    break 2
3977  fi
3978done
3979  done
3980IFS=$as_save_IFS
3981
3982  ;;
3983esac
3984fi
3985CMP=$ac_cv_path_CMP
3986if test -n "$CMP"; then
3987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3988$as_echo "$CMP" >&6; }
3989else
3990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3991$as_echo "no" >&6; }
3992fi
3993
3994
3995  test -n "$CMP" && break
3996done
3997
3998
3999    if test "x$CMP" = x; then
4000        if test "xcmp" = x; then
4001          PROG_NAME=cmp
4002        else
4003          PROG_NAME=cmp
4004        fi
4005        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4006$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4007        as_fn_error $? "Cannot continue" "$LINENO" 5
4008    fi
4009
4010
4011
4012    for ac_prog in cp
4013do
4014  # Extract the first word of "$ac_prog", so it can be a program name with args.
4015set dummy $ac_prog; ac_word=$2
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4017$as_echo_n "checking for $ac_word... " >&6; }
4018if test "${ac_cv_path_CP+set}" = set; then :
4019  $as_echo_n "(cached) " >&6
4020else
4021  case $CP in
4022  [\\/]* | ?:[\\/]*)
4023  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4024  ;;
4025  *)
4026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4027for as_dir in $PATH
4028do
4029  IFS=$as_save_IFS
4030  test -z "$as_dir" && as_dir=.
4031    for ac_exec_ext in '' $ac_executable_extensions; do
4032  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4033    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4035    break 2
4036  fi
4037done
4038  done
4039IFS=$as_save_IFS
4040
4041  ;;
4042esac
4043fi
4044CP=$ac_cv_path_CP
4045if test -n "$CP"; then
4046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4047$as_echo "$CP" >&6; }
4048else
4049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4050$as_echo "no" >&6; }
4051fi
4052
4053
4054  test -n "$CP" && break
4055done
4056
4057
4058    if test "x$CP" = x; then
4059        if test "xcp" = x; then
4060          PROG_NAME=cp
4061        else
4062          PROG_NAME=cp
4063        fi
4064        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4065$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4066        as_fn_error $? "Cannot continue" "$LINENO" 5
4067    fi
4068
4069
4070
4071    for ac_prog in cut
4072do
4073  # Extract the first word of "$ac_prog", so it can be a program name with args.
4074set dummy $ac_prog; ac_word=$2
4075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4076$as_echo_n "checking for $ac_word... " >&6; }
4077if test "${ac_cv_path_CUT+set}" = set; then :
4078  $as_echo_n "(cached) " >&6
4079else
4080  case $CUT in
4081  [\\/]* | ?:[\\/]*)
4082  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4083  ;;
4084  *)
4085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4086for as_dir in $PATH
4087do
4088  IFS=$as_save_IFS
4089  test -z "$as_dir" && as_dir=.
4090    for ac_exec_ext in '' $ac_executable_extensions; do
4091  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4092    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4094    break 2
4095  fi
4096done
4097  done
4098IFS=$as_save_IFS
4099
4100  ;;
4101esac
4102fi
4103CUT=$ac_cv_path_CUT
4104if test -n "$CUT"; then
4105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4106$as_echo "$CUT" >&6; }
4107else
4108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4109$as_echo "no" >&6; }
4110fi
4111
4112
4113  test -n "$CUT" && break
4114done
4115
4116
4117    if test "x$CUT" = x; then
4118        if test "xcut" = x; then
4119          PROG_NAME=cut
4120        else
4121          PROG_NAME=cut
4122        fi
4123        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4124$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4125        as_fn_error $? "Cannot continue" "$LINENO" 5
4126    fi
4127
4128
4129
4130    for ac_prog in date
4131do
4132  # Extract the first word of "$ac_prog", so it can be a program name with args.
4133set dummy $ac_prog; ac_word=$2
4134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4135$as_echo_n "checking for $ac_word... " >&6; }
4136if test "${ac_cv_path_DATE+set}" = set; then :
4137  $as_echo_n "(cached) " >&6
4138else
4139  case $DATE in
4140  [\\/]* | ?:[\\/]*)
4141  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4142  ;;
4143  *)
4144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4145for as_dir in $PATH
4146do
4147  IFS=$as_save_IFS
4148  test -z "$as_dir" && as_dir=.
4149    for ac_exec_ext in '' $ac_executable_extensions; do
4150  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4151    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4153    break 2
4154  fi
4155done
4156  done
4157IFS=$as_save_IFS
4158
4159  ;;
4160esac
4161fi
4162DATE=$ac_cv_path_DATE
4163if test -n "$DATE"; then
4164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4165$as_echo "$DATE" >&6; }
4166else
4167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4168$as_echo "no" >&6; }
4169fi
4170
4171
4172  test -n "$DATE" && break
4173done
4174
4175
4176    if test "x$DATE" = x; then
4177        if test "xdate" = x; then
4178          PROG_NAME=date
4179        else
4180          PROG_NAME=date
4181        fi
4182        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4183$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4184        as_fn_error $? "Cannot continue" "$LINENO" 5
4185    fi
4186
4187
4188
4189    for ac_prog in gdiff diff
4190do
4191  # Extract the first word of "$ac_prog", so it can be a program name with args.
4192set dummy $ac_prog; ac_word=$2
4193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4194$as_echo_n "checking for $ac_word... " >&6; }
4195if test "${ac_cv_path_DIFF+set}" = set; then :
4196  $as_echo_n "(cached) " >&6
4197else
4198  case $DIFF in
4199  [\\/]* | ?:[\\/]*)
4200  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4201  ;;
4202  *)
4203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4204for as_dir in $PATH
4205do
4206  IFS=$as_save_IFS
4207  test -z "$as_dir" && as_dir=.
4208    for ac_exec_ext in '' $ac_executable_extensions; do
4209  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4210    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4212    break 2
4213  fi
4214done
4215  done
4216IFS=$as_save_IFS
4217
4218  ;;
4219esac
4220fi
4221DIFF=$ac_cv_path_DIFF
4222if test -n "$DIFF"; then
4223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4224$as_echo "$DIFF" >&6; }
4225else
4226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4227$as_echo "no" >&6; }
4228fi
4229
4230
4231  test -n "$DIFF" && break
4232done
4233
4234
4235    if test "x$DIFF" = x; then
4236        if test "xgdiff diff" = x; then
4237          PROG_NAME=diff
4238        else
4239          PROG_NAME=gdiff diff
4240        fi
4241        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4242$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4243        as_fn_error $? "Cannot continue" "$LINENO" 5
4244    fi
4245
4246
4247
4248    for ac_prog in dirname
4249do
4250  # Extract the first word of "$ac_prog", so it can be a program name with args.
4251set dummy $ac_prog; ac_word=$2
4252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4253$as_echo_n "checking for $ac_word... " >&6; }
4254if test "${ac_cv_path_DIRNAME+set}" = set; then :
4255  $as_echo_n "(cached) " >&6
4256else
4257  case $DIRNAME in
4258  [\\/]* | ?:[\\/]*)
4259  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4260  ;;
4261  *)
4262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4263for as_dir in $PATH
4264do
4265  IFS=$as_save_IFS
4266  test -z "$as_dir" && as_dir=.
4267    for ac_exec_ext in '' $ac_executable_extensions; do
4268  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4269    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4271    break 2
4272  fi
4273done
4274  done
4275IFS=$as_save_IFS
4276
4277  ;;
4278esac
4279fi
4280DIRNAME=$ac_cv_path_DIRNAME
4281if test -n "$DIRNAME"; then
4282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4283$as_echo "$DIRNAME" >&6; }
4284else
4285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4286$as_echo "no" >&6; }
4287fi
4288
4289
4290  test -n "$DIRNAME" && break
4291done
4292
4293
4294    if test "x$DIRNAME" = x; then
4295        if test "xdirname" = x; then
4296          PROG_NAME=dirname
4297        else
4298          PROG_NAME=dirname
4299        fi
4300        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4301$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4302        as_fn_error $? "Cannot continue" "$LINENO" 5
4303    fi
4304
4305
4306
4307    for ac_prog in echo
4308do
4309  # Extract the first word of "$ac_prog", so it can be a program name with args.
4310set dummy $ac_prog; ac_word=$2
4311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4312$as_echo_n "checking for $ac_word... " >&6; }
4313if test "${ac_cv_path_ECHO+set}" = set; then :
4314  $as_echo_n "(cached) " >&6
4315else
4316  case $ECHO in
4317  [\\/]* | ?:[\\/]*)
4318  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4319  ;;
4320  *)
4321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4322for as_dir in $PATH
4323do
4324  IFS=$as_save_IFS
4325  test -z "$as_dir" && as_dir=.
4326    for ac_exec_ext in '' $ac_executable_extensions; do
4327  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4328    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4330    break 2
4331  fi
4332done
4333  done
4334IFS=$as_save_IFS
4335
4336  ;;
4337esac
4338fi
4339ECHO=$ac_cv_path_ECHO
4340if test -n "$ECHO"; then
4341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4342$as_echo "$ECHO" >&6; }
4343else
4344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4345$as_echo "no" >&6; }
4346fi
4347
4348
4349  test -n "$ECHO" && break
4350done
4351
4352
4353    if test "x$ECHO" = x; then
4354        if test "xecho" = x; then
4355          PROG_NAME=echo
4356        else
4357          PROG_NAME=echo
4358        fi
4359        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4360$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4361        as_fn_error $? "Cannot continue" "$LINENO" 5
4362    fi
4363
4364
4365
4366    for ac_prog in expr
4367do
4368  # Extract the first word of "$ac_prog", so it can be a program name with args.
4369set dummy $ac_prog; ac_word=$2
4370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4371$as_echo_n "checking for $ac_word... " >&6; }
4372if test "${ac_cv_path_EXPR+set}" = set; then :
4373  $as_echo_n "(cached) " >&6
4374else
4375  case $EXPR in
4376  [\\/]* | ?:[\\/]*)
4377  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4378  ;;
4379  *)
4380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH
4382do
4383  IFS=$as_save_IFS
4384  test -z "$as_dir" && as_dir=.
4385    for ac_exec_ext in '' $ac_executable_extensions; do
4386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4387    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4389    break 2
4390  fi
4391done
4392  done
4393IFS=$as_save_IFS
4394
4395  ;;
4396esac
4397fi
4398EXPR=$ac_cv_path_EXPR
4399if test -n "$EXPR"; then
4400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4401$as_echo "$EXPR" >&6; }
4402else
4403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4404$as_echo "no" >&6; }
4405fi
4406
4407
4408  test -n "$EXPR" && break
4409done
4410
4411
4412    if test "x$EXPR" = x; then
4413        if test "xexpr" = x; then
4414          PROG_NAME=expr
4415        else
4416          PROG_NAME=expr
4417        fi
4418        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4419$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4420        as_fn_error $? "Cannot continue" "$LINENO" 5
4421    fi
4422
4423
4424
4425    for ac_prog in file
4426do
4427  # Extract the first word of "$ac_prog", so it can be a program name with args.
4428set dummy $ac_prog; ac_word=$2
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4430$as_echo_n "checking for $ac_word... " >&6; }
4431if test "${ac_cv_path_FILE+set}" = set; then :
4432  $as_echo_n "(cached) " >&6
4433else
4434  case $FILE in
4435  [\\/]* | ?:[\\/]*)
4436  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4437  ;;
4438  *)
4439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442  IFS=$as_save_IFS
4443  test -z "$as_dir" && as_dir=.
4444    for ac_exec_ext in '' $ac_executable_extensions; do
4445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4446    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4448    break 2
4449  fi
4450done
4451  done
4452IFS=$as_save_IFS
4453
4454  ;;
4455esac
4456fi
4457FILE=$ac_cv_path_FILE
4458if test -n "$FILE"; then
4459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4460$as_echo "$FILE" >&6; }
4461else
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4463$as_echo "no" >&6; }
4464fi
4465
4466
4467  test -n "$FILE" && break
4468done
4469
4470
4471    if test "x$FILE" = x; then
4472        if test "xfile" = x; then
4473          PROG_NAME=file
4474        else
4475          PROG_NAME=file
4476        fi
4477        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4478$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4479        as_fn_error $? "Cannot continue" "$LINENO" 5
4480    fi
4481
4482
4483
4484    for ac_prog in find
4485do
4486  # Extract the first word of "$ac_prog", so it can be a program name with args.
4487set dummy $ac_prog; ac_word=$2
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
4490if test "${ac_cv_path_FIND+set}" = set; then :
4491  $as_echo_n "(cached) " >&6
4492else
4493  case $FIND in
4494  [\\/]* | ?:[\\/]*)
4495  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4496  ;;
4497  *)
4498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in $PATH
4500do
4501  IFS=$as_save_IFS
4502  test -z "$as_dir" && as_dir=.
4503    for ac_exec_ext in '' $ac_executable_extensions; do
4504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4505    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507    break 2
4508  fi
4509done
4510  done
4511IFS=$as_save_IFS
4512
4513  ;;
4514esac
4515fi
4516FIND=$ac_cv_path_FIND
4517if test -n "$FIND"; then
4518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4519$as_echo "$FIND" >&6; }
4520else
4521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525
4526  test -n "$FIND" && break
4527done
4528
4529
4530    if test "x$FIND" = x; then
4531        if test "xfind" = x; then
4532          PROG_NAME=find
4533        else
4534          PROG_NAME=find
4535        fi
4536        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4537$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4538        as_fn_error $? "Cannot continue" "$LINENO" 5
4539    fi
4540
4541
4542
4543    for ac_prog in head
4544do
4545  # Extract the first word of "$ac_prog", so it can be a program name with args.
4546set dummy $ac_prog; ac_word=$2
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4548$as_echo_n "checking for $ac_word... " >&6; }
4549if test "${ac_cv_path_HEAD+set}" = set; then :
4550  $as_echo_n "(cached) " >&6
4551else
4552  case $HEAD in
4553  [\\/]* | ?:[\\/]*)
4554  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4555  ;;
4556  *)
4557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH
4559do
4560  IFS=$as_save_IFS
4561  test -z "$as_dir" && as_dir=.
4562    for ac_exec_ext in '' $ac_executable_extensions; do
4563  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4564    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4566    break 2
4567  fi
4568done
4569  done
4570IFS=$as_save_IFS
4571
4572  ;;
4573esac
4574fi
4575HEAD=$ac_cv_path_HEAD
4576if test -n "$HEAD"; then
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4578$as_echo "$HEAD" >&6; }
4579else
4580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
4582fi
4583
4584
4585  test -n "$HEAD" && break
4586done
4587
4588
4589    if test "x$HEAD" = x; then
4590        if test "xhead" = x; then
4591          PROG_NAME=head
4592        else
4593          PROG_NAME=head
4594        fi
4595        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4596$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4597        as_fn_error $? "Cannot continue" "$LINENO" 5
4598    fi
4599
4600
4601
4602    for ac_prog in ln
4603do
4604  # Extract the first word of "$ac_prog", so it can be a program name with args.
4605set dummy $ac_prog; ac_word=$2
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4607$as_echo_n "checking for $ac_word... " >&6; }
4608if test "${ac_cv_path_LN+set}" = set; then :
4609  $as_echo_n "(cached) " >&6
4610else
4611  case $LN in
4612  [\\/]* | ?:[\\/]*)
4613  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4614  ;;
4615  *)
4616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4617for as_dir in $PATH
4618do
4619  IFS=$as_save_IFS
4620  test -z "$as_dir" && as_dir=.
4621    for ac_exec_ext in '' $ac_executable_extensions; do
4622  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4623    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4625    break 2
4626  fi
4627done
4628  done
4629IFS=$as_save_IFS
4630
4631  ;;
4632esac
4633fi
4634LN=$ac_cv_path_LN
4635if test -n "$LN"; then
4636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4637$as_echo "$LN" >&6; }
4638else
4639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4640$as_echo "no" >&6; }
4641fi
4642
4643
4644  test -n "$LN" && break
4645done
4646
4647
4648    if test "x$LN" = x; then
4649        if test "xln" = x; then
4650          PROG_NAME=ln
4651        else
4652          PROG_NAME=ln
4653        fi
4654        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4655$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4656        as_fn_error $? "Cannot continue" "$LINENO" 5
4657    fi
4658
4659
4660
4661    for ac_prog in ls
4662do
4663  # Extract the first word of "$ac_prog", so it can be a program name with args.
4664set dummy $ac_prog; ac_word=$2
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666$as_echo_n "checking for $ac_word... " >&6; }
4667if test "${ac_cv_path_LS+set}" = set; then :
4668  $as_echo_n "(cached) " >&6
4669else
4670  case $LS in
4671  [\\/]* | ?:[\\/]*)
4672  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4673  ;;
4674  *)
4675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4676for as_dir in $PATH
4677do
4678  IFS=$as_save_IFS
4679  test -z "$as_dir" && as_dir=.
4680    for ac_exec_ext in '' $ac_executable_extensions; do
4681  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4682    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4684    break 2
4685  fi
4686done
4687  done
4688IFS=$as_save_IFS
4689
4690  ;;
4691esac
4692fi
4693LS=$ac_cv_path_LS
4694if test -n "$LS"; then
4695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4696$as_echo "$LS" >&6; }
4697else
4698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4699$as_echo "no" >&6; }
4700fi
4701
4702
4703  test -n "$LS" && break
4704done
4705
4706
4707    if test "x$LS" = x; then
4708        if test "xls" = x; then
4709          PROG_NAME=ls
4710        else
4711          PROG_NAME=ls
4712        fi
4713        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4714$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4715        as_fn_error $? "Cannot continue" "$LINENO" 5
4716    fi
4717
4718
4719
4720    for ac_prog in mkdir
4721do
4722  # Extract the first word of "$ac_prog", so it can be a program name with args.
4723set dummy $ac_prog; ac_word=$2
4724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725$as_echo_n "checking for $ac_word... " >&6; }
4726if test "${ac_cv_path_MKDIR+set}" = set; then :
4727  $as_echo_n "(cached) " >&6
4728else
4729  case $MKDIR in
4730  [\\/]* | ?:[\\/]*)
4731  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4732  ;;
4733  *)
4734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in $PATH
4736do
4737  IFS=$as_save_IFS
4738  test -z "$as_dir" && as_dir=.
4739    for ac_exec_ext in '' $ac_executable_extensions; do
4740  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4741    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4743    break 2
4744  fi
4745done
4746  done
4747IFS=$as_save_IFS
4748
4749  ;;
4750esac
4751fi
4752MKDIR=$ac_cv_path_MKDIR
4753if test -n "$MKDIR"; then
4754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4755$as_echo "$MKDIR" >&6; }
4756else
4757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758$as_echo "no" >&6; }
4759fi
4760
4761
4762  test -n "$MKDIR" && break
4763done
4764
4765
4766    if test "x$MKDIR" = x; then
4767        if test "xmkdir" = x; then
4768          PROG_NAME=mkdir
4769        else
4770          PROG_NAME=mkdir
4771        fi
4772        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4773$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4774        as_fn_error $? "Cannot continue" "$LINENO" 5
4775    fi
4776
4777
4778
4779    for ac_prog in mktemp
4780do
4781  # Extract the first word of "$ac_prog", so it can be a program name with args.
4782set dummy $ac_prog; ac_word=$2
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784$as_echo_n "checking for $ac_word... " >&6; }
4785if test "${ac_cv_path_MKTEMP+set}" = set; then :
4786  $as_echo_n "(cached) " >&6
4787else
4788  case $MKTEMP in
4789  [\\/]* | ?:[\\/]*)
4790  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4791  ;;
4792  *)
4793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4794for as_dir in $PATH
4795do
4796  IFS=$as_save_IFS
4797  test -z "$as_dir" && as_dir=.
4798    for ac_exec_ext in '' $ac_executable_extensions; do
4799  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4800    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4802    break 2
4803  fi
4804done
4805  done
4806IFS=$as_save_IFS
4807
4808  ;;
4809esac
4810fi
4811MKTEMP=$ac_cv_path_MKTEMP
4812if test -n "$MKTEMP"; then
4813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4814$as_echo "$MKTEMP" >&6; }
4815else
4816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4817$as_echo "no" >&6; }
4818fi
4819
4820
4821  test -n "$MKTEMP" && break
4822done
4823
4824
4825    if test "x$MKTEMP" = x; then
4826        if test "xmktemp" = x; then
4827          PROG_NAME=mktemp
4828        else
4829          PROG_NAME=mktemp
4830        fi
4831        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4832$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4833        as_fn_error $? "Cannot continue" "$LINENO" 5
4834    fi
4835
4836
4837
4838    for ac_prog in mv
4839do
4840  # Extract the first word of "$ac_prog", so it can be a program name with args.
4841set dummy $ac_prog; ac_word=$2
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4843$as_echo_n "checking for $ac_word... " >&6; }
4844if test "${ac_cv_path_MV+set}" = set; then :
4845  $as_echo_n "(cached) " >&6
4846else
4847  case $MV in
4848  [\\/]* | ?:[\\/]*)
4849  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4850  ;;
4851  *)
4852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4853for as_dir in $PATH
4854do
4855  IFS=$as_save_IFS
4856  test -z "$as_dir" && as_dir=.
4857    for ac_exec_ext in '' $ac_executable_extensions; do
4858  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4859    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4861    break 2
4862  fi
4863done
4864  done
4865IFS=$as_save_IFS
4866
4867  ;;
4868esac
4869fi
4870MV=$ac_cv_path_MV
4871if test -n "$MV"; then
4872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4873$as_echo "$MV" >&6; }
4874else
4875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876$as_echo "no" >&6; }
4877fi
4878
4879
4880  test -n "$MV" && break
4881done
4882
4883
4884    if test "x$MV" = x; then
4885        if test "xmv" = x; then
4886          PROG_NAME=mv
4887        else
4888          PROG_NAME=mv
4889        fi
4890        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4891$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4892        as_fn_error $? "Cannot continue" "$LINENO" 5
4893    fi
4894
4895
4896
4897    for ac_prog in printf
4898do
4899  # Extract the first word of "$ac_prog", so it can be a program name with args.
4900set dummy $ac_prog; ac_word=$2
4901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4902$as_echo_n "checking for $ac_word... " >&6; }
4903if test "${ac_cv_path_PRINTF+set}" = set; then :
4904  $as_echo_n "(cached) " >&6
4905else
4906  case $PRINTF in
4907  [\\/]* | ?:[\\/]*)
4908  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4909  ;;
4910  *)
4911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4912for as_dir in $PATH
4913do
4914  IFS=$as_save_IFS
4915  test -z "$as_dir" && as_dir=.
4916    for ac_exec_ext in '' $ac_executable_extensions; do
4917  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4918    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4920    break 2
4921  fi
4922done
4923  done
4924IFS=$as_save_IFS
4925
4926  ;;
4927esac
4928fi
4929PRINTF=$ac_cv_path_PRINTF
4930if test -n "$PRINTF"; then
4931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4932$as_echo "$PRINTF" >&6; }
4933else
4934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4935$as_echo "no" >&6; }
4936fi
4937
4938
4939  test -n "$PRINTF" && break
4940done
4941
4942
4943    if test "x$PRINTF" = x; then
4944        if test "xprintf" = x; then
4945          PROG_NAME=printf
4946        else
4947          PROG_NAME=printf
4948        fi
4949        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4950$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4951        as_fn_error $? "Cannot continue" "$LINENO" 5
4952    fi
4953
4954
4955
4956    for ac_prog in pwd
4957do
4958  # Extract the first word of "$ac_prog", so it can be a program name with args.
4959set dummy $ac_prog; ac_word=$2
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961$as_echo_n "checking for $ac_word... " >&6; }
4962if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4963  $as_echo_n "(cached) " >&6
4964else
4965  case $THEPWDCMD in
4966  [\\/]* | ?:[\\/]*)
4967  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4968  ;;
4969  *)
4970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in $PATH
4972do
4973  IFS=$as_save_IFS
4974  test -z "$as_dir" && as_dir=.
4975    for ac_exec_ext in '' $ac_executable_extensions; do
4976  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4977    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979    break 2
4980  fi
4981done
4982  done
4983IFS=$as_save_IFS
4984
4985  ;;
4986esac
4987fi
4988THEPWDCMD=$ac_cv_path_THEPWDCMD
4989if test -n "$THEPWDCMD"; then
4990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4991$as_echo "$THEPWDCMD" >&6; }
4992else
4993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997
4998  test -n "$THEPWDCMD" && break
4999done
5000
5001
5002    if test "x$THEPWDCMD" = x; then
5003        if test "xpwd" = x; then
5004          PROG_NAME=thepwdcmd
5005        else
5006          PROG_NAME=pwd
5007        fi
5008        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5009$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5010        as_fn_error $? "Cannot continue" "$LINENO" 5
5011    fi
5012
5013
5014
5015    for ac_prog in rm
5016do
5017  # Extract the first word of "$ac_prog", so it can be a program name with args.
5018set dummy $ac_prog; ac_word=$2
5019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5020$as_echo_n "checking for $ac_word... " >&6; }
5021if test "${ac_cv_path_RM+set}" = set; then :
5022  $as_echo_n "(cached) " >&6
5023else
5024  case $RM in
5025  [\\/]* | ?:[\\/]*)
5026  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5027  ;;
5028  *)
5029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032  IFS=$as_save_IFS
5033  test -z "$as_dir" && as_dir=.
5034    for ac_exec_ext in '' $ac_executable_extensions; do
5035  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5036    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5038    break 2
5039  fi
5040done
5041  done
5042IFS=$as_save_IFS
5043
5044  ;;
5045esac
5046fi
5047RM=$ac_cv_path_RM
5048if test -n "$RM"; then
5049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5050$as_echo "$RM" >&6; }
5051else
5052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
5054fi
5055
5056
5057  test -n "$RM" && break
5058done
5059
5060
5061    if test "x$RM" = x; then
5062        if test "xrm" = x; then
5063          PROG_NAME=rm
5064        else
5065          PROG_NAME=rm
5066        fi
5067        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5068$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5069        as_fn_error $? "Cannot continue" "$LINENO" 5
5070    fi
5071
5072
5073
5074    for ac_prog in sh
5075do
5076  # Extract the first word of "$ac_prog", so it can be a program name with args.
5077set dummy $ac_prog; ac_word=$2
5078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5079$as_echo_n "checking for $ac_word... " >&6; }
5080if test "${ac_cv_path_SH+set}" = set; then :
5081  $as_echo_n "(cached) " >&6
5082else
5083  case $SH in
5084  [\\/]* | ?:[\\/]*)
5085  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5086  ;;
5087  *)
5088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5089for as_dir in $PATH
5090do
5091  IFS=$as_save_IFS
5092  test -z "$as_dir" && as_dir=.
5093    for ac_exec_ext in '' $ac_executable_extensions; do
5094  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5095    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5097    break 2
5098  fi
5099done
5100  done
5101IFS=$as_save_IFS
5102
5103  ;;
5104esac
5105fi
5106SH=$ac_cv_path_SH
5107if test -n "$SH"; then
5108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5109$as_echo "$SH" >&6; }
5110else
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112$as_echo "no" >&6; }
5113fi
5114
5115
5116  test -n "$SH" && break
5117done
5118
5119
5120    if test "x$SH" = x; then
5121        if test "xsh" = x; then
5122          PROG_NAME=sh
5123        else
5124          PROG_NAME=sh
5125        fi
5126        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5127$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5128        as_fn_error $? "Cannot continue" "$LINENO" 5
5129    fi
5130
5131
5132
5133    for ac_prog in sort
5134do
5135  # Extract the first word of "$ac_prog", so it can be a program name with args.
5136set dummy $ac_prog; ac_word=$2
5137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5138$as_echo_n "checking for $ac_word... " >&6; }
5139if test "${ac_cv_path_SORT+set}" = set; then :
5140  $as_echo_n "(cached) " >&6
5141else
5142  case $SORT in
5143  [\\/]* | ?:[\\/]*)
5144  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5145  ;;
5146  *)
5147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5148for as_dir in $PATH
5149do
5150  IFS=$as_save_IFS
5151  test -z "$as_dir" && as_dir=.
5152    for ac_exec_ext in '' $ac_executable_extensions; do
5153  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5154    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5156    break 2
5157  fi
5158done
5159  done
5160IFS=$as_save_IFS
5161
5162  ;;
5163esac
5164fi
5165SORT=$ac_cv_path_SORT
5166if test -n "$SORT"; then
5167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5168$as_echo "$SORT" >&6; }
5169else
5170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5171$as_echo "no" >&6; }
5172fi
5173
5174
5175  test -n "$SORT" && break
5176done
5177
5178
5179    if test "x$SORT" = x; then
5180        if test "xsort" = x; then
5181          PROG_NAME=sort
5182        else
5183          PROG_NAME=sort
5184        fi
5185        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5186$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5187        as_fn_error $? "Cannot continue" "$LINENO" 5
5188    fi
5189
5190
5191
5192    for ac_prog in tail
5193do
5194  # Extract the first word of "$ac_prog", so it can be a program name with args.
5195set dummy $ac_prog; ac_word=$2
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5197$as_echo_n "checking for $ac_word... " >&6; }
5198if test "${ac_cv_path_TAIL+set}" = set; then :
5199  $as_echo_n "(cached) " >&6
5200else
5201  case $TAIL in
5202  [\\/]* | ?:[\\/]*)
5203  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5204  ;;
5205  *)
5206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5207for as_dir in $PATH
5208do
5209  IFS=$as_save_IFS
5210  test -z "$as_dir" && as_dir=.
5211    for ac_exec_ext in '' $ac_executable_extensions; do
5212  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5213    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5215    break 2
5216  fi
5217done
5218  done
5219IFS=$as_save_IFS
5220
5221  ;;
5222esac
5223fi
5224TAIL=$ac_cv_path_TAIL
5225if test -n "$TAIL"; then
5226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5227$as_echo "$TAIL" >&6; }
5228else
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5230$as_echo "no" >&6; }
5231fi
5232
5233
5234  test -n "$TAIL" && break
5235done
5236
5237
5238    if test "x$TAIL" = x; then
5239        if test "xtail" = x; then
5240          PROG_NAME=tail
5241        else
5242          PROG_NAME=tail
5243        fi
5244        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5245$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5246        as_fn_error $? "Cannot continue" "$LINENO" 5
5247    fi
5248
5249
5250
5251    for ac_prog in tar
5252do
5253  # Extract the first word of "$ac_prog", so it can be a program name with args.
5254set dummy $ac_prog; ac_word=$2
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5256$as_echo_n "checking for $ac_word... " >&6; }
5257if test "${ac_cv_path_TAR+set}" = set; then :
5258  $as_echo_n "(cached) " >&6
5259else
5260  case $TAR in
5261  [\\/]* | ?:[\\/]*)
5262  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5263  ;;
5264  *)
5265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5266for as_dir in $PATH
5267do
5268  IFS=$as_save_IFS
5269  test -z "$as_dir" && as_dir=.
5270    for ac_exec_ext in '' $ac_executable_extensions; do
5271  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5272    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5274    break 2
5275  fi
5276done
5277  done
5278IFS=$as_save_IFS
5279
5280  ;;
5281esac
5282fi
5283TAR=$ac_cv_path_TAR
5284if test -n "$TAR"; then
5285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5286$as_echo "$TAR" >&6; }
5287else
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5289$as_echo "no" >&6; }
5290fi
5291
5292
5293  test -n "$TAR" && break
5294done
5295
5296
5297    if test "x$TAR" = x; then
5298        if test "xtar" = x; then
5299          PROG_NAME=tar
5300        else
5301          PROG_NAME=tar
5302        fi
5303        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5304$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5305        as_fn_error $? "Cannot continue" "$LINENO" 5
5306    fi
5307
5308
5309
5310    for ac_prog in tee
5311do
5312  # Extract the first word of "$ac_prog", so it can be a program name with args.
5313set dummy $ac_prog; ac_word=$2
5314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5315$as_echo_n "checking for $ac_word... " >&6; }
5316if test "${ac_cv_path_TEE+set}" = set; then :
5317  $as_echo_n "(cached) " >&6
5318else
5319  case $TEE in
5320  [\\/]* | ?:[\\/]*)
5321  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5322  ;;
5323  *)
5324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5325for as_dir in $PATH
5326do
5327  IFS=$as_save_IFS
5328  test -z "$as_dir" && as_dir=.
5329    for ac_exec_ext in '' $ac_executable_extensions; do
5330  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5331    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5333    break 2
5334  fi
5335done
5336  done
5337IFS=$as_save_IFS
5338
5339  ;;
5340esac
5341fi
5342TEE=$ac_cv_path_TEE
5343if test -n "$TEE"; then
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5345$as_echo "$TEE" >&6; }
5346else
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5348$as_echo "no" >&6; }
5349fi
5350
5351
5352  test -n "$TEE" && break
5353done
5354
5355
5356    if test "x$TEE" = x; then
5357        if test "xtee" = x; then
5358          PROG_NAME=tee
5359        else
5360          PROG_NAME=tee
5361        fi
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5363$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5364        as_fn_error $? "Cannot continue" "$LINENO" 5
5365    fi
5366
5367
5368
5369    for ac_prog in touch
5370do
5371  # Extract the first word of "$ac_prog", so it can be a program name with args.
5372set dummy $ac_prog; ac_word=$2
5373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5374$as_echo_n "checking for $ac_word... " >&6; }
5375if test "${ac_cv_path_TOUCH+set}" = set; then :
5376  $as_echo_n "(cached) " >&6
5377else
5378  case $TOUCH in
5379  [\\/]* | ?:[\\/]*)
5380  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5381  ;;
5382  *)
5383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5384for as_dir in $PATH
5385do
5386  IFS=$as_save_IFS
5387  test -z "$as_dir" && as_dir=.
5388    for ac_exec_ext in '' $ac_executable_extensions; do
5389  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5390    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5392    break 2
5393  fi
5394done
5395  done
5396IFS=$as_save_IFS
5397
5398  ;;
5399esac
5400fi
5401TOUCH=$ac_cv_path_TOUCH
5402if test -n "$TOUCH"; then
5403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5404$as_echo "$TOUCH" >&6; }
5405else
5406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5407$as_echo "no" >&6; }
5408fi
5409
5410
5411  test -n "$TOUCH" && break
5412done
5413
5414
5415    if test "x$TOUCH" = x; then
5416        if test "xtouch" = x; then
5417          PROG_NAME=touch
5418        else
5419          PROG_NAME=touch
5420        fi
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5422$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5423        as_fn_error $? "Cannot continue" "$LINENO" 5
5424    fi
5425
5426
5427
5428    for ac_prog in tr
5429do
5430  # Extract the first word of "$ac_prog", so it can be a program name with args.
5431set dummy $ac_prog; ac_word=$2
5432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5433$as_echo_n "checking for $ac_word... " >&6; }
5434if test "${ac_cv_path_TR+set}" = set; then :
5435  $as_echo_n "(cached) " >&6
5436else
5437  case $TR in
5438  [\\/]* | ?:[\\/]*)
5439  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5440  ;;
5441  *)
5442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5443for as_dir in $PATH
5444do
5445  IFS=$as_save_IFS
5446  test -z "$as_dir" && as_dir=.
5447    for ac_exec_ext in '' $ac_executable_extensions; do
5448  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5449    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5451    break 2
5452  fi
5453done
5454  done
5455IFS=$as_save_IFS
5456
5457  ;;
5458esac
5459fi
5460TR=$ac_cv_path_TR
5461if test -n "$TR"; then
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5463$as_echo "$TR" >&6; }
5464else
5465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5466$as_echo "no" >&6; }
5467fi
5468
5469
5470  test -n "$TR" && break
5471done
5472
5473
5474    if test "x$TR" = x; then
5475        if test "xtr" = x; then
5476          PROG_NAME=tr
5477        else
5478          PROG_NAME=tr
5479        fi
5480        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5481$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5482        as_fn_error $? "Cannot continue" "$LINENO" 5
5483    fi
5484
5485
5486
5487    for ac_prog in uname
5488do
5489  # Extract the first word of "$ac_prog", so it can be a program name with args.
5490set dummy $ac_prog; ac_word=$2
5491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5492$as_echo_n "checking for $ac_word... " >&6; }
5493if test "${ac_cv_path_UNAME+set}" = set; then :
5494  $as_echo_n "(cached) " >&6
5495else
5496  case $UNAME in
5497  [\\/]* | ?:[\\/]*)
5498  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5499  ;;
5500  *)
5501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5502for as_dir in $PATH
5503do
5504  IFS=$as_save_IFS
5505  test -z "$as_dir" && as_dir=.
5506    for ac_exec_ext in '' $ac_executable_extensions; do
5507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5508    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5510    break 2
5511  fi
5512done
5513  done
5514IFS=$as_save_IFS
5515
5516  ;;
5517esac
5518fi
5519UNAME=$ac_cv_path_UNAME
5520if test -n "$UNAME"; then
5521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5522$as_echo "$UNAME" >&6; }
5523else
5524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5525$as_echo "no" >&6; }
5526fi
5527
5528
5529  test -n "$UNAME" && break
5530done
5531
5532
5533    if test "x$UNAME" = x; then
5534        if test "xuname" = x; then
5535          PROG_NAME=uname
5536        else
5537          PROG_NAME=uname
5538        fi
5539        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5540$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5541        as_fn_error $? "Cannot continue" "$LINENO" 5
5542    fi
5543
5544
5545
5546    for ac_prog in uniq
5547do
5548  # Extract the first word of "$ac_prog", so it can be a program name with args.
5549set dummy $ac_prog; ac_word=$2
5550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551$as_echo_n "checking for $ac_word... " >&6; }
5552if test "${ac_cv_path_UNIQ+set}" = set; then :
5553  $as_echo_n "(cached) " >&6
5554else
5555  case $UNIQ in
5556  [\\/]* | ?:[\\/]*)
5557  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5558  ;;
5559  *)
5560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561for as_dir in $PATH
5562do
5563  IFS=$as_save_IFS
5564  test -z "$as_dir" && as_dir=.
5565    for ac_exec_ext in '' $ac_executable_extensions; do
5566  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5567    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569    break 2
5570  fi
5571done
5572  done
5573IFS=$as_save_IFS
5574
5575  ;;
5576esac
5577fi
5578UNIQ=$ac_cv_path_UNIQ
5579if test -n "$UNIQ"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5581$as_echo "$UNIQ" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588  test -n "$UNIQ" && break
5589done
5590
5591
5592    if test "x$UNIQ" = x; then
5593        if test "xuniq" = x; then
5594          PROG_NAME=uniq
5595        else
5596          PROG_NAME=uniq
5597        fi
5598        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5599$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5600        as_fn_error $? "Cannot continue" "$LINENO" 5
5601    fi
5602
5603
5604
5605    for ac_prog in wc
5606do
5607  # Extract the first word of "$ac_prog", so it can be a program name with args.
5608set dummy $ac_prog; ac_word=$2
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5610$as_echo_n "checking for $ac_word... " >&6; }
5611if test "${ac_cv_path_WC+set}" = set; then :
5612  $as_echo_n "(cached) " >&6
5613else
5614  case $WC in
5615  [\\/]* | ?:[\\/]*)
5616  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5617  ;;
5618  *)
5619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5620for as_dir in $PATH
5621do
5622  IFS=$as_save_IFS
5623  test -z "$as_dir" && as_dir=.
5624    for ac_exec_ext in '' $ac_executable_extensions; do
5625  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5626    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5628    break 2
5629  fi
5630done
5631  done
5632IFS=$as_save_IFS
5633
5634  ;;
5635esac
5636fi
5637WC=$ac_cv_path_WC
5638if test -n "$WC"; then
5639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5640$as_echo "$WC" >&6; }
5641else
5642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5643$as_echo "no" >&6; }
5644fi
5645
5646
5647  test -n "$WC" && break
5648done
5649
5650
5651    if test "x$WC" = x; then
5652        if test "xwc" = x; then
5653          PROG_NAME=wc
5654        else
5655          PROG_NAME=wc
5656        fi
5657        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5658$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5659        as_fn_error $? "Cannot continue" "$LINENO" 5
5660    fi
5661
5662
5663
5664    for ac_prog in which
5665do
5666  # Extract the first word of "$ac_prog", so it can be a program name with args.
5667set dummy $ac_prog; ac_word=$2
5668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5669$as_echo_n "checking for $ac_word... " >&6; }
5670if test "${ac_cv_path_WHICH+set}" = set; then :
5671  $as_echo_n "(cached) " >&6
5672else
5673  case $WHICH in
5674  [\\/]* | ?:[\\/]*)
5675  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5676  ;;
5677  *)
5678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5679for as_dir in $PATH
5680do
5681  IFS=$as_save_IFS
5682  test -z "$as_dir" && as_dir=.
5683    for ac_exec_ext in '' $ac_executable_extensions; do
5684  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5685    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5687    break 2
5688  fi
5689done
5690  done
5691IFS=$as_save_IFS
5692
5693  ;;
5694esac
5695fi
5696WHICH=$ac_cv_path_WHICH
5697if test -n "$WHICH"; then
5698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5699$as_echo "$WHICH" >&6; }
5700else
5701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5702$as_echo "no" >&6; }
5703fi
5704
5705
5706  test -n "$WHICH" && break
5707done
5708
5709
5710    if test "x$WHICH" = x; then
5711        if test "xwhich" = x; then
5712          PROG_NAME=which
5713        else
5714          PROG_NAME=which
5715        fi
5716        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5717$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5718        as_fn_error $? "Cannot continue" "$LINENO" 5
5719    fi
5720
5721
5722
5723    for ac_prog in xargs
5724do
5725  # Extract the first word of "$ac_prog", so it can be a program name with args.
5726set dummy $ac_prog; ac_word=$2
5727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5728$as_echo_n "checking for $ac_word... " >&6; }
5729if test "${ac_cv_path_XARGS+set}" = set; then :
5730  $as_echo_n "(cached) " >&6
5731else
5732  case $XARGS in
5733  [\\/]* | ?:[\\/]*)
5734  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5735  ;;
5736  *)
5737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738for as_dir in $PATH
5739do
5740  IFS=$as_save_IFS
5741  test -z "$as_dir" && as_dir=.
5742    for ac_exec_ext in '' $ac_executable_extensions; do
5743  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5744    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5746    break 2
5747  fi
5748done
5749  done
5750IFS=$as_save_IFS
5751
5752  ;;
5753esac
5754fi
5755XARGS=$ac_cv_path_XARGS
5756if test -n "$XARGS"; then
5757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5758$as_echo "$XARGS" >&6; }
5759else
5760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5761$as_echo "no" >&6; }
5762fi
5763
5764
5765  test -n "$XARGS" && break
5766done
5767
5768
5769    if test "x$XARGS" = x; then
5770        if test "xxargs" = x; then
5771          PROG_NAME=xargs
5772        else
5773          PROG_NAME=xargs
5774        fi
5775        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5776$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5777        as_fn_error $? "Cannot continue" "$LINENO" 5
5778    fi
5779
5780
5781
5782# Then required tools that require some special treatment.
5783for ac_prog in gawk mawk nawk awk
5784do
5785  # Extract the first word of "$ac_prog", so it can be a program name with args.
5786set dummy $ac_prog; ac_word=$2
5787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5788$as_echo_n "checking for $ac_word... " >&6; }
5789if test "${ac_cv_prog_AWK+set}" = set; then :
5790  $as_echo_n "(cached) " >&6
5791else
5792  if test -n "$AWK"; then
5793  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5794else
5795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5796for as_dir in $PATH
5797do
5798  IFS=$as_save_IFS
5799  test -z "$as_dir" && as_dir=.
5800    for ac_exec_ext in '' $ac_executable_extensions; do
5801  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5802    ac_cv_prog_AWK="$ac_prog"
5803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5804    break 2
5805  fi
5806done
5807  done
5808IFS=$as_save_IFS
5809
5810fi
5811fi
5812AWK=$ac_cv_prog_AWK
5813if test -n "$AWK"; then
5814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5815$as_echo "$AWK" >&6; }
5816else
5817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5818$as_echo "no" >&6; }
5819fi
5820
5821
5822  test -n "$AWK" && break
5823done
5824
5825
5826    if test "x$AWK" = x; then
5827        if test "x" = x; then
5828          PROG_NAME=awk
5829        else
5830          PROG_NAME=
5831        fi
5832        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5833$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5834        as_fn_error $? "Cannot continue" "$LINENO" 5
5835    fi
5836
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5838$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5839if test "${ac_cv_path_GREP+set}" = set; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  if test -z "$GREP"; then
5843  ac_path_GREP_found=false
5844  # Loop through the user's path and test for each of PROGNAME-LIST
5845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5846for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5847do
5848  IFS=$as_save_IFS
5849  test -z "$as_dir" && as_dir=.
5850    for ac_prog in grep ggrep; do
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5853      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5854# Check for GNU ac_path_GREP and select it if it is found.
5855  # Check for GNU $ac_path_GREP
5856case `"$ac_path_GREP" --version 2>&1` in
5857*GNU*)
5858  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5859*)
5860  ac_count=0
5861  $as_echo_n 0123456789 >"conftest.in"
5862  while :
5863  do
5864    cat "conftest.in" "conftest.in" >"conftest.tmp"
5865    mv "conftest.tmp" "conftest.in"
5866    cp "conftest.in" "conftest.nl"
5867    $as_echo 'GREP' >> "conftest.nl"
5868    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5869    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5870    as_fn_arith $ac_count + 1 && ac_count=$as_val
5871    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5872      # Best one so far, save it but keep looking for a better one
5873      ac_cv_path_GREP="$ac_path_GREP"
5874      ac_path_GREP_max=$ac_count
5875    fi
5876    # 10*(2^10) chars as input seems more than enough
5877    test $ac_count -gt 10 && break
5878  done
5879  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5880esac
5881
5882      $ac_path_GREP_found && break 3
5883    done
5884  done
5885  done
5886IFS=$as_save_IFS
5887  if test -z "$ac_cv_path_GREP"; then
5888    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5889  fi
5890else
5891  ac_cv_path_GREP=$GREP
5892fi
5893
5894fi
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5896$as_echo "$ac_cv_path_GREP" >&6; }
5897 GREP="$ac_cv_path_GREP"
5898
5899
5900
5901    if test "x$GREP" = x; then
5902        if test "x" = x; then
5903          PROG_NAME=grep
5904        else
5905          PROG_NAME=
5906        fi
5907        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5908$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5909        as_fn_error $? "Cannot continue" "$LINENO" 5
5910    fi
5911
5912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5913$as_echo_n "checking for egrep... " >&6; }
5914if test "${ac_cv_path_EGREP+set}" = set; then :
5915  $as_echo_n "(cached) " >&6
5916else
5917  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5918   then ac_cv_path_EGREP="$GREP -E"
5919   else
5920     if test -z "$EGREP"; then
5921  ac_path_EGREP_found=false
5922  # Loop through the user's path and test for each of PROGNAME-LIST
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_prog in egrep; do
5929    for ac_exec_ext in '' $ac_executable_extensions; do
5930      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5931      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5932# Check for GNU ac_path_EGREP and select it if it is found.
5933  # Check for GNU $ac_path_EGREP
5934case `"$ac_path_EGREP" --version 2>&1` in
5935*GNU*)
5936  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5937*)
5938  ac_count=0
5939  $as_echo_n 0123456789 >"conftest.in"
5940  while :
5941  do
5942    cat "conftest.in" "conftest.in" >"conftest.tmp"
5943    mv "conftest.tmp" "conftest.in"
5944    cp "conftest.in" "conftest.nl"
5945    $as_echo 'EGREP' >> "conftest.nl"
5946    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5947    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5948    as_fn_arith $ac_count + 1 && ac_count=$as_val
5949    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5950      # Best one so far, save it but keep looking for a better one
5951      ac_cv_path_EGREP="$ac_path_EGREP"
5952      ac_path_EGREP_max=$ac_count
5953    fi
5954    # 10*(2^10) chars as input seems more than enough
5955    test $ac_count -gt 10 && break
5956  done
5957  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5958esac
5959
5960      $ac_path_EGREP_found && break 3
5961    done
5962  done
5963  done
5964IFS=$as_save_IFS
5965  if test -z "$ac_cv_path_EGREP"; then
5966    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5967  fi
5968else
5969  ac_cv_path_EGREP=$EGREP
5970fi
5971
5972   fi
5973fi
5974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5975$as_echo "$ac_cv_path_EGREP" >&6; }
5976 EGREP="$ac_cv_path_EGREP"
5977
5978
5979
5980    if test "x$EGREP" = x; then
5981        if test "x" = x; then
5982          PROG_NAME=egrep
5983        else
5984          PROG_NAME=
5985        fi
5986        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5987$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5988        as_fn_error $? "Cannot continue" "$LINENO" 5
5989    fi
5990
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5992$as_echo_n "checking for fgrep... " >&6; }
5993if test "${ac_cv_path_FGREP+set}" = set; then :
5994  $as_echo_n "(cached) " >&6
5995else
5996  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5997   then ac_cv_path_FGREP="$GREP -F"
5998   else
5999     if test -z "$FGREP"; then
6000  ac_path_FGREP_found=false
6001  # Loop through the user's path and test for each of PROGNAME-LIST
6002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6004do
6005  IFS=$as_save_IFS
6006  test -z "$as_dir" && as_dir=.
6007    for ac_prog in fgrep; do
6008    for ac_exec_ext in '' $ac_executable_extensions; do
6009      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6010      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6011# Check for GNU ac_path_FGREP and select it if it is found.
6012  # Check for GNU $ac_path_FGREP
6013case `"$ac_path_FGREP" --version 2>&1` in
6014*GNU*)
6015  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6016*)
6017  ac_count=0
6018  $as_echo_n 0123456789 >"conftest.in"
6019  while :
6020  do
6021    cat "conftest.in" "conftest.in" >"conftest.tmp"
6022    mv "conftest.tmp" "conftest.in"
6023    cp "conftest.in" "conftest.nl"
6024    $as_echo 'FGREP' >> "conftest.nl"
6025    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6026    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6027    as_fn_arith $ac_count + 1 && ac_count=$as_val
6028    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6029      # Best one so far, save it but keep looking for a better one
6030      ac_cv_path_FGREP="$ac_path_FGREP"
6031      ac_path_FGREP_max=$ac_count
6032    fi
6033    # 10*(2^10) chars as input seems more than enough
6034    test $ac_count -gt 10 && break
6035  done
6036  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6037esac
6038
6039      $ac_path_FGREP_found && break 3
6040    done
6041  done
6042  done
6043IFS=$as_save_IFS
6044  if test -z "$ac_cv_path_FGREP"; then
6045    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6046  fi
6047else
6048  ac_cv_path_FGREP=$FGREP
6049fi
6050
6051   fi
6052fi
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6054$as_echo "$ac_cv_path_FGREP" >&6; }
6055 FGREP="$ac_cv_path_FGREP"
6056
6057
6058
6059    if test "x$FGREP" = x; then
6060        if test "x" = x; then
6061          PROG_NAME=fgrep
6062        else
6063          PROG_NAME=
6064        fi
6065        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6066$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6067        as_fn_error $? "Cannot continue" "$LINENO" 5
6068    fi
6069
6070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6071$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6072if test "${ac_cv_path_SED+set}" = set; then :
6073  $as_echo_n "(cached) " >&6
6074else
6075            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6076     for ac_i in 1 2 3 4 5 6 7; do
6077       ac_script="$ac_script$as_nl$ac_script"
6078     done
6079     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6080     { ac_script=; unset ac_script;}
6081     if test -z "$SED"; then
6082  ac_path_SED_found=false
6083  # Loop through the user's path and test for each of PROGNAME-LIST
6084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085for as_dir in $PATH
6086do
6087  IFS=$as_save_IFS
6088  test -z "$as_dir" && as_dir=.
6089    for ac_prog in sed gsed; do
6090    for ac_exec_ext in '' $ac_executable_extensions; do
6091      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6092      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6093# Check for GNU ac_path_SED and select it if it is found.
6094  # Check for GNU $ac_path_SED
6095case `"$ac_path_SED" --version 2>&1` in
6096*GNU*)
6097  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6098*)
6099  ac_count=0
6100  $as_echo_n 0123456789 >"conftest.in"
6101  while :
6102  do
6103    cat "conftest.in" "conftest.in" >"conftest.tmp"
6104    mv "conftest.tmp" "conftest.in"
6105    cp "conftest.in" "conftest.nl"
6106    $as_echo '' >> "conftest.nl"
6107    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6108    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6109    as_fn_arith $ac_count + 1 && ac_count=$as_val
6110    if test $ac_count -gt ${ac_path_SED_max-0}; then
6111      # Best one so far, save it but keep looking for a better one
6112      ac_cv_path_SED="$ac_path_SED"
6113      ac_path_SED_max=$ac_count
6114    fi
6115    # 10*(2^10) chars as input seems more than enough
6116    test $ac_count -gt 10 && break
6117  done
6118  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6119esac
6120
6121      $ac_path_SED_found && break 3
6122    done
6123  done
6124  done
6125IFS=$as_save_IFS
6126  if test -z "$ac_cv_path_SED"; then
6127    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6128  fi
6129else
6130  ac_cv_path_SED=$SED
6131fi
6132
6133fi
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6135$as_echo "$ac_cv_path_SED" >&6; }
6136 SED="$ac_cv_path_SED"
6137  rm -f conftest.sed
6138
6139
6140    if test "x$SED" = x; then
6141        if test "x" = x; then
6142          PROG_NAME=sed
6143        else
6144          PROG_NAME=
6145        fi
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6147$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6148        as_fn_error $? "Cannot continue" "$LINENO" 5
6149    fi
6150
6151
6152for ac_prog in nawk gawk awk
6153do
6154  # Extract the first word of "$ac_prog", so it can be a program name with args.
6155set dummy $ac_prog; ac_word=$2
6156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6157$as_echo_n "checking for $ac_word... " >&6; }
6158if test "${ac_cv_path_NAWK+set}" = set; then :
6159  $as_echo_n "(cached) " >&6
6160else
6161  case $NAWK in
6162  [\\/]* | ?:[\\/]*)
6163  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6164  ;;
6165  *)
6166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6167for as_dir in $PATH
6168do
6169  IFS=$as_save_IFS
6170  test -z "$as_dir" && as_dir=.
6171    for ac_exec_ext in '' $ac_executable_extensions; do
6172  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6173    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6175    break 2
6176  fi
6177done
6178  done
6179IFS=$as_save_IFS
6180
6181  ;;
6182esac
6183fi
6184NAWK=$ac_cv_path_NAWK
6185if test -n "$NAWK"; then
6186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6187$as_echo "$NAWK" >&6; }
6188else
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190$as_echo "no" >&6; }
6191fi
6192
6193
6194  test -n "$NAWK" && break
6195done
6196
6197
6198    if test "x$NAWK" = x; then
6199        if test "x" = x; then
6200          PROG_NAME=nawk
6201        else
6202          PROG_NAME=
6203        fi
6204        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6205$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6206        as_fn_error $? "Cannot continue" "$LINENO" 5
6207    fi
6208
6209
6210# Always force rm.
6211RM="$RM -f"
6212
6213# These are not required on all platforms
6214# Extract the first word of "cygpath", so it can be a program name with args.
6215set dummy cygpath; ac_word=$2
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6217$as_echo_n "checking for $ac_word... " >&6; }
6218if test "${ac_cv_path_CYGPATH+set}" = set; then :
6219  $as_echo_n "(cached) " >&6
6220else
6221  case $CYGPATH in
6222  [\\/]* | ?:[\\/]*)
6223  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6224  ;;
6225  *)
6226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227for as_dir in $PATH
6228do
6229  IFS=$as_save_IFS
6230  test -z "$as_dir" && as_dir=.
6231    for ac_exec_ext in '' $ac_executable_extensions; do
6232  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6233    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6235    break 2
6236  fi
6237done
6238  done
6239IFS=$as_save_IFS
6240
6241  ;;
6242esac
6243fi
6244CYGPATH=$ac_cv_path_CYGPATH
6245if test -n "$CYGPATH"; then
6246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6247$as_echo "$CYGPATH" >&6; }
6248else
6249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6250$as_echo "no" >&6; }
6251fi
6252
6253
6254# Extract the first word of "readlink", so it can be a program name with args.
6255set dummy readlink; ac_word=$2
6256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6257$as_echo_n "checking for $ac_word... " >&6; }
6258if test "${ac_cv_path_READLINK+set}" = set; then :
6259  $as_echo_n "(cached) " >&6
6260else
6261  case $READLINK in
6262  [\\/]* | ?:[\\/]*)
6263  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6264  ;;
6265  *)
6266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6267for as_dir in $PATH
6268do
6269  IFS=$as_save_IFS
6270  test -z "$as_dir" && as_dir=.
6271    for ac_exec_ext in '' $ac_executable_extensions; do
6272  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6273    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6275    break 2
6276  fi
6277done
6278  done
6279IFS=$as_save_IFS
6280
6281  ;;
6282esac
6283fi
6284READLINK=$ac_cv_path_READLINK
6285if test -n "$READLINK"; then
6286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6287$as_echo "$READLINK" >&6; }
6288else
6289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6290$as_echo "no" >&6; }
6291fi
6292
6293
6294# Extract the first word of "df", so it can be a program name with args.
6295set dummy df; ac_word=$2
6296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6297$as_echo_n "checking for $ac_word... " >&6; }
6298if test "${ac_cv_path_DF+set}" = set; then :
6299  $as_echo_n "(cached) " >&6
6300else
6301  case $DF in
6302  [\\/]* | ?:[\\/]*)
6303  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6304  ;;
6305  *)
6306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6307for as_dir in $PATH
6308do
6309  IFS=$as_save_IFS
6310  test -z "$as_dir" && as_dir=.
6311    for ac_exec_ext in '' $ac_executable_extensions; do
6312  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6313    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6315    break 2
6316  fi
6317done
6318  done
6319IFS=$as_save_IFS
6320
6321  ;;
6322esac
6323fi
6324DF=$ac_cv_path_DF
6325if test -n "$DF"; then
6326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6327$as_echo "$DF" >&6; }
6328else
6329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }
6331fi
6332
6333
6334# Extract the first word of "SetFile", so it can be a program name with args.
6335set dummy SetFile; ac_word=$2
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337$as_echo_n "checking for $ac_word... " >&6; }
6338if test "${ac_cv_path_SETFILE+set}" = set; then :
6339  $as_echo_n "(cached) " >&6
6340else
6341  case $SETFILE in
6342  [\\/]* | ?:[\\/]*)
6343  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6344  ;;
6345  *)
6346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347for as_dir in $PATH
6348do
6349  IFS=$as_save_IFS
6350  test -z "$as_dir" && as_dir=.
6351    for ac_exec_ext in '' $ac_executable_extensions; do
6352  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6353    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355    break 2
6356  fi
6357done
6358  done
6359IFS=$as_save_IFS
6360
6361  ;;
6362esac
6363fi
6364SETFILE=$ac_cv_path_SETFILE
6365if test -n "$SETFILE"; then
6366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6367$as_echo "$SETFILE" >&6; }
6368else
6369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }
6371fi
6372
6373
6374
6375
6376# Now we can determine OpenJDK build and target platforms. This is required to
6377# have early on.
6378# Make sure we can run config.sub.
6379$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6380  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6381
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6383$as_echo_n "checking build system type... " >&6; }
6384if test "${ac_cv_build+set}" = set; then :
6385  $as_echo_n "(cached) " >&6
6386else
6387  ac_build_alias=$build_alias
6388test "x$ac_build_alias" = x &&
6389  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6390test "x$ac_build_alias" = x &&
6391  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6392ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6393  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6394
6395fi
6396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6397$as_echo "$ac_cv_build" >&6; }
6398case $ac_cv_build in
6399*-*-*) ;;
6400*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6401esac
6402build=$ac_cv_build
6403ac_save_IFS=$IFS; IFS='-'
6404set x $ac_cv_build
6405shift
6406build_cpu=$1
6407build_vendor=$2
6408shift; shift
6409# Remember, the first character of IFS is used to create $*,
6410# except with old shells:
6411build_os=$*
6412IFS=$ac_save_IFS
6413case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6414
6415
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6417$as_echo_n "checking host system type... " >&6; }
6418if test "${ac_cv_host+set}" = set; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  if test "x$host_alias" = x; then
6422  ac_cv_host=$ac_cv_build
6423else
6424  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6425    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6426fi
6427
6428fi
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6430$as_echo "$ac_cv_host" >&6; }
6431case $ac_cv_host in
6432*-*-*) ;;
6433*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6434esac
6435host=$ac_cv_host
6436ac_save_IFS=$IFS; IFS='-'
6437set x $ac_cv_host
6438shift
6439host_cpu=$1
6440host_vendor=$2
6441shift; shift
6442# Remember, the first character of IFS is used to create $*,
6443# except with old shells:
6444host_os=$*
6445IFS=$ac_save_IFS
6446case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6447
6448
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6450$as_echo_n "checking target system type... " >&6; }
6451if test "${ac_cv_target+set}" = set; then :
6452  $as_echo_n "(cached) " >&6
6453else
6454  if test "x$target_alias" = x; then
6455  ac_cv_target=$ac_cv_host
6456else
6457  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6458    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6459fi
6460
6461fi
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6463$as_echo "$ac_cv_target" >&6; }
6464case $ac_cv_target in
6465*-*-*) ;;
6466*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6467esac
6468target=$ac_cv_target
6469ac_save_IFS=$IFS; IFS='-'
6470set x $ac_cv_target
6471shift
6472target_cpu=$1
6473target_vendor=$2
6474shift; shift
6475# Remember, the first character of IFS is used to create $*,
6476# except with old shells:
6477target_os=$*
6478IFS=$ac_save_IFS
6479case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6480
6481
6482# The aliases save the names the user supplied, while $host etc.
6483# will get canonicalized.
6484test -n "$target_alias" &&
6485  test "$program_prefix$program_suffix$program_transform_name" = \
6486    NONENONEs,x,x, &&
6487  program_prefix=${target_alias}-
6488
6489# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6490# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6491# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6492# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6493# to use the configure naming style.
6494
6495
6496
6497
6498
6499    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6500    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6501    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6502    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6503    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6504    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6505
6506
6507
6508    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6509
6510  case "$build_os" in
6511    *linux*)
6512      VAR_OS=linux
6513      VAR_OS_API=posix
6514      VAR_OS_ENV=linux
6515      ;;
6516    *solaris*)
6517      VAR_OS=solaris
6518      VAR_OS_API=posix
6519      VAR_OS_ENV=solaris
6520      ;;
6521    *darwin*)
6522      VAR_OS=macosx
6523      VAR_OS_API=posix
6524      VAR_OS_ENV=macosx
6525      ;;
6526    *bsd*)
6527      VAR_OS=bsd
6528      VAR_OS_API=posix
6529      VAR_OS_ENV=bsd
6530      ;;
6531    *cygwin*)
6532      VAR_OS=windows
6533      VAR_OS_API=winapi
6534      VAR_OS_ENV=windows.cygwin
6535      ;;
6536    *mingw*)
6537      VAR_OS=windows
6538      VAR_OS_API=winapi
6539      VAR_OS_ENV=windows.msys
6540      ;;
6541    *)
6542      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6543      ;;
6544  esac
6545
6546
6547  # First argument is the cpu name from the trip/quad
6548  case "$build_cpu" in
6549    x86_64)
6550      VAR_CPU=x86_64
6551      VAR_CPU_ARCH=x86
6552      VAR_CPU_BITS=64
6553      VAR_CPU_ENDIAN=little
6554      ;;
6555    i?86)
6556      VAR_CPU=x86
6557      VAR_CPU_ARCH=x86
6558      VAR_CPU_BITS=32
6559      VAR_CPU_ENDIAN=little
6560      ;;
6561    arm*)
6562      VAR_CPU=arm
6563      VAR_CPU_ARCH=arm
6564      VAR_CPU_BITS=32
6565      VAR_CPU_ENDIAN=little
6566      ;;
6567    powerpc)
6568      VAR_CPU=ppc
6569      VAR_CPU_ARCH=ppc
6570      VAR_CPU_BITS=32
6571      VAR_CPU_ENDIAN=big
6572       ;;
6573    powerpc64)
6574      VAR_CPU=ppc64
6575      VAR_CPU_ARCH=ppc
6576      VAR_CPU_BITS=64
6577      VAR_CPU_ENDIAN=big
6578       ;;
6579    sparc)
6580      VAR_CPU=sparc
6581      VAR_CPU_ARCH=sparc
6582      VAR_CPU_BITS=32
6583      VAR_CPU_ENDIAN=big
6584       ;;
6585    sparcv9)
6586      VAR_CPU=sparcv9
6587      VAR_CPU_ARCH=sparc
6588      VAR_CPU_BITS=64
6589      VAR_CPU_ENDIAN=big
6590       ;;
6591    *)
6592      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6593      ;;
6594  esac
6595
6596    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6597    OPENJDK_BUILD_OS="$VAR_OS"
6598    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6599    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6600    OPENJDK_BUILD_CPU="$VAR_CPU"
6601    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6602    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6603    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6604
6605
6606
6607
6608
6609
6610
6611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6612$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6614$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6615
6616    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6617
6618  case "$host_os" in
6619    *linux*)
6620      VAR_OS=linux
6621      VAR_OS_API=posix
6622      VAR_OS_ENV=linux
6623      ;;
6624    *solaris*)
6625      VAR_OS=solaris
6626      VAR_OS_API=posix
6627      VAR_OS_ENV=solaris
6628      ;;
6629    *darwin*)
6630      VAR_OS=macosx
6631      VAR_OS_API=posix
6632      VAR_OS_ENV=macosx
6633      ;;
6634    *bsd*)
6635      VAR_OS=bsd
6636      VAR_OS_API=posix
6637      VAR_OS_ENV=bsd
6638      ;;
6639    *cygwin*)
6640      VAR_OS=windows
6641      VAR_OS_API=winapi
6642      VAR_OS_ENV=windows.cygwin
6643      ;;
6644    *mingw*)
6645      VAR_OS=windows
6646      VAR_OS_API=winapi
6647      VAR_OS_ENV=windows.msys
6648      ;;
6649    *)
6650      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6651      ;;
6652  esac
6653
6654
6655  # First argument is the cpu name from the trip/quad
6656  case "$host_cpu" in
6657    x86_64)
6658      VAR_CPU=x86_64
6659      VAR_CPU_ARCH=x86
6660      VAR_CPU_BITS=64
6661      VAR_CPU_ENDIAN=little
6662      ;;
6663    i?86)
6664      VAR_CPU=x86
6665      VAR_CPU_ARCH=x86
6666      VAR_CPU_BITS=32
6667      VAR_CPU_ENDIAN=little
6668      ;;
6669    arm*)
6670      VAR_CPU=arm
6671      VAR_CPU_ARCH=arm
6672      VAR_CPU_BITS=32
6673      VAR_CPU_ENDIAN=little
6674      ;;
6675    powerpc)
6676      VAR_CPU=ppc
6677      VAR_CPU_ARCH=ppc
6678      VAR_CPU_BITS=32
6679      VAR_CPU_ENDIAN=big
6680       ;;
6681    powerpc64)
6682      VAR_CPU=ppc64
6683      VAR_CPU_ARCH=ppc
6684      VAR_CPU_BITS=64
6685      VAR_CPU_ENDIAN=big
6686       ;;
6687    sparc)
6688      VAR_CPU=sparc
6689      VAR_CPU_ARCH=sparc
6690      VAR_CPU_BITS=32
6691      VAR_CPU_ENDIAN=big
6692       ;;
6693    sparcv9)
6694      VAR_CPU=sparcv9
6695      VAR_CPU_ARCH=sparc
6696      VAR_CPU_BITS=64
6697      VAR_CPU_ENDIAN=big
6698       ;;
6699    *)
6700      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6701      ;;
6702  esac
6703
6704    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6705    OPENJDK_TARGET_OS="$VAR_OS"
6706    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6707    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6708    OPENJDK_TARGET_CPU="$VAR_CPU"
6709    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6710    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6711    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6712
6713
6714
6715
6716
6717
6718
6719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6720$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6722$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6723
6724
6725
6726# Check whether --with-target-bits was given.
6727if test "${with_target_bits+set}" = set; then :
6728  withval=$with_target_bits;
6729fi
6730
6731
6732  # We have three types of compiles:
6733  # native  == normal compilation, target system == build system
6734  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6735  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6736  #
6737  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6738    # We're doing a proper cross-compilation
6739    COMPILE_TYPE="cross"
6740  else
6741    COMPILE_TYPE="native"
6742  fi
6743
6744  if test "x$with_target_bits" != x; then
6745    if test "x$COMPILE_TYPE" = "xcross"; then
6746      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6747    fi
6748
6749    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6750      # A reduced build is requested
6751      COMPILE_TYPE="reduced"
6752      OPENJDK_TARGET_CPU_BITS=32
6753      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6754        OPENJDK_TARGET_CPU=x86
6755      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6756        OPENJDK_TARGET_CPU=sparc
6757      else
6758        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6759      fi
6760    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6761      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
6762    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6763      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6764$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6765    else
6766      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6767    fi
6768  fi
6769
6770
6771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6772$as_echo_n "checking compilation type... " >&6; }
6773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6774$as_echo "$COMPILE_TYPE" >&6; }
6775
6776
6777    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6778       REQUIRED_OS_NAME=SunOS
6779       REQUIRED_OS_VERSION=5.10
6780    fi
6781    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6782       REQUIRED_OS_NAME=Linux
6783       REQUIRED_OS_VERSION=2.6
6784    fi
6785    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6786        REQUIRED_OS_NAME=Windows
6787        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6788            REQUIRED_OS_VERSION=5.2
6789        else
6790            REQUIRED_OS_VERSION=5.1
6791        fi
6792    fi
6793    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6794        REQUIRED_OS_NAME=Darwin
6795        REQUIRED_OS_VERSION=11.2
6796    fi
6797
6798
6799
6800
6801
6802    # Also store the legacy naming of the cpu.
6803    # Ie i586 and amd64 instead of x86 and x86_64
6804    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6805    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6806      OPENJDK_TARGET_CPU_LEGACY="i586"
6807    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6808      # On all platforms except MacOSX replace x86_64 with amd64.
6809      OPENJDK_TARGET_CPU_LEGACY="amd64"
6810    fi
6811
6812
6813    # And the second legacy naming of the cpu.
6814    # Ie i386 and amd64 instead of x86 and x86_64.
6815    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6816    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6817      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6818    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6819      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6820    fi
6821
6822
6823    # This is the name of the cpu (but using i386 and amd64 instead of
6824    # x86 and x86_64, respectively), preceeded by a /, to be used when
6825    # locating libraries. On macosx, it's empty, though.
6826    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6827    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6828        OPENJDK_TARGET_CPU_LIBDIR=""
6829    fi
6830
6831
6832    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6833    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6834    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6835    OPENJDK_TARGET_CPU_ISADIR=""
6836    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6837      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6838          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6839      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6840          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6841      fi
6842    fi
6843
6844
6845    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6846    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6847    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6848      # On linux only, we replace x86 with i386.
6849      OPENJDK_TARGET_CPU_OSARCH="i386"
6850    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6851      # On all platforms except macosx, we replace x86_64 with amd64.
6852      OPENJDK_TARGET_CPU_OSARCH="amd64"
6853    fi
6854
6855
6856    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6857    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6858      OPENJDK_TARGET_CPU_JLI="i386"
6859    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6860      # On all platforms except macosx, we replace x86_64 with amd64.
6861      OPENJDK_TARGET_CPU_JLI="amd64"
6862    fi
6863    # Now setup the -D flags for building libjli.
6864    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6865    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6866      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6867        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6868      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6869        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6870      fi
6871    fi
6872
6873
6874    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6875    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6876        OPENJDK_TARGET_OS_API_DIR="solaris"
6877    fi
6878    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6879        OPENJDK_TARGET_OS_API_DIR="windows"
6880    fi
6881
6882
6883    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6884        A_LP64="LP64:="
6885        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6886        # unpack200.exe
6887        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6888            ADD_LP64="-D_LP64=1"
6889        fi
6890    fi
6891    LP64=$A_LP64
6892
6893
6894    if test "x$COMPILE_TYPE" = "xcross"; then
6895      # FIXME: ... or should this include reduced builds..?
6896      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6897    else
6898      DEFINE_CROSS_COMPILE_ARCH=""
6899    fi
6900
6901
6902
6903
6904# Continue setting up basic stuff. Most remaining code require fundamental tools.
6905
6906# Locate the directory of this script.
6907SCRIPT="$0"
6908
6909    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6910        # Follow a chain of symbolic links. Use readlink
6911        # where it exists, else fall back to horribly
6912        # complicated shell code.
6913        if test "x$READLINK_TESTED" != yes; then
6914            # On MacOSX there is a readlink tool with a different
6915            # purpose than the GNU readlink tool. Check the found readlink.
6916            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
6917            if test "x$ISGNU" = x; then
6918                 # A readlink that we do not know how to use.
6919                 # Are there other non-GNU readlinks out there?
6920                 READLINK_TESTED=yes
6921                 READLINK=
6922            fi
6923        fi
6924
6925        if test "x$READLINK" != x; then
6926            SCRIPT=`$READLINK -f $SCRIPT`
6927        else
6928            # Save the current directory for restoring afterwards
6929            STARTDIR=$PWD
6930            COUNTER=0
6931            sym_link_dir=`$DIRNAME $SCRIPT`
6932            sym_link_file=`$BASENAME $SCRIPT`
6933            # Use the system pwd and not the shell builtin to resolve directory symlinks
6934            cd $sym_link_dir
6935            cd `$THEPWDCMD`
6936            sym_link_dir=`$THEPWDCMD`
6937            # Resolve file symlinks
6938            while test $COUNTER -lt 20; do
6939                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6940                if test "x$ISLINK" == x; then
6941                    # This is not a symbolic link! We are done!
6942                    break
6943                fi
6944                # Again resolve directory symlinks since the target of the just found
6945                # link could be in a different directory
6946                cd `$DIRNAME $ISLINK`
6947                sym_link_dir=`$THEPWDCMD`
6948                sym_link_file=`$BASENAME $ISLINK`
6949                let COUNTER=COUNTER+1
6950            done
6951            cd $STARTDIR
6952            SCRIPT=$sym_link_dir/$sym_link_file
6953        fi
6954    fi
6955
6956AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6957
6958# Where is the source? It is located two levels above the configure script.
6959CURDIR="$PWD"
6960cd "$AUTOCONF_DIR/../.."
6961SRC_ROOT="`$THEPWDCMD`"
6962
6963if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6964  PATH_SEP=";"
6965
6966  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6967  if test $SRC_ROOT_LENGTH -gt 100; then
6968      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6969  fi
6970
6971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6973$as_echo_n "checking cygwin release... " >&6; }
6974    CYGWIN_VERSION=`$UNAME -r`
6975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6976$as_echo "$CYGWIN_VERSION" >&6; }
6977    WINDOWS_ENV_VENDOR='cygwin'
6978    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6979
6980    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6981    if test "x$CYGWIN_VERSION_OK" = x; then
6982      { $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
6983$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;}
6984      as_fn_error $? "Cannot continue" "$LINENO" 5
6985    fi
6986    if test "x$CYGPATH" = x; then
6987        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6988    fi
6989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6990$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6991    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6992    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6993    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6994    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6996$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6997    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6998    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6999    if test "x$test_cygdrive_prefix" = x; then
7000        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7001    fi
7002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7004$as_echo_n "checking msys release... " >&6; }
7005    MSYS_VERSION=`$UNAME -r`
7006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7007$as_echo "$MSYS_VERSION" >&6; }
7008
7009    WINDOWS_ENV_VENDOR='msys'
7010    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7011
7012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7013$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7014    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7015    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7016
7017  windows_path="$MSYS_ROOT_PATH"
7018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7019    unix_path=`$CYGPATH -u "$windows_path"`
7020    MSYS_ROOT_PATH="$unix_path"
7021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7023    MSYS_ROOT_PATH="$unix_path"
7024  fi
7025
7026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7027$as_echo "$MSYS_ROOT_PATH" >&6; }
7028    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7029  else
7030    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7031  fi
7032
7033  # Test if windows or unix (cygwin/msys) find is first in path.
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7035$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7036  FIND_BINARY_OUTPUT=`find --version 2>&1`
7037  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7039$as_echo "unix style" >&6; }
7040  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7042$as_echo "Windows" >&6; }
7043    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7044$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7045    { $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
7046$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7047    as_fn_error $? "Cannot continue" "$LINENO" 5
7048  else
7049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7050$as_echo "unknown" >&6; }
7051    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7052$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7053  fi
7054
7055else
7056  PATH_SEP=":"
7057fi
7058
7059
7060
7061cd "$CURDIR"
7062
7063
7064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7065
7066  # Input might be given as Windows format, start by converting to
7067  # unix format.
7068  path="$SRC_ROOT"
7069  new_path=`$CYGPATH -u "$path"`
7070
7071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7074  # "foo.exe" is OK but "foo" is an error.
7075  #
7076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7077  # It is also a way to make sure we got the proper file name for the real test later on.
7078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7079  if test "x$test_shortpath" = x; then
7080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7081$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7082    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7083  fi
7084
7085  # Call helper function which possibly converts this using DOS-style short mode.
7086  # If so, the updated path is stored in $new_path.
7087
7088  input_path="$new_path"
7089  # Check if we need to convert this using DOS-style short mode. If the path
7090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7091  # take no chances and rewrite it.
7092  # Note: m4 eats our [], so we need to use [ and ] instead.
7093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7094  if test "x$has_forbidden_chars" != x; then
7095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7099      # Going to short mode and back again did indeed matter. Since short mode is
7100      # case insensitive, let's make it lowercase to improve readability.
7101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7102      # Now convert it back to Unix-stile (cygpath)
7103      input_path=`$CYGPATH -u "$shortmode_path"`
7104      new_path="$input_path"
7105    fi
7106  fi
7107
7108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7109  if test "x$test_cygdrive_prefix" = x; then
7110    # As a simple fix, exclude /usr/bin since it's not a real path.
7111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7113      # a path prefixed by /cygdrive for fixpath to work.
7114      new_path="$CYGWIN_ROOT_PATH$input_path"
7115    fi
7116  fi
7117
7118
7119  if test "x$path" != "x$new_path"; then
7120    SRC_ROOT="$new_path"
7121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7122$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7123  fi
7124
7125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7126
7127  path="$SRC_ROOT"
7128  has_colon=`$ECHO $path | $GREP ^.:`
7129  new_path="$path"
7130  if test "x$has_colon" = x; then
7131    # Not in mixed or Windows style, start by that.
7132    new_path=`cmd //c echo $path`
7133  fi
7134
7135
7136  input_path="$new_path"
7137  # Check if we need to convert this using DOS-style short mode. If the path
7138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7139  # take no chances and rewrite it.
7140  # Note: m4 eats our [], so we need to use [ and ] instead.
7141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7142  if test "x$has_forbidden_chars" != x; then
7143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7145  fi
7146
7147
7148  windows_path="$new_path"
7149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7150    unix_path=`$CYGPATH -u "$windows_path"`
7151    new_path="$unix_path"
7152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7154    new_path="$unix_path"
7155  fi
7156
7157  if test "x$path" != "x$new_path"; then
7158    SRC_ROOT="$new_path"
7159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7160$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7161  fi
7162
7163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7165
7166  else
7167    # We're on a posix platform. Hooray! :)
7168    path="$SRC_ROOT"
7169
7170    if test ! -f "$path" && test ! -d "$path"; then
7171      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7172    fi
7173
7174    has_space=`$ECHO "$path" | $GREP " "`
7175    if test "x$has_space" != x; then
7176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7177$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7178      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7179    fi
7180  fi
7181
7182
7183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7184
7185  # Input might be given as Windows format, start by converting to
7186  # unix format.
7187  path="$CURDIR"
7188  new_path=`$CYGPATH -u "$path"`
7189
7190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7193  # "foo.exe" is OK but "foo" is an error.
7194  #
7195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7196  # It is also a way to make sure we got the proper file name for the real test later on.
7197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7198  if test "x$test_shortpath" = x; then
7199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7200$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7201    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7202  fi
7203
7204  # Call helper function which possibly converts this using DOS-style short mode.
7205  # If so, the updated path is stored in $new_path.
7206
7207  input_path="$new_path"
7208  # Check if we need to convert this using DOS-style short mode. If the path
7209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7210  # take no chances and rewrite it.
7211  # Note: m4 eats our [], so we need to use [ and ] instead.
7212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7213  if test "x$has_forbidden_chars" != x; then
7214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7218      # Going to short mode and back again did indeed matter. Since short mode is
7219      # case insensitive, let's make it lowercase to improve readability.
7220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7221      # Now convert it back to Unix-stile (cygpath)
7222      input_path=`$CYGPATH -u "$shortmode_path"`
7223      new_path="$input_path"
7224    fi
7225  fi
7226
7227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7228  if test "x$test_cygdrive_prefix" = x; then
7229    # As a simple fix, exclude /usr/bin since it's not a real path.
7230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7232      # a path prefixed by /cygdrive for fixpath to work.
7233      new_path="$CYGWIN_ROOT_PATH$input_path"
7234    fi
7235  fi
7236
7237
7238  if test "x$path" != "x$new_path"; then
7239    CURDIR="$new_path"
7240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7241$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7242  fi
7243
7244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7245
7246  path="$CURDIR"
7247  has_colon=`$ECHO $path | $GREP ^.:`
7248  new_path="$path"
7249  if test "x$has_colon" = x; then
7250    # Not in mixed or Windows style, start by that.
7251    new_path=`cmd //c echo $path`
7252  fi
7253
7254
7255  input_path="$new_path"
7256  # Check if we need to convert this using DOS-style short mode. If the path
7257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7258  # take no chances and rewrite it.
7259  # Note: m4 eats our [], so we need to use [ and ] instead.
7260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7261  if test "x$has_forbidden_chars" != x; then
7262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7264  fi
7265
7266
7267  windows_path="$new_path"
7268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7269    unix_path=`$CYGPATH -u "$windows_path"`
7270    new_path="$unix_path"
7271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7273    new_path="$unix_path"
7274  fi
7275
7276  if test "x$path" != "x$new_path"; then
7277    CURDIR="$new_path"
7278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7279$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7280  fi
7281
7282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7284
7285  else
7286    # We're on a posix platform. Hooray! :)
7287    path="$CURDIR"
7288
7289    if test ! -f "$path" && test ! -d "$path"; then
7290      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7291    fi
7292
7293    has_space=`$ECHO "$path" | $GREP " "`
7294    if test "x$has_space" != x; then
7295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7296$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7298    fi
7299  fi
7300
7301
7302if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7303    # Add extra search paths on solaris for utilities like ar and as etc...
7304    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7305fi
7306
7307# You can force the sys-root if the sys-root encoded into the cross compiler tools
7308# is not correct.
7309
7310# Check whether --with-sys-root was given.
7311if test "${with_sys_root+set}" = set; then :
7312  withval=$with_sys_root;
7313fi
7314
7315
7316if test "x$with_sys_root" != x; then
7317  SYS_ROOT=$with_sys_root
7318else
7319  SYS_ROOT=/
7320fi
7321
7322
7323
7324# Check whether --with-tools-dir was given.
7325if test "${with_tools_dir+set}" = set; then :
7326  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7327fi
7328
7329
7330
7331# Check whether --with-devkit was given.
7332if test "${with_devkit+set}" = set; then :
7333  withval=$with_devkit;
7334    if test "x$with_sys_root" != x; then
7335      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7336    fi
7337    if test "x$with_tools_dir" != x; then
7338      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7339    fi
7340    TOOLS_DIR=$with_devkit/bin
7341    SYS_ROOT=$with_devkit/$host_alias/libc
7342
7343fi
7344
7345
7346
7347
7348# Setup default logging of stdout and stderr to build.log in the output root.
7349BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7350BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7351BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7352
7353
7354
7355
7356
7357# These are needed to be able to create a configuration name (and thus the output directory)
7358
7359###############################################################################
7360#
7361# Check which variant of the JDK that we want to build.
7362# Currently we have:
7363#    normal:   standard edition
7364# but the custom make system may add other variants
7365#
7366# Effectively the JDK variant gives a name to a specific set of
7367# modules to compile into the JDK. In the future, these modules
7368# might even be Jigsaw modules.
7369#
7370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7371$as_echo_n "checking which variant of the JDK to build... " >&6; }
7372
7373# Check whether --with-jdk-variant was given.
7374if test "${with_jdk_variant+set}" = set; then :
7375  withval=$with_jdk_variant;
7376fi
7377
7378
7379if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7380    JDK_VARIANT="normal"
7381else
7382    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7383fi
7384
7385
7386
7387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7388$as_echo "$JDK_VARIANT" >&6; }
7389
7390
7391
7392###############################################################################
7393#
7394# Check which variants of the JVM that we want to build.
7395# Currently we have:
7396#    server: normal interpreter and a tiered C1/C2 compiler
7397#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7398#    minimal1: reduced form of client with optional VM services and features stripped out
7399#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7400#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7401#    zero: no machine code interpreter, no compiler
7402#    zeroshark: zero interpreter and shark/llvm compiler backend
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7404$as_echo_n "checking which variants of the JVM to build... " >&6; }
7405
7406# Check whether --with-jvm-variants was given.
7407if test "${with_jvm_variants+set}" = set; then :
7408  withval=$with_jvm_variants;
7409fi
7410
7411
7412if test "x$with_jvm_variants" = x; then
7413     with_jvm_variants="server"
7414fi
7415
7416JVM_VARIANTS=",$with_jvm_variants,"
7417TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7418
7419if test "x$TEST_VARIANTS" != "x,"; then
7420   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7421fi
7422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7423$as_echo "$with_jvm_variants" >&6; }
7424
7425JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7426JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7427JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7428JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7429JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7430JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7431
7432if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7433    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7434        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7435    fi
7436fi
7437if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7438    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7439        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7440    fi
7441fi
7442if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7443    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7444        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7445    fi
7446fi
7447
7448# Replace the commas with AND for use in the build directory name.
7449ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7450COUNT_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/'`
7451if test "x$COUNT_VARIANTS" != "x,1"; then
7452    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7453else
7454    BUILDING_MULTIPLE_JVM_VARIANTS=no
7455fi
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7466   MACOSX_UNIVERSAL="true"
7467fi
7468
7469
7470
7471
7472
7473###############################################################################
7474#
7475# Set the debug level
7476#    release: no debug information, all optimizations, no asserts.
7477#    fastdebug: debug information (-g), all optimizations, all asserts
7478#    slowdebug: debug information (-g), no optimizations, all asserts
7479#
7480DEBUG_LEVEL="release"
7481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7482$as_echo_n "checking which debug level to use... " >&6; }
7483# Check whether --enable-debug was given.
7484if test "${enable_debug+set}" = set; then :
7485  enableval=$enable_debug;
7486        ENABLE_DEBUG="${enableval}"
7487        DEBUG_LEVEL="fastdebug"
7488
7489else
7490  ENABLE_DEBUG="no"
7491fi
7492
7493
7494
7495# Check whether --with-debug-level was given.
7496if test "${with_debug_level+set}" = set; then :
7497  withval=$with_debug_level;
7498        DEBUG_LEVEL="${withval}"
7499        if test "x$ENABLE_DEBUG" = xyes; then
7500			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7501        fi
7502
7503fi
7504
7505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7506$as_echo "$DEBUG_LEVEL" >&6; }
7507
7508if test "x$DEBUG_LEVEL" != xrelease && \
7509   test "x$DEBUG_LEVEL" != xfastdebug && \
7510   test "x$DEBUG_LEVEL" != xslowdebug; then
7511   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7512fi
7513
7514
7515###############################################################################
7516#
7517# Setup legacy vars/targets and new vars to deal with different debug levels.
7518#
7519
7520case $DEBUG_LEVEL in
7521      release )
7522          VARIANT="OPT"
7523          FASTDEBUG="false"
7524          DEBUG_CLASSFILES="false"
7525          BUILD_VARIANT_RELEASE=""
7526          HOTSPOT_DEBUG_LEVEL="product"
7527          HOTSPOT_EXPORT="product"
7528           ;;
7529      fastdebug )
7530          VARIANT="DBG"
7531          FASTDEBUG="true"
7532          DEBUG_CLASSFILES="true"
7533          BUILD_VARIANT_RELEASE="-fastdebug"
7534          HOTSPOT_DEBUG_LEVEL="fastdebug"
7535          HOTSPOT_EXPORT="fastdebug"
7536           ;;
7537      slowdebug )
7538          VARIANT="DBG"
7539          FASTDEBUG="false"
7540          DEBUG_CLASSFILES="true"
7541          BUILD_VARIANT_RELEASE="-debug"
7542          HOTSPOT_DEBUG_LEVEL="jvmg"
7543          HOTSPOT_EXPORT="debug"
7544           ;;
7545esac
7546
7547#####
7548# Generate the legacy makefile targets for hotspot.
7549# The hotspot api for selecting the build artifacts, really, needs to be improved.
7550# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7551# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7552# But until then ...
7553HOTSPOT_TARGET=""
7554
7555if test "x$JVM_VARIANT_SERVER" = xtrue; then
7556    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7557fi
7558
7559if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7560    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7561fi
7562
7563if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7564    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7565fi
7566
7567if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7568    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7569fi
7570
7571if test "x$JVM_VARIANT_ZERO" = xtrue; then
7572    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7573fi
7574
7575if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7576    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7577fi
7578
7579HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7580
7581# On Macosx universal binaries are produced, but they only contain
7582# 64 bit intel. This invalidates control of which jvms are built
7583# from configure, but only server is valid anyway. Fix this
7584# when hotspot makefiles are rewritten.
7585if test "x$MACOSX_UNIVERSAL" = xtrue; then
7586    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7587fi
7588
7589#####
7590
7591
7592
7593
7594
7595
7596
7597
7598# With basic setup done, call the custom early hook.
7599
7600
7601# To properly create a configuration name, we need to have the OpenJDK target
7602# and options (variants and debug level) parsed.
7603
7604
7605
7606# Check whether --with-conf-name was given.
7607if test "${with_conf_name+set}" = set; then :
7608  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7609fi
7610
7611
7612# Test from where we are running configure, in or outside of src root.
7613# To enable comparison of directories, CURDIR needs to be symlink free
7614# just like SRC_ROOT already is
7615NOSYM_CURDIR="$CURDIR"
7616
7617    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7618        # Follow a chain of symbolic links. Use readlink
7619        # where it exists, else fall back to horribly
7620        # complicated shell code.
7621        if test "x$READLINK_TESTED" != yes; then
7622            # On MacOSX there is a readlink tool with a different
7623            # purpose than the GNU readlink tool. Check the found readlink.
7624            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7625            if test "x$ISGNU" = x; then
7626                 # A readlink that we do not know how to use.
7627                 # Are there other non-GNU readlinks out there?
7628                 READLINK_TESTED=yes
7629                 READLINK=
7630            fi
7631        fi
7632
7633        if test "x$READLINK" != x; then
7634            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7635        else
7636            # Save the current directory for restoring afterwards
7637            STARTDIR=$PWD
7638            COUNTER=0
7639            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7640            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7641            # Use the system pwd and not the shell builtin to resolve directory symlinks
7642            cd $sym_link_dir
7643            cd `$THEPWDCMD`
7644            sym_link_dir=`$THEPWDCMD`
7645            # Resolve file symlinks
7646            while test $COUNTER -lt 20; do
7647                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7648                if test "x$ISLINK" == x; then
7649                    # This is not a symbolic link! We are done!
7650                    break
7651                fi
7652                # Again resolve directory symlinks since the target of the just found
7653                # link could be in a different directory
7654                cd `$DIRNAME $ISLINK`
7655                sym_link_dir=`$THEPWDCMD`
7656                sym_link_file=`$BASENAME $ISLINK`
7657                let COUNTER=COUNTER+1
7658            done
7659            cd $STARTDIR
7660            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7661        fi
7662    fi
7663
7664if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7665        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7666        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7667    # We are running configure from the src root.
7668    # Create a default ./build/target-variant-debuglevel output root.
7669    if test "x${CONF_NAME}" = x; then
7670        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7671    fi
7672    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7673    $MKDIR -p "$OUTPUT_ROOT"
7674    if test ! -d "$OUTPUT_ROOT"; then
7675        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7676    fi
7677else
7678    # We are running configure from outside of the src dir.
7679    # Then use the current directory as output dir!
7680    # If configuration is situated in normal build directory, just use the build
7681    # directory name as configuration name, otherwise use the complete path.
7682    if test "x${CONF_NAME}" = x; then
7683        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7684    fi
7685    OUTPUT_ROOT="$CURDIR"
7686
7687    # WARNING: This might be a bad thing to do. You need to be sure you want to
7688    # have a configuration in this directory. Do some sanity checks!
7689
7690    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7691      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7692      # other files
7693      files_present=`$LS $OUTPUT_ROOT`
7694      # Configure has already touched config.log and confdefs.h in the current dir when this check
7695      # is performed.
7696      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7697                                             | $TR -d '\n'`
7698      if test "x$filtered_files" != x; then
7699        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7700$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7701        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7702$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7703        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7704$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7705        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7706$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7707        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7708$as_echo "$as_me: seriously mess up just about everything." >&6;}
7709        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7710$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7711        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7712$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7713        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7714      fi
7715    fi
7716fi
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7718$as_echo_n "checking what configuration name to use... " >&6; }
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7720$as_echo "$CONF_NAME" >&6; }
7721
7722
7723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7724
7725  # Input might be given as Windows format, start by converting to
7726  # unix format.
7727  path="$OUTPUT_ROOT"
7728  new_path=`$CYGPATH -u "$path"`
7729
7730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7733  # "foo.exe" is OK but "foo" is an error.
7734  #
7735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7736  # It is also a way to make sure we got the proper file name for the real test later on.
7737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7738  if test "x$test_shortpath" = x; then
7739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7740$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7741    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7742  fi
7743
7744  # Call helper function which possibly converts this using DOS-style short mode.
7745  # If so, the updated path is stored in $new_path.
7746
7747  input_path="$new_path"
7748  # Check if we need to convert this using DOS-style short mode. If the path
7749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7750  # take no chances and rewrite it.
7751  # Note: m4 eats our [], so we need to use [ and ] instead.
7752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7753  if test "x$has_forbidden_chars" != x; then
7754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7758      # Going to short mode and back again did indeed matter. Since short mode is
7759      # case insensitive, let's make it lowercase to improve readability.
7760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7761      # Now convert it back to Unix-stile (cygpath)
7762      input_path=`$CYGPATH -u "$shortmode_path"`
7763      new_path="$input_path"
7764    fi
7765  fi
7766
7767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7768  if test "x$test_cygdrive_prefix" = x; then
7769    # As a simple fix, exclude /usr/bin since it's not a real path.
7770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7772      # a path prefixed by /cygdrive for fixpath to work.
7773      new_path="$CYGWIN_ROOT_PATH$input_path"
7774    fi
7775  fi
7776
7777
7778  if test "x$path" != "x$new_path"; then
7779    OUTPUT_ROOT="$new_path"
7780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7781$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7782  fi
7783
7784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7785
7786  path="$OUTPUT_ROOT"
7787  has_colon=`$ECHO $path | $GREP ^.:`
7788  new_path="$path"
7789  if test "x$has_colon" = x; then
7790    # Not in mixed or Windows style, start by that.
7791    new_path=`cmd //c echo $path`
7792  fi
7793
7794
7795  input_path="$new_path"
7796  # Check if we need to convert this using DOS-style short mode. If the path
7797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7798  # take no chances and rewrite it.
7799  # Note: m4 eats our [], so we need to use [ and ] instead.
7800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7801  if test "x$has_forbidden_chars" != x; then
7802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7804  fi
7805
7806
7807  windows_path="$new_path"
7808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7809    unix_path=`$CYGPATH -u "$windows_path"`
7810    new_path="$unix_path"
7811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7813    new_path="$unix_path"
7814  fi
7815
7816  if test "x$path" != "x$new_path"; then
7817    OUTPUT_ROOT="$new_path"
7818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7819$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7820  fi
7821
7822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7824
7825  else
7826    # We're on a posix platform. Hooray! :)
7827    path="$OUTPUT_ROOT"
7828
7829    if test ! -f "$path" && test ! -d "$path"; then
7830      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7831    fi
7832
7833    has_space=`$ECHO "$path" | $GREP " "`
7834    if test "x$has_space" != x; then
7835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7836$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7837      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7838    fi
7839  fi
7840
7841
7842SPEC=$OUTPUT_ROOT/spec.gmk
7843
7844CONF_NAME=$CONF_NAME
7845
7846OUTPUT_ROOT=$OUTPUT_ROOT
7847
7848
7849# Most of the probed defines are put into config.h
7850ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7851
7852# The spec.gmk file contains all variables for the make system.
7853ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7854
7855# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7856ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7857
7858# The bootcycle-spec.gmk file contains support for boot cycle builds.
7859ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7860
7861# The compare.sh is used to compare the build output to other builds.
7862ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7863
7864# Spec.sh is currently used by compare-objects.sh
7865ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7866
7867# The generated Makefile knows where the spec.gmk is and where the source is.
7868# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7869# which will look for generated configurations
7870ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7871
7872
7873# Save the arguments given to us
7874echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7875
7876
7877# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7878
7879    for ac_prog in apt-get yum port pkgutil pkgadd
7880do
7881  # Extract the first word of "$ac_prog", so it can be a program name with args.
7882set dummy $ac_prog; ac_word=$2
7883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7884$as_echo_n "checking for $ac_word... " >&6; }
7885if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7886  $as_echo_n "(cached) " >&6
7887else
7888  if test -n "$PKGHANDLER"; then
7889  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7890else
7891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7892for as_dir in $PATH
7893do
7894  IFS=$as_save_IFS
7895  test -z "$as_dir" && as_dir=.
7896    for ac_exec_ext in '' $ac_executable_extensions; do
7897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7898    ac_cv_prog_PKGHANDLER="$ac_prog"
7899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7900    break 2
7901  fi
7902done
7903  done
7904IFS=$as_save_IFS
7905
7906fi
7907fi
7908PKGHANDLER=$ac_cv_prog_PKGHANDLER
7909if test -n "$PKGHANDLER"; then
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7911$as_echo "$PKGHANDLER" >&6; }
7912else
7913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7914$as_echo "no" >&6; }
7915fi
7916
7917
7918  test -n "$PKGHANDLER" && break
7919done
7920
7921
7922
7923# Setup tools that requires more complex handling, or that is not needed by the configure script.
7924
7925
7926  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7927  if test "x$MAKE" != x; then
7928    # User has supplied a make, test it.
7929    if test ! -f "$MAKE"; then
7930      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7931    fi
7932
7933  MAKE_CANDIDATE=""$MAKE""
7934  DESCRIPTION="user supplied MAKE=$MAKE"
7935  if test "x$MAKE_CANDIDATE" != x; then
7936    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7937$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7938    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7939    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7940    if test "x$IS_GNU_MAKE" = x; then
7941      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7942$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7943    else
7944      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7945      if test "x$IS_MODERN_MAKE" = x; then
7946        { $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
7947$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;}
7948      else
7949        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7950          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7951            MAKE_EXPECTED_ENV='cygwin'
7952          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7953            MAKE_EXPECTED_ENV='msys'
7954          else
7955            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7956          fi
7957          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7958          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7959        else
7960          # Not relevant for non-Windows
7961          IS_MAKE_CORRECT_ENV=true
7962        fi
7963        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7964          { $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
7965$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;}
7966        else
7967          FOUND_MAKE=$MAKE_CANDIDATE
7968
7969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7970
7971  # First separate the path from the arguments. This will split at the first
7972  # space.
7973  complete="$FOUND_MAKE"
7974  path="${complete%% *}"
7975  tmp="$complete EOL"
7976  arguments="${tmp#* }"
7977
7978  # Input might be given as Windows format, start by converting to
7979  # unix format.
7980  new_path=`$CYGPATH -u "$path"`
7981
7982  # Now try to locate executable using which
7983  new_path=`$WHICH "$new_path" 2> /dev/null`
7984  # bat and cmd files are not always considered executable in cygwin causing which
7985  # to not find them
7986  if test "x$new_path" = x \
7987           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7988           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7989    new_path=`$CYGPATH -u "$path"`
7990  fi
7991  if test "x$new_path" = x; then
7992    # Oops. Which didn't find the executable.
7993    # The splitting of arguments from the executable at a space might have been incorrect,
7994    # since paths with space are more likely in Windows. Give it another try with the whole
7995    # argument.
7996    path="$complete"
7997    arguments="EOL"
7998    new_path=`$CYGPATH -u "$path"`
7999    new_path=`$WHICH "$new_path" 2> /dev/null`
8000    # bat and cmd files are not always considered executable in cygwin causing which
8001    # to not find them
8002    if test "x$new_path" = x \
8003             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8004             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8005      new_path=`$CYGPATH -u "$path"`
8006    fi
8007    if test "x$new_path" = x; then
8008      # It's still not found. Now this is an unrecoverable error.
8009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8010$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8011      has_space=`$ECHO "$complete" | $GREP " "`
8012      if test "x$has_space" != x; then
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8015      fi
8016      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8017    fi
8018  fi
8019
8020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8023  # "foo.exe" is OK but "foo" is an error.
8024  #
8025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8026  # It is also a way to make sure we got the proper file name for the real test later on.
8027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8028  if test "x$test_shortpath" = x; then
8029    # Short path failed, file does not exist as specified.
8030    # Try adding .exe or .cmd
8031    if test -f "${new_path}.exe"; then
8032       input_to_shortpath="${new_path}.exe"
8033    elif test -f "${new_path}.cmd"; then
8034       input_to_shortpath="${new_path}.cmd"
8035    else
8036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8037$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8040      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8041    fi
8042  else
8043    input_to_shortpath="$new_path"
8044  fi
8045
8046  # Call helper function which possibly converts this using DOS-style short mode.
8047  # If so, the updated path is stored in $new_path.
8048  new_path="$input_to_shortpath"
8049
8050  input_path="$input_to_shortpath"
8051  # Check if we need to convert this using DOS-style short mode. If the path
8052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8053  # take no chances and rewrite it.
8054  # Note: m4 eats our [], so we need to use [ and ] instead.
8055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8056  if test "x$has_forbidden_chars" != x; then
8057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8061      # Going to short mode and back again did indeed matter. Since short mode is
8062      # case insensitive, let's make it lowercase to improve readability.
8063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8064      # Now convert it back to Unix-stile (cygpath)
8065      input_path=`$CYGPATH -u "$shortmode_path"`
8066      new_path="$input_path"
8067    fi
8068  fi
8069
8070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8071  if test "x$test_cygdrive_prefix" = x; then
8072    # As a simple fix, exclude /usr/bin since it's not a real path.
8073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8075      # a path prefixed by /cygdrive for fixpath to work.
8076      new_path="$CYGWIN_ROOT_PATH$input_path"
8077    fi
8078  fi
8079
8080  # remove trailing .exe if any
8081  new_path="${new_path/%.exe/}"
8082
8083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8084
8085  # First separate the path from the arguments. This will split at the first
8086  # space.
8087  complete="$FOUND_MAKE"
8088  path="${complete%% *}"
8089  tmp="$complete EOL"
8090  arguments="${tmp#* }"
8091
8092  # Input might be given as Windows format, start by converting to
8093  # unix format.
8094  new_path="$path"
8095
8096  windows_path="$new_path"
8097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8098    unix_path=`$CYGPATH -u "$windows_path"`
8099    new_path="$unix_path"
8100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8102    new_path="$unix_path"
8103  fi
8104
8105
8106  # Now try to locate executable using which
8107  new_path=`$WHICH "$new_path" 2> /dev/null`
8108
8109  if test "x$new_path" = x; then
8110    # Oops. Which didn't find the executable.
8111    # The splitting of arguments from the executable at a space might have been incorrect,
8112    # since paths with space are more likely in Windows. Give it another try with the whole
8113    # argument.
8114    path="$complete"
8115    arguments="EOL"
8116    new_path="$path"
8117
8118  windows_path="$new_path"
8119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8120    unix_path=`$CYGPATH -u "$windows_path"`
8121    new_path="$unix_path"
8122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8124    new_path="$unix_path"
8125  fi
8126
8127
8128    new_path=`$WHICH "$new_path" 2> /dev/null`
8129
8130    if test "x$new_path" = x; then
8131      # It's still not found. Now this is an unrecoverable error.
8132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8133$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8134      has_space=`$ECHO "$complete" | $GREP " "`
8135      if test "x$has_space" != x; then
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8138      fi
8139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8140    fi
8141  fi
8142
8143  # Now new_path has a complete unix path to the binary
8144  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8145    # Keep paths in /bin as-is, but remove trailing .exe if any
8146    new_path="${new_path/%.exe/}"
8147    # Do not save /bin paths to all_fixpath_prefixes!
8148  else
8149    # Not in mixed or Windows style, start by that.
8150    new_path=`cmd //c echo $new_path`
8151
8152  input_path="$new_path"
8153  # Check if we need to convert this using DOS-style short mode. If the path
8154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8155  # take no chances and rewrite it.
8156  # Note: m4 eats our [], so we need to use [ and ] instead.
8157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8158  if test "x$has_forbidden_chars" != x; then
8159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8161  fi
8162
8163    # Output is in $new_path
8164
8165  windows_path="$new_path"
8166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8167    unix_path=`$CYGPATH -u "$windows_path"`
8168    new_path="$unix_path"
8169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8171    new_path="$unix_path"
8172  fi
8173
8174    # remove trailing .exe if any
8175    new_path="${new_path/%.exe/}"
8176
8177    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8178    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8179  fi
8180
8181  else
8182    # We're on a posix platform. Hooray! :)
8183    # First separate the path from the arguments. This will split at the first
8184    # space.
8185    complete="$FOUND_MAKE"
8186    path="${complete%% *}"
8187    tmp="$complete EOL"
8188    arguments="${tmp#* }"
8189
8190    # Cannot rely on the command "which" here since it doesn't always work.
8191    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8192    if test -z "$is_absolute_path"; then
8193      # Path to executable is not absolute. Find it.
8194      IFS_save="$IFS"
8195      IFS=:
8196      for p in $PATH; do
8197        if test -f "$p/$path" && test -x "$p/$path"; then
8198          new_path="$p/$path"
8199          break
8200        fi
8201      done
8202      IFS="$IFS_save"
8203    else
8204      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8205$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8206      new_path="$path"
8207    fi
8208
8209    if test "x$new_path" = x; then
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8211$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8212        has_space=`$ECHO "$complete" | $GREP " "`
8213        if test "x$has_space" != x; then
8214          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8216        fi
8217        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8218      fi
8219  fi
8220
8221      # Now join together the path and the arguments once again
8222      if test "x$arguments" != xEOL; then
8223        new_complete="$new_path ${arguments% *}"
8224      else
8225        new_complete="$new_path"
8226      fi
8227
8228  if test "x$complete" != "x$new_complete"; then
8229      FOUND_MAKE="$new_complete"
8230      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8231$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8232    fi
8233
8234        fi
8235      fi
8236    fi
8237  fi
8238
8239    if test "x$FOUND_MAKE" = x; then
8240      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8241    fi
8242  else
8243    # Try our hardest to locate a correct version of GNU make
8244    for ac_prog in gmake
8245do
8246  # Extract the first word of "$ac_prog", so it can be a program name with args.
8247set dummy $ac_prog; ac_word=$2
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249$as_echo_n "checking for $ac_word... " >&6; }
8250if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8251  $as_echo_n "(cached) " >&6
8252else
8253  case $CHECK_GMAKE in
8254  [\\/]* | ?:[\\/]*)
8255  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8256  ;;
8257  *)
8258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259for as_dir in $PATH
8260do
8261  IFS=$as_save_IFS
8262  test -z "$as_dir" && as_dir=.
8263    for ac_exec_ext in '' $ac_executable_extensions; do
8264  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8265    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267    break 2
8268  fi
8269done
8270  done
8271IFS=$as_save_IFS
8272
8273  ;;
8274esac
8275fi
8276CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8277if test -n "$CHECK_GMAKE"; then
8278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8279$as_echo "$CHECK_GMAKE" >&6; }
8280else
8281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282$as_echo "no" >&6; }
8283fi
8284
8285
8286  test -n "$CHECK_GMAKE" && break
8287done
8288
8289
8290  MAKE_CANDIDATE=""$CHECK_GMAKE""
8291  DESCRIPTION="gmake in PATH"
8292  if test "x$MAKE_CANDIDATE" != x; then
8293    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8294$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8295    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8296    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8297    if test "x$IS_GNU_MAKE" = x; then
8298      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8299$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8300    else
8301      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8302      if test "x$IS_MODERN_MAKE" = x; then
8303        { $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
8304$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;}
8305      else
8306        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8307          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8308            MAKE_EXPECTED_ENV='cygwin'
8309          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8310            MAKE_EXPECTED_ENV='msys'
8311          else
8312            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8313          fi
8314          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8315          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8316        else
8317          # Not relevant for non-Windows
8318          IS_MAKE_CORRECT_ENV=true
8319        fi
8320        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8321          { $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
8322$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;}
8323        else
8324          FOUND_MAKE=$MAKE_CANDIDATE
8325
8326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8327
8328  # First separate the path from the arguments. This will split at the first
8329  # space.
8330  complete="$FOUND_MAKE"
8331  path="${complete%% *}"
8332  tmp="$complete EOL"
8333  arguments="${tmp#* }"
8334
8335  # Input might be given as Windows format, start by converting to
8336  # unix format.
8337  new_path=`$CYGPATH -u "$path"`
8338
8339  # Now try to locate executable using which
8340  new_path=`$WHICH "$new_path" 2> /dev/null`
8341  # bat and cmd files are not always considered executable in cygwin causing which
8342  # to not find them
8343  if test "x$new_path" = x \
8344           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8345           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8346    new_path=`$CYGPATH -u "$path"`
8347  fi
8348  if test "x$new_path" = x; then
8349    # Oops. Which didn't find the executable.
8350    # The splitting of arguments from the executable at a space might have been incorrect,
8351    # since paths with space are more likely in Windows. Give it another try with the whole
8352    # argument.
8353    path="$complete"
8354    arguments="EOL"
8355    new_path=`$CYGPATH -u "$path"`
8356    new_path=`$WHICH "$new_path" 2> /dev/null`
8357    # bat and cmd files are not always considered executable in cygwin causing which
8358    # to not find them
8359    if test "x$new_path" = x \
8360             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8361             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8362      new_path=`$CYGPATH -u "$path"`
8363    fi
8364    if test "x$new_path" = x; then
8365      # It's still not found. Now this is an unrecoverable error.
8366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8368      has_space=`$ECHO "$complete" | $GREP " "`
8369      if test "x$has_space" != x; then
8370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8372      fi
8373      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8374    fi
8375  fi
8376
8377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8380  # "foo.exe" is OK but "foo" is an error.
8381  #
8382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8383  # It is also a way to make sure we got the proper file name for the real test later on.
8384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8385  if test "x$test_shortpath" = x; then
8386    # Short path failed, file does not exist as specified.
8387    # Try adding .exe or .cmd
8388    if test -f "${new_path}.exe"; then
8389       input_to_shortpath="${new_path}.exe"
8390    elif test -f "${new_path}.cmd"; then
8391       input_to_shortpath="${new_path}.cmd"
8392    else
8393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8394$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8398    fi
8399  else
8400    input_to_shortpath="$new_path"
8401  fi
8402
8403  # Call helper function which possibly converts this using DOS-style short mode.
8404  # If so, the updated path is stored in $new_path.
8405  new_path="$input_to_shortpath"
8406
8407  input_path="$input_to_shortpath"
8408  # Check if we need to convert this using DOS-style short mode. If the path
8409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8410  # take no chances and rewrite it.
8411  # Note: m4 eats our [], so we need to use [ and ] instead.
8412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8413  if test "x$has_forbidden_chars" != x; then
8414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8418      # Going to short mode and back again did indeed matter. Since short mode is
8419      # case insensitive, let's make it lowercase to improve readability.
8420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8421      # Now convert it back to Unix-stile (cygpath)
8422      input_path=`$CYGPATH -u "$shortmode_path"`
8423      new_path="$input_path"
8424    fi
8425  fi
8426
8427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8428  if test "x$test_cygdrive_prefix" = x; then
8429    # As a simple fix, exclude /usr/bin since it's not a real path.
8430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8432      # a path prefixed by /cygdrive for fixpath to work.
8433      new_path="$CYGWIN_ROOT_PATH$input_path"
8434    fi
8435  fi
8436
8437  # remove trailing .exe if any
8438  new_path="${new_path/%.exe/}"
8439
8440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8441
8442  # First separate the path from the arguments. This will split at the first
8443  # space.
8444  complete="$FOUND_MAKE"
8445  path="${complete%% *}"
8446  tmp="$complete EOL"
8447  arguments="${tmp#* }"
8448
8449  # Input might be given as Windows format, start by converting to
8450  # unix format.
8451  new_path="$path"
8452
8453  windows_path="$new_path"
8454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8455    unix_path=`$CYGPATH -u "$windows_path"`
8456    new_path="$unix_path"
8457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8459    new_path="$unix_path"
8460  fi
8461
8462
8463  # Now try to locate executable using which
8464  new_path=`$WHICH "$new_path" 2> /dev/null`
8465
8466  if test "x$new_path" = x; then
8467    # Oops. Which didn't find the executable.
8468    # The splitting of arguments from the executable at a space might have been incorrect,
8469    # since paths with space are more likely in Windows. Give it another try with the whole
8470    # argument.
8471    path="$complete"
8472    arguments="EOL"
8473    new_path="$path"
8474
8475  windows_path="$new_path"
8476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8477    unix_path=`$CYGPATH -u "$windows_path"`
8478    new_path="$unix_path"
8479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8481    new_path="$unix_path"
8482  fi
8483
8484
8485    new_path=`$WHICH "$new_path" 2> /dev/null`
8486
8487    if test "x$new_path" = x; then
8488      # It's still not found. Now this is an unrecoverable error.
8489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8490$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8491      has_space=`$ECHO "$complete" | $GREP " "`
8492      if test "x$has_space" != x; then
8493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8495      fi
8496      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8497    fi
8498  fi
8499
8500  # Now new_path has a complete unix path to the binary
8501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8502    # Keep paths in /bin as-is, but remove trailing .exe if any
8503    new_path="${new_path/%.exe/}"
8504    # Do not save /bin paths to all_fixpath_prefixes!
8505  else
8506    # Not in mixed or Windows style, start by that.
8507    new_path=`cmd //c echo $new_path`
8508
8509  input_path="$new_path"
8510  # Check if we need to convert this using DOS-style short mode. If the path
8511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8512  # take no chances and rewrite it.
8513  # Note: m4 eats our [], so we need to use [ and ] instead.
8514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8515  if test "x$has_forbidden_chars" != x; then
8516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8518  fi
8519
8520    # Output is in $new_path
8521
8522  windows_path="$new_path"
8523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8524    unix_path=`$CYGPATH -u "$windows_path"`
8525    new_path="$unix_path"
8526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8528    new_path="$unix_path"
8529  fi
8530
8531    # remove trailing .exe if any
8532    new_path="${new_path/%.exe/}"
8533
8534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8536  fi
8537
8538  else
8539    # We're on a posix platform. Hooray! :)
8540    # First separate the path from the arguments. This will split at the first
8541    # space.
8542    complete="$FOUND_MAKE"
8543    path="${complete%% *}"
8544    tmp="$complete EOL"
8545    arguments="${tmp#* }"
8546
8547    # Cannot rely on the command "which" here since it doesn't always work.
8548    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8549    if test -z "$is_absolute_path"; then
8550      # Path to executable is not absolute. Find it.
8551      IFS_save="$IFS"
8552      IFS=:
8553      for p in $PATH; do
8554        if test -f "$p/$path" && test -x "$p/$path"; then
8555          new_path="$p/$path"
8556          break
8557        fi
8558      done
8559      IFS="$IFS_save"
8560    else
8561      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8562$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8563      new_path="$path"
8564    fi
8565
8566    if test "x$new_path" = x; then
8567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8568$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8569        has_space=`$ECHO "$complete" | $GREP " "`
8570        if test "x$has_space" != x; then
8571          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8573        fi
8574        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8575      fi
8576  fi
8577
8578      # Now join together the path and the arguments once again
8579      if test "x$arguments" != xEOL; then
8580        new_complete="$new_path ${arguments% *}"
8581      else
8582        new_complete="$new_path"
8583      fi
8584
8585  if test "x$complete" != "x$new_complete"; then
8586      FOUND_MAKE="$new_complete"
8587      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8588$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8589    fi
8590
8591        fi
8592      fi
8593    fi
8594  fi
8595
8596
8597    if test "x$FOUND_MAKE" = x; then
8598      for ac_prog in make
8599do
8600  # Extract the first word of "$ac_prog", so it can be a program name with args.
8601set dummy $ac_prog; ac_word=$2
8602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8603$as_echo_n "checking for $ac_word... " >&6; }
8604if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8605  $as_echo_n "(cached) " >&6
8606else
8607  case $CHECK_MAKE in
8608  [\\/]* | ?:[\\/]*)
8609  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8610  ;;
8611  *)
8612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8613for as_dir in $PATH
8614do
8615  IFS=$as_save_IFS
8616  test -z "$as_dir" && as_dir=.
8617    for ac_exec_ext in '' $ac_executable_extensions; do
8618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8619    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8621    break 2
8622  fi
8623done
8624  done
8625IFS=$as_save_IFS
8626
8627  ;;
8628esac
8629fi
8630CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8631if test -n "$CHECK_MAKE"; then
8632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8633$as_echo "$CHECK_MAKE" >&6; }
8634else
8635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8636$as_echo "no" >&6; }
8637fi
8638
8639
8640  test -n "$CHECK_MAKE" && break
8641done
8642
8643
8644  MAKE_CANDIDATE=""$CHECK_MAKE""
8645  DESCRIPTION="make in PATH"
8646  if test "x$MAKE_CANDIDATE" != x; then
8647    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8648$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8649    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8650    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8651    if test "x$IS_GNU_MAKE" = x; then
8652      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8653$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8654    else
8655      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8656      if test "x$IS_MODERN_MAKE" = x; then
8657        { $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
8658$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;}
8659      else
8660        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8661          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8662            MAKE_EXPECTED_ENV='cygwin'
8663          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8664            MAKE_EXPECTED_ENV='msys'
8665          else
8666            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8667          fi
8668          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8669          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8670        else
8671          # Not relevant for non-Windows
8672          IS_MAKE_CORRECT_ENV=true
8673        fi
8674        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8675          { $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
8676$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;}
8677        else
8678          FOUND_MAKE=$MAKE_CANDIDATE
8679
8680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8681
8682  # First separate the path from the arguments. This will split at the first
8683  # space.
8684  complete="$FOUND_MAKE"
8685  path="${complete%% *}"
8686  tmp="$complete EOL"
8687  arguments="${tmp#* }"
8688
8689  # Input might be given as Windows format, start by converting to
8690  # unix format.
8691  new_path=`$CYGPATH -u "$path"`
8692
8693  # Now try to locate executable using which
8694  new_path=`$WHICH "$new_path" 2> /dev/null`
8695  # bat and cmd files are not always considered executable in cygwin causing which
8696  # to not find them
8697  if test "x$new_path" = x \
8698           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8699           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8700    new_path=`$CYGPATH -u "$path"`
8701  fi
8702  if test "x$new_path" = x; then
8703    # Oops. Which didn't find the executable.
8704    # The splitting of arguments from the executable at a space might have been incorrect,
8705    # since paths with space are more likely in Windows. Give it another try with the whole
8706    # argument.
8707    path="$complete"
8708    arguments="EOL"
8709    new_path=`$CYGPATH -u "$path"`
8710    new_path=`$WHICH "$new_path" 2> /dev/null`
8711    # bat and cmd files are not always considered executable in cygwin causing which
8712    # to not find them
8713    if test "x$new_path" = x \
8714             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8715             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8716      new_path=`$CYGPATH -u "$path"`
8717    fi
8718    if test "x$new_path" = x; then
8719      # It's still not found. Now this is an unrecoverable error.
8720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8721$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8722      has_space=`$ECHO "$complete" | $GREP " "`
8723      if test "x$has_space" != x; then
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8726      fi
8727      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8728    fi
8729  fi
8730
8731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8734  # "foo.exe" is OK but "foo" is an error.
8735  #
8736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8737  # It is also a way to make sure we got the proper file name for the real test later on.
8738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8739  if test "x$test_shortpath" = x; then
8740    # Short path failed, file does not exist as specified.
8741    # Try adding .exe or .cmd
8742    if test -f "${new_path}.exe"; then
8743       input_to_shortpath="${new_path}.exe"
8744    elif test -f "${new_path}.cmd"; then
8745       input_to_shortpath="${new_path}.cmd"
8746    else
8747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8748$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8751      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8752    fi
8753  else
8754    input_to_shortpath="$new_path"
8755  fi
8756
8757  # Call helper function which possibly converts this using DOS-style short mode.
8758  # If so, the updated path is stored in $new_path.
8759  new_path="$input_to_shortpath"
8760
8761  input_path="$input_to_shortpath"
8762  # Check if we need to convert this using DOS-style short mode. If the path
8763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8764  # take no chances and rewrite it.
8765  # Note: m4 eats our [], so we need to use [ and ] instead.
8766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8767  if test "x$has_forbidden_chars" != x; then
8768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8772      # Going to short mode and back again did indeed matter. Since short mode is
8773      # case insensitive, let's make it lowercase to improve readability.
8774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8775      # Now convert it back to Unix-stile (cygpath)
8776      input_path=`$CYGPATH -u "$shortmode_path"`
8777      new_path="$input_path"
8778    fi
8779  fi
8780
8781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8782  if test "x$test_cygdrive_prefix" = x; then
8783    # As a simple fix, exclude /usr/bin since it's not a real path.
8784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8786      # a path prefixed by /cygdrive for fixpath to work.
8787      new_path="$CYGWIN_ROOT_PATH$input_path"
8788    fi
8789  fi
8790
8791  # remove trailing .exe if any
8792  new_path="${new_path/%.exe/}"
8793
8794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8795
8796  # First separate the path from the arguments. This will split at the first
8797  # space.
8798  complete="$FOUND_MAKE"
8799  path="${complete%% *}"
8800  tmp="$complete EOL"
8801  arguments="${tmp#* }"
8802
8803  # Input might be given as Windows format, start by converting to
8804  # unix format.
8805  new_path="$path"
8806
8807  windows_path="$new_path"
8808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8809    unix_path=`$CYGPATH -u "$windows_path"`
8810    new_path="$unix_path"
8811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8813    new_path="$unix_path"
8814  fi
8815
8816
8817  # Now try to locate executable using which
8818  new_path=`$WHICH "$new_path" 2> /dev/null`
8819
8820  if test "x$new_path" = x; then
8821    # Oops. Which didn't find the executable.
8822    # The splitting of arguments from the executable at a space might have been incorrect,
8823    # since paths with space are more likely in Windows. Give it another try with the whole
8824    # argument.
8825    path="$complete"
8826    arguments="EOL"
8827    new_path="$path"
8828
8829  windows_path="$new_path"
8830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8831    unix_path=`$CYGPATH -u "$windows_path"`
8832    new_path="$unix_path"
8833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8835    new_path="$unix_path"
8836  fi
8837
8838
8839    new_path=`$WHICH "$new_path" 2> /dev/null`
8840
8841    if test "x$new_path" = x; then
8842      # It's still not found. Now this is an unrecoverable error.
8843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8844$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8845      has_space=`$ECHO "$complete" | $GREP " "`
8846      if test "x$has_space" != x; then
8847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8849      fi
8850      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8851    fi
8852  fi
8853
8854  # Now new_path has a complete unix path to the binary
8855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8856    # Keep paths in /bin as-is, but remove trailing .exe if any
8857    new_path="${new_path/%.exe/}"
8858    # Do not save /bin paths to all_fixpath_prefixes!
8859  else
8860    # Not in mixed or Windows style, start by that.
8861    new_path=`cmd //c echo $new_path`
8862
8863  input_path="$new_path"
8864  # Check if we need to convert this using DOS-style short mode. If the path
8865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8866  # take no chances and rewrite it.
8867  # Note: m4 eats our [], so we need to use [ and ] instead.
8868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8869  if test "x$has_forbidden_chars" != x; then
8870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8872  fi
8873
8874    # Output is in $new_path
8875
8876  windows_path="$new_path"
8877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8878    unix_path=`$CYGPATH -u "$windows_path"`
8879    new_path="$unix_path"
8880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8882    new_path="$unix_path"
8883  fi
8884
8885    # remove trailing .exe if any
8886    new_path="${new_path/%.exe/}"
8887
8888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8890  fi
8891
8892  else
8893    # We're on a posix platform. Hooray! :)
8894    # First separate the path from the arguments. This will split at the first
8895    # space.
8896    complete="$FOUND_MAKE"
8897    path="${complete%% *}"
8898    tmp="$complete EOL"
8899    arguments="${tmp#* }"
8900
8901    # Cannot rely on the command "which" here since it doesn't always work.
8902    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8903    if test -z "$is_absolute_path"; then
8904      # Path to executable is not absolute. Find it.
8905      IFS_save="$IFS"
8906      IFS=:
8907      for p in $PATH; do
8908        if test -f "$p/$path" && test -x "$p/$path"; then
8909          new_path="$p/$path"
8910          break
8911        fi
8912      done
8913      IFS="$IFS_save"
8914    else
8915      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8916$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8917      new_path="$path"
8918    fi
8919
8920    if test "x$new_path" = x; then
8921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8922$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8923        has_space=`$ECHO "$complete" | $GREP " "`
8924        if test "x$has_space" != x; then
8925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8927        fi
8928        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8929      fi
8930  fi
8931
8932      # Now join together the path and the arguments once again
8933      if test "x$arguments" != xEOL; then
8934        new_complete="$new_path ${arguments% *}"
8935      else
8936        new_complete="$new_path"
8937      fi
8938
8939  if test "x$complete" != "x$new_complete"; then
8940      FOUND_MAKE="$new_complete"
8941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8942$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8943    fi
8944
8945        fi
8946      fi
8947    fi
8948  fi
8949
8950    fi
8951
8952    if test "x$FOUND_MAKE" = x; then
8953      if test "x$TOOLS_DIR" != x; then
8954        # We have a tools-dir, check that as well before giving up.
8955        OLD_PATH=$PATH
8956        PATH=$TOOLS_DIR:$PATH
8957        for ac_prog in gmake
8958do
8959  # Extract the first word of "$ac_prog", so it can be a program name with args.
8960set dummy $ac_prog; ac_word=$2
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8962$as_echo_n "checking for $ac_word... " >&6; }
8963if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8964  $as_echo_n "(cached) " >&6
8965else
8966  case $CHECK_TOOLSDIR_GMAKE in
8967  [\\/]* | ?:[\\/]*)
8968  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8969  ;;
8970  *)
8971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8972for as_dir in $PATH
8973do
8974  IFS=$as_save_IFS
8975  test -z "$as_dir" && as_dir=.
8976    for ac_exec_ext in '' $ac_executable_extensions; do
8977  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8978    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8980    break 2
8981  fi
8982done
8983  done
8984IFS=$as_save_IFS
8985
8986  ;;
8987esac
8988fi
8989CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8990if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8992$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8993else
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8995$as_echo "no" >&6; }
8996fi
8997
8998
8999  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9000done
9001
9002
9003  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9004  DESCRIPTION="gmake in tools-dir"
9005  if test "x$MAKE_CANDIDATE" != x; then
9006    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9007$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9008    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9009    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9010    if test "x$IS_GNU_MAKE" = x; then
9011      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9012$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9013    else
9014      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9015      if test "x$IS_MODERN_MAKE" = x; then
9016        { $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
9017$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;}
9018      else
9019        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9020          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9021            MAKE_EXPECTED_ENV='cygwin'
9022          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9023            MAKE_EXPECTED_ENV='msys'
9024          else
9025            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9026          fi
9027          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9028          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9029        else
9030          # Not relevant for non-Windows
9031          IS_MAKE_CORRECT_ENV=true
9032        fi
9033        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9034          { $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
9035$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;}
9036        else
9037          FOUND_MAKE=$MAKE_CANDIDATE
9038
9039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9040
9041  # First separate the path from the arguments. This will split at the first
9042  # space.
9043  complete="$FOUND_MAKE"
9044  path="${complete%% *}"
9045  tmp="$complete EOL"
9046  arguments="${tmp#* }"
9047
9048  # Input might be given as Windows format, start by converting to
9049  # unix format.
9050  new_path=`$CYGPATH -u "$path"`
9051
9052  # Now try to locate executable using which
9053  new_path=`$WHICH "$new_path" 2> /dev/null`
9054  # bat and cmd files are not always considered executable in cygwin causing which
9055  # to not find them
9056  if test "x$new_path" = x \
9057           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9058           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9059    new_path=`$CYGPATH -u "$path"`
9060  fi
9061  if test "x$new_path" = x; then
9062    # Oops. Which didn't find the executable.
9063    # The splitting of arguments from the executable at a space might have been incorrect,
9064    # since paths with space are more likely in Windows. Give it another try with the whole
9065    # argument.
9066    path="$complete"
9067    arguments="EOL"
9068    new_path=`$CYGPATH -u "$path"`
9069    new_path=`$WHICH "$new_path" 2> /dev/null`
9070    # bat and cmd files are not always considered executable in cygwin causing which
9071    # to not find them
9072    if test "x$new_path" = x \
9073             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9074             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9075      new_path=`$CYGPATH -u "$path"`
9076    fi
9077    if test "x$new_path" = x; then
9078      # It's still not found. Now this is an unrecoverable error.
9079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9081      has_space=`$ECHO "$complete" | $GREP " "`
9082      if test "x$has_space" != x; then
9083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9085      fi
9086      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9087    fi
9088  fi
9089
9090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9093  # "foo.exe" is OK but "foo" is an error.
9094  #
9095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9096  # It is also a way to make sure we got the proper file name for the real test later on.
9097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9098  if test "x$test_shortpath" = x; then
9099    # Short path failed, file does not exist as specified.
9100    # Try adding .exe or .cmd
9101    if test -f "${new_path}.exe"; then
9102       input_to_shortpath="${new_path}.exe"
9103    elif test -f "${new_path}.cmd"; then
9104       input_to_shortpath="${new_path}.cmd"
9105    else
9106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9107$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9110      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9111    fi
9112  else
9113    input_to_shortpath="$new_path"
9114  fi
9115
9116  # Call helper function which possibly converts this using DOS-style short mode.
9117  # If so, the updated path is stored in $new_path.
9118  new_path="$input_to_shortpath"
9119
9120  input_path="$input_to_shortpath"
9121  # Check if we need to convert this using DOS-style short mode. If the path
9122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9123  # take no chances and rewrite it.
9124  # Note: m4 eats our [], so we need to use [ and ] instead.
9125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9126  if test "x$has_forbidden_chars" != x; then
9127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9131      # Going to short mode and back again did indeed matter. Since short mode is
9132      # case insensitive, let's make it lowercase to improve readability.
9133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9134      # Now convert it back to Unix-stile (cygpath)
9135      input_path=`$CYGPATH -u "$shortmode_path"`
9136      new_path="$input_path"
9137    fi
9138  fi
9139
9140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9141  if test "x$test_cygdrive_prefix" = x; then
9142    # As a simple fix, exclude /usr/bin since it's not a real path.
9143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9145      # a path prefixed by /cygdrive for fixpath to work.
9146      new_path="$CYGWIN_ROOT_PATH$input_path"
9147    fi
9148  fi
9149
9150  # remove trailing .exe if any
9151  new_path="${new_path/%.exe/}"
9152
9153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9154
9155  # First separate the path from the arguments. This will split at the first
9156  # space.
9157  complete="$FOUND_MAKE"
9158  path="${complete%% *}"
9159  tmp="$complete EOL"
9160  arguments="${tmp#* }"
9161
9162  # Input might be given as Windows format, start by converting to
9163  # unix format.
9164  new_path="$path"
9165
9166  windows_path="$new_path"
9167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9168    unix_path=`$CYGPATH -u "$windows_path"`
9169    new_path="$unix_path"
9170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9172    new_path="$unix_path"
9173  fi
9174
9175
9176  # Now try to locate executable using which
9177  new_path=`$WHICH "$new_path" 2> /dev/null`
9178
9179  if test "x$new_path" = x; then
9180    # Oops. Which didn't find the executable.
9181    # The splitting of arguments from the executable at a space might have been incorrect,
9182    # since paths with space are more likely in Windows. Give it another try with the whole
9183    # argument.
9184    path="$complete"
9185    arguments="EOL"
9186    new_path="$path"
9187
9188  windows_path="$new_path"
9189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9190    unix_path=`$CYGPATH -u "$windows_path"`
9191    new_path="$unix_path"
9192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9194    new_path="$unix_path"
9195  fi
9196
9197
9198    new_path=`$WHICH "$new_path" 2> /dev/null`
9199
9200    if test "x$new_path" = x; then
9201      # It's still not found. Now this is an unrecoverable error.
9202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9204      has_space=`$ECHO "$complete" | $GREP " "`
9205      if test "x$has_space" != x; then
9206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9208      fi
9209      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9210    fi
9211  fi
9212
9213  # Now new_path has a complete unix path to the binary
9214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9215    # Keep paths in /bin as-is, but remove trailing .exe if any
9216    new_path="${new_path/%.exe/}"
9217    # Do not save /bin paths to all_fixpath_prefixes!
9218  else
9219    # Not in mixed or Windows style, start by that.
9220    new_path=`cmd //c echo $new_path`
9221
9222  input_path="$new_path"
9223  # Check if we need to convert this using DOS-style short mode. If the path
9224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9225  # take no chances and rewrite it.
9226  # Note: m4 eats our [], so we need to use [ and ] instead.
9227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9228  if test "x$has_forbidden_chars" != x; then
9229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9231  fi
9232
9233    # Output is in $new_path
9234
9235  windows_path="$new_path"
9236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9237    unix_path=`$CYGPATH -u "$windows_path"`
9238    new_path="$unix_path"
9239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9241    new_path="$unix_path"
9242  fi
9243
9244    # remove trailing .exe if any
9245    new_path="${new_path/%.exe/}"
9246
9247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9249  fi
9250
9251  else
9252    # We're on a posix platform. Hooray! :)
9253    # First separate the path from the arguments. This will split at the first
9254    # space.
9255    complete="$FOUND_MAKE"
9256    path="${complete%% *}"
9257    tmp="$complete EOL"
9258    arguments="${tmp#* }"
9259
9260    # Cannot rely on the command "which" here since it doesn't always work.
9261    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9262    if test -z "$is_absolute_path"; then
9263      # Path to executable is not absolute. Find it.
9264      IFS_save="$IFS"
9265      IFS=:
9266      for p in $PATH; do
9267        if test -f "$p/$path" && test -x "$p/$path"; then
9268          new_path="$p/$path"
9269          break
9270        fi
9271      done
9272      IFS="$IFS_save"
9273    else
9274      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9275$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9276      new_path="$path"
9277    fi
9278
9279    if test "x$new_path" = x; then
9280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9282        has_space=`$ECHO "$complete" | $GREP " "`
9283        if test "x$has_space" != x; then
9284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9286        fi
9287        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9288      fi
9289  fi
9290
9291      # Now join together the path and the arguments once again
9292      if test "x$arguments" != xEOL; then
9293        new_complete="$new_path ${arguments% *}"
9294      else
9295        new_complete="$new_path"
9296      fi
9297
9298  if test "x$complete" != "x$new_complete"; then
9299      FOUND_MAKE="$new_complete"
9300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9301$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9302    fi
9303
9304        fi
9305      fi
9306    fi
9307  fi
9308
9309        if test "x$FOUND_MAKE" = x; then
9310          for ac_prog in make
9311do
9312  # Extract the first word of "$ac_prog", so it can be a program name with args.
9313set dummy $ac_prog; ac_word=$2
9314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9315$as_echo_n "checking for $ac_word... " >&6; }
9316if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9317  $as_echo_n "(cached) " >&6
9318else
9319  case $CHECK_TOOLSDIR_MAKE in
9320  [\\/]* | ?:[\\/]*)
9321  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9322  ;;
9323  *)
9324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9325for as_dir in $PATH
9326do
9327  IFS=$as_save_IFS
9328  test -z "$as_dir" && as_dir=.
9329    for ac_exec_ext in '' $ac_executable_extensions; do
9330  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9331    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9333    break 2
9334  fi
9335done
9336  done
9337IFS=$as_save_IFS
9338
9339  ;;
9340esac
9341fi
9342CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9343if test -n "$CHECK_TOOLSDIR_MAKE"; then
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9345$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9346else
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348$as_echo "no" >&6; }
9349fi
9350
9351
9352  test -n "$CHECK_TOOLSDIR_MAKE" && break
9353done
9354
9355
9356  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9357  DESCRIPTION="make in tools-dir"
9358  if test "x$MAKE_CANDIDATE" != x; then
9359    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9360$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9361    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9362    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9363    if test "x$IS_GNU_MAKE" = x; then
9364      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9365$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9366    else
9367      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9368      if test "x$IS_MODERN_MAKE" = x; then
9369        { $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
9370$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;}
9371      else
9372        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9373          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9374            MAKE_EXPECTED_ENV='cygwin'
9375          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9376            MAKE_EXPECTED_ENV='msys'
9377          else
9378            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9379          fi
9380          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9381          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9382        else
9383          # Not relevant for non-Windows
9384          IS_MAKE_CORRECT_ENV=true
9385        fi
9386        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9387          { $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
9388$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;}
9389        else
9390          FOUND_MAKE=$MAKE_CANDIDATE
9391
9392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9393
9394  # First separate the path from the arguments. This will split at the first
9395  # space.
9396  complete="$FOUND_MAKE"
9397  path="${complete%% *}"
9398  tmp="$complete EOL"
9399  arguments="${tmp#* }"
9400
9401  # Input might be given as Windows format, start by converting to
9402  # unix format.
9403  new_path=`$CYGPATH -u "$path"`
9404
9405  # Now try to locate executable using which
9406  new_path=`$WHICH "$new_path" 2> /dev/null`
9407  # bat and cmd files are not always considered executable in cygwin causing which
9408  # to not find them
9409  if test "x$new_path" = x \
9410           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9411           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9412    new_path=`$CYGPATH -u "$path"`
9413  fi
9414  if test "x$new_path" = x; then
9415    # Oops. Which didn't find the executable.
9416    # The splitting of arguments from the executable at a space might have been incorrect,
9417    # since paths with space are more likely in Windows. Give it another try with the whole
9418    # argument.
9419    path="$complete"
9420    arguments="EOL"
9421    new_path=`$CYGPATH -u "$path"`
9422    new_path=`$WHICH "$new_path" 2> /dev/null`
9423    # bat and cmd files are not always considered executable in cygwin causing which
9424    # to not find them
9425    if test "x$new_path" = x \
9426             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9427             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9428      new_path=`$CYGPATH -u "$path"`
9429    fi
9430    if test "x$new_path" = x; then
9431      # It's still not found. Now this is an unrecoverable error.
9432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9433$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9434      has_space=`$ECHO "$complete" | $GREP " "`
9435      if test "x$has_space" != x; then
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9438      fi
9439      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9440    fi
9441  fi
9442
9443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9446  # "foo.exe" is OK but "foo" is an error.
9447  #
9448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9449  # It is also a way to make sure we got the proper file name for the real test later on.
9450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9451  if test "x$test_shortpath" = x; then
9452    # Short path failed, file does not exist as specified.
9453    # Try adding .exe or .cmd
9454    if test -f "${new_path}.exe"; then
9455       input_to_shortpath="${new_path}.exe"
9456    elif test -f "${new_path}.cmd"; then
9457       input_to_shortpath="${new_path}.cmd"
9458    else
9459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9460$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9461      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9462$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9463      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9464    fi
9465  else
9466    input_to_shortpath="$new_path"
9467  fi
9468
9469  # Call helper function which possibly converts this using DOS-style short mode.
9470  # If so, the updated path is stored in $new_path.
9471  new_path="$input_to_shortpath"
9472
9473  input_path="$input_to_shortpath"
9474  # Check if we need to convert this using DOS-style short mode. If the path
9475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9476  # take no chances and rewrite it.
9477  # Note: m4 eats our [], so we need to use [ and ] instead.
9478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9479  if test "x$has_forbidden_chars" != x; then
9480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9484      # Going to short mode and back again did indeed matter. Since short mode is
9485      # case insensitive, let's make it lowercase to improve readability.
9486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9487      # Now convert it back to Unix-stile (cygpath)
9488      input_path=`$CYGPATH -u "$shortmode_path"`
9489      new_path="$input_path"
9490    fi
9491  fi
9492
9493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9494  if test "x$test_cygdrive_prefix" = x; then
9495    # As a simple fix, exclude /usr/bin since it's not a real path.
9496    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9498      # a path prefixed by /cygdrive for fixpath to work.
9499      new_path="$CYGWIN_ROOT_PATH$input_path"
9500    fi
9501  fi
9502
9503  # remove trailing .exe if any
9504  new_path="${new_path/%.exe/}"
9505
9506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9507
9508  # First separate the path from the arguments. This will split at the first
9509  # space.
9510  complete="$FOUND_MAKE"
9511  path="${complete%% *}"
9512  tmp="$complete EOL"
9513  arguments="${tmp#* }"
9514
9515  # Input might be given as Windows format, start by converting to
9516  # unix format.
9517  new_path="$path"
9518
9519  windows_path="$new_path"
9520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9521    unix_path=`$CYGPATH -u "$windows_path"`
9522    new_path="$unix_path"
9523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9525    new_path="$unix_path"
9526  fi
9527
9528
9529  # Now try to locate executable using which
9530  new_path=`$WHICH "$new_path" 2> /dev/null`
9531
9532  if test "x$new_path" = x; then
9533    # Oops. Which didn't find the executable.
9534    # The splitting of arguments from the executable at a space might have been incorrect,
9535    # since paths with space are more likely in Windows. Give it another try with the whole
9536    # argument.
9537    path="$complete"
9538    arguments="EOL"
9539    new_path="$path"
9540
9541  windows_path="$new_path"
9542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9543    unix_path=`$CYGPATH -u "$windows_path"`
9544    new_path="$unix_path"
9545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9547    new_path="$unix_path"
9548  fi
9549
9550
9551    new_path=`$WHICH "$new_path" 2> /dev/null`
9552
9553    if test "x$new_path" = x; then
9554      # It's still not found. Now this is an unrecoverable error.
9555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9556$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9557      has_space=`$ECHO "$complete" | $GREP " "`
9558      if test "x$has_space" != x; then
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9561      fi
9562      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9563    fi
9564  fi
9565
9566  # Now new_path has a complete unix path to the binary
9567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9568    # Keep paths in /bin as-is, but remove trailing .exe if any
9569    new_path="${new_path/%.exe/}"
9570    # Do not save /bin paths to all_fixpath_prefixes!
9571  else
9572    # Not in mixed or Windows style, start by that.
9573    new_path=`cmd //c echo $new_path`
9574
9575  input_path="$new_path"
9576  # Check if we need to convert this using DOS-style short mode. If the path
9577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9578  # take no chances and rewrite it.
9579  # Note: m4 eats our [], so we need to use [ and ] instead.
9580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9581  if test "x$has_forbidden_chars" != x; then
9582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9584  fi
9585
9586    # Output is in $new_path
9587
9588  windows_path="$new_path"
9589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9590    unix_path=`$CYGPATH -u "$windows_path"`
9591    new_path="$unix_path"
9592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9594    new_path="$unix_path"
9595  fi
9596
9597    # remove trailing .exe if any
9598    new_path="${new_path/%.exe/}"
9599
9600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9602  fi
9603
9604  else
9605    # We're on a posix platform. Hooray! :)
9606    # First separate the path from the arguments. This will split at the first
9607    # space.
9608    complete="$FOUND_MAKE"
9609    path="${complete%% *}"
9610    tmp="$complete EOL"
9611    arguments="${tmp#* }"
9612
9613    # Cannot rely on the command "which" here since it doesn't always work.
9614    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9615    if test -z "$is_absolute_path"; then
9616      # Path to executable is not absolute. Find it.
9617      IFS_save="$IFS"
9618      IFS=:
9619      for p in $PATH; do
9620        if test -f "$p/$path" && test -x "$p/$path"; then
9621          new_path="$p/$path"
9622          break
9623        fi
9624      done
9625      IFS="$IFS_save"
9626    else
9627      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9628$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9629      new_path="$path"
9630    fi
9631
9632    if test "x$new_path" = x; then
9633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9634$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9635        has_space=`$ECHO "$complete" | $GREP " "`
9636        if test "x$has_space" != x; then
9637          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9638$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9639        fi
9640        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9641      fi
9642  fi
9643
9644      # Now join together the path and the arguments once again
9645      if test "x$arguments" != xEOL; then
9646        new_complete="$new_path ${arguments% *}"
9647      else
9648        new_complete="$new_path"
9649      fi
9650
9651  if test "x$complete" != "x$new_complete"; then
9652      FOUND_MAKE="$new_complete"
9653      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9654$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9655    fi
9656
9657        fi
9658      fi
9659    fi
9660  fi
9661
9662        fi
9663        PATH=$OLD_PATH
9664      fi
9665    fi
9666
9667    if test "x$FOUND_MAKE" = x; then
9668      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
9669    fi
9670  fi
9671
9672  MAKE=$FOUND_MAKE
9673
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9675$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9676
9677
9678
9679    # Test if find supports -delete
9680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9681$as_echo_n "checking if find supports -delete... " >&6; }
9682    FIND_DELETE="-delete"
9683
9684    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9685
9686    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9687
9688    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9689    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9690        # No, it does not.
9691        rm $DELETEDIR/TestIfFindSupportsDelete
9692        FIND_DELETE="-exec rm \{\} \+"
9693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9694$as_echo "no" >&6; }
9695    else
9696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9697$as_echo "yes" >&6; }
9698    fi
9699    rmdir $DELETEDIR
9700
9701
9702
9703# These tools might not be installed by default,
9704# need hint on how to install them.
9705
9706    for ac_prog in unzip
9707do
9708  # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if test "${ac_cv_path_UNZIP+set}" = set; then :
9713  $as_echo_n "(cached) " >&6
9714else
9715  case $UNZIP in
9716  [\\/]* | ?:[\\/]*)
9717  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9718  ;;
9719  *)
9720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721for as_dir in $PATH
9722do
9723  IFS=$as_save_IFS
9724  test -z "$as_dir" && as_dir=.
9725    for ac_exec_ext in '' $ac_executable_extensions; do
9726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9727    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729    break 2
9730  fi
9731done
9732  done
9733IFS=$as_save_IFS
9734
9735  ;;
9736esac
9737fi
9738UNZIP=$ac_cv_path_UNZIP
9739if test -n "$UNZIP"; then
9740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9741$as_echo "$UNZIP" >&6; }
9742else
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
9745fi
9746
9747
9748  test -n "$UNZIP" && break
9749done
9750
9751
9752    if test "x$UNZIP" = x; then
9753        if test "xunzip" = x; then
9754          PROG_NAME=unzip
9755        else
9756          PROG_NAME=unzip
9757        fi
9758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9760        as_fn_error $? "Cannot continue" "$LINENO" 5
9761    fi
9762
9763
9764
9765    for ac_prog in zip
9766do
9767  # Extract the first word of "$ac_prog", so it can be a program name with args.
9768set dummy $ac_prog; ac_word=$2
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9770$as_echo_n "checking for $ac_word... " >&6; }
9771if test "${ac_cv_path_ZIP+set}" = set; then :
9772  $as_echo_n "(cached) " >&6
9773else
9774  case $ZIP in
9775  [\\/]* | ?:[\\/]*)
9776  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9777  ;;
9778  *)
9779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9780for as_dir in $PATH
9781do
9782  IFS=$as_save_IFS
9783  test -z "$as_dir" && as_dir=.
9784    for ac_exec_ext in '' $ac_executable_extensions; do
9785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9786    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9788    break 2
9789  fi
9790done
9791  done
9792IFS=$as_save_IFS
9793
9794  ;;
9795esac
9796fi
9797ZIP=$ac_cv_path_ZIP
9798if test -n "$ZIP"; then
9799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9800$as_echo "$ZIP" >&6; }
9801else
9802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9803$as_echo "no" >&6; }
9804fi
9805
9806
9807  test -n "$ZIP" && break
9808done
9809
9810
9811    if test "x$ZIP" = x; then
9812        if test "xzip" = x; then
9813          PROG_NAME=zip
9814        else
9815          PROG_NAME=zip
9816        fi
9817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9818$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9819        as_fn_error $? "Cannot continue" "$LINENO" 5
9820    fi
9821
9822
9823
9824# Non-required basic tools
9825
9826# Extract the first word of "ldd", so it can be a program name with args.
9827set dummy ldd; ac_word=$2
9828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9829$as_echo_n "checking for $ac_word... " >&6; }
9830if test "${ac_cv_path_LDD+set}" = set; then :
9831  $as_echo_n "(cached) " >&6
9832else
9833  case $LDD in
9834  [\\/]* | ?:[\\/]*)
9835  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9836  ;;
9837  *)
9838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9839for as_dir in $PATH
9840do
9841  IFS=$as_save_IFS
9842  test -z "$as_dir" && as_dir=.
9843    for ac_exec_ext in '' $ac_executable_extensions; do
9844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9845    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9847    break 2
9848  fi
9849done
9850  done
9851IFS=$as_save_IFS
9852
9853  ;;
9854esac
9855fi
9856LDD=$ac_cv_path_LDD
9857if test -n "$LDD"; then
9858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9859$as_echo "$LDD" >&6; }
9860else
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9862$as_echo "no" >&6; }
9863fi
9864
9865
9866if test "x$LDD" = "x"; then
9867    # List shared lib dependencies is used for
9868    # debug output and checking for forbidden dependencies.
9869    # We can build without it.
9870    LDD="true"
9871fi
9872# Extract the first word of "otool", so it can be a program name with args.
9873set dummy otool; ac_word=$2
9874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9875$as_echo_n "checking for $ac_word... " >&6; }
9876if test "${ac_cv_path_OTOOL+set}" = set; then :
9877  $as_echo_n "(cached) " >&6
9878else
9879  case $OTOOL in
9880  [\\/]* | ?:[\\/]*)
9881  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9882  ;;
9883  *)
9884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9885for as_dir in $PATH
9886do
9887  IFS=$as_save_IFS
9888  test -z "$as_dir" && as_dir=.
9889    for ac_exec_ext in '' $ac_executable_extensions; do
9890  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9891    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9893    break 2
9894  fi
9895done
9896  done
9897IFS=$as_save_IFS
9898
9899  ;;
9900esac
9901fi
9902OTOOL=$ac_cv_path_OTOOL
9903if test -n "$OTOOL"; then
9904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9905$as_echo "$OTOOL" >&6; }
9906else
9907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9908$as_echo "no" >&6; }
9909fi
9910
9911
9912if test "x$OTOOL" = "x"; then
9913   OTOOL="true"
9914fi
9915for ac_prog in readelf greadelf
9916do
9917  # Extract the first word of "$ac_prog", so it can be a program name with args.
9918set dummy $ac_prog; ac_word=$2
9919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9920$as_echo_n "checking for $ac_word... " >&6; }
9921if test "${ac_cv_path_READELF+set}" = set; then :
9922  $as_echo_n "(cached) " >&6
9923else
9924  case $READELF in
9925  [\\/]* | ?:[\\/]*)
9926  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9927  ;;
9928  *)
9929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9930for as_dir in $PATH
9931do
9932  IFS=$as_save_IFS
9933  test -z "$as_dir" && as_dir=.
9934    for ac_exec_ext in '' $ac_executable_extensions; do
9935  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9936    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9938    break 2
9939  fi
9940done
9941  done
9942IFS=$as_save_IFS
9943
9944  ;;
9945esac
9946fi
9947READELF=$ac_cv_path_READELF
9948if test -n "$READELF"; then
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9950$as_echo "$READELF" >&6; }
9951else
9952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
9954fi
9955
9956
9957  test -n "$READELF" && break
9958done
9959
9960# Extract the first word of "hg", so it can be a program name with args.
9961set dummy hg; ac_word=$2
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9963$as_echo_n "checking for $ac_word... " >&6; }
9964if test "${ac_cv_path_HG+set}" = set; then :
9965  $as_echo_n "(cached) " >&6
9966else
9967  case $HG in
9968  [\\/]* | ?:[\\/]*)
9969  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9970  ;;
9971  *)
9972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9973for as_dir in $PATH
9974do
9975  IFS=$as_save_IFS
9976  test -z "$as_dir" && as_dir=.
9977    for ac_exec_ext in '' $ac_executable_extensions; do
9978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9979    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9981    break 2
9982  fi
9983done
9984  done
9985IFS=$as_save_IFS
9986
9987  ;;
9988esac
9989fi
9990HG=$ac_cv_path_HG
9991if test -n "$HG"; then
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9993$as_echo "$HG" >&6; }
9994else
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
9997fi
9998
9999
10000# Extract the first word of "stat", so it can be a program name with args.
10001set dummy stat; ac_word=$2
10002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10003$as_echo_n "checking for $ac_word... " >&6; }
10004if test "${ac_cv_path_STAT+set}" = set; then :
10005  $as_echo_n "(cached) " >&6
10006else
10007  case $STAT in
10008  [\\/]* | ?:[\\/]*)
10009  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10010  ;;
10011  *)
10012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10013for as_dir in $PATH
10014do
10015  IFS=$as_save_IFS
10016  test -z "$as_dir" && as_dir=.
10017    for ac_exec_ext in '' $ac_executable_extensions; do
10018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10019    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10021    break 2
10022  fi
10023done
10024  done
10025IFS=$as_save_IFS
10026
10027  ;;
10028esac
10029fi
10030STAT=$ac_cv_path_STAT
10031if test -n "$STAT"; then
10032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10033$as_echo "$STAT" >&6; }
10034else
10035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10036$as_echo "no" >&6; }
10037fi
10038
10039
10040# Extract the first word of "time", so it can be a program name with args.
10041set dummy time; ac_word=$2
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10043$as_echo_n "checking for $ac_word... " >&6; }
10044if test "${ac_cv_path_TIME+set}" = set; then :
10045  $as_echo_n "(cached) " >&6
10046else
10047  case $TIME in
10048  [\\/]* | ?:[\\/]*)
10049  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10050  ;;
10051  *)
10052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10053for as_dir in $PATH
10054do
10055  IFS=$as_save_IFS
10056  test -z "$as_dir" && as_dir=.
10057    for ac_exec_ext in '' $ac_executable_extensions; do
10058  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10059    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10061    break 2
10062  fi
10063done
10064  done
10065IFS=$as_save_IFS
10066
10067  ;;
10068esac
10069fi
10070TIME=$ac_cv_path_TIME
10071if test -n "$TIME"; then
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10073$as_echo "$TIME" >&6; }
10074else
10075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10076$as_echo "no" >&6; }
10077fi
10078
10079
10080
10081if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10082
10083    for ac_prog in comm
10084do
10085  # Extract the first word of "$ac_prog", so it can be a program name with args.
10086set dummy $ac_prog; ac_word=$2
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10088$as_echo_n "checking for $ac_word... " >&6; }
10089if test "${ac_cv_path_COMM+set}" = set; then :
10090  $as_echo_n "(cached) " >&6
10091else
10092  case $COMM in
10093  [\\/]* | ?:[\\/]*)
10094  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10095  ;;
10096  *)
10097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10098for as_dir in $PATH
10099do
10100  IFS=$as_save_IFS
10101  test -z "$as_dir" && as_dir=.
10102    for ac_exec_ext in '' $ac_executable_extensions; do
10103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10104    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10106    break 2
10107  fi
10108done
10109  done
10110IFS=$as_save_IFS
10111
10112  ;;
10113esac
10114fi
10115COMM=$ac_cv_path_COMM
10116if test -n "$COMM"; then
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10118$as_echo "$COMM" >&6; }
10119else
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
10125  test -n "$COMM" && break
10126done
10127
10128
10129    if test "x$COMM" = x; then
10130        if test "xcomm" = x; then
10131          PROG_NAME=comm
10132        else
10133          PROG_NAME=comm
10134        fi
10135        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10136$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10137        as_fn_error $? "Cannot continue" "$LINENO" 5
10138    fi
10139
10140
10141fi
10142
10143
10144# Check if pkg-config is available.
10145
10146
10147if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10148	if test -n "$ac_tool_prefix"; then
10149  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10150set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152$as_echo_n "checking for $ac_word... " >&6; }
10153if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10154  $as_echo_n "(cached) " >&6
10155else
10156  case $PKG_CONFIG in
10157  [\\/]* | ?:[\\/]*)
10158  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10159  ;;
10160  *)
10161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162for as_dir in $PATH
10163do
10164  IFS=$as_save_IFS
10165  test -z "$as_dir" && as_dir=.
10166    for ac_exec_ext in '' $ac_executable_extensions; do
10167  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10168    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170    break 2
10171  fi
10172done
10173  done
10174IFS=$as_save_IFS
10175
10176  ;;
10177esac
10178fi
10179PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10180if test -n "$PKG_CONFIG"; then
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10182$as_echo "$PKG_CONFIG" >&6; }
10183else
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
10186fi
10187
10188
10189fi
10190if test -z "$ac_cv_path_PKG_CONFIG"; then
10191  ac_pt_PKG_CONFIG=$PKG_CONFIG
10192  # Extract the first word of "pkg-config", so it can be a program name with args.
10193set dummy pkg-config; ac_word=$2
10194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10195$as_echo_n "checking for $ac_word... " >&6; }
10196if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10197  $as_echo_n "(cached) " >&6
10198else
10199  case $ac_pt_PKG_CONFIG in
10200  [\\/]* | ?:[\\/]*)
10201  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10202  ;;
10203  *)
10204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10205for as_dir in $PATH
10206do
10207  IFS=$as_save_IFS
10208  test -z "$as_dir" && as_dir=.
10209    for ac_exec_ext in '' $ac_executable_extensions; do
10210  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10211    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10213    break 2
10214  fi
10215done
10216  done
10217IFS=$as_save_IFS
10218
10219  ;;
10220esac
10221fi
10222ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10223if test -n "$ac_pt_PKG_CONFIG"; then
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10225$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10226else
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228$as_echo "no" >&6; }
10229fi
10230
10231  if test "x$ac_pt_PKG_CONFIG" = x; then
10232    PKG_CONFIG=""
10233  else
10234    case $cross_compiling:$ac_tool_warned in
10235yes:)
10236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10238ac_tool_warned=yes ;;
10239esac
10240    PKG_CONFIG=$ac_pt_PKG_CONFIG
10241  fi
10242else
10243  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10244fi
10245
10246fi
10247if test -n "$PKG_CONFIG"; then
10248	_pkg_min_version=0.9.0
10249	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10250$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10251	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10252		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10253$as_echo "yes" >&6; }
10254	else
10255		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
10257		PKG_CONFIG=""
10258	fi
10259
10260fi
10261
10262# After basic tools have been setup, we can check build os specific details.
10263
10264###############################################################################
10265
10266# Note that this is the build platform OS version!
10267
10268OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10269OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10270OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10271OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10272
10273
10274
10275
10276
10277# Setup builddeps, for automatic downloading of tools we need.
10278# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10279# boot-jdk setup, but we need to have basic tools setup first.
10280
10281
10282# Check whether --with-builddeps-conf was given.
10283if test "${with_builddeps_conf+set}" = set; then :
10284  withval=$with_builddeps_conf;
10285fi
10286
10287
10288
10289# Check whether --with-builddeps-server was given.
10290if test "${with_builddeps_server+set}" = set; then :
10291  withval=$with_builddeps_server;
10292fi
10293
10294
10295
10296# Check whether --with-builddeps-dir was given.
10297if test "${with_builddeps_dir+set}" = set; then :
10298  withval=$with_builddeps_dir;
10299else
10300  with_builddeps_dir=/localhome/builddeps
10301fi
10302
10303
10304
10305# Check whether --with-builddeps-group was given.
10306if test "${with_builddeps_group+set}" = set; then :
10307  withval=$with_builddeps_group;
10308fi
10309
10310
10311
10312
10313    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10314        if test "x$with_builddeps_conf" != x; then
10315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10316$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10317            builddepsfile=$with_builddeps_conf
10318            if test -s $builddepsfile; then
10319                . $builddepsfile
10320                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10321$as_echo "loaded!" >&6; }
10322            else
10323               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10324           fi
10325        else
10326            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10327$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10328            builddepsfile=`mktemp`
10329            touch $builddepsfile
10330            # Put all found confs into a single file.
10331            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10332            # Source the file to acquire the variables
10333            if test -s $builddepsfile; then
10334                . $builddepsfile
10335                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10336$as_echo "found at least one!" >&6; }
10337            else
10338               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10339           fi
10340        fi
10341        # Create build and target names that use _ instead of "-" and ".".
10342        # This is necessary to use them in variable names.
10343        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10344        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10345        # Extract rewrite information for build and target
10346        eval rewritten_build=\${REWRITE_${build_var}}
10347        if test "x$rewritten_build" = x; then
10348            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10349            echo Build stays the same $rewritten_build
10350        else
10351            echo Rewriting build for builddeps into $rewritten_build
10352        fi
10353        eval rewritten_target=\${REWRITE_${target_var}}
10354        if test "x$rewritten_target" = x; then
10355            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10356            echo Target stays the same $rewritten_target
10357        else
10358            echo Rewriting target for builddeps into $rewritten_target
10359        fi
10360        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10361        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10362    fi
10363    for ac_prog in 7z unzip
10364do
10365  # Extract the first word of "$ac_prog", so it can be a program name with args.
10366set dummy $ac_prog; ac_word=$2
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10368$as_echo_n "checking for $ac_word... " >&6; }
10369if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10370  $as_echo_n "(cached) " >&6
10371else
10372  if test -n "$BDEPS_UNZIP"; then
10373  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10374else
10375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10376for as_dir in $PATH
10377do
10378  IFS=$as_save_IFS
10379  test -z "$as_dir" && as_dir=.
10380    for ac_exec_ext in '' $ac_executable_extensions; do
10381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10382    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10384    break 2
10385  fi
10386done
10387  done
10388IFS=$as_save_IFS
10389
10390fi
10391fi
10392BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10393if test -n "$BDEPS_UNZIP"; then
10394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10395$as_echo "$BDEPS_UNZIP" >&6; }
10396else
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401
10402  test -n "$BDEPS_UNZIP" && break
10403done
10404
10405    if test "x$BDEPS_UNZIP" = x7z; then
10406        BDEPS_UNZIP="7z x"
10407    fi
10408
10409    for ac_prog in wget lftp ftp
10410do
10411  # Extract the first word of "$ac_prog", so it can be a program name with args.
10412set dummy $ac_prog; ac_word=$2
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414$as_echo_n "checking for $ac_word... " >&6; }
10415if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10416  $as_echo_n "(cached) " >&6
10417else
10418  if test -n "$BDEPS_FTP"; then
10419  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10420else
10421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10428    ac_cv_prog_BDEPS_FTP="$ac_prog"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436fi
10437fi
10438BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10439if test -n "$BDEPS_FTP"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10441$as_echo "$BDEPS_FTP" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447
10448  test -n "$BDEPS_FTP" && break
10449done
10450
10451
10452
10453###############################################################################
10454#
10455# Determine OpenJDK variants, options and version numbers.
10456#
10457###############################################################################
10458
10459# We need build & target for this.
10460
10461
10462###############################################################################
10463#
10464# Should we build only OpenJDK even if closed sources are present?
10465#
10466# Check whether --enable-openjdk-only was given.
10467if test "${enable_openjdk_only+set}" = set; then :
10468  enableval=$enable_openjdk_only;
10469else
10470  enable_openjdk_only="no"
10471fi
10472
10473
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10475$as_echo_n "checking for presence of closed sources... " >&6; }
10476if test -d "$SRC_ROOT/jdk/src/closed"; then
10477    CLOSED_SOURCE_PRESENT=yes
10478else
10479    CLOSED_SOURCE_PRESENT=no
10480fi
10481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10482$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10483
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10485$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10486SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10488$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10489
10490if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10491  OPENJDK=true
10492  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10493    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10494$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10495  fi
10496else
10497  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10498    OPENJDK=true
10499  else
10500    OPENJDK=false
10501  fi
10502fi
10503
10504if test "x$OPENJDK" = "xtrue"; then
10505    SET_OPENJDK="OPENJDK=true"
10506fi
10507
10508
10509
10510###############################################################################
10511#
10512# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10513# We always build headless support.
10514#
10515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10516$as_echo_n "checking headful support... " >&6; }
10517# Check whether --enable-headful was given.
10518if test "${enable_headful+set}" = set; then :
10519  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10520else
10521  SUPPORT_HEADFUL=yes
10522fi
10523
10524
10525SUPPORT_HEADLESS=yes
10526BUILD_HEADLESS="BUILD_HEADLESS:=true"
10527
10528if test "x$SUPPORT_HEADFUL" = xyes; then
10529    # We are building both headful and headless.
10530    headful_msg="inlude support for both headful and headless"
10531fi
10532
10533if test "x$SUPPORT_HEADFUL" = xno; then
10534    # Thus we are building headless only.
10535    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10536    headful_msg="headless only"
10537fi
10538
10539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10540$as_echo "$headful_msg" >&6; }
10541
10542
10543
10544
10545
10546# Control wether Hotspot runs Queens test after build.
10547# Check whether --enable-hotspot-test-in-build was given.
10548if test "${enable_hotspot_test_in_build+set}" = set; then :
10549  enableval=$enable_hotspot_test_in_build;
10550else
10551  enable_hotspot_test_in_build=no
10552fi
10553
10554if test "x$enable_hotspot_test_in_build" = "xyes"; then
10555    TEST_IN_BUILD=true
10556else
10557    TEST_IN_BUILD=false
10558fi
10559
10560
10561###############################################################################
10562#
10563# Choose cacerts source file
10564#
10565
10566# Check whether --with-cacerts-file was given.
10567if test "${with_cacerts_file+set}" = set; then :
10568  withval=$with_cacerts_file;
10569fi
10570
10571if test "x$with_cacerts_file" != x; then
10572    CACERTS_FILE=$with_cacerts_file
10573else
10574    if test "x$OPENJDK" = "xtrue"; then
10575        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10576    else
10577        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10578    fi
10579fi
10580
10581
10582###############################################################################
10583#
10584# Enable or disable unlimited crypto
10585#
10586# Check whether --enable-unlimited-crypto was given.
10587if test "${enable_unlimited_crypto+set}" = set; then :
10588  enableval=$enable_unlimited_crypto;
10589else
10590  enable_unlimited_crypto=no
10591fi
10592
10593if test "x$enable_unlimited_crypto" = "xyes"; then
10594    UNLIMITED_CRYPTO=true
10595else
10596    UNLIMITED_CRYPTO=false
10597fi
10598
10599
10600###############################################################################
10601#
10602# Compress jars
10603#
10604COMPRESS_JARS=false
10605
10606
10607
10608
10609# Source the version numbers
10610. $AUTOCONF_DIR/version.numbers
10611if test "x$OPENJDK" = "xfalse"; then
10612    . $AUTOCONF_DIR/closed.version.numbers
10613fi
10614
10615
10616# Check whether --with-milestone was given.
10617if test "${with_milestone+set}" = set; then :
10618  withval=$with_milestone;
10619fi
10620
10621if test "x$with_milestone" = xyes; then
10622    as_fn_error $? "Milestone must have a value" "$LINENO" 5
10623elif test "x$with_milestone" != x; then
10624    MILESTONE="$with_milestone"
10625else
10626    MILESTONE=internal
10627fi
10628
10629
10630# Check whether --with-build-number was given.
10631if test "${with_build_number+set}" = set; then :
10632  withval=$with_build_number;
10633fi
10634
10635if test "x$with_build_number" = xyes; then
10636    as_fn_error $? "Build number must have a value" "$LINENO" 5
10637elif test "x$with_build_number" != x; then
10638    JDK_BUILD_NUMBER="$with_build_number"
10639fi
10640
10641# Now set the JDK version, milestone, build number etc.
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656COPYRIGHT_YEAR=`date +'%Y'`
10657
10658
10659RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10660
10661
10662if test "x$JDK_UPDATE_VERSION" != x; then
10663    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10664else
10665    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10666fi
10667
10668
10669BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10670# Avoid [:alnum:] since it depends on the locale.
10671CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10672USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10673
10674
10675COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10676
10677
10678
10679###############################################################################
10680#
10681# Setup BootJDK, used to bootstrap the build.
10682#
10683###############################################################################
10684
10685
10686BOOT_JDK_FOUND=no
10687
10688# Check whether --with-boot-jdk was given.
10689if test "${with_boot_jdk+set}" = set; then :
10690  withval=$with_boot_jdk;
10691fi
10692
10693
10694# We look for the Boot JDK through various means, going from more certain to
10695# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10696# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10697# must check if this is indeed valid; otherwise we'll continue looking.
10698
10699# Test: Is bootjdk explicitely set by command line arguments?
10700
10701  if test "x$BOOT_JDK_FOUND" = xno; then
10702    # Now execute the test
10703
10704if test "x$with_boot_jdk" != x; then
10705    BOOT_JDK=$with_boot_jdk
10706    BOOT_JDK_FOUND=maybe
10707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10708$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10709fi
10710
10711
10712    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10713    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10714      # Do we have a bin/java?
10715      if test ! -x "$BOOT_JDK/bin/java"; then
10716        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10718        BOOT_JDK_FOUND=no
10719      else
10720        # Do we have a bin/javac?
10721        if test ! -x "$BOOT_JDK/bin/javac"; then
10722          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10725$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10726          BOOT_JDK_FOUND=no
10727        else
10728          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10729          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10730            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10732            BOOT_JDK_FOUND=no
10733          else
10734            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10735            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10736
10737            # Extra M4 quote needed to protect [] in grep expression.
10738            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10739            if test "x$FOUND_VERSION_78" = x; then
10740              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10742              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10743$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10744              BOOT_JDK_FOUND=no
10745            else
10746              # We're done! :-)
10747              BOOT_JDK_FOUND=yes
10748
10749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10750
10751  # Input might be given as Windows format, start by converting to
10752  # unix format.
10753  path="$BOOT_JDK"
10754  new_path=`$CYGPATH -u "$path"`
10755
10756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10759  # "foo.exe" is OK but "foo" is an error.
10760  #
10761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10762  # It is also a way to make sure we got the proper file name for the real test later on.
10763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10764  if test "x$test_shortpath" = x; then
10765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10767    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10768  fi
10769
10770  # Call helper function which possibly converts this using DOS-style short mode.
10771  # If so, the updated path is stored in $new_path.
10772
10773  input_path="$new_path"
10774  # Check if we need to convert this using DOS-style short mode. If the path
10775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10776  # take no chances and rewrite it.
10777  # Note: m4 eats our [], so we need to use [ and ] instead.
10778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10779  if test "x$has_forbidden_chars" != x; then
10780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10784      # Going to short mode and back again did indeed matter. Since short mode is
10785      # case insensitive, let's make it lowercase to improve readability.
10786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10787      # Now convert it back to Unix-stile (cygpath)
10788      input_path=`$CYGPATH -u "$shortmode_path"`
10789      new_path="$input_path"
10790    fi
10791  fi
10792
10793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10794  if test "x$test_cygdrive_prefix" = x; then
10795    # As a simple fix, exclude /usr/bin since it's not a real path.
10796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10798      # a path prefixed by /cygdrive for fixpath to work.
10799      new_path="$CYGWIN_ROOT_PATH$input_path"
10800    fi
10801  fi
10802
10803
10804  if test "x$path" != "x$new_path"; then
10805    BOOT_JDK="$new_path"
10806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10808  fi
10809
10810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10811
10812  path="$BOOT_JDK"
10813  has_colon=`$ECHO $path | $GREP ^.:`
10814  new_path="$path"
10815  if test "x$has_colon" = x; then
10816    # Not in mixed or Windows style, start by that.
10817    new_path=`cmd //c echo $path`
10818  fi
10819
10820
10821  input_path="$new_path"
10822  # Check if we need to convert this using DOS-style short mode. If the path
10823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10824  # take no chances and rewrite it.
10825  # Note: m4 eats our [], so we need to use [ and ] instead.
10826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10827  if test "x$has_forbidden_chars" != x; then
10828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10830  fi
10831
10832
10833  windows_path="$new_path"
10834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10835    unix_path=`$CYGPATH -u "$windows_path"`
10836    new_path="$unix_path"
10837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10839    new_path="$unix_path"
10840  fi
10841
10842  if test "x$path" != "x$new_path"; then
10843    BOOT_JDK="$new_path"
10844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10845$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10846  fi
10847
10848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10850
10851  else
10852    # We're on a posix platform. Hooray! :)
10853    path="$BOOT_JDK"
10854
10855    if test ! -f "$path" && test ! -d "$path"; then
10856      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10857    fi
10858
10859    has_space=`$ECHO "$path" | $GREP " "`
10860    if test "x$has_space" != x; then
10861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10862$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10863      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10864    fi
10865  fi
10866
10867              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10868$as_echo_n "checking for Boot JDK... " >&6; }
10869              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10870$as_echo "$BOOT_JDK" >&6; }
10871              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10872$as_echo_n "checking Boot JDK version... " >&6; }
10873              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10874              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10875$as_echo "$BOOT_JDK_VERSION" >&6; }
10876            fi # end check jdk version
10877          fi # end check rt.jar
10878        fi # end check javac
10879      fi # end check java
10880    fi # end check boot jdk found
10881  fi
10882
10883if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10884  # Having specified an argument which is incorrect will produce an instant failure;
10885  # we should not go on looking
10886  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10887fi
10888
10889# Test: Is bootjdk available from builddeps?
10890
10891  if test "x$BOOT_JDK_FOUND" = xno; then
10892    # Now execute the test
10893
10894
10895
10896    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10897        # Source the builddeps file again, to make sure it uses the latest variables!
10898        . $builddepsfile
10899        # Look for a target and build machine specific resource!
10900        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10901        if test "x$resource" = x; then
10902            # Ok, lets instead look for a target specific resource
10903            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10904        fi
10905        if test "x$resource" = x; then
10906            # Ok, lets instead look for a build specific resource
10907            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10908        fi
10909        if test "x$resource" = x; then
10910            # Ok, lets instead look for a generic resource
10911            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10912            resource=${builddep_bootjdk}
10913        fi
10914        if test "x$resource" != x; then
10915            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10916$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10917	    # If the resource in the builddeps.conf file is an existing directory,
10918	    # for example /java/linux/cups
10919	    if test -d ${resource}; then
10920	       depdir=${resource}
10921	    else
10922
10923# bootjdk is for example mymodule
10924# $resource is for example libs/general/libmymod_1_2_3.zip
10925# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10926# $with_builddeps_dir is for example /localhome/builddeps
10927# depdir is the name of the variable into which we store the depdir, eg MYMOD
10928# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10929# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10930    filename=`basename $resource`
10931    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10932    filebase=${filename%%.*}
10933    extension=${filename#*.}
10934    installdir=$with_builddeps_dir/$filebase
10935    if test ! -f $installdir/$filename.unpacked; then
10936        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10937$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10938        if test ! -d $installdir; then
10939            mkdir -p $installdir
10940        fi
10941        if test ! -d $installdir; then
10942            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10943        fi
10944        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10945        touch $tmpfile
10946        if test ! -f $tmpfile; then
10947            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10948        fi
10949
10950    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10951    # $tmpfile is the local file name for the downloaded file.
10952    VALID_TOOL=no
10953    if test "x$BDEPS_FTP" = xwget; then
10954       VALID_TOOL=yes
10955       wget -O $tmpfile $with_builddeps_server/$resource
10956    fi
10957    if test "x$BDEPS_FTP" = xlftp; then
10958       VALID_TOOL=yes
10959       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10960    fi
10961    if test "x$BDEPS_FTP" = xftp; then
10962        VALID_TOOL=yes
10963        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10964        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10965        FTPUSERPWD=${FTPSERVER%%@*}
10966        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10967            FTPUSER=${userpwd%%:*}
10968            FTPPWD=${userpwd#*@}
10969            FTPSERVER=${FTPSERVER#*@}
10970        else
10971            FTPUSER=ftp
10972            FTPPWD=ftp
10973        fi
10974        # the "pass" command does not work on some
10975        # ftp clients (read ftp.exe) but if it works,
10976        # passive mode is better!
10977        (\
10978            echo "user $FTPUSER $FTPPWD"        ;\
10979            echo "pass"                         ;\
10980            echo "bin"                          ;\
10981            echo "get $FTPPATH $tmpfile"              ;\
10982        ) | ftp -in $FTPSERVER
10983    fi
10984    if test "x$VALID_TOOL" != xyes; then
10985       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10986    fi
10987
10988        mv $tmpfile $installdir/$filename
10989        if test ! -s $installdir/$filename; then
10990            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10991        fi
10992        case "$extension" in
10993            zip)  echo "Unzipping $installdir/$filename..."
10994               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10995            ;;
10996            tar.gz) echo "Untaring $installdir/$filename..."
10997               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10998            ;;
10999            tgz) echo "Untaring $installdir/$filename..."
11000               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11001            ;;
11002            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11003            ;;
11004        esac
11005    fi
11006    if test -f $installdir/$filename.unpacked; then
11007        depdir=$installdir
11008    fi
11009
11010	    fi
11011            # Source the builddeps file again, because in the previous command, the depdir
11012            # was updated to point at the current build dependency install directory.
11013            . $builddepsfile
11014            # Now extract variables from the builddeps.conf files.
11015            theroot=${builddep_bootjdk_ROOT}
11016            thecflags=${builddep_bootjdk_CFLAGS}
11017            thelibs=${builddep_bootjdk_LIBS}
11018            if test "x$depdir" = x; then
11019                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11020            fi
11021            BOOT_JDK=$depdir
11022            if test "x$theroot" != x; then
11023               BOOT_JDK="$theroot"
11024            fi
11025            if test "x$thecflags" != x; then
11026               BOOT_JDK_CFLAGS="$thecflags"
11027            fi
11028            if test "x$thelibs" != x; then
11029               BOOT_JDK_LIBS="$thelibs"
11030            fi
11031            BOOT_JDK_FOUND=maybe
11032            else BOOT_JDK_FOUND=no
11033
11034        fi
11035        else BOOT_JDK_FOUND=no
11036
11037    fi
11038
11039
11040
11041    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11042    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11043      # Do we have a bin/java?
11044      if test ! -x "$BOOT_JDK/bin/java"; then
11045        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11047        BOOT_JDK_FOUND=no
11048      else
11049        # Do we have a bin/javac?
11050        if test ! -x "$BOOT_JDK/bin/javac"; then
11051          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11053          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11054$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11055          BOOT_JDK_FOUND=no
11056        else
11057          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11058          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11059            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11061            BOOT_JDK_FOUND=no
11062          else
11063            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11064            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11065
11066            # Extra M4 quote needed to protect [] in grep expression.
11067            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11068            if test "x$FOUND_VERSION_78" = x; then
11069              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11071              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11072$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11073              BOOT_JDK_FOUND=no
11074            else
11075              # We're done! :-)
11076              BOOT_JDK_FOUND=yes
11077
11078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11079
11080  # Input might be given as Windows format, start by converting to
11081  # unix format.
11082  path="$BOOT_JDK"
11083  new_path=`$CYGPATH -u "$path"`
11084
11085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11088  # "foo.exe" is OK but "foo" is an error.
11089  #
11090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11091  # It is also a way to make sure we got the proper file name for the real test later on.
11092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11093  if test "x$test_shortpath" = x; then
11094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11096    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11097  fi
11098
11099  # Call helper function which possibly converts this using DOS-style short mode.
11100  # If so, the updated path is stored in $new_path.
11101
11102  input_path="$new_path"
11103  # Check if we need to convert this using DOS-style short mode. If the path
11104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11105  # take no chances and rewrite it.
11106  # Note: m4 eats our [], so we need to use [ and ] instead.
11107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11108  if test "x$has_forbidden_chars" != x; then
11109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11113      # Going to short mode and back again did indeed matter. Since short mode is
11114      # case insensitive, let's make it lowercase to improve readability.
11115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11116      # Now convert it back to Unix-stile (cygpath)
11117      input_path=`$CYGPATH -u "$shortmode_path"`
11118      new_path="$input_path"
11119    fi
11120  fi
11121
11122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11123  if test "x$test_cygdrive_prefix" = x; then
11124    # As a simple fix, exclude /usr/bin since it's not a real path.
11125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11127      # a path prefixed by /cygdrive for fixpath to work.
11128      new_path="$CYGWIN_ROOT_PATH$input_path"
11129    fi
11130  fi
11131
11132
11133  if test "x$path" != "x$new_path"; then
11134    BOOT_JDK="$new_path"
11135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11137  fi
11138
11139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11140
11141  path="$BOOT_JDK"
11142  has_colon=`$ECHO $path | $GREP ^.:`
11143  new_path="$path"
11144  if test "x$has_colon" = x; then
11145    # Not in mixed or Windows style, start by that.
11146    new_path=`cmd //c echo $path`
11147  fi
11148
11149
11150  input_path="$new_path"
11151  # Check if we need to convert this using DOS-style short mode. If the path
11152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11153  # take no chances and rewrite it.
11154  # Note: m4 eats our [], so we need to use [ and ] instead.
11155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11156  if test "x$has_forbidden_chars" != x; then
11157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11159  fi
11160
11161
11162  windows_path="$new_path"
11163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11164    unix_path=`$CYGPATH -u "$windows_path"`
11165    new_path="$unix_path"
11166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11168    new_path="$unix_path"
11169  fi
11170
11171  if test "x$path" != "x$new_path"; then
11172    BOOT_JDK="$new_path"
11173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11175  fi
11176
11177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11179
11180  else
11181    # We're on a posix platform. Hooray! :)
11182    path="$BOOT_JDK"
11183
11184    if test ! -f "$path" && test ! -d "$path"; then
11185      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11186    fi
11187
11188    has_space=`$ECHO "$path" | $GREP " "`
11189    if test "x$has_space" != x; then
11190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11193    fi
11194  fi
11195
11196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11197$as_echo_n "checking for Boot JDK... " >&6; }
11198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11199$as_echo "$BOOT_JDK" >&6; }
11200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11201$as_echo_n "checking Boot JDK version... " >&6; }
11202              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11204$as_echo "$BOOT_JDK_VERSION" >&6; }
11205            fi # end check jdk version
11206          fi # end check rt.jar
11207        fi # end check javac
11208      fi # end check java
11209    fi # end check boot jdk found
11210  fi
11211
11212
11213# Test: Is $JAVA_HOME set?
11214
11215  if test "x$BOOT_JDK_FOUND" = xno; then
11216    # Now execute the test
11217
11218    if test "x$JAVA_HOME" != x; then
11219        JAVA_HOME_PROCESSED="$JAVA_HOME"
11220
11221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11222
11223  # Input might be given as Windows format, start by converting to
11224  # unix format.
11225  path="$JAVA_HOME_PROCESSED"
11226  new_path=`$CYGPATH -u "$path"`
11227
11228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11231  # "foo.exe" is OK but "foo" is an error.
11232  #
11233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11234  # It is also a way to make sure we got the proper file name for the real test later on.
11235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11236  if test "x$test_shortpath" = x; then
11237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11238$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11239    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11240  fi
11241
11242  # Call helper function which possibly converts this using DOS-style short mode.
11243  # If so, the updated path is stored in $new_path.
11244
11245  input_path="$new_path"
11246  # Check if we need to convert this using DOS-style short mode. If the path
11247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11248  # take no chances and rewrite it.
11249  # Note: m4 eats our [], so we need to use [ and ] instead.
11250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11251  if test "x$has_forbidden_chars" != x; then
11252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11256      # Going to short mode and back again did indeed matter. Since short mode is
11257      # case insensitive, let's make it lowercase to improve readability.
11258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11259      # Now convert it back to Unix-stile (cygpath)
11260      input_path=`$CYGPATH -u "$shortmode_path"`
11261      new_path="$input_path"
11262    fi
11263  fi
11264
11265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11266  if test "x$test_cygdrive_prefix" = x; then
11267    # As a simple fix, exclude /usr/bin since it's not a real path.
11268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11270      # a path prefixed by /cygdrive for fixpath to work.
11271      new_path="$CYGWIN_ROOT_PATH$input_path"
11272    fi
11273  fi
11274
11275
11276  if test "x$path" != "x$new_path"; then
11277    JAVA_HOME_PROCESSED="$new_path"
11278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11279$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11280  fi
11281
11282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11283
11284  path="$JAVA_HOME_PROCESSED"
11285  has_colon=`$ECHO $path | $GREP ^.:`
11286  new_path="$path"
11287  if test "x$has_colon" = x; then
11288    # Not in mixed or Windows style, start by that.
11289    new_path=`cmd //c echo $path`
11290  fi
11291
11292
11293  input_path="$new_path"
11294  # Check if we need to convert this using DOS-style short mode. If the path
11295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11296  # take no chances and rewrite it.
11297  # Note: m4 eats our [], so we need to use [ and ] instead.
11298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11299  if test "x$has_forbidden_chars" != x; then
11300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11302  fi
11303
11304
11305  windows_path="$new_path"
11306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11307    unix_path=`$CYGPATH -u "$windows_path"`
11308    new_path="$unix_path"
11309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11311    new_path="$unix_path"
11312  fi
11313
11314  if test "x$path" != "x$new_path"; then
11315    JAVA_HOME_PROCESSED="$new_path"
11316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11317$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11318  fi
11319
11320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11322
11323  else
11324    # We're on a posix platform. Hooray! :)
11325    path="$JAVA_HOME_PROCESSED"
11326
11327    if test ! -f "$path" && test ! -d "$path"; then
11328      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11329    fi
11330
11331    has_space=`$ECHO "$path" | $GREP " "`
11332    if test "x$has_space" != x; then
11333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11334$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11336    fi
11337  fi
11338
11339        if test ! -d "$JAVA_HOME_PROCESSED"; then
11340            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11341$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11342        else
11343          # Aha, the user has set a JAVA_HOME
11344          # let us use that as the Boot JDK.
11345          BOOT_JDK="$JAVA_HOME_PROCESSED"
11346          BOOT_JDK_FOUND=maybe
11347          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11348$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11349        fi
11350    fi
11351
11352
11353    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11354    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11355      # Do we have a bin/java?
11356      if test ! -x "$BOOT_JDK/bin/java"; then
11357        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11359        BOOT_JDK_FOUND=no
11360      else
11361        # Do we have a bin/javac?
11362        if test ! -x "$BOOT_JDK/bin/javac"; then
11363          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11365          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11366$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11367          BOOT_JDK_FOUND=no
11368        else
11369          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11370          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11371            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11373            BOOT_JDK_FOUND=no
11374          else
11375            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11376            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11377
11378            # Extra M4 quote needed to protect [] in grep expression.
11379            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11380            if test "x$FOUND_VERSION_78" = x; then
11381              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11383              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11384$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11385              BOOT_JDK_FOUND=no
11386            else
11387              # We're done! :-)
11388              BOOT_JDK_FOUND=yes
11389
11390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11391
11392  # Input might be given as Windows format, start by converting to
11393  # unix format.
11394  path="$BOOT_JDK"
11395  new_path=`$CYGPATH -u "$path"`
11396
11397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11400  # "foo.exe" is OK but "foo" is an error.
11401  #
11402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11403  # It is also a way to make sure we got the proper file name for the real test later on.
11404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11405  if test "x$test_shortpath" = x; then
11406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11408    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11409  fi
11410
11411  # Call helper function which possibly converts this using DOS-style short mode.
11412  # If so, the updated path is stored in $new_path.
11413
11414  input_path="$new_path"
11415  # Check if we need to convert this using DOS-style short mode. If the path
11416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11417  # take no chances and rewrite it.
11418  # Note: m4 eats our [], so we need to use [ and ] instead.
11419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11420  if test "x$has_forbidden_chars" != x; then
11421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11425      # Going to short mode and back again did indeed matter. Since short mode is
11426      # case insensitive, let's make it lowercase to improve readability.
11427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11428      # Now convert it back to Unix-stile (cygpath)
11429      input_path=`$CYGPATH -u "$shortmode_path"`
11430      new_path="$input_path"
11431    fi
11432  fi
11433
11434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11435  if test "x$test_cygdrive_prefix" = x; then
11436    # As a simple fix, exclude /usr/bin since it's not a real path.
11437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11439      # a path prefixed by /cygdrive for fixpath to work.
11440      new_path="$CYGWIN_ROOT_PATH$input_path"
11441    fi
11442  fi
11443
11444
11445  if test "x$path" != "x$new_path"; then
11446    BOOT_JDK="$new_path"
11447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11448$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11449  fi
11450
11451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11452
11453  path="$BOOT_JDK"
11454  has_colon=`$ECHO $path | $GREP ^.:`
11455  new_path="$path"
11456  if test "x$has_colon" = x; then
11457    # Not in mixed or Windows style, start by that.
11458    new_path=`cmd //c echo $path`
11459  fi
11460
11461
11462  input_path="$new_path"
11463  # Check if we need to convert this using DOS-style short mode. If the path
11464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11465  # take no chances and rewrite it.
11466  # Note: m4 eats our [], so we need to use [ and ] instead.
11467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11468  if test "x$has_forbidden_chars" != x; then
11469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11471  fi
11472
11473
11474  windows_path="$new_path"
11475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11476    unix_path=`$CYGPATH -u "$windows_path"`
11477    new_path="$unix_path"
11478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11480    new_path="$unix_path"
11481  fi
11482
11483  if test "x$path" != "x$new_path"; then
11484    BOOT_JDK="$new_path"
11485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11487  fi
11488
11489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11491
11492  else
11493    # We're on a posix platform. Hooray! :)
11494    path="$BOOT_JDK"
11495
11496    if test ! -f "$path" && test ! -d "$path"; then
11497      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11498    fi
11499
11500    has_space=`$ECHO "$path" | $GREP " "`
11501    if test "x$has_space" != x; then
11502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11504      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11505    fi
11506  fi
11507
11508              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11509$as_echo_n "checking for Boot JDK... " >&6; }
11510              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11511$as_echo "$BOOT_JDK" >&6; }
11512              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11513$as_echo_n "checking Boot JDK version... " >&6; }
11514              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11515              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11516$as_echo "$BOOT_JDK_VERSION" >&6; }
11517            fi # end check jdk version
11518          fi # end check rt.jar
11519        fi # end check javac
11520      fi # end check java
11521    fi # end check boot jdk found
11522  fi
11523
11524
11525# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11526
11527  if test "x$BOOT_JDK_FOUND" = xno; then
11528    # Now execute the test
11529
11530    if test -x /usr/libexec/java_home; then
11531        BOOT_JDK=`/usr/libexec/java_home`
11532        BOOT_JDK_FOUND=maybe
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11534$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11535    fi
11536
11537
11538    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11539    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11540      # Do we have a bin/java?
11541      if test ! -x "$BOOT_JDK/bin/java"; then
11542        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11544        BOOT_JDK_FOUND=no
11545      else
11546        # Do we have a bin/javac?
11547        if test ! -x "$BOOT_JDK/bin/javac"; then
11548          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11550          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11551$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11552          BOOT_JDK_FOUND=no
11553        else
11554          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11555          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11556            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11558            BOOT_JDK_FOUND=no
11559          else
11560            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11561            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11562
11563            # Extra M4 quote needed to protect [] in grep expression.
11564            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11565            if test "x$FOUND_VERSION_78" = x; then
11566              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11568              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11569$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11570              BOOT_JDK_FOUND=no
11571            else
11572              # We're done! :-)
11573              BOOT_JDK_FOUND=yes
11574
11575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11576
11577  # Input might be given as Windows format, start by converting to
11578  # unix format.
11579  path="$BOOT_JDK"
11580  new_path=`$CYGPATH -u "$path"`
11581
11582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11585  # "foo.exe" is OK but "foo" is an error.
11586  #
11587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11588  # It is also a way to make sure we got the proper file name for the real test later on.
11589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11590  if test "x$test_shortpath" = x; then
11591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11593    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11594  fi
11595
11596  # Call helper function which possibly converts this using DOS-style short mode.
11597  # If so, the updated path is stored in $new_path.
11598
11599  input_path="$new_path"
11600  # Check if we need to convert this using DOS-style short mode. If the path
11601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11602  # take no chances and rewrite it.
11603  # Note: m4 eats our [], so we need to use [ and ] instead.
11604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11605  if test "x$has_forbidden_chars" != x; then
11606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11610      # Going to short mode and back again did indeed matter. Since short mode is
11611      # case insensitive, let's make it lowercase to improve readability.
11612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11613      # Now convert it back to Unix-stile (cygpath)
11614      input_path=`$CYGPATH -u "$shortmode_path"`
11615      new_path="$input_path"
11616    fi
11617  fi
11618
11619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11620  if test "x$test_cygdrive_prefix" = x; then
11621    # As a simple fix, exclude /usr/bin since it's not a real path.
11622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11624      # a path prefixed by /cygdrive for fixpath to work.
11625      new_path="$CYGWIN_ROOT_PATH$input_path"
11626    fi
11627  fi
11628
11629
11630  if test "x$path" != "x$new_path"; then
11631    BOOT_JDK="$new_path"
11632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11634  fi
11635
11636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11637
11638  path="$BOOT_JDK"
11639  has_colon=`$ECHO $path | $GREP ^.:`
11640  new_path="$path"
11641  if test "x$has_colon" = x; then
11642    # Not in mixed or Windows style, start by that.
11643    new_path=`cmd //c echo $path`
11644  fi
11645
11646
11647  input_path="$new_path"
11648  # Check if we need to convert this using DOS-style short mode. If the path
11649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11650  # take no chances and rewrite it.
11651  # Note: m4 eats our [], so we need to use [ and ] instead.
11652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11653  if test "x$has_forbidden_chars" != x; then
11654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11656  fi
11657
11658
11659  windows_path="$new_path"
11660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11661    unix_path=`$CYGPATH -u "$windows_path"`
11662    new_path="$unix_path"
11663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11665    new_path="$unix_path"
11666  fi
11667
11668  if test "x$path" != "x$new_path"; then
11669    BOOT_JDK="$new_path"
11670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11672  fi
11673
11674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11676
11677  else
11678    # We're on a posix platform. Hooray! :)
11679    path="$BOOT_JDK"
11680
11681    if test ! -f "$path" && test ! -d "$path"; then
11682      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11683    fi
11684
11685    has_space=`$ECHO "$path" | $GREP " "`
11686    if test "x$has_space" != x; then
11687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11690    fi
11691  fi
11692
11693              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11694$as_echo_n "checking for Boot JDK... " >&6; }
11695              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11696$as_echo "$BOOT_JDK" >&6; }
11697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11698$as_echo_n "checking Boot JDK version... " >&6; }
11699              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11700              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11701$as_echo "$BOOT_JDK_VERSION" >&6; }
11702            fi # end check jdk version
11703          fi # end check rt.jar
11704        fi # end check javac
11705      fi # end check java
11706    fi # end check boot jdk found
11707  fi
11708
11709
11710# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11711
11712  if test "x$BOOT_JDK_FOUND" = xno; then
11713    # Now execute the test
11714
11715    # Extract the first word of "javac", so it can be a program name with args.
11716set dummy javac; ac_word=$2
11717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11718$as_echo_n "checking for $ac_word... " >&6; }
11719if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11720  $as_echo_n "(cached) " >&6
11721else
11722  case $JAVAC_CHECK in
11723  [\\/]* | ?:[\\/]*)
11724  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11725  ;;
11726  *)
11727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11728for as_dir in $PATH
11729do
11730  IFS=$as_save_IFS
11731  test -z "$as_dir" && as_dir=.
11732    for ac_exec_ext in '' $ac_executable_extensions; do
11733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11734    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11736    break 2
11737  fi
11738done
11739  done
11740IFS=$as_save_IFS
11741
11742  ;;
11743esac
11744fi
11745JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11746if test -n "$JAVAC_CHECK"; then
11747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11748$as_echo "$JAVAC_CHECK" >&6; }
11749else
11750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751$as_echo "no" >&6; }
11752fi
11753
11754
11755    # Extract the first word of "java", so it can be a program name with args.
11756set dummy java; ac_word=$2
11757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11758$as_echo_n "checking for $ac_word... " >&6; }
11759if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11760  $as_echo_n "(cached) " >&6
11761else
11762  case $JAVA_CHECK in
11763  [\\/]* | ?:[\\/]*)
11764  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11765  ;;
11766  *)
11767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11768for as_dir in $PATH
11769do
11770  IFS=$as_save_IFS
11771  test -z "$as_dir" && as_dir=.
11772    for ac_exec_ext in '' $ac_executable_extensions; do
11773  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11774    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11776    break 2
11777  fi
11778done
11779  done
11780IFS=$as_save_IFS
11781
11782  ;;
11783esac
11784fi
11785JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11786if test -n "$JAVA_CHECK"; then
11787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11788$as_echo "$JAVA_CHECK" >&6; }
11789else
11790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11791$as_echo "no" >&6; }
11792fi
11793
11794
11795    BINARY="$JAVAC_CHECK"
11796    if test "x$JAVAC_CHECK" = x; then
11797        BINARY="$JAVA_CHECK"
11798    fi
11799    if test "x$BINARY" != x; then
11800        # So there is a java(c) binary, it might be part of a JDK.
11801        # Lets find the JDK/JRE directory by following symbolic links.
11802        # Linux/GNU systems often have links from /usr/bin/java to
11803        # /etc/alternatives/java to the real JDK binary.
11804
11805    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11806        # Follow a chain of symbolic links. Use readlink
11807        # where it exists, else fall back to horribly
11808        # complicated shell code.
11809        if test "x$READLINK_TESTED" != yes; then
11810            # On MacOSX there is a readlink tool with a different
11811            # purpose than the GNU readlink tool. Check the found readlink.
11812            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11813            if test "x$ISGNU" = x; then
11814                 # A readlink that we do not know how to use.
11815                 # Are there other non-GNU readlinks out there?
11816                 READLINK_TESTED=yes
11817                 READLINK=
11818            fi
11819        fi
11820
11821        if test "x$READLINK" != x; then
11822            BINARY=`$READLINK -f $BINARY`
11823        else
11824            # Save the current directory for restoring afterwards
11825            STARTDIR=$PWD
11826            COUNTER=0
11827            sym_link_dir=`$DIRNAME $BINARY`
11828            sym_link_file=`$BASENAME $BINARY`
11829            # Use the system pwd and not the shell builtin to resolve directory symlinks
11830            cd $sym_link_dir
11831            cd `$THEPWDCMD`
11832            sym_link_dir=`$THEPWDCMD`
11833            # Resolve file symlinks
11834            while test $COUNTER -lt 20; do
11835                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11836                if test "x$ISLINK" == x; then
11837                    # This is not a symbolic link! We are done!
11838                    break
11839                fi
11840                # Again resolve directory symlinks since the target of the just found
11841                # link could be in a different directory
11842                cd `$DIRNAME $ISLINK`
11843                sym_link_dir=`$THEPWDCMD`
11844                sym_link_file=`$BASENAME $ISLINK`
11845                let COUNTER=COUNTER+1
11846            done
11847            cd $STARTDIR
11848            BINARY=$sym_link_dir/$sym_link_file
11849        fi
11850    fi
11851
11852        BOOT_JDK=`dirname "$BINARY"`
11853        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11854        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11855            # Looks like we found ourselves an JDK
11856            BOOT_JDK_FOUND=maybe
11857            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11858$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11859        fi
11860    fi
11861
11862
11863    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11864    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11865      # Do we have a bin/java?
11866      if test ! -x "$BOOT_JDK/bin/java"; then
11867        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11869        BOOT_JDK_FOUND=no
11870      else
11871        # Do we have a bin/javac?
11872        if test ! -x "$BOOT_JDK/bin/javac"; then
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11875          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11876$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11877          BOOT_JDK_FOUND=no
11878        else
11879          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11880          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11881            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11883            BOOT_JDK_FOUND=no
11884          else
11885            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11886            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11887
11888            # Extra M4 quote needed to protect [] in grep expression.
11889            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11890            if test "x$FOUND_VERSION_78" = x; then
11891              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11893              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11894$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11895              BOOT_JDK_FOUND=no
11896            else
11897              # We're done! :-)
11898              BOOT_JDK_FOUND=yes
11899
11900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11901
11902  # Input might be given as Windows format, start by converting to
11903  # unix format.
11904  path="$BOOT_JDK"
11905  new_path=`$CYGPATH -u "$path"`
11906
11907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11910  # "foo.exe" is OK but "foo" is an error.
11911  #
11912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11913  # It is also a way to make sure we got the proper file name for the real test later on.
11914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11915  if test "x$test_shortpath" = x; then
11916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11918    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11919  fi
11920
11921  # Call helper function which possibly converts this using DOS-style short mode.
11922  # If so, the updated path is stored in $new_path.
11923
11924  input_path="$new_path"
11925  # Check if we need to convert this using DOS-style short mode. If the path
11926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11927  # take no chances and rewrite it.
11928  # Note: m4 eats our [], so we need to use [ and ] instead.
11929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11930  if test "x$has_forbidden_chars" != x; then
11931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11935      # Going to short mode and back again did indeed matter. Since short mode is
11936      # case insensitive, let's make it lowercase to improve readability.
11937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11938      # Now convert it back to Unix-stile (cygpath)
11939      input_path=`$CYGPATH -u "$shortmode_path"`
11940      new_path="$input_path"
11941    fi
11942  fi
11943
11944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11945  if test "x$test_cygdrive_prefix" = x; then
11946    # As a simple fix, exclude /usr/bin since it's not a real path.
11947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11949      # a path prefixed by /cygdrive for fixpath to work.
11950      new_path="$CYGWIN_ROOT_PATH$input_path"
11951    fi
11952  fi
11953
11954
11955  if test "x$path" != "x$new_path"; then
11956    BOOT_JDK="$new_path"
11957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11959  fi
11960
11961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11962
11963  path="$BOOT_JDK"
11964  has_colon=`$ECHO $path | $GREP ^.:`
11965  new_path="$path"
11966  if test "x$has_colon" = x; then
11967    # Not in mixed or Windows style, start by that.
11968    new_path=`cmd //c echo $path`
11969  fi
11970
11971
11972  input_path="$new_path"
11973  # Check if we need to convert this using DOS-style short mode. If the path
11974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11975  # take no chances and rewrite it.
11976  # Note: m4 eats our [], so we need to use [ and ] instead.
11977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11978  if test "x$has_forbidden_chars" != x; then
11979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11981  fi
11982
11983
11984  windows_path="$new_path"
11985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11986    unix_path=`$CYGPATH -u "$windows_path"`
11987    new_path="$unix_path"
11988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11990    new_path="$unix_path"
11991  fi
11992
11993  if test "x$path" != "x$new_path"; then
11994    BOOT_JDK="$new_path"
11995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11997  fi
11998
11999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12001
12002  else
12003    # We're on a posix platform. Hooray! :)
12004    path="$BOOT_JDK"
12005
12006    if test ! -f "$path" && test ! -d "$path"; then
12007      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12008    fi
12009
12010    has_space=`$ECHO "$path" | $GREP " "`
12011    if test "x$has_space" != x; then
12012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12013$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12014      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12015    fi
12016  fi
12017
12018              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12019$as_echo_n "checking for Boot JDK... " >&6; }
12020              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12021$as_echo "$BOOT_JDK" >&6; }
12022              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12023$as_echo_n "checking Boot JDK version... " >&6; }
12024              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12025              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12026$as_echo "$BOOT_JDK_VERSION" >&6; }
12027            fi # end check jdk version
12028          fi # end check rt.jar
12029        fi # end check javac
12030      fi # end check java
12031    fi # end check boot jdk found
12032  fi
12033
12034
12035# Test: Is there a JDK installed in default, well-known locations?
12036
12037  if test "x$BOOT_JDK_FOUND" = xno; then
12038    # Now execute the test
12039
12040  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12041
12042  if test "x$BOOT_JDK_FOUND" = xno; then
12043    # Now execute the test
12044
12045  if test "x$ProgramW6432" != x; then
12046    VIRTUAL_DIR="$ProgramW6432/Java"
12047
12048  windows_path="$VIRTUAL_DIR"
12049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12050    unix_path=`$CYGPATH -u "$windows_path"`
12051    VIRTUAL_DIR="$unix_path"
12052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12054    VIRTUAL_DIR="$unix_path"
12055  fi
12056
12057
12058  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12059  BOOT_JDK_SUFFIX=""
12060  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12061  if test "x$ALL_JDKS_FOUND" != x; then
12062    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12063
12064  if test "x$BOOT_JDK_FOUND" = xno; then
12065    # Now execute the test
12066
12067        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12068        if test -d "$BOOT_JDK"; then
12069          BOOT_JDK_FOUND=maybe
12070          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12071$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12072        fi
12073
12074
12075    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12076    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12077      # Do we have a bin/java?
12078      if test ! -x "$BOOT_JDK/bin/java"; then
12079        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12081        BOOT_JDK_FOUND=no
12082      else
12083        # Do we have a bin/javac?
12084        if test ! -x "$BOOT_JDK/bin/javac"; then
12085          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12087          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12088$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12089          BOOT_JDK_FOUND=no
12090        else
12091          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12092          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12093            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12095            BOOT_JDK_FOUND=no
12096          else
12097            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12098            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12099
12100            # Extra M4 quote needed to protect [] in grep expression.
12101            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12102            if test "x$FOUND_VERSION_78" = x; then
12103              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12105              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12106$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12107              BOOT_JDK_FOUND=no
12108            else
12109              # We're done! :-)
12110              BOOT_JDK_FOUND=yes
12111
12112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12113
12114  # Input might be given as Windows format, start by converting to
12115  # unix format.
12116  path="$BOOT_JDK"
12117  new_path=`$CYGPATH -u "$path"`
12118
12119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12122  # "foo.exe" is OK but "foo" is an error.
12123  #
12124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12125  # It is also a way to make sure we got the proper file name for the real test later on.
12126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12127  if test "x$test_shortpath" = x; then
12128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12130    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12131  fi
12132
12133  # Call helper function which possibly converts this using DOS-style short mode.
12134  # If so, the updated path is stored in $new_path.
12135
12136  input_path="$new_path"
12137  # Check if we need to convert this using DOS-style short mode. If the path
12138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12139  # take no chances and rewrite it.
12140  # Note: m4 eats our [], so we need to use [ and ] instead.
12141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12142  if test "x$has_forbidden_chars" != x; then
12143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12147      # Going to short mode and back again did indeed matter. Since short mode is
12148      # case insensitive, let's make it lowercase to improve readability.
12149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12150      # Now convert it back to Unix-stile (cygpath)
12151      input_path=`$CYGPATH -u "$shortmode_path"`
12152      new_path="$input_path"
12153    fi
12154  fi
12155
12156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12157  if test "x$test_cygdrive_prefix" = x; then
12158    # As a simple fix, exclude /usr/bin since it's not a real path.
12159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12161      # a path prefixed by /cygdrive for fixpath to work.
12162      new_path="$CYGWIN_ROOT_PATH$input_path"
12163    fi
12164  fi
12165
12166
12167  if test "x$path" != "x$new_path"; then
12168    BOOT_JDK="$new_path"
12169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12170$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12171  fi
12172
12173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12174
12175  path="$BOOT_JDK"
12176  has_colon=`$ECHO $path | $GREP ^.:`
12177  new_path="$path"
12178  if test "x$has_colon" = x; then
12179    # Not in mixed or Windows style, start by that.
12180    new_path=`cmd //c echo $path`
12181  fi
12182
12183
12184  input_path="$new_path"
12185  # Check if we need to convert this using DOS-style short mode. If the path
12186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12187  # take no chances and rewrite it.
12188  # Note: m4 eats our [], so we need to use [ and ] instead.
12189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12190  if test "x$has_forbidden_chars" != x; then
12191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12193  fi
12194
12195
12196  windows_path="$new_path"
12197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12198    unix_path=`$CYGPATH -u "$windows_path"`
12199    new_path="$unix_path"
12200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12202    new_path="$unix_path"
12203  fi
12204
12205  if test "x$path" != "x$new_path"; then
12206    BOOT_JDK="$new_path"
12207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12209  fi
12210
12211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12213
12214  else
12215    # We're on a posix platform. Hooray! :)
12216    path="$BOOT_JDK"
12217
12218    if test ! -f "$path" && test ! -d "$path"; then
12219      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12220    fi
12221
12222    has_space=`$ECHO "$path" | $GREP " "`
12223    if test "x$has_space" != x; then
12224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12226      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12227    fi
12228  fi
12229
12230              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12231$as_echo_n "checking for Boot JDK... " >&6; }
12232              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12233$as_echo "$BOOT_JDK" >&6; }
12234              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12235$as_echo_n "checking Boot JDK version... " >&6; }
12236              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12237              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12238$as_echo "$BOOT_JDK_VERSION" >&6; }
12239            fi # end check jdk version
12240          fi # end check rt.jar
12241        fi # end check javac
12242      fi # end check java
12243    fi # end check boot jdk found
12244  fi
12245
12246    done
12247  fi
12248
12249  fi
12250
12251
12252    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12253    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12254      # Do we have a bin/java?
12255      if test ! -x "$BOOT_JDK/bin/java"; then
12256        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12258        BOOT_JDK_FOUND=no
12259      else
12260        # Do we have a bin/javac?
12261        if test ! -x "$BOOT_JDK/bin/javac"; then
12262          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12264          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12265$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12266          BOOT_JDK_FOUND=no
12267        else
12268          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12269          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12270            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12272            BOOT_JDK_FOUND=no
12273          else
12274            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12275            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12276
12277            # Extra M4 quote needed to protect [] in grep expression.
12278            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12279            if test "x$FOUND_VERSION_78" = x; then
12280              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12282              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12283$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12284              BOOT_JDK_FOUND=no
12285            else
12286              # We're done! :-)
12287              BOOT_JDK_FOUND=yes
12288
12289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12290
12291  # Input might be given as Windows format, start by converting to
12292  # unix format.
12293  path="$BOOT_JDK"
12294  new_path=`$CYGPATH -u "$path"`
12295
12296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12299  # "foo.exe" is OK but "foo" is an error.
12300  #
12301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12302  # It is also a way to make sure we got the proper file name for the real test later on.
12303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12304  if test "x$test_shortpath" = x; then
12305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12307    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12308  fi
12309
12310  # Call helper function which possibly converts this using DOS-style short mode.
12311  # If so, the updated path is stored in $new_path.
12312
12313  input_path="$new_path"
12314  # Check if we need to convert this using DOS-style short mode. If the path
12315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12316  # take no chances and rewrite it.
12317  # Note: m4 eats our [], so we need to use [ and ] instead.
12318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12319  if test "x$has_forbidden_chars" != x; then
12320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12324      # Going to short mode and back again did indeed matter. Since short mode is
12325      # case insensitive, let's make it lowercase to improve readability.
12326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12327      # Now convert it back to Unix-stile (cygpath)
12328      input_path=`$CYGPATH -u "$shortmode_path"`
12329      new_path="$input_path"
12330    fi
12331  fi
12332
12333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12334  if test "x$test_cygdrive_prefix" = x; then
12335    # As a simple fix, exclude /usr/bin since it's not a real path.
12336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12338      # a path prefixed by /cygdrive for fixpath to work.
12339      new_path="$CYGWIN_ROOT_PATH$input_path"
12340    fi
12341  fi
12342
12343
12344  if test "x$path" != "x$new_path"; then
12345    BOOT_JDK="$new_path"
12346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12348  fi
12349
12350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12351
12352  path="$BOOT_JDK"
12353  has_colon=`$ECHO $path | $GREP ^.:`
12354  new_path="$path"
12355  if test "x$has_colon" = x; then
12356    # Not in mixed or Windows style, start by that.
12357    new_path=`cmd //c echo $path`
12358  fi
12359
12360
12361  input_path="$new_path"
12362  # Check if we need to convert this using DOS-style short mode. If the path
12363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12364  # take no chances and rewrite it.
12365  # Note: m4 eats our [], so we need to use [ and ] instead.
12366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12367  if test "x$has_forbidden_chars" != x; then
12368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12370  fi
12371
12372
12373  windows_path="$new_path"
12374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12375    unix_path=`$CYGPATH -u "$windows_path"`
12376    new_path="$unix_path"
12377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12379    new_path="$unix_path"
12380  fi
12381
12382  if test "x$path" != "x$new_path"; then
12383    BOOT_JDK="$new_path"
12384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12386  fi
12387
12388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12390
12391  else
12392    # We're on a posix platform. Hooray! :)
12393    path="$BOOT_JDK"
12394
12395    if test ! -f "$path" && test ! -d "$path"; then
12396      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12397    fi
12398
12399    has_space=`$ECHO "$path" | $GREP " "`
12400    if test "x$has_space" != x; then
12401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12403      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12404    fi
12405  fi
12406
12407              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12408$as_echo_n "checking for Boot JDK... " >&6; }
12409              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12410$as_echo "$BOOT_JDK" >&6; }
12411              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12412$as_echo_n "checking Boot JDK version... " >&6; }
12413              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12414              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12415$as_echo "$BOOT_JDK_VERSION" >&6; }
12416            fi # end check jdk version
12417          fi # end check rt.jar
12418        fi # end check javac
12419      fi # end check java
12420    fi # end check boot jdk found
12421  fi
12422
12423
12424  if test "x$BOOT_JDK_FOUND" = xno; then
12425    # Now execute the test
12426
12427  if test "x$PROGRAMW6432" != x; then
12428    VIRTUAL_DIR="$PROGRAMW6432/Java"
12429
12430  windows_path="$VIRTUAL_DIR"
12431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12432    unix_path=`$CYGPATH -u "$windows_path"`
12433    VIRTUAL_DIR="$unix_path"
12434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12436    VIRTUAL_DIR="$unix_path"
12437  fi
12438
12439
12440  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12441  BOOT_JDK_SUFFIX=""
12442  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12443  if test "x$ALL_JDKS_FOUND" != x; then
12444    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12445
12446  if test "x$BOOT_JDK_FOUND" = xno; then
12447    # Now execute the test
12448
12449        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12450        if test -d "$BOOT_JDK"; then
12451          BOOT_JDK_FOUND=maybe
12452          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12453$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12454        fi
12455
12456
12457    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12458    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12459      # Do we have a bin/java?
12460      if test ! -x "$BOOT_JDK/bin/java"; then
12461        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12462$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12463        BOOT_JDK_FOUND=no
12464      else
12465        # Do we have a bin/javac?
12466        if test ! -x "$BOOT_JDK/bin/javac"; then
12467          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12469          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12470$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12471          BOOT_JDK_FOUND=no
12472        else
12473          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12474          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12475            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12477            BOOT_JDK_FOUND=no
12478          else
12479            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12480            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12481
12482            # Extra M4 quote needed to protect [] in grep expression.
12483            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12484            if test "x$FOUND_VERSION_78" = x; then
12485              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12487              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12488$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12489              BOOT_JDK_FOUND=no
12490            else
12491              # We're done! :-)
12492              BOOT_JDK_FOUND=yes
12493
12494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12495
12496  # Input might be given as Windows format, start by converting to
12497  # unix format.
12498  path="$BOOT_JDK"
12499  new_path=`$CYGPATH -u "$path"`
12500
12501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12504  # "foo.exe" is OK but "foo" is an error.
12505  #
12506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12507  # It is also a way to make sure we got the proper file name for the real test later on.
12508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12509  if test "x$test_shortpath" = x; then
12510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12511$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12512    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12513  fi
12514
12515  # Call helper function which possibly converts this using DOS-style short mode.
12516  # If so, the updated path is stored in $new_path.
12517
12518  input_path="$new_path"
12519  # Check if we need to convert this using DOS-style short mode. If the path
12520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12521  # take no chances and rewrite it.
12522  # Note: m4 eats our [], so we need to use [ and ] instead.
12523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12524  if test "x$has_forbidden_chars" != x; then
12525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12529      # Going to short mode and back again did indeed matter. Since short mode is
12530      # case insensitive, let's make it lowercase to improve readability.
12531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12532      # Now convert it back to Unix-stile (cygpath)
12533      input_path=`$CYGPATH -u "$shortmode_path"`
12534      new_path="$input_path"
12535    fi
12536  fi
12537
12538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12539  if test "x$test_cygdrive_prefix" = x; then
12540    # As a simple fix, exclude /usr/bin since it's not a real path.
12541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12543      # a path prefixed by /cygdrive for fixpath to work.
12544      new_path="$CYGWIN_ROOT_PATH$input_path"
12545    fi
12546  fi
12547
12548
12549  if test "x$path" != "x$new_path"; then
12550    BOOT_JDK="$new_path"
12551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12552$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12553  fi
12554
12555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12556
12557  path="$BOOT_JDK"
12558  has_colon=`$ECHO $path | $GREP ^.:`
12559  new_path="$path"
12560  if test "x$has_colon" = x; then
12561    # Not in mixed or Windows style, start by that.
12562    new_path=`cmd //c echo $path`
12563  fi
12564
12565
12566  input_path="$new_path"
12567  # Check if we need to convert this using DOS-style short mode. If the path
12568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12569  # take no chances and rewrite it.
12570  # Note: m4 eats our [], so we need to use [ and ] instead.
12571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12572  if test "x$has_forbidden_chars" != x; then
12573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12575  fi
12576
12577
12578  windows_path="$new_path"
12579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12580    unix_path=`$CYGPATH -u "$windows_path"`
12581    new_path="$unix_path"
12582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12584    new_path="$unix_path"
12585  fi
12586
12587  if test "x$path" != "x$new_path"; then
12588    BOOT_JDK="$new_path"
12589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12591  fi
12592
12593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12595
12596  else
12597    # We're on a posix platform. Hooray! :)
12598    path="$BOOT_JDK"
12599
12600    if test ! -f "$path" && test ! -d "$path"; then
12601      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12602    fi
12603
12604    has_space=`$ECHO "$path" | $GREP " "`
12605    if test "x$has_space" != x; then
12606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12608      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12609    fi
12610  fi
12611
12612              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12613$as_echo_n "checking for Boot JDK... " >&6; }
12614              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12615$as_echo "$BOOT_JDK" >&6; }
12616              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12617$as_echo_n "checking Boot JDK version... " >&6; }
12618              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12619              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12620$as_echo "$BOOT_JDK_VERSION" >&6; }
12621            fi # end check jdk version
12622          fi # end check rt.jar
12623        fi # end check javac
12624      fi # end check java
12625    fi # end check boot jdk found
12626  fi
12627
12628    done
12629  fi
12630
12631  fi
12632
12633
12634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12636      # Do we have a bin/java?
12637      if test ! -x "$BOOT_JDK/bin/java"; then
12638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12640        BOOT_JDK_FOUND=no
12641      else
12642        # Do we have a bin/javac?
12643        if test ! -x "$BOOT_JDK/bin/javac"; then
12644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12648          BOOT_JDK_FOUND=no
12649        else
12650          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12651          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12652            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12654            BOOT_JDK_FOUND=no
12655          else
12656            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12657            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12658
12659            # Extra M4 quote needed to protect [] in grep expression.
12660            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12661            if test "x$FOUND_VERSION_78" = x; then
12662              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12664              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12665$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12666              BOOT_JDK_FOUND=no
12667            else
12668              # We're done! :-)
12669              BOOT_JDK_FOUND=yes
12670
12671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12672
12673  # Input might be given as Windows format, start by converting to
12674  # unix format.
12675  path="$BOOT_JDK"
12676  new_path=`$CYGPATH -u "$path"`
12677
12678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12681  # "foo.exe" is OK but "foo" is an error.
12682  #
12683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12684  # It is also a way to make sure we got the proper file name for the real test later on.
12685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12686  if test "x$test_shortpath" = x; then
12687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12690  fi
12691
12692  # Call helper function which possibly converts this using DOS-style short mode.
12693  # If so, the updated path is stored in $new_path.
12694
12695  input_path="$new_path"
12696  # Check if we need to convert this using DOS-style short mode. If the path
12697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12698  # take no chances and rewrite it.
12699  # Note: m4 eats our [], so we need to use [ and ] instead.
12700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12701  if test "x$has_forbidden_chars" != x; then
12702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12706      # Going to short mode and back again did indeed matter. Since short mode is
12707      # case insensitive, let's make it lowercase to improve readability.
12708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12709      # Now convert it back to Unix-stile (cygpath)
12710      input_path=`$CYGPATH -u "$shortmode_path"`
12711      new_path="$input_path"
12712    fi
12713  fi
12714
12715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12716  if test "x$test_cygdrive_prefix" = x; then
12717    # As a simple fix, exclude /usr/bin since it's not a real path.
12718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12720      # a path prefixed by /cygdrive for fixpath to work.
12721      new_path="$CYGWIN_ROOT_PATH$input_path"
12722    fi
12723  fi
12724
12725
12726  if test "x$path" != "x$new_path"; then
12727    BOOT_JDK="$new_path"
12728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12730  fi
12731
12732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12733
12734  path="$BOOT_JDK"
12735  has_colon=`$ECHO $path | $GREP ^.:`
12736  new_path="$path"
12737  if test "x$has_colon" = x; then
12738    # Not in mixed or Windows style, start by that.
12739    new_path=`cmd //c echo $path`
12740  fi
12741
12742
12743  input_path="$new_path"
12744  # Check if we need to convert this using DOS-style short mode. If the path
12745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12746  # take no chances and rewrite it.
12747  # Note: m4 eats our [], so we need to use [ and ] instead.
12748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12749  if test "x$has_forbidden_chars" != x; then
12750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12752  fi
12753
12754
12755  windows_path="$new_path"
12756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12757    unix_path=`$CYGPATH -u "$windows_path"`
12758    new_path="$unix_path"
12759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12761    new_path="$unix_path"
12762  fi
12763
12764  if test "x$path" != "x$new_path"; then
12765    BOOT_JDK="$new_path"
12766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12768  fi
12769
12770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12772
12773  else
12774    # We're on a posix platform. Hooray! :)
12775    path="$BOOT_JDK"
12776
12777    if test ! -f "$path" && test ! -d "$path"; then
12778      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12779    fi
12780
12781    has_space=`$ECHO "$path" | $GREP " "`
12782    if test "x$has_space" != x; then
12783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12785      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12786    fi
12787  fi
12788
12789              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12790$as_echo_n "checking for Boot JDK... " >&6; }
12791              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12792$as_echo "$BOOT_JDK" >&6; }
12793              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12794$as_echo_n "checking Boot JDK version... " >&6; }
12795              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12796              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12797$as_echo "$BOOT_JDK_VERSION" >&6; }
12798            fi # end check jdk version
12799          fi # end check rt.jar
12800        fi # end check javac
12801      fi # end check java
12802    fi # end check boot jdk found
12803  fi
12804
12805
12806  if test "x$BOOT_JDK_FOUND" = xno; then
12807    # Now execute the test
12808
12809  if test "x$PROGRAMFILES" != x; then
12810    VIRTUAL_DIR="$PROGRAMFILES/Java"
12811
12812  windows_path="$VIRTUAL_DIR"
12813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12814    unix_path=`$CYGPATH -u "$windows_path"`
12815    VIRTUAL_DIR="$unix_path"
12816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12818    VIRTUAL_DIR="$unix_path"
12819  fi
12820
12821
12822  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12823  BOOT_JDK_SUFFIX=""
12824  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12825  if test "x$ALL_JDKS_FOUND" != x; then
12826    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12827
12828  if test "x$BOOT_JDK_FOUND" = xno; then
12829    # Now execute the test
12830
12831        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12832        if test -d "$BOOT_JDK"; then
12833          BOOT_JDK_FOUND=maybe
12834          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12835$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12836        fi
12837
12838
12839    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12840    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12841      # Do we have a bin/java?
12842      if test ! -x "$BOOT_JDK/bin/java"; then
12843        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12845        BOOT_JDK_FOUND=no
12846      else
12847        # Do we have a bin/javac?
12848        if test ! -x "$BOOT_JDK/bin/javac"; then
12849          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12850$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12851          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12852$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12853          BOOT_JDK_FOUND=no
12854        else
12855          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12856          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12857            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12859            BOOT_JDK_FOUND=no
12860          else
12861            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12862            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12863
12864            # Extra M4 quote needed to protect [] in grep expression.
12865            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12866            if test "x$FOUND_VERSION_78" = x; then
12867              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12869              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12870$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12871              BOOT_JDK_FOUND=no
12872            else
12873              # We're done! :-)
12874              BOOT_JDK_FOUND=yes
12875
12876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12877
12878  # Input might be given as Windows format, start by converting to
12879  # unix format.
12880  path="$BOOT_JDK"
12881  new_path=`$CYGPATH -u "$path"`
12882
12883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12886  # "foo.exe" is OK but "foo" is an error.
12887  #
12888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12889  # It is also a way to make sure we got the proper file name for the real test later on.
12890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12891  if test "x$test_shortpath" = x; then
12892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12894    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12895  fi
12896
12897  # Call helper function which possibly converts this using DOS-style short mode.
12898  # If so, the updated path is stored in $new_path.
12899
12900  input_path="$new_path"
12901  # Check if we need to convert this using DOS-style short mode. If the path
12902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12903  # take no chances and rewrite it.
12904  # Note: m4 eats our [], so we need to use [ and ] instead.
12905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12906  if test "x$has_forbidden_chars" != x; then
12907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12911      # Going to short mode and back again did indeed matter. Since short mode is
12912      # case insensitive, let's make it lowercase to improve readability.
12913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12914      # Now convert it back to Unix-stile (cygpath)
12915      input_path=`$CYGPATH -u "$shortmode_path"`
12916      new_path="$input_path"
12917    fi
12918  fi
12919
12920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12921  if test "x$test_cygdrive_prefix" = x; then
12922    # As a simple fix, exclude /usr/bin since it's not a real path.
12923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12925      # a path prefixed by /cygdrive for fixpath to work.
12926      new_path="$CYGWIN_ROOT_PATH$input_path"
12927    fi
12928  fi
12929
12930
12931  if test "x$path" != "x$new_path"; then
12932    BOOT_JDK="$new_path"
12933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12935  fi
12936
12937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12938
12939  path="$BOOT_JDK"
12940  has_colon=`$ECHO $path | $GREP ^.:`
12941  new_path="$path"
12942  if test "x$has_colon" = x; then
12943    # Not in mixed or Windows style, start by that.
12944    new_path=`cmd //c echo $path`
12945  fi
12946
12947
12948  input_path="$new_path"
12949  # Check if we need to convert this using DOS-style short mode. If the path
12950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12951  # take no chances and rewrite it.
12952  # Note: m4 eats our [], so we need to use [ and ] instead.
12953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12954  if test "x$has_forbidden_chars" != x; then
12955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12957  fi
12958
12959
12960  windows_path="$new_path"
12961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12962    unix_path=`$CYGPATH -u "$windows_path"`
12963    new_path="$unix_path"
12964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12966    new_path="$unix_path"
12967  fi
12968
12969  if test "x$path" != "x$new_path"; then
12970    BOOT_JDK="$new_path"
12971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12973  fi
12974
12975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12977
12978  else
12979    # We're on a posix platform. Hooray! :)
12980    path="$BOOT_JDK"
12981
12982    if test ! -f "$path" && test ! -d "$path"; then
12983      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12984    fi
12985
12986    has_space=`$ECHO "$path" | $GREP " "`
12987    if test "x$has_space" != x; then
12988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12990      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12991    fi
12992  fi
12993
12994              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12995$as_echo_n "checking for Boot JDK... " >&6; }
12996              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12997$as_echo "$BOOT_JDK" >&6; }
12998              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12999$as_echo_n "checking Boot JDK version... " >&6; }
13000              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13001              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13002$as_echo "$BOOT_JDK_VERSION" >&6; }
13003            fi # end check jdk version
13004          fi # end check rt.jar
13005        fi # end check javac
13006      fi # end check java
13007    fi # end check boot jdk found
13008  fi
13009
13010    done
13011  fi
13012
13013  fi
13014
13015
13016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13018      # Do we have a bin/java?
13019      if test ! -x "$BOOT_JDK/bin/java"; then
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13022        BOOT_JDK_FOUND=no
13023      else
13024        # Do we have a bin/javac?
13025        if test ! -x "$BOOT_JDK/bin/javac"; then
13026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13030          BOOT_JDK_FOUND=no
13031        else
13032          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13033          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13036            BOOT_JDK_FOUND=no
13037          else
13038            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13040
13041            # Extra M4 quote needed to protect [] in grep expression.
13042            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13043            if test "x$FOUND_VERSION_78" = x; then
13044              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13046              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13047$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13048              BOOT_JDK_FOUND=no
13049            else
13050              # We're done! :-)
13051              BOOT_JDK_FOUND=yes
13052
13053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13054
13055  # Input might be given as Windows format, start by converting to
13056  # unix format.
13057  path="$BOOT_JDK"
13058  new_path=`$CYGPATH -u "$path"`
13059
13060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13063  # "foo.exe" is OK but "foo" is an error.
13064  #
13065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13066  # It is also a way to make sure we got the proper file name for the real test later on.
13067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13068  if test "x$test_shortpath" = x; then
13069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13071    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13072  fi
13073
13074  # Call helper function which possibly converts this using DOS-style short mode.
13075  # If so, the updated path is stored in $new_path.
13076
13077  input_path="$new_path"
13078  # Check if we need to convert this using DOS-style short mode. If the path
13079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13080  # take no chances and rewrite it.
13081  # Note: m4 eats our [], so we need to use [ and ] instead.
13082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13083  if test "x$has_forbidden_chars" != x; then
13084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13088      # Going to short mode and back again did indeed matter. Since short mode is
13089      # case insensitive, let's make it lowercase to improve readability.
13090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13091      # Now convert it back to Unix-stile (cygpath)
13092      input_path=`$CYGPATH -u "$shortmode_path"`
13093      new_path="$input_path"
13094    fi
13095  fi
13096
13097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13098  if test "x$test_cygdrive_prefix" = x; then
13099    # As a simple fix, exclude /usr/bin since it's not a real path.
13100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13102      # a path prefixed by /cygdrive for fixpath to work.
13103      new_path="$CYGWIN_ROOT_PATH$input_path"
13104    fi
13105  fi
13106
13107
13108  if test "x$path" != "x$new_path"; then
13109    BOOT_JDK="$new_path"
13110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13112  fi
13113
13114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13115
13116  path="$BOOT_JDK"
13117  has_colon=`$ECHO $path | $GREP ^.:`
13118  new_path="$path"
13119  if test "x$has_colon" = x; then
13120    # Not in mixed or Windows style, start by that.
13121    new_path=`cmd //c echo $path`
13122  fi
13123
13124
13125  input_path="$new_path"
13126  # Check if we need to convert this using DOS-style short mode. If the path
13127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13128  # take no chances and rewrite it.
13129  # Note: m4 eats our [], so we need to use [ and ] instead.
13130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13131  if test "x$has_forbidden_chars" != x; then
13132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13134  fi
13135
13136
13137  windows_path="$new_path"
13138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13139    unix_path=`$CYGPATH -u "$windows_path"`
13140    new_path="$unix_path"
13141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13143    new_path="$unix_path"
13144  fi
13145
13146  if test "x$path" != "x$new_path"; then
13147    BOOT_JDK="$new_path"
13148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13150  fi
13151
13152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13154
13155  else
13156    # We're on a posix platform. Hooray! :)
13157    path="$BOOT_JDK"
13158
13159    if test ! -f "$path" && test ! -d "$path"; then
13160      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13161    fi
13162
13163    has_space=`$ECHO "$path" | $GREP " "`
13164    if test "x$has_space" != x; then
13165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13167      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13168    fi
13169  fi
13170
13171              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13172$as_echo_n "checking for Boot JDK... " >&6; }
13173              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13174$as_echo "$BOOT_JDK" >&6; }
13175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13176$as_echo_n "checking Boot JDK version... " >&6; }
13177              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13179$as_echo "$BOOT_JDK_VERSION" >&6; }
13180            fi # end check jdk version
13181          fi # end check rt.jar
13182        fi # end check javac
13183      fi # end check java
13184    fi # end check boot jdk found
13185  fi
13186
13187
13188  if test "x$BOOT_JDK_FOUND" = xno; then
13189    # Now execute the test
13190
13191  if test "x$ProgramFiles" != x; then
13192    VIRTUAL_DIR="$ProgramFiles/Java"
13193
13194  windows_path="$VIRTUAL_DIR"
13195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13196    unix_path=`$CYGPATH -u "$windows_path"`
13197    VIRTUAL_DIR="$unix_path"
13198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13200    VIRTUAL_DIR="$unix_path"
13201  fi
13202
13203
13204  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13205  BOOT_JDK_SUFFIX=""
13206  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13207  if test "x$ALL_JDKS_FOUND" != x; then
13208    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13209
13210  if test "x$BOOT_JDK_FOUND" = xno; then
13211    # Now execute the test
13212
13213        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13214        if test -d "$BOOT_JDK"; then
13215          BOOT_JDK_FOUND=maybe
13216          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13217$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13218        fi
13219
13220
13221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13223      # Do we have a bin/java?
13224      if test ! -x "$BOOT_JDK/bin/java"; then
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13227        BOOT_JDK_FOUND=no
13228      else
13229        # Do we have a bin/javac?
13230        if test ! -x "$BOOT_JDK/bin/javac"; then
13231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13235          BOOT_JDK_FOUND=no
13236        else
13237          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13238          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13239            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13241            BOOT_JDK_FOUND=no
13242          else
13243            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13245
13246            # Extra M4 quote needed to protect [] in grep expression.
13247            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13248            if test "x$FOUND_VERSION_78" = x; then
13249              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13251              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13252$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13253              BOOT_JDK_FOUND=no
13254            else
13255              # We're done! :-)
13256              BOOT_JDK_FOUND=yes
13257
13258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13259
13260  # Input might be given as Windows format, start by converting to
13261  # unix format.
13262  path="$BOOT_JDK"
13263  new_path=`$CYGPATH -u "$path"`
13264
13265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13268  # "foo.exe" is OK but "foo" is an error.
13269  #
13270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13271  # It is also a way to make sure we got the proper file name for the real test later on.
13272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13273  if test "x$test_shortpath" = x; then
13274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13277  fi
13278
13279  # Call helper function which possibly converts this using DOS-style short mode.
13280  # If so, the updated path is stored in $new_path.
13281
13282  input_path="$new_path"
13283  # Check if we need to convert this using DOS-style short mode. If the path
13284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13285  # take no chances and rewrite it.
13286  # Note: m4 eats our [], so we need to use [ and ] instead.
13287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13288  if test "x$has_forbidden_chars" != x; then
13289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13293      # Going to short mode and back again did indeed matter. Since short mode is
13294      # case insensitive, let's make it lowercase to improve readability.
13295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13296      # Now convert it back to Unix-stile (cygpath)
13297      input_path=`$CYGPATH -u "$shortmode_path"`
13298      new_path="$input_path"
13299    fi
13300  fi
13301
13302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13303  if test "x$test_cygdrive_prefix" = x; then
13304    # As a simple fix, exclude /usr/bin since it's not a real path.
13305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13307      # a path prefixed by /cygdrive for fixpath to work.
13308      new_path="$CYGWIN_ROOT_PATH$input_path"
13309    fi
13310  fi
13311
13312
13313  if test "x$path" != "x$new_path"; then
13314    BOOT_JDK="$new_path"
13315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13317  fi
13318
13319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13320
13321  path="$BOOT_JDK"
13322  has_colon=`$ECHO $path | $GREP ^.:`
13323  new_path="$path"
13324  if test "x$has_colon" = x; then
13325    # Not in mixed or Windows style, start by that.
13326    new_path=`cmd //c echo $path`
13327  fi
13328
13329
13330  input_path="$new_path"
13331  # Check if we need to convert this using DOS-style short mode. If the path
13332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13333  # take no chances and rewrite it.
13334  # Note: m4 eats our [], so we need to use [ and ] instead.
13335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13336  if test "x$has_forbidden_chars" != x; then
13337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13339  fi
13340
13341
13342  windows_path="$new_path"
13343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13344    unix_path=`$CYGPATH -u "$windows_path"`
13345    new_path="$unix_path"
13346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13348    new_path="$unix_path"
13349  fi
13350
13351  if test "x$path" != "x$new_path"; then
13352    BOOT_JDK="$new_path"
13353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13355  fi
13356
13357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13359
13360  else
13361    # We're on a posix platform. Hooray! :)
13362    path="$BOOT_JDK"
13363
13364    if test ! -f "$path" && test ! -d "$path"; then
13365      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13366    fi
13367
13368    has_space=`$ECHO "$path" | $GREP " "`
13369    if test "x$has_space" != x; then
13370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13372      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13373    fi
13374  fi
13375
13376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13377$as_echo_n "checking for Boot JDK... " >&6; }
13378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13379$as_echo "$BOOT_JDK" >&6; }
13380              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13381$as_echo_n "checking Boot JDK version... " >&6; }
13382              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13383              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13384$as_echo "$BOOT_JDK_VERSION" >&6; }
13385            fi # end check jdk version
13386          fi # end check rt.jar
13387        fi # end check javac
13388      fi # end check java
13389    fi # end check boot jdk found
13390  fi
13391
13392    done
13393  fi
13394
13395  fi
13396
13397
13398    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13399    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13400      # Do we have a bin/java?
13401      if test ! -x "$BOOT_JDK/bin/java"; then
13402        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13404        BOOT_JDK_FOUND=no
13405      else
13406        # Do we have a bin/javac?
13407        if test ! -x "$BOOT_JDK/bin/javac"; then
13408          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13410          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13411$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13412          BOOT_JDK_FOUND=no
13413        else
13414          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13415          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13416            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13418            BOOT_JDK_FOUND=no
13419          else
13420            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13421            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13422
13423            # Extra M4 quote needed to protect [] in grep expression.
13424            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13425            if test "x$FOUND_VERSION_78" = x; then
13426              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13428              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13429$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13430              BOOT_JDK_FOUND=no
13431            else
13432              # We're done! :-)
13433              BOOT_JDK_FOUND=yes
13434
13435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13436
13437  # Input might be given as Windows format, start by converting to
13438  # unix format.
13439  path="$BOOT_JDK"
13440  new_path=`$CYGPATH -u "$path"`
13441
13442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13445  # "foo.exe" is OK but "foo" is an error.
13446  #
13447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13448  # It is also a way to make sure we got the proper file name for the real test later on.
13449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13450  if test "x$test_shortpath" = x; then
13451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13453    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13454  fi
13455
13456  # Call helper function which possibly converts this using DOS-style short mode.
13457  # If so, the updated path is stored in $new_path.
13458
13459  input_path="$new_path"
13460  # Check if we need to convert this using DOS-style short mode. If the path
13461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13462  # take no chances and rewrite it.
13463  # Note: m4 eats our [], so we need to use [ and ] instead.
13464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13465  if test "x$has_forbidden_chars" != x; then
13466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13470      # Going to short mode and back again did indeed matter. Since short mode is
13471      # case insensitive, let's make it lowercase to improve readability.
13472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13473      # Now convert it back to Unix-stile (cygpath)
13474      input_path=`$CYGPATH -u "$shortmode_path"`
13475      new_path="$input_path"
13476    fi
13477  fi
13478
13479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13480  if test "x$test_cygdrive_prefix" = x; then
13481    # As a simple fix, exclude /usr/bin since it's not a real path.
13482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13484      # a path prefixed by /cygdrive for fixpath to work.
13485      new_path="$CYGWIN_ROOT_PATH$input_path"
13486    fi
13487  fi
13488
13489
13490  if test "x$path" != "x$new_path"; then
13491    BOOT_JDK="$new_path"
13492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13494  fi
13495
13496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13497
13498  path="$BOOT_JDK"
13499  has_colon=`$ECHO $path | $GREP ^.:`
13500  new_path="$path"
13501  if test "x$has_colon" = x; then
13502    # Not in mixed or Windows style, start by that.
13503    new_path=`cmd //c echo $path`
13504  fi
13505
13506
13507  input_path="$new_path"
13508  # Check if we need to convert this using DOS-style short mode. If the path
13509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13510  # take no chances and rewrite it.
13511  # Note: m4 eats our [], so we need to use [ and ] instead.
13512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13513  if test "x$has_forbidden_chars" != x; then
13514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13516  fi
13517
13518
13519  windows_path="$new_path"
13520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13521    unix_path=`$CYGPATH -u "$windows_path"`
13522    new_path="$unix_path"
13523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13525    new_path="$unix_path"
13526  fi
13527
13528  if test "x$path" != "x$new_path"; then
13529    BOOT_JDK="$new_path"
13530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13532  fi
13533
13534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13536
13537  else
13538    # We're on a posix platform. Hooray! :)
13539    path="$BOOT_JDK"
13540
13541    if test ! -f "$path" && test ! -d "$path"; then
13542      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13543    fi
13544
13545    has_space=`$ECHO "$path" | $GREP " "`
13546    if test "x$has_space" != x; then
13547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13548$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13549      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13550    fi
13551  fi
13552
13553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13554$as_echo_n "checking for Boot JDK... " >&6; }
13555              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13556$as_echo "$BOOT_JDK" >&6; }
13557              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13558$as_echo_n "checking Boot JDK version... " >&6; }
13559              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13560              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13561$as_echo "$BOOT_JDK_VERSION" >&6; }
13562            fi # end check jdk version
13563          fi # end check rt.jar
13564        fi # end check javac
13565      fi # end check java
13566    fi # end check boot jdk found
13567  fi
13568
13569
13570  if test "x$BOOT_JDK_FOUND" = xno; then
13571    # Now execute the test
13572
13573  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13574  BOOT_JDK_SUFFIX=""
13575  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13576  if test "x$ALL_JDKS_FOUND" != x; then
13577    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13578
13579  if test "x$BOOT_JDK_FOUND" = xno; then
13580    # Now execute the test
13581
13582        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13583        if test -d "$BOOT_JDK"; then
13584          BOOT_JDK_FOUND=maybe
13585          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13586$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13587        fi
13588
13589
13590    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13591    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13592      # Do we have a bin/java?
13593      if test ! -x "$BOOT_JDK/bin/java"; then
13594        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13596        BOOT_JDK_FOUND=no
13597      else
13598        # Do we have a bin/javac?
13599        if test ! -x "$BOOT_JDK/bin/javac"; then
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13602          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13603$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13604          BOOT_JDK_FOUND=no
13605        else
13606          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13607          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13608            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13610            BOOT_JDK_FOUND=no
13611          else
13612            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13613            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13614
13615            # Extra M4 quote needed to protect [] in grep expression.
13616            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13617            if test "x$FOUND_VERSION_78" = x; then
13618              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13620              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13621$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13622              BOOT_JDK_FOUND=no
13623            else
13624              # We're done! :-)
13625              BOOT_JDK_FOUND=yes
13626
13627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13628
13629  # Input might be given as Windows format, start by converting to
13630  # unix format.
13631  path="$BOOT_JDK"
13632  new_path=`$CYGPATH -u "$path"`
13633
13634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13637  # "foo.exe" is OK but "foo" is an error.
13638  #
13639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13640  # It is also a way to make sure we got the proper file name for the real test later on.
13641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13642  if test "x$test_shortpath" = x; then
13643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13646  fi
13647
13648  # Call helper function which possibly converts this using DOS-style short mode.
13649  # If so, the updated path is stored in $new_path.
13650
13651  input_path="$new_path"
13652  # Check if we need to convert this using DOS-style short mode. If the path
13653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13654  # take no chances and rewrite it.
13655  # Note: m4 eats our [], so we need to use [ and ] instead.
13656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13657  if test "x$has_forbidden_chars" != x; then
13658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13662      # Going to short mode and back again did indeed matter. Since short mode is
13663      # case insensitive, let's make it lowercase to improve readability.
13664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13665      # Now convert it back to Unix-stile (cygpath)
13666      input_path=`$CYGPATH -u "$shortmode_path"`
13667      new_path="$input_path"
13668    fi
13669  fi
13670
13671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13672  if test "x$test_cygdrive_prefix" = x; then
13673    # As a simple fix, exclude /usr/bin since it's not a real path.
13674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13676      # a path prefixed by /cygdrive for fixpath to work.
13677      new_path="$CYGWIN_ROOT_PATH$input_path"
13678    fi
13679  fi
13680
13681
13682  if test "x$path" != "x$new_path"; then
13683    BOOT_JDK="$new_path"
13684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13686  fi
13687
13688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13689
13690  path="$BOOT_JDK"
13691  has_colon=`$ECHO $path | $GREP ^.:`
13692  new_path="$path"
13693  if test "x$has_colon" = x; then
13694    # Not in mixed or Windows style, start by that.
13695    new_path=`cmd //c echo $path`
13696  fi
13697
13698
13699  input_path="$new_path"
13700  # Check if we need to convert this using DOS-style short mode. If the path
13701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13702  # take no chances and rewrite it.
13703  # Note: m4 eats our [], so we need to use [ and ] instead.
13704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13705  if test "x$has_forbidden_chars" != x; then
13706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13708  fi
13709
13710
13711  windows_path="$new_path"
13712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13713    unix_path=`$CYGPATH -u "$windows_path"`
13714    new_path="$unix_path"
13715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13717    new_path="$unix_path"
13718  fi
13719
13720  if test "x$path" != "x$new_path"; then
13721    BOOT_JDK="$new_path"
13722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13724  fi
13725
13726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13728
13729  else
13730    # We're on a posix platform. Hooray! :)
13731    path="$BOOT_JDK"
13732
13733    if test ! -f "$path" && test ! -d "$path"; then
13734      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13735    fi
13736
13737    has_space=`$ECHO "$path" | $GREP " "`
13738    if test "x$has_space" != x; then
13739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13741      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13742    fi
13743  fi
13744
13745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13746$as_echo_n "checking for Boot JDK... " >&6; }
13747              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13748$as_echo "$BOOT_JDK" >&6; }
13749              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13750$as_echo_n "checking Boot JDK version... " >&6; }
13751              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13752              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13753$as_echo "$BOOT_JDK_VERSION" >&6; }
13754            fi # end check jdk version
13755          fi # end check rt.jar
13756        fi # end check javac
13757      fi # end check java
13758    fi # end check boot jdk found
13759  fi
13760
13761    done
13762  fi
13763
13764
13765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13767      # Do we have a bin/java?
13768      if test ! -x "$BOOT_JDK/bin/java"; then
13769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13771        BOOT_JDK_FOUND=no
13772      else
13773        # Do we have a bin/javac?
13774        if test ! -x "$BOOT_JDK/bin/javac"; then
13775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13779          BOOT_JDK_FOUND=no
13780        else
13781          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13782          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13785            BOOT_JDK_FOUND=no
13786          else
13787            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13788            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13789
13790            # Extra M4 quote needed to protect [] in grep expression.
13791            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13792            if test "x$FOUND_VERSION_78" = x; then
13793              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13795              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13796$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13797              BOOT_JDK_FOUND=no
13798            else
13799              # We're done! :-)
13800              BOOT_JDK_FOUND=yes
13801
13802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13803
13804  # Input might be given as Windows format, start by converting to
13805  # unix format.
13806  path="$BOOT_JDK"
13807  new_path=`$CYGPATH -u "$path"`
13808
13809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13812  # "foo.exe" is OK but "foo" is an error.
13813  #
13814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13815  # It is also a way to make sure we got the proper file name for the real test later on.
13816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13817  if test "x$test_shortpath" = x; then
13818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13821  fi
13822
13823  # Call helper function which possibly converts this using DOS-style short mode.
13824  # If so, the updated path is stored in $new_path.
13825
13826  input_path="$new_path"
13827  # Check if we need to convert this using DOS-style short mode. If the path
13828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13829  # take no chances and rewrite it.
13830  # Note: m4 eats our [], so we need to use [ and ] instead.
13831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13832  if test "x$has_forbidden_chars" != x; then
13833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13837      # Going to short mode and back again did indeed matter. Since short mode is
13838      # case insensitive, let's make it lowercase to improve readability.
13839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13840      # Now convert it back to Unix-stile (cygpath)
13841      input_path=`$CYGPATH -u "$shortmode_path"`
13842      new_path="$input_path"
13843    fi
13844  fi
13845
13846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13847  if test "x$test_cygdrive_prefix" = x; then
13848    # As a simple fix, exclude /usr/bin since it's not a real path.
13849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13851      # a path prefixed by /cygdrive for fixpath to work.
13852      new_path="$CYGWIN_ROOT_PATH$input_path"
13853    fi
13854  fi
13855
13856
13857  if test "x$path" != "x$new_path"; then
13858    BOOT_JDK="$new_path"
13859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13861  fi
13862
13863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13864
13865  path="$BOOT_JDK"
13866  has_colon=`$ECHO $path | $GREP ^.:`
13867  new_path="$path"
13868  if test "x$has_colon" = x; then
13869    # Not in mixed or Windows style, start by that.
13870    new_path=`cmd //c echo $path`
13871  fi
13872
13873
13874  input_path="$new_path"
13875  # Check if we need to convert this using DOS-style short mode. If the path
13876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13877  # take no chances and rewrite it.
13878  # Note: m4 eats our [], so we need to use [ and ] instead.
13879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13880  if test "x$has_forbidden_chars" != x; then
13881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13883  fi
13884
13885
13886  windows_path="$new_path"
13887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13888    unix_path=`$CYGPATH -u "$windows_path"`
13889    new_path="$unix_path"
13890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13892    new_path="$unix_path"
13893  fi
13894
13895  if test "x$path" != "x$new_path"; then
13896    BOOT_JDK="$new_path"
13897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13899  fi
13900
13901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13903
13904  else
13905    # We're on a posix platform. Hooray! :)
13906    path="$BOOT_JDK"
13907
13908    if test ! -f "$path" && test ! -d "$path"; then
13909      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13910    fi
13911
13912    has_space=`$ECHO "$path" | $GREP " "`
13913    if test "x$has_space" != x; then
13914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13917    fi
13918  fi
13919
13920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13921$as_echo_n "checking for Boot JDK... " >&6; }
13922              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13923$as_echo "$BOOT_JDK" >&6; }
13924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13925$as_echo_n "checking Boot JDK version... " >&6; }
13926              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13927              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13928$as_echo "$BOOT_JDK_VERSION" >&6; }
13929            fi # end check jdk version
13930          fi # end check rt.jar
13931        fi # end check javac
13932      fi # end check java
13933    fi # end check boot jdk found
13934  fi
13935
13936  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13937
13938  if test "x$BOOT_JDK_FOUND" = xno; then
13939    # Now execute the test
13940
13941  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13942  BOOT_JDK_SUFFIX="/Contents/Home"
13943  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13944  if test "x$ALL_JDKS_FOUND" != x; then
13945    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13946
13947  if test "x$BOOT_JDK_FOUND" = xno; then
13948    # Now execute the test
13949
13950        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13951        if test -d "$BOOT_JDK"; then
13952          BOOT_JDK_FOUND=maybe
13953          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13954$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13955        fi
13956
13957
13958    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13959    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13960      # Do we have a bin/java?
13961      if test ! -x "$BOOT_JDK/bin/java"; then
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13963$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13964        BOOT_JDK_FOUND=no
13965      else
13966        # Do we have a bin/javac?
13967        if test ! -x "$BOOT_JDK/bin/javac"; then
13968          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13970          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13971$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13972          BOOT_JDK_FOUND=no
13973        else
13974          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13975          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13976            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13978            BOOT_JDK_FOUND=no
13979          else
13980            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13981            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13982
13983            # Extra M4 quote needed to protect [] in grep expression.
13984            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13985            if test "x$FOUND_VERSION_78" = x; then
13986              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13988              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13989$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13990              BOOT_JDK_FOUND=no
13991            else
13992              # We're done! :-)
13993              BOOT_JDK_FOUND=yes
13994
13995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13996
13997  # Input might be given as Windows format, start by converting to
13998  # unix format.
13999  path="$BOOT_JDK"
14000  new_path=`$CYGPATH -u "$path"`
14001
14002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14005  # "foo.exe" is OK but "foo" is an error.
14006  #
14007  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14008  # It is also a way to make sure we got the proper file name for the real test later on.
14009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14010  if test "x$test_shortpath" = x; then
14011    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14012$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14013    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14014  fi
14015
14016  # Call helper function which possibly converts this using DOS-style short mode.
14017  # If so, the updated path is stored in $new_path.
14018
14019  input_path="$new_path"
14020  # Check if we need to convert this using DOS-style short mode. If the path
14021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14022  # take no chances and rewrite it.
14023  # Note: m4 eats our [], so we need to use [ and ] instead.
14024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14025  if test "x$has_forbidden_chars" != x; then
14026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14027    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14028    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14029    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14030      # Going to short mode and back again did indeed matter. Since short mode is
14031      # case insensitive, let's make it lowercase to improve readability.
14032      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14033      # Now convert it back to Unix-stile (cygpath)
14034      input_path=`$CYGPATH -u "$shortmode_path"`
14035      new_path="$input_path"
14036    fi
14037  fi
14038
14039  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14040  if test "x$test_cygdrive_prefix" = x; then
14041    # As a simple fix, exclude /usr/bin since it's not a real path.
14042    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14043      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14044      # a path prefixed by /cygdrive for fixpath to work.
14045      new_path="$CYGWIN_ROOT_PATH$input_path"
14046    fi
14047  fi
14048
14049
14050  if test "x$path" != "x$new_path"; then
14051    BOOT_JDK="$new_path"
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14053$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14054  fi
14055
14056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14057
14058  path="$BOOT_JDK"
14059  has_colon=`$ECHO $path | $GREP ^.:`
14060  new_path="$path"
14061  if test "x$has_colon" = x; then
14062    # Not in mixed or Windows style, start by that.
14063    new_path=`cmd //c echo $path`
14064  fi
14065
14066
14067  input_path="$new_path"
14068  # Check if we need to convert this using DOS-style short mode. If the path
14069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14070  # take no chances and rewrite it.
14071  # Note: m4 eats our [], so we need to use [ and ] instead.
14072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14073  if test "x$has_forbidden_chars" != x; then
14074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14075    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14076  fi
14077
14078
14079  windows_path="$new_path"
14080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14081    unix_path=`$CYGPATH -u "$windows_path"`
14082    new_path="$unix_path"
14083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14085    new_path="$unix_path"
14086  fi
14087
14088  if test "x$path" != "x$new_path"; then
14089    BOOT_JDK="$new_path"
14090    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14091$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14092  fi
14093
14094  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14095  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14096
14097  else
14098    # We're on a posix platform. Hooray! :)
14099    path="$BOOT_JDK"
14100
14101    if test ! -f "$path" && test ! -d "$path"; then
14102      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14103    fi
14104
14105    has_space=`$ECHO "$path" | $GREP " "`
14106    if test "x$has_space" != x; then
14107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14108$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14109      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14110    fi
14111  fi
14112
14113              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14114$as_echo_n "checking for Boot JDK... " >&6; }
14115              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14116$as_echo "$BOOT_JDK" >&6; }
14117              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14118$as_echo_n "checking Boot JDK version... " >&6; }
14119              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14120              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14121$as_echo "$BOOT_JDK_VERSION" >&6; }
14122            fi # end check jdk version
14123          fi # end check rt.jar
14124        fi # end check javac
14125      fi # end check java
14126    fi # end check boot jdk found
14127  fi
14128
14129    done
14130  fi
14131
14132
14133    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14134    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14135      # Do we have a bin/java?
14136      if test ! -x "$BOOT_JDK/bin/java"; then
14137        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14139        BOOT_JDK_FOUND=no
14140      else
14141        # Do we have a bin/javac?
14142        if test ! -x "$BOOT_JDK/bin/javac"; then
14143          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14145          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14146$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14147          BOOT_JDK_FOUND=no
14148        else
14149          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14150          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14151            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14153            BOOT_JDK_FOUND=no
14154          else
14155            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14157
14158            # Extra M4 quote needed to protect [] in grep expression.
14159            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14160            if test "x$FOUND_VERSION_78" = x; then
14161              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14163              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14164$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14165              BOOT_JDK_FOUND=no
14166            else
14167              # We're done! :-)
14168              BOOT_JDK_FOUND=yes
14169
14170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14171
14172  # Input might be given as Windows format, start by converting to
14173  # unix format.
14174  path="$BOOT_JDK"
14175  new_path=`$CYGPATH -u "$path"`
14176
14177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14180  # "foo.exe" is OK but "foo" is an error.
14181  #
14182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14183  # It is also a way to make sure we got the proper file name for the real test later on.
14184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14185  if test "x$test_shortpath" = x; then
14186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14189  fi
14190
14191  # Call helper function which possibly converts this using DOS-style short mode.
14192  # If so, the updated path is stored in $new_path.
14193
14194  input_path="$new_path"
14195  # Check if we need to convert this using DOS-style short mode. If the path
14196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14197  # take no chances and rewrite it.
14198  # Note: m4 eats our [], so we need to use [ and ] instead.
14199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14200  if test "x$has_forbidden_chars" != x; then
14201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14205      # Going to short mode and back again did indeed matter. Since short mode is
14206      # case insensitive, let's make it lowercase to improve readability.
14207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14208      # Now convert it back to Unix-stile (cygpath)
14209      input_path=`$CYGPATH -u "$shortmode_path"`
14210      new_path="$input_path"
14211    fi
14212  fi
14213
14214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14215  if test "x$test_cygdrive_prefix" = x; then
14216    # As a simple fix, exclude /usr/bin since it's not a real path.
14217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14219      # a path prefixed by /cygdrive for fixpath to work.
14220      new_path="$CYGWIN_ROOT_PATH$input_path"
14221    fi
14222  fi
14223
14224
14225  if test "x$path" != "x$new_path"; then
14226    BOOT_JDK="$new_path"
14227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14229  fi
14230
14231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14232
14233  path="$BOOT_JDK"
14234  has_colon=`$ECHO $path | $GREP ^.:`
14235  new_path="$path"
14236  if test "x$has_colon" = x; then
14237    # Not in mixed or Windows style, start by that.
14238    new_path=`cmd //c echo $path`
14239  fi
14240
14241
14242  input_path="$new_path"
14243  # Check if we need to convert this using DOS-style short mode. If the path
14244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14245  # take no chances and rewrite it.
14246  # Note: m4 eats our [], so we need to use [ and ] instead.
14247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14248  if test "x$has_forbidden_chars" != x; then
14249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14251  fi
14252
14253
14254  windows_path="$new_path"
14255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14256    unix_path=`$CYGPATH -u "$windows_path"`
14257    new_path="$unix_path"
14258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14260    new_path="$unix_path"
14261  fi
14262
14263  if test "x$path" != "x$new_path"; then
14264    BOOT_JDK="$new_path"
14265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14267  fi
14268
14269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14271
14272  else
14273    # We're on a posix platform. Hooray! :)
14274    path="$BOOT_JDK"
14275
14276    if test ! -f "$path" && test ! -d "$path"; then
14277      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14278    fi
14279
14280    has_space=`$ECHO "$path" | $GREP " "`
14281    if test "x$has_space" != x; then
14282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14284      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14285    fi
14286  fi
14287
14288              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14289$as_echo_n "checking for Boot JDK... " >&6; }
14290              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14291$as_echo "$BOOT_JDK" >&6; }
14292              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14293$as_echo_n "checking Boot JDK version... " >&6; }
14294              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14295              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14296$as_echo "$BOOT_JDK_VERSION" >&6; }
14297            fi # end check jdk version
14298          fi # end check rt.jar
14299        fi # end check javac
14300      fi # end check java
14301    fi # end check boot jdk found
14302  fi
14303
14304
14305  if test "x$BOOT_JDK_FOUND" = xno; then
14306    # Now execute the test
14307
14308  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14309  BOOT_JDK_SUFFIX="/Contents/Home"
14310  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14311  if test "x$ALL_JDKS_FOUND" != x; then
14312    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14313
14314  if test "x$BOOT_JDK_FOUND" = xno; then
14315    # Now execute the test
14316
14317        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14318        if test -d "$BOOT_JDK"; then
14319          BOOT_JDK_FOUND=maybe
14320          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14321$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14322        fi
14323
14324
14325    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14326    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14327      # Do we have a bin/java?
14328      if test ! -x "$BOOT_JDK/bin/java"; then
14329        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14331        BOOT_JDK_FOUND=no
14332      else
14333        # Do we have a bin/javac?
14334        if test ! -x "$BOOT_JDK/bin/javac"; then
14335          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14337          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14338$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14339          BOOT_JDK_FOUND=no
14340        else
14341          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14342          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14343            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14345            BOOT_JDK_FOUND=no
14346          else
14347            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14349
14350            # Extra M4 quote needed to protect [] in grep expression.
14351            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14352            if test "x$FOUND_VERSION_78" = x; then
14353              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14355              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14356$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14357              BOOT_JDK_FOUND=no
14358            else
14359              # We're done! :-)
14360              BOOT_JDK_FOUND=yes
14361
14362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14363
14364  # Input might be given as Windows format, start by converting to
14365  # unix format.
14366  path="$BOOT_JDK"
14367  new_path=`$CYGPATH -u "$path"`
14368
14369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14372  # "foo.exe" is OK but "foo" is an error.
14373  #
14374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14375  # It is also a way to make sure we got the proper file name for the real test later on.
14376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14377  if test "x$test_shortpath" = x; then
14378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14381  fi
14382
14383  # Call helper function which possibly converts this using DOS-style short mode.
14384  # If so, the updated path is stored in $new_path.
14385
14386  input_path="$new_path"
14387  # Check if we need to convert this using DOS-style short mode. If the path
14388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14389  # take no chances and rewrite it.
14390  # Note: m4 eats our [], so we need to use [ and ] instead.
14391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14392  if test "x$has_forbidden_chars" != x; then
14393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14397      # Going to short mode and back again did indeed matter. Since short mode is
14398      # case insensitive, let's make it lowercase to improve readability.
14399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14400      # Now convert it back to Unix-stile (cygpath)
14401      input_path=`$CYGPATH -u "$shortmode_path"`
14402      new_path="$input_path"
14403    fi
14404  fi
14405
14406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14407  if test "x$test_cygdrive_prefix" = x; then
14408    # As a simple fix, exclude /usr/bin since it's not a real path.
14409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14411      # a path prefixed by /cygdrive for fixpath to work.
14412      new_path="$CYGWIN_ROOT_PATH$input_path"
14413    fi
14414  fi
14415
14416
14417  if test "x$path" != "x$new_path"; then
14418    BOOT_JDK="$new_path"
14419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14421  fi
14422
14423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14424
14425  path="$BOOT_JDK"
14426  has_colon=`$ECHO $path | $GREP ^.:`
14427  new_path="$path"
14428  if test "x$has_colon" = x; then
14429    # Not in mixed or Windows style, start by that.
14430    new_path=`cmd //c echo $path`
14431  fi
14432
14433
14434  input_path="$new_path"
14435  # Check if we need to convert this using DOS-style short mode. If the path
14436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14437  # take no chances and rewrite it.
14438  # Note: m4 eats our [], so we need to use [ and ] instead.
14439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14440  if test "x$has_forbidden_chars" != x; then
14441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14443  fi
14444
14445
14446  windows_path="$new_path"
14447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14448    unix_path=`$CYGPATH -u "$windows_path"`
14449    new_path="$unix_path"
14450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14452    new_path="$unix_path"
14453  fi
14454
14455  if test "x$path" != "x$new_path"; then
14456    BOOT_JDK="$new_path"
14457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14459  fi
14460
14461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14463
14464  else
14465    # We're on a posix platform. Hooray! :)
14466    path="$BOOT_JDK"
14467
14468    if test ! -f "$path" && test ! -d "$path"; then
14469      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14470    fi
14471
14472    has_space=`$ECHO "$path" | $GREP " "`
14473    if test "x$has_space" != x; then
14474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14477    fi
14478  fi
14479
14480              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14481$as_echo_n "checking for Boot JDK... " >&6; }
14482              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14483$as_echo "$BOOT_JDK" >&6; }
14484              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14485$as_echo_n "checking Boot JDK version... " >&6; }
14486              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14487              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14488$as_echo "$BOOT_JDK_VERSION" >&6; }
14489            fi # end check jdk version
14490          fi # end check rt.jar
14491        fi # end check javac
14492      fi # end check java
14493    fi # end check boot jdk found
14494  fi
14495
14496    done
14497  fi
14498
14499
14500    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14501    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14502      # Do we have a bin/java?
14503      if test ! -x "$BOOT_JDK/bin/java"; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14506        BOOT_JDK_FOUND=no
14507      else
14508        # Do we have a bin/javac?
14509        if test ! -x "$BOOT_JDK/bin/javac"; then
14510          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14512          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14513$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14514          BOOT_JDK_FOUND=no
14515        else
14516          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14517          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14518            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14520            BOOT_JDK_FOUND=no
14521          else
14522            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14523            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14524
14525            # Extra M4 quote needed to protect [] in grep expression.
14526            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14527            if test "x$FOUND_VERSION_78" = x; then
14528              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14530              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14531$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14532              BOOT_JDK_FOUND=no
14533            else
14534              # We're done! :-)
14535              BOOT_JDK_FOUND=yes
14536
14537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14538
14539  # Input might be given as Windows format, start by converting to
14540  # unix format.
14541  path="$BOOT_JDK"
14542  new_path=`$CYGPATH -u "$path"`
14543
14544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14547  # "foo.exe" is OK but "foo" is an error.
14548  #
14549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14550  # It is also a way to make sure we got the proper file name for the real test later on.
14551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14552  if test "x$test_shortpath" = x; then
14553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14555    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14556  fi
14557
14558  # Call helper function which possibly converts this using DOS-style short mode.
14559  # If so, the updated path is stored in $new_path.
14560
14561  input_path="$new_path"
14562  # Check if we need to convert this using DOS-style short mode. If the path
14563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14564  # take no chances and rewrite it.
14565  # Note: m4 eats our [], so we need to use [ and ] instead.
14566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14567  if test "x$has_forbidden_chars" != x; then
14568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14572      # Going to short mode and back again did indeed matter. Since short mode is
14573      # case insensitive, let's make it lowercase to improve readability.
14574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14575      # Now convert it back to Unix-stile (cygpath)
14576      input_path=`$CYGPATH -u "$shortmode_path"`
14577      new_path="$input_path"
14578    fi
14579  fi
14580
14581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14582  if test "x$test_cygdrive_prefix" = x; then
14583    # As a simple fix, exclude /usr/bin since it's not a real path.
14584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14586      # a path prefixed by /cygdrive for fixpath to work.
14587      new_path="$CYGWIN_ROOT_PATH$input_path"
14588    fi
14589  fi
14590
14591
14592  if test "x$path" != "x$new_path"; then
14593    BOOT_JDK="$new_path"
14594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14596  fi
14597
14598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14599
14600  path="$BOOT_JDK"
14601  has_colon=`$ECHO $path | $GREP ^.:`
14602  new_path="$path"
14603  if test "x$has_colon" = x; then
14604    # Not in mixed or Windows style, start by that.
14605    new_path=`cmd //c echo $path`
14606  fi
14607
14608
14609  input_path="$new_path"
14610  # Check if we need to convert this using DOS-style short mode. If the path
14611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14612  # take no chances and rewrite it.
14613  # Note: m4 eats our [], so we need to use [ and ] instead.
14614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14615  if test "x$has_forbidden_chars" != x; then
14616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14618  fi
14619
14620
14621  windows_path="$new_path"
14622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14623    unix_path=`$CYGPATH -u "$windows_path"`
14624    new_path="$unix_path"
14625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14627    new_path="$unix_path"
14628  fi
14629
14630  if test "x$path" != "x$new_path"; then
14631    BOOT_JDK="$new_path"
14632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14634  fi
14635
14636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14638
14639  else
14640    # We're on a posix platform. Hooray! :)
14641    path="$BOOT_JDK"
14642
14643    if test ! -f "$path" && test ! -d "$path"; then
14644      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14645    fi
14646
14647    has_space=`$ECHO "$path" | $GREP " "`
14648    if test "x$has_space" != x; then
14649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14651      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14652    fi
14653  fi
14654
14655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14656$as_echo_n "checking for Boot JDK... " >&6; }
14657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14658$as_echo "$BOOT_JDK" >&6; }
14659              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14660$as_echo_n "checking Boot JDK version... " >&6; }
14661              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14662              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14663$as_echo "$BOOT_JDK_VERSION" >&6; }
14664            fi # end check jdk version
14665          fi # end check rt.jar
14666        fi # end check javac
14667      fi # end check java
14668    fi # end check boot jdk found
14669  fi
14670
14671  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14672
14673  if test "x$BOOT_JDK_FOUND" = xno; then
14674    # Now execute the test
14675
14676  BOOT_JDK_PREFIX="/usr/lib/jvm"
14677  BOOT_JDK_SUFFIX=""
14678  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14679  if test "x$ALL_JDKS_FOUND" != x; then
14680    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14681
14682  if test "x$BOOT_JDK_FOUND" = xno; then
14683    # Now execute the test
14684
14685        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14686        if test -d "$BOOT_JDK"; then
14687          BOOT_JDK_FOUND=maybe
14688          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14689$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14690        fi
14691
14692
14693    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14694    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14695      # Do we have a bin/java?
14696      if test ! -x "$BOOT_JDK/bin/java"; then
14697        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14699        BOOT_JDK_FOUND=no
14700      else
14701        # Do we have a bin/javac?
14702        if test ! -x "$BOOT_JDK/bin/javac"; then
14703          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14705          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14706$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14707          BOOT_JDK_FOUND=no
14708        else
14709          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14710          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14711            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14713            BOOT_JDK_FOUND=no
14714          else
14715            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14716            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14717
14718            # Extra M4 quote needed to protect [] in grep expression.
14719            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14720            if test "x$FOUND_VERSION_78" = x; then
14721              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14723              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14724$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14725              BOOT_JDK_FOUND=no
14726            else
14727              # We're done! :-)
14728              BOOT_JDK_FOUND=yes
14729
14730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14731
14732  # Input might be given as Windows format, start by converting to
14733  # unix format.
14734  path="$BOOT_JDK"
14735  new_path=`$CYGPATH -u "$path"`
14736
14737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14740  # "foo.exe" is OK but "foo" is an error.
14741  #
14742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14743  # It is also a way to make sure we got the proper file name for the real test later on.
14744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14745  if test "x$test_shortpath" = x; then
14746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14748    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14749  fi
14750
14751  # Call helper function which possibly converts this using DOS-style short mode.
14752  # If so, the updated path is stored in $new_path.
14753
14754  input_path="$new_path"
14755  # Check if we need to convert this using DOS-style short mode. If the path
14756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14757  # take no chances and rewrite it.
14758  # Note: m4 eats our [], so we need to use [ and ] instead.
14759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14760  if test "x$has_forbidden_chars" != x; then
14761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14765      # Going to short mode and back again did indeed matter. Since short mode is
14766      # case insensitive, let's make it lowercase to improve readability.
14767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14768      # Now convert it back to Unix-stile (cygpath)
14769      input_path=`$CYGPATH -u "$shortmode_path"`
14770      new_path="$input_path"
14771    fi
14772  fi
14773
14774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14775  if test "x$test_cygdrive_prefix" = x; then
14776    # As a simple fix, exclude /usr/bin since it's not a real path.
14777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14779      # a path prefixed by /cygdrive for fixpath to work.
14780      new_path="$CYGWIN_ROOT_PATH$input_path"
14781    fi
14782  fi
14783
14784
14785  if test "x$path" != "x$new_path"; then
14786    BOOT_JDK="$new_path"
14787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14789  fi
14790
14791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14792
14793  path="$BOOT_JDK"
14794  has_colon=`$ECHO $path | $GREP ^.:`
14795  new_path="$path"
14796  if test "x$has_colon" = x; then
14797    # Not in mixed or Windows style, start by that.
14798    new_path=`cmd //c echo $path`
14799  fi
14800
14801
14802  input_path="$new_path"
14803  # Check if we need to convert this using DOS-style short mode. If the path
14804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14805  # take no chances and rewrite it.
14806  # Note: m4 eats our [], so we need to use [ and ] instead.
14807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14808  if test "x$has_forbidden_chars" != x; then
14809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14811  fi
14812
14813
14814  windows_path="$new_path"
14815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14816    unix_path=`$CYGPATH -u "$windows_path"`
14817    new_path="$unix_path"
14818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14820    new_path="$unix_path"
14821  fi
14822
14823  if test "x$path" != "x$new_path"; then
14824    BOOT_JDK="$new_path"
14825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14827  fi
14828
14829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14831
14832  else
14833    # We're on a posix platform. Hooray! :)
14834    path="$BOOT_JDK"
14835
14836    if test ! -f "$path" && test ! -d "$path"; then
14837      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14838    fi
14839
14840    has_space=`$ECHO "$path" | $GREP " "`
14841    if test "x$has_space" != x; then
14842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14844      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14845    fi
14846  fi
14847
14848              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14849$as_echo_n "checking for Boot JDK... " >&6; }
14850              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14851$as_echo "$BOOT_JDK" >&6; }
14852              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14853$as_echo_n "checking Boot JDK version... " >&6; }
14854              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14855              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14856$as_echo "$BOOT_JDK_VERSION" >&6; }
14857            fi # end check jdk version
14858          fi # end check rt.jar
14859        fi # end check javac
14860      fi # end check java
14861    fi # end check boot jdk found
14862  fi
14863
14864    done
14865  fi
14866
14867
14868    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14869    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14870      # Do we have a bin/java?
14871      if test ! -x "$BOOT_JDK/bin/java"; then
14872        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14874        BOOT_JDK_FOUND=no
14875      else
14876        # Do we have a bin/javac?
14877        if test ! -x "$BOOT_JDK/bin/javac"; then
14878          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14881$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14882          BOOT_JDK_FOUND=no
14883        else
14884          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14885          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14886            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14888            BOOT_JDK_FOUND=no
14889          else
14890            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14892
14893            # Extra M4 quote needed to protect [] in grep expression.
14894            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14895            if test "x$FOUND_VERSION_78" = x; then
14896              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14898              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14899$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14900              BOOT_JDK_FOUND=no
14901            else
14902              # We're done! :-)
14903              BOOT_JDK_FOUND=yes
14904
14905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14906
14907  # Input might be given as Windows format, start by converting to
14908  # unix format.
14909  path="$BOOT_JDK"
14910  new_path=`$CYGPATH -u "$path"`
14911
14912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14915  # "foo.exe" is OK but "foo" is an error.
14916  #
14917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14918  # It is also a way to make sure we got the proper file name for the real test later on.
14919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14920  if test "x$test_shortpath" = x; then
14921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14923    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14924  fi
14925
14926  # Call helper function which possibly converts this using DOS-style short mode.
14927  # If so, the updated path is stored in $new_path.
14928
14929  input_path="$new_path"
14930  # Check if we need to convert this using DOS-style short mode. If the path
14931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14932  # take no chances and rewrite it.
14933  # Note: m4 eats our [], so we need to use [ and ] instead.
14934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14935  if test "x$has_forbidden_chars" != x; then
14936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14940      # Going to short mode and back again did indeed matter. Since short mode is
14941      # case insensitive, let's make it lowercase to improve readability.
14942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14943      # Now convert it back to Unix-stile (cygpath)
14944      input_path=`$CYGPATH -u "$shortmode_path"`
14945      new_path="$input_path"
14946    fi
14947  fi
14948
14949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14950  if test "x$test_cygdrive_prefix" = x; then
14951    # As a simple fix, exclude /usr/bin since it's not a real path.
14952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14954      # a path prefixed by /cygdrive for fixpath to work.
14955      new_path="$CYGWIN_ROOT_PATH$input_path"
14956    fi
14957  fi
14958
14959
14960  if test "x$path" != "x$new_path"; then
14961    BOOT_JDK="$new_path"
14962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14964  fi
14965
14966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14967
14968  path="$BOOT_JDK"
14969  has_colon=`$ECHO $path | $GREP ^.:`
14970  new_path="$path"
14971  if test "x$has_colon" = x; then
14972    # Not in mixed or Windows style, start by that.
14973    new_path=`cmd //c echo $path`
14974  fi
14975
14976
14977  input_path="$new_path"
14978  # Check if we need to convert this using DOS-style short mode. If the path
14979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14980  # take no chances and rewrite it.
14981  # Note: m4 eats our [], so we need to use [ and ] instead.
14982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14983  if test "x$has_forbidden_chars" != x; then
14984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14986  fi
14987
14988
14989  windows_path="$new_path"
14990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14991    unix_path=`$CYGPATH -u "$windows_path"`
14992    new_path="$unix_path"
14993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14995    new_path="$unix_path"
14996  fi
14997
14998  if test "x$path" != "x$new_path"; then
14999    BOOT_JDK="$new_path"
15000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15001$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15002  fi
15003
15004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15006
15007  else
15008    # We're on a posix platform. Hooray! :)
15009    path="$BOOT_JDK"
15010
15011    if test ! -f "$path" && test ! -d "$path"; then
15012      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15013    fi
15014
15015    has_space=`$ECHO "$path" | $GREP " "`
15016    if test "x$has_space" != x; then
15017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15019      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15020    fi
15021  fi
15022
15023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15024$as_echo_n "checking for Boot JDK... " >&6; }
15025              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15026$as_echo "$BOOT_JDK" >&6; }
15027              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15028$as_echo_n "checking Boot JDK version... " >&6; }
15029              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15030              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15031$as_echo "$BOOT_JDK_VERSION" >&6; }
15032            fi # end check jdk version
15033          fi # end check rt.jar
15034        fi # end check javac
15035      fi # end check java
15036    fi # end check boot jdk found
15037  fi
15038
15039  fi
15040
15041
15042    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15043    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15044      # Do we have a bin/java?
15045      if test ! -x "$BOOT_JDK/bin/java"; then
15046        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15048        BOOT_JDK_FOUND=no
15049      else
15050        # Do we have a bin/javac?
15051        if test ! -x "$BOOT_JDK/bin/javac"; then
15052          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15054          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15055$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15056          BOOT_JDK_FOUND=no
15057        else
15058          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15059          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15060            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15062            BOOT_JDK_FOUND=no
15063          else
15064            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15065            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15066
15067            # Extra M4 quote needed to protect [] in grep expression.
15068            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15069            if test "x$FOUND_VERSION_78" = x; then
15070              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15072              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15073$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15074              BOOT_JDK_FOUND=no
15075            else
15076              # We're done! :-)
15077              BOOT_JDK_FOUND=yes
15078
15079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15080
15081  # Input might be given as Windows format, start by converting to
15082  # unix format.
15083  path="$BOOT_JDK"
15084  new_path=`$CYGPATH -u "$path"`
15085
15086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15089  # "foo.exe" is OK but "foo" is an error.
15090  #
15091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15092  # It is also a way to make sure we got the proper file name for the real test later on.
15093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15094  if test "x$test_shortpath" = x; then
15095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15098  fi
15099
15100  # Call helper function which possibly converts this using DOS-style short mode.
15101  # If so, the updated path is stored in $new_path.
15102
15103  input_path="$new_path"
15104  # Check if we need to convert this using DOS-style short mode. If the path
15105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15106  # take no chances and rewrite it.
15107  # Note: m4 eats our [], so we need to use [ and ] instead.
15108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15109  if test "x$has_forbidden_chars" != x; then
15110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15114      # Going to short mode and back again did indeed matter. Since short mode is
15115      # case insensitive, let's make it lowercase to improve readability.
15116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15117      # Now convert it back to Unix-stile (cygpath)
15118      input_path=`$CYGPATH -u "$shortmode_path"`
15119      new_path="$input_path"
15120    fi
15121  fi
15122
15123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15124  if test "x$test_cygdrive_prefix" = x; then
15125    # As a simple fix, exclude /usr/bin since it's not a real path.
15126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15128      # a path prefixed by /cygdrive for fixpath to work.
15129      new_path="$CYGWIN_ROOT_PATH$input_path"
15130    fi
15131  fi
15132
15133
15134  if test "x$path" != "x$new_path"; then
15135    BOOT_JDK="$new_path"
15136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15138  fi
15139
15140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15141
15142  path="$BOOT_JDK"
15143  has_colon=`$ECHO $path | $GREP ^.:`
15144  new_path="$path"
15145  if test "x$has_colon" = x; then
15146    # Not in mixed or Windows style, start by that.
15147    new_path=`cmd //c echo $path`
15148  fi
15149
15150
15151  input_path="$new_path"
15152  # Check if we need to convert this using DOS-style short mode. If the path
15153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15154  # take no chances and rewrite it.
15155  # Note: m4 eats our [], so we need to use [ and ] instead.
15156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15157  if test "x$has_forbidden_chars" != x; then
15158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15160  fi
15161
15162
15163  windows_path="$new_path"
15164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15165    unix_path=`$CYGPATH -u "$windows_path"`
15166    new_path="$unix_path"
15167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15169    new_path="$unix_path"
15170  fi
15171
15172  if test "x$path" != "x$new_path"; then
15173    BOOT_JDK="$new_path"
15174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15176  fi
15177
15178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15180
15181  else
15182    # We're on a posix platform. Hooray! :)
15183    path="$BOOT_JDK"
15184
15185    if test ! -f "$path" && test ! -d "$path"; then
15186      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15187    fi
15188
15189    has_space=`$ECHO "$path" | $GREP " "`
15190    if test "x$has_space" != x; then
15191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15194    fi
15195  fi
15196
15197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15198$as_echo_n "checking for Boot JDK... " >&6; }
15199              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15200$as_echo "$BOOT_JDK" >&6; }
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15202$as_echo_n "checking Boot JDK version... " >&6; }
15203              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15204              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15205$as_echo "$BOOT_JDK_VERSION" >&6; }
15206            fi # end check jdk version
15207          fi # end check rt.jar
15208        fi # end check javac
15209      fi # end check java
15210    fi # end check boot jdk found
15211  fi
15212
15213
15214# If we haven't found anything yet, we've truly lost. Give up.
15215if test "x$BOOT_JDK_FOUND" = xno; then
15216
15217    # Print a helpful message on how to acquire the necessary build dependency.
15218    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15219    MISSING_DEPENDENCY=openjdk
15220    PKGHANDLER_COMMAND=
15221
15222    case $PKGHANDLER in
15223	apt-get)
15224                apt_help     $MISSING_DEPENDENCY ;;
15225    yum)
15226                yum_help     $MISSING_DEPENDENCY ;;
15227	port)
15228                port_help    $MISSING_DEPENDENCY ;;
15229	pkgutil)
15230                pkgutil_help $MISSING_DEPENDENCY ;;
15231	pkgadd)
15232                pkgadd_help  $MISSING_DEPENDENCY ;;
15233    * )
15234      break ;;
15235    esac
15236
15237    if test "x$PKGHANDLER_COMMAND" != x; then
15238        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15239    fi
15240
15241  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15242$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15243  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15244$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15245  as_fn_error $? "Cannot continue" "$LINENO" 5
15246fi
15247
15248# Setup proper paths for what we found
15249BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15250if test ! -f "$BOOT_RTJAR"; then
15251    # On MacOSX it is called classes.jar
15252    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15253    if test -f "$BOOT_RTJAR"; then
15254      # Remove the ..
15255      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15256    fi
15257fi
15258BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15259BOOT_JDK="$BOOT_JDK"
15260
15261
15262
15263
15264# Setup tools from the Boot JDK.
15265
15266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15267$as_echo_n "checking for java in Boot JDK... " >&6; }
15268  JAVA=$BOOT_JDK/bin/java
15269  if test ! -x $JAVA; then
15270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15271$as_echo "not found" >&6; }
15272      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15273$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15274      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15275  fi
15276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15277$as_echo "ok" >&6; }
15278
15279
15280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15281$as_echo_n "checking for javac in Boot JDK... " >&6; }
15282  JAVAC=$BOOT_JDK/bin/javac
15283  if test ! -x $JAVAC; then
15284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15285$as_echo "not found" >&6; }
15286      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15287$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15288      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15289  fi
15290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15291$as_echo "ok" >&6; }
15292
15293
15294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15295$as_echo_n "checking for javah in Boot JDK... " >&6; }
15296  JAVAH=$BOOT_JDK/bin/javah
15297  if test ! -x $JAVAH; then
15298      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15299$as_echo "not found" >&6; }
15300      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15301$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15302      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15303  fi
15304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15305$as_echo "ok" >&6; }
15306
15307
15308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15309$as_echo_n "checking for javap in Boot JDK... " >&6; }
15310  JAVAP=$BOOT_JDK/bin/javap
15311  if test ! -x $JAVAP; then
15312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15313$as_echo "not found" >&6; }
15314      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15315$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15316      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15317  fi
15318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15319$as_echo "ok" >&6; }
15320
15321
15322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15323$as_echo_n "checking for jar in Boot JDK... " >&6; }
15324  JAR=$BOOT_JDK/bin/jar
15325  if test ! -x $JAR; then
15326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15327$as_echo "not found" >&6; }
15328      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15329$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15330      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15331  fi
15332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15333$as_echo "ok" >&6; }
15334
15335
15336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15337$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15338  RMIC=$BOOT_JDK/bin/rmic
15339  if test ! -x $RMIC; then
15340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15341$as_echo "not found" >&6; }
15342      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15343$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15344      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15345  fi
15346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15347$as_echo "ok" >&6; }
15348
15349
15350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15351$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15352  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15353  if test ! -x $NATIVE2ASCII; then
15354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15355$as_echo "not found" >&6; }
15356      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15357$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15358      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15359  fi
15360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15361$as_echo "ok" >&6; }
15362
15363
15364# Finally, set some other options...
15365
15366# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15367BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15368
15369
15370
15371
15372##############################################################################
15373#
15374# Specify options for anything that is run with the Boot JDK.
15375#
15376
15377# Check whether --with-boot-jdk-jvmargs was given.
15378if test "${with_boot_jdk_jvmargs+set}" = set; then :
15379  withval=$with_boot_jdk_jvmargs;
15380fi
15381
15382
15383if test "x$with_boot_jdk_jvmargs" = x; then
15384    # Not all JVM:s accept the same arguments on the command line.
15385    # OpenJDK specific increase in thread stack for JDK build,
15386    # well more specifically, when running javac.
15387    if test "x$BUILD_NUM_BITS" = x32; then
15388       STACK_SIZE=768
15389    else
15390       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15391       # since 64-bit pointers are pushed on the stach. Apparently, we need
15392       # to increase the stack space when javacing the JDK....
15393       STACK_SIZE=1536
15394    fi
15395
15396    # Minimum amount of heap memory.
15397
15398    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15399    # If so, then append -Xms64M to boot_jdk_jvmargs
15400    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15401    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15402    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15403        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15404    fi
15405
15406    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15407        # Why does macosx need more heap? Its the huge JDK batch.
15408
15409    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15410    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15411    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15412    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15413    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15414        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15415    fi
15416
15417    else
15418
15419    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15420    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15421    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15422    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15423    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15424        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15425    fi
15426
15427    fi
15428    # When is adding -client something that speeds up the JVM?
15429    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15430
15431    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15432    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15433    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15434    FOUND_VERSION=`$JAVA -XX:PermSize=32m -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:PermSize=32m"
15437    fi
15438
15439
15440    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15441    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15442    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15443    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15444    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15445        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15446    fi
15447
15448
15449    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15450    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15451    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15452    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15453    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15454        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15455    fi
15456
15457    # Disable special log output when a debug build is used as Boot JDK...
15458
15459    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15460    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15461    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15462    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15463    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15464        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15465    fi
15466
15467fi
15468
15469BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15470
15471
15472
15473###############################################################################
15474#
15475# Configure the sources to use. We can add or override individual directories.
15476#
15477###############################################################################
15478
15479
15480
15481# Where are the sources. Any of these can be overridden
15482# using --with-override-corba and the likes.
15483LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15484CORBA_TOPDIR="$SRC_ROOT/corba"
15485JAXP_TOPDIR="$SRC_ROOT/jaxp"
15486JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15487HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15488JDK_TOPDIR="$SRC_ROOT/jdk"
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498###############################################################################
15499#
15500# Pickup additional source for a component from outside of the source root
15501# or override source for a component.
15502#
15503
15504# Check whether --with-add-source-root was given.
15505if test "${with_add_source_root+set}" = set; then :
15506  withval=$with_add_source_root;
15507fi
15508
15509
15510
15511# Check whether --with-override-source-root was given.
15512if test "${with_override_source_root+set}" = set; then :
15513  withval=$with_override_source_root;
15514fi
15515
15516
15517
15518# Check whether --with-adds-and-overrides was given.
15519if test "${with_adds_and_overrides+set}" = set; then :
15520  withval=$with_adds_and_overrides;
15521fi
15522
15523
15524if test "x$with_adds_and_overrides" != x; then
15525    with_add_source_root="$with_adds_and_overrides/adds"
15526    with_override_source_root="$with_adds_and_overrides/overrides"
15527fi
15528
15529if test "x$with_add_source_root" != x; then
15530    if ! test -d $with_add_source_root; then
15531       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15532    fi
15533    CURDIR="$PWD"
15534    cd "$with_add_source_root"
15535    ADD_SRC_ROOT="`pwd`"
15536    cd "$CURDIR"
15537    # Verify that the addon source root does not have any root makefiles.
15538    # If it does, then it is usually an error, prevent this.
15539    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15540       test -f $with_add_source_root/langtools/make/Makefile; then
15541        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
15542    fi
15543    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15544       test -f $with_add_source_root/corba/make/Makefile; then
15545        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
15546    fi
15547    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15548       test -f $with_add_source_root/jaxp/make/Makefile; then
15549        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
15550    fi
15551    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15552       test -f $with_add_source_root/jaxws/make/Makefile; then
15553        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
15554    fi
15555    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15556       test -f $with_add_source_root/hotspot/make/Makefile; then
15557        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
15558    fi
15559    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15560       test -f $with_add_source_root/jdk/make/Makefile; then
15561        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
15562    fi
15563fi
15564
15565
15566if test "x$with_override_source_root" != x; then
15567    if ! test -d $with_override_source_root; then
15568       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15569    fi
15570    CURDIR="$PWD"
15571    cd "$with_override_source_root"
15572    OVERRIDE_SRC_ROOT="`pwd`"
15573    cd "$CURDIR"
15574    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15575       test -f $with_override_source_root/langtools/make/Makefile; then
15576        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
15577    fi
15578    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15579       test -f $with_override_source_root/corba/make/Makefile; then
15580        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
15581    fi
15582    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15583       test -f $with_override_source_root/jaxp/make/Makefile; then
15584        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
15585    fi
15586    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15587       test -f $with_override_source_root/jaxws/make/Makefile; then
15588        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
15589    fi
15590    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15591       test -f $with_override_source_root/hotspot/make/Makefile; then
15592        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
15593    fi
15594    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15595       test -f $with_override_source_root/jdk/make/Makefile; then
15596        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
15597    fi
15598fi
15599
15600
15601###############################################################################
15602#
15603# Override a repo completely, this is used for example when you have 3 small
15604# development sandboxes of the langtools sources and want to avoid having 3 full
15605# OpenJDK sources checked out on disk.
15606#
15607# Assuming that the 3 langtools sandboxes are located here:
15608# /home/fredrik/sandbox1/langtools
15609# /home/fredrik/sandbox2/langtools
15610# /home/fredrik/sandbox3/langtools
15611#
15612# From the source root you create build subdirs manually:
15613#     mkdir -p build1 build2 build3
15614# in each build directory run:
15615#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15616#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15617#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15618#
15619
15620
15621# Check whether --with-override-langtools was given.
15622if test "${with_override_langtools+set}" = set; then :
15623  withval=$with_override_langtools;
15624fi
15625
15626
15627
15628# Check whether --with-override-corba was given.
15629if test "${with_override_corba+set}" = set; then :
15630  withval=$with_override_corba;
15631fi
15632
15633
15634
15635# Check whether --with-override-jaxp was given.
15636if test "${with_override_jaxp+set}" = set; then :
15637  withval=$with_override_jaxp;
15638fi
15639
15640
15641
15642# Check whether --with-override-jaxws was given.
15643if test "${with_override_jaxws+set}" = set; then :
15644  withval=$with_override_jaxws;
15645fi
15646
15647
15648
15649# Check whether --with-override-hotspot was given.
15650if test "${with_override_hotspot+set}" = set; then :
15651  withval=$with_override_hotspot;
15652fi
15653
15654
15655
15656# Check whether --with-override-jdk was given.
15657if test "${with_override_jdk+set}" = set; then :
15658  withval=$with_override_jdk;
15659fi
15660
15661
15662if test "x$with_override_langtools" != x; then
15663    CURDIR="$PWD"
15664    cd "$with_override_langtools"
15665    LANGTOOLS_TOPDIR="`pwd`"
15666    cd "$CURDIR"
15667    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15668        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15669    fi
15670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15671$as_echo_n "checking if langtools should be overridden... " >&6; }
15672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15673$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15674fi
15675if test "x$with_override_corba" != x; then
15676    CURDIR="$PWD"
15677    cd "$with_override_corba"
15678    CORBA_TOPDIR="`pwd`"
15679    cd "$CURDIR"
15680    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15681        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15682    fi
15683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15684$as_echo_n "checking if corba should be overridden... " >&6; }
15685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15686$as_echo "yes with $CORBA_TOPDIR" >&6; }
15687fi
15688if test "x$with_override_jaxp" != x; then
15689    CURDIR="$PWD"
15690    cd "$with_override_jaxp"
15691    JAXP_TOPDIR="`pwd`"
15692    cd "$CURDIR"
15693    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15694        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15695    fi
15696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15697$as_echo_n "checking if jaxp should be overridden... " >&6; }
15698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15699$as_echo "yes with $JAXP_TOPDIR" >&6; }
15700fi
15701if test "x$with_override_jaxws" != x; then
15702    CURDIR="$PWD"
15703    cd "$with_override_jaxws"
15704    JAXWS_TOPDIR="`pwd`"
15705    cd "$CURDIR"
15706    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15707        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15708    fi
15709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15710$as_echo_n "checking if jaxws should be overridden... " >&6; }
15711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15712$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15713fi
15714if test "x$with_override_hotspot" != x; then
15715    CURDIR="$PWD"
15716    cd "$with_override_hotspot"
15717    HOTSPOT_TOPDIR="`pwd`"
15718    cd "$CURDIR"
15719    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15720       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15721        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15722    fi
15723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15724$as_echo_n "checking if hotspot should be overridden... " >&6; }
15725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15726$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15727fi
15728if test "x$with_override_jdk" != x; then
15729    CURDIR="$PWD"
15730    cd "$with_override_jdk"
15731    JDK_TOPDIR="`pwd`"
15732    cd "$CURDIR"
15733    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15734        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15735    fi
15736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15737$as_echo_n "checking if JDK should be overridden... " >&6; }
15738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15739$as_echo "yes with $JDK_TOPDIR" >&6; }
15740fi
15741
15742
15743
15744BUILD_OUTPUT="$OUTPUT_ROOT"
15745
15746
15747HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15748BUILD_HOTSPOT=true
15749
15750
15751
15752# Check whether --with-import-hotspot was given.
15753if test "${with_import_hotspot+set}" = set; then :
15754  withval=$with_import_hotspot;
15755fi
15756
15757if test "x$with_import_hotspot" != x; then
15758    CURDIR="$PWD"
15759    cd "$with_import_hotspot"
15760    HOTSPOT_DIST="`pwd`"
15761    cd "$CURDIR"
15762    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15763        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15764    fi
15765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15766$as_echo_n "checking if hotspot should be imported... " >&6; }
15767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15768$as_echo "yes from $HOTSPOT_DIST" >&6; }
15769    BUILD_HOTSPOT=false
15770fi
15771
15772JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15773
15774
15775###############################################################################
15776#
15777# Setup the toolchain (compilers etc), i.e. the tools that need to be
15778# cross-compilation aware.
15779#
15780###############################################################################
15781
15782
15783###############################################################################
15784#
15785# Configure the development tool paths and potential sysroot.
15786#
15787ac_ext=cpp
15788ac_cpp='$CXXCPP $CPPFLAGS'
15789ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15790ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15791ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15792
15793
15794# The option used to specify the target .o,.a or .so file.
15795# When compiling, how to specify the to be created object file.
15796CC_OUT_OPTION='-o$(SPACE)'
15797# When linking, how to specify the to be created executable.
15798EXE_OUT_OPTION='-o$(SPACE)'
15799# When linking, how to specify the to be created dynamically linkable library.
15800LD_OUT_OPTION='-o$(SPACE)'
15801# When archiving, how to specify the to be create static archive for object files.
15802AR_OUT_OPTION='rcs$(SPACE)'
15803
15804
15805
15806
15807
15808# Locate the actual tools
15809
15810if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15811
15812  # Store path to cygwin link.exe to help excluding it when searching for
15813  # VS linker. This must be done before changing the PATH when looking for VS.
15814  # Extract the first word of "link", so it can be a program name with args.
15815set dummy link; ac_word=$2
15816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15817$as_echo_n "checking for $ac_word... " >&6; }
15818if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15819  $as_echo_n "(cached) " >&6
15820else
15821  case $CYGWIN_LINK in
15822  [\\/]* | ?:[\\/]*)
15823  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15824  ;;
15825  *)
15826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15827for as_dir in $PATH
15828do
15829  IFS=$as_save_IFS
15830  test -z "$as_dir" && as_dir=.
15831    for ac_exec_ext in '' $ac_executable_extensions; do
15832  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15833    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15835    break 2
15836  fi
15837done
15838  done
15839IFS=$as_save_IFS
15840
15841  ;;
15842esac
15843fi
15844CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15845if test -n "$CYGWIN_LINK"; then
15846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15847$as_echo "$CYGWIN_LINK" >&6; }
15848else
15849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15850$as_echo "no" >&6; }
15851fi
15852
15853
15854  if test "x$CYGWIN_LINK" != x; then
15855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15856$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15857    "$CYGWIN_LINK" --version > /dev/null
15858    if test $? -eq 0 ; then
15859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15860$as_echo "yes" >&6; }
15861    else
15862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15863$as_echo "no" >&6; }
15864      # This might be the VS linker. Don't exclude it later on.
15865      CYGWIN_LINK=""
15866    fi
15867  fi
15868
15869  # First-hand choice is to locate and run the vsvars bat file.
15870
15871  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15872    VCVARSFILE="vc/bin/vcvars32.bat"
15873  else
15874    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15875  fi
15876
15877  VS_ENV_CMD=""
15878  VS_ENV_ARGS=""
15879  if test "x$with_toolsdir" != x; then
15880
15881  if test "x$VS_ENV_CMD" = x; then
15882    VS100BASE="$with_toolsdir/../.."
15883    METHOD="--with-tools-dir"
15884
15885  windows_path="$VS100BASE"
15886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15887    unix_path=`$CYGPATH -u "$windows_path"`
15888    VS100BASE="$unix_path"
15889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15891    VS100BASE="$unix_path"
15892  fi
15893
15894    if test -d "$VS100BASE"; then
15895      if test -f "$VS100BASE/$VCVARSFILE"; then
15896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15897$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15898        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15899      else
15900        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15901$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15902        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15903$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15904      fi
15905    fi
15906  fi
15907
15908  fi
15909
15910  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15911    # Having specified an argument which is incorrect will produce an instant failure;
15912    # we should not go on looking
15913    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15914$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15915    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15916$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15917    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15918  fi
15919
15920  if test "x$ProgramW6432" != x; then
15921
15922  if test "x$VS_ENV_CMD" = x; then
15923    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15924    METHOD="well-known name"
15925
15926  windows_path="$WIN_SDK_BASE"
15927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15928    unix_path=`$CYGPATH -u "$windows_path"`
15929    WIN_SDK_BASE="$unix_path"
15930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15932    WIN_SDK_BASE="$unix_path"
15933  fi
15934
15935    if test -d "$WIN_SDK_BASE"; then
15936      # There have been cases of partial or broken SDK installations. A missing
15937      # lib dir is not going to work.
15938      if test ! -d "$WIN_SDK_BASE/../lib"; then
15939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15942$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15943      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15946        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15947        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15948          VS_ENV_ARGS="/x86"
15949        else
15950          VS_ENV_ARGS="/x64"
15951        fi
15952      else
15953        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15954$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15955        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15956$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15957      fi
15958    fi
15959  fi
15960
15961  fi
15962  if test "x$PROGRAMW6432" != x; then
15963
15964  if test "x$VS_ENV_CMD" = x; then
15965    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15966    METHOD="well-known name"
15967
15968  windows_path="$WIN_SDK_BASE"
15969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15970    unix_path=`$CYGPATH -u "$windows_path"`
15971    WIN_SDK_BASE="$unix_path"
15972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15974    WIN_SDK_BASE="$unix_path"
15975  fi
15976
15977    if test -d "$WIN_SDK_BASE"; then
15978      # There have been cases of partial or broken SDK installations. A missing
15979      # lib dir is not going to work.
15980      if test ! -d "$WIN_SDK_BASE/../lib"; then
15981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15982$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15983        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15984$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15985      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15987$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15988        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15989        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15990          VS_ENV_ARGS="/x86"
15991        else
15992          VS_ENV_ARGS="/x64"
15993        fi
15994      else
15995        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15996$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15997        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15998$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15999      fi
16000    fi
16001  fi
16002
16003  fi
16004  if test "x$PROGRAMFILES" != x; then
16005
16006  if test "x$VS_ENV_CMD" = x; then
16007    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16008    METHOD="well-known name"
16009
16010  windows_path="$WIN_SDK_BASE"
16011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16012    unix_path=`$CYGPATH -u "$windows_path"`
16013    WIN_SDK_BASE="$unix_path"
16014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16016    WIN_SDK_BASE="$unix_path"
16017  fi
16018
16019    if test -d "$WIN_SDK_BASE"; then
16020      # There have been cases of partial or broken SDK installations. A missing
16021      # lib dir is not going to work.
16022      if test ! -d "$WIN_SDK_BASE/../lib"; then
16023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16024$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16025        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16026$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16027      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16028        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16029$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16030        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16031        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16032          VS_ENV_ARGS="/x86"
16033        else
16034          VS_ENV_ARGS="/x64"
16035        fi
16036      else
16037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16038$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16039        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16040$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16041      fi
16042    fi
16043  fi
16044
16045  fi
16046
16047  if test "x$VS_ENV_CMD" = x; then
16048    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16049    METHOD="well-known name"
16050
16051  windows_path="$WIN_SDK_BASE"
16052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16053    unix_path=`$CYGPATH -u "$windows_path"`
16054    WIN_SDK_BASE="$unix_path"
16055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16057    WIN_SDK_BASE="$unix_path"
16058  fi
16059
16060    if test -d "$WIN_SDK_BASE"; then
16061      # There have been cases of partial or broken SDK installations. A missing
16062      # lib dir is not going to work.
16063      if test ! -d "$WIN_SDK_BASE/../lib"; then
16064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16066        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16067$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16068      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16070$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16071        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16072        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16073          VS_ENV_ARGS="/x86"
16074        else
16075          VS_ENV_ARGS="/x64"
16076        fi
16077      else
16078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16079$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16081$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16082      fi
16083    fi
16084  fi
16085
16086
16087  if test "x$VS_ENV_CMD" = x; then
16088    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16089    METHOD="well-known name"
16090
16091  windows_path="$WIN_SDK_BASE"
16092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16093    unix_path=`$CYGPATH -u "$windows_path"`
16094    WIN_SDK_BASE="$unix_path"
16095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16097    WIN_SDK_BASE="$unix_path"
16098  fi
16099
16100    if test -d "$WIN_SDK_BASE"; then
16101      # There have been cases of partial or broken SDK installations. A missing
16102      # lib dir is not going to work.
16103      if test ! -d "$WIN_SDK_BASE/../lib"; then
16104        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16105$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16106        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16107$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16108      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16110$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16111        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16112        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16113          VS_ENV_ARGS="/x86"
16114        else
16115          VS_ENV_ARGS="/x64"
16116        fi
16117      else
16118        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16119$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16120        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16121$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16122      fi
16123    fi
16124  fi
16125
16126
16127  if test "x$VS100COMNTOOLS" != x; then
16128
16129  if test "x$VS_ENV_CMD" = x; then
16130    VS100BASE="$VS100COMNTOOLS/../.."
16131    METHOD="VS100COMNTOOLS variable"
16132
16133  windows_path="$VS100BASE"
16134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16135    unix_path=`$CYGPATH -u "$windows_path"`
16136    VS100BASE="$unix_path"
16137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16139    VS100BASE="$unix_path"
16140  fi
16141
16142    if test -d "$VS100BASE"; then
16143      if test -f "$VS100BASE/$VCVARSFILE"; then
16144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16145$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16146        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16147      else
16148        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16149$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16150        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16151$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16152      fi
16153    fi
16154  fi
16155
16156  fi
16157  if test "x$PROGRAMFILES" != x; then
16158
16159  if test "x$VS_ENV_CMD" = x; then
16160    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16161    METHOD="well-known name"
16162
16163  windows_path="$VS100BASE"
16164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16165    unix_path=`$CYGPATH -u "$windows_path"`
16166    VS100BASE="$unix_path"
16167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16169    VS100BASE="$unix_path"
16170  fi
16171
16172    if test -d "$VS100BASE"; then
16173      if test -f "$VS100BASE/$VCVARSFILE"; then
16174        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16175$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16176        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16177      else
16178        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16179$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16180        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16181$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16182      fi
16183    fi
16184  fi
16185
16186  fi
16187
16188  if test "x$VS_ENV_CMD" = x; then
16189    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16190    METHOD="well-known name"
16191
16192  windows_path="$VS100BASE"
16193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16194    unix_path=`$CYGPATH -u "$windows_path"`
16195    VS100BASE="$unix_path"
16196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16198    VS100BASE="$unix_path"
16199  fi
16200
16201    if test -d "$VS100BASE"; then
16202      if test -f "$VS100BASE/$VCVARSFILE"; then
16203        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16204$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16205        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16206      else
16207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16208$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16209        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16210$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16211      fi
16212    fi
16213  fi
16214
16215
16216  if test "x$VS_ENV_CMD" = x; then
16217    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16218    METHOD="well-known name"
16219
16220  windows_path="$VS100BASE"
16221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16222    unix_path=`$CYGPATH -u "$windows_path"`
16223    VS100BASE="$unix_path"
16224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16226    VS100BASE="$unix_path"
16227  fi
16228
16229    if test -d "$VS100BASE"; then
16230      if test -f "$VS100BASE/$VCVARSFILE"; then
16231        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16232$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16233        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16234      else
16235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16236$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16237        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16238$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16239      fi
16240    fi
16241  fi
16242
16243
16244  if test "x$VS_ENV_CMD" != x; then
16245    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16246
16247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16248
16249  # First separate the path from the arguments. This will split at the first
16250  # space.
16251  complete="$VS_ENV_CMD"
16252  path="${complete%% *}"
16253  tmp="$complete EOL"
16254  arguments="${tmp#* }"
16255
16256  # Input might be given as Windows format, start by converting to
16257  # unix format.
16258  new_path=`$CYGPATH -u "$path"`
16259
16260  # Now try to locate executable using which
16261  new_path=`$WHICH "$new_path" 2> /dev/null`
16262  # bat and cmd files are not always considered executable in cygwin causing which
16263  # to not find them
16264  if test "x$new_path" = x \
16265           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16266           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16267    new_path=`$CYGPATH -u "$path"`
16268  fi
16269  if test "x$new_path" = x; then
16270    # Oops. Which didn't find the executable.
16271    # The splitting of arguments from the executable at a space might have been incorrect,
16272    # since paths with space are more likely in Windows. Give it another try with the whole
16273    # argument.
16274    path="$complete"
16275    arguments="EOL"
16276    new_path=`$CYGPATH -u "$path"`
16277    new_path=`$WHICH "$new_path" 2> /dev/null`
16278    # bat and cmd files are not always considered executable in cygwin causing which
16279    # to not find them
16280    if test "x$new_path" = x \
16281             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16282             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16283      new_path=`$CYGPATH -u "$path"`
16284    fi
16285    if test "x$new_path" = x; then
16286      # It's still not found. Now this is an unrecoverable error.
16287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16288$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16289      has_space=`$ECHO "$complete" | $GREP " "`
16290      if test "x$has_space" != x; then
16291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16293      fi
16294      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16295    fi
16296  fi
16297
16298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16301  # "foo.exe" is OK but "foo" is an error.
16302  #
16303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16304  # It is also a way to make sure we got the proper file name for the real test later on.
16305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16306  if test "x$test_shortpath" = x; then
16307    # Short path failed, file does not exist as specified.
16308    # Try adding .exe or .cmd
16309    if test -f "${new_path}.exe"; then
16310       input_to_shortpath="${new_path}.exe"
16311    elif test -f "${new_path}.cmd"; then
16312       input_to_shortpath="${new_path}.cmd"
16313    else
16314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16315$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16318      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16319    fi
16320  else
16321    input_to_shortpath="$new_path"
16322  fi
16323
16324  # Call helper function which possibly converts this using DOS-style short mode.
16325  # If so, the updated path is stored in $new_path.
16326  new_path="$input_to_shortpath"
16327
16328  input_path="$input_to_shortpath"
16329  # Check if we need to convert this using DOS-style short mode. If the path
16330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16331  # take no chances and rewrite it.
16332  # Note: m4 eats our [], so we need to use [ and ] instead.
16333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16334  if test "x$has_forbidden_chars" != x; then
16335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16339      # Going to short mode and back again did indeed matter. Since short mode is
16340      # case insensitive, let's make it lowercase to improve readability.
16341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16342      # Now convert it back to Unix-stile (cygpath)
16343      input_path=`$CYGPATH -u "$shortmode_path"`
16344      new_path="$input_path"
16345    fi
16346  fi
16347
16348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16349  if test "x$test_cygdrive_prefix" = x; then
16350    # As a simple fix, exclude /usr/bin since it's not a real path.
16351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16353      # a path prefixed by /cygdrive for fixpath to work.
16354      new_path="$CYGWIN_ROOT_PATH$input_path"
16355    fi
16356  fi
16357
16358  # remove trailing .exe if any
16359  new_path="${new_path/%.exe/}"
16360
16361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16362
16363  # First separate the path from the arguments. This will split at the first
16364  # space.
16365  complete="$VS_ENV_CMD"
16366  path="${complete%% *}"
16367  tmp="$complete EOL"
16368  arguments="${tmp#* }"
16369
16370  # Input might be given as Windows format, start by converting to
16371  # unix format.
16372  new_path="$path"
16373
16374  windows_path="$new_path"
16375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16376    unix_path=`$CYGPATH -u "$windows_path"`
16377    new_path="$unix_path"
16378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16380    new_path="$unix_path"
16381  fi
16382
16383
16384  # Now try to locate executable using which
16385  new_path=`$WHICH "$new_path" 2> /dev/null`
16386
16387  if test "x$new_path" = x; then
16388    # Oops. Which didn't find the executable.
16389    # The splitting of arguments from the executable at a space might have been incorrect,
16390    # since paths with space are more likely in Windows. Give it another try with the whole
16391    # argument.
16392    path="$complete"
16393    arguments="EOL"
16394    new_path="$path"
16395
16396  windows_path="$new_path"
16397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398    unix_path=`$CYGPATH -u "$windows_path"`
16399    new_path="$unix_path"
16400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16402    new_path="$unix_path"
16403  fi
16404
16405
16406    new_path=`$WHICH "$new_path" 2> /dev/null`
16407
16408    if test "x$new_path" = x; then
16409      # It's still not found. Now this is an unrecoverable error.
16410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16411$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16412      has_space=`$ECHO "$complete" | $GREP " "`
16413      if test "x$has_space" != x; then
16414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16416      fi
16417      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16418    fi
16419  fi
16420
16421  # Now new_path has a complete unix path to the binary
16422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16423    # Keep paths in /bin as-is, but remove trailing .exe if any
16424    new_path="${new_path/%.exe/}"
16425    # Do not save /bin paths to all_fixpath_prefixes!
16426  else
16427    # Not in mixed or Windows style, start by that.
16428    new_path=`cmd //c echo $new_path`
16429
16430  input_path="$new_path"
16431  # Check if we need to convert this using DOS-style short mode. If the path
16432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16433  # take no chances and rewrite it.
16434  # Note: m4 eats our [], so we need to use [ and ] instead.
16435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16436  if test "x$has_forbidden_chars" != x; then
16437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16439  fi
16440
16441    # Output is in $new_path
16442
16443  windows_path="$new_path"
16444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16445    unix_path=`$CYGPATH -u "$windows_path"`
16446    new_path="$unix_path"
16447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16449    new_path="$unix_path"
16450  fi
16451
16452    # remove trailing .exe if any
16453    new_path="${new_path/%.exe/}"
16454
16455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16457  fi
16458
16459  else
16460    # We're on a posix platform. Hooray! :)
16461    # First separate the path from the arguments. This will split at the first
16462    # space.
16463    complete="$VS_ENV_CMD"
16464    path="${complete%% *}"
16465    tmp="$complete EOL"
16466    arguments="${tmp#* }"
16467
16468    # Cannot rely on the command "which" here since it doesn't always work.
16469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16470    if test -z "$is_absolute_path"; then
16471      # Path to executable is not absolute. Find it.
16472      IFS_save="$IFS"
16473      IFS=:
16474      for p in $PATH; do
16475        if test -f "$p/$path" && test -x "$p/$path"; then
16476          new_path="$p/$path"
16477          break
16478        fi
16479      done
16480      IFS="$IFS_save"
16481    else
16482      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16483$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16484      new_path="$path"
16485    fi
16486
16487    if test "x$new_path" = x; then
16488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16489$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16490        has_space=`$ECHO "$complete" | $GREP " "`
16491        if test "x$has_space" != x; then
16492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16494        fi
16495        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16496      fi
16497  fi
16498
16499      # Now join together the path and the arguments once again
16500      if test "x$arguments" != xEOL; then
16501        new_complete="$new_path ${arguments% *}"
16502      else
16503        new_complete="$new_path"
16504      fi
16505
16506  if test "x$complete" != "x$new_complete"; then
16507      VS_ENV_CMD="$new_complete"
16508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16509$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16510    fi
16511
16512
16513    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16514    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16515$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16516    cd $OUTPUT_ROOT
16517    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16518    # to autoconf standards.
16519
16520    #----
16521
16522    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16523    # but calculate the difference in Cygwin environment before/after running it and then
16524    # apply the diff.
16525
16526    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16527      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16528      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16529      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16530    else
16531      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16532      _dosbash=`cmd //c echo \`which bash\``
16533    fi
16534
16535    # generate the set of exported vars before/after the vs10 setup
16536    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16537    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16538    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16539    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16540
16541    # Now execute the newly created bat file.
16542    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16543    cmd /c localdevenvtmp.bat | cat
16544
16545    # apply the diff (less some non-vs10 vars named by "!")
16546    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16547    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16548    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16549
16550    # cleanup
16551    $RM localdevenvtmp*
16552    #----
16553    cd $CURDIR
16554    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16555      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16556$as_echo "no" >&6; }
16557      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16558$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16559      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16560$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16561      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16562$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16563      as_fn_error $? "Cannot continue" "$LINENO" 5
16564    fi
16565
16566    # Now set all paths and other env variables. This will allow the rest of
16567    # the configure script to find and run the compiler in the proper way.
16568    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16569$as_echo "$as_me: Setting extracted environment variables" >&6;}
16570    . $OUTPUT_ROOT/localdevenv.sh
16571  else
16572    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16573    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16574$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16575  fi
16576
16577  # At this point, we should have corrent variables in the environment, or we can't continue.
16578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16579$as_echo_n "checking for Visual Studio variables... " >&6; }
16580
16581  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16582    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16584$as_echo "present but broken" >&6; }
16585      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16586    else
16587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16588$as_echo "ok" >&6; }
16589      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16590      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16591      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16592      VS_PATH="$PATH"
16593
16594
16595
16596    fi
16597  else
16598    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16599$as_echo "not found" >&6; }
16600
16601    if test "x$VS_ENV_CMD" = x; then
16602      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16603$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16604      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16605$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16606    else
16607      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16608$as_echo "$as_me: Running the extraction script failed." >&6;}
16609    fi
16610    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16611$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16612    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16613$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16614    as_fn_error $? "Cannot continue" "$LINENO" 5
16615  fi
16616
16617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16618$as_echo_n "checking for msvcr100.dll... " >&6; }
16619
16620# Check whether --with-msvcr-dll was given.
16621if test "${with_msvcr_dll+set}" = set; then :
16622  withval=$with_msvcr_dll;
16623fi
16624
16625  if test "x$with_msvcr_dll" != x; then
16626    MSVCR_DLL="$with_msvcr_dll"
16627  else
16628    if test "x$VCINSTALLDIR" != x; then
16629      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16630        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16631      else
16632        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16633        if test "x$MSVCR_DLL" = x; then
16634          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16635        fi
16636      fi
16637      if test "x$MSVCR_DLL" != x; then
16638        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16639$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16640      else
16641        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16642$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16643      fi
16644    fi
16645    if test "x$MSVCR_DLL" = x; then
16646      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16647        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16648$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16649        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16650      fi
16651    fi
16652  fi
16653  if test "x$MSVCR_DLL" = x; then
16654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16655$as_echo "no" >&6; }
16656    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16657  fi
16658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16659$as_echo "$MSVCR_DLL" >&6; }
16660
16661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16662
16663  # Input might be given as Windows format, start by converting to
16664  # unix format.
16665  path="$MSVCR_DLL"
16666  new_path=`$CYGPATH -u "$path"`
16667
16668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16671  # "foo.exe" is OK but "foo" is an error.
16672  #
16673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16674  # It is also a way to make sure we got the proper file name for the real test later on.
16675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16676  if test "x$test_shortpath" = x; then
16677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16678$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16679    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16680  fi
16681
16682  # Call helper function which possibly converts this using DOS-style short mode.
16683  # If so, the updated path is stored in $new_path.
16684
16685  input_path="$new_path"
16686  # Check if we need to convert this using DOS-style short mode. If the path
16687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16688  # take no chances and rewrite it.
16689  # Note: m4 eats our [], so we need to use [ and ] instead.
16690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16691  if test "x$has_forbidden_chars" != x; then
16692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16696      # Going to short mode and back again did indeed matter. Since short mode is
16697      # case insensitive, let's make it lowercase to improve readability.
16698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16699      # Now convert it back to Unix-stile (cygpath)
16700      input_path=`$CYGPATH -u "$shortmode_path"`
16701      new_path="$input_path"
16702    fi
16703  fi
16704
16705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16706  if test "x$test_cygdrive_prefix" = x; then
16707    # As a simple fix, exclude /usr/bin since it's not a real path.
16708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16710      # a path prefixed by /cygdrive for fixpath to work.
16711      new_path="$CYGWIN_ROOT_PATH$input_path"
16712    fi
16713  fi
16714
16715
16716  if test "x$path" != "x$new_path"; then
16717    MSVCR_DLL="$new_path"
16718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16719$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16720  fi
16721
16722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723
16724  path="$MSVCR_DLL"
16725  has_colon=`$ECHO $path | $GREP ^.:`
16726  new_path="$path"
16727  if test "x$has_colon" = x; then
16728    # Not in mixed or Windows style, start by that.
16729    new_path=`cmd //c echo $path`
16730  fi
16731
16732
16733  input_path="$new_path"
16734  # Check if we need to convert this using DOS-style short mode. If the path
16735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16736  # take no chances and rewrite it.
16737  # Note: m4 eats our [], so we need to use [ and ] instead.
16738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16739  if test "x$has_forbidden_chars" != x; then
16740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16742  fi
16743
16744
16745  windows_path="$new_path"
16746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16747    unix_path=`$CYGPATH -u "$windows_path"`
16748    new_path="$unix_path"
16749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16751    new_path="$unix_path"
16752  fi
16753
16754  if test "x$path" != "x$new_path"; then
16755    MSVCR_DLL="$new_path"
16756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16757$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16758  fi
16759
16760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16762
16763  else
16764    # We're on a posix platform. Hooray! :)
16765    path="$MSVCR_DLL"
16766
16767    if test ! -f "$path" && test ! -d "$path"; then
16768      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16769    fi
16770
16771    has_space=`$ECHO "$path" | $GREP " "`
16772    if test "x$has_space" != x; then
16773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16774$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16775      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16776    fi
16777  fi
16778
16779
16780fi
16781
16782
16783
16784# If --build AND --host is set, then the configure script will find any
16785# cross compilation tools in the PATH. Cross compilation tools
16786# follows the cross compilation standard where they are prefixed with ${host}.
16787# For example the binary i686-sun-solaris2.10-gcc
16788# will cross compile for i686-sun-solaris2.10
16789# If neither of build and host is not set, then build=host and the
16790# default compiler found in the path will be used.
16791# Setting only --host, does not seem to be really supported.
16792# Please set both --build and --host if you want to cross compile.
16793
16794if test "x$COMPILE_TYPE" = "xcross"; then
16795    # Now we to find a C/C++ compiler that can build executables for the build
16796    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16797    # once. Also, we need to do this before adding a tools dir to the path,
16798    # otherwise we might pick up cross-compilers which don't use standard naming.
16799    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16800    # to wait until they are properly discovered.
16801    for ac_prog in cl cc gcc
16802do
16803  # Extract the first word of "$ac_prog", so it can be a program name with args.
16804set dummy $ac_prog; ac_word=$2
16805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16806$as_echo_n "checking for $ac_word... " >&6; }
16807if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16808  $as_echo_n "(cached) " >&6
16809else
16810  case $BUILD_CC in
16811  [\\/]* | ?:[\\/]*)
16812  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16813  ;;
16814  *)
16815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16816for as_dir in $PATH
16817do
16818  IFS=$as_save_IFS
16819  test -z "$as_dir" && as_dir=.
16820    for ac_exec_ext in '' $ac_executable_extensions; do
16821  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16822    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16824    break 2
16825  fi
16826done
16827  done
16828IFS=$as_save_IFS
16829
16830  ;;
16831esac
16832fi
16833BUILD_CC=$ac_cv_path_BUILD_CC
16834if test -n "$BUILD_CC"; then
16835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16836$as_echo "$BUILD_CC" >&6; }
16837else
16838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16839$as_echo "no" >&6; }
16840fi
16841
16842
16843  test -n "$BUILD_CC" && break
16844done
16845
16846
16847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848
16849  # First separate the path from the arguments. This will split at the first
16850  # space.
16851  complete="$BUILD_CC"
16852  path="${complete%% *}"
16853  tmp="$complete EOL"
16854  arguments="${tmp#* }"
16855
16856  # Input might be given as Windows format, start by converting to
16857  # unix format.
16858  new_path=`$CYGPATH -u "$path"`
16859
16860  # Now try to locate executable using which
16861  new_path=`$WHICH "$new_path" 2> /dev/null`
16862  # bat and cmd files are not always considered executable in cygwin causing which
16863  # to not find them
16864  if test "x$new_path" = x \
16865           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16866           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16867    new_path=`$CYGPATH -u "$path"`
16868  fi
16869  if test "x$new_path" = x; then
16870    # Oops. Which didn't find the executable.
16871    # The splitting of arguments from the executable at a space might have been incorrect,
16872    # since paths with space are more likely in Windows. Give it another try with the whole
16873    # argument.
16874    path="$complete"
16875    arguments="EOL"
16876    new_path=`$CYGPATH -u "$path"`
16877    new_path=`$WHICH "$new_path" 2> /dev/null`
16878    # bat and cmd files are not always considered executable in cygwin causing which
16879    # to not find them
16880    if test "x$new_path" = x \
16881             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16882             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16883      new_path=`$CYGPATH -u "$path"`
16884    fi
16885    if test "x$new_path" = x; then
16886      # It's still not found. Now this is an unrecoverable error.
16887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16888$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16889      has_space=`$ECHO "$complete" | $GREP " "`
16890      if test "x$has_space" != x; then
16891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16893      fi
16894      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16895    fi
16896  fi
16897
16898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16901  # "foo.exe" is OK but "foo" is an error.
16902  #
16903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16904  # It is also a way to make sure we got the proper file name for the real test later on.
16905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16906  if test "x$test_shortpath" = x; then
16907    # Short path failed, file does not exist as specified.
16908    # Try adding .exe or .cmd
16909    if test -f "${new_path}.exe"; then
16910       input_to_shortpath="${new_path}.exe"
16911    elif test -f "${new_path}.cmd"; then
16912       input_to_shortpath="${new_path}.cmd"
16913    else
16914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16915$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16918      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16919    fi
16920  else
16921    input_to_shortpath="$new_path"
16922  fi
16923
16924  # Call helper function which possibly converts this using DOS-style short mode.
16925  # If so, the updated path is stored in $new_path.
16926  new_path="$input_to_shortpath"
16927
16928  input_path="$input_to_shortpath"
16929  # Check if we need to convert this using DOS-style short mode. If the path
16930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16931  # take no chances and rewrite it.
16932  # Note: m4 eats our [], so we need to use [ and ] instead.
16933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16934  if test "x$has_forbidden_chars" != x; then
16935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16939      # Going to short mode and back again did indeed matter. Since short mode is
16940      # case insensitive, let's make it lowercase to improve readability.
16941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16942      # Now convert it back to Unix-stile (cygpath)
16943      input_path=`$CYGPATH -u "$shortmode_path"`
16944      new_path="$input_path"
16945    fi
16946  fi
16947
16948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16949  if test "x$test_cygdrive_prefix" = x; then
16950    # As a simple fix, exclude /usr/bin since it's not a real path.
16951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16953      # a path prefixed by /cygdrive for fixpath to work.
16954      new_path="$CYGWIN_ROOT_PATH$input_path"
16955    fi
16956  fi
16957
16958  # remove trailing .exe if any
16959  new_path="${new_path/%.exe/}"
16960
16961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16962
16963  # First separate the path from the arguments. This will split at the first
16964  # space.
16965  complete="$BUILD_CC"
16966  path="${complete%% *}"
16967  tmp="$complete EOL"
16968  arguments="${tmp#* }"
16969
16970  # Input might be given as Windows format, start by converting to
16971  # unix format.
16972  new_path="$path"
16973
16974  windows_path="$new_path"
16975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16976    unix_path=`$CYGPATH -u "$windows_path"`
16977    new_path="$unix_path"
16978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16980    new_path="$unix_path"
16981  fi
16982
16983
16984  # Now try to locate executable using which
16985  new_path=`$WHICH "$new_path" 2> /dev/null`
16986
16987  if test "x$new_path" = x; then
16988    # Oops. Which didn't find the executable.
16989    # The splitting of arguments from the executable at a space might have been incorrect,
16990    # since paths with space are more likely in Windows. Give it another try with the whole
16991    # argument.
16992    path="$complete"
16993    arguments="EOL"
16994    new_path="$path"
16995
16996  windows_path="$new_path"
16997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16998    unix_path=`$CYGPATH -u "$windows_path"`
16999    new_path="$unix_path"
17000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17002    new_path="$unix_path"
17003  fi
17004
17005
17006    new_path=`$WHICH "$new_path" 2> /dev/null`
17007
17008    if test "x$new_path" = x; then
17009      # It's still not found. Now this is an unrecoverable error.
17010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17011$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17012      has_space=`$ECHO "$complete" | $GREP " "`
17013      if test "x$has_space" != x; then
17014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17016      fi
17017      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17018    fi
17019  fi
17020
17021  # Now new_path has a complete unix path to the binary
17022  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17023    # Keep paths in /bin as-is, but remove trailing .exe if any
17024    new_path="${new_path/%.exe/}"
17025    # Do not save /bin paths to all_fixpath_prefixes!
17026  else
17027    # Not in mixed or Windows style, start by that.
17028    new_path=`cmd //c echo $new_path`
17029
17030  input_path="$new_path"
17031  # Check if we need to convert this using DOS-style short mode. If the path
17032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17033  # take no chances and rewrite it.
17034  # Note: m4 eats our [], so we need to use [ and ] instead.
17035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17036  if test "x$has_forbidden_chars" != x; then
17037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17039  fi
17040
17041    # Output is in $new_path
17042
17043  windows_path="$new_path"
17044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17045    unix_path=`$CYGPATH -u "$windows_path"`
17046    new_path="$unix_path"
17047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17049    new_path="$unix_path"
17050  fi
17051
17052    # remove trailing .exe if any
17053    new_path="${new_path/%.exe/}"
17054
17055    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17056    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17057  fi
17058
17059  else
17060    # We're on a posix platform. Hooray! :)
17061    # First separate the path from the arguments. This will split at the first
17062    # space.
17063    complete="$BUILD_CC"
17064    path="${complete%% *}"
17065    tmp="$complete EOL"
17066    arguments="${tmp#* }"
17067
17068    # Cannot rely on the command "which" here since it doesn't always work.
17069    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17070    if test -z "$is_absolute_path"; then
17071      # Path to executable is not absolute. Find it.
17072      IFS_save="$IFS"
17073      IFS=:
17074      for p in $PATH; do
17075        if test -f "$p/$path" && test -x "$p/$path"; then
17076          new_path="$p/$path"
17077          break
17078        fi
17079      done
17080      IFS="$IFS_save"
17081    else
17082      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17083$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17084      new_path="$path"
17085    fi
17086
17087    if test "x$new_path" = x; then
17088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17089$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17090        has_space=`$ECHO "$complete" | $GREP " "`
17091        if test "x$has_space" != x; then
17092          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17093$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17094        fi
17095        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17096      fi
17097  fi
17098
17099      # Now join together the path and the arguments once again
17100      if test "x$arguments" != xEOL; then
17101        new_complete="$new_path ${arguments% *}"
17102      else
17103        new_complete="$new_path"
17104      fi
17105
17106  if test "x$complete" != "x$new_complete"; then
17107      BUILD_CC="$new_complete"
17108      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17109$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17110    fi
17111
17112    for ac_prog in cl CC g++
17113do
17114  # Extract the first word of "$ac_prog", so it can be a program name with args.
17115set dummy $ac_prog; ac_word=$2
17116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17117$as_echo_n "checking for $ac_word... " >&6; }
17118if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17119  $as_echo_n "(cached) " >&6
17120else
17121  case $BUILD_CXX in
17122  [\\/]* | ?:[\\/]*)
17123  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17124  ;;
17125  *)
17126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17127for as_dir in $PATH
17128do
17129  IFS=$as_save_IFS
17130  test -z "$as_dir" && as_dir=.
17131    for ac_exec_ext in '' $ac_executable_extensions; do
17132  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17133    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17135    break 2
17136  fi
17137done
17138  done
17139IFS=$as_save_IFS
17140
17141  ;;
17142esac
17143fi
17144BUILD_CXX=$ac_cv_path_BUILD_CXX
17145if test -n "$BUILD_CXX"; then
17146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17147$as_echo "$BUILD_CXX" >&6; }
17148else
17149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17150$as_echo "no" >&6; }
17151fi
17152
17153
17154  test -n "$BUILD_CXX" && break
17155done
17156
17157
17158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17159
17160  # First separate the path from the arguments. This will split at the first
17161  # space.
17162  complete="$BUILD_CXX"
17163  path="${complete%% *}"
17164  tmp="$complete EOL"
17165  arguments="${tmp#* }"
17166
17167  # Input might be given as Windows format, start by converting to
17168  # unix format.
17169  new_path=`$CYGPATH -u "$path"`
17170
17171  # Now try to locate executable using which
17172  new_path=`$WHICH "$new_path" 2> /dev/null`
17173  # bat and cmd files are not always considered executable in cygwin causing which
17174  # to not find them
17175  if test "x$new_path" = x \
17176           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17177           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17178    new_path=`$CYGPATH -u "$path"`
17179  fi
17180  if test "x$new_path" = x; then
17181    # Oops. Which didn't find the executable.
17182    # The splitting of arguments from the executable at a space might have been incorrect,
17183    # since paths with space are more likely in Windows. Give it another try with the whole
17184    # argument.
17185    path="$complete"
17186    arguments="EOL"
17187    new_path=`$CYGPATH -u "$path"`
17188    new_path=`$WHICH "$new_path" 2> /dev/null`
17189    # bat and cmd files are not always considered executable in cygwin causing which
17190    # to not find them
17191    if test "x$new_path" = x \
17192             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17193             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17194      new_path=`$CYGPATH -u "$path"`
17195    fi
17196    if test "x$new_path" = x; then
17197      # It's still not found. Now this is an unrecoverable error.
17198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17199$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17200      has_space=`$ECHO "$complete" | $GREP " "`
17201      if test "x$has_space" != x; then
17202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17204      fi
17205      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17206    fi
17207  fi
17208
17209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17212  # "foo.exe" is OK but "foo" is an error.
17213  #
17214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17215  # It is also a way to make sure we got the proper file name for the real test later on.
17216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17217  if test "x$test_shortpath" = x; then
17218    # Short path failed, file does not exist as specified.
17219    # Try adding .exe or .cmd
17220    if test -f "${new_path}.exe"; then
17221       input_to_shortpath="${new_path}.exe"
17222    elif test -f "${new_path}.cmd"; then
17223       input_to_shortpath="${new_path}.cmd"
17224    else
17225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17226$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17227      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17228$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17229      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17230    fi
17231  else
17232    input_to_shortpath="$new_path"
17233  fi
17234
17235  # Call helper function which possibly converts this using DOS-style short mode.
17236  # If so, the updated path is stored in $new_path.
17237  new_path="$input_to_shortpath"
17238
17239  input_path="$input_to_shortpath"
17240  # Check if we need to convert this using DOS-style short mode. If the path
17241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17242  # take no chances and rewrite it.
17243  # Note: m4 eats our [], so we need to use [ and ] instead.
17244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17245  if test "x$has_forbidden_chars" != x; then
17246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17250      # Going to short mode and back again did indeed matter. Since short mode is
17251      # case insensitive, let's make it lowercase to improve readability.
17252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17253      # Now convert it back to Unix-stile (cygpath)
17254      input_path=`$CYGPATH -u "$shortmode_path"`
17255      new_path="$input_path"
17256    fi
17257  fi
17258
17259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17260  if test "x$test_cygdrive_prefix" = x; then
17261    # As a simple fix, exclude /usr/bin since it's not a real path.
17262    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17264      # a path prefixed by /cygdrive for fixpath to work.
17265      new_path="$CYGWIN_ROOT_PATH$input_path"
17266    fi
17267  fi
17268
17269  # remove trailing .exe if any
17270  new_path="${new_path/%.exe/}"
17271
17272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17273
17274  # First separate the path from the arguments. This will split at the first
17275  # space.
17276  complete="$BUILD_CXX"
17277  path="${complete%% *}"
17278  tmp="$complete EOL"
17279  arguments="${tmp#* }"
17280
17281  # Input might be given as Windows format, start by converting to
17282  # unix format.
17283  new_path="$path"
17284
17285  windows_path="$new_path"
17286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17287    unix_path=`$CYGPATH -u "$windows_path"`
17288    new_path="$unix_path"
17289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17291    new_path="$unix_path"
17292  fi
17293
17294
17295  # Now try to locate executable using which
17296  new_path=`$WHICH "$new_path" 2> /dev/null`
17297
17298  if test "x$new_path" = x; then
17299    # Oops. Which didn't find the executable.
17300    # The splitting of arguments from the executable at a space might have been incorrect,
17301    # since paths with space are more likely in Windows. Give it another try with the whole
17302    # argument.
17303    path="$complete"
17304    arguments="EOL"
17305    new_path="$path"
17306
17307  windows_path="$new_path"
17308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17309    unix_path=`$CYGPATH -u "$windows_path"`
17310    new_path="$unix_path"
17311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17313    new_path="$unix_path"
17314  fi
17315
17316
17317    new_path=`$WHICH "$new_path" 2> /dev/null`
17318
17319    if test "x$new_path" = x; then
17320      # It's still not found. Now this is an unrecoverable error.
17321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17322$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17323      has_space=`$ECHO "$complete" | $GREP " "`
17324      if test "x$has_space" != x; then
17325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17327      fi
17328      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17329    fi
17330  fi
17331
17332  # Now new_path has a complete unix path to the binary
17333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17334    # Keep paths in /bin as-is, but remove trailing .exe if any
17335    new_path="${new_path/%.exe/}"
17336    # Do not save /bin paths to all_fixpath_prefixes!
17337  else
17338    # Not in mixed or Windows style, start by that.
17339    new_path=`cmd //c echo $new_path`
17340
17341  input_path="$new_path"
17342  # Check if we need to convert this using DOS-style short mode. If the path
17343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17344  # take no chances and rewrite it.
17345  # Note: m4 eats our [], so we need to use [ and ] instead.
17346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17347  if test "x$has_forbidden_chars" != x; then
17348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17350  fi
17351
17352    # Output is in $new_path
17353
17354  windows_path="$new_path"
17355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17356    unix_path=`$CYGPATH -u "$windows_path"`
17357    new_path="$unix_path"
17358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17360    new_path="$unix_path"
17361  fi
17362
17363    # remove trailing .exe if any
17364    new_path="${new_path/%.exe/}"
17365
17366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17368  fi
17369
17370  else
17371    # We're on a posix platform. Hooray! :)
17372    # First separate the path from the arguments. This will split at the first
17373    # space.
17374    complete="$BUILD_CXX"
17375    path="${complete%% *}"
17376    tmp="$complete EOL"
17377    arguments="${tmp#* }"
17378
17379    # Cannot rely on the command "which" here since it doesn't always work.
17380    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17381    if test -z "$is_absolute_path"; then
17382      # Path to executable is not absolute. Find it.
17383      IFS_save="$IFS"
17384      IFS=:
17385      for p in $PATH; do
17386        if test -f "$p/$path" && test -x "$p/$path"; then
17387          new_path="$p/$path"
17388          break
17389        fi
17390      done
17391      IFS="$IFS_save"
17392    else
17393      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17394$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17395      new_path="$path"
17396    fi
17397
17398    if test "x$new_path" = x; then
17399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17400$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17401        has_space=`$ECHO "$complete" | $GREP " "`
17402        if test "x$has_space" != x; then
17403          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17404$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17405        fi
17406        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17407      fi
17408  fi
17409
17410      # Now join together the path and the arguments once again
17411      if test "x$arguments" != xEOL; then
17412        new_complete="$new_path ${arguments% *}"
17413      else
17414        new_complete="$new_path"
17415      fi
17416
17417  if test "x$complete" != "x$new_complete"; then
17418      BUILD_CXX="$new_complete"
17419      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17420$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17421    fi
17422
17423    # Extract the first word of "ld", so it can be a program name with args.
17424set dummy ld; ac_word=$2
17425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17426$as_echo_n "checking for $ac_word... " >&6; }
17427if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17428  $as_echo_n "(cached) " >&6
17429else
17430  case $BUILD_LD in
17431  [\\/]* | ?:[\\/]*)
17432  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17433  ;;
17434  *)
17435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17436for as_dir in $PATH
17437do
17438  IFS=$as_save_IFS
17439  test -z "$as_dir" && as_dir=.
17440    for ac_exec_ext in '' $ac_executable_extensions; do
17441  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17442    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17444    break 2
17445  fi
17446done
17447  done
17448IFS=$as_save_IFS
17449
17450  ;;
17451esac
17452fi
17453BUILD_LD=$ac_cv_path_BUILD_LD
17454if test -n "$BUILD_LD"; then
17455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17456$as_echo "$BUILD_LD" >&6; }
17457else
17458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17459$as_echo "no" >&6; }
17460fi
17461
17462
17463
17464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17465
17466  # First separate the path from the arguments. This will split at the first
17467  # space.
17468  complete="$BUILD_LD"
17469  path="${complete%% *}"
17470  tmp="$complete EOL"
17471  arguments="${tmp#* }"
17472
17473  # Input might be given as Windows format, start by converting to
17474  # unix format.
17475  new_path=`$CYGPATH -u "$path"`
17476
17477  # Now try to locate executable using which
17478  new_path=`$WHICH "$new_path" 2> /dev/null`
17479  # bat and cmd files are not always considered executable in cygwin causing which
17480  # to not find them
17481  if test "x$new_path" = x \
17482           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17483           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17484    new_path=`$CYGPATH -u "$path"`
17485  fi
17486  if test "x$new_path" = x; then
17487    # Oops. Which didn't find the executable.
17488    # The splitting of arguments from the executable at a space might have been incorrect,
17489    # since paths with space are more likely in Windows. Give it another try with the whole
17490    # argument.
17491    path="$complete"
17492    arguments="EOL"
17493    new_path=`$CYGPATH -u "$path"`
17494    new_path=`$WHICH "$new_path" 2> /dev/null`
17495    # bat and cmd files are not always considered executable in cygwin causing which
17496    # to not find them
17497    if test "x$new_path" = x \
17498             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17499             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17500      new_path=`$CYGPATH -u "$path"`
17501    fi
17502    if test "x$new_path" = x; then
17503      # It's still not found. Now this is an unrecoverable error.
17504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17505$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17506      has_space=`$ECHO "$complete" | $GREP " "`
17507      if test "x$has_space" != x; then
17508        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17509$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17510      fi
17511      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17512    fi
17513  fi
17514
17515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17518  # "foo.exe" is OK but "foo" is an error.
17519  #
17520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17521  # It is also a way to make sure we got the proper file name for the real test later on.
17522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17523  if test "x$test_shortpath" = x; then
17524    # Short path failed, file does not exist as specified.
17525    # Try adding .exe or .cmd
17526    if test -f "${new_path}.exe"; then
17527       input_to_shortpath="${new_path}.exe"
17528    elif test -f "${new_path}.cmd"; then
17529       input_to_shortpath="${new_path}.cmd"
17530    else
17531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17532$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17533      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17534$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17535      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17536    fi
17537  else
17538    input_to_shortpath="$new_path"
17539  fi
17540
17541  # Call helper function which possibly converts this using DOS-style short mode.
17542  # If so, the updated path is stored in $new_path.
17543  new_path="$input_to_shortpath"
17544
17545  input_path="$input_to_shortpath"
17546  # Check if we need to convert this using DOS-style short mode. If the path
17547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17548  # take no chances and rewrite it.
17549  # Note: m4 eats our [], so we need to use [ and ] instead.
17550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17551  if test "x$has_forbidden_chars" != x; then
17552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17556      # Going to short mode and back again did indeed matter. Since short mode is
17557      # case insensitive, let's make it lowercase to improve readability.
17558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17559      # Now convert it back to Unix-stile (cygpath)
17560      input_path=`$CYGPATH -u "$shortmode_path"`
17561      new_path="$input_path"
17562    fi
17563  fi
17564
17565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17566  if test "x$test_cygdrive_prefix" = x; then
17567    # As a simple fix, exclude /usr/bin since it's not a real path.
17568    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17570      # a path prefixed by /cygdrive for fixpath to work.
17571      new_path="$CYGWIN_ROOT_PATH$input_path"
17572    fi
17573  fi
17574
17575  # remove trailing .exe if any
17576  new_path="${new_path/%.exe/}"
17577
17578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17579
17580  # First separate the path from the arguments. This will split at the first
17581  # space.
17582  complete="$BUILD_LD"
17583  path="${complete%% *}"
17584  tmp="$complete EOL"
17585  arguments="${tmp#* }"
17586
17587  # Input might be given as Windows format, start by converting to
17588  # unix format.
17589  new_path="$path"
17590
17591  windows_path="$new_path"
17592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17593    unix_path=`$CYGPATH -u "$windows_path"`
17594    new_path="$unix_path"
17595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17597    new_path="$unix_path"
17598  fi
17599
17600
17601  # Now try to locate executable using which
17602  new_path=`$WHICH "$new_path" 2> /dev/null`
17603
17604  if test "x$new_path" = x; then
17605    # Oops. Which didn't find the executable.
17606    # The splitting of arguments from the executable at a space might have been incorrect,
17607    # since paths with space are more likely in Windows. Give it another try with the whole
17608    # argument.
17609    path="$complete"
17610    arguments="EOL"
17611    new_path="$path"
17612
17613  windows_path="$new_path"
17614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17615    unix_path=`$CYGPATH -u "$windows_path"`
17616    new_path="$unix_path"
17617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17619    new_path="$unix_path"
17620  fi
17621
17622
17623    new_path=`$WHICH "$new_path" 2> /dev/null`
17624
17625    if test "x$new_path" = x; then
17626      # It's still not found. Now this is an unrecoverable error.
17627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17628$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17629      has_space=`$ECHO "$complete" | $GREP " "`
17630      if test "x$has_space" != x; then
17631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17633      fi
17634      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17635    fi
17636  fi
17637
17638  # Now new_path has a complete unix path to the binary
17639  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17640    # Keep paths in /bin as-is, but remove trailing .exe if any
17641    new_path="${new_path/%.exe/}"
17642    # Do not save /bin paths to all_fixpath_prefixes!
17643  else
17644    # Not in mixed or Windows style, start by that.
17645    new_path=`cmd //c echo $new_path`
17646
17647  input_path="$new_path"
17648  # Check if we need to convert this using DOS-style short mode. If the path
17649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17650  # take no chances and rewrite it.
17651  # Note: m4 eats our [], so we need to use [ and ] instead.
17652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17653  if test "x$has_forbidden_chars" != x; then
17654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17656  fi
17657
17658    # Output is in $new_path
17659
17660  windows_path="$new_path"
17661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17662    unix_path=`$CYGPATH -u "$windows_path"`
17663    new_path="$unix_path"
17664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17666    new_path="$unix_path"
17667  fi
17668
17669    # remove trailing .exe if any
17670    new_path="${new_path/%.exe/}"
17671
17672    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17673    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17674  fi
17675
17676  else
17677    # We're on a posix platform. Hooray! :)
17678    # First separate the path from the arguments. This will split at the first
17679    # space.
17680    complete="$BUILD_LD"
17681    path="${complete%% *}"
17682    tmp="$complete EOL"
17683    arguments="${tmp#* }"
17684
17685    # Cannot rely on the command "which" here since it doesn't always work.
17686    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17687    if test -z "$is_absolute_path"; then
17688      # Path to executable is not absolute. Find it.
17689      IFS_save="$IFS"
17690      IFS=:
17691      for p in $PATH; do
17692        if test -f "$p/$path" && test -x "$p/$path"; then
17693          new_path="$p/$path"
17694          break
17695        fi
17696      done
17697      IFS="$IFS_save"
17698    else
17699      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17700$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17701      new_path="$path"
17702    fi
17703
17704    if test "x$new_path" = x; then
17705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17706$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17707        has_space=`$ECHO "$complete" | $GREP " "`
17708        if test "x$has_space" != x; then
17709          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17710$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17711        fi
17712        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17713      fi
17714  fi
17715
17716      # Now join together the path and the arguments once again
17717      if test "x$arguments" != xEOL; then
17718        new_complete="$new_path ${arguments% *}"
17719      else
17720        new_complete="$new_path"
17721      fi
17722
17723  if test "x$complete" != "x$new_complete"; then
17724      BUILD_LD="$new_complete"
17725      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17726$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17727    fi
17728
17729fi
17730
17731
17732
17733
17734# If a devkit is found on the builddeps server, then prepend its path to the
17735# PATH variable. If there are cross compilers available in the devkit, these
17736# will be found by AC_PROG_CC et al.
17737DEVKIT=
17738
17739
17740    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17741        # Source the builddeps file again, to make sure it uses the latest variables!
17742        . $builddepsfile
17743        # Look for a target and build machine specific resource!
17744        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17745        if test "x$resource" = x; then
17746            # Ok, lets instead look for a target specific resource
17747            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17748        fi
17749        if test "x$resource" = x; then
17750            # Ok, lets instead look for a build specific resource
17751            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17752        fi
17753        if test "x$resource" = x; then
17754            # Ok, lets instead look for a generic resource
17755            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17756            resource=${builddep_devkit}
17757        fi
17758        if test "x$resource" != x; then
17759            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17760$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17761	    # If the resource in the builddeps.conf file is an existing directory,
17762	    # for example /java/linux/cups
17763	    if test -d ${resource}; then
17764	       depdir=${resource}
17765	    else
17766
17767# devkit is for example mymodule
17768# $resource is for example libs/general/libmymod_1_2_3.zip
17769# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17770# $with_builddeps_dir is for example /localhome/builddeps
17771# depdir is the name of the variable into which we store the depdir, eg MYMOD
17772# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17773# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17774    filename=`basename $resource`
17775    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17776    filebase=${filename%%.*}
17777    extension=${filename#*.}
17778    installdir=$with_builddeps_dir/$filebase
17779    if test ! -f $installdir/$filename.unpacked; then
17780        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17781$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17782        if test ! -d $installdir; then
17783            mkdir -p $installdir
17784        fi
17785        if test ! -d $installdir; then
17786            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17787        fi
17788        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17789        touch $tmpfile
17790        if test ! -f $tmpfile; then
17791            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17792        fi
17793
17794    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17795    # $tmpfile is the local file name for the downloaded file.
17796    VALID_TOOL=no
17797    if test "x$BDEPS_FTP" = xwget; then
17798       VALID_TOOL=yes
17799       wget -O $tmpfile $with_builddeps_server/$resource
17800    fi
17801    if test "x$BDEPS_FTP" = xlftp; then
17802       VALID_TOOL=yes
17803       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17804    fi
17805    if test "x$BDEPS_FTP" = xftp; then
17806        VALID_TOOL=yes
17807        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17808        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17809        FTPUSERPWD=${FTPSERVER%%@*}
17810        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17811            FTPUSER=${userpwd%%:*}
17812            FTPPWD=${userpwd#*@}
17813            FTPSERVER=${FTPSERVER#*@}
17814        else
17815            FTPUSER=ftp
17816            FTPPWD=ftp
17817        fi
17818        # the "pass" command does not work on some
17819        # ftp clients (read ftp.exe) but if it works,
17820        # passive mode is better!
17821        (\
17822            echo "user $FTPUSER $FTPPWD"        ;\
17823            echo "pass"                         ;\
17824            echo "bin"                          ;\
17825            echo "get $FTPPATH $tmpfile"              ;\
17826        ) | ftp -in $FTPSERVER
17827    fi
17828    if test "x$VALID_TOOL" != xyes; then
17829       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17830    fi
17831
17832        mv $tmpfile $installdir/$filename
17833        if test ! -s $installdir/$filename; then
17834            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17835        fi
17836        case "$extension" in
17837            zip)  echo "Unzipping $installdir/$filename..."
17838               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17839            ;;
17840            tar.gz) echo "Untaring $installdir/$filename..."
17841               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17842            ;;
17843            tgz) echo "Untaring $installdir/$filename..."
17844               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17845            ;;
17846            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17847            ;;
17848        esac
17849    fi
17850    if test -f $installdir/$filename.unpacked; then
17851        depdir=$installdir
17852    fi
17853
17854	    fi
17855            # Source the builddeps file again, because in the previous command, the depdir
17856            # was updated to point at the current build dependency install directory.
17857            . $builddepsfile
17858            # Now extract variables from the builddeps.conf files.
17859            theroot=${builddep_devkit_ROOT}
17860            thecflags=${builddep_devkit_CFLAGS}
17861            thelibs=${builddep_devkit_LIBS}
17862            if test "x$depdir" = x; then
17863                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17864            fi
17865            DEVKIT=$depdir
17866            if test "x$theroot" != x; then
17867               DEVKIT="$theroot"
17868            fi
17869            if test "x$thecflags" != x; then
17870               DEVKIT_CFLAGS="$thecflags"
17871            fi
17872            if test "x$thelibs" != x; then
17873               DEVKIT_LIBS="$thelibs"
17874            fi
17875            # Found devkit
17876                     PATH="$DEVKIT/bin:$PATH"
17877                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17878                     if test "x$x_includes" = "xNONE"; then
17879                         x_includes="$SYS_ROOT/usr/include/X11"
17880                     fi
17881                     if test "x$x_libraries" = "xNONE"; then
17882                         x_libraries="$SYS_ROOT/usr/lib"
17883                     fi
17884
17885
17886        fi
17887
17888    fi
17889
17890
17891if test "x$SYS_ROOT" != "x/" ; then
17892    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17893    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17894    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17895    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17896    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17897    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17898fi
17899
17900# Store the CFLAGS etal passed to the configure script.
17901ORG_CFLAGS="$CFLAGS"
17902ORG_CXXFLAGS="$CXXFLAGS"
17903ORG_OBJCFLAGS="$OBJCFLAGS"
17904
17905# autoconf magic only relies on PATH, so update it if tools dir is specified
17906OLD_PATH="$PATH"
17907if test "x$TOOLS_DIR" != x; then
17908  PATH=$TOOLS_DIR:$PATH
17909fi
17910
17911
17912### Locate C compiler (CC)
17913
17914# gcc is almost always present, but on Windows we
17915# prefer cl.exe and on Solaris we prefer CC.
17916# Thus test for them in this order.
17917if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17918  # Do not probe for cc on MacOSX.
17919  COMPILER_CHECK_LIST="cl gcc"
17920else
17921  COMPILER_CHECK_LIST="cl cc gcc"
17922fi
17923
17924
17925  COMPILER_NAME=C
17926
17927  CC=
17928  # If TOOLS_DIR is set, check for all compiler names in there first
17929  # before checking the rest of the PATH.
17930  if test -n "$TOOLS_DIR"; then
17931    PATH_save="$PATH"
17932    PATH="$TOOLS_DIR"
17933    for ac_prog in $COMPILER_CHECK_LIST
17934do
17935  # Extract the first word of "$ac_prog", so it can be a program name with args.
17936set dummy $ac_prog; ac_word=$2
17937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17938$as_echo_n "checking for $ac_word... " >&6; }
17939if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
17940  $as_echo_n "(cached) " >&6
17941else
17942  case $TOOLS_DIR_CC in
17943  [\\/]* | ?:[\\/]*)
17944  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
17945  ;;
17946  *)
17947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17948for as_dir in $PATH
17949do
17950  IFS=$as_save_IFS
17951  test -z "$as_dir" && as_dir=.
17952    for ac_exec_ext in '' $ac_executable_extensions; do
17953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17954    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
17955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17956    break 2
17957  fi
17958done
17959  done
17960IFS=$as_save_IFS
17961
17962  ;;
17963esac
17964fi
17965TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
17966if test -n "$TOOLS_DIR_CC"; then
17967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
17968$as_echo "$TOOLS_DIR_CC" >&6; }
17969else
17970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17971$as_echo "no" >&6; }
17972fi
17973
17974
17975  test -n "$TOOLS_DIR_CC" && break
17976done
17977
17978    CC=$TOOLS_DIR_CC
17979    PATH="$PATH_save"
17980  fi
17981
17982  # AC_PATH_PROGS can't be run multiple times with the same variable,
17983  # so create a new name for this run.
17984  if test "x$CC" = x; then
17985    for ac_prog in $COMPILER_CHECK_LIST
17986do
17987  # Extract the first word of "$ac_prog", so it can be a program name with args.
17988set dummy $ac_prog; ac_word=$2
17989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17990$as_echo_n "checking for $ac_word... " >&6; }
17991if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17992  $as_echo_n "(cached) " >&6
17993else
17994  case $POTENTIAL_CC in
17995  [\\/]* | ?:[\\/]*)
17996  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17997  ;;
17998  *)
17999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18000for as_dir in $PATH
18001do
18002  IFS=$as_save_IFS
18003  test -z "$as_dir" && as_dir=.
18004    for ac_exec_ext in '' $ac_executable_extensions; do
18005  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18006    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18008    break 2
18009  fi
18010done
18011  done
18012IFS=$as_save_IFS
18013
18014  ;;
18015esac
18016fi
18017POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18018if test -n "$POTENTIAL_CC"; then
18019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18020$as_echo "$POTENTIAL_CC" >&6; }
18021else
18022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18023$as_echo "no" >&6; }
18024fi
18025
18026
18027  test -n "$POTENTIAL_CC" && break
18028done
18029
18030    CC=$POTENTIAL_CC
18031  fi
18032
18033  if test "x$CC" = x; then
18034
18035    # Print a helpful message on how to acquire the necessary build dependency.
18036    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18037    MISSING_DEPENDENCY=devkit
18038    PKGHANDLER_COMMAND=
18039
18040    case $PKGHANDLER in
18041	apt-get)
18042                apt_help     $MISSING_DEPENDENCY ;;
18043    yum)
18044                yum_help     $MISSING_DEPENDENCY ;;
18045	port)
18046                port_help    $MISSING_DEPENDENCY ;;
18047	pkgutil)
18048                pkgutil_help $MISSING_DEPENDENCY ;;
18049	pkgadd)
18050                pkgadd_help  $MISSING_DEPENDENCY ;;
18051    * )
18052      break ;;
18053    esac
18054
18055    if test "x$PKGHANDLER_COMMAND" != x; then
18056        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18057    fi
18058
18059      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18060  fi
18061
18062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18063
18064  # First separate the path from the arguments. This will split at the first
18065  # space.
18066  complete="$CC"
18067  path="${complete%% *}"
18068  tmp="$complete EOL"
18069  arguments="${tmp#* }"
18070
18071  # Input might be given as Windows format, start by converting to
18072  # unix format.
18073  new_path=`$CYGPATH -u "$path"`
18074
18075  # Now try to locate executable using which
18076  new_path=`$WHICH "$new_path" 2> /dev/null`
18077  # bat and cmd files are not always considered executable in cygwin causing which
18078  # to not find them
18079  if test "x$new_path" = x \
18080           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18081           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18082    new_path=`$CYGPATH -u "$path"`
18083  fi
18084  if test "x$new_path" = x; then
18085    # Oops. Which didn't find the executable.
18086    # The splitting of arguments from the executable at a space might have been incorrect,
18087    # since paths with space are more likely in Windows. Give it another try with the whole
18088    # argument.
18089    path="$complete"
18090    arguments="EOL"
18091    new_path=`$CYGPATH -u "$path"`
18092    new_path=`$WHICH "$new_path" 2> /dev/null`
18093    # bat and cmd files are not always considered executable in cygwin causing which
18094    # to not find them
18095    if test "x$new_path" = x \
18096             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18097             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18098      new_path=`$CYGPATH -u "$path"`
18099    fi
18100    if test "x$new_path" = x; then
18101      # It's still not found. Now this is an unrecoverable error.
18102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18103$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18104      has_space=`$ECHO "$complete" | $GREP " "`
18105      if test "x$has_space" != x; then
18106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18108      fi
18109      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18110    fi
18111  fi
18112
18113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18116  # "foo.exe" is OK but "foo" is an error.
18117  #
18118  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18119  # It is also a way to make sure we got the proper file name for the real test later on.
18120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18121  if test "x$test_shortpath" = x; then
18122    # Short path failed, file does not exist as specified.
18123    # Try adding .exe or .cmd
18124    if test -f "${new_path}.exe"; then
18125       input_to_shortpath="${new_path}.exe"
18126    elif test -f "${new_path}.cmd"; then
18127       input_to_shortpath="${new_path}.cmd"
18128    else
18129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18130$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18133      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18134    fi
18135  else
18136    input_to_shortpath="$new_path"
18137  fi
18138
18139  # Call helper function which possibly converts this using DOS-style short mode.
18140  # If so, the updated path is stored in $new_path.
18141  new_path="$input_to_shortpath"
18142
18143  input_path="$input_to_shortpath"
18144  # Check if we need to convert this using DOS-style short mode. If the path
18145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18146  # take no chances and rewrite it.
18147  # Note: m4 eats our [], so we need to use [ and ] instead.
18148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18149  if test "x$has_forbidden_chars" != x; then
18150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18154      # Going to short mode and back again did indeed matter. Since short mode is
18155      # case insensitive, let's make it lowercase to improve readability.
18156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18157      # Now convert it back to Unix-stile (cygpath)
18158      input_path=`$CYGPATH -u "$shortmode_path"`
18159      new_path="$input_path"
18160    fi
18161  fi
18162
18163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18164  if test "x$test_cygdrive_prefix" = x; then
18165    # As a simple fix, exclude /usr/bin since it's not a real path.
18166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18168      # a path prefixed by /cygdrive for fixpath to work.
18169      new_path="$CYGWIN_ROOT_PATH$input_path"
18170    fi
18171  fi
18172
18173  # remove trailing .exe if any
18174  new_path="${new_path/%.exe/}"
18175
18176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18177
18178  # First separate the path from the arguments. This will split at the first
18179  # space.
18180  complete="$CC"
18181  path="${complete%% *}"
18182  tmp="$complete EOL"
18183  arguments="${tmp#* }"
18184
18185  # Input might be given as Windows format, start by converting to
18186  # unix format.
18187  new_path="$path"
18188
18189  windows_path="$new_path"
18190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18191    unix_path=`$CYGPATH -u "$windows_path"`
18192    new_path="$unix_path"
18193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18195    new_path="$unix_path"
18196  fi
18197
18198
18199  # Now try to locate executable using which
18200  new_path=`$WHICH "$new_path" 2> /dev/null`
18201
18202  if test "x$new_path" = x; then
18203    # Oops. Which didn't find the executable.
18204    # The splitting of arguments from the executable at a space might have been incorrect,
18205    # since paths with space are more likely in Windows. Give it another try with the whole
18206    # argument.
18207    path="$complete"
18208    arguments="EOL"
18209    new_path="$path"
18210
18211  windows_path="$new_path"
18212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18213    unix_path=`$CYGPATH -u "$windows_path"`
18214    new_path="$unix_path"
18215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18217    new_path="$unix_path"
18218  fi
18219
18220
18221    new_path=`$WHICH "$new_path" 2> /dev/null`
18222
18223    if test "x$new_path" = x; then
18224      # It's still not found. Now this is an unrecoverable error.
18225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18226$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18227      has_space=`$ECHO "$complete" | $GREP " "`
18228      if test "x$has_space" != x; then
18229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18231      fi
18232      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18233    fi
18234  fi
18235
18236  # Now new_path has a complete unix path to the binary
18237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18238    # Keep paths in /bin as-is, but remove trailing .exe if any
18239    new_path="${new_path/%.exe/}"
18240    # Do not save /bin paths to all_fixpath_prefixes!
18241  else
18242    # Not in mixed or Windows style, start by that.
18243    new_path=`cmd //c echo $new_path`
18244
18245  input_path="$new_path"
18246  # Check if we need to convert this using DOS-style short mode. If the path
18247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18248  # take no chances and rewrite it.
18249  # Note: m4 eats our [], so we need to use [ and ] instead.
18250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18251  if test "x$has_forbidden_chars" != x; then
18252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18254  fi
18255
18256    # Output is in $new_path
18257
18258  windows_path="$new_path"
18259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18260    unix_path=`$CYGPATH -u "$windows_path"`
18261    new_path="$unix_path"
18262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18264    new_path="$unix_path"
18265  fi
18266
18267    # remove trailing .exe if any
18268    new_path="${new_path/%.exe/}"
18269
18270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18272  fi
18273
18274  else
18275    # We're on a posix platform. Hooray! :)
18276    # First separate the path from the arguments. This will split at the first
18277    # space.
18278    complete="$CC"
18279    path="${complete%% *}"
18280    tmp="$complete EOL"
18281    arguments="${tmp#* }"
18282
18283    # Cannot rely on the command "which" here since it doesn't always work.
18284    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18285    if test -z "$is_absolute_path"; then
18286      # Path to executable is not absolute. Find it.
18287      IFS_save="$IFS"
18288      IFS=:
18289      for p in $PATH; do
18290        if test -f "$p/$path" && test -x "$p/$path"; then
18291          new_path="$p/$path"
18292          break
18293        fi
18294      done
18295      IFS="$IFS_save"
18296    else
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18298$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18299      new_path="$path"
18300    fi
18301
18302    if test "x$new_path" = x; then
18303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18304$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18305        has_space=`$ECHO "$complete" | $GREP " "`
18306        if test "x$has_space" != x; then
18307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18309        fi
18310        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18311      fi
18312  fi
18313
18314      # Now join together the path and the arguments once again
18315      if test "x$arguments" != xEOL; then
18316        new_complete="$new_path ${arguments% *}"
18317      else
18318        new_complete="$new_path"
18319      fi
18320
18321  if test "x$complete" != "x$new_complete"; then
18322      CC="$new_complete"
18323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18324$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18325    fi
18326
18327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18328$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18329  TEST_COMPILER="$CC"
18330
18331    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18332        # Follow a chain of symbolic links. Use readlink
18333        # where it exists, else fall back to horribly
18334        # complicated shell code.
18335        if test "x$READLINK_TESTED" != yes; then
18336            # On MacOSX there is a readlink tool with a different
18337            # purpose than the GNU readlink tool. Check the found readlink.
18338            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18339            if test "x$ISGNU" = x; then
18340                 # A readlink that we do not know how to use.
18341                 # Are there other non-GNU readlinks out there?
18342                 READLINK_TESTED=yes
18343                 READLINK=
18344            fi
18345        fi
18346
18347        if test "x$READLINK" != x; then
18348            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18349        else
18350            # Save the current directory for restoring afterwards
18351            STARTDIR=$PWD
18352            COUNTER=0
18353            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18354            sym_link_file=`$BASENAME $TEST_COMPILER`
18355            # Use the system pwd and not the shell builtin to resolve directory symlinks
18356            cd $sym_link_dir
18357            cd `$THEPWDCMD`
18358            sym_link_dir=`$THEPWDCMD`
18359            # Resolve file symlinks
18360            while test $COUNTER -lt 20; do
18361                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18362                if test "x$ISLINK" == x; then
18363                    # This is not a symbolic link! We are done!
18364                    break
18365                fi
18366                # Again resolve directory symlinks since the target of the just found
18367                # link could be in a different directory
18368                cd `$DIRNAME $ISLINK`
18369                sym_link_dir=`$THEPWDCMD`
18370                sym_link_file=`$BASENAME $ISLINK`
18371                let COUNTER=COUNTER+1
18372            done
18373            cd $STARTDIR
18374            TEST_COMPILER=$sym_link_dir/$sym_link_file
18375        fi
18376    fi
18377
18378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18379$as_echo "$TEST_COMPILER" >&6; }
18380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18381$as_echo_n "checking if CC is disguised ccache... " >&6; }
18382
18383  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18384  if test "x$COMPILER_BASENAME" = "xccache"; then
18385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18386$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18387    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18388    # We want to control ccache invocation ourselves, so ignore this cc and try
18389    # searching again.
18390
18391    # Remove the path to the fake ccache cc from the PATH
18392    RETRY_COMPILER_SAVED_PATH="$PATH"
18393    COMPILER_DIRNAME=`$DIRNAME $CC`
18394    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18395
18396    # Try again looking for our compiler
18397    if test -n "$ac_tool_prefix"; then
18398  for ac_prog in $COMPILER_CHECK_LIST
18399  do
18400    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18401set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18403$as_echo_n "checking for $ac_word... " >&6; }
18404if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18405  $as_echo_n "(cached) " >&6
18406else
18407  if test -n "$PROPER_COMPILER_CC"; then
18408  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18409else
18410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18411for as_dir in $PATH
18412do
18413  IFS=$as_save_IFS
18414  test -z "$as_dir" && as_dir=.
18415    for ac_exec_ext in '' $ac_executable_extensions; do
18416  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18417    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18419    break 2
18420  fi
18421done
18422  done
18423IFS=$as_save_IFS
18424
18425fi
18426fi
18427PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18428if test -n "$PROPER_COMPILER_CC"; then
18429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18430$as_echo "$PROPER_COMPILER_CC" >&6; }
18431else
18432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18433$as_echo "no" >&6; }
18434fi
18435
18436
18437    test -n "$PROPER_COMPILER_CC" && break
18438  done
18439fi
18440if test -z "$PROPER_COMPILER_CC"; then
18441  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18442  for ac_prog in $COMPILER_CHECK_LIST
18443do
18444  # Extract the first word of "$ac_prog", so it can be a program name with args.
18445set dummy $ac_prog; ac_word=$2
18446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18447$as_echo_n "checking for $ac_word... " >&6; }
18448if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18449  $as_echo_n "(cached) " >&6
18450else
18451  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18452  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18453else
18454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18455for as_dir in $PATH
18456do
18457  IFS=$as_save_IFS
18458  test -z "$as_dir" && as_dir=.
18459    for ac_exec_ext in '' $ac_executable_extensions; do
18460  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18461    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18463    break 2
18464  fi
18465done
18466  done
18467IFS=$as_save_IFS
18468
18469fi
18470fi
18471ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18472if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18474$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18475else
18476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18477$as_echo "no" >&6; }
18478fi
18479
18480
18481  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18482done
18483
18484  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18485    PROPER_COMPILER_CC=""
18486  else
18487    case $cross_compiling:$ac_tool_warned in
18488yes:)
18489{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18491ac_tool_warned=yes ;;
18492esac
18493    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18494  fi
18495fi
18496
18497
18498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18499
18500  # First separate the path from the arguments. This will split at the first
18501  # space.
18502  complete="$PROPER_COMPILER_CC"
18503  path="${complete%% *}"
18504  tmp="$complete EOL"
18505  arguments="${tmp#* }"
18506
18507  # Input might be given as Windows format, start by converting to
18508  # unix format.
18509  new_path=`$CYGPATH -u "$path"`
18510
18511  # Now try to locate executable using which
18512  new_path=`$WHICH "$new_path" 2> /dev/null`
18513  # bat and cmd files are not always considered executable in cygwin causing which
18514  # to not find them
18515  if test "x$new_path" = x \
18516           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18517           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18518    new_path=`$CYGPATH -u "$path"`
18519  fi
18520  if test "x$new_path" = x; then
18521    # Oops. Which didn't find the executable.
18522    # The splitting of arguments from the executable at a space might have been incorrect,
18523    # since paths with space are more likely in Windows. Give it another try with the whole
18524    # argument.
18525    path="$complete"
18526    arguments="EOL"
18527    new_path=`$CYGPATH -u "$path"`
18528    new_path=`$WHICH "$new_path" 2> /dev/null`
18529    # bat and cmd files are not always considered executable in cygwin causing which
18530    # to not find them
18531    if test "x$new_path" = x \
18532             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18533             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18534      new_path=`$CYGPATH -u "$path"`
18535    fi
18536    if test "x$new_path" = x; then
18537      # It's still not found. Now this is an unrecoverable error.
18538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18539$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18540      has_space=`$ECHO "$complete" | $GREP " "`
18541      if test "x$has_space" != x; then
18542        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18543$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18544      fi
18545      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18546    fi
18547  fi
18548
18549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18552  # "foo.exe" is OK but "foo" is an error.
18553  #
18554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18555  # It is also a way to make sure we got the proper file name for the real test later on.
18556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18557  if test "x$test_shortpath" = x; then
18558    # Short path failed, file does not exist as specified.
18559    # Try adding .exe or .cmd
18560    if test -f "${new_path}.exe"; then
18561       input_to_shortpath="${new_path}.exe"
18562    elif test -f "${new_path}.cmd"; then
18563       input_to_shortpath="${new_path}.cmd"
18564    else
18565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18566$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18567      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18568$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18569      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18570    fi
18571  else
18572    input_to_shortpath="$new_path"
18573  fi
18574
18575  # Call helper function which possibly converts this using DOS-style short mode.
18576  # If so, the updated path is stored in $new_path.
18577  new_path="$input_to_shortpath"
18578
18579  input_path="$input_to_shortpath"
18580  # Check if we need to convert this using DOS-style short mode. If the path
18581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18582  # take no chances and rewrite it.
18583  # Note: m4 eats our [], so we need to use [ and ] instead.
18584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18585  if test "x$has_forbidden_chars" != x; then
18586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18590      # Going to short mode and back again did indeed matter. Since short mode is
18591      # case insensitive, let's make it lowercase to improve readability.
18592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18593      # Now convert it back to Unix-stile (cygpath)
18594      input_path=`$CYGPATH -u "$shortmode_path"`
18595      new_path="$input_path"
18596    fi
18597  fi
18598
18599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18600  if test "x$test_cygdrive_prefix" = x; then
18601    # As a simple fix, exclude /usr/bin since it's not a real path.
18602    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18604      # a path prefixed by /cygdrive for fixpath to work.
18605      new_path="$CYGWIN_ROOT_PATH$input_path"
18606    fi
18607  fi
18608
18609  # remove trailing .exe if any
18610  new_path="${new_path/%.exe/}"
18611
18612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18613
18614  # First separate the path from the arguments. This will split at the first
18615  # space.
18616  complete="$PROPER_COMPILER_CC"
18617  path="${complete%% *}"
18618  tmp="$complete EOL"
18619  arguments="${tmp#* }"
18620
18621  # Input might be given as Windows format, start by converting to
18622  # unix format.
18623  new_path="$path"
18624
18625  windows_path="$new_path"
18626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18627    unix_path=`$CYGPATH -u "$windows_path"`
18628    new_path="$unix_path"
18629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18631    new_path="$unix_path"
18632  fi
18633
18634
18635  # Now try to locate executable using which
18636  new_path=`$WHICH "$new_path" 2> /dev/null`
18637
18638  if test "x$new_path" = x; then
18639    # Oops. Which didn't find the executable.
18640    # The splitting of arguments from the executable at a space might have been incorrect,
18641    # since paths with space are more likely in Windows. Give it another try with the whole
18642    # argument.
18643    path="$complete"
18644    arguments="EOL"
18645    new_path="$path"
18646
18647  windows_path="$new_path"
18648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18649    unix_path=`$CYGPATH -u "$windows_path"`
18650    new_path="$unix_path"
18651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18653    new_path="$unix_path"
18654  fi
18655
18656
18657    new_path=`$WHICH "$new_path" 2> /dev/null`
18658
18659    if test "x$new_path" = x; then
18660      # It's still not found. Now this is an unrecoverable error.
18661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18662$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18663      has_space=`$ECHO "$complete" | $GREP " "`
18664      if test "x$has_space" != x; then
18665        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18666$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18667      fi
18668      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18669    fi
18670  fi
18671
18672  # Now new_path has a complete unix path to the binary
18673  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18674    # Keep paths in /bin as-is, but remove trailing .exe if any
18675    new_path="${new_path/%.exe/}"
18676    # Do not save /bin paths to all_fixpath_prefixes!
18677  else
18678    # Not in mixed or Windows style, start by that.
18679    new_path=`cmd //c echo $new_path`
18680
18681  input_path="$new_path"
18682  # Check if we need to convert this using DOS-style short mode. If the path
18683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18684  # take no chances and rewrite it.
18685  # Note: m4 eats our [], so we need to use [ and ] instead.
18686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18687  if test "x$has_forbidden_chars" != x; then
18688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18690  fi
18691
18692    # Output is in $new_path
18693
18694  windows_path="$new_path"
18695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18696    unix_path=`$CYGPATH -u "$windows_path"`
18697    new_path="$unix_path"
18698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18700    new_path="$unix_path"
18701  fi
18702
18703    # remove trailing .exe if any
18704    new_path="${new_path/%.exe/}"
18705
18706    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18707    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18708  fi
18709
18710  else
18711    # We're on a posix platform. Hooray! :)
18712    # First separate the path from the arguments. This will split at the first
18713    # space.
18714    complete="$PROPER_COMPILER_CC"
18715    path="${complete%% *}"
18716    tmp="$complete EOL"
18717    arguments="${tmp#* }"
18718
18719    # Cannot rely on the command "which" here since it doesn't always work.
18720    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18721    if test -z "$is_absolute_path"; then
18722      # Path to executable is not absolute. Find it.
18723      IFS_save="$IFS"
18724      IFS=:
18725      for p in $PATH; do
18726        if test -f "$p/$path" && test -x "$p/$path"; then
18727          new_path="$p/$path"
18728          break
18729        fi
18730      done
18731      IFS="$IFS_save"
18732    else
18733      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18734$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18735      new_path="$path"
18736    fi
18737
18738    if test "x$new_path" = x; then
18739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18740$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18741        has_space=`$ECHO "$complete" | $GREP " "`
18742        if test "x$has_space" != x; then
18743          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18744$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18745        fi
18746        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18747      fi
18748  fi
18749
18750      # Now join together the path and the arguments once again
18751      if test "x$arguments" != xEOL; then
18752        new_complete="$new_path ${arguments% *}"
18753      else
18754        new_complete="$new_path"
18755      fi
18756
18757  if test "x$complete" != "x$new_complete"; then
18758      PROPER_COMPILER_CC="$new_complete"
18759      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18760$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18761    fi
18762
18763    PATH="$RETRY_COMPILER_SAVED_PATH"
18764
18765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18766$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18767
18768    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18769        # Follow a chain of symbolic links. Use readlink
18770        # where it exists, else fall back to horribly
18771        # complicated shell code.
18772        if test "x$READLINK_TESTED" != yes; then
18773            # On MacOSX there is a readlink tool with a different
18774            # purpose than the GNU readlink tool. Check the found readlink.
18775            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18776            if test "x$ISGNU" = x; then
18777                 # A readlink that we do not know how to use.
18778                 # Are there other non-GNU readlinks out there?
18779                 READLINK_TESTED=yes
18780                 READLINK=
18781            fi
18782        fi
18783
18784        if test "x$READLINK" != x; then
18785            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18786        else
18787            # Save the current directory for restoring afterwards
18788            STARTDIR=$PWD
18789            COUNTER=0
18790            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18791            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18792            # Use the system pwd and not the shell builtin to resolve directory symlinks
18793            cd $sym_link_dir
18794            cd `$THEPWDCMD`
18795            sym_link_dir=`$THEPWDCMD`
18796            # Resolve file symlinks
18797            while test $COUNTER -lt 20; do
18798                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18799                if test "x$ISLINK" == x; then
18800                    # This is not a symbolic link! We are done!
18801                    break
18802                fi
18803                # Again resolve directory symlinks since the target of the just found
18804                # link could be in a different directory
18805                cd `$DIRNAME $ISLINK`
18806                sym_link_dir=`$THEPWDCMD`
18807                sym_link_file=`$BASENAME $ISLINK`
18808                let COUNTER=COUNTER+1
18809            done
18810            cd $STARTDIR
18811            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18812        fi
18813    fi
18814
18815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18816$as_echo "$PROPER_COMPILER_CC" >&6; }
18817    CC="$PROPER_COMPILER_CC"
18818  else
18819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18820$as_echo "no, keeping CC" >&6; }
18821    CC="$TEST_COMPILER"
18822  fi
18823
18824  COMPILER=$CC
18825  COMPILER_NAME=$COMPILER_NAME
18826
18827  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18828    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18829    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18830    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18831    if test $? -ne 0; then
18832      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18833
18834      { $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
18835$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18836      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18837$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18838      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18839    else
18840      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18841      COMPILER_VENDOR="Sun Studio"
18842    fi
18843  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18844    # First line typically looks something like:
18845    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18846    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18847    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18848    COMPILER_VENDOR="Microsoft CL.EXE"
18849    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18850    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18851      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18852        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18853      fi
18854    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18855      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18856        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18857      fi
18858    fi
18859  else
18860    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18861    # Check that this is likely to be GCC.
18862    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18863    if test $? -ne 0; then
18864      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18865$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18866      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18867$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18868      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18869    fi
18870
18871    # First line typically looks something like:
18872    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18873    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18874    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18875  fi
18876  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18877  CC_VERSION="$COMPILER_VERSION"
18878  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18879  CC_VENDOR="$COMPILER_VENDOR"
18880
18881  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18882$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18883
18884
18885# Now that we have resolved CC ourself, let autoconf have it's go at it
18886ac_ext=c
18887ac_cpp='$CPP $CPPFLAGS'
18888ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18889ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18890ac_compiler_gnu=$ac_cv_c_compiler_gnu
18891if test -n "$ac_tool_prefix"; then
18892  for ac_prog in $CC
18893  do
18894    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18895set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18897$as_echo_n "checking for $ac_word... " >&6; }
18898if test "${ac_cv_prog_CC+set}" = set; then :
18899  $as_echo_n "(cached) " >&6
18900else
18901  if test -n "$CC"; then
18902  ac_cv_prog_CC="$CC" # Let the user override the test.
18903else
18904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18905for as_dir in $PATH
18906do
18907  IFS=$as_save_IFS
18908  test -z "$as_dir" && as_dir=.
18909    for ac_exec_ext in '' $ac_executable_extensions; do
18910  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18911    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18913    break 2
18914  fi
18915done
18916  done
18917IFS=$as_save_IFS
18918
18919fi
18920fi
18921CC=$ac_cv_prog_CC
18922if test -n "$CC"; then
18923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18924$as_echo "$CC" >&6; }
18925else
18926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18927$as_echo "no" >&6; }
18928fi
18929
18930
18931    test -n "$CC" && break
18932  done
18933fi
18934if test -z "$CC"; then
18935  ac_ct_CC=$CC
18936  for ac_prog in $CC
18937do
18938  # Extract the first word of "$ac_prog", so it can be a program name with args.
18939set dummy $ac_prog; ac_word=$2
18940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18941$as_echo_n "checking for $ac_word... " >&6; }
18942if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18943  $as_echo_n "(cached) " >&6
18944else
18945  if test -n "$ac_ct_CC"; then
18946  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18947else
18948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18949for as_dir in $PATH
18950do
18951  IFS=$as_save_IFS
18952  test -z "$as_dir" && as_dir=.
18953    for ac_exec_ext in '' $ac_executable_extensions; do
18954  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18955    ac_cv_prog_ac_ct_CC="$ac_prog"
18956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18957    break 2
18958  fi
18959done
18960  done
18961IFS=$as_save_IFS
18962
18963fi
18964fi
18965ac_ct_CC=$ac_cv_prog_ac_ct_CC
18966if test -n "$ac_ct_CC"; then
18967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18968$as_echo "$ac_ct_CC" >&6; }
18969else
18970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18971$as_echo "no" >&6; }
18972fi
18973
18974
18975  test -n "$ac_ct_CC" && break
18976done
18977
18978  if test "x$ac_ct_CC" = x; then
18979    CC=""
18980  else
18981    case $cross_compiling:$ac_tool_warned in
18982yes:)
18983{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18984$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18985ac_tool_warned=yes ;;
18986esac
18987    CC=$ac_ct_CC
18988  fi
18989fi
18990
18991
18992test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18994as_fn_error $? "no acceptable C compiler found in \$PATH
18995See \`config.log' for more details" "$LINENO" 5 ; }
18996
18997# Provide some information about the compiler.
18998$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18999set X $ac_compile
19000ac_compiler=$2
19001for ac_option in --version -v -V -qversion; do
19002  { { ac_try="$ac_compiler $ac_option >&5"
19003case "(($ac_try" in
19004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19005  *) ac_try_echo=$ac_try;;
19006esac
19007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19008$as_echo "$ac_try_echo"; } >&5
19009  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19010  ac_status=$?
19011  if test -s conftest.err; then
19012    sed '10a\
19013... rest of stderr output deleted ...
19014         10q' conftest.err >conftest.er1
19015    cat conftest.er1 >&5
19016  fi
19017  rm -f conftest.er1 conftest.err
19018  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19019  test $ac_status = 0; }
19020done
19021
19022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19023/* end confdefs.h.  */
19024
19025int
19026main ()
19027{
19028
19029  ;
19030  return 0;
19031}
19032_ACEOF
19033ac_clean_files_save=$ac_clean_files
19034ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19035# Try to create an executable without -o first, disregard a.out.
19036# It will help us diagnose broken compilers, and finding out an intuition
19037# of exeext.
19038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19039$as_echo_n "checking whether the C compiler works... " >&6; }
19040ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19041
19042# The possible output files:
19043ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19044
19045ac_rmfiles=
19046for ac_file in $ac_files
19047do
19048  case $ac_file in
19049    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19050    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19051  esac
19052done
19053rm -f $ac_rmfiles
19054
19055if { { ac_try="$ac_link_default"
19056case "(($ac_try" in
19057  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19058  *) ac_try_echo=$ac_try;;
19059esac
19060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19061$as_echo "$ac_try_echo"; } >&5
19062  (eval "$ac_link_default") 2>&5
19063  ac_status=$?
19064  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19065  test $ac_status = 0; }; then :
19066  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19067# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19068# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19069# so that the user can short-circuit this test for compilers unknown to
19070# Autoconf.
19071for ac_file in $ac_files ''
19072do
19073  test -f "$ac_file" || continue
19074  case $ac_file in
19075    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19076	;;
19077    [ab].out )
19078	# We found the default executable, but exeext='' is most
19079	# certainly right.
19080	break;;
19081    *.* )
19082	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19083	then :; else
19084	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19085	fi
19086	# We set ac_cv_exeext here because the later test for it is not
19087	# safe: cross compilers may not add the suffix if given an `-o'
19088	# argument, so we may need to know it at that point already.
19089	# Even if this section looks crufty: it has the advantage of
19090	# actually working.
19091	break;;
19092    * )
19093	break;;
19094  esac
19095done
19096test "$ac_cv_exeext" = no && ac_cv_exeext=
19097
19098else
19099  ac_file=''
19100fi
19101if test -z "$ac_file"; then :
19102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19103$as_echo "no" >&6; }
19104$as_echo "$as_me: failed program was:" >&5
19105sed 's/^/| /' conftest.$ac_ext >&5
19106
19107{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19109as_fn_error 77 "C compiler cannot create executables
19110See \`config.log' for more details" "$LINENO" 5 ; }
19111else
19112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19113$as_echo "yes" >&6; }
19114fi
19115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19116$as_echo_n "checking for C compiler default output file name... " >&6; }
19117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19118$as_echo "$ac_file" >&6; }
19119ac_exeext=$ac_cv_exeext
19120
19121rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19122ac_clean_files=$ac_clean_files_save
19123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19124$as_echo_n "checking for suffix of executables... " >&6; }
19125if { { ac_try="$ac_link"
19126case "(($ac_try" in
19127  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19128  *) ac_try_echo=$ac_try;;
19129esac
19130eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19131$as_echo "$ac_try_echo"; } >&5
19132  (eval "$ac_link") 2>&5
19133  ac_status=$?
19134  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19135  test $ac_status = 0; }; then :
19136  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19137# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19138# work properly (i.e., refer to `conftest.exe'), while it won't with
19139# `rm'.
19140for ac_file in conftest.exe conftest conftest.*; do
19141  test -f "$ac_file" || continue
19142  case $ac_file in
19143    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19144    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19145	  break;;
19146    * ) break;;
19147  esac
19148done
19149else
19150  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19152as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19153See \`config.log' for more details" "$LINENO" 5 ; }
19154fi
19155rm -f conftest conftest$ac_cv_exeext
19156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19157$as_echo "$ac_cv_exeext" >&6; }
19158
19159rm -f conftest.$ac_ext
19160EXEEXT=$ac_cv_exeext
19161ac_exeext=$EXEEXT
19162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19163/* end confdefs.h.  */
19164#include <stdio.h>
19165int
19166main ()
19167{
19168FILE *f = fopen ("conftest.out", "w");
19169 return ferror (f) || fclose (f) != 0;
19170
19171  ;
19172  return 0;
19173}
19174_ACEOF
19175ac_clean_files="$ac_clean_files conftest.out"
19176# Check that the compiler produces executables we can run.  If not, either
19177# the compiler is broken, or we cross compile.
19178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19179$as_echo_n "checking whether we are cross compiling... " >&6; }
19180if test "$cross_compiling" != yes; then
19181  { { ac_try="$ac_link"
19182case "(($ac_try" in
19183  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19184  *) ac_try_echo=$ac_try;;
19185esac
19186eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19187$as_echo "$ac_try_echo"; } >&5
19188  (eval "$ac_link") 2>&5
19189  ac_status=$?
19190  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19191  test $ac_status = 0; }
19192  if { ac_try='./conftest$ac_cv_exeext'
19193  { { case "(($ac_try" in
19194  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19195  *) ac_try_echo=$ac_try;;
19196esac
19197eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19198$as_echo "$ac_try_echo"; } >&5
19199  (eval "$ac_try") 2>&5
19200  ac_status=$?
19201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19202  test $ac_status = 0; }; }; then
19203    cross_compiling=no
19204  else
19205    if test "$cross_compiling" = maybe; then
19206	cross_compiling=yes
19207    else
19208	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19209$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19210as_fn_error $? "cannot run C compiled programs.
19211If you meant to cross compile, use \`--host'.
19212See \`config.log' for more details" "$LINENO" 5 ; }
19213    fi
19214  fi
19215fi
19216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19217$as_echo "$cross_compiling" >&6; }
19218
19219rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19220ac_clean_files=$ac_clean_files_save
19221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19222$as_echo_n "checking for suffix of object files... " >&6; }
19223if test "${ac_cv_objext+set}" = set; then :
19224  $as_echo_n "(cached) " >&6
19225else
19226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19227/* end confdefs.h.  */
19228
19229int
19230main ()
19231{
19232
19233  ;
19234  return 0;
19235}
19236_ACEOF
19237rm -f conftest.o conftest.obj
19238if { { ac_try="$ac_compile"
19239case "(($ac_try" in
19240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19241  *) ac_try_echo=$ac_try;;
19242esac
19243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19244$as_echo "$ac_try_echo"; } >&5
19245  (eval "$ac_compile") 2>&5
19246  ac_status=$?
19247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19248  test $ac_status = 0; }; then :
19249  for ac_file in conftest.o conftest.obj conftest.*; do
19250  test -f "$ac_file" || continue;
19251  case $ac_file in
19252    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19253    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19254       break;;
19255  esac
19256done
19257else
19258  $as_echo "$as_me: failed program was:" >&5
19259sed 's/^/| /' conftest.$ac_ext >&5
19260
19261{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19263as_fn_error $? "cannot compute suffix of object files: cannot compile
19264See \`config.log' for more details" "$LINENO" 5 ; }
19265fi
19266rm -f conftest.$ac_cv_objext conftest.$ac_ext
19267fi
19268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19269$as_echo "$ac_cv_objext" >&6; }
19270OBJEXT=$ac_cv_objext
19271ac_objext=$OBJEXT
19272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19273$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19274if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19275  $as_echo_n "(cached) " >&6
19276else
19277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19278/* end confdefs.h.  */
19279
19280int
19281main ()
19282{
19283#ifndef __GNUC__
19284       choke me
19285#endif
19286
19287  ;
19288  return 0;
19289}
19290_ACEOF
19291if ac_fn_c_try_compile "$LINENO"; then :
19292  ac_compiler_gnu=yes
19293else
19294  ac_compiler_gnu=no
19295fi
19296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19297ac_cv_c_compiler_gnu=$ac_compiler_gnu
19298
19299fi
19300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19301$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19302if test $ac_compiler_gnu = yes; then
19303  GCC=yes
19304else
19305  GCC=
19306fi
19307ac_test_CFLAGS=${CFLAGS+set}
19308ac_save_CFLAGS=$CFLAGS
19309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19310$as_echo_n "checking whether $CC accepts -g... " >&6; }
19311if test "${ac_cv_prog_cc_g+set}" = set; then :
19312  $as_echo_n "(cached) " >&6
19313else
19314  ac_save_c_werror_flag=$ac_c_werror_flag
19315   ac_c_werror_flag=yes
19316   ac_cv_prog_cc_g=no
19317   CFLAGS="-g"
19318   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19319/* end confdefs.h.  */
19320
19321int
19322main ()
19323{
19324
19325  ;
19326  return 0;
19327}
19328_ACEOF
19329if ac_fn_c_try_compile "$LINENO"; then :
19330  ac_cv_prog_cc_g=yes
19331else
19332  CFLAGS=""
19333      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19334/* end confdefs.h.  */
19335
19336int
19337main ()
19338{
19339
19340  ;
19341  return 0;
19342}
19343_ACEOF
19344if ac_fn_c_try_compile "$LINENO"; then :
19345
19346else
19347  ac_c_werror_flag=$ac_save_c_werror_flag
19348	 CFLAGS="-g"
19349	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19350/* end confdefs.h.  */
19351
19352int
19353main ()
19354{
19355
19356  ;
19357  return 0;
19358}
19359_ACEOF
19360if ac_fn_c_try_compile "$LINENO"; then :
19361  ac_cv_prog_cc_g=yes
19362fi
19363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19364fi
19365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19366fi
19367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19368   ac_c_werror_flag=$ac_save_c_werror_flag
19369fi
19370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19371$as_echo "$ac_cv_prog_cc_g" >&6; }
19372if test "$ac_test_CFLAGS" = set; then
19373  CFLAGS=$ac_save_CFLAGS
19374elif test $ac_cv_prog_cc_g = yes; then
19375  if test "$GCC" = yes; then
19376    CFLAGS="-g -O2"
19377  else
19378    CFLAGS="-g"
19379  fi
19380else
19381  if test "$GCC" = yes; then
19382    CFLAGS="-O2"
19383  else
19384    CFLAGS=
19385  fi
19386fi
19387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19388$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19389if test "${ac_cv_prog_cc_c89+set}" = set; then :
19390  $as_echo_n "(cached) " >&6
19391else
19392  ac_cv_prog_cc_c89=no
19393ac_save_CC=$CC
19394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395/* end confdefs.h.  */
19396#include <stdarg.h>
19397#include <stdio.h>
19398#include <sys/types.h>
19399#include <sys/stat.h>
19400/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19401struct buf { int x; };
19402FILE * (*rcsopen) (struct buf *, struct stat *, int);
19403static char *e (p, i)
19404     char **p;
19405     int i;
19406{
19407  return p[i];
19408}
19409static char *f (char * (*g) (char **, int), char **p, ...)
19410{
19411  char *s;
19412  va_list v;
19413  va_start (v,p);
19414  s = g (p, va_arg (v,int));
19415  va_end (v);
19416  return s;
19417}
19418
19419/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19420   function prototypes and stuff, but not '\xHH' hex character constants.
19421   These don't provoke an error unfortunately, instead are silently treated
19422   as 'x'.  The following induces an error, until -std is added to get
19423   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19424   array size at least.  It's necessary to write '\x00'==0 to get something
19425   that's true only with -std.  */
19426int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19427
19428/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19429   inside strings and character constants.  */
19430#define FOO(x) 'x'
19431int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19432
19433int test (int i, double x);
19434struct s1 {int (*f) (int a);};
19435struct s2 {int (*f) (double a);};
19436int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19437int argc;
19438char **argv;
19439int
19440main ()
19441{
19442return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19443  ;
19444  return 0;
19445}
19446_ACEOF
19447for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19448	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19449do
19450  CC="$ac_save_CC $ac_arg"
19451  if ac_fn_c_try_compile "$LINENO"; then :
19452  ac_cv_prog_cc_c89=$ac_arg
19453fi
19454rm -f core conftest.err conftest.$ac_objext
19455  test "x$ac_cv_prog_cc_c89" != "xno" && break
19456done
19457rm -f conftest.$ac_ext
19458CC=$ac_save_CC
19459
19460fi
19461# AC_CACHE_VAL
19462case "x$ac_cv_prog_cc_c89" in
19463  x)
19464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19465$as_echo "none needed" >&6; } ;;
19466  xno)
19467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19468$as_echo "unsupported" >&6; } ;;
19469  *)
19470    CC="$CC $ac_cv_prog_cc_c89"
19471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19472$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19473esac
19474if test "x$ac_cv_prog_cc_c89" != xno; then :
19475
19476fi
19477
19478ac_ext=cpp
19479ac_cpp='$CXXCPP $CPPFLAGS'
19480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19483
19484
19485### Locate C++ compiler (CXX)
19486
19487if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19488  # Do not probe for CC on MacOSX.
19489  COMPILER_CHECK_LIST="cl g++"
19490else
19491  COMPILER_CHECK_LIST="cl CC g++"
19492fi
19493
19494  COMPILER_NAME=C++
19495
19496  CXX=
19497  # If TOOLS_DIR is set, check for all compiler names in there first
19498  # before checking the rest of the PATH.
19499  if test -n "$TOOLS_DIR"; then
19500    PATH_save="$PATH"
19501    PATH="$TOOLS_DIR"
19502    for ac_prog in $COMPILER_CHECK_LIST
19503do
19504  # Extract the first word of "$ac_prog", so it can be a program name with args.
19505set dummy $ac_prog; ac_word=$2
19506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19507$as_echo_n "checking for $ac_word... " >&6; }
19508if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19509  $as_echo_n "(cached) " >&6
19510else
19511  case $TOOLS_DIR_CXX in
19512  [\\/]* | ?:[\\/]*)
19513  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19514  ;;
19515  *)
19516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19517for as_dir in $PATH
19518do
19519  IFS=$as_save_IFS
19520  test -z "$as_dir" && as_dir=.
19521    for ac_exec_ext in '' $ac_executable_extensions; do
19522  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19523    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19525    break 2
19526  fi
19527done
19528  done
19529IFS=$as_save_IFS
19530
19531  ;;
19532esac
19533fi
19534TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19535if test -n "$TOOLS_DIR_CXX"; then
19536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19537$as_echo "$TOOLS_DIR_CXX" >&6; }
19538else
19539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19540$as_echo "no" >&6; }
19541fi
19542
19543
19544  test -n "$TOOLS_DIR_CXX" && break
19545done
19546
19547    CXX=$TOOLS_DIR_CXX
19548    PATH="$PATH_save"
19549  fi
19550
19551  # AC_PATH_PROGS can't be run multiple times with the same variable,
19552  # so create a new name for this run.
19553  if test "x$CXX" = x; then
19554    for ac_prog in $COMPILER_CHECK_LIST
19555do
19556  # Extract the first word of "$ac_prog", so it can be a program name with args.
19557set dummy $ac_prog; ac_word=$2
19558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19559$as_echo_n "checking for $ac_word... " >&6; }
19560if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19561  $as_echo_n "(cached) " >&6
19562else
19563  case $POTENTIAL_CXX in
19564  [\\/]* | ?:[\\/]*)
19565  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19566  ;;
19567  *)
19568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19569for as_dir in $PATH
19570do
19571  IFS=$as_save_IFS
19572  test -z "$as_dir" && as_dir=.
19573    for ac_exec_ext in '' $ac_executable_extensions; do
19574  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19575    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19577    break 2
19578  fi
19579done
19580  done
19581IFS=$as_save_IFS
19582
19583  ;;
19584esac
19585fi
19586POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19587if test -n "$POTENTIAL_CXX"; then
19588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19589$as_echo "$POTENTIAL_CXX" >&6; }
19590else
19591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19592$as_echo "no" >&6; }
19593fi
19594
19595
19596  test -n "$POTENTIAL_CXX" && break
19597done
19598
19599    CXX=$POTENTIAL_CXX
19600  fi
19601
19602  if test "x$CXX" = x; then
19603
19604    # Print a helpful message on how to acquire the necessary build dependency.
19605    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19606    MISSING_DEPENDENCY=devkit
19607    PKGHANDLER_COMMAND=
19608
19609    case $PKGHANDLER in
19610	apt-get)
19611                apt_help     $MISSING_DEPENDENCY ;;
19612    yum)
19613                yum_help     $MISSING_DEPENDENCY ;;
19614	port)
19615                port_help    $MISSING_DEPENDENCY ;;
19616	pkgutil)
19617                pkgutil_help $MISSING_DEPENDENCY ;;
19618	pkgadd)
19619                pkgadd_help  $MISSING_DEPENDENCY ;;
19620    * )
19621      break ;;
19622    esac
19623
19624    if test "x$PKGHANDLER_COMMAND" != x; then
19625        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19626    fi
19627
19628      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19629  fi
19630
19631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19632
19633  # First separate the path from the arguments. This will split at the first
19634  # space.
19635  complete="$CXX"
19636  path="${complete%% *}"
19637  tmp="$complete EOL"
19638  arguments="${tmp#* }"
19639
19640  # Input might be given as Windows format, start by converting to
19641  # unix format.
19642  new_path=`$CYGPATH -u "$path"`
19643
19644  # Now try to locate executable using which
19645  new_path=`$WHICH "$new_path" 2> /dev/null`
19646  # bat and cmd files are not always considered executable in cygwin causing which
19647  # to not find them
19648  if test "x$new_path" = x \
19649           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19650           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19651    new_path=`$CYGPATH -u "$path"`
19652  fi
19653  if test "x$new_path" = x; then
19654    # Oops. Which didn't find the executable.
19655    # The splitting of arguments from the executable at a space might have been incorrect,
19656    # since paths with space are more likely in Windows. Give it another try with the whole
19657    # argument.
19658    path="$complete"
19659    arguments="EOL"
19660    new_path=`$CYGPATH -u "$path"`
19661    new_path=`$WHICH "$new_path" 2> /dev/null`
19662    # bat and cmd files are not always considered executable in cygwin causing which
19663    # to not find them
19664    if test "x$new_path" = x \
19665             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19666             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19667      new_path=`$CYGPATH -u "$path"`
19668    fi
19669    if test "x$new_path" = x; then
19670      # It's still not found. Now this is an unrecoverable error.
19671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19672$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19673      has_space=`$ECHO "$complete" | $GREP " "`
19674      if test "x$has_space" != x; then
19675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19677      fi
19678      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19679    fi
19680  fi
19681
19682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19685  # "foo.exe" is OK but "foo" is an error.
19686  #
19687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19688  # It is also a way to make sure we got the proper file name for the real test later on.
19689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19690  if test "x$test_shortpath" = x; then
19691    # Short path failed, file does not exist as specified.
19692    # Try adding .exe or .cmd
19693    if test -f "${new_path}.exe"; then
19694       input_to_shortpath="${new_path}.exe"
19695    elif test -f "${new_path}.cmd"; then
19696       input_to_shortpath="${new_path}.cmd"
19697    else
19698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19699$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19702      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19703    fi
19704  else
19705    input_to_shortpath="$new_path"
19706  fi
19707
19708  # Call helper function which possibly converts this using DOS-style short mode.
19709  # If so, the updated path is stored in $new_path.
19710  new_path="$input_to_shortpath"
19711
19712  input_path="$input_to_shortpath"
19713  # Check if we need to convert this using DOS-style short mode. If the path
19714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19715  # take no chances and rewrite it.
19716  # Note: m4 eats our [], so we need to use [ and ] instead.
19717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19718  if test "x$has_forbidden_chars" != x; then
19719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19723      # Going to short mode and back again did indeed matter. Since short mode is
19724      # case insensitive, let's make it lowercase to improve readability.
19725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19726      # Now convert it back to Unix-stile (cygpath)
19727      input_path=`$CYGPATH -u "$shortmode_path"`
19728      new_path="$input_path"
19729    fi
19730  fi
19731
19732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19733  if test "x$test_cygdrive_prefix" = x; then
19734    # As a simple fix, exclude /usr/bin since it's not a real path.
19735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19737      # a path prefixed by /cygdrive for fixpath to work.
19738      new_path="$CYGWIN_ROOT_PATH$input_path"
19739    fi
19740  fi
19741
19742  # remove trailing .exe if any
19743  new_path="${new_path/%.exe/}"
19744
19745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19746
19747  # First separate the path from the arguments. This will split at the first
19748  # space.
19749  complete="$CXX"
19750  path="${complete%% *}"
19751  tmp="$complete EOL"
19752  arguments="${tmp#* }"
19753
19754  # Input might be given as Windows format, start by converting to
19755  # unix format.
19756  new_path="$path"
19757
19758  windows_path="$new_path"
19759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19760    unix_path=`$CYGPATH -u "$windows_path"`
19761    new_path="$unix_path"
19762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19764    new_path="$unix_path"
19765  fi
19766
19767
19768  # Now try to locate executable using which
19769  new_path=`$WHICH "$new_path" 2> /dev/null`
19770
19771  if test "x$new_path" = x; then
19772    # Oops. Which didn't find the executable.
19773    # The splitting of arguments from the executable at a space might have been incorrect,
19774    # since paths with space are more likely in Windows. Give it another try with the whole
19775    # argument.
19776    path="$complete"
19777    arguments="EOL"
19778    new_path="$path"
19779
19780  windows_path="$new_path"
19781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19782    unix_path=`$CYGPATH -u "$windows_path"`
19783    new_path="$unix_path"
19784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19786    new_path="$unix_path"
19787  fi
19788
19789
19790    new_path=`$WHICH "$new_path" 2> /dev/null`
19791
19792    if test "x$new_path" = x; then
19793      # It's still not found. Now this is an unrecoverable error.
19794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19795$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19796      has_space=`$ECHO "$complete" | $GREP " "`
19797      if test "x$has_space" != x; then
19798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19800      fi
19801      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19802    fi
19803  fi
19804
19805  # Now new_path has a complete unix path to the binary
19806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19807    # Keep paths in /bin as-is, but remove trailing .exe if any
19808    new_path="${new_path/%.exe/}"
19809    # Do not save /bin paths to all_fixpath_prefixes!
19810  else
19811    # Not in mixed or Windows style, start by that.
19812    new_path=`cmd //c echo $new_path`
19813
19814  input_path="$new_path"
19815  # Check if we need to convert this using DOS-style short mode. If the path
19816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19817  # take no chances and rewrite it.
19818  # Note: m4 eats our [], so we need to use [ and ] instead.
19819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19820  if test "x$has_forbidden_chars" != x; then
19821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19823  fi
19824
19825    # Output is in $new_path
19826
19827  windows_path="$new_path"
19828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19829    unix_path=`$CYGPATH -u "$windows_path"`
19830    new_path="$unix_path"
19831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19833    new_path="$unix_path"
19834  fi
19835
19836    # remove trailing .exe if any
19837    new_path="${new_path/%.exe/}"
19838
19839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19841  fi
19842
19843  else
19844    # We're on a posix platform. Hooray! :)
19845    # First separate the path from the arguments. This will split at the first
19846    # space.
19847    complete="$CXX"
19848    path="${complete%% *}"
19849    tmp="$complete EOL"
19850    arguments="${tmp#* }"
19851
19852    # Cannot rely on the command "which" here since it doesn't always work.
19853    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19854    if test -z "$is_absolute_path"; then
19855      # Path to executable is not absolute. Find it.
19856      IFS_save="$IFS"
19857      IFS=:
19858      for p in $PATH; do
19859        if test -f "$p/$path" && test -x "$p/$path"; then
19860          new_path="$p/$path"
19861          break
19862        fi
19863      done
19864      IFS="$IFS_save"
19865    else
19866      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
19867$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
19868      new_path="$path"
19869    fi
19870
19871    if test "x$new_path" = x; then
19872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19873$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19874        has_space=`$ECHO "$complete" | $GREP " "`
19875        if test "x$has_space" != x; then
19876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19878        fi
19879        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19880      fi
19881  fi
19882
19883      # Now join together the path and the arguments once again
19884      if test "x$arguments" != xEOL; then
19885        new_complete="$new_path ${arguments% *}"
19886      else
19887        new_complete="$new_path"
19888      fi
19889
19890  if test "x$complete" != "x$new_complete"; then
19891      CXX="$new_complete"
19892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19893$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19894    fi
19895
19896  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19897$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19898  TEST_COMPILER="$CXX"
19899
19900    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19901        # Follow a chain of symbolic links. Use readlink
19902        # where it exists, else fall back to horribly
19903        # complicated shell code.
19904        if test "x$READLINK_TESTED" != yes; then
19905            # On MacOSX there is a readlink tool with a different
19906            # purpose than the GNU readlink tool. Check the found readlink.
19907            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19908            if test "x$ISGNU" = x; then
19909                 # A readlink that we do not know how to use.
19910                 # Are there other non-GNU readlinks out there?
19911                 READLINK_TESTED=yes
19912                 READLINK=
19913            fi
19914        fi
19915
19916        if test "x$READLINK" != x; then
19917            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19918        else
19919            # Save the current directory for restoring afterwards
19920            STARTDIR=$PWD
19921            COUNTER=0
19922            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19923            sym_link_file=`$BASENAME $TEST_COMPILER`
19924            # Use the system pwd and not the shell builtin to resolve directory symlinks
19925            cd $sym_link_dir
19926            cd `$THEPWDCMD`
19927            sym_link_dir=`$THEPWDCMD`
19928            # Resolve file symlinks
19929            while test $COUNTER -lt 20; do
19930                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19931                if test "x$ISLINK" == x; then
19932                    # This is not a symbolic link! We are done!
19933                    break
19934                fi
19935                # Again resolve directory symlinks since the target of the just found
19936                # link could be in a different directory
19937                cd `$DIRNAME $ISLINK`
19938                sym_link_dir=`$THEPWDCMD`
19939                sym_link_file=`$BASENAME $ISLINK`
19940                let COUNTER=COUNTER+1
19941            done
19942            cd $STARTDIR
19943            TEST_COMPILER=$sym_link_dir/$sym_link_file
19944        fi
19945    fi
19946
19947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19948$as_echo "$TEST_COMPILER" >&6; }
19949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19950$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19951
19952  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19953  if test "x$COMPILER_BASENAME" = "xccache"; then
19954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19955$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19956    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19957    # We want to control ccache invocation ourselves, so ignore this cc and try
19958    # searching again.
19959
19960    # Remove the path to the fake ccache cc from the PATH
19961    RETRY_COMPILER_SAVED_PATH="$PATH"
19962    COMPILER_DIRNAME=`$DIRNAME $CXX`
19963    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19964
19965    # Try again looking for our compiler
19966    if test -n "$ac_tool_prefix"; then
19967  for ac_prog in $COMPILER_CHECK_LIST
19968  do
19969    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19970set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19972$as_echo_n "checking for $ac_word... " >&6; }
19973if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19974  $as_echo_n "(cached) " >&6
19975else
19976  if test -n "$PROPER_COMPILER_CXX"; then
19977  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19978else
19979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19980for as_dir in $PATH
19981do
19982  IFS=$as_save_IFS
19983  test -z "$as_dir" && as_dir=.
19984    for ac_exec_ext in '' $ac_executable_extensions; do
19985  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19986    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19988    break 2
19989  fi
19990done
19991  done
19992IFS=$as_save_IFS
19993
19994fi
19995fi
19996PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19997if test -n "$PROPER_COMPILER_CXX"; then
19998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19999$as_echo "$PROPER_COMPILER_CXX" >&6; }
20000else
20001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20002$as_echo "no" >&6; }
20003fi
20004
20005
20006    test -n "$PROPER_COMPILER_CXX" && break
20007  done
20008fi
20009if test -z "$PROPER_COMPILER_CXX"; then
20010  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20011  for ac_prog in $COMPILER_CHECK_LIST
20012do
20013  # Extract the first word of "$ac_prog", so it can be a program name with args.
20014set dummy $ac_prog; ac_word=$2
20015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20016$as_echo_n "checking for $ac_word... " >&6; }
20017if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20018  $as_echo_n "(cached) " >&6
20019else
20020  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20021  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20022else
20023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20024for as_dir in $PATH
20025do
20026  IFS=$as_save_IFS
20027  test -z "$as_dir" && as_dir=.
20028    for ac_exec_ext in '' $ac_executable_extensions; do
20029  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20030    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20032    break 2
20033  fi
20034done
20035  done
20036IFS=$as_save_IFS
20037
20038fi
20039fi
20040ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20041if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20043$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20044else
20045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20046$as_echo "no" >&6; }
20047fi
20048
20049
20050  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20051done
20052
20053  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20054    PROPER_COMPILER_CXX=""
20055  else
20056    case $cross_compiling:$ac_tool_warned in
20057yes:)
20058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20060ac_tool_warned=yes ;;
20061esac
20062    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20063  fi
20064fi
20065
20066
20067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20068
20069  # First separate the path from the arguments. This will split at the first
20070  # space.
20071  complete="$PROPER_COMPILER_CXX"
20072  path="${complete%% *}"
20073  tmp="$complete EOL"
20074  arguments="${tmp#* }"
20075
20076  # Input might be given as Windows format, start by converting to
20077  # unix format.
20078  new_path=`$CYGPATH -u "$path"`
20079
20080  # Now try to locate executable using which
20081  new_path=`$WHICH "$new_path" 2> /dev/null`
20082  # bat and cmd files are not always considered executable in cygwin causing which
20083  # to not find them
20084  if test "x$new_path" = x \
20085           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20086           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20087    new_path=`$CYGPATH -u "$path"`
20088  fi
20089  if test "x$new_path" = x; then
20090    # Oops. Which didn't find the executable.
20091    # The splitting of arguments from the executable at a space might have been incorrect,
20092    # since paths with space are more likely in Windows. Give it another try with the whole
20093    # argument.
20094    path="$complete"
20095    arguments="EOL"
20096    new_path=`$CYGPATH -u "$path"`
20097    new_path=`$WHICH "$new_path" 2> /dev/null`
20098    # bat and cmd files are not always considered executable in cygwin causing which
20099    # to not find them
20100    if test "x$new_path" = x \
20101             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20102             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20103      new_path=`$CYGPATH -u "$path"`
20104    fi
20105    if test "x$new_path" = x; then
20106      # It's still not found. Now this is an unrecoverable error.
20107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20108$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20109      has_space=`$ECHO "$complete" | $GREP " "`
20110      if test "x$has_space" != x; then
20111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20113      fi
20114      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20115    fi
20116  fi
20117
20118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20121  # "foo.exe" is OK but "foo" is an error.
20122  #
20123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20124  # It is also a way to make sure we got the proper file name for the real test later on.
20125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20126  if test "x$test_shortpath" = x; then
20127    # Short path failed, file does not exist as specified.
20128    # Try adding .exe or .cmd
20129    if test -f "${new_path}.exe"; then
20130       input_to_shortpath="${new_path}.exe"
20131    elif test -f "${new_path}.cmd"; then
20132       input_to_shortpath="${new_path}.cmd"
20133    else
20134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20135$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20138      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20139    fi
20140  else
20141    input_to_shortpath="$new_path"
20142  fi
20143
20144  # Call helper function which possibly converts this using DOS-style short mode.
20145  # If so, the updated path is stored in $new_path.
20146  new_path="$input_to_shortpath"
20147
20148  input_path="$input_to_shortpath"
20149  # Check if we need to convert this using DOS-style short mode. If the path
20150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20151  # take no chances and rewrite it.
20152  # Note: m4 eats our [], so we need to use [ and ] instead.
20153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20154  if test "x$has_forbidden_chars" != x; then
20155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20159      # Going to short mode and back again did indeed matter. Since short mode is
20160      # case insensitive, let's make it lowercase to improve readability.
20161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20162      # Now convert it back to Unix-stile (cygpath)
20163      input_path=`$CYGPATH -u "$shortmode_path"`
20164      new_path="$input_path"
20165    fi
20166  fi
20167
20168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20169  if test "x$test_cygdrive_prefix" = x; then
20170    # As a simple fix, exclude /usr/bin since it's not a real path.
20171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20173      # a path prefixed by /cygdrive for fixpath to work.
20174      new_path="$CYGWIN_ROOT_PATH$input_path"
20175    fi
20176  fi
20177
20178  # remove trailing .exe if any
20179  new_path="${new_path/%.exe/}"
20180
20181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20182
20183  # First separate the path from the arguments. This will split at the first
20184  # space.
20185  complete="$PROPER_COMPILER_CXX"
20186  path="${complete%% *}"
20187  tmp="$complete EOL"
20188  arguments="${tmp#* }"
20189
20190  # Input might be given as Windows format, start by converting to
20191  # unix format.
20192  new_path="$path"
20193
20194  windows_path="$new_path"
20195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20196    unix_path=`$CYGPATH -u "$windows_path"`
20197    new_path="$unix_path"
20198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20200    new_path="$unix_path"
20201  fi
20202
20203
20204  # Now try to locate executable using which
20205  new_path=`$WHICH "$new_path" 2> /dev/null`
20206
20207  if test "x$new_path" = x; then
20208    # Oops. Which didn't find the executable.
20209    # The splitting of arguments from the executable at a space might have been incorrect,
20210    # since paths with space are more likely in Windows. Give it another try with the whole
20211    # argument.
20212    path="$complete"
20213    arguments="EOL"
20214    new_path="$path"
20215
20216  windows_path="$new_path"
20217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20218    unix_path=`$CYGPATH -u "$windows_path"`
20219    new_path="$unix_path"
20220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20222    new_path="$unix_path"
20223  fi
20224
20225
20226    new_path=`$WHICH "$new_path" 2> /dev/null`
20227
20228    if test "x$new_path" = x; then
20229      # It's still not found. Now this is an unrecoverable error.
20230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20231$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20232      has_space=`$ECHO "$complete" | $GREP " "`
20233      if test "x$has_space" != x; then
20234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20236      fi
20237      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20238    fi
20239  fi
20240
20241  # Now new_path has a complete unix path to the binary
20242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20243    # Keep paths in /bin as-is, but remove trailing .exe if any
20244    new_path="${new_path/%.exe/}"
20245    # Do not save /bin paths to all_fixpath_prefixes!
20246  else
20247    # Not in mixed or Windows style, start by that.
20248    new_path=`cmd //c echo $new_path`
20249
20250  input_path="$new_path"
20251  # Check if we need to convert this using DOS-style short mode. If the path
20252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20253  # take no chances and rewrite it.
20254  # Note: m4 eats our [], so we need to use [ and ] instead.
20255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20256  if test "x$has_forbidden_chars" != x; then
20257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20259  fi
20260
20261    # Output is in $new_path
20262
20263  windows_path="$new_path"
20264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20265    unix_path=`$CYGPATH -u "$windows_path"`
20266    new_path="$unix_path"
20267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20269    new_path="$unix_path"
20270  fi
20271
20272    # remove trailing .exe if any
20273    new_path="${new_path/%.exe/}"
20274
20275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20277  fi
20278
20279  else
20280    # We're on a posix platform. Hooray! :)
20281    # First separate the path from the arguments. This will split at the first
20282    # space.
20283    complete="$PROPER_COMPILER_CXX"
20284    path="${complete%% *}"
20285    tmp="$complete EOL"
20286    arguments="${tmp#* }"
20287
20288    # Cannot rely on the command "which" here since it doesn't always work.
20289    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20290    if test -z "$is_absolute_path"; then
20291      # Path to executable is not absolute. Find it.
20292      IFS_save="$IFS"
20293      IFS=:
20294      for p in $PATH; do
20295        if test -f "$p/$path" && test -x "$p/$path"; then
20296          new_path="$p/$path"
20297          break
20298        fi
20299      done
20300      IFS="$IFS_save"
20301    else
20302      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20303$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20304      new_path="$path"
20305    fi
20306
20307    if test "x$new_path" = x; then
20308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20309$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20310        has_space=`$ECHO "$complete" | $GREP " "`
20311        if test "x$has_space" != x; then
20312          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20314        fi
20315        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20316      fi
20317  fi
20318
20319      # Now join together the path and the arguments once again
20320      if test "x$arguments" != xEOL; then
20321        new_complete="$new_path ${arguments% *}"
20322      else
20323        new_complete="$new_path"
20324      fi
20325
20326  if test "x$complete" != "x$new_complete"; then
20327      PROPER_COMPILER_CXX="$new_complete"
20328      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20329$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20330    fi
20331
20332    PATH="$RETRY_COMPILER_SAVED_PATH"
20333
20334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20335$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20336
20337    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20338        # Follow a chain of symbolic links. Use readlink
20339        # where it exists, else fall back to horribly
20340        # complicated shell code.
20341        if test "x$READLINK_TESTED" != yes; then
20342            # On MacOSX there is a readlink tool with a different
20343            # purpose than the GNU readlink tool. Check the found readlink.
20344            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20345            if test "x$ISGNU" = x; then
20346                 # A readlink that we do not know how to use.
20347                 # Are there other non-GNU readlinks out there?
20348                 READLINK_TESTED=yes
20349                 READLINK=
20350            fi
20351        fi
20352
20353        if test "x$READLINK" != x; then
20354            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20355        else
20356            # Save the current directory for restoring afterwards
20357            STARTDIR=$PWD
20358            COUNTER=0
20359            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20360            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20361            # Use the system pwd and not the shell builtin to resolve directory symlinks
20362            cd $sym_link_dir
20363            cd `$THEPWDCMD`
20364            sym_link_dir=`$THEPWDCMD`
20365            # Resolve file symlinks
20366            while test $COUNTER -lt 20; do
20367                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20368                if test "x$ISLINK" == x; then
20369                    # This is not a symbolic link! We are done!
20370                    break
20371                fi
20372                # Again resolve directory symlinks since the target of the just found
20373                # link could be in a different directory
20374                cd `$DIRNAME $ISLINK`
20375                sym_link_dir=`$THEPWDCMD`
20376                sym_link_file=`$BASENAME $ISLINK`
20377                let COUNTER=COUNTER+1
20378            done
20379            cd $STARTDIR
20380            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20381        fi
20382    fi
20383
20384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20385$as_echo "$PROPER_COMPILER_CXX" >&6; }
20386    CXX="$PROPER_COMPILER_CXX"
20387  else
20388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20389$as_echo "no, keeping CXX" >&6; }
20390    CXX="$TEST_COMPILER"
20391  fi
20392
20393  COMPILER=$CXX
20394  COMPILER_NAME=$COMPILER_NAME
20395
20396  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20397    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20398    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20399    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20400    if test $? -ne 0; then
20401      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20402
20403      { $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
20404$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20405      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20406$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20407      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20408    else
20409      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20410      COMPILER_VENDOR="Sun Studio"
20411    fi
20412  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20413    # First line typically looks something like:
20414    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20415    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20416    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20417    COMPILER_VENDOR="Microsoft CL.EXE"
20418    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20419    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20420      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20421        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20422      fi
20423    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20424      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20425        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20426      fi
20427    fi
20428  else
20429    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20430    # Check that this is likely to be GCC.
20431    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20432    if test $? -ne 0; then
20433      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20434$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20435      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20436$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20437      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20438    fi
20439
20440    # First line typically looks something like:
20441    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20442    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20443    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20444  fi
20445  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20446  CXX_VERSION="$COMPILER_VERSION"
20447  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20448  CXX_VENDOR="$COMPILER_VENDOR"
20449
20450  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20451$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20452
20453
20454# Now that we have resolved CXX ourself, let autoconf have it's go at it
20455ac_ext=cpp
20456ac_cpp='$CXXCPP $CPPFLAGS'
20457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20460if test -z "$CXX"; then
20461  if test -n "$CCC"; then
20462    CXX=$CCC
20463  else
20464    if test -n "$ac_tool_prefix"; then
20465  for ac_prog in $CXX
20466  do
20467    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20468set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20470$as_echo_n "checking for $ac_word... " >&6; }
20471if test "${ac_cv_prog_CXX+set}" = set; then :
20472  $as_echo_n "(cached) " >&6
20473else
20474  if test -n "$CXX"; then
20475  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20476else
20477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20478for as_dir in $PATH
20479do
20480  IFS=$as_save_IFS
20481  test -z "$as_dir" && as_dir=.
20482    for ac_exec_ext in '' $ac_executable_extensions; do
20483  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20484    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20486    break 2
20487  fi
20488done
20489  done
20490IFS=$as_save_IFS
20491
20492fi
20493fi
20494CXX=$ac_cv_prog_CXX
20495if test -n "$CXX"; then
20496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20497$as_echo "$CXX" >&6; }
20498else
20499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20500$as_echo "no" >&6; }
20501fi
20502
20503
20504    test -n "$CXX" && break
20505  done
20506fi
20507if test -z "$CXX"; then
20508  ac_ct_CXX=$CXX
20509  for ac_prog in $CXX
20510do
20511  # Extract the first word of "$ac_prog", so it can be a program name with args.
20512set dummy $ac_prog; ac_word=$2
20513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20514$as_echo_n "checking for $ac_word... " >&6; }
20515if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20516  $as_echo_n "(cached) " >&6
20517else
20518  if test -n "$ac_ct_CXX"; then
20519  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20520else
20521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20522for as_dir in $PATH
20523do
20524  IFS=$as_save_IFS
20525  test -z "$as_dir" && as_dir=.
20526    for ac_exec_ext in '' $ac_executable_extensions; do
20527  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20528    ac_cv_prog_ac_ct_CXX="$ac_prog"
20529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20530    break 2
20531  fi
20532done
20533  done
20534IFS=$as_save_IFS
20535
20536fi
20537fi
20538ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20539if test -n "$ac_ct_CXX"; then
20540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20541$as_echo "$ac_ct_CXX" >&6; }
20542else
20543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20544$as_echo "no" >&6; }
20545fi
20546
20547
20548  test -n "$ac_ct_CXX" && break
20549done
20550
20551  if test "x$ac_ct_CXX" = x; then
20552    CXX="g++"
20553  else
20554    case $cross_compiling:$ac_tool_warned in
20555yes:)
20556{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20557$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20558ac_tool_warned=yes ;;
20559esac
20560    CXX=$ac_ct_CXX
20561  fi
20562fi
20563
20564  fi
20565fi
20566# Provide some information about the compiler.
20567$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20568set X $ac_compile
20569ac_compiler=$2
20570for ac_option in --version -v -V -qversion; do
20571  { { ac_try="$ac_compiler $ac_option >&5"
20572case "(($ac_try" in
20573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20574  *) ac_try_echo=$ac_try;;
20575esac
20576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20577$as_echo "$ac_try_echo"; } >&5
20578  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20579  ac_status=$?
20580  if test -s conftest.err; then
20581    sed '10a\
20582... rest of stderr output deleted ...
20583         10q' conftest.err >conftest.er1
20584    cat conftest.er1 >&5
20585  fi
20586  rm -f conftest.er1 conftest.err
20587  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20588  test $ac_status = 0; }
20589done
20590
20591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20592$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20593if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20594  $as_echo_n "(cached) " >&6
20595else
20596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20597/* end confdefs.h.  */
20598
20599int
20600main ()
20601{
20602#ifndef __GNUC__
20603       choke me
20604#endif
20605
20606  ;
20607  return 0;
20608}
20609_ACEOF
20610if ac_fn_cxx_try_compile "$LINENO"; then :
20611  ac_compiler_gnu=yes
20612else
20613  ac_compiler_gnu=no
20614fi
20615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20616ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20617
20618fi
20619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20620$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20621if test $ac_compiler_gnu = yes; then
20622  GXX=yes
20623else
20624  GXX=
20625fi
20626ac_test_CXXFLAGS=${CXXFLAGS+set}
20627ac_save_CXXFLAGS=$CXXFLAGS
20628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20629$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20630if test "${ac_cv_prog_cxx_g+set}" = set; then :
20631  $as_echo_n "(cached) " >&6
20632else
20633  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20634   ac_cxx_werror_flag=yes
20635   ac_cv_prog_cxx_g=no
20636   CXXFLAGS="-g"
20637   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20638/* end confdefs.h.  */
20639
20640int
20641main ()
20642{
20643
20644  ;
20645  return 0;
20646}
20647_ACEOF
20648if ac_fn_cxx_try_compile "$LINENO"; then :
20649  ac_cv_prog_cxx_g=yes
20650else
20651  CXXFLAGS=""
20652      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20653/* end confdefs.h.  */
20654
20655int
20656main ()
20657{
20658
20659  ;
20660  return 0;
20661}
20662_ACEOF
20663if ac_fn_cxx_try_compile "$LINENO"; then :
20664
20665else
20666  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20667	 CXXFLAGS="-g"
20668	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20669/* end confdefs.h.  */
20670
20671int
20672main ()
20673{
20674
20675  ;
20676  return 0;
20677}
20678_ACEOF
20679if ac_fn_cxx_try_compile "$LINENO"; then :
20680  ac_cv_prog_cxx_g=yes
20681fi
20682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20683fi
20684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20685fi
20686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20687   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20688fi
20689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20690$as_echo "$ac_cv_prog_cxx_g" >&6; }
20691if test "$ac_test_CXXFLAGS" = set; then
20692  CXXFLAGS=$ac_save_CXXFLAGS
20693elif test $ac_cv_prog_cxx_g = yes; then
20694  if test "$GXX" = yes; then
20695    CXXFLAGS="-g -O2"
20696  else
20697    CXXFLAGS="-g"
20698  fi
20699else
20700  if test "$GXX" = yes; then
20701    CXXFLAGS="-O2"
20702  else
20703    CXXFLAGS=
20704  fi
20705fi
20706ac_ext=cpp
20707ac_cpp='$CXXCPP $CPPFLAGS'
20708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20711
20712
20713### Locate other tools
20714
20715if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20716    ac_ext=m
20717ac_cpp='$OBJCPP $CPPFLAGS'
20718ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20719ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20720ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20721if test -n "$ac_tool_prefix"; then
20722  for ac_prog in gcc objcc objc cc CC
20723  do
20724    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20725set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20727$as_echo_n "checking for $ac_word... " >&6; }
20728if test "${ac_cv_prog_OBJC+set}" = set; then :
20729  $as_echo_n "(cached) " >&6
20730else
20731  if test -n "$OBJC"; then
20732  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20733else
20734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20735for as_dir in $PATH
20736do
20737  IFS=$as_save_IFS
20738  test -z "$as_dir" && as_dir=.
20739    for ac_exec_ext in '' $ac_executable_extensions; do
20740  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20741    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20743    break 2
20744  fi
20745done
20746  done
20747IFS=$as_save_IFS
20748
20749fi
20750fi
20751OBJC=$ac_cv_prog_OBJC
20752if test -n "$OBJC"; then
20753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20754$as_echo "$OBJC" >&6; }
20755else
20756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20757$as_echo "no" >&6; }
20758fi
20759
20760
20761    test -n "$OBJC" && break
20762  done
20763fi
20764if test -z "$OBJC"; then
20765  ac_ct_OBJC=$OBJC
20766  for ac_prog in gcc objcc objc cc CC
20767do
20768  # Extract the first word of "$ac_prog", so it can be a program name with args.
20769set dummy $ac_prog; ac_word=$2
20770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20771$as_echo_n "checking for $ac_word... " >&6; }
20772if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20773  $as_echo_n "(cached) " >&6
20774else
20775  if test -n "$ac_ct_OBJC"; then
20776  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20777else
20778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20779for as_dir in $PATH
20780do
20781  IFS=$as_save_IFS
20782  test -z "$as_dir" && as_dir=.
20783    for ac_exec_ext in '' $ac_executable_extensions; do
20784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20785    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20787    break 2
20788  fi
20789done
20790  done
20791IFS=$as_save_IFS
20792
20793fi
20794fi
20795ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20796if test -n "$ac_ct_OBJC"; then
20797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20798$as_echo "$ac_ct_OBJC" >&6; }
20799else
20800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20801$as_echo "no" >&6; }
20802fi
20803
20804
20805  test -n "$ac_ct_OBJC" && break
20806done
20807
20808  if test "x$ac_ct_OBJC" = x; then
20809    OBJC="gcc"
20810  else
20811    case $cross_compiling:$ac_tool_warned in
20812yes:)
20813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20815ac_tool_warned=yes ;;
20816esac
20817    OBJC=$ac_ct_OBJC
20818  fi
20819fi
20820
20821# Provide some information about the compiler.
20822$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20823set X $ac_compile
20824ac_compiler=$2
20825for ac_option in --version -v -V -qversion; do
20826  { { ac_try="$ac_compiler $ac_option >&5"
20827case "(($ac_try" in
20828  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20829  *) ac_try_echo=$ac_try;;
20830esac
20831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20832$as_echo "$ac_try_echo"; } >&5
20833  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20834  ac_status=$?
20835  if test -s conftest.err; then
20836    sed '10a\
20837... rest of stderr output deleted ...
20838         10q' conftest.err >conftest.er1
20839    cat conftest.er1 >&5
20840  fi
20841  rm -f conftest.er1 conftest.err
20842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20843  test $ac_status = 0; }
20844done
20845
20846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20847$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20848if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20849  $as_echo_n "(cached) " >&6
20850else
20851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20852/* end confdefs.h.  */
20853
20854int
20855main ()
20856{
20857#ifndef __GNUC__
20858       choke me
20859#endif
20860
20861  ;
20862  return 0;
20863}
20864_ACEOF
20865if ac_fn_objc_try_compile "$LINENO"; then :
20866  ac_compiler_gnu=yes
20867else
20868  ac_compiler_gnu=no
20869fi
20870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20871ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20872
20873fi
20874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20875$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20876if test $ac_compiler_gnu = yes; then
20877  GOBJC=yes
20878else
20879  GOBJC=
20880fi
20881ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20882ac_save_OBJCFLAGS=$OBJCFLAGS
20883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20884$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20885if test "${ac_cv_prog_objc_g+set}" = set; then :
20886  $as_echo_n "(cached) " >&6
20887else
20888  ac_save_objc_werror_flag=$ac_objc_werror_flag
20889   ac_objc_werror_flag=yes
20890   ac_cv_prog_objc_g=no
20891   OBJCFLAGS="-g"
20892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20893/* end confdefs.h.  */
20894
20895int
20896main ()
20897{
20898
20899  ;
20900  return 0;
20901}
20902_ACEOF
20903if ac_fn_objc_try_compile "$LINENO"; then :
20904  ac_cv_prog_objc_g=yes
20905else
20906  OBJCFLAGS=""
20907      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20908/* end confdefs.h.  */
20909
20910int
20911main ()
20912{
20913
20914  ;
20915  return 0;
20916}
20917_ACEOF
20918if ac_fn_objc_try_compile "$LINENO"; then :
20919
20920else
20921  ac_objc_werror_flag=$ac_save_objc_werror_flag
20922	 OBJCFLAGS="-g"
20923	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20924/* end confdefs.h.  */
20925
20926int
20927main ()
20928{
20929
20930  ;
20931  return 0;
20932}
20933_ACEOF
20934if ac_fn_objc_try_compile "$LINENO"; then :
20935  ac_cv_prog_objc_g=yes
20936fi
20937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20938fi
20939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20940fi
20941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20942   ac_objc_werror_flag=$ac_save_objc_werror_flag
20943fi
20944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20945$as_echo "$ac_cv_prog_objc_g" >&6; }
20946if test "$ac_test_OBJCFLAGS" = set; then
20947  OBJCFLAGS=$ac_save_OBJCFLAGS
20948elif test $ac_cv_prog_objc_g = yes; then
20949  if test "$GOBJC" = yes; then
20950    OBJCFLAGS="-g -O2"
20951  else
20952    OBJCFLAGS="-g"
20953  fi
20954else
20955  if test "$GOBJC" = yes; then
20956    OBJCFLAGS="-O2"
20957  else
20958    OBJCFLAGS=
20959  fi
20960fi
20961ac_ext=cpp
20962ac_cpp='$CXXCPP $CPPFLAGS'
20963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20966
20967
20968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20969
20970  # First separate the path from the arguments. This will split at the first
20971  # space.
20972  complete="$OBJC"
20973  path="${complete%% *}"
20974  tmp="$complete EOL"
20975  arguments="${tmp#* }"
20976
20977  # Input might be given as Windows format, start by converting to
20978  # unix format.
20979  new_path=`$CYGPATH -u "$path"`
20980
20981  # Now try to locate executable using which
20982  new_path=`$WHICH "$new_path" 2> /dev/null`
20983  # bat and cmd files are not always considered executable in cygwin causing which
20984  # to not find them
20985  if test "x$new_path" = x \
20986           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20987           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20988    new_path=`$CYGPATH -u "$path"`
20989  fi
20990  if test "x$new_path" = x; then
20991    # Oops. Which didn't find the executable.
20992    # The splitting of arguments from the executable at a space might have been incorrect,
20993    # since paths with space are more likely in Windows. Give it another try with the whole
20994    # argument.
20995    path="$complete"
20996    arguments="EOL"
20997    new_path=`$CYGPATH -u "$path"`
20998    new_path=`$WHICH "$new_path" 2> /dev/null`
20999    # bat and cmd files are not always considered executable in cygwin causing which
21000    # to not find them
21001    if test "x$new_path" = x \
21002             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21003             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21004      new_path=`$CYGPATH -u "$path"`
21005    fi
21006    if test "x$new_path" = x; then
21007      # It's still not found. Now this is an unrecoverable error.
21008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21009$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21010      has_space=`$ECHO "$complete" | $GREP " "`
21011      if test "x$has_space" != x; then
21012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21014      fi
21015      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21016    fi
21017  fi
21018
21019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21022  # "foo.exe" is OK but "foo" is an error.
21023  #
21024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21025  # It is also a way to make sure we got the proper file name for the real test later on.
21026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21027  if test "x$test_shortpath" = x; then
21028    # Short path failed, file does not exist as specified.
21029    # Try adding .exe or .cmd
21030    if test -f "${new_path}.exe"; then
21031       input_to_shortpath="${new_path}.exe"
21032    elif test -f "${new_path}.cmd"; then
21033       input_to_shortpath="${new_path}.cmd"
21034    else
21035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21036$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21039      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21040    fi
21041  else
21042    input_to_shortpath="$new_path"
21043  fi
21044
21045  # Call helper function which possibly converts this using DOS-style short mode.
21046  # If so, the updated path is stored in $new_path.
21047  new_path="$input_to_shortpath"
21048
21049  input_path="$input_to_shortpath"
21050  # Check if we need to convert this using DOS-style short mode. If the path
21051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21052  # take no chances and rewrite it.
21053  # Note: m4 eats our [], so we need to use [ and ] instead.
21054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21055  if test "x$has_forbidden_chars" != x; then
21056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21060      # Going to short mode and back again did indeed matter. Since short mode is
21061      # case insensitive, let's make it lowercase to improve readability.
21062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21063      # Now convert it back to Unix-stile (cygpath)
21064      input_path=`$CYGPATH -u "$shortmode_path"`
21065      new_path="$input_path"
21066    fi
21067  fi
21068
21069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21070  if test "x$test_cygdrive_prefix" = x; then
21071    # As a simple fix, exclude /usr/bin since it's not a real path.
21072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21074      # a path prefixed by /cygdrive for fixpath to work.
21075      new_path="$CYGWIN_ROOT_PATH$input_path"
21076    fi
21077  fi
21078
21079  # remove trailing .exe if any
21080  new_path="${new_path/%.exe/}"
21081
21082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21083
21084  # First separate the path from the arguments. This will split at the first
21085  # space.
21086  complete="$OBJC"
21087  path="${complete%% *}"
21088  tmp="$complete EOL"
21089  arguments="${tmp#* }"
21090
21091  # Input might be given as Windows format, start by converting to
21092  # unix format.
21093  new_path="$path"
21094
21095  windows_path="$new_path"
21096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21097    unix_path=`$CYGPATH -u "$windows_path"`
21098    new_path="$unix_path"
21099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21101    new_path="$unix_path"
21102  fi
21103
21104
21105  # Now try to locate executable using which
21106  new_path=`$WHICH "$new_path" 2> /dev/null`
21107
21108  if test "x$new_path" = x; then
21109    # Oops. Which didn't find the executable.
21110    # The splitting of arguments from the executable at a space might have been incorrect,
21111    # since paths with space are more likely in Windows. Give it another try with the whole
21112    # argument.
21113    path="$complete"
21114    arguments="EOL"
21115    new_path="$path"
21116
21117  windows_path="$new_path"
21118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21119    unix_path=`$CYGPATH -u "$windows_path"`
21120    new_path="$unix_path"
21121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21123    new_path="$unix_path"
21124  fi
21125
21126
21127    new_path=`$WHICH "$new_path" 2> /dev/null`
21128
21129    if test "x$new_path" = x; then
21130      # It's still not found. Now this is an unrecoverable error.
21131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21132$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21133      has_space=`$ECHO "$complete" | $GREP " "`
21134      if test "x$has_space" != x; then
21135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21137      fi
21138      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21139    fi
21140  fi
21141
21142  # Now new_path has a complete unix path to the binary
21143  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21144    # Keep paths in /bin as-is, but remove trailing .exe if any
21145    new_path="${new_path/%.exe/}"
21146    # Do not save /bin paths to all_fixpath_prefixes!
21147  else
21148    # Not in mixed or Windows style, start by that.
21149    new_path=`cmd //c echo $new_path`
21150
21151  input_path="$new_path"
21152  # Check if we need to convert this using DOS-style short mode. If the path
21153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21154  # take no chances and rewrite it.
21155  # Note: m4 eats our [], so we need to use [ and ] instead.
21156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21157  if test "x$has_forbidden_chars" != x; then
21158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21160  fi
21161
21162    # Output is in $new_path
21163
21164  windows_path="$new_path"
21165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21166    unix_path=`$CYGPATH -u "$windows_path"`
21167    new_path="$unix_path"
21168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21170    new_path="$unix_path"
21171  fi
21172
21173    # remove trailing .exe if any
21174    new_path="${new_path/%.exe/}"
21175
21176    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21177    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21178  fi
21179
21180  else
21181    # We're on a posix platform. Hooray! :)
21182    # First separate the path from the arguments. This will split at the first
21183    # space.
21184    complete="$OBJC"
21185    path="${complete%% *}"
21186    tmp="$complete EOL"
21187    arguments="${tmp#* }"
21188
21189    # Cannot rely on the command "which" here since it doesn't always work.
21190    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21191    if test -z "$is_absolute_path"; then
21192      # Path to executable is not absolute. Find it.
21193      IFS_save="$IFS"
21194      IFS=:
21195      for p in $PATH; do
21196        if test -f "$p/$path" && test -x "$p/$path"; then
21197          new_path="$p/$path"
21198          break
21199        fi
21200      done
21201      IFS="$IFS_save"
21202    else
21203      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21204$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21205      new_path="$path"
21206    fi
21207
21208    if test "x$new_path" = x; then
21209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21210$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21211        has_space=`$ECHO "$complete" | $GREP " "`
21212        if test "x$has_space" != x; then
21213          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21214$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21215        fi
21216        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21217      fi
21218  fi
21219
21220      # Now join together the path and the arguments once again
21221      if test "x$arguments" != xEOL; then
21222        new_complete="$new_path ${arguments% *}"
21223      else
21224        new_complete="$new_path"
21225      fi
21226
21227  if test "x$complete" != "x$new_complete"; then
21228      OBJC="$new_complete"
21229      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21230$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21231    fi
21232
21233else
21234    OBJC=
21235fi
21236
21237# Restore the flags to the user specified values.
21238# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21239CFLAGS="$ORG_CFLAGS"
21240CXXFLAGS="$ORG_CXXFLAGS"
21241OBJCFLAGS="$ORG_OBJCFLAGS"
21242
21243LD="$CC"
21244LDEXE="$CC"
21245LDCXX="$CXX"
21246LDEXECXX="$CXX"
21247
21248# LDEXE is the linker to use, when creating executables.
21249
21250# Linking C++ libraries.
21251
21252# Linking C++ executables.
21253
21254
21255if test "x$OPENJDK_TARGET_OS" != xwindows; then
21256    if test -n "$ac_tool_prefix"; then
21257  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21258set dummy ${ac_tool_prefix}ar; ac_word=$2
21259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21260$as_echo_n "checking for $ac_word... " >&6; }
21261if test "${ac_cv_prog_AR+set}" = set; then :
21262  $as_echo_n "(cached) " >&6
21263else
21264  if test -n "$AR"; then
21265  ac_cv_prog_AR="$AR" # Let the user override the test.
21266else
21267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21268for as_dir in $PATH
21269do
21270  IFS=$as_save_IFS
21271  test -z "$as_dir" && as_dir=.
21272    for ac_exec_ext in '' $ac_executable_extensions; do
21273  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21274    ac_cv_prog_AR="${ac_tool_prefix}ar"
21275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21276    break 2
21277  fi
21278done
21279  done
21280IFS=$as_save_IFS
21281
21282fi
21283fi
21284AR=$ac_cv_prog_AR
21285if test -n "$AR"; then
21286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21287$as_echo "$AR" >&6; }
21288else
21289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21290$as_echo "no" >&6; }
21291fi
21292
21293
21294fi
21295if test -z "$ac_cv_prog_AR"; then
21296  ac_ct_AR=$AR
21297  # Extract the first word of "ar", so it can be a program name with args.
21298set dummy ar; ac_word=$2
21299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21300$as_echo_n "checking for $ac_word... " >&6; }
21301if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21302  $as_echo_n "(cached) " >&6
21303else
21304  if test -n "$ac_ct_AR"; then
21305  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21306else
21307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21308for as_dir in $PATH
21309do
21310  IFS=$as_save_IFS
21311  test -z "$as_dir" && as_dir=.
21312    for ac_exec_ext in '' $ac_executable_extensions; do
21313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21314    ac_cv_prog_ac_ct_AR="ar"
21315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21316    break 2
21317  fi
21318done
21319  done
21320IFS=$as_save_IFS
21321
21322fi
21323fi
21324ac_ct_AR=$ac_cv_prog_ac_ct_AR
21325if test -n "$ac_ct_AR"; then
21326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21327$as_echo "$ac_ct_AR" >&6; }
21328else
21329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21330$as_echo "no" >&6; }
21331fi
21332
21333  if test "x$ac_ct_AR" = x; then
21334    AR=""
21335  else
21336    case $cross_compiling:$ac_tool_warned in
21337yes:)
21338{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21339$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21340ac_tool_warned=yes ;;
21341esac
21342    AR=$ac_ct_AR
21343  fi
21344else
21345  AR="$ac_cv_prog_AR"
21346fi
21347
21348
21349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21350
21351  # First separate the path from the arguments. This will split at the first
21352  # space.
21353  complete="$AR"
21354  path="${complete%% *}"
21355  tmp="$complete EOL"
21356  arguments="${tmp#* }"
21357
21358  # Input might be given as Windows format, start by converting to
21359  # unix format.
21360  new_path=`$CYGPATH -u "$path"`
21361
21362  # Now try to locate executable using which
21363  new_path=`$WHICH "$new_path" 2> /dev/null`
21364  # bat and cmd files are not always considered executable in cygwin causing which
21365  # to not find them
21366  if test "x$new_path" = x \
21367           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21368           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21369    new_path=`$CYGPATH -u "$path"`
21370  fi
21371  if test "x$new_path" = x; then
21372    # Oops. Which didn't find the executable.
21373    # The splitting of arguments from the executable at a space might have been incorrect,
21374    # since paths with space are more likely in Windows. Give it another try with the whole
21375    # argument.
21376    path="$complete"
21377    arguments="EOL"
21378    new_path=`$CYGPATH -u "$path"`
21379    new_path=`$WHICH "$new_path" 2> /dev/null`
21380    # bat and cmd files are not always considered executable in cygwin causing which
21381    # to not find them
21382    if test "x$new_path" = x \
21383             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21384             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21385      new_path=`$CYGPATH -u "$path"`
21386    fi
21387    if test "x$new_path" = x; then
21388      # It's still not found. Now this is an unrecoverable error.
21389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21390$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21391      has_space=`$ECHO "$complete" | $GREP " "`
21392      if test "x$has_space" != x; then
21393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21395      fi
21396      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21397    fi
21398  fi
21399
21400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21403  # "foo.exe" is OK but "foo" is an error.
21404  #
21405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21406  # It is also a way to make sure we got the proper file name for the real test later on.
21407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21408  if test "x$test_shortpath" = x; then
21409    # Short path failed, file does not exist as specified.
21410    # Try adding .exe or .cmd
21411    if test -f "${new_path}.exe"; then
21412       input_to_shortpath="${new_path}.exe"
21413    elif test -f "${new_path}.cmd"; then
21414       input_to_shortpath="${new_path}.cmd"
21415    else
21416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21417$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21420      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21421    fi
21422  else
21423    input_to_shortpath="$new_path"
21424  fi
21425
21426  # Call helper function which possibly converts this using DOS-style short mode.
21427  # If so, the updated path is stored in $new_path.
21428  new_path="$input_to_shortpath"
21429
21430  input_path="$input_to_shortpath"
21431  # Check if we need to convert this using DOS-style short mode. If the path
21432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21433  # take no chances and rewrite it.
21434  # Note: m4 eats our [], so we need to use [ and ] instead.
21435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21436  if test "x$has_forbidden_chars" != x; then
21437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21441      # Going to short mode and back again did indeed matter. Since short mode is
21442      # case insensitive, let's make it lowercase to improve readability.
21443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21444      # Now convert it back to Unix-stile (cygpath)
21445      input_path=`$CYGPATH -u "$shortmode_path"`
21446      new_path="$input_path"
21447    fi
21448  fi
21449
21450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21451  if test "x$test_cygdrive_prefix" = x; then
21452    # As a simple fix, exclude /usr/bin since it's not a real path.
21453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21455      # a path prefixed by /cygdrive for fixpath to work.
21456      new_path="$CYGWIN_ROOT_PATH$input_path"
21457    fi
21458  fi
21459
21460  # remove trailing .exe if any
21461  new_path="${new_path/%.exe/}"
21462
21463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21464
21465  # First separate the path from the arguments. This will split at the first
21466  # space.
21467  complete="$AR"
21468  path="${complete%% *}"
21469  tmp="$complete EOL"
21470  arguments="${tmp#* }"
21471
21472  # Input might be given as Windows format, start by converting to
21473  # unix format.
21474  new_path="$path"
21475
21476  windows_path="$new_path"
21477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21478    unix_path=`$CYGPATH -u "$windows_path"`
21479    new_path="$unix_path"
21480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21482    new_path="$unix_path"
21483  fi
21484
21485
21486  # Now try to locate executable using which
21487  new_path=`$WHICH "$new_path" 2> /dev/null`
21488
21489  if test "x$new_path" = x; then
21490    # Oops. Which didn't find the executable.
21491    # The splitting of arguments from the executable at a space might have been incorrect,
21492    # since paths with space are more likely in Windows. Give it another try with the whole
21493    # argument.
21494    path="$complete"
21495    arguments="EOL"
21496    new_path="$path"
21497
21498  windows_path="$new_path"
21499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21500    unix_path=`$CYGPATH -u "$windows_path"`
21501    new_path="$unix_path"
21502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21504    new_path="$unix_path"
21505  fi
21506
21507
21508    new_path=`$WHICH "$new_path" 2> /dev/null`
21509
21510    if test "x$new_path" = x; then
21511      # It's still not found. Now this is an unrecoverable error.
21512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21513$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21514      has_space=`$ECHO "$complete" | $GREP " "`
21515      if test "x$has_space" != x; then
21516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21518      fi
21519      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21520    fi
21521  fi
21522
21523  # Now new_path has a complete unix path to the binary
21524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21525    # Keep paths in /bin as-is, but remove trailing .exe if any
21526    new_path="${new_path/%.exe/}"
21527    # Do not save /bin paths to all_fixpath_prefixes!
21528  else
21529    # Not in mixed or Windows style, start by that.
21530    new_path=`cmd //c echo $new_path`
21531
21532  input_path="$new_path"
21533  # Check if we need to convert this using DOS-style short mode. If the path
21534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21535  # take no chances and rewrite it.
21536  # Note: m4 eats our [], so we need to use [ and ] instead.
21537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21538  if test "x$has_forbidden_chars" != x; then
21539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21541  fi
21542
21543    # Output is in $new_path
21544
21545  windows_path="$new_path"
21546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21547    unix_path=`$CYGPATH -u "$windows_path"`
21548    new_path="$unix_path"
21549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21551    new_path="$unix_path"
21552  fi
21553
21554    # remove trailing .exe if any
21555    new_path="${new_path/%.exe/}"
21556
21557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21559  fi
21560
21561  else
21562    # We're on a posix platform. Hooray! :)
21563    # First separate the path from the arguments. This will split at the first
21564    # space.
21565    complete="$AR"
21566    path="${complete%% *}"
21567    tmp="$complete EOL"
21568    arguments="${tmp#* }"
21569
21570    # Cannot rely on the command "which" here since it doesn't always work.
21571    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21572    if test -z "$is_absolute_path"; then
21573      # Path to executable is not absolute. Find it.
21574      IFS_save="$IFS"
21575      IFS=:
21576      for p in $PATH; do
21577        if test -f "$p/$path" && test -x "$p/$path"; then
21578          new_path="$p/$path"
21579          break
21580        fi
21581      done
21582      IFS="$IFS_save"
21583    else
21584      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21585$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21586      new_path="$path"
21587    fi
21588
21589    if test "x$new_path" = x; then
21590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21591$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21592        has_space=`$ECHO "$complete" | $GREP " "`
21593        if test "x$has_space" != x; then
21594          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21596        fi
21597        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21598      fi
21599  fi
21600
21601      # Now join together the path and the arguments once again
21602      if test "x$arguments" != xEOL; then
21603        new_complete="$new_path ${arguments% *}"
21604      else
21605        new_complete="$new_path"
21606      fi
21607
21608  if test "x$complete" != "x$new_complete"; then
21609      AR="$new_complete"
21610      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21611$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21612    fi
21613
21614fi
21615if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21616    ARFLAGS="-r"
21617else
21618    ARFLAGS=""
21619fi
21620
21621
21622# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21623HOTSPOT_CXX="$CXX"
21624HOTSPOT_LD="$LD"
21625
21626
21627
21628COMPILER_NAME=gcc
21629COMPILER_TYPE=CC
21630if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21631
21632    # For now, assume that we are always compiling using cl.exe.
21633    CC_OUT_OPTION=-Fo
21634    EXE_OUT_OPTION=-out:
21635    LD_OUT_OPTION=-out:
21636    AR_OUT_OPTION=-out:
21637    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21638    # program for something completely different.
21639    # Extract the first word of "link", so it can be a program name with args.
21640set dummy link; ac_word=$2
21641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21642$as_echo_n "checking for $ac_word... " >&6; }
21643if test "${ac_cv_prog_WINLD+set}" = set; then :
21644  $as_echo_n "(cached) " >&6
21645else
21646  if test -n "$WINLD"; then
21647  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21648else
21649  ac_prog_rejected=no
21650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21651for as_dir in $PATH
21652do
21653  IFS=$as_save_IFS
21654  test -z "$as_dir" && as_dir=.
21655    for ac_exec_ext in '' $ac_executable_extensions; do
21656  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21657    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21658       ac_prog_rejected=yes
21659       continue
21660     fi
21661    ac_cv_prog_WINLD="link"
21662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21663    break 2
21664  fi
21665done
21666  done
21667IFS=$as_save_IFS
21668
21669if test $ac_prog_rejected = yes; then
21670  # We found a bogon in the path, so make sure we never use it.
21671  set dummy $ac_cv_prog_WINLD
21672  shift
21673  if test $# != 0; then
21674    # We chose a different compiler from the bogus one.
21675    # However, it has the same basename, so the bogon will be chosen
21676    # first if we set WINLD to just the basename; use the full file name.
21677    shift
21678    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21679  fi
21680fi
21681fi
21682fi
21683WINLD=$ac_cv_prog_WINLD
21684if test -n "$WINLD"; then
21685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21686$as_echo "$WINLD" >&6; }
21687else
21688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21689$as_echo "no" >&6; }
21690fi
21691
21692
21693    # Since we must ignore the first found link, WINLD will contain
21694    # the full path to the link.exe program.
21695
21696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21697
21698  # First separate the path from the arguments. This will split at the first
21699  # space.
21700  complete="$WINLD"
21701  path="${complete%% *}"
21702  tmp="$complete EOL"
21703  arguments="${tmp#* }"
21704
21705  # Input might be given as Windows format, start by converting to
21706  # unix format.
21707  new_path=`$CYGPATH -u "$path"`
21708
21709  # Now try to locate executable using which
21710  new_path=`$WHICH "$new_path" 2> /dev/null`
21711  # bat and cmd files are not always considered executable in cygwin causing which
21712  # to not find them
21713  if test "x$new_path" = x \
21714           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21715           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21716    new_path=`$CYGPATH -u "$path"`
21717  fi
21718  if test "x$new_path" = x; then
21719    # Oops. Which didn't find the executable.
21720    # The splitting of arguments from the executable at a space might have been incorrect,
21721    # since paths with space are more likely in Windows. Give it another try with the whole
21722    # argument.
21723    path="$complete"
21724    arguments="EOL"
21725    new_path=`$CYGPATH -u "$path"`
21726    new_path=`$WHICH "$new_path" 2> /dev/null`
21727    # bat and cmd files are not always considered executable in cygwin causing which
21728    # to not find them
21729    if test "x$new_path" = x \
21730             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21731             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21732      new_path=`$CYGPATH -u "$path"`
21733    fi
21734    if test "x$new_path" = x; then
21735      # It's still not found. Now this is an unrecoverable error.
21736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21737$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21738      has_space=`$ECHO "$complete" | $GREP " "`
21739      if test "x$has_space" != x; then
21740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21742      fi
21743      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21744    fi
21745  fi
21746
21747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21750  # "foo.exe" is OK but "foo" is an error.
21751  #
21752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21753  # It is also a way to make sure we got the proper file name for the real test later on.
21754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21755  if test "x$test_shortpath" = x; then
21756    # Short path failed, file does not exist as specified.
21757    # Try adding .exe or .cmd
21758    if test -f "${new_path}.exe"; then
21759       input_to_shortpath="${new_path}.exe"
21760    elif test -f "${new_path}.cmd"; then
21761       input_to_shortpath="${new_path}.cmd"
21762    else
21763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21764$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21767      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21768    fi
21769  else
21770    input_to_shortpath="$new_path"
21771  fi
21772
21773  # Call helper function which possibly converts this using DOS-style short mode.
21774  # If so, the updated path is stored in $new_path.
21775  new_path="$input_to_shortpath"
21776
21777  input_path="$input_to_shortpath"
21778  # Check if we need to convert this using DOS-style short mode. If the path
21779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21780  # take no chances and rewrite it.
21781  # Note: m4 eats our [], so we need to use [ and ] instead.
21782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21783  if test "x$has_forbidden_chars" != x; then
21784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21788      # Going to short mode and back again did indeed matter. Since short mode is
21789      # case insensitive, let's make it lowercase to improve readability.
21790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21791      # Now convert it back to Unix-stile (cygpath)
21792      input_path=`$CYGPATH -u "$shortmode_path"`
21793      new_path="$input_path"
21794    fi
21795  fi
21796
21797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21798  if test "x$test_cygdrive_prefix" = x; then
21799    # As a simple fix, exclude /usr/bin since it's not a real path.
21800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21802      # a path prefixed by /cygdrive for fixpath to work.
21803      new_path="$CYGWIN_ROOT_PATH$input_path"
21804    fi
21805  fi
21806
21807  # remove trailing .exe if any
21808  new_path="${new_path/%.exe/}"
21809
21810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21811
21812  # First separate the path from the arguments. This will split at the first
21813  # space.
21814  complete="$WINLD"
21815  path="${complete%% *}"
21816  tmp="$complete EOL"
21817  arguments="${tmp#* }"
21818
21819  # Input might be given as Windows format, start by converting to
21820  # unix format.
21821  new_path="$path"
21822
21823  windows_path="$new_path"
21824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21825    unix_path=`$CYGPATH -u "$windows_path"`
21826    new_path="$unix_path"
21827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21829    new_path="$unix_path"
21830  fi
21831
21832
21833  # Now try to locate executable using which
21834  new_path=`$WHICH "$new_path" 2> /dev/null`
21835
21836  if test "x$new_path" = x; then
21837    # Oops. Which didn't find the executable.
21838    # The splitting of arguments from the executable at a space might have been incorrect,
21839    # since paths with space are more likely in Windows. Give it another try with the whole
21840    # argument.
21841    path="$complete"
21842    arguments="EOL"
21843    new_path="$path"
21844
21845  windows_path="$new_path"
21846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21847    unix_path=`$CYGPATH -u "$windows_path"`
21848    new_path="$unix_path"
21849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21851    new_path="$unix_path"
21852  fi
21853
21854
21855    new_path=`$WHICH "$new_path" 2> /dev/null`
21856
21857    if test "x$new_path" = x; then
21858      # It's still not found. Now this is an unrecoverable error.
21859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21860$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21861      has_space=`$ECHO "$complete" | $GREP " "`
21862      if test "x$has_space" != x; then
21863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21865      fi
21866      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21867    fi
21868  fi
21869
21870  # Now new_path has a complete unix path to the binary
21871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21872    # Keep paths in /bin as-is, but remove trailing .exe if any
21873    new_path="${new_path/%.exe/}"
21874    # Do not save /bin paths to all_fixpath_prefixes!
21875  else
21876    # Not in mixed or Windows style, start by that.
21877    new_path=`cmd //c echo $new_path`
21878
21879  input_path="$new_path"
21880  # Check if we need to convert this using DOS-style short mode. If the path
21881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21882  # take no chances and rewrite it.
21883  # Note: m4 eats our [], so we need to use [ and ] instead.
21884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21885  if test "x$has_forbidden_chars" != x; then
21886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21888  fi
21889
21890    # Output is in $new_path
21891
21892  windows_path="$new_path"
21893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21894    unix_path=`$CYGPATH -u "$windows_path"`
21895    new_path="$unix_path"
21896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21898    new_path="$unix_path"
21899  fi
21900
21901    # remove trailing .exe if any
21902    new_path="${new_path/%.exe/}"
21903
21904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21906  fi
21907
21908  else
21909    # We're on a posix platform. Hooray! :)
21910    # First separate the path from the arguments. This will split at the first
21911    # space.
21912    complete="$WINLD"
21913    path="${complete%% *}"
21914    tmp="$complete EOL"
21915    arguments="${tmp#* }"
21916
21917    # Cannot rely on the command "which" here since it doesn't always work.
21918    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21919    if test -z "$is_absolute_path"; then
21920      # Path to executable is not absolute. Find it.
21921      IFS_save="$IFS"
21922      IFS=:
21923      for p in $PATH; do
21924        if test -f "$p/$path" && test -x "$p/$path"; then
21925          new_path="$p/$path"
21926          break
21927        fi
21928      done
21929      IFS="$IFS_save"
21930    else
21931      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
21932$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
21933      new_path="$path"
21934    fi
21935
21936    if test "x$new_path" = x; then
21937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21938$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21939        has_space=`$ECHO "$complete" | $GREP " "`
21940        if test "x$has_space" != x; then
21941          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21943        fi
21944        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21945      fi
21946  fi
21947
21948      # Now join together the path and the arguments once again
21949      if test "x$arguments" != xEOL; then
21950        new_complete="$new_path ${arguments% *}"
21951      else
21952        new_complete="$new_path"
21953      fi
21954
21955  if test "x$complete" != "x$new_complete"; then
21956      WINLD="$new_complete"
21957      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21958$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21959    fi
21960
21961    printf "Windows linker was found at $WINLD\n"
21962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21963$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21964    "$WINLD" --version > /dev/null
21965    if test $? -eq 0 ; then
21966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21967$as_echo "no" >&6; }
21968      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21969    else
21970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21971$as_echo "yes" >&6; }
21972    fi
21973    LD="$WINLD"
21974    LDEXE="$WINLD"
21975    LDCXX="$WINLD"
21976    LDEXECXX="$WINLD"
21977
21978    # Extract the first word of "mt", so it can be a program name with args.
21979set dummy mt; ac_word=$2
21980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21981$as_echo_n "checking for $ac_word... " >&6; }
21982if test "${ac_cv_prog_MT+set}" = set; then :
21983  $as_echo_n "(cached) " >&6
21984else
21985  if test -n "$MT"; then
21986  ac_cv_prog_MT="$MT" # Let the user override the test.
21987else
21988  ac_prog_rejected=no
21989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21990for as_dir in $PATH
21991do
21992  IFS=$as_save_IFS
21993  test -z "$as_dir" && as_dir=.
21994    for ac_exec_ext in '' $ac_executable_extensions; do
21995  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21996    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21997       ac_prog_rejected=yes
21998       continue
21999     fi
22000    ac_cv_prog_MT="mt"
22001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22002    break 2
22003  fi
22004done
22005  done
22006IFS=$as_save_IFS
22007
22008if test $ac_prog_rejected = yes; then
22009  # We found a bogon in the path, so make sure we never use it.
22010  set dummy $ac_cv_prog_MT
22011  shift
22012  if test $# != 0; then
22013    # We chose a different compiler from the bogus one.
22014    # However, it has the same basename, so the bogon will be chosen
22015    # first if we set MT to just the basename; use the full file name.
22016    shift
22017    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22018  fi
22019fi
22020fi
22021fi
22022MT=$ac_cv_prog_MT
22023if test -n "$MT"; then
22024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22025$as_echo "$MT" >&6; }
22026else
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22028$as_echo "no" >&6; }
22029fi
22030
22031
22032
22033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22034
22035  # First separate the path from the arguments. This will split at the first
22036  # space.
22037  complete="$MT"
22038  path="${complete%% *}"
22039  tmp="$complete EOL"
22040  arguments="${tmp#* }"
22041
22042  # Input might be given as Windows format, start by converting to
22043  # unix format.
22044  new_path=`$CYGPATH -u "$path"`
22045
22046  # Now try to locate executable using which
22047  new_path=`$WHICH "$new_path" 2> /dev/null`
22048  # bat and cmd files are not always considered executable in cygwin causing which
22049  # to not find them
22050  if test "x$new_path" = x \
22051           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22052           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22053    new_path=`$CYGPATH -u "$path"`
22054  fi
22055  if test "x$new_path" = x; then
22056    # Oops. Which didn't find the executable.
22057    # The splitting of arguments from the executable at a space might have been incorrect,
22058    # since paths with space are more likely in Windows. Give it another try with the whole
22059    # argument.
22060    path="$complete"
22061    arguments="EOL"
22062    new_path=`$CYGPATH -u "$path"`
22063    new_path=`$WHICH "$new_path" 2> /dev/null`
22064    # bat and cmd files are not always considered executable in cygwin causing which
22065    # to not find them
22066    if test "x$new_path" = x \
22067             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22068             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22069      new_path=`$CYGPATH -u "$path"`
22070    fi
22071    if test "x$new_path" = x; then
22072      # It's still not found. Now this is an unrecoverable error.
22073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22074$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22075      has_space=`$ECHO "$complete" | $GREP " "`
22076      if test "x$has_space" != x; then
22077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22079      fi
22080      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22081    fi
22082  fi
22083
22084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22087  # "foo.exe" is OK but "foo" is an error.
22088  #
22089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22090  # It is also a way to make sure we got the proper file name for the real test later on.
22091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22092  if test "x$test_shortpath" = x; then
22093    # Short path failed, file does not exist as specified.
22094    # Try adding .exe or .cmd
22095    if test -f "${new_path}.exe"; then
22096       input_to_shortpath="${new_path}.exe"
22097    elif test -f "${new_path}.cmd"; then
22098       input_to_shortpath="${new_path}.cmd"
22099    else
22100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22101$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22104      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22105    fi
22106  else
22107    input_to_shortpath="$new_path"
22108  fi
22109
22110  # Call helper function which possibly converts this using DOS-style short mode.
22111  # If so, the updated path is stored in $new_path.
22112  new_path="$input_to_shortpath"
22113
22114  input_path="$input_to_shortpath"
22115  # Check if we need to convert this using DOS-style short mode. If the path
22116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22117  # take no chances and rewrite it.
22118  # Note: m4 eats our [], so we need to use [ and ] instead.
22119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22120  if test "x$has_forbidden_chars" != x; then
22121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22125      # Going to short mode and back again did indeed matter. Since short mode is
22126      # case insensitive, let's make it lowercase to improve readability.
22127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22128      # Now convert it back to Unix-stile (cygpath)
22129      input_path=`$CYGPATH -u "$shortmode_path"`
22130      new_path="$input_path"
22131    fi
22132  fi
22133
22134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22135  if test "x$test_cygdrive_prefix" = x; then
22136    # As a simple fix, exclude /usr/bin since it's not a real path.
22137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22139      # a path prefixed by /cygdrive for fixpath to work.
22140      new_path="$CYGWIN_ROOT_PATH$input_path"
22141    fi
22142  fi
22143
22144  # remove trailing .exe if any
22145  new_path="${new_path/%.exe/}"
22146
22147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22148
22149  # First separate the path from the arguments. This will split at the first
22150  # space.
22151  complete="$MT"
22152  path="${complete%% *}"
22153  tmp="$complete EOL"
22154  arguments="${tmp#* }"
22155
22156  # Input might be given as Windows format, start by converting to
22157  # unix format.
22158  new_path="$path"
22159
22160  windows_path="$new_path"
22161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22162    unix_path=`$CYGPATH -u "$windows_path"`
22163    new_path="$unix_path"
22164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22166    new_path="$unix_path"
22167  fi
22168
22169
22170  # Now try to locate executable using which
22171  new_path=`$WHICH "$new_path" 2> /dev/null`
22172
22173  if test "x$new_path" = x; then
22174    # Oops. Which didn't find the executable.
22175    # The splitting of arguments from the executable at a space might have been incorrect,
22176    # since paths with space are more likely in Windows. Give it another try with the whole
22177    # argument.
22178    path="$complete"
22179    arguments="EOL"
22180    new_path="$path"
22181
22182  windows_path="$new_path"
22183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22184    unix_path=`$CYGPATH -u "$windows_path"`
22185    new_path="$unix_path"
22186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22188    new_path="$unix_path"
22189  fi
22190
22191
22192    new_path=`$WHICH "$new_path" 2> /dev/null`
22193
22194    if test "x$new_path" = x; then
22195      # It's still not found. Now this is an unrecoverable error.
22196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22197$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22198      has_space=`$ECHO "$complete" | $GREP " "`
22199      if test "x$has_space" != x; then
22200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22202      fi
22203      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22204    fi
22205  fi
22206
22207  # Now new_path has a complete unix path to the binary
22208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22209    # Keep paths in /bin as-is, but remove trailing .exe if any
22210    new_path="${new_path/%.exe/}"
22211    # Do not save /bin paths to all_fixpath_prefixes!
22212  else
22213    # Not in mixed or Windows style, start by that.
22214    new_path=`cmd //c echo $new_path`
22215
22216  input_path="$new_path"
22217  # Check if we need to convert this using DOS-style short mode. If the path
22218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22219  # take no chances and rewrite it.
22220  # Note: m4 eats our [], so we need to use [ and ] instead.
22221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22222  if test "x$has_forbidden_chars" != x; then
22223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22225  fi
22226
22227    # Output is in $new_path
22228
22229  windows_path="$new_path"
22230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22231    unix_path=`$CYGPATH -u "$windows_path"`
22232    new_path="$unix_path"
22233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22235    new_path="$unix_path"
22236  fi
22237
22238    # remove trailing .exe if any
22239    new_path="${new_path/%.exe/}"
22240
22241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22243  fi
22244
22245  else
22246    # We're on a posix platform. Hooray! :)
22247    # First separate the path from the arguments. This will split at the first
22248    # space.
22249    complete="$MT"
22250    path="${complete%% *}"
22251    tmp="$complete EOL"
22252    arguments="${tmp#* }"
22253
22254    # Cannot rely on the command "which" here since it doesn't always work.
22255    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22256    if test -z "$is_absolute_path"; then
22257      # Path to executable is not absolute. Find it.
22258      IFS_save="$IFS"
22259      IFS=:
22260      for p in $PATH; do
22261        if test -f "$p/$path" && test -x "$p/$path"; then
22262          new_path="$p/$path"
22263          break
22264        fi
22265      done
22266      IFS="$IFS_save"
22267    else
22268      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22269$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22270      new_path="$path"
22271    fi
22272
22273    if test "x$new_path" = x; then
22274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22275$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22276        has_space=`$ECHO "$complete" | $GREP " "`
22277        if test "x$has_space" != x; then
22278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22280        fi
22281        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22282      fi
22283  fi
22284
22285      # Now join together the path and the arguments once again
22286      if test "x$arguments" != xEOL; then
22287        new_complete="$new_path ${arguments% *}"
22288      else
22289        new_complete="$new_path"
22290      fi
22291
22292  if test "x$complete" != "x$new_complete"; then
22293      MT="$new_complete"
22294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22295$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22296    fi
22297
22298    # The resource compiler
22299    # Extract the first word of "rc", so it can be a program name with args.
22300set dummy rc; ac_word=$2
22301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22302$as_echo_n "checking for $ac_word... " >&6; }
22303if test "${ac_cv_prog_RC+set}" = set; then :
22304  $as_echo_n "(cached) " >&6
22305else
22306  if test -n "$RC"; then
22307  ac_cv_prog_RC="$RC" # Let the user override the test.
22308else
22309  ac_prog_rejected=no
22310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22311for as_dir in $PATH
22312do
22313  IFS=$as_save_IFS
22314  test -z "$as_dir" && as_dir=.
22315    for ac_exec_ext in '' $ac_executable_extensions; do
22316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22317    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22318       ac_prog_rejected=yes
22319       continue
22320     fi
22321    ac_cv_prog_RC="rc"
22322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22323    break 2
22324  fi
22325done
22326  done
22327IFS=$as_save_IFS
22328
22329if test $ac_prog_rejected = yes; then
22330  # We found a bogon in the path, so make sure we never use it.
22331  set dummy $ac_cv_prog_RC
22332  shift
22333  if test $# != 0; then
22334    # We chose a different compiler from the bogus one.
22335    # However, it has the same basename, so the bogon will be chosen
22336    # first if we set RC to just the basename; use the full file name.
22337    shift
22338    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22339  fi
22340fi
22341fi
22342fi
22343RC=$ac_cv_prog_RC
22344if test -n "$RC"; then
22345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22346$as_echo "$RC" >&6; }
22347else
22348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22349$as_echo "no" >&6; }
22350fi
22351
22352
22353
22354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22355
22356  # First separate the path from the arguments. This will split at the first
22357  # space.
22358  complete="$RC"
22359  path="${complete%% *}"
22360  tmp="$complete EOL"
22361  arguments="${tmp#* }"
22362
22363  # Input might be given as Windows format, start by converting to
22364  # unix format.
22365  new_path=`$CYGPATH -u "$path"`
22366
22367  # Now try to locate executable using which
22368  new_path=`$WHICH "$new_path" 2> /dev/null`
22369  # bat and cmd files are not always considered executable in cygwin causing which
22370  # to not find them
22371  if test "x$new_path" = x \
22372           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22373           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22374    new_path=`$CYGPATH -u "$path"`
22375  fi
22376  if test "x$new_path" = x; then
22377    # Oops. Which didn't find the executable.
22378    # The splitting of arguments from the executable at a space might have been incorrect,
22379    # since paths with space are more likely in Windows. Give it another try with the whole
22380    # argument.
22381    path="$complete"
22382    arguments="EOL"
22383    new_path=`$CYGPATH -u "$path"`
22384    new_path=`$WHICH "$new_path" 2> /dev/null`
22385    # bat and cmd files are not always considered executable in cygwin causing which
22386    # to not find them
22387    if test "x$new_path" = x \
22388             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22389             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22390      new_path=`$CYGPATH -u "$path"`
22391    fi
22392    if test "x$new_path" = x; then
22393      # It's still not found. Now this is an unrecoverable error.
22394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22395$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22396      has_space=`$ECHO "$complete" | $GREP " "`
22397      if test "x$has_space" != x; then
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22400      fi
22401      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22402    fi
22403  fi
22404
22405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22408  # "foo.exe" is OK but "foo" is an error.
22409  #
22410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22411  # It is also a way to make sure we got the proper file name for the real test later on.
22412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22413  if test "x$test_shortpath" = x; then
22414    # Short path failed, file does not exist as specified.
22415    # Try adding .exe or .cmd
22416    if test -f "${new_path}.exe"; then
22417       input_to_shortpath="${new_path}.exe"
22418    elif test -f "${new_path}.cmd"; then
22419       input_to_shortpath="${new_path}.cmd"
22420    else
22421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22422$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22425      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22426    fi
22427  else
22428    input_to_shortpath="$new_path"
22429  fi
22430
22431  # Call helper function which possibly converts this using DOS-style short mode.
22432  # If so, the updated path is stored in $new_path.
22433  new_path="$input_to_shortpath"
22434
22435  input_path="$input_to_shortpath"
22436  # Check if we need to convert this using DOS-style short mode. If the path
22437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22438  # take no chances and rewrite it.
22439  # Note: m4 eats our [], so we need to use [ and ] instead.
22440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22441  if test "x$has_forbidden_chars" != x; then
22442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22446      # Going to short mode and back again did indeed matter. Since short mode is
22447      # case insensitive, let's make it lowercase to improve readability.
22448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22449      # Now convert it back to Unix-stile (cygpath)
22450      input_path=`$CYGPATH -u "$shortmode_path"`
22451      new_path="$input_path"
22452    fi
22453  fi
22454
22455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22456  if test "x$test_cygdrive_prefix" = x; then
22457    # As a simple fix, exclude /usr/bin since it's not a real path.
22458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22460      # a path prefixed by /cygdrive for fixpath to work.
22461      new_path="$CYGWIN_ROOT_PATH$input_path"
22462    fi
22463  fi
22464
22465  # remove trailing .exe if any
22466  new_path="${new_path/%.exe/}"
22467
22468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22469
22470  # First separate the path from the arguments. This will split at the first
22471  # space.
22472  complete="$RC"
22473  path="${complete%% *}"
22474  tmp="$complete EOL"
22475  arguments="${tmp#* }"
22476
22477  # Input might be given as Windows format, start by converting to
22478  # unix format.
22479  new_path="$path"
22480
22481  windows_path="$new_path"
22482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22483    unix_path=`$CYGPATH -u "$windows_path"`
22484    new_path="$unix_path"
22485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22487    new_path="$unix_path"
22488  fi
22489
22490
22491  # Now try to locate executable using which
22492  new_path=`$WHICH "$new_path" 2> /dev/null`
22493
22494  if test "x$new_path" = x; then
22495    # Oops. Which didn't find the executable.
22496    # The splitting of arguments from the executable at a space might have been incorrect,
22497    # since paths with space are more likely in Windows. Give it another try with the whole
22498    # argument.
22499    path="$complete"
22500    arguments="EOL"
22501    new_path="$path"
22502
22503  windows_path="$new_path"
22504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22505    unix_path=`$CYGPATH -u "$windows_path"`
22506    new_path="$unix_path"
22507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22509    new_path="$unix_path"
22510  fi
22511
22512
22513    new_path=`$WHICH "$new_path" 2> /dev/null`
22514
22515    if test "x$new_path" = x; then
22516      # It's still not found. Now this is an unrecoverable error.
22517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22518$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22519      has_space=`$ECHO "$complete" | $GREP " "`
22520      if test "x$has_space" != x; then
22521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22523      fi
22524      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22525    fi
22526  fi
22527
22528  # Now new_path has a complete unix path to the binary
22529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22530    # Keep paths in /bin as-is, but remove trailing .exe if any
22531    new_path="${new_path/%.exe/}"
22532    # Do not save /bin paths to all_fixpath_prefixes!
22533  else
22534    # Not in mixed or Windows style, start by that.
22535    new_path=`cmd //c echo $new_path`
22536
22537  input_path="$new_path"
22538  # Check if we need to convert this using DOS-style short mode. If the path
22539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22540  # take no chances and rewrite it.
22541  # Note: m4 eats our [], so we need to use [ and ] instead.
22542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22543  if test "x$has_forbidden_chars" != x; then
22544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22546  fi
22547
22548    # Output is in $new_path
22549
22550  windows_path="$new_path"
22551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22552    unix_path=`$CYGPATH -u "$windows_path"`
22553    new_path="$unix_path"
22554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22556    new_path="$unix_path"
22557  fi
22558
22559    # remove trailing .exe if any
22560    new_path="${new_path/%.exe/}"
22561
22562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22564  fi
22565
22566  else
22567    # We're on a posix platform. Hooray! :)
22568    # First separate the path from the arguments. This will split at the first
22569    # space.
22570    complete="$RC"
22571    path="${complete%% *}"
22572    tmp="$complete EOL"
22573    arguments="${tmp#* }"
22574
22575    # Cannot rely on the command "which" here since it doesn't always work.
22576    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22577    if test -z "$is_absolute_path"; then
22578      # Path to executable is not absolute. Find it.
22579      IFS_save="$IFS"
22580      IFS=:
22581      for p in $PATH; do
22582        if test -f "$p/$path" && test -x "$p/$path"; then
22583          new_path="$p/$path"
22584          break
22585        fi
22586      done
22587      IFS="$IFS_save"
22588    else
22589      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22590$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22591      new_path="$path"
22592    fi
22593
22594    if test "x$new_path" = x; then
22595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22596$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22597        has_space=`$ECHO "$complete" | $GREP " "`
22598        if test "x$has_space" != x; then
22599          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22601        fi
22602        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22603      fi
22604  fi
22605
22606      # Now join together the path and the arguments once again
22607      if test "x$arguments" != xEOL; then
22608        new_complete="$new_path ${arguments% *}"
22609      else
22610        new_complete="$new_path"
22611      fi
22612
22613  if test "x$complete" != "x$new_complete"; then
22614      RC="$new_complete"
22615      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22616$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22617    fi
22618
22619
22620    # For hotspot, we need these in Windows mixed path,
22621    # so rewrite them all. Need added .exe suffix.
22622    HOTSPOT_CXX="$CXX.exe"
22623    HOTSPOT_LD="$LD.exe"
22624    HOTSPOT_MT="$MT.exe"
22625    HOTSPOT_RC="$RC.exe"
22626
22627  unix_path="$HOTSPOT_CXX"
22628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22629    windows_path=`$CYGPATH -m "$unix_path"`
22630    HOTSPOT_CXX="$windows_path"
22631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22632    windows_path=`cmd //c echo $unix_path`
22633    HOTSPOT_CXX="$windows_path"
22634  fi
22635
22636
22637  unix_path="$HOTSPOT_LD"
22638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22639    windows_path=`$CYGPATH -m "$unix_path"`
22640    HOTSPOT_LD="$windows_path"
22641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22642    windows_path=`cmd //c echo $unix_path`
22643    HOTSPOT_LD="$windows_path"
22644  fi
22645
22646
22647  unix_path="$HOTSPOT_MT"
22648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22649    windows_path=`$CYGPATH -m "$unix_path"`
22650    HOTSPOT_MT="$windows_path"
22651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22652    windows_path=`cmd //c echo $unix_path`
22653    HOTSPOT_MT="$windows_path"
22654  fi
22655
22656
22657  unix_path="$HOTSPOT_RC"
22658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22659    windows_path=`$CYGPATH -m "$unix_path"`
22660    HOTSPOT_RC="$windows_path"
22661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22662    windows_path=`cmd //c echo $unix_path`
22663    HOTSPOT_RC="$windows_path"
22664  fi
22665
22666
22667
22668
22669    RC_FLAGS="-nologo -l 0x409 -r"
22670    if test "x$VARIANT" = xOPT; then :
22671
22672        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22673
22674fi
22675    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22676    if test "x$JDK_UPDATE_VERSION" = x; then :
22677
22678        JDK_UPDATE_VERSION_NOTNULL=0
22679
22680fi
22681    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22682    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22683    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22684    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22685    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22686    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22687    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22688
22689    # lib.exe is used to create static libraries.
22690    # Extract the first word of "lib", so it can be a program name with args.
22691set dummy lib; ac_word=$2
22692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22693$as_echo_n "checking for $ac_word... " >&6; }
22694if test "${ac_cv_prog_WINAR+set}" = set; then :
22695  $as_echo_n "(cached) " >&6
22696else
22697  if test -n "$WINAR"; then
22698  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22699else
22700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22701for as_dir in $PATH
22702do
22703  IFS=$as_save_IFS
22704  test -z "$as_dir" && as_dir=.
22705    for ac_exec_ext in '' $ac_executable_extensions; do
22706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22707    ac_cv_prog_WINAR="lib"
22708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22709    break 2
22710  fi
22711done
22712  done
22713IFS=$as_save_IFS
22714
22715fi
22716fi
22717WINAR=$ac_cv_prog_WINAR
22718if test -n "$WINAR"; then
22719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22720$as_echo "$WINAR" >&6; }
22721else
22722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22723$as_echo "no" >&6; }
22724fi
22725
22726
22727
22728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22729
22730  # First separate the path from the arguments. This will split at the first
22731  # space.
22732  complete="$WINAR"
22733  path="${complete%% *}"
22734  tmp="$complete EOL"
22735  arguments="${tmp#* }"
22736
22737  # Input might be given as Windows format, start by converting to
22738  # unix format.
22739  new_path=`$CYGPATH -u "$path"`
22740
22741  # Now try to locate executable using which
22742  new_path=`$WHICH "$new_path" 2> /dev/null`
22743  # bat and cmd files are not always considered executable in cygwin causing which
22744  # to not find them
22745  if test "x$new_path" = x \
22746           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22747           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22748    new_path=`$CYGPATH -u "$path"`
22749  fi
22750  if test "x$new_path" = x; then
22751    # Oops. Which didn't find the executable.
22752    # The splitting of arguments from the executable at a space might have been incorrect,
22753    # since paths with space are more likely in Windows. Give it another try with the whole
22754    # argument.
22755    path="$complete"
22756    arguments="EOL"
22757    new_path=`$CYGPATH -u "$path"`
22758    new_path=`$WHICH "$new_path" 2> /dev/null`
22759    # bat and cmd files are not always considered executable in cygwin causing which
22760    # to not find them
22761    if test "x$new_path" = x \
22762             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22763             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22764      new_path=`$CYGPATH -u "$path"`
22765    fi
22766    if test "x$new_path" = x; then
22767      # It's still not found. Now this is an unrecoverable error.
22768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22769$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22770      has_space=`$ECHO "$complete" | $GREP " "`
22771      if test "x$has_space" != x; then
22772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22774      fi
22775      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22776    fi
22777  fi
22778
22779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22782  # "foo.exe" is OK but "foo" is an error.
22783  #
22784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22785  # It is also a way to make sure we got the proper file name for the real test later on.
22786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22787  if test "x$test_shortpath" = x; then
22788    # Short path failed, file does not exist as specified.
22789    # Try adding .exe or .cmd
22790    if test -f "${new_path}.exe"; then
22791       input_to_shortpath="${new_path}.exe"
22792    elif test -f "${new_path}.cmd"; then
22793       input_to_shortpath="${new_path}.cmd"
22794    else
22795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22796$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22797      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22798$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22799      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22800    fi
22801  else
22802    input_to_shortpath="$new_path"
22803  fi
22804
22805  # Call helper function which possibly converts this using DOS-style short mode.
22806  # If so, the updated path is stored in $new_path.
22807  new_path="$input_to_shortpath"
22808
22809  input_path="$input_to_shortpath"
22810  # Check if we need to convert this using DOS-style short mode. If the path
22811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22812  # take no chances and rewrite it.
22813  # Note: m4 eats our [], so we need to use [ and ] instead.
22814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22815  if test "x$has_forbidden_chars" != x; then
22816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22820      # Going to short mode and back again did indeed matter. Since short mode is
22821      # case insensitive, let's make it lowercase to improve readability.
22822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22823      # Now convert it back to Unix-stile (cygpath)
22824      input_path=`$CYGPATH -u "$shortmode_path"`
22825      new_path="$input_path"
22826    fi
22827  fi
22828
22829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22830  if test "x$test_cygdrive_prefix" = x; then
22831    # As a simple fix, exclude /usr/bin since it's not a real path.
22832    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22834      # a path prefixed by /cygdrive for fixpath to work.
22835      new_path="$CYGWIN_ROOT_PATH$input_path"
22836    fi
22837  fi
22838
22839  # remove trailing .exe if any
22840  new_path="${new_path/%.exe/}"
22841
22842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22843
22844  # First separate the path from the arguments. This will split at the first
22845  # space.
22846  complete="$WINAR"
22847  path="${complete%% *}"
22848  tmp="$complete EOL"
22849  arguments="${tmp#* }"
22850
22851  # Input might be given as Windows format, start by converting to
22852  # unix format.
22853  new_path="$path"
22854
22855  windows_path="$new_path"
22856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22857    unix_path=`$CYGPATH -u "$windows_path"`
22858    new_path="$unix_path"
22859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22861    new_path="$unix_path"
22862  fi
22863
22864
22865  # Now try to locate executable using which
22866  new_path=`$WHICH "$new_path" 2> /dev/null`
22867
22868  if test "x$new_path" = x; then
22869    # Oops. Which didn't find the executable.
22870    # The splitting of arguments from the executable at a space might have been incorrect,
22871    # since paths with space are more likely in Windows. Give it another try with the whole
22872    # argument.
22873    path="$complete"
22874    arguments="EOL"
22875    new_path="$path"
22876
22877  windows_path="$new_path"
22878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22879    unix_path=`$CYGPATH -u "$windows_path"`
22880    new_path="$unix_path"
22881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22883    new_path="$unix_path"
22884  fi
22885
22886
22887    new_path=`$WHICH "$new_path" 2> /dev/null`
22888
22889    if test "x$new_path" = x; then
22890      # It's still not found. Now this is an unrecoverable error.
22891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22892$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22893      has_space=`$ECHO "$complete" | $GREP " "`
22894      if test "x$has_space" != x; then
22895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22897      fi
22898      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22899    fi
22900  fi
22901
22902  # Now new_path has a complete unix path to the binary
22903  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22904    # Keep paths in /bin as-is, but remove trailing .exe if any
22905    new_path="${new_path/%.exe/}"
22906    # Do not save /bin paths to all_fixpath_prefixes!
22907  else
22908    # Not in mixed or Windows style, start by that.
22909    new_path=`cmd //c echo $new_path`
22910
22911  input_path="$new_path"
22912  # Check if we need to convert this using DOS-style short mode. If the path
22913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22914  # take no chances and rewrite it.
22915  # Note: m4 eats our [], so we need to use [ and ] instead.
22916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22917  if test "x$has_forbidden_chars" != x; then
22918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22920  fi
22921
22922    # Output is in $new_path
22923
22924  windows_path="$new_path"
22925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22926    unix_path=`$CYGPATH -u "$windows_path"`
22927    new_path="$unix_path"
22928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22930    new_path="$unix_path"
22931  fi
22932
22933    # remove trailing .exe if any
22934    new_path="${new_path/%.exe/}"
22935
22936    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22937    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22938  fi
22939
22940  else
22941    # We're on a posix platform. Hooray! :)
22942    # First separate the path from the arguments. This will split at the first
22943    # space.
22944    complete="$WINAR"
22945    path="${complete%% *}"
22946    tmp="$complete EOL"
22947    arguments="${tmp#* }"
22948
22949    # Cannot rely on the command "which" here since it doesn't always work.
22950    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22951    if test -z "$is_absolute_path"; then
22952      # Path to executable is not absolute. Find it.
22953      IFS_save="$IFS"
22954      IFS=:
22955      for p in $PATH; do
22956        if test -f "$p/$path" && test -x "$p/$path"; then
22957          new_path="$p/$path"
22958          break
22959        fi
22960      done
22961      IFS="$IFS_save"
22962    else
22963      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
22964$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
22965      new_path="$path"
22966    fi
22967
22968    if test "x$new_path" = x; then
22969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22970$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22971        has_space=`$ECHO "$complete" | $GREP " "`
22972        if test "x$has_space" != x; then
22973          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22974$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22975        fi
22976        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22977      fi
22978  fi
22979
22980      # Now join together the path and the arguments once again
22981      if test "x$arguments" != xEOL; then
22982        new_complete="$new_path ${arguments% *}"
22983      else
22984        new_complete="$new_path"
22985      fi
22986
22987  if test "x$complete" != "x$new_complete"; then
22988      WINAR="$new_complete"
22989      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22990$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22991    fi
22992
22993    AR="$WINAR"
22994    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22995
22996    # Extract the first word of "dumpbin", so it can be a program name with args.
22997set dummy dumpbin; ac_word=$2
22998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22999$as_echo_n "checking for $ac_word... " >&6; }
23000if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23001  $as_echo_n "(cached) " >&6
23002else
23003  if test -n "$DUMPBIN"; then
23004  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23005else
23006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23007for as_dir in $PATH
23008do
23009  IFS=$as_save_IFS
23010  test -z "$as_dir" && as_dir=.
23011    for ac_exec_ext in '' $ac_executable_extensions; do
23012  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23013    ac_cv_prog_DUMPBIN="dumpbin"
23014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23015    break 2
23016  fi
23017done
23018  done
23019IFS=$as_save_IFS
23020
23021fi
23022fi
23023DUMPBIN=$ac_cv_prog_DUMPBIN
23024if test -n "$DUMPBIN"; then
23025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23026$as_echo "$DUMPBIN" >&6; }
23027else
23028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23029$as_echo "no" >&6; }
23030fi
23031
23032
23033
23034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23035
23036  # First separate the path from the arguments. This will split at the first
23037  # space.
23038  complete="$DUMPBIN"
23039  path="${complete%% *}"
23040  tmp="$complete EOL"
23041  arguments="${tmp#* }"
23042
23043  # Input might be given as Windows format, start by converting to
23044  # unix format.
23045  new_path=`$CYGPATH -u "$path"`
23046
23047  # Now try to locate executable using which
23048  new_path=`$WHICH "$new_path" 2> /dev/null`
23049  # bat and cmd files are not always considered executable in cygwin causing which
23050  # to not find them
23051  if test "x$new_path" = x \
23052           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23053           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23054    new_path=`$CYGPATH -u "$path"`
23055  fi
23056  if test "x$new_path" = x; then
23057    # Oops. Which didn't find the executable.
23058    # The splitting of arguments from the executable at a space might have been incorrect,
23059    # since paths with space are more likely in Windows. Give it another try with the whole
23060    # argument.
23061    path="$complete"
23062    arguments="EOL"
23063    new_path=`$CYGPATH -u "$path"`
23064    new_path=`$WHICH "$new_path" 2> /dev/null`
23065    # bat and cmd files are not always considered executable in cygwin causing which
23066    # to not find them
23067    if test "x$new_path" = x \
23068             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23069             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23070      new_path=`$CYGPATH -u "$path"`
23071    fi
23072    if test "x$new_path" = x; then
23073      # It's still not found. Now this is an unrecoverable error.
23074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23075$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23076      has_space=`$ECHO "$complete" | $GREP " "`
23077      if test "x$has_space" != x; then
23078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23080      fi
23081      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23082    fi
23083  fi
23084
23085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23088  # "foo.exe" is OK but "foo" is an error.
23089  #
23090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23091  # It is also a way to make sure we got the proper file name for the real test later on.
23092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23093  if test "x$test_shortpath" = x; then
23094    # Short path failed, file does not exist as specified.
23095    # Try adding .exe or .cmd
23096    if test -f "${new_path}.exe"; then
23097       input_to_shortpath="${new_path}.exe"
23098    elif test -f "${new_path}.cmd"; then
23099       input_to_shortpath="${new_path}.cmd"
23100    else
23101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23102$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23103      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23104$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23105      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23106    fi
23107  else
23108    input_to_shortpath="$new_path"
23109  fi
23110
23111  # Call helper function which possibly converts this using DOS-style short mode.
23112  # If so, the updated path is stored in $new_path.
23113  new_path="$input_to_shortpath"
23114
23115  input_path="$input_to_shortpath"
23116  # Check if we need to convert this using DOS-style short mode. If the path
23117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23118  # take no chances and rewrite it.
23119  # Note: m4 eats our [], so we need to use [ and ] instead.
23120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23121  if test "x$has_forbidden_chars" != x; then
23122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23126      # Going to short mode and back again did indeed matter. Since short mode is
23127      # case insensitive, let's make it lowercase to improve readability.
23128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23129      # Now convert it back to Unix-stile (cygpath)
23130      input_path=`$CYGPATH -u "$shortmode_path"`
23131      new_path="$input_path"
23132    fi
23133  fi
23134
23135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23136  if test "x$test_cygdrive_prefix" = x; then
23137    # As a simple fix, exclude /usr/bin since it's not a real path.
23138    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23140      # a path prefixed by /cygdrive for fixpath to work.
23141      new_path="$CYGWIN_ROOT_PATH$input_path"
23142    fi
23143  fi
23144
23145  # remove trailing .exe if any
23146  new_path="${new_path/%.exe/}"
23147
23148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23149
23150  # First separate the path from the arguments. This will split at the first
23151  # space.
23152  complete="$DUMPBIN"
23153  path="${complete%% *}"
23154  tmp="$complete EOL"
23155  arguments="${tmp#* }"
23156
23157  # Input might be given as Windows format, start by converting to
23158  # unix format.
23159  new_path="$path"
23160
23161  windows_path="$new_path"
23162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23163    unix_path=`$CYGPATH -u "$windows_path"`
23164    new_path="$unix_path"
23165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23167    new_path="$unix_path"
23168  fi
23169
23170
23171  # Now try to locate executable using which
23172  new_path=`$WHICH "$new_path" 2> /dev/null`
23173
23174  if test "x$new_path" = x; then
23175    # Oops. Which didn't find the executable.
23176    # The splitting of arguments from the executable at a space might have been incorrect,
23177    # since paths with space are more likely in Windows. Give it another try with the whole
23178    # argument.
23179    path="$complete"
23180    arguments="EOL"
23181    new_path="$path"
23182
23183  windows_path="$new_path"
23184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23185    unix_path=`$CYGPATH -u "$windows_path"`
23186    new_path="$unix_path"
23187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23189    new_path="$unix_path"
23190  fi
23191
23192
23193    new_path=`$WHICH "$new_path" 2> /dev/null`
23194
23195    if test "x$new_path" = x; then
23196      # It's still not found. Now this is an unrecoverable error.
23197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23198$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23199      has_space=`$ECHO "$complete" | $GREP " "`
23200      if test "x$has_space" != x; then
23201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23203      fi
23204      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23205    fi
23206  fi
23207
23208  # Now new_path has a complete unix path to the binary
23209  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23210    # Keep paths in /bin as-is, but remove trailing .exe if any
23211    new_path="${new_path/%.exe/}"
23212    # Do not save /bin paths to all_fixpath_prefixes!
23213  else
23214    # Not in mixed or Windows style, start by that.
23215    new_path=`cmd //c echo $new_path`
23216
23217  input_path="$new_path"
23218  # Check if we need to convert this using DOS-style short mode. If the path
23219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23220  # take no chances and rewrite it.
23221  # Note: m4 eats our [], so we need to use [ and ] instead.
23222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23223  if test "x$has_forbidden_chars" != x; then
23224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23226  fi
23227
23228    # Output is in $new_path
23229
23230  windows_path="$new_path"
23231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23232    unix_path=`$CYGPATH -u "$windows_path"`
23233    new_path="$unix_path"
23234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23236    new_path="$unix_path"
23237  fi
23238
23239    # remove trailing .exe if any
23240    new_path="${new_path/%.exe/}"
23241
23242    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23243    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23244  fi
23245
23246  else
23247    # We're on a posix platform. Hooray! :)
23248    # First separate the path from the arguments. This will split at the first
23249    # space.
23250    complete="$DUMPBIN"
23251    path="${complete%% *}"
23252    tmp="$complete EOL"
23253    arguments="${tmp#* }"
23254
23255    # Cannot rely on the command "which" here since it doesn't always work.
23256    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23257    if test -z "$is_absolute_path"; then
23258      # Path to executable is not absolute. Find it.
23259      IFS_save="$IFS"
23260      IFS=:
23261      for p in $PATH; do
23262        if test -f "$p/$path" && test -x "$p/$path"; then
23263          new_path="$p/$path"
23264          break
23265        fi
23266      done
23267      IFS="$IFS_save"
23268    else
23269      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23270$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23271      new_path="$path"
23272    fi
23273
23274    if test "x$new_path" = x; then
23275        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23276$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23277        has_space=`$ECHO "$complete" | $GREP " "`
23278        if test "x$has_space" != x; then
23279          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23280$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23281        fi
23282        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23283      fi
23284  fi
23285
23286      # Now join together the path and the arguments once again
23287      if test "x$arguments" != xEOL; then
23288        new_complete="$new_path ${arguments% *}"
23289      else
23290        new_complete="$new_path"
23291      fi
23292
23293  if test "x$complete" != "x$new_complete"; then
23294      DUMPBIN="$new_complete"
23295      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23296$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23297    fi
23298
23299
23300    COMPILER_TYPE=CL
23301    CCXXFLAGS="$CCXXFLAGS -nologo"
23302
23303fi
23304
23305
23306
23307ac_ext=c
23308ac_cpp='$CPP $CPPFLAGS'
23309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23311ac_compiler_gnu=$ac_cv_c_compiler_gnu
23312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23313$as_echo_n "checking how to run the C preprocessor... " >&6; }
23314# On Suns, sometimes $CPP names a directory.
23315if test -n "$CPP" && test -d "$CPP"; then
23316  CPP=
23317fi
23318if test -z "$CPP"; then
23319  if test "${ac_cv_prog_CPP+set}" = set; then :
23320  $as_echo_n "(cached) " >&6
23321else
23322      # Double quotes because CPP needs to be expanded
23323    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23324    do
23325      ac_preproc_ok=false
23326for ac_c_preproc_warn_flag in '' yes
23327do
23328  # Use a header file that comes with gcc, so configuring glibc
23329  # with a fresh cross-compiler works.
23330  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23331  # <limits.h> exists even on freestanding compilers.
23332  # On the NeXT, cc -E runs the code through the compiler's parser,
23333  # not just through cpp. "Syntax error" is here to catch this case.
23334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23335/* end confdefs.h.  */
23336#ifdef __STDC__
23337# include <limits.h>
23338#else
23339# include <assert.h>
23340#endif
23341		     Syntax error
23342_ACEOF
23343if ac_fn_c_try_cpp "$LINENO"; then :
23344
23345else
23346  # Broken: fails on valid input.
23347continue
23348fi
23349rm -f conftest.err conftest.i conftest.$ac_ext
23350
23351  # OK, works on sane cases.  Now check whether nonexistent headers
23352  # can be detected and how.
23353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23354/* end confdefs.h.  */
23355#include <ac_nonexistent.h>
23356_ACEOF
23357if ac_fn_c_try_cpp "$LINENO"; then :
23358  # Broken: success on invalid input.
23359continue
23360else
23361  # Passes both tests.
23362ac_preproc_ok=:
23363break
23364fi
23365rm -f conftest.err conftest.i conftest.$ac_ext
23366
23367done
23368# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23369rm -f conftest.i conftest.err conftest.$ac_ext
23370if $ac_preproc_ok; then :
23371  break
23372fi
23373
23374    done
23375    ac_cv_prog_CPP=$CPP
23376
23377fi
23378  CPP=$ac_cv_prog_CPP
23379else
23380  ac_cv_prog_CPP=$CPP
23381fi
23382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23383$as_echo "$CPP" >&6; }
23384ac_preproc_ok=false
23385for ac_c_preproc_warn_flag in '' yes
23386do
23387  # Use a header file that comes with gcc, so configuring glibc
23388  # with a fresh cross-compiler works.
23389  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23390  # <limits.h> exists even on freestanding compilers.
23391  # On the NeXT, cc -E runs the code through the compiler's parser,
23392  # not just through cpp. "Syntax error" is here to catch this case.
23393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23394/* end confdefs.h.  */
23395#ifdef __STDC__
23396# include <limits.h>
23397#else
23398# include <assert.h>
23399#endif
23400		     Syntax error
23401_ACEOF
23402if ac_fn_c_try_cpp "$LINENO"; then :
23403
23404else
23405  # Broken: fails on valid input.
23406continue
23407fi
23408rm -f conftest.err conftest.i conftest.$ac_ext
23409
23410  # OK, works on sane cases.  Now check whether nonexistent headers
23411  # can be detected and how.
23412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23413/* end confdefs.h.  */
23414#include <ac_nonexistent.h>
23415_ACEOF
23416if ac_fn_c_try_cpp "$LINENO"; then :
23417  # Broken: success on invalid input.
23418continue
23419else
23420  # Passes both tests.
23421ac_preproc_ok=:
23422break
23423fi
23424rm -f conftest.err conftest.i conftest.$ac_ext
23425
23426done
23427# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23428rm -f conftest.i conftest.err conftest.$ac_ext
23429if $ac_preproc_ok; then :
23430
23431else
23432  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23434as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23435See \`config.log' for more details" "$LINENO" 5 ; }
23436fi
23437
23438ac_ext=cpp
23439ac_cpp='$CXXCPP $CPPFLAGS'
23440ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23441ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23442ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23443
23444
23445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23446
23447  # First separate the path from the arguments. This will split at the first
23448  # space.
23449  complete="$CPP"
23450  path="${complete%% *}"
23451  tmp="$complete EOL"
23452  arguments="${tmp#* }"
23453
23454  # Input might be given as Windows format, start by converting to
23455  # unix format.
23456  new_path=`$CYGPATH -u "$path"`
23457
23458  # Now try to locate executable using which
23459  new_path=`$WHICH "$new_path" 2> /dev/null`
23460  # bat and cmd files are not always considered executable in cygwin causing which
23461  # to not find them
23462  if test "x$new_path" = x \
23463           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23464           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23465    new_path=`$CYGPATH -u "$path"`
23466  fi
23467  if test "x$new_path" = x; then
23468    # Oops. Which didn't find the executable.
23469    # The splitting of arguments from the executable at a space might have been incorrect,
23470    # since paths with space are more likely in Windows. Give it another try with the whole
23471    # argument.
23472    path="$complete"
23473    arguments="EOL"
23474    new_path=`$CYGPATH -u "$path"`
23475    new_path=`$WHICH "$new_path" 2> /dev/null`
23476    # bat and cmd files are not always considered executable in cygwin causing which
23477    # to not find them
23478    if test "x$new_path" = x \
23479             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23480             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23481      new_path=`$CYGPATH -u "$path"`
23482    fi
23483    if test "x$new_path" = x; then
23484      # It's still not found. Now this is an unrecoverable error.
23485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23486$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23487      has_space=`$ECHO "$complete" | $GREP " "`
23488      if test "x$has_space" != x; then
23489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23491      fi
23492      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23493    fi
23494  fi
23495
23496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23499  # "foo.exe" is OK but "foo" is an error.
23500  #
23501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23502  # It is also a way to make sure we got the proper file name for the real test later on.
23503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23504  if test "x$test_shortpath" = x; then
23505    # Short path failed, file does not exist as specified.
23506    # Try adding .exe or .cmd
23507    if test -f "${new_path}.exe"; then
23508       input_to_shortpath="${new_path}.exe"
23509    elif test -f "${new_path}.cmd"; then
23510       input_to_shortpath="${new_path}.cmd"
23511    else
23512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23513$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23514      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23515$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23516      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23517    fi
23518  else
23519    input_to_shortpath="$new_path"
23520  fi
23521
23522  # Call helper function which possibly converts this using DOS-style short mode.
23523  # If so, the updated path is stored in $new_path.
23524  new_path="$input_to_shortpath"
23525
23526  input_path="$input_to_shortpath"
23527  # Check if we need to convert this using DOS-style short mode. If the path
23528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23529  # take no chances and rewrite it.
23530  # Note: m4 eats our [], so we need to use [ and ] instead.
23531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23532  if test "x$has_forbidden_chars" != x; then
23533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23537      # Going to short mode and back again did indeed matter. Since short mode is
23538      # case insensitive, let's make it lowercase to improve readability.
23539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23540      # Now convert it back to Unix-stile (cygpath)
23541      input_path=`$CYGPATH -u "$shortmode_path"`
23542      new_path="$input_path"
23543    fi
23544  fi
23545
23546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23547  if test "x$test_cygdrive_prefix" = x; then
23548    # As a simple fix, exclude /usr/bin since it's not a real path.
23549    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23551      # a path prefixed by /cygdrive for fixpath to work.
23552      new_path="$CYGWIN_ROOT_PATH$input_path"
23553    fi
23554  fi
23555
23556  # remove trailing .exe if any
23557  new_path="${new_path/%.exe/}"
23558
23559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23560
23561  # First separate the path from the arguments. This will split at the first
23562  # space.
23563  complete="$CPP"
23564  path="${complete%% *}"
23565  tmp="$complete EOL"
23566  arguments="${tmp#* }"
23567
23568  # Input might be given as Windows format, start by converting to
23569  # unix format.
23570  new_path="$path"
23571
23572  windows_path="$new_path"
23573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23574    unix_path=`$CYGPATH -u "$windows_path"`
23575    new_path="$unix_path"
23576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23578    new_path="$unix_path"
23579  fi
23580
23581
23582  # Now try to locate executable using which
23583  new_path=`$WHICH "$new_path" 2> /dev/null`
23584
23585  if test "x$new_path" = x; then
23586    # Oops. Which didn't find the executable.
23587    # The splitting of arguments from the executable at a space might have been incorrect,
23588    # since paths with space are more likely in Windows. Give it another try with the whole
23589    # argument.
23590    path="$complete"
23591    arguments="EOL"
23592    new_path="$path"
23593
23594  windows_path="$new_path"
23595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23596    unix_path=`$CYGPATH -u "$windows_path"`
23597    new_path="$unix_path"
23598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23600    new_path="$unix_path"
23601  fi
23602
23603
23604    new_path=`$WHICH "$new_path" 2> /dev/null`
23605
23606    if test "x$new_path" = x; then
23607      # It's still not found. Now this is an unrecoverable error.
23608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23609$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23610      has_space=`$ECHO "$complete" | $GREP " "`
23611      if test "x$has_space" != x; then
23612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23614      fi
23615      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23616    fi
23617  fi
23618
23619  # Now new_path has a complete unix path to the binary
23620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23621    # Keep paths in /bin as-is, but remove trailing .exe if any
23622    new_path="${new_path/%.exe/}"
23623    # Do not save /bin paths to all_fixpath_prefixes!
23624  else
23625    # Not in mixed or Windows style, start by that.
23626    new_path=`cmd //c echo $new_path`
23627
23628  input_path="$new_path"
23629  # Check if we need to convert this using DOS-style short mode. If the path
23630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23631  # take no chances and rewrite it.
23632  # Note: m4 eats our [], so we need to use [ and ] instead.
23633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23634  if test "x$has_forbidden_chars" != x; then
23635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23637  fi
23638
23639    # Output is in $new_path
23640
23641  windows_path="$new_path"
23642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23643    unix_path=`$CYGPATH -u "$windows_path"`
23644    new_path="$unix_path"
23645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23647    new_path="$unix_path"
23648  fi
23649
23650    # remove trailing .exe if any
23651    new_path="${new_path/%.exe/}"
23652
23653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23655  fi
23656
23657  else
23658    # We're on a posix platform. Hooray! :)
23659    # First separate the path from the arguments. This will split at the first
23660    # space.
23661    complete="$CPP"
23662    path="${complete%% *}"
23663    tmp="$complete EOL"
23664    arguments="${tmp#* }"
23665
23666    # Cannot rely on the command "which" here since it doesn't always work.
23667    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23668    if test -z "$is_absolute_path"; then
23669      # Path to executable is not absolute. Find it.
23670      IFS_save="$IFS"
23671      IFS=:
23672      for p in $PATH; do
23673        if test -f "$p/$path" && test -x "$p/$path"; then
23674          new_path="$p/$path"
23675          break
23676        fi
23677      done
23678      IFS="$IFS_save"
23679    else
23680      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23681$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23682      new_path="$path"
23683    fi
23684
23685    if test "x$new_path" = x; then
23686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23687$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23688        has_space=`$ECHO "$complete" | $GREP " "`
23689        if test "x$has_space" != x; then
23690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23692        fi
23693        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23694      fi
23695  fi
23696
23697      # Now join together the path and the arguments once again
23698      if test "x$arguments" != xEOL; then
23699        new_complete="$new_path ${arguments% *}"
23700      else
23701        new_complete="$new_path"
23702      fi
23703
23704  if test "x$complete" != "x$new_complete"; then
23705      CPP="$new_complete"
23706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23707$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23708    fi
23709
23710
23711ac_ext=cpp
23712ac_cpp='$CXXCPP $CPPFLAGS'
23713ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23714ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23715ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23717$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23718if test -z "$CXXCPP"; then
23719  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23720  $as_echo_n "(cached) " >&6
23721else
23722      # Double quotes because CXXCPP needs to be expanded
23723    for CXXCPP in "$CXX -E" "/lib/cpp"
23724    do
23725      ac_preproc_ok=false
23726for ac_cxx_preproc_warn_flag in '' yes
23727do
23728  # Use a header file that comes with gcc, so configuring glibc
23729  # with a fresh cross-compiler works.
23730  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23731  # <limits.h> exists even on freestanding compilers.
23732  # On the NeXT, cc -E runs the code through the compiler's parser,
23733  # not just through cpp. "Syntax error" is here to catch this case.
23734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23735/* end confdefs.h.  */
23736#ifdef __STDC__
23737# include <limits.h>
23738#else
23739# include <assert.h>
23740#endif
23741		     Syntax error
23742_ACEOF
23743if ac_fn_cxx_try_cpp "$LINENO"; then :
23744
23745else
23746  # Broken: fails on valid input.
23747continue
23748fi
23749rm -f conftest.err conftest.i conftest.$ac_ext
23750
23751  # OK, works on sane cases.  Now check whether nonexistent headers
23752  # can be detected and how.
23753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23754/* end confdefs.h.  */
23755#include <ac_nonexistent.h>
23756_ACEOF
23757if ac_fn_cxx_try_cpp "$LINENO"; then :
23758  # Broken: success on invalid input.
23759continue
23760else
23761  # Passes both tests.
23762ac_preproc_ok=:
23763break
23764fi
23765rm -f conftest.err conftest.i conftest.$ac_ext
23766
23767done
23768# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23769rm -f conftest.i conftest.err conftest.$ac_ext
23770if $ac_preproc_ok; then :
23771  break
23772fi
23773
23774    done
23775    ac_cv_prog_CXXCPP=$CXXCPP
23776
23777fi
23778  CXXCPP=$ac_cv_prog_CXXCPP
23779else
23780  ac_cv_prog_CXXCPP=$CXXCPP
23781fi
23782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23783$as_echo "$CXXCPP" >&6; }
23784ac_preproc_ok=false
23785for ac_cxx_preproc_warn_flag in '' yes
23786do
23787  # Use a header file that comes with gcc, so configuring glibc
23788  # with a fresh cross-compiler works.
23789  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23790  # <limits.h> exists even on freestanding compilers.
23791  # On the NeXT, cc -E runs the code through the compiler's parser,
23792  # not just through cpp. "Syntax error" is here to catch this case.
23793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23794/* end confdefs.h.  */
23795#ifdef __STDC__
23796# include <limits.h>
23797#else
23798# include <assert.h>
23799#endif
23800		     Syntax error
23801_ACEOF
23802if ac_fn_cxx_try_cpp "$LINENO"; then :
23803
23804else
23805  # Broken: fails on valid input.
23806continue
23807fi
23808rm -f conftest.err conftest.i conftest.$ac_ext
23809
23810  # OK, works on sane cases.  Now check whether nonexistent headers
23811  # can be detected and how.
23812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23813/* end confdefs.h.  */
23814#include <ac_nonexistent.h>
23815_ACEOF
23816if ac_fn_cxx_try_cpp "$LINENO"; then :
23817  # Broken: success on invalid input.
23818continue
23819else
23820  # Passes both tests.
23821ac_preproc_ok=:
23822break
23823fi
23824rm -f conftest.err conftest.i conftest.$ac_ext
23825
23826done
23827# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23828rm -f conftest.i conftest.err conftest.$ac_ext
23829if $ac_preproc_ok; then :
23830
23831else
23832  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23834as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23835See \`config.log' for more details" "$LINENO" 5 ; }
23836fi
23837
23838ac_ext=cpp
23839ac_cpp='$CXXCPP $CPPFLAGS'
23840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23843
23844
23845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23846
23847  # First separate the path from the arguments. This will split at the first
23848  # space.
23849  complete="$CXXCPP"
23850  path="${complete%% *}"
23851  tmp="$complete EOL"
23852  arguments="${tmp#* }"
23853
23854  # Input might be given as Windows format, start by converting to
23855  # unix format.
23856  new_path=`$CYGPATH -u "$path"`
23857
23858  # Now try to locate executable using which
23859  new_path=`$WHICH "$new_path" 2> /dev/null`
23860  # bat and cmd files are not always considered executable in cygwin causing which
23861  # to not find them
23862  if test "x$new_path" = x \
23863           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23864           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23865    new_path=`$CYGPATH -u "$path"`
23866  fi
23867  if test "x$new_path" = x; then
23868    # Oops. Which didn't find the executable.
23869    # The splitting of arguments from the executable at a space might have been incorrect,
23870    # since paths with space are more likely in Windows. Give it another try with the whole
23871    # argument.
23872    path="$complete"
23873    arguments="EOL"
23874    new_path=`$CYGPATH -u "$path"`
23875    new_path=`$WHICH "$new_path" 2> /dev/null`
23876    # bat and cmd files are not always considered executable in cygwin causing which
23877    # to not find them
23878    if test "x$new_path" = x \
23879             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23880             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23881      new_path=`$CYGPATH -u "$path"`
23882    fi
23883    if test "x$new_path" = x; then
23884      # It's still not found. Now this is an unrecoverable error.
23885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23886$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23887      has_space=`$ECHO "$complete" | $GREP " "`
23888      if test "x$has_space" != x; then
23889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23891      fi
23892      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23893    fi
23894  fi
23895
23896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23899  # "foo.exe" is OK but "foo" is an error.
23900  #
23901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23902  # It is also a way to make sure we got the proper file name for the real test later on.
23903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23904  if test "x$test_shortpath" = x; then
23905    # Short path failed, file does not exist as specified.
23906    # Try adding .exe or .cmd
23907    if test -f "${new_path}.exe"; then
23908       input_to_shortpath="${new_path}.exe"
23909    elif test -f "${new_path}.cmd"; then
23910       input_to_shortpath="${new_path}.cmd"
23911    else
23912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23913$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23914      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23915$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23916      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23917    fi
23918  else
23919    input_to_shortpath="$new_path"
23920  fi
23921
23922  # Call helper function which possibly converts this using DOS-style short mode.
23923  # If so, the updated path is stored in $new_path.
23924  new_path="$input_to_shortpath"
23925
23926  input_path="$input_to_shortpath"
23927  # Check if we need to convert this using DOS-style short mode. If the path
23928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23929  # take no chances and rewrite it.
23930  # Note: m4 eats our [], so we need to use [ and ] instead.
23931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23932  if test "x$has_forbidden_chars" != x; then
23933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23937      # Going to short mode and back again did indeed matter. Since short mode is
23938      # case insensitive, let's make it lowercase to improve readability.
23939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23940      # Now convert it back to Unix-stile (cygpath)
23941      input_path=`$CYGPATH -u "$shortmode_path"`
23942      new_path="$input_path"
23943    fi
23944  fi
23945
23946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23947  if test "x$test_cygdrive_prefix" = x; then
23948    # As a simple fix, exclude /usr/bin since it's not a real path.
23949    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23951      # a path prefixed by /cygdrive for fixpath to work.
23952      new_path="$CYGWIN_ROOT_PATH$input_path"
23953    fi
23954  fi
23955
23956  # remove trailing .exe if any
23957  new_path="${new_path/%.exe/}"
23958
23959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23960
23961  # First separate the path from the arguments. This will split at the first
23962  # space.
23963  complete="$CXXCPP"
23964  path="${complete%% *}"
23965  tmp="$complete EOL"
23966  arguments="${tmp#* }"
23967
23968  # Input might be given as Windows format, start by converting to
23969  # unix format.
23970  new_path="$path"
23971
23972  windows_path="$new_path"
23973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23974    unix_path=`$CYGPATH -u "$windows_path"`
23975    new_path="$unix_path"
23976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23978    new_path="$unix_path"
23979  fi
23980
23981
23982  # Now try to locate executable using which
23983  new_path=`$WHICH "$new_path" 2> /dev/null`
23984
23985  if test "x$new_path" = x; then
23986    # Oops. Which didn't find the executable.
23987    # The splitting of arguments from the executable at a space might have been incorrect,
23988    # since paths with space are more likely in Windows. Give it another try with the whole
23989    # argument.
23990    path="$complete"
23991    arguments="EOL"
23992    new_path="$path"
23993
23994  windows_path="$new_path"
23995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23996    unix_path=`$CYGPATH -u "$windows_path"`
23997    new_path="$unix_path"
23998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24000    new_path="$unix_path"
24001  fi
24002
24003
24004    new_path=`$WHICH "$new_path" 2> /dev/null`
24005
24006    if test "x$new_path" = x; then
24007      # It's still not found. Now this is an unrecoverable error.
24008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24009$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24010      has_space=`$ECHO "$complete" | $GREP " "`
24011      if test "x$has_space" != x; then
24012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24014      fi
24015      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24016    fi
24017  fi
24018
24019  # Now new_path has a complete unix path to the binary
24020  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24021    # Keep paths in /bin as-is, but remove trailing .exe if any
24022    new_path="${new_path/%.exe/}"
24023    # Do not save /bin paths to all_fixpath_prefixes!
24024  else
24025    # Not in mixed or Windows style, start by that.
24026    new_path=`cmd //c echo $new_path`
24027
24028  input_path="$new_path"
24029  # Check if we need to convert this using DOS-style short mode. If the path
24030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24031  # take no chances and rewrite it.
24032  # Note: m4 eats our [], so we need to use [ and ] instead.
24033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24034  if test "x$has_forbidden_chars" != x; then
24035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24037  fi
24038
24039    # Output is in $new_path
24040
24041  windows_path="$new_path"
24042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24043    unix_path=`$CYGPATH -u "$windows_path"`
24044    new_path="$unix_path"
24045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24047    new_path="$unix_path"
24048  fi
24049
24050    # remove trailing .exe if any
24051    new_path="${new_path/%.exe/}"
24052
24053    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24054    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24055  fi
24056
24057  else
24058    # We're on a posix platform. Hooray! :)
24059    # First separate the path from the arguments. This will split at the first
24060    # space.
24061    complete="$CXXCPP"
24062    path="${complete%% *}"
24063    tmp="$complete EOL"
24064    arguments="${tmp#* }"
24065
24066    # Cannot rely on the command "which" here since it doesn't always work.
24067    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24068    if test -z "$is_absolute_path"; then
24069      # Path to executable is not absolute. Find it.
24070      IFS_save="$IFS"
24071      IFS=:
24072      for p in $PATH; do
24073        if test -f "$p/$path" && test -x "$p/$path"; then
24074          new_path="$p/$path"
24075          break
24076        fi
24077      done
24078      IFS="$IFS_save"
24079    else
24080      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24081$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24082      new_path="$path"
24083    fi
24084
24085    if test "x$new_path" = x; then
24086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24087$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24088        has_space=`$ECHO "$complete" | $GREP " "`
24089        if test "x$has_space" != x; then
24090          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24091$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24092        fi
24093        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24094      fi
24095  fi
24096
24097      # Now join together the path and the arguments once again
24098      if test "x$arguments" != xEOL; then
24099        new_complete="$new_path ${arguments% *}"
24100      else
24101        new_complete="$new_path"
24102      fi
24103
24104  if test "x$complete" != "x$new_complete"; then
24105      CXXCPP="$new_complete"
24106      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24107$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24108    fi
24109
24110
24111if test "x$COMPILE_TYPE" != "xcross"; then
24112    # If we are not cross compiling, use the same compilers for
24113    # building the build platform executables. The cross-compilation
24114    # case needed to be done earlier, but this can only be done after
24115    # the native tools have been localized.
24116    BUILD_CC="$CC"
24117    BUILD_CXX="$CXX"
24118    BUILD_LD="$LD"
24119fi
24120
24121# for solaris we really need solaris tools, and not gnu equivalent
24122#   these seems to normally reside in /usr/ccs/bin so add that to path before
24123#   starting to probe
24124#
24125#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24126#         so that it can be overriden --with-tools-dir
24127if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24128    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24129fi
24130
24131# Find the right assembler.
24132if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24133    # Extract the first word of "as", so it can be a program name with args.
24134set dummy as; ac_word=$2
24135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24136$as_echo_n "checking for $ac_word... " >&6; }
24137if test "${ac_cv_path_AS+set}" = set; then :
24138  $as_echo_n "(cached) " >&6
24139else
24140  case $AS in
24141  [\\/]* | ?:[\\/]*)
24142  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24143  ;;
24144  *)
24145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24146for as_dir in $PATH
24147do
24148  IFS=$as_save_IFS
24149  test -z "$as_dir" && as_dir=.
24150    for ac_exec_ext in '' $ac_executable_extensions; do
24151  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24152    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24154    break 2
24155  fi
24156done
24157  done
24158IFS=$as_save_IFS
24159
24160  ;;
24161esac
24162fi
24163AS=$ac_cv_path_AS
24164if test -n "$AS"; then
24165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24166$as_echo "$AS" >&6; }
24167else
24168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24169$as_echo "no" >&6; }
24170fi
24171
24172
24173
24174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24175
24176  # First separate the path from the arguments. This will split at the first
24177  # space.
24178  complete="$AS"
24179  path="${complete%% *}"
24180  tmp="$complete EOL"
24181  arguments="${tmp#* }"
24182
24183  # Input might be given as Windows format, start by converting to
24184  # unix format.
24185  new_path=`$CYGPATH -u "$path"`
24186
24187  # Now try to locate executable using which
24188  new_path=`$WHICH "$new_path" 2> /dev/null`
24189  # bat and cmd files are not always considered executable in cygwin causing which
24190  # to not find them
24191  if test "x$new_path" = x \
24192           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24193           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24194    new_path=`$CYGPATH -u "$path"`
24195  fi
24196  if test "x$new_path" = x; then
24197    # Oops. Which didn't find the executable.
24198    # The splitting of arguments from the executable at a space might have been incorrect,
24199    # since paths with space are more likely in Windows. Give it another try with the whole
24200    # argument.
24201    path="$complete"
24202    arguments="EOL"
24203    new_path=`$CYGPATH -u "$path"`
24204    new_path=`$WHICH "$new_path" 2> /dev/null`
24205    # bat and cmd files are not always considered executable in cygwin causing which
24206    # to not find them
24207    if test "x$new_path" = x \
24208             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24209             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24210      new_path=`$CYGPATH -u "$path"`
24211    fi
24212    if test "x$new_path" = x; then
24213      # It's still not found. Now this is an unrecoverable error.
24214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24215$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24216      has_space=`$ECHO "$complete" | $GREP " "`
24217      if test "x$has_space" != x; then
24218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24220      fi
24221      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24222    fi
24223  fi
24224
24225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24228  # "foo.exe" is OK but "foo" is an error.
24229  #
24230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24231  # It is also a way to make sure we got the proper file name for the real test later on.
24232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24233  if test "x$test_shortpath" = x; then
24234    # Short path failed, file does not exist as specified.
24235    # Try adding .exe or .cmd
24236    if test -f "${new_path}.exe"; then
24237       input_to_shortpath="${new_path}.exe"
24238    elif test -f "${new_path}.cmd"; then
24239       input_to_shortpath="${new_path}.cmd"
24240    else
24241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24242$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24245      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24246    fi
24247  else
24248    input_to_shortpath="$new_path"
24249  fi
24250
24251  # Call helper function which possibly converts this using DOS-style short mode.
24252  # If so, the updated path is stored in $new_path.
24253  new_path="$input_to_shortpath"
24254
24255  input_path="$input_to_shortpath"
24256  # Check if we need to convert this using DOS-style short mode. If the path
24257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24258  # take no chances and rewrite it.
24259  # Note: m4 eats our [], so we need to use [ and ] instead.
24260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24261  if test "x$has_forbidden_chars" != x; then
24262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24266      # Going to short mode and back again did indeed matter. Since short mode is
24267      # case insensitive, let's make it lowercase to improve readability.
24268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24269      # Now convert it back to Unix-stile (cygpath)
24270      input_path=`$CYGPATH -u "$shortmode_path"`
24271      new_path="$input_path"
24272    fi
24273  fi
24274
24275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24276  if test "x$test_cygdrive_prefix" = x; then
24277    # As a simple fix, exclude /usr/bin since it's not a real path.
24278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24280      # a path prefixed by /cygdrive for fixpath to work.
24281      new_path="$CYGWIN_ROOT_PATH$input_path"
24282    fi
24283  fi
24284
24285  # remove trailing .exe if any
24286  new_path="${new_path/%.exe/}"
24287
24288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24289
24290  # First separate the path from the arguments. This will split at the first
24291  # space.
24292  complete="$AS"
24293  path="${complete%% *}"
24294  tmp="$complete EOL"
24295  arguments="${tmp#* }"
24296
24297  # Input might be given as Windows format, start by converting to
24298  # unix format.
24299  new_path="$path"
24300
24301  windows_path="$new_path"
24302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24303    unix_path=`$CYGPATH -u "$windows_path"`
24304    new_path="$unix_path"
24305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24307    new_path="$unix_path"
24308  fi
24309
24310
24311  # Now try to locate executable using which
24312  new_path=`$WHICH "$new_path" 2> /dev/null`
24313
24314  if test "x$new_path" = x; then
24315    # Oops. Which didn't find the executable.
24316    # The splitting of arguments from the executable at a space might have been incorrect,
24317    # since paths with space are more likely in Windows. Give it another try with the whole
24318    # argument.
24319    path="$complete"
24320    arguments="EOL"
24321    new_path="$path"
24322
24323  windows_path="$new_path"
24324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24325    unix_path=`$CYGPATH -u "$windows_path"`
24326    new_path="$unix_path"
24327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24329    new_path="$unix_path"
24330  fi
24331
24332
24333    new_path=`$WHICH "$new_path" 2> /dev/null`
24334
24335    if test "x$new_path" = x; then
24336      # It's still not found. Now this is an unrecoverable error.
24337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24338$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24339      has_space=`$ECHO "$complete" | $GREP " "`
24340      if test "x$has_space" != x; then
24341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24343      fi
24344      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24345    fi
24346  fi
24347
24348  # Now new_path has a complete unix path to the binary
24349  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24350    # Keep paths in /bin as-is, but remove trailing .exe if any
24351    new_path="${new_path/%.exe/}"
24352    # Do not save /bin paths to all_fixpath_prefixes!
24353  else
24354    # Not in mixed or Windows style, start by that.
24355    new_path=`cmd //c echo $new_path`
24356
24357  input_path="$new_path"
24358  # Check if we need to convert this using DOS-style short mode. If the path
24359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24360  # take no chances and rewrite it.
24361  # Note: m4 eats our [], so we need to use [ and ] instead.
24362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24363  if test "x$has_forbidden_chars" != x; then
24364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24366  fi
24367
24368    # Output is in $new_path
24369
24370  windows_path="$new_path"
24371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24372    unix_path=`$CYGPATH -u "$windows_path"`
24373    new_path="$unix_path"
24374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24376    new_path="$unix_path"
24377  fi
24378
24379    # remove trailing .exe if any
24380    new_path="${new_path/%.exe/}"
24381
24382    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24383    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24384  fi
24385
24386  else
24387    # We're on a posix platform. Hooray! :)
24388    # First separate the path from the arguments. This will split at the first
24389    # space.
24390    complete="$AS"
24391    path="${complete%% *}"
24392    tmp="$complete EOL"
24393    arguments="${tmp#* }"
24394
24395    # Cannot rely on the command "which" here since it doesn't always work.
24396    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24397    if test -z "$is_absolute_path"; then
24398      # Path to executable is not absolute. Find it.
24399      IFS_save="$IFS"
24400      IFS=:
24401      for p in $PATH; do
24402        if test -f "$p/$path" && test -x "$p/$path"; then
24403          new_path="$p/$path"
24404          break
24405        fi
24406      done
24407      IFS="$IFS_save"
24408    else
24409      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24410$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24411      new_path="$path"
24412    fi
24413
24414    if test "x$new_path" = x; then
24415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24416$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24417        has_space=`$ECHO "$complete" | $GREP " "`
24418        if test "x$has_space" != x; then
24419          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24420$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24421        fi
24422        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24423      fi
24424  fi
24425
24426      # Now join together the path and the arguments once again
24427      if test "x$arguments" != xEOL; then
24428        new_complete="$new_path ${arguments% *}"
24429      else
24430        new_complete="$new_path"
24431      fi
24432
24433  if test "x$complete" != "x$new_complete"; then
24434      AS="$new_complete"
24435      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24436$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24437    fi
24438
24439else
24440    AS="$CC -c"
24441fi
24442
24443
24444if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24445    for ac_prog in gnm nm
24446do
24447  # Extract the first word of "$ac_prog", so it can be a program name with args.
24448set dummy $ac_prog; ac_word=$2
24449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24450$as_echo_n "checking for $ac_word... " >&6; }
24451if test "${ac_cv_path_NM+set}" = set; then :
24452  $as_echo_n "(cached) " >&6
24453else
24454  case $NM in
24455  [\\/]* | ?:[\\/]*)
24456  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24457  ;;
24458  *)
24459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24460for as_dir in $PATH
24461do
24462  IFS=$as_save_IFS
24463  test -z "$as_dir" && as_dir=.
24464    for ac_exec_ext in '' $ac_executable_extensions; do
24465  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24466    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24468    break 2
24469  fi
24470done
24471  done
24472IFS=$as_save_IFS
24473
24474  ;;
24475esac
24476fi
24477NM=$ac_cv_path_NM
24478if test -n "$NM"; then
24479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24480$as_echo "$NM" >&6; }
24481else
24482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24483$as_echo "no" >&6; }
24484fi
24485
24486
24487  test -n "$NM" && break
24488done
24489
24490
24491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24492
24493  # First separate the path from the arguments. This will split at the first
24494  # space.
24495  complete="$NM"
24496  path="${complete%% *}"
24497  tmp="$complete EOL"
24498  arguments="${tmp#* }"
24499
24500  # Input might be given as Windows format, start by converting to
24501  # unix format.
24502  new_path=`$CYGPATH -u "$path"`
24503
24504  # Now try to locate executable using which
24505  new_path=`$WHICH "$new_path" 2> /dev/null`
24506  # bat and cmd files are not always considered executable in cygwin causing which
24507  # to not find them
24508  if test "x$new_path" = x \
24509           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24510           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24511    new_path=`$CYGPATH -u "$path"`
24512  fi
24513  if test "x$new_path" = x; then
24514    # Oops. Which didn't find the executable.
24515    # The splitting of arguments from the executable at a space might have been incorrect,
24516    # since paths with space are more likely in Windows. Give it another try with the whole
24517    # argument.
24518    path="$complete"
24519    arguments="EOL"
24520    new_path=`$CYGPATH -u "$path"`
24521    new_path=`$WHICH "$new_path" 2> /dev/null`
24522    # bat and cmd files are not always considered executable in cygwin causing which
24523    # to not find them
24524    if test "x$new_path" = x \
24525             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24526             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24527      new_path=`$CYGPATH -u "$path"`
24528    fi
24529    if test "x$new_path" = x; then
24530      # It's still not found. Now this is an unrecoverable error.
24531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24532$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24533      has_space=`$ECHO "$complete" | $GREP " "`
24534      if test "x$has_space" != x; then
24535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24537      fi
24538      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24539    fi
24540  fi
24541
24542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24545  # "foo.exe" is OK but "foo" is an error.
24546  #
24547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24548  # It is also a way to make sure we got the proper file name for the real test later on.
24549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24550  if test "x$test_shortpath" = x; then
24551    # Short path failed, file does not exist as specified.
24552    # Try adding .exe or .cmd
24553    if test -f "${new_path}.exe"; then
24554       input_to_shortpath="${new_path}.exe"
24555    elif test -f "${new_path}.cmd"; then
24556       input_to_shortpath="${new_path}.cmd"
24557    else
24558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24559$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24562      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24563    fi
24564  else
24565    input_to_shortpath="$new_path"
24566  fi
24567
24568  # Call helper function which possibly converts this using DOS-style short mode.
24569  # If so, the updated path is stored in $new_path.
24570  new_path="$input_to_shortpath"
24571
24572  input_path="$input_to_shortpath"
24573  # Check if we need to convert this using DOS-style short mode. If the path
24574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24575  # take no chances and rewrite it.
24576  # Note: m4 eats our [], so we need to use [ and ] instead.
24577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24578  if test "x$has_forbidden_chars" != x; then
24579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24583      # Going to short mode and back again did indeed matter. Since short mode is
24584      # case insensitive, let's make it lowercase to improve readability.
24585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24586      # Now convert it back to Unix-stile (cygpath)
24587      input_path=`$CYGPATH -u "$shortmode_path"`
24588      new_path="$input_path"
24589    fi
24590  fi
24591
24592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24593  if test "x$test_cygdrive_prefix" = x; then
24594    # As a simple fix, exclude /usr/bin since it's not a real path.
24595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24597      # a path prefixed by /cygdrive for fixpath to work.
24598      new_path="$CYGWIN_ROOT_PATH$input_path"
24599    fi
24600  fi
24601
24602  # remove trailing .exe if any
24603  new_path="${new_path/%.exe/}"
24604
24605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24606
24607  # First separate the path from the arguments. This will split at the first
24608  # space.
24609  complete="$NM"
24610  path="${complete%% *}"
24611  tmp="$complete EOL"
24612  arguments="${tmp#* }"
24613
24614  # Input might be given as Windows format, start by converting to
24615  # unix format.
24616  new_path="$path"
24617
24618  windows_path="$new_path"
24619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24620    unix_path=`$CYGPATH -u "$windows_path"`
24621    new_path="$unix_path"
24622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24624    new_path="$unix_path"
24625  fi
24626
24627
24628  # Now try to locate executable using which
24629  new_path=`$WHICH "$new_path" 2> /dev/null`
24630
24631  if test "x$new_path" = x; then
24632    # Oops. Which didn't find the executable.
24633    # The splitting of arguments from the executable at a space might have been incorrect,
24634    # since paths with space are more likely in Windows. Give it another try with the whole
24635    # argument.
24636    path="$complete"
24637    arguments="EOL"
24638    new_path="$path"
24639
24640  windows_path="$new_path"
24641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24642    unix_path=`$CYGPATH -u "$windows_path"`
24643    new_path="$unix_path"
24644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24646    new_path="$unix_path"
24647  fi
24648
24649
24650    new_path=`$WHICH "$new_path" 2> /dev/null`
24651
24652    if test "x$new_path" = x; then
24653      # It's still not found. Now this is an unrecoverable error.
24654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24655$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24656      has_space=`$ECHO "$complete" | $GREP " "`
24657      if test "x$has_space" != x; then
24658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24660      fi
24661      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24662    fi
24663  fi
24664
24665  # Now new_path has a complete unix path to the binary
24666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24667    # Keep paths in /bin as-is, but remove trailing .exe if any
24668    new_path="${new_path/%.exe/}"
24669    # Do not save /bin paths to all_fixpath_prefixes!
24670  else
24671    # Not in mixed or Windows style, start by that.
24672    new_path=`cmd //c echo $new_path`
24673
24674  input_path="$new_path"
24675  # Check if we need to convert this using DOS-style short mode. If the path
24676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24677  # take no chances and rewrite it.
24678  # Note: m4 eats our [], so we need to use [ and ] instead.
24679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24680  if test "x$has_forbidden_chars" != x; then
24681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24683  fi
24684
24685    # Output is in $new_path
24686
24687  windows_path="$new_path"
24688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24689    unix_path=`$CYGPATH -u "$windows_path"`
24690    new_path="$unix_path"
24691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24693    new_path="$unix_path"
24694  fi
24695
24696    # remove trailing .exe if any
24697    new_path="${new_path/%.exe/}"
24698
24699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24701  fi
24702
24703  else
24704    # We're on a posix platform. Hooray! :)
24705    # First separate the path from the arguments. This will split at the first
24706    # space.
24707    complete="$NM"
24708    path="${complete%% *}"
24709    tmp="$complete EOL"
24710    arguments="${tmp#* }"
24711
24712    # Cannot rely on the command "which" here since it doesn't always work.
24713    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24714    if test -z "$is_absolute_path"; then
24715      # Path to executable is not absolute. Find it.
24716      IFS_save="$IFS"
24717      IFS=:
24718      for p in $PATH; do
24719        if test -f "$p/$path" && test -x "$p/$path"; then
24720          new_path="$p/$path"
24721          break
24722        fi
24723      done
24724      IFS="$IFS_save"
24725    else
24726      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24727$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24728      new_path="$path"
24729    fi
24730
24731    if test "x$new_path" = x; then
24732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24733$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24734        has_space=`$ECHO "$complete" | $GREP " "`
24735        if test "x$has_space" != x; then
24736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24738        fi
24739        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24740      fi
24741  fi
24742
24743      # Now join together the path and the arguments once again
24744      if test "x$arguments" != xEOL; then
24745        new_complete="$new_path ${arguments% *}"
24746      else
24747        new_complete="$new_path"
24748      fi
24749
24750  if test "x$complete" != "x$new_complete"; then
24751      NM="$new_complete"
24752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24753$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24754    fi
24755
24756    # Extract the first word of "strip", so it can be a program name with args.
24757set dummy strip; ac_word=$2
24758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24759$as_echo_n "checking for $ac_word... " >&6; }
24760if test "${ac_cv_path_STRIP+set}" = set; then :
24761  $as_echo_n "(cached) " >&6
24762else
24763  case $STRIP in
24764  [\\/]* | ?:[\\/]*)
24765  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24766  ;;
24767  *)
24768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24769for as_dir in $PATH
24770do
24771  IFS=$as_save_IFS
24772  test -z "$as_dir" && as_dir=.
24773    for ac_exec_ext in '' $ac_executable_extensions; do
24774  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24775    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24777    break 2
24778  fi
24779done
24780  done
24781IFS=$as_save_IFS
24782
24783  ;;
24784esac
24785fi
24786STRIP=$ac_cv_path_STRIP
24787if test -n "$STRIP"; then
24788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24789$as_echo "$STRIP" >&6; }
24790else
24791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24792$as_echo "no" >&6; }
24793fi
24794
24795
24796
24797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24798
24799  # First separate the path from the arguments. This will split at the first
24800  # space.
24801  complete="$STRIP"
24802  path="${complete%% *}"
24803  tmp="$complete EOL"
24804  arguments="${tmp#* }"
24805
24806  # Input might be given as Windows format, start by converting to
24807  # unix format.
24808  new_path=`$CYGPATH -u "$path"`
24809
24810  # Now try to locate executable using which
24811  new_path=`$WHICH "$new_path" 2> /dev/null`
24812  # bat and cmd files are not always considered executable in cygwin causing which
24813  # to not find them
24814  if test "x$new_path" = x \
24815           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24816           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24817    new_path=`$CYGPATH -u "$path"`
24818  fi
24819  if test "x$new_path" = x; then
24820    # Oops. Which didn't find the executable.
24821    # The splitting of arguments from the executable at a space might have been incorrect,
24822    # since paths with space are more likely in Windows. Give it another try with the whole
24823    # argument.
24824    path="$complete"
24825    arguments="EOL"
24826    new_path=`$CYGPATH -u "$path"`
24827    new_path=`$WHICH "$new_path" 2> /dev/null`
24828    # bat and cmd files are not always considered executable in cygwin causing which
24829    # to not find them
24830    if test "x$new_path" = x \
24831             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24832             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24833      new_path=`$CYGPATH -u "$path"`
24834    fi
24835    if test "x$new_path" = x; then
24836      # It's still not found. Now this is an unrecoverable error.
24837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24838$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24839      has_space=`$ECHO "$complete" | $GREP " "`
24840      if test "x$has_space" != x; then
24841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24843      fi
24844      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24845    fi
24846  fi
24847
24848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24851  # "foo.exe" is OK but "foo" is an error.
24852  #
24853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24854  # It is also a way to make sure we got the proper file name for the real test later on.
24855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24856  if test "x$test_shortpath" = x; then
24857    # Short path failed, file does not exist as specified.
24858    # Try adding .exe or .cmd
24859    if test -f "${new_path}.exe"; then
24860       input_to_shortpath="${new_path}.exe"
24861    elif test -f "${new_path}.cmd"; then
24862       input_to_shortpath="${new_path}.cmd"
24863    else
24864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24865$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24868      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24869    fi
24870  else
24871    input_to_shortpath="$new_path"
24872  fi
24873
24874  # Call helper function which possibly converts this using DOS-style short mode.
24875  # If so, the updated path is stored in $new_path.
24876  new_path="$input_to_shortpath"
24877
24878  input_path="$input_to_shortpath"
24879  # Check if we need to convert this using DOS-style short mode. If the path
24880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24881  # take no chances and rewrite it.
24882  # Note: m4 eats our [], so we need to use [ and ] instead.
24883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24884  if test "x$has_forbidden_chars" != x; then
24885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24889      # Going to short mode and back again did indeed matter. Since short mode is
24890      # case insensitive, let's make it lowercase to improve readability.
24891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24892      # Now convert it back to Unix-stile (cygpath)
24893      input_path=`$CYGPATH -u "$shortmode_path"`
24894      new_path="$input_path"
24895    fi
24896  fi
24897
24898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24899  if test "x$test_cygdrive_prefix" = x; then
24900    # As a simple fix, exclude /usr/bin since it's not a real path.
24901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24903      # a path prefixed by /cygdrive for fixpath to work.
24904      new_path="$CYGWIN_ROOT_PATH$input_path"
24905    fi
24906  fi
24907
24908  # remove trailing .exe if any
24909  new_path="${new_path/%.exe/}"
24910
24911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24912
24913  # First separate the path from the arguments. This will split at the first
24914  # space.
24915  complete="$STRIP"
24916  path="${complete%% *}"
24917  tmp="$complete EOL"
24918  arguments="${tmp#* }"
24919
24920  # Input might be given as Windows format, start by converting to
24921  # unix format.
24922  new_path="$path"
24923
24924  windows_path="$new_path"
24925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24926    unix_path=`$CYGPATH -u "$windows_path"`
24927    new_path="$unix_path"
24928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24930    new_path="$unix_path"
24931  fi
24932
24933
24934  # Now try to locate executable using which
24935  new_path=`$WHICH "$new_path" 2> /dev/null`
24936
24937  if test "x$new_path" = x; then
24938    # Oops. Which didn't find the executable.
24939    # The splitting of arguments from the executable at a space might have been incorrect,
24940    # since paths with space are more likely in Windows. Give it another try with the whole
24941    # argument.
24942    path="$complete"
24943    arguments="EOL"
24944    new_path="$path"
24945
24946  windows_path="$new_path"
24947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24948    unix_path=`$CYGPATH -u "$windows_path"`
24949    new_path="$unix_path"
24950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24952    new_path="$unix_path"
24953  fi
24954
24955
24956    new_path=`$WHICH "$new_path" 2> /dev/null`
24957
24958    if test "x$new_path" = x; then
24959      # It's still not found. Now this is an unrecoverable error.
24960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24961$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24962      has_space=`$ECHO "$complete" | $GREP " "`
24963      if test "x$has_space" != x; then
24964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24966      fi
24967      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24968    fi
24969  fi
24970
24971  # Now new_path has a complete unix path to the binary
24972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24973    # Keep paths in /bin as-is, but remove trailing .exe if any
24974    new_path="${new_path/%.exe/}"
24975    # Do not save /bin paths to all_fixpath_prefixes!
24976  else
24977    # Not in mixed or Windows style, start by that.
24978    new_path=`cmd //c echo $new_path`
24979
24980  input_path="$new_path"
24981  # Check if we need to convert this using DOS-style short mode. If the path
24982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24983  # take no chances and rewrite it.
24984  # Note: m4 eats our [], so we need to use [ and ] instead.
24985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24986  if test "x$has_forbidden_chars" != x; then
24987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24989  fi
24990
24991    # Output is in $new_path
24992
24993  windows_path="$new_path"
24994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24995    unix_path=`$CYGPATH -u "$windows_path"`
24996    new_path="$unix_path"
24997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24999    new_path="$unix_path"
25000  fi
25001
25002    # remove trailing .exe if any
25003    new_path="${new_path/%.exe/}"
25004
25005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25007  fi
25008
25009  else
25010    # We're on a posix platform. Hooray! :)
25011    # First separate the path from the arguments. This will split at the first
25012    # space.
25013    complete="$STRIP"
25014    path="${complete%% *}"
25015    tmp="$complete EOL"
25016    arguments="${tmp#* }"
25017
25018    # Cannot rely on the command "which" here since it doesn't always work.
25019    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25020    if test -z "$is_absolute_path"; then
25021      # Path to executable is not absolute. Find it.
25022      IFS_save="$IFS"
25023      IFS=:
25024      for p in $PATH; do
25025        if test -f "$p/$path" && test -x "$p/$path"; then
25026          new_path="$p/$path"
25027          break
25028        fi
25029      done
25030      IFS="$IFS_save"
25031    else
25032      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25033$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25034      new_path="$path"
25035    fi
25036
25037    if test "x$new_path" = x; then
25038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25039$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25040        has_space=`$ECHO "$complete" | $GREP " "`
25041        if test "x$has_space" != x; then
25042          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25043$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25044        fi
25045        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25046      fi
25047  fi
25048
25049      # Now join together the path and the arguments once again
25050      if test "x$arguments" != xEOL; then
25051        new_complete="$new_path ${arguments% *}"
25052      else
25053        new_complete="$new_path"
25054      fi
25055
25056  if test "x$complete" != "x$new_complete"; then
25057      STRIP="$new_complete"
25058      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25059$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25060    fi
25061
25062    # Extract the first word of "mcs", so it can be a program name with args.
25063set dummy mcs; ac_word=$2
25064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25065$as_echo_n "checking for $ac_word... " >&6; }
25066if test "${ac_cv_path_MCS+set}" = set; then :
25067  $as_echo_n "(cached) " >&6
25068else
25069  case $MCS in
25070  [\\/]* | ?:[\\/]*)
25071  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25072  ;;
25073  *)
25074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25075for as_dir in $PATH
25076do
25077  IFS=$as_save_IFS
25078  test -z "$as_dir" && as_dir=.
25079    for ac_exec_ext in '' $ac_executable_extensions; do
25080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25081    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25083    break 2
25084  fi
25085done
25086  done
25087IFS=$as_save_IFS
25088
25089  ;;
25090esac
25091fi
25092MCS=$ac_cv_path_MCS
25093if test -n "$MCS"; then
25094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25095$as_echo "$MCS" >&6; }
25096else
25097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25098$as_echo "no" >&6; }
25099fi
25100
25101
25102
25103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104
25105  # First separate the path from the arguments. This will split at the first
25106  # space.
25107  complete="$MCS"
25108  path="${complete%% *}"
25109  tmp="$complete EOL"
25110  arguments="${tmp#* }"
25111
25112  # Input might be given as Windows format, start by converting to
25113  # unix format.
25114  new_path=`$CYGPATH -u "$path"`
25115
25116  # Now try to locate executable using which
25117  new_path=`$WHICH "$new_path" 2> /dev/null`
25118  # bat and cmd files are not always considered executable in cygwin causing which
25119  # to not find them
25120  if test "x$new_path" = x \
25121           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25122           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25123    new_path=`$CYGPATH -u "$path"`
25124  fi
25125  if test "x$new_path" = x; then
25126    # Oops. Which didn't find the executable.
25127    # The splitting of arguments from the executable at a space might have been incorrect,
25128    # since paths with space are more likely in Windows. Give it another try with the whole
25129    # argument.
25130    path="$complete"
25131    arguments="EOL"
25132    new_path=`$CYGPATH -u "$path"`
25133    new_path=`$WHICH "$new_path" 2> /dev/null`
25134    # bat and cmd files are not always considered executable in cygwin causing which
25135    # to not find them
25136    if test "x$new_path" = x \
25137             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25138             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25139      new_path=`$CYGPATH -u "$path"`
25140    fi
25141    if test "x$new_path" = x; then
25142      # It's still not found. Now this is an unrecoverable error.
25143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25144$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25145      has_space=`$ECHO "$complete" | $GREP " "`
25146      if test "x$has_space" != x; then
25147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25149      fi
25150      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25151    fi
25152  fi
25153
25154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25157  # "foo.exe" is OK but "foo" is an error.
25158  #
25159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25160  # It is also a way to make sure we got the proper file name for the real test later on.
25161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25162  if test "x$test_shortpath" = x; then
25163    # Short path failed, file does not exist as specified.
25164    # Try adding .exe or .cmd
25165    if test -f "${new_path}.exe"; then
25166       input_to_shortpath="${new_path}.exe"
25167    elif test -f "${new_path}.cmd"; then
25168       input_to_shortpath="${new_path}.cmd"
25169    else
25170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25171$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25172      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25173$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25174      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25175    fi
25176  else
25177    input_to_shortpath="$new_path"
25178  fi
25179
25180  # Call helper function which possibly converts this using DOS-style short mode.
25181  # If so, the updated path is stored in $new_path.
25182  new_path="$input_to_shortpath"
25183
25184  input_path="$input_to_shortpath"
25185  # Check if we need to convert this using DOS-style short mode. If the path
25186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25187  # take no chances and rewrite it.
25188  # Note: m4 eats our [], so we need to use [ and ] instead.
25189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25190  if test "x$has_forbidden_chars" != x; then
25191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25195      # Going to short mode and back again did indeed matter. Since short mode is
25196      # case insensitive, let's make it lowercase to improve readability.
25197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25198      # Now convert it back to Unix-stile (cygpath)
25199      input_path=`$CYGPATH -u "$shortmode_path"`
25200      new_path="$input_path"
25201    fi
25202  fi
25203
25204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25205  if test "x$test_cygdrive_prefix" = x; then
25206    # As a simple fix, exclude /usr/bin since it's not a real path.
25207    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25209      # a path prefixed by /cygdrive for fixpath to work.
25210      new_path="$CYGWIN_ROOT_PATH$input_path"
25211    fi
25212  fi
25213
25214  # remove trailing .exe if any
25215  new_path="${new_path/%.exe/}"
25216
25217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25218
25219  # First separate the path from the arguments. This will split at the first
25220  # space.
25221  complete="$MCS"
25222  path="${complete%% *}"
25223  tmp="$complete EOL"
25224  arguments="${tmp#* }"
25225
25226  # Input might be given as Windows format, start by converting to
25227  # unix format.
25228  new_path="$path"
25229
25230  windows_path="$new_path"
25231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25232    unix_path=`$CYGPATH -u "$windows_path"`
25233    new_path="$unix_path"
25234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25236    new_path="$unix_path"
25237  fi
25238
25239
25240  # Now try to locate executable using which
25241  new_path=`$WHICH "$new_path" 2> /dev/null`
25242
25243  if test "x$new_path" = x; then
25244    # Oops. Which didn't find the executable.
25245    # The splitting of arguments from the executable at a space might have been incorrect,
25246    # since paths with space are more likely in Windows. Give it another try with the whole
25247    # argument.
25248    path="$complete"
25249    arguments="EOL"
25250    new_path="$path"
25251
25252  windows_path="$new_path"
25253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25254    unix_path=`$CYGPATH -u "$windows_path"`
25255    new_path="$unix_path"
25256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25258    new_path="$unix_path"
25259  fi
25260
25261
25262    new_path=`$WHICH "$new_path" 2> /dev/null`
25263
25264    if test "x$new_path" = x; then
25265      # It's still not found. Now this is an unrecoverable error.
25266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25267$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25268      has_space=`$ECHO "$complete" | $GREP " "`
25269      if test "x$has_space" != x; then
25270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25272      fi
25273      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25274    fi
25275  fi
25276
25277  # Now new_path has a complete unix path to the binary
25278  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25279    # Keep paths in /bin as-is, but remove trailing .exe if any
25280    new_path="${new_path/%.exe/}"
25281    # Do not save /bin paths to all_fixpath_prefixes!
25282  else
25283    # Not in mixed or Windows style, start by that.
25284    new_path=`cmd //c echo $new_path`
25285
25286  input_path="$new_path"
25287  # Check if we need to convert this using DOS-style short mode. If the path
25288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25289  # take no chances and rewrite it.
25290  # Note: m4 eats our [], so we need to use [ and ] instead.
25291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25292  if test "x$has_forbidden_chars" != x; then
25293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25295  fi
25296
25297    # Output is in $new_path
25298
25299  windows_path="$new_path"
25300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25301    unix_path=`$CYGPATH -u "$windows_path"`
25302    new_path="$unix_path"
25303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25305    new_path="$unix_path"
25306  fi
25307
25308    # remove trailing .exe if any
25309    new_path="${new_path/%.exe/}"
25310
25311    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25312    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25313  fi
25314
25315  else
25316    # We're on a posix platform. Hooray! :)
25317    # First separate the path from the arguments. This will split at the first
25318    # space.
25319    complete="$MCS"
25320    path="${complete%% *}"
25321    tmp="$complete EOL"
25322    arguments="${tmp#* }"
25323
25324    # Cannot rely on the command "which" here since it doesn't always work.
25325    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25326    if test -z "$is_absolute_path"; then
25327      # Path to executable is not absolute. Find it.
25328      IFS_save="$IFS"
25329      IFS=:
25330      for p in $PATH; do
25331        if test -f "$p/$path" && test -x "$p/$path"; then
25332          new_path="$p/$path"
25333          break
25334        fi
25335      done
25336      IFS="$IFS_save"
25337    else
25338      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25339$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25340      new_path="$path"
25341    fi
25342
25343    if test "x$new_path" = x; then
25344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25345$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25346        has_space=`$ECHO "$complete" | $GREP " "`
25347        if test "x$has_space" != x; then
25348          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25349$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25350        fi
25351        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25352      fi
25353  fi
25354
25355      # Now join together the path and the arguments once again
25356      if test "x$arguments" != xEOL; then
25357        new_complete="$new_path ${arguments% *}"
25358      else
25359        new_complete="$new_path"
25360      fi
25361
25362  if test "x$complete" != "x$new_complete"; then
25363      MCS="$new_complete"
25364      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25365$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25366    fi
25367
25368elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25369    if test -n "$ac_tool_prefix"; then
25370  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25371set dummy ${ac_tool_prefix}nm; ac_word=$2
25372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25373$as_echo_n "checking for $ac_word... " >&6; }
25374if test "${ac_cv_prog_NM+set}" = set; then :
25375  $as_echo_n "(cached) " >&6
25376else
25377  if test -n "$NM"; then
25378  ac_cv_prog_NM="$NM" # Let the user override the test.
25379else
25380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25381for as_dir in $PATH
25382do
25383  IFS=$as_save_IFS
25384  test -z "$as_dir" && as_dir=.
25385    for ac_exec_ext in '' $ac_executable_extensions; do
25386  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25387    ac_cv_prog_NM="${ac_tool_prefix}nm"
25388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25389    break 2
25390  fi
25391done
25392  done
25393IFS=$as_save_IFS
25394
25395fi
25396fi
25397NM=$ac_cv_prog_NM
25398if test -n "$NM"; then
25399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25400$as_echo "$NM" >&6; }
25401else
25402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25403$as_echo "no" >&6; }
25404fi
25405
25406
25407fi
25408if test -z "$ac_cv_prog_NM"; then
25409  ac_ct_NM=$NM
25410  # Extract the first word of "nm", so it can be a program name with args.
25411set dummy nm; ac_word=$2
25412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25413$as_echo_n "checking for $ac_word... " >&6; }
25414if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25415  $as_echo_n "(cached) " >&6
25416else
25417  if test -n "$ac_ct_NM"; then
25418  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25419else
25420as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25421for as_dir in $PATH
25422do
25423  IFS=$as_save_IFS
25424  test -z "$as_dir" && as_dir=.
25425    for ac_exec_ext in '' $ac_executable_extensions; do
25426  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25427    ac_cv_prog_ac_ct_NM="nm"
25428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25429    break 2
25430  fi
25431done
25432  done
25433IFS=$as_save_IFS
25434
25435fi
25436fi
25437ac_ct_NM=$ac_cv_prog_ac_ct_NM
25438if test -n "$ac_ct_NM"; then
25439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25440$as_echo "$ac_ct_NM" >&6; }
25441else
25442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25443$as_echo "no" >&6; }
25444fi
25445
25446  if test "x$ac_ct_NM" = x; then
25447    NM=""
25448  else
25449    case $cross_compiling:$ac_tool_warned in
25450yes:)
25451{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25452$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25453ac_tool_warned=yes ;;
25454esac
25455    NM=$ac_ct_NM
25456  fi
25457else
25458  NM="$ac_cv_prog_NM"
25459fi
25460
25461
25462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25463
25464  # First separate the path from the arguments. This will split at the first
25465  # space.
25466  complete="$NM"
25467  path="${complete%% *}"
25468  tmp="$complete EOL"
25469  arguments="${tmp#* }"
25470
25471  # Input might be given as Windows format, start by converting to
25472  # unix format.
25473  new_path=`$CYGPATH -u "$path"`
25474
25475  # Now try to locate executable using which
25476  new_path=`$WHICH "$new_path" 2> /dev/null`
25477  # bat and cmd files are not always considered executable in cygwin causing which
25478  # to not find them
25479  if test "x$new_path" = x \
25480           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25481           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25482    new_path=`$CYGPATH -u "$path"`
25483  fi
25484  if test "x$new_path" = x; then
25485    # Oops. Which didn't find the executable.
25486    # The splitting of arguments from the executable at a space might have been incorrect,
25487    # since paths with space are more likely in Windows. Give it another try with the whole
25488    # argument.
25489    path="$complete"
25490    arguments="EOL"
25491    new_path=`$CYGPATH -u "$path"`
25492    new_path=`$WHICH "$new_path" 2> /dev/null`
25493    # bat and cmd files are not always considered executable in cygwin causing which
25494    # to not find them
25495    if test "x$new_path" = x \
25496             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25497             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25498      new_path=`$CYGPATH -u "$path"`
25499    fi
25500    if test "x$new_path" = x; then
25501      # It's still not found. Now this is an unrecoverable error.
25502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25503$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25504      has_space=`$ECHO "$complete" | $GREP " "`
25505      if test "x$has_space" != x; then
25506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25508      fi
25509      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25510    fi
25511  fi
25512
25513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25516  # "foo.exe" is OK but "foo" is an error.
25517  #
25518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25519  # It is also a way to make sure we got the proper file name for the real test later on.
25520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25521  if test "x$test_shortpath" = x; then
25522    # Short path failed, file does not exist as specified.
25523    # Try adding .exe or .cmd
25524    if test -f "${new_path}.exe"; then
25525       input_to_shortpath="${new_path}.exe"
25526    elif test -f "${new_path}.cmd"; then
25527       input_to_shortpath="${new_path}.cmd"
25528    else
25529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25530$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25531      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25532$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25533      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25534    fi
25535  else
25536    input_to_shortpath="$new_path"
25537  fi
25538
25539  # Call helper function which possibly converts this using DOS-style short mode.
25540  # If so, the updated path is stored in $new_path.
25541  new_path="$input_to_shortpath"
25542
25543  input_path="$input_to_shortpath"
25544  # Check if we need to convert this using DOS-style short mode. If the path
25545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25546  # take no chances and rewrite it.
25547  # Note: m4 eats our [], so we need to use [ and ] instead.
25548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25549  if test "x$has_forbidden_chars" != x; then
25550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25554      # Going to short mode and back again did indeed matter. Since short mode is
25555      # case insensitive, let's make it lowercase to improve readability.
25556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25557      # Now convert it back to Unix-stile (cygpath)
25558      input_path=`$CYGPATH -u "$shortmode_path"`
25559      new_path="$input_path"
25560    fi
25561  fi
25562
25563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25564  if test "x$test_cygdrive_prefix" = x; then
25565    # As a simple fix, exclude /usr/bin since it's not a real path.
25566    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25568      # a path prefixed by /cygdrive for fixpath to work.
25569      new_path="$CYGWIN_ROOT_PATH$input_path"
25570    fi
25571  fi
25572
25573  # remove trailing .exe if any
25574  new_path="${new_path/%.exe/}"
25575
25576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25577
25578  # First separate the path from the arguments. This will split at the first
25579  # space.
25580  complete="$NM"
25581  path="${complete%% *}"
25582  tmp="$complete EOL"
25583  arguments="${tmp#* }"
25584
25585  # Input might be given as Windows format, start by converting to
25586  # unix format.
25587  new_path="$path"
25588
25589  windows_path="$new_path"
25590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25591    unix_path=`$CYGPATH -u "$windows_path"`
25592    new_path="$unix_path"
25593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25595    new_path="$unix_path"
25596  fi
25597
25598
25599  # Now try to locate executable using which
25600  new_path=`$WHICH "$new_path" 2> /dev/null`
25601
25602  if test "x$new_path" = x; then
25603    # Oops. Which didn't find the executable.
25604    # The splitting of arguments from the executable at a space might have been incorrect,
25605    # since paths with space are more likely in Windows. Give it another try with the whole
25606    # argument.
25607    path="$complete"
25608    arguments="EOL"
25609    new_path="$path"
25610
25611  windows_path="$new_path"
25612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25613    unix_path=`$CYGPATH -u "$windows_path"`
25614    new_path="$unix_path"
25615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25617    new_path="$unix_path"
25618  fi
25619
25620
25621    new_path=`$WHICH "$new_path" 2> /dev/null`
25622
25623    if test "x$new_path" = x; then
25624      # It's still not found. Now this is an unrecoverable error.
25625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25626$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25627      has_space=`$ECHO "$complete" | $GREP " "`
25628      if test "x$has_space" != x; then
25629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25631      fi
25632      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25633    fi
25634  fi
25635
25636  # Now new_path has a complete unix path to the binary
25637  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25638    # Keep paths in /bin as-is, but remove trailing .exe if any
25639    new_path="${new_path/%.exe/}"
25640    # Do not save /bin paths to all_fixpath_prefixes!
25641  else
25642    # Not in mixed or Windows style, start by that.
25643    new_path=`cmd //c echo $new_path`
25644
25645  input_path="$new_path"
25646  # Check if we need to convert this using DOS-style short mode. If the path
25647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25648  # take no chances and rewrite it.
25649  # Note: m4 eats our [], so we need to use [ and ] instead.
25650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25651  if test "x$has_forbidden_chars" != x; then
25652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25654  fi
25655
25656    # Output is in $new_path
25657
25658  windows_path="$new_path"
25659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25660    unix_path=`$CYGPATH -u "$windows_path"`
25661    new_path="$unix_path"
25662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25664    new_path="$unix_path"
25665  fi
25666
25667    # remove trailing .exe if any
25668    new_path="${new_path/%.exe/}"
25669
25670    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25671    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25672  fi
25673
25674  else
25675    # We're on a posix platform. Hooray! :)
25676    # First separate the path from the arguments. This will split at the first
25677    # space.
25678    complete="$NM"
25679    path="${complete%% *}"
25680    tmp="$complete EOL"
25681    arguments="${tmp#* }"
25682
25683    # Cannot rely on the command "which" here since it doesn't always work.
25684    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25685    if test -z "$is_absolute_path"; then
25686      # Path to executable is not absolute. Find it.
25687      IFS_save="$IFS"
25688      IFS=:
25689      for p in $PATH; do
25690        if test -f "$p/$path" && test -x "$p/$path"; then
25691          new_path="$p/$path"
25692          break
25693        fi
25694      done
25695      IFS="$IFS_save"
25696    else
25697      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25698$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25699      new_path="$path"
25700    fi
25701
25702    if test "x$new_path" = x; then
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25704$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25705        has_space=`$ECHO "$complete" | $GREP " "`
25706        if test "x$has_space" != x; then
25707          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25709        fi
25710        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25711      fi
25712  fi
25713
25714      # Now join together the path and the arguments once again
25715      if test "x$arguments" != xEOL; then
25716        new_complete="$new_path ${arguments% *}"
25717      else
25718        new_complete="$new_path"
25719      fi
25720
25721  if test "x$complete" != "x$new_complete"; then
25722      NM="$new_complete"
25723      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25724$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25725    fi
25726
25727    if test -n "$ac_tool_prefix"; then
25728  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25729set dummy ${ac_tool_prefix}strip; ac_word=$2
25730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25731$as_echo_n "checking for $ac_word... " >&6; }
25732if test "${ac_cv_prog_STRIP+set}" = set; then :
25733  $as_echo_n "(cached) " >&6
25734else
25735  if test -n "$STRIP"; then
25736  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25737else
25738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25739for as_dir in $PATH
25740do
25741  IFS=$as_save_IFS
25742  test -z "$as_dir" && as_dir=.
25743    for ac_exec_ext in '' $ac_executable_extensions; do
25744  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25745    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25747    break 2
25748  fi
25749done
25750  done
25751IFS=$as_save_IFS
25752
25753fi
25754fi
25755STRIP=$ac_cv_prog_STRIP
25756if test -n "$STRIP"; then
25757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25758$as_echo "$STRIP" >&6; }
25759else
25760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25761$as_echo "no" >&6; }
25762fi
25763
25764
25765fi
25766if test -z "$ac_cv_prog_STRIP"; then
25767  ac_ct_STRIP=$STRIP
25768  # Extract the first word of "strip", so it can be a program name with args.
25769set dummy strip; ac_word=$2
25770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25771$as_echo_n "checking for $ac_word... " >&6; }
25772if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25773  $as_echo_n "(cached) " >&6
25774else
25775  if test -n "$ac_ct_STRIP"; then
25776  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25777else
25778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25779for as_dir in $PATH
25780do
25781  IFS=$as_save_IFS
25782  test -z "$as_dir" && as_dir=.
25783    for ac_exec_ext in '' $ac_executable_extensions; do
25784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25785    ac_cv_prog_ac_ct_STRIP="strip"
25786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25787    break 2
25788  fi
25789done
25790  done
25791IFS=$as_save_IFS
25792
25793fi
25794fi
25795ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25796if test -n "$ac_ct_STRIP"; then
25797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25798$as_echo "$ac_ct_STRIP" >&6; }
25799else
25800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25801$as_echo "no" >&6; }
25802fi
25803
25804  if test "x$ac_ct_STRIP" = x; then
25805    STRIP=""
25806  else
25807    case $cross_compiling:$ac_tool_warned in
25808yes:)
25809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25811ac_tool_warned=yes ;;
25812esac
25813    STRIP=$ac_ct_STRIP
25814  fi
25815else
25816  STRIP="$ac_cv_prog_STRIP"
25817fi
25818
25819
25820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25821
25822  # First separate the path from the arguments. This will split at the first
25823  # space.
25824  complete="$STRIP"
25825  path="${complete%% *}"
25826  tmp="$complete EOL"
25827  arguments="${tmp#* }"
25828
25829  # Input might be given as Windows format, start by converting to
25830  # unix format.
25831  new_path=`$CYGPATH -u "$path"`
25832
25833  # Now try to locate executable using which
25834  new_path=`$WHICH "$new_path" 2> /dev/null`
25835  # bat and cmd files are not always considered executable in cygwin causing which
25836  # to not find them
25837  if test "x$new_path" = x \
25838           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25839           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25840    new_path=`$CYGPATH -u "$path"`
25841  fi
25842  if test "x$new_path" = x; then
25843    # Oops. Which didn't find the executable.
25844    # The splitting of arguments from the executable at a space might have been incorrect,
25845    # since paths with space are more likely in Windows. Give it another try with the whole
25846    # argument.
25847    path="$complete"
25848    arguments="EOL"
25849    new_path=`$CYGPATH -u "$path"`
25850    new_path=`$WHICH "$new_path" 2> /dev/null`
25851    # bat and cmd files are not always considered executable in cygwin causing which
25852    # to not find them
25853    if test "x$new_path" = x \
25854             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25855             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25856      new_path=`$CYGPATH -u "$path"`
25857    fi
25858    if test "x$new_path" = x; then
25859      # It's still not found. Now this is an unrecoverable error.
25860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25861$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25862      has_space=`$ECHO "$complete" | $GREP " "`
25863      if test "x$has_space" != x; then
25864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25866      fi
25867      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25868    fi
25869  fi
25870
25871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25874  # "foo.exe" is OK but "foo" is an error.
25875  #
25876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25877  # It is also a way to make sure we got the proper file name for the real test later on.
25878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25879  if test "x$test_shortpath" = x; then
25880    # Short path failed, file does not exist as specified.
25881    # Try adding .exe or .cmd
25882    if test -f "${new_path}.exe"; then
25883       input_to_shortpath="${new_path}.exe"
25884    elif test -f "${new_path}.cmd"; then
25885       input_to_shortpath="${new_path}.cmd"
25886    else
25887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25888$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25891      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25892    fi
25893  else
25894    input_to_shortpath="$new_path"
25895  fi
25896
25897  # Call helper function which possibly converts this using DOS-style short mode.
25898  # If so, the updated path is stored in $new_path.
25899  new_path="$input_to_shortpath"
25900
25901  input_path="$input_to_shortpath"
25902  # Check if we need to convert this using DOS-style short mode. If the path
25903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25904  # take no chances and rewrite it.
25905  # Note: m4 eats our [], so we need to use [ and ] instead.
25906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25907  if test "x$has_forbidden_chars" != x; then
25908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25912      # Going to short mode and back again did indeed matter. Since short mode is
25913      # case insensitive, let's make it lowercase to improve readability.
25914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25915      # Now convert it back to Unix-stile (cygpath)
25916      input_path=`$CYGPATH -u "$shortmode_path"`
25917      new_path="$input_path"
25918    fi
25919  fi
25920
25921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25922  if test "x$test_cygdrive_prefix" = x; then
25923    # As a simple fix, exclude /usr/bin since it's not a real path.
25924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25926      # a path prefixed by /cygdrive for fixpath to work.
25927      new_path="$CYGWIN_ROOT_PATH$input_path"
25928    fi
25929  fi
25930
25931  # remove trailing .exe if any
25932  new_path="${new_path/%.exe/}"
25933
25934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25935
25936  # First separate the path from the arguments. This will split at the first
25937  # space.
25938  complete="$STRIP"
25939  path="${complete%% *}"
25940  tmp="$complete EOL"
25941  arguments="${tmp#* }"
25942
25943  # Input might be given as Windows format, start by converting to
25944  # unix format.
25945  new_path="$path"
25946
25947  windows_path="$new_path"
25948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25949    unix_path=`$CYGPATH -u "$windows_path"`
25950    new_path="$unix_path"
25951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25953    new_path="$unix_path"
25954  fi
25955
25956
25957  # Now try to locate executable using which
25958  new_path=`$WHICH "$new_path" 2> /dev/null`
25959
25960  if test "x$new_path" = x; then
25961    # Oops. Which didn't find the executable.
25962    # The splitting of arguments from the executable at a space might have been incorrect,
25963    # since paths with space are more likely in Windows. Give it another try with the whole
25964    # argument.
25965    path="$complete"
25966    arguments="EOL"
25967    new_path="$path"
25968
25969  windows_path="$new_path"
25970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25971    unix_path=`$CYGPATH -u "$windows_path"`
25972    new_path="$unix_path"
25973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25975    new_path="$unix_path"
25976  fi
25977
25978
25979    new_path=`$WHICH "$new_path" 2> /dev/null`
25980
25981    if test "x$new_path" = x; then
25982      # It's still not found. Now this is an unrecoverable error.
25983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25984$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25985      has_space=`$ECHO "$complete" | $GREP " "`
25986      if test "x$has_space" != x; then
25987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25989      fi
25990      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25991    fi
25992  fi
25993
25994  # Now new_path has a complete unix path to the binary
25995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25996    # Keep paths in /bin as-is, but remove trailing .exe if any
25997    new_path="${new_path/%.exe/}"
25998    # Do not save /bin paths to all_fixpath_prefixes!
25999  else
26000    # Not in mixed or Windows style, start by that.
26001    new_path=`cmd //c echo $new_path`
26002
26003  input_path="$new_path"
26004  # Check if we need to convert this using DOS-style short mode. If the path
26005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26006  # take no chances and rewrite it.
26007  # Note: m4 eats our [], so we need to use [ and ] instead.
26008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26009  if test "x$has_forbidden_chars" != x; then
26010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26012  fi
26013
26014    # Output is in $new_path
26015
26016  windows_path="$new_path"
26017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26018    unix_path=`$CYGPATH -u "$windows_path"`
26019    new_path="$unix_path"
26020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26022    new_path="$unix_path"
26023  fi
26024
26025    # remove trailing .exe if any
26026    new_path="${new_path/%.exe/}"
26027
26028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26030  fi
26031
26032  else
26033    # We're on a posix platform. Hooray! :)
26034    # First separate the path from the arguments. This will split at the first
26035    # space.
26036    complete="$STRIP"
26037    path="${complete%% *}"
26038    tmp="$complete EOL"
26039    arguments="${tmp#* }"
26040
26041    # Cannot rely on the command "which" here since it doesn't always work.
26042    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26043    if test -z "$is_absolute_path"; then
26044      # Path to executable is not absolute. Find it.
26045      IFS_save="$IFS"
26046      IFS=:
26047      for p in $PATH; do
26048        if test -f "$p/$path" && test -x "$p/$path"; then
26049          new_path="$p/$path"
26050          break
26051        fi
26052      done
26053      IFS="$IFS_save"
26054    else
26055      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26056$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26057      new_path="$path"
26058    fi
26059
26060    if test "x$new_path" = x; then
26061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26062$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26063        has_space=`$ECHO "$complete" | $GREP " "`
26064        if test "x$has_space" != x; then
26065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26067        fi
26068        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26069      fi
26070  fi
26071
26072      # Now join together the path and the arguments once again
26073      if test "x$arguments" != xEOL; then
26074        new_complete="$new_path ${arguments% *}"
26075      else
26076        new_complete="$new_path"
26077      fi
26078
26079  if test "x$complete" != "x$new_complete"; then
26080      STRIP="$new_complete"
26081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26082$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26083    fi
26084
26085fi
26086
26087# objcopy is used for moving debug symbols to separate files when
26088# full debug symbols are enabled.
26089if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26090    if test -n "$ac_tool_prefix"; then
26091  for ac_prog in gobjcopy objcopy
26092  do
26093    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26094set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26096$as_echo_n "checking for $ac_word... " >&6; }
26097if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26098  $as_echo_n "(cached) " >&6
26099else
26100  if test -n "$OBJCOPY"; then
26101  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26102else
26103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26104for as_dir in $PATH
26105do
26106  IFS=$as_save_IFS
26107  test -z "$as_dir" && as_dir=.
26108    for ac_exec_ext in '' $ac_executable_extensions; do
26109  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26110    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26112    break 2
26113  fi
26114done
26115  done
26116IFS=$as_save_IFS
26117
26118fi
26119fi
26120OBJCOPY=$ac_cv_prog_OBJCOPY
26121if test -n "$OBJCOPY"; then
26122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26123$as_echo "$OBJCOPY" >&6; }
26124else
26125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26126$as_echo "no" >&6; }
26127fi
26128
26129
26130    test -n "$OBJCOPY" && break
26131  done
26132fi
26133if test -z "$OBJCOPY"; then
26134  ac_ct_OBJCOPY=$OBJCOPY
26135  for ac_prog in gobjcopy objcopy
26136do
26137  # Extract the first word of "$ac_prog", so it can be a program name with args.
26138set dummy $ac_prog; ac_word=$2
26139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26140$as_echo_n "checking for $ac_word... " >&6; }
26141if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26142  $as_echo_n "(cached) " >&6
26143else
26144  if test -n "$ac_ct_OBJCOPY"; then
26145  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26146else
26147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26148for as_dir in $PATH
26149do
26150  IFS=$as_save_IFS
26151  test -z "$as_dir" && as_dir=.
26152    for ac_exec_ext in '' $ac_executable_extensions; do
26153  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26154    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26156    break 2
26157  fi
26158done
26159  done
26160IFS=$as_save_IFS
26161
26162fi
26163fi
26164ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26165if test -n "$ac_ct_OBJCOPY"; then
26166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26167$as_echo "$ac_ct_OBJCOPY" >&6; }
26168else
26169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26170$as_echo "no" >&6; }
26171fi
26172
26173
26174  test -n "$ac_ct_OBJCOPY" && break
26175done
26176
26177  if test "x$ac_ct_OBJCOPY" = x; then
26178    OBJCOPY=""
26179  else
26180    case $cross_compiling:$ac_tool_warned in
26181yes:)
26182{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26183$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26184ac_tool_warned=yes ;;
26185esac
26186    OBJCOPY=$ac_ct_OBJCOPY
26187  fi
26188fi
26189
26190    # Only call fixup if objcopy was found.
26191    if test -n "$OBJCOPY"; then
26192
26193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26194
26195  # First separate the path from the arguments. This will split at the first
26196  # space.
26197  complete="$OBJCOPY"
26198  path="${complete%% *}"
26199  tmp="$complete EOL"
26200  arguments="${tmp#* }"
26201
26202  # Input might be given as Windows format, start by converting to
26203  # unix format.
26204  new_path=`$CYGPATH -u "$path"`
26205
26206  # Now try to locate executable using which
26207  new_path=`$WHICH "$new_path" 2> /dev/null`
26208  # bat and cmd files are not always considered executable in cygwin causing which
26209  # to not find them
26210  if test "x$new_path" = x \
26211           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26212           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26213    new_path=`$CYGPATH -u "$path"`
26214  fi
26215  if test "x$new_path" = x; then
26216    # Oops. Which didn't find the executable.
26217    # The splitting of arguments from the executable at a space might have been incorrect,
26218    # since paths with space are more likely in Windows. Give it another try with the whole
26219    # argument.
26220    path="$complete"
26221    arguments="EOL"
26222    new_path=`$CYGPATH -u "$path"`
26223    new_path=`$WHICH "$new_path" 2> /dev/null`
26224    # bat and cmd files are not always considered executable in cygwin causing which
26225    # to not find them
26226    if test "x$new_path" = x \
26227             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26228             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26229      new_path=`$CYGPATH -u "$path"`
26230    fi
26231    if test "x$new_path" = x; then
26232      # It's still not found. Now this is an unrecoverable error.
26233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26234$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26235      has_space=`$ECHO "$complete" | $GREP " "`
26236      if test "x$has_space" != x; then
26237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26239      fi
26240      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26241    fi
26242  fi
26243
26244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26247  # "foo.exe" is OK but "foo" is an error.
26248  #
26249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26250  # It is also a way to make sure we got the proper file name for the real test later on.
26251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26252  if test "x$test_shortpath" = x; then
26253    # Short path failed, file does not exist as specified.
26254    # Try adding .exe or .cmd
26255    if test -f "${new_path}.exe"; then
26256       input_to_shortpath="${new_path}.exe"
26257    elif test -f "${new_path}.cmd"; then
26258       input_to_shortpath="${new_path}.cmd"
26259    else
26260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26261$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26264      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26265    fi
26266  else
26267    input_to_shortpath="$new_path"
26268  fi
26269
26270  # Call helper function which possibly converts this using DOS-style short mode.
26271  # If so, the updated path is stored in $new_path.
26272  new_path="$input_to_shortpath"
26273
26274  input_path="$input_to_shortpath"
26275  # Check if we need to convert this using DOS-style short mode. If the path
26276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26277  # take no chances and rewrite it.
26278  # Note: m4 eats our [], so we need to use [ and ] instead.
26279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26280  if test "x$has_forbidden_chars" != x; then
26281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26285      # Going to short mode and back again did indeed matter. Since short mode is
26286      # case insensitive, let's make it lowercase to improve readability.
26287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26288      # Now convert it back to Unix-stile (cygpath)
26289      input_path=`$CYGPATH -u "$shortmode_path"`
26290      new_path="$input_path"
26291    fi
26292  fi
26293
26294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26295  if test "x$test_cygdrive_prefix" = x; then
26296    # As a simple fix, exclude /usr/bin since it's not a real path.
26297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26299      # a path prefixed by /cygdrive for fixpath to work.
26300      new_path="$CYGWIN_ROOT_PATH$input_path"
26301    fi
26302  fi
26303
26304  # remove trailing .exe if any
26305  new_path="${new_path/%.exe/}"
26306
26307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26308
26309  # First separate the path from the arguments. This will split at the first
26310  # space.
26311  complete="$OBJCOPY"
26312  path="${complete%% *}"
26313  tmp="$complete EOL"
26314  arguments="${tmp#* }"
26315
26316  # Input might be given as Windows format, start by converting to
26317  # unix format.
26318  new_path="$path"
26319
26320  windows_path="$new_path"
26321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26322    unix_path=`$CYGPATH -u "$windows_path"`
26323    new_path="$unix_path"
26324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26326    new_path="$unix_path"
26327  fi
26328
26329
26330  # Now try to locate executable using which
26331  new_path=`$WHICH "$new_path" 2> /dev/null`
26332
26333  if test "x$new_path" = x; then
26334    # Oops. Which didn't find the executable.
26335    # The splitting of arguments from the executable at a space might have been incorrect,
26336    # since paths with space are more likely in Windows. Give it another try with the whole
26337    # argument.
26338    path="$complete"
26339    arguments="EOL"
26340    new_path="$path"
26341
26342  windows_path="$new_path"
26343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26344    unix_path=`$CYGPATH -u "$windows_path"`
26345    new_path="$unix_path"
26346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26348    new_path="$unix_path"
26349  fi
26350
26351
26352    new_path=`$WHICH "$new_path" 2> /dev/null`
26353
26354    if test "x$new_path" = x; then
26355      # It's still not found. Now this is an unrecoverable error.
26356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26357$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26358      has_space=`$ECHO "$complete" | $GREP " "`
26359      if test "x$has_space" != x; then
26360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26362      fi
26363      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26364    fi
26365  fi
26366
26367  # Now new_path has a complete unix path to the binary
26368  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26369    # Keep paths in /bin as-is, but remove trailing .exe if any
26370    new_path="${new_path/%.exe/}"
26371    # Do not save /bin paths to all_fixpath_prefixes!
26372  else
26373    # Not in mixed or Windows style, start by that.
26374    new_path=`cmd //c echo $new_path`
26375
26376  input_path="$new_path"
26377  # Check if we need to convert this using DOS-style short mode. If the path
26378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26379  # take no chances and rewrite it.
26380  # Note: m4 eats our [], so we need to use [ and ] instead.
26381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26382  if test "x$has_forbidden_chars" != x; then
26383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26385  fi
26386
26387    # Output is in $new_path
26388
26389  windows_path="$new_path"
26390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26391    unix_path=`$CYGPATH -u "$windows_path"`
26392    new_path="$unix_path"
26393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26395    new_path="$unix_path"
26396  fi
26397
26398    # remove trailing .exe if any
26399    new_path="${new_path/%.exe/}"
26400
26401    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26402    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26403  fi
26404
26405  else
26406    # We're on a posix platform. Hooray! :)
26407    # First separate the path from the arguments. This will split at the first
26408    # space.
26409    complete="$OBJCOPY"
26410    path="${complete%% *}"
26411    tmp="$complete EOL"
26412    arguments="${tmp#* }"
26413
26414    # Cannot rely on the command "which" here since it doesn't always work.
26415    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26416    if test -z "$is_absolute_path"; then
26417      # Path to executable is not absolute. Find it.
26418      IFS_save="$IFS"
26419      IFS=:
26420      for p in $PATH; do
26421        if test -f "$p/$path" && test -x "$p/$path"; then
26422          new_path="$p/$path"
26423          break
26424        fi
26425      done
26426      IFS="$IFS_save"
26427    else
26428      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26429$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26430      new_path="$path"
26431    fi
26432
26433    if test "x$new_path" = x; then
26434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26435$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26436        has_space=`$ECHO "$complete" | $GREP " "`
26437        if test "x$has_space" != x; then
26438          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26439$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26440        fi
26441        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26442      fi
26443  fi
26444
26445      # Now join together the path and the arguments once again
26446      if test "x$arguments" != xEOL; then
26447        new_complete="$new_path ${arguments% *}"
26448      else
26449        new_complete="$new_path"
26450      fi
26451
26452  if test "x$complete" != "x$new_complete"; then
26453      OBJCOPY="$new_complete"
26454      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26455$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26456    fi
26457
26458    fi
26459fi
26460
26461if test -n "$ac_tool_prefix"; then
26462  for ac_prog in gobjdump objdump
26463  do
26464    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26465set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26467$as_echo_n "checking for $ac_word... " >&6; }
26468if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26469  $as_echo_n "(cached) " >&6
26470else
26471  if test -n "$OBJDUMP"; then
26472  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26473else
26474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26475for as_dir in $PATH
26476do
26477  IFS=$as_save_IFS
26478  test -z "$as_dir" && as_dir=.
26479    for ac_exec_ext in '' $ac_executable_extensions; do
26480  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26481    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26483    break 2
26484  fi
26485done
26486  done
26487IFS=$as_save_IFS
26488
26489fi
26490fi
26491OBJDUMP=$ac_cv_prog_OBJDUMP
26492if test -n "$OBJDUMP"; then
26493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26494$as_echo "$OBJDUMP" >&6; }
26495else
26496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26497$as_echo "no" >&6; }
26498fi
26499
26500
26501    test -n "$OBJDUMP" && break
26502  done
26503fi
26504if test -z "$OBJDUMP"; then
26505  ac_ct_OBJDUMP=$OBJDUMP
26506  for ac_prog in gobjdump objdump
26507do
26508  # Extract the first word of "$ac_prog", so it can be a program name with args.
26509set dummy $ac_prog; ac_word=$2
26510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26511$as_echo_n "checking for $ac_word... " >&6; }
26512if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26513  $as_echo_n "(cached) " >&6
26514else
26515  if test -n "$ac_ct_OBJDUMP"; then
26516  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26517else
26518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26519for as_dir in $PATH
26520do
26521  IFS=$as_save_IFS
26522  test -z "$as_dir" && as_dir=.
26523    for ac_exec_ext in '' $ac_executable_extensions; do
26524  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26525    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26527    break 2
26528  fi
26529done
26530  done
26531IFS=$as_save_IFS
26532
26533fi
26534fi
26535ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26536if test -n "$ac_ct_OBJDUMP"; then
26537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26538$as_echo "$ac_ct_OBJDUMP" >&6; }
26539else
26540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26541$as_echo "no" >&6; }
26542fi
26543
26544
26545  test -n "$ac_ct_OBJDUMP" && break
26546done
26547
26548  if test "x$ac_ct_OBJDUMP" = x; then
26549    OBJDUMP=""
26550  else
26551    case $cross_compiling:$ac_tool_warned in
26552yes:)
26553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26555ac_tool_warned=yes ;;
26556esac
26557    OBJDUMP=$ac_ct_OBJDUMP
26558  fi
26559fi
26560
26561if test "x$OBJDUMP" != x; then
26562  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26563
26564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26565
26566  # First separate the path from the arguments. This will split at the first
26567  # space.
26568  complete="$OBJDUMP"
26569  path="${complete%% *}"
26570  tmp="$complete EOL"
26571  arguments="${tmp#* }"
26572
26573  # Input might be given as Windows format, start by converting to
26574  # unix format.
26575  new_path=`$CYGPATH -u "$path"`
26576
26577  # Now try to locate executable using which
26578  new_path=`$WHICH "$new_path" 2> /dev/null`
26579  # bat and cmd files are not always considered executable in cygwin causing which
26580  # to not find them
26581  if test "x$new_path" = x \
26582           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26583           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26584    new_path=`$CYGPATH -u "$path"`
26585  fi
26586  if test "x$new_path" = x; then
26587    # Oops. Which didn't find the executable.
26588    # The splitting of arguments from the executable at a space might have been incorrect,
26589    # since paths with space are more likely in Windows. Give it another try with the whole
26590    # argument.
26591    path="$complete"
26592    arguments="EOL"
26593    new_path=`$CYGPATH -u "$path"`
26594    new_path=`$WHICH "$new_path" 2> /dev/null`
26595    # bat and cmd files are not always considered executable in cygwin causing which
26596    # to not find them
26597    if test "x$new_path" = x \
26598             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26599             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26600      new_path=`$CYGPATH -u "$path"`
26601    fi
26602    if test "x$new_path" = x; then
26603      # It's still not found. Now this is an unrecoverable error.
26604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26605$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26606      has_space=`$ECHO "$complete" | $GREP " "`
26607      if test "x$has_space" != x; then
26608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26610      fi
26611      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26612    fi
26613  fi
26614
26615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26618  # "foo.exe" is OK but "foo" is an error.
26619  #
26620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26621  # It is also a way to make sure we got the proper file name for the real test later on.
26622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26623  if test "x$test_shortpath" = x; then
26624    # Short path failed, file does not exist as specified.
26625    # Try adding .exe or .cmd
26626    if test -f "${new_path}.exe"; then
26627       input_to_shortpath="${new_path}.exe"
26628    elif test -f "${new_path}.cmd"; then
26629       input_to_shortpath="${new_path}.cmd"
26630    else
26631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26632$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26633      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26634$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26635      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26636    fi
26637  else
26638    input_to_shortpath="$new_path"
26639  fi
26640
26641  # Call helper function which possibly converts this using DOS-style short mode.
26642  # If so, the updated path is stored in $new_path.
26643  new_path="$input_to_shortpath"
26644
26645  input_path="$input_to_shortpath"
26646  # Check if we need to convert this using DOS-style short mode. If the path
26647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26648  # take no chances and rewrite it.
26649  # Note: m4 eats our [], so we need to use [ and ] instead.
26650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26651  if test "x$has_forbidden_chars" != x; then
26652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26656      # Going to short mode and back again did indeed matter. Since short mode is
26657      # case insensitive, let's make it lowercase to improve readability.
26658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26659      # Now convert it back to Unix-stile (cygpath)
26660      input_path=`$CYGPATH -u "$shortmode_path"`
26661      new_path="$input_path"
26662    fi
26663  fi
26664
26665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26666  if test "x$test_cygdrive_prefix" = x; then
26667    # As a simple fix, exclude /usr/bin since it's not a real path.
26668    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26670      # a path prefixed by /cygdrive for fixpath to work.
26671      new_path="$CYGWIN_ROOT_PATH$input_path"
26672    fi
26673  fi
26674
26675  # remove trailing .exe if any
26676  new_path="${new_path/%.exe/}"
26677
26678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26679
26680  # First separate the path from the arguments. This will split at the first
26681  # space.
26682  complete="$OBJDUMP"
26683  path="${complete%% *}"
26684  tmp="$complete EOL"
26685  arguments="${tmp#* }"
26686
26687  # Input might be given as Windows format, start by converting to
26688  # unix format.
26689  new_path="$path"
26690
26691  windows_path="$new_path"
26692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26693    unix_path=`$CYGPATH -u "$windows_path"`
26694    new_path="$unix_path"
26695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26697    new_path="$unix_path"
26698  fi
26699
26700
26701  # Now try to locate executable using which
26702  new_path=`$WHICH "$new_path" 2> /dev/null`
26703
26704  if test "x$new_path" = x; then
26705    # Oops. Which didn't find the executable.
26706    # The splitting of arguments from the executable at a space might have been incorrect,
26707    # since paths with space are more likely in Windows. Give it another try with the whole
26708    # argument.
26709    path="$complete"
26710    arguments="EOL"
26711    new_path="$path"
26712
26713  windows_path="$new_path"
26714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26715    unix_path=`$CYGPATH -u "$windows_path"`
26716    new_path="$unix_path"
26717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26719    new_path="$unix_path"
26720  fi
26721
26722
26723    new_path=`$WHICH "$new_path" 2> /dev/null`
26724
26725    if test "x$new_path" = x; then
26726      # It's still not found. Now this is an unrecoverable error.
26727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26728$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26729      has_space=`$ECHO "$complete" | $GREP " "`
26730      if test "x$has_space" != x; then
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26733      fi
26734      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26735    fi
26736  fi
26737
26738  # Now new_path has a complete unix path to the binary
26739  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26740    # Keep paths in /bin as-is, but remove trailing .exe if any
26741    new_path="${new_path/%.exe/}"
26742    # Do not save /bin paths to all_fixpath_prefixes!
26743  else
26744    # Not in mixed or Windows style, start by that.
26745    new_path=`cmd //c echo $new_path`
26746
26747  input_path="$new_path"
26748  # Check if we need to convert this using DOS-style short mode. If the path
26749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26750  # take no chances and rewrite it.
26751  # Note: m4 eats our [], so we need to use [ and ] instead.
26752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26753  if test "x$has_forbidden_chars" != x; then
26754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26756  fi
26757
26758    # Output is in $new_path
26759
26760  windows_path="$new_path"
26761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26762    unix_path=`$CYGPATH -u "$windows_path"`
26763    new_path="$unix_path"
26764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26766    new_path="$unix_path"
26767  fi
26768
26769    # remove trailing .exe if any
26770    new_path="${new_path/%.exe/}"
26771
26772    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26773    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26774  fi
26775
26776  else
26777    # We're on a posix platform. Hooray! :)
26778    # First separate the path from the arguments. This will split at the first
26779    # space.
26780    complete="$OBJDUMP"
26781    path="${complete%% *}"
26782    tmp="$complete EOL"
26783    arguments="${tmp#* }"
26784
26785    # Cannot rely on the command "which" here since it doesn't always work.
26786    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26787    if test -z "$is_absolute_path"; then
26788      # Path to executable is not absolute. Find it.
26789      IFS_save="$IFS"
26790      IFS=:
26791      for p in $PATH; do
26792        if test -f "$p/$path" && test -x "$p/$path"; then
26793          new_path="$p/$path"
26794          break
26795        fi
26796      done
26797      IFS="$IFS_save"
26798    else
26799      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26800$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26801      new_path="$path"
26802    fi
26803
26804    if test "x$new_path" = x; then
26805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26806$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26807        has_space=`$ECHO "$complete" | $GREP " "`
26808        if test "x$has_space" != x; then
26809          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26810$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26811        fi
26812        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26813      fi
26814  fi
26815
26816      # Now join together the path and the arguments once again
26817      if test "x$arguments" != xEOL; then
26818        new_complete="$new_path ${arguments% *}"
26819      else
26820        new_complete="$new_path"
26821      fi
26822
26823  if test "x$complete" != "x$new_complete"; then
26824      OBJDUMP="$new_complete"
26825      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26826$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26827    fi
26828
26829fi
26830
26831if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26832   # Extract the first word of "lipo", so it can be a program name with args.
26833set dummy lipo; ac_word=$2
26834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26835$as_echo_n "checking for $ac_word... " >&6; }
26836if test "${ac_cv_path_LIPO+set}" = set; then :
26837  $as_echo_n "(cached) " >&6
26838else
26839  case $LIPO in
26840  [\\/]* | ?:[\\/]*)
26841  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26842  ;;
26843  *)
26844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26845for as_dir in $PATH
26846do
26847  IFS=$as_save_IFS
26848  test -z "$as_dir" && as_dir=.
26849    for ac_exec_ext in '' $ac_executable_extensions; do
26850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26851    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26853    break 2
26854  fi
26855done
26856  done
26857IFS=$as_save_IFS
26858
26859  ;;
26860esac
26861fi
26862LIPO=$ac_cv_path_LIPO
26863if test -n "$LIPO"; then
26864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26865$as_echo "$LIPO" >&6; }
26866else
26867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26868$as_echo "no" >&6; }
26869fi
26870
26871
26872
26873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26874
26875  # First separate the path from the arguments. This will split at the first
26876  # space.
26877  complete="$LIPO"
26878  path="${complete%% *}"
26879  tmp="$complete EOL"
26880  arguments="${tmp#* }"
26881
26882  # Input might be given as Windows format, start by converting to
26883  # unix format.
26884  new_path=`$CYGPATH -u "$path"`
26885
26886  # Now try to locate executable using which
26887  new_path=`$WHICH "$new_path" 2> /dev/null`
26888  # bat and cmd files are not always considered executable in cygwin causing which
26889  # to not find them
26890  if test "x$new_path" = x \
26891           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26892           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26893    new_path=`$CYGPATH -u "$path"`
26894  fi
26895  if test "x$new_path" = x; then
26896    # Oops. Which didn't find the executable.
26897    # The splitting of arguments from the executable at a space might have been incorrect,
26898    # since paths with space are more likely in Windows. Give it another try with the whole
26899    # argument.
26900    path="$complete"
26901    arguments="EOL"
26902    new_path=`$CYGPATH -u "$path"`
26903    new_path=`$WHICH "$new_path" 2> /dev/null`
26904    # bat and cmd files are not always considered executable in cygwin causing which
26905    # to not find them
26906    if test "x$new_path" = x \
26907             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26908             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26909      new_path=`$CYGPATH -u "$path"`
26910    fi
26911    if test "x$new_path" = x; then
26912      # It's still not found. Now this is an unrecoverable error.
26913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26914$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26915      has_space=`$ECHO "$complete" | $GREP " "`
26916      if test "x$has_space" != x; then
26917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26919      fi
26920      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26921    fi
26922  fi
26923
26924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26927  # "foo.exe" is OK but "foo" is an error.
26928  #
26929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26930  # It is also a way to make sure we got the proper file name for the real test later on.
26931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26932  if test "x$test_shortpath" = x; then
26933    # Short path failed, file does not exist as specified.
26934    # Try adding .exe or .cmd
26935    if test -f "${new_path}.exe"; then
26936       input_to_shortpath="${new_path}.exe"
26937    elif test -f "${new_path}.cmd"; then
26938       input_to_shortpath="${new_path}.cmd"
26939    else
26940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26941$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26942      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26943$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26944      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26945    fi
26946  else
26947    input_to_shortpath="$new_path"
26948  fi
26949
26950  # Call helper function which possibly converts this using DOS-style short mode.
26951  # If so, the updated path is stored in $new_path.
26952  new_path="$input_to_shortpath"
26953
26954  input_path="$input_to_shortpath"
26955  # Check if we need to convert this using DOS-style short mode. If the path
26956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26957  # take no chances and rewrite it.
26958  # Note: m4 eats our [], so we need to use [ and ] instead.
26959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26960  if test "x$has_forbidden_chars" != x; then
26961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26965      # Going to short mode and back again did indeed matter. Since short mode is
26966      # case insensitive, let's make it lowercase to improve readability.
26967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26968      # Now convert it back to Unix-stile (cygpath)
26969      input_path=`$CYGPATH -u "$shortmode_path"`
26970      new_path="$input_path"
26971    fi
26972  fi
26973
26974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26975  if test "x$test_cygdrive_prefix" = x; then
26976    # As a simple fix, exclude /usr/bin since it's not a real path.
26977    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26979      # a path prefixed by /cygdrive for fixpath to work.
26980      new_path="$CYGWIN_ROOT_PATH$input_path"
26981    fi
26982  fi
26983
26984  # remove trailing .exe if any
26985  new_path="${new_path/%.exe/}"
26986
26987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26988
26989  # First separate the path from the arguments. This will split at the first
26990  # space.
26991  complete="$LIPO"
26992  path="${complete%% *}"
26993  tmp="$complete EOL"
26994  arguments="${tmp#* }"
26995
26996  # Input might be given as Windows format, start by converting to
26997  # unix format.
26998  new_path="$path"
26999
27000  windows_path="$new_path"
27001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27002    unix_path=`$CYGPATH -u "$windows_path"`
27003    new_path="$unix_path"
27004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27006    new_path="$unix_path"
27007  fi
27008
27009
27010  # Now try to locate executable using which
27011  new_path=`$WHICH "$new_path" 2> /dev/null`
27012
27013  if test "x$new_path" = x; then
27014    # Oops. Which didn't find the executable.
27015    # The splitting of arguments from the executable at a space might have been incorrect,
27016    # since paths with space are more likely in Windows. Give it another try with the whole
27017    # argument.
27018    path="$complete"
27019    arguments="EOL"
27020    new_path="$path"
27021
27022  windows_path="$new_path"
27023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27024    unix_path=`$CYGPATH -u "$windows_path"`
27025    new_path="$unix_path"
27026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27028    new_path="$unix_path"
27029  fi
27030
27031
27032    new_path=`$WHICH "$new_path" 2> /dev/null`
27033
27034    if test "x$new_path" = x; then
27035      # It's still not found. Now this is an unrecoverable error.
27036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27037$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27038      has_space=`$ECHO "$complete" | $GREP " "`
27039      if test "x$has_space" != x; then
27040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27042      fi
27043      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27044    fi
27045  fi
27046
27047  # Now new_path has a complete unix path to the binary
27048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27049    # Keep paths in /bin as-is, but remove trailing .exe if any
27050    new_path="${new_path/%.exe/}"
27051    # Do not save /bin paths to all_fixpath_prefixes!
27052  else
27053    # Not in mixed or Windows style, start by that.
27054    new_path=`cmd //c echo $new_path`
27055
27056  input_path="$new_path"
27057  # Check if we need to convert this using DOS-style short mode. If the path
27058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27059  # take no chances and rewrite it.
27060  # Note: m4 eats our [], so we need to use [ and ] instead.
27061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27062  if test "x$has_forbidden_chars" != x; then
27063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27065  fi
27066
27067    # Output is in $new_path
27068
27069  windows_path="$new_path"
27070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27071    unix_path=`$CYGPATH -u "$windows_path"`
27072    new_path="$unix_path"
27073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27075    new_path="$unix_path"
27076  fi
27077
27078    # remove trailing .exe if any
27079    new_path="${new_path/%.exe/}"
27080
27081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27083  fi
27084
27085  else
27086    # We're on a posix platform. Hooray! :)
27087    # First separate the path from the arguments. This will split at the first
27088    # space.
27089    complete="$LIPO"
27090    path="${complete%% *}"
27091    tmp="$complete EOL"
27092    arguments="${tmp#* }"
27093
27094    # Cannot rely on the command "which" here since it doesn't always work.
27095    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27096    if test -z "$is_absolute_path"; then
27097      # Path to executable is not absolute. Find it.
27098      IFS_save="$IFS"
27099      IFS=:
27100      for p in $PATH; do
27101        if test -f "$p/$path" && test -x "$p/$path"; then
27102          new_path="$p/$path"
27103          break
27104        fi
27105      done
27106      IFS="$IFS_save"
27107    else
27108      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27109$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27110      new_path="$path"
27111    fi
27112
27113    if test "x$new_path" = x; then
27114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27115$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27116        has_space=`$ECHO "$complete" | $GREP " "`
27117        if test "x$has_space" != x; then
27118          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27119$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27120        fi
27121        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27122      fi
27123  fi
27124
27125      # Now join together the path and the arguments once again
27126      if test "x$arguments" != xEOL; then
27127        new_complete="$new_path ${arguments% *}"
27128      else
27129        new_complete="$new_path"
27130      fi
27131
27132  if test "x$complete" != "x$new_complete"; then
27133      LIPO="$new_complete"
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27135$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27136    fi
27137
27138fi
27139
27140# Restore old path without tools dir
27141PATH="$OLD_PATH"
27142
27143
27144# FIXME: Currently we must test this after paths but before flags. Fix!
27145
27146# And we can test some aspects on the target using configure macros.
27147
27148
27149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27150$as_echo_n "checking for ANSI C header files... " >&6; }
27151if test "${ac_cv_header_stdc+set}" = set; then :
27152  $as_echo_n "(cached) " >&6
27153else
27154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27155/* end confdefs.h.  */
27156#include <stdlib.h>
27157#include <stdarg.h>
27158#include <string.h>
27159#include <float.h>
27160
27161int
27162main ()
27163{
27164
27165  ;
27166  return 0;
27167}
27168_ACEOF
27169if ac_fn_cxx_try_compile "$LINENO"; then :
27170  ac_cv_header_stdc=yes
27171else
27172  ac_cv_header_stdc=no
27173fi
27174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27175
27176if test $ac_cv_header_stdc = yes; then
27177  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27179/* end confdefs.h.  */
27180#include <string.h>
27181
27182_ACEOF
27183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27184  $EGREP "memchr" >/dev/null 2>&1; then :
27185
27186else
27187  ac_cv_header_stdc=no
27188fi
27189rm -f conftest*
27190
27191fi
27192
27193if test $ac_cv_header_stdc = yes; then
27194  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27196/* end confdefs.h.  */
27197#include <stdlib.h>
27198
27199_ACEOF
27200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27201  $EGREP "free" >/dev/null 2>&1; then :
27202
27203else
27204  ac_cv_header_stdc=no
27205fi
27206rm -f conftest*
27207
27208fi
27209
27210if test $ac_cv_header_stdc = yes; then
27211  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27212  if test "$cross_compiling" = yes; then :
27213  :
27214else
27215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27216/* end confdefs.h.  */
27217#include <ctype.h>
27218#include <stdlib.h>
27219#if ((' ' & 0x0FF) == 0x020)
27220# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27221# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27222#else
27223# define ISLOWER(c) \
27224		   (('a' <= (c) && (c) <= 'i') \
27225		     || ('j' <= (c) && (c) <= 'r') \
27226		     || ('s' <= (c) && (c) <= 'z'))
27227# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27228#endif
27229
27230#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27231int
27232main ()
27233{
27234  int i;
27235  for (i = 0; i < 256; i++)
27236    if (XOR (islower (i), ISLOWER (i))
27237	|| toupper (i) != TOUPPER (i))
27238      return 2;
27239  return 0;
27240}
27241_ACEOF
27242if ac_fn_cxx_try_run "$LINENO"; then :
27243
27244else
27245  ac_cv_header_stdc=no
27246fi
27247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27248  conftest.$ac_objext conftest.beam conftest.$ac_ext
27249fi
27250
27251fi
27252fi
27253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27254$as_echo "$ac_cv_header_stdc" >&6; }
27255if test $ac_cv_header_stdc = yes; then
27256
27257$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27258
27259fi
27260
27261# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27262for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27263		  inttypes.h stdint.h unistd.h
27264do :
27265  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27266ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27267"
27268if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27269  cat >>confdefs.h <<_ACEOF
27270#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27271_ACEOF
27272
27273fi
27274
27275done
27276
27277
27278
27279###############################################################################
27280#
27281# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27282# (The JVM can use 32 or 64 bit Java pointers but that decision
27283# is made at runtime.)
27284#
27285if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27286  # Always specify -m flags on Solaris
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
27302elif test "x$COMPILE_TYPE" = xreduced; then
27303  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27304    # Specify -m if running reduced on other Posix platforms
27305
27306  # keep track of c/cxx flags that we added outselves...
27307  #   to prevent emitting warning...
27308  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27309  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27310  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27311
27312  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27313  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27314  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27315
27316  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27317  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27318  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27319
27320  fi
27321fi
27322
27323# Make compilation sanity check
27324for ac_header in stdio.h
27325do :
27326  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27327if test "x$ac_cv_header_stdio_h" = x""yes; then :
27328  cat >>confdefs.h <<_ACEOF
27329#define HAVE_STDIO_H 1
27330_ACEOF
27331
27332else
27333
27334  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27335$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27336  if test "x$COMPILE_TYPE" = xreduced; then
27337    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27338$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27339  elif test "x$COMPILE_TYPE" = xcross; then
27340    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27341$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27342  fi
27343  as_fn_error $? "Cannot continue." "$LINENO" 5
27344
27345fi
27346
27347done
27348
27349
27350# The cast to long int works around a bug in the HP C Compiler
27351# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27352# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27353# This bug is HP SR number 8606223364.
27354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27355$as_echo_n "checking size of int *... " >&6; }
27356if test "${ac_cv_sizeof_int_p+set}" = set; then :
27357  $as_echo_n "(cached) " >&6
27358else
27359  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27360
27361else
27362  if test "$ac_cv_type_int_p" = yes; then
27363     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27365as_fn_error 77 "cannot compute sizeof (int *)
27366See \`config.log' for more details" "$LINENO" 5 ; }
27367   else
27368     ac_cv_sizeof_int_p=0
27369   fi
27370fi
27371
27372fi
27373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27374$as_echo "$ac_cv_sizeof_int_p" >&6; }
27375
27376
27377
27378cat >>confdefs.h <<_ACEOF
27379#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27380_ACEOF
27381
27382
27383
27384if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27385  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27386  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27387fi
27388
27389if test "x$SIZEOF_INT_P" = x; then
27390    # The test failed, lets stick to the assumed value.
27391    { $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
27392$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27393else
27394    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27395
27396    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27397        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
27398    fi
27399fi
27400
27401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27402$as_echo_n "checking for target address size... " >&6; }
27403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27404$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27405
27406
27407###############################################################################
27408#
27409# Is the target little of big endian?
27410#
27411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27412$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27413if test "${ac_cv_c_bigendian+set}" = set; then :
27414  $as_echo_n "(cached) " >&6
27415else
27416  ac_cv_c_bigendian=unknown
27417    # See if we're dealing with a universal compiler.
27418    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27419/* end confdefs.h.  */
27420#ifndef __APPLE_CC__
27421	       not a universal capable compiler
27422	     #endif
27423	     typedef int dummy;
27424
27425_ACEOF
27426if ac_fn_cxx_try_compile "$LINENO"; then :
27427
27428	# Check for potential -arch flags.  It is not universal unless
27429	# there are at least two -arch flags with different values.
27430	ac_arch=
27431	ac_prev=
27432	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27433	 if test -n "$ac_prev"; then
27434	   case $ac_word in
27435	     i?86 | x86_64 | ppc | ppc64)
27436	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27437		 ac_arch=$ac_word
27438	       else
27439		 ac_cv_c_bigendian=universal
27440		 break
27441	       fi
27442	       ;;
27443	   esac
27444	   ac_prev=
27445	 elif test "x$ac_word" = "x-arch"; then
27446	   ac_prev=arch
27447	 fi
27448       done
27449fi
27450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27451    if test $ac_cv_c_bigendian = unknown; then
27452      # See if sys/param.h defines the BYTE_ORDER macro.
27453      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27454/* end confdefs.h.  */
27455#include <sys/types.h>
27456	     #include <sys/param.h>
27457
27458int
27459main ()
27460{
27461#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27462		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27463		     && LITTLE_ENDIAN)
27464	      bogus endian macros
27465	     #endif
27466
27467  ;
27468  return 0;
27469}
27470_ACEOF
27471if ac_fn_cxx_try_compile "$LINENO"; then :
27472  # It does; now see whether it defined to BIG_ENDIAN or not.
27473	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27474/* end confdefs.h.  */
27475#include <sys/types.h>
27476		#include <sys/param.h>
27477
27478int
27479main ()
27480{
27481#if BYTE_ORDER != BIG_ENDIAN
27482		 not big endian
27483		#endif
27484
27485  ;
27486  return 0;
27487}
27488_ACEOF
27489if ac_fn_cxx_try_compile "$LINENO"; then :
27490  ac_cv_c_bigendian=yes
27491else
27492  ac_cv_c_bigendian=no
27493fi
27494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27495fi
27496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27497    fi
27498    if test $ac_cv_c_bigendian = unknown; then
27499      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27500      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27501/* end confdefs.h.  */
27502#include <limits.h>
27503
27504int
27505main ()
27506{
27507#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27508	      bogus endian macros
27509	     #endif
27510
27511  ;
27512  return 0;
27513}
27514_ACEOF
27515if ac_fn_cxx_try_compile "$LINENO"; then :
27516  # It does; now see whether it defined to _BIG_ENDIAN or not.
27517	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27518/* end confdefs.h.  */
27519#include <limits.h>
27520
27521int
27522main ()
27523{
27524#ifndef _BIG_ENDIAN
27525		 not big endian
27526		#endif
27527
27528  ;
27529  return 0;
27530}
27531_ACEOF
27532if ac_fn_cxx_try_compile "$LINENO"; then :
27533  ac_cv_c_bigendian=yes
27534else
27535  ac_cv_c_bigendian=no
27536fi
27537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27538fi
27539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27540    fi
27541    if test $ac_cv_c_bigendian = unknown; then
27542      # Compile a test program.
27543      if test "$cross_compiling" = yes; then :
27544  # Try to guess by grepping values from an object file.
27545	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27546/* end confdefs.h.  */
27547short int ascii_mm[] =
27548		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27549		short int ascii_ii[] =
27550		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27551		int use_ascii (int i) {
27552		  return ascii_mm[i] + ascii_ii[i];
27553		}
27554		short int ebcdic_ii[] =
27555		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27556		short int ebcdic_mm[] =
27557		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27558		int use_ebcdic (int i) {
27559		  return ebcdic_mm[i] + ebcdic_ii[i];
27560		}
27561		extern int foo;
27562
27563int
27564main ()
27565{
27566return use_ascii (foo) == use_ebcdic (foo);
27567  ;
27568  return 0;
27569}
27570_ACEOF
27571if ac_fn_cxx_try_compile "$LINENO"; then :
27572  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27573	      ac_cv_c_bigendian=yes
27574	    fi
27575	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27576	      if test "$ac_cv_c_bigendian" = unknown; then
27577		ac_cv_c_bigendian=no
27578	      else
27579		# finding both strings is unlikely to happen, but who knows?
27580		ac_cv_c_bigendian=unknown
27581	      fi
27582	    fi
27583fi
27584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27585else
27586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27587/* end confdefs.h.  */
27588$ac_includes_default
27589int
27590main ()
27591{
27592
27593	     /* Are we little or big endian?  From Harbison&Steele.  */
27594	     union
27595	     {
27596	       long int l;
27597	       char c[sizeof (long int)];
27598	     } u;
27599	     u.l = 1;
27600	     return u.c[sizeof (long int) - 1] == 1;
27601
27602  ;
27603  return 0;
27604}
27605_ACEOF
27606if ac_fn_cxx_try_run "$LINENO"; then :
27607  ac_cv_c_bigendian=no
27608else
27609  ac_cv_c_bigendian=yes
27610fi
27611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27612  conftest.$ac_objext conftest.beam conftest.$ac_ext
27613fi
27614
27615    fi
27616fi
27617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27618$as_echo "$ac_cv_c_bigendian" >&6; }
27619 case $ac_cv_c_bigendian in #(
27620   yes)
27621     ENDIAN="big";; #(
27622   no)
27623     ENDIAN="little" ;; #(
27624   universal)
27625     ENDIAN="universal_endianness"
27626     ;; #(
27627   *)
27628     ENDIAN="unknown" ;;
27629 esac
27630
27631
27632if test "x$ENDIAN" = xuniversal_endianness; then
27633    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27634fi
27635if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27636    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
27637fi
27638
27639
27640# Configure flags for the tools
27641
27642
27643###############################################################################
27644#
27645# How to compile shared libraries.
27646#
27647
27648if test "x$GCC" = xyes; then
27649    COMPILER_NAME=gcc
27650    PICFLAG="-fPIC"
27651    LIBRARY_PREFIX=lib
27652    SHARED_LIBRARY='lib$1.so'
27653    STATIC_LIBRARY='lib$1.a'
27654    SHARED_LIBRARY_FLAGS="-shared"
27655    SHARED_LIBRARY_SUFFIX='.so'
27656    STATIC_LIBRARY_SUFFIX='.a'
27657    OBJ_SUFFIX='.o'
27658    EXE_SUFFIX=''
27659    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27660    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27661    C_FLAG_REORDER=''
27662    CXX_FLAG_REORDER=''
27663    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27664    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27665    LD="$CC"
27666    LDEXE="$CC"
27667    LDCXX="$CXX"
27668    LDEXECXX="$CXX"
27669    POST_STRIP_CMD="$STRIP -g"
27670
27671    # Linking is different on MacOSX
27672    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27673        # Might change in the future to clang.
27674        COMPILER_NAME=gcc
27675        SHARED_LIBRARY='lib$1.dylib'
27676        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27677        SHARED_LIBRARY_SUFFIX='.dylib'
27678        EXE_SUFFIX=''
27679        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27680        SET_SHARED_LIBRARY_MAPFILE=''
27681        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27682        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27683        POST_STRIP_CMD="$STRIP -S"
27684    fi
27685else
27686    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27687        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27688        COMPILER_NAME=ossc
27689        PICFLAG="-KPIC"
27690        LIBRARY_PREFIX=lib
27691        SHARED_LIBRARY='lib$1.so'
27692        STATIC_LIBRARY='lib$1.a'
27693        SHARED_LIBRARY_FLAGS="-G"
27694        SHARED_LIBRARY_SUFFIX='.so'
27695        STATIC_LIBRARY_SUFFIX='.a'
27696        OBJ_SUFFIX='.o'
27697        EXE_SUFFIX=''
27698        SET_SHARED_LIBRARY_NAME=''
27699        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27700	C_FLAG_REORDER='-xF'
27701	CXX_FLAG_REORDER='-xF'
27702        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27703        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27704        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27705        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27706        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27707        POST_STRIP_CMD="$STRIP -x"
27708        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27709    fi
27710    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27711        # If it is not gcc, then assume it is the MS Visual Studio compiler
27712        COMPILER_NAME=cl
27713        PICFLAG=""
27714        LIBRARY_PREFIX=
27715        SHARED_LIBRARY='$1.dll'
27716        STATIC_LIBRARY='$1.lib'
27717        SHARED_LIBRARY_FLAGS="-LD"
27718        SHARED_LIBRARY_SUFFIX='.dll'
27719        STATIC_LIBRARY_SUFFIX='.lib'
27720        OBJ_SUFFIX='.obj'
27721        EXE_SUFFIX='.exe'
27722        SET_SHARED_LIBRARY_NAME=''
27723        SET_SHARED_LIBRARY_MAPFILE=''
27724        SET_SHARED_LIBRARY_ORIGIN=''
27725        SET_EXECUTABLE_ORIGIN=''
27726    fi
27727fi
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746# The (cross) compiler is now configured, we can now test capabilities
27747# of the target platform.
27748
27749
27750
27751###############################################################################
27752#
27753# Setup the opt flags for different compilers
27754# and different operating systems.
27755#
27756
27757#
27758# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27759#
27760if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27761    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27762    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27763    CFLAGS="$CFLAGS -mstackrealign"
27764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27765$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27766    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27767/* end confdefs.h.  */
27768int main() { return 0; }
27769_ACEOF
27770if ac_fn_cxx_try_link "$LINENO"; then :
27771
27772		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27773$as_echo "yes" >&6; }
27774
27775else
27776
27777		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27778$as_echo "no" >&6; }
27779	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27780
27781fi
27782rm -f core conftest.err conftest.$ac_objext \
27783    conftest$ac_exeext conftest.$ac_ext
27784fi
27785
27786C_FLAG_DEPS="-MMD -MF"
27787CXX_FLAG_DEPS="-MMD -MF"
27788
27789case $COMPILER_TYPE in
27790  CC )
27791    D_FLAG="-g"
27792    case $COMPILER_NAME in
27793      gcc )
27794      	case $OPENJDK_TARGET_OS in
27795	  macosx )
27796	    # On MacOSX we optimize for size, something
27797	    # we should do for all platforms?
27798	    C_O_FLAG_HI="-Os"
27799	    C_O_FLAG_NORM="-Os"
27800	    C_O_FLAG_NONE=""
27801	    ;;
27802	  *)
27803	    C_O_FLAG_HI="-O3"
27804	    C_O_FLAG_NORM="-O2"
27805	    C_O_FLAG_NONE="-O0"
27806	    CFLAGS_DEBUG_SYMBOLS="-g"
27807	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27808	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27809	       CFLAGS_DEBUG_SYMBOLS="-g1"
27810	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27811	    fi
27812	    ;;
27813	esac
27814        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27815        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27816        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27817        ;;
27818      ossc )
27819        #
27820        # Forte has different names for this with their C++ compiler...
27821        #
27822        C_FLAG_DEPS="-xMMD -xMF"
27823        CXX_FLAG_DEPS="-xMMD -xMF"
27824
27825        # Extra options used with HIGHEST
27826        #
27827        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27828        #          done with care, there are some assumptions below that need to
27829        #          be understood about the use of pointers, and IEEE behavior.
27830        #
27831        # Use non-standard floating point mode (not IEEE 754)
27832        CC_HIGHEST="$CC_HIGHEST -fns"
27833        # Do some simplification of floating point arithmetic (not IEEE 754)
27834        CC_HIGHEST="$CC_HIGHEST -fsimple"
27835        # Use single precision floating point with 'float'
27836        CC_HIGHEST="$CC_HIGHEST -fsingle"
27837        # Assume memory references via basic pointer types do not alias
27838        #   (Source with excessing pointer casting and data access with mixed
27839        #    pointer types are not recommended)
27840        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27841        # Use intrinsic or inline versions for math/std functions
27842        #   (If you expect perfect errno behavior, do not use this)
27843        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27844        # Loop data dependency optimizations (need -xO3 or higher)
27845        CC_HIGHEST="$CC_HIGHEST -xdepend"
27846        # Pointer parameters to functions do not overlap
27847        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27848        #    If you pass in multiple pointers to the same data, do not use this)
27849        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27850        # Inline some library routines
27851        #   (If you expect perfect errno behavior, do not use this)
27852        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27853        # Use optimized math routines
27854        #   (If you expect perfect errno behavior, do not use this)
27855        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27856        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27857
27858        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27859          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27860          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27861        fi
27862
27863        case $OPENJDK_TARGET_CPU_ARCH in
27864          x86)
27865            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27866            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27867            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27868            C_O_FLAG_NONE="-xregs=no%frameptr"
27869            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27870            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27871            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27872            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27873            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27874               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27875               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27876            fi
27877            ;;
27878          sparc)
27879            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27880            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27881            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27882            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27883            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27884            C_O_FLAG_NONE=""
27885            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27886            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27887            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27888            CXX_O_FLAG_NONE=""
27889            ;;
27890        esac
27891
27892    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27893    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27894    esac
27895    ;;
27896  CL )
27897    D_FLAG=
27898    C_O_FLAG_HIGHEST="-O2"
27899    C_O_FLAG_HI="-O1"
27900    C_O_FLAG_NORM="-O1"
27901    C_O_FLAG_NONE="-Od"
27902    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27903    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27904    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27905    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27906    ;;
27907esac
27908
27909if test -z "$C_O_FLAG_HIGHEST"; then
27910   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27911fi
27912
27913if test -z "$CXX_O_FLAG_HIGHEST"; then
27914   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27915fi
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27931   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27932$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27933fi
27934
27935if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27936   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27937$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27938fi
27939
27940if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27941   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27942$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27943fi
27944
27945
27946# Check whether --with-extra-cflags was given.
27947if test "${with_extra_cflags+set}" = set; then :
27948  withval=$with_extra_cflags;
27949fi
27950
27951
27952
27953# Check whether --with-extra-cxxflags was given.
27954if test "${with_extra_cxxflags+set}" = set; then :
27955  withval=$with_extra_cxxflags;
27956fi
27957
27958
27959
27960# Check whether --with-extra-ldflags was given.
27961if test "${with_extra_ldflags+set}" = set; then :
27962  withval=$with_extra_ldflags;
27963fi
27964
27965
27966CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27967CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27968LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27969
27970# Hotspot needs these set in their legacy form
27971LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27972LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27973LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27974
27975
27976
27977
27978
27979###############################################################################
27980#
27981# Now setup the CFLAGS and LDFLAGS for the JDK build.
27982# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27983#
27984case $COMPILER_NAME in
27985      gcc )
27986      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27987                          -pipe \
27988                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27989	  case $OPENJDK_TARGET_CPU_ARCH in
27990	  arm )
27991            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27992	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27993	  ;;
27994	  ppc )
27995            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27996	  ;;
27997	  * )
27998	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27999	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28000          ;;
28001	  esac
28002          ;;
28003      ossc )
28004          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28005          case $OPENJDK_TARGET_CPU_ARCH in
28006          x86 )
28007            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28008       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28009          ;;
28010          esac
28011
28012      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28013      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28014
28015          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28016          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28017          ;;
28018      cl )
28019          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28020               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28021	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28022	       -DWIN32 -DIAL"
28023          case $OPENJDK_TARGET_CPU in
28024              x86 )
28025                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28026                  ;;
28027              x86_64 )
28028                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28029                  ;;
28030          esac
28031          ;;
28032esac
28033
28034###############################################################################
28035
28036CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28037
28038# The package path is used only on macosx?
28039PACKAGE_PATH=/opt/local
28040
28041
28042if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28043    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28044    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28045    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28046    #   Note: -Dmacro         is the same as    #define macro 1
28047    #         -Dmacro=	    is the same as    #define macro
28048    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28049        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28050    else
28051        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28052    fi
28053else
28054    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28055fi
28056if test "x$OPENJDK_TARGET_OS" = xlinux; then
28057    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28058fi
28059if test "x$OPENJDK_TARGET_OS" = xwindows; then
28060    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28061fi
28062if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28063    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28064fi
28065if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28066    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28067fi
28068if test "x$OPENJDK_TARGET_OS" = xbsd; then
28069    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28070fi
28071if test "x$DEBUG_LEVEL" = xrelease; then
28072    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28073    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28074        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28075    fi
28076else
28077    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28078fi
28079
28080CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28081CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28082
28083CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28084        -I${JDK_OUTPUTDIR}/include \
28085        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28086        -I${JDK_TOPDIR}/src/share/javavm/export \
28087        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28088        -I${JDK_TOPDIR}/src/share/native/common \
28089        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28090
28091# The shared libraries are compiled using the picflag.
28092CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28093CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28094
28095# Executable flags
28096CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28097CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28098
28099# Now this is odd. The JDK native libraries have to link against libjvm.so
28100# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28101# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28102# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28103# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28104# libraries will link to whatever is in memory. Yuck.
28105#
28106# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28107if test "x$COMPILER_NAME" = xcl; then
28108    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28109    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28110        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28111    fi
28112    # TODO: make -debug optional "--disable-full-debug-symbols"
28113    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28114    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28115    LDFLAGS_JDKLIB_SUFFIX=""
28116    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28117        LDFLAGS_STACK_SIZE=1048576
28118    else
28119        LDFLAGS_STACK_SIZE=327680
28120    fi
28121    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28122else
28123    if test "x$COMPILER_NAME" = xgcc; then
28124        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28125        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28126        if test -n "$HAS_GNU_HASH"; then
28127            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28128        fi
28129        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28130          # And since we now know that the linker is gnu, then add -z defs, to forbid
28131          # undefined symbols in object files.
28132          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28133          if test "x$DEBUG_LEVEL" = "xrelease"; then
28134              # When building release libraries, tell the linker optimize them.
28135              # Should this be supplied to the OSS linker as well?
28136              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28137          fi
28138        fi
28139    fi
28140    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28141                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28142
28143    # On some platforms (mac) the linker warns about non existing -L dirs.
28144    # Add server first if available. Linking aginst client does not always produce the same results.
28145    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28146    # Default to server for other variants.
28147    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28148        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28149    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28150        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28151    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28152        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28153    else
28154        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28155    fi
28156
28157    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28158    if test "x$COMPILER_NAME" = xossc; then
28159        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28160    fi
28161
28162    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28163    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28164        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28165    fi
28166fi
28167
28168# Adjust flags according to debug level.
28169case $DEBUG_LEVEL in
28170      fastdebug )
28171              CFLAGS="$CFLAGS $D_FLAG"
28172              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28173              ;;
28174      slowdebug )
28175              CFLAGS="$CFLAGS $D_FLAG"
28176	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28177	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28178	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28179	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28180              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28181              ;;
28182esac
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198# Setup debug symbols (need objcopy from the toolchain for that)
28199
28200#
28201# ENABLE_DEBUG_SYMBOLS
28202# This must be done after the toolchain is setup, since we're looking at objcopy.
28203#
28204# Check whether --enable-debug-symbols was given.
28205if test "${enable_debug_symbols+set}" = set; then :
28206  enableval=$enable_debug_symbols;
28207fi
28208
28209
28210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28211$as_echo_n "checking if we should generate debug symbols... " >&6; }
28212
28213if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28214   # explicit enabling of enable-debug-symbols and can't find objcopy
28215   #   this is an error
28216   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28217fi
28218
28219if test "x$enable_debug_symbols" = "xyes"; then
28220  ENABLE_DEBUG_SYMBOLS=true
28221elif test "x$enable_debug_symbols" = "xno"; then
28222  ENABLE_DEBUG_SYMBOLS=false
28223else
28224  # default on macosx is false
28225  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28226    ENABLE_DEBUG_SYMBOLS=false
28227  # Default is on if objcopy is found, otherwise off
28228  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28229    ENABLE_DEBUG_SYMBOLS=true
28230  else
28231    ENABLE_DEBUG_SYMBOLS=false
28232  fi
28233fi
28234
28235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28236$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28237
28238#
28239# ZIP_DEBUGINFO_FILES
28240#
28241# Check whether --enable-zip-debug-info was given.
28242if test "${enable_zip_debug_info+set}" = set; then :
28243  enableval=$enable_zip_debug_info;
28244fi
28245
28246
28247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28248$as_echo_n "checking if we should zip debug-info files... " >&6; }
28249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28250$as_echo "${enable_zip_debug_info}" >&6; }
28251
28252if test "x${enable_zip_debug_info}" = "xno"; then
28253   ZIP_DEBUGINFO_FILES=false
28254else
28255   ZIP_DEBUGINFO_FILES=true
28256fi
28257
28258
28259
28260
28261
28262
28263
28264###############################################################################
28265#
28266# Check dependencies for external and internal libraries.
28267#
28268###############################################################################
28269
28270
28271
28272###############################################################################
28273#
28274# OS specific settings that we never will need to probe.
28275#
28276if test "x$OPENJDK_TARGET_OS" = xlinux; then
28277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28278$as_echo_n "checking what is not needed on Linux?... " >&6; }
28279    PULSE_NOT_NEEDED=yes
28280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28281$as_echo "pulse" >&6; }
28282fi
28283
28284if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28286$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28287    ALSA_NOT_NEEDED=yes
28288    PULSE_NOT_NEEDED=yes
28289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28290$as_echo "alsa pulse" >&6; }
28291fi
28292
28293if test "x$OPENJDK_TARGET_OS" = xwindows; then
28294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28295$as_echo_n "checking what is not needed on Windows?... " >&6; }
28296    CUPS_NOT_NEEDED=yes
28297    ALSA_NOT_NEEDED=yes
28298    PULSE_NOT_NEEDED=yes
28299    X11_NOT_NEEDED=yes
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28301$as_echo "alsa cups pulse x11" >&6; }
28302fi
28303
28304if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28306$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28307    ALSA_NOT_NEEDED=yes
28308    PULSE_NOT_NEEDED=yes
28309    X11_NOT_NEEDED=yes
28310    FREETYPE2_NOT_NEEDED=yes
28311    # If the java runtime framework is disabled, then we need X11.
28312    # This will be adjusted below.
28313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28314$as_echo "alsa pulse x11" >&6; }
28315fi
28316
28317if test "x$OPENJDK_TARGET_OS" = xbsd; then
28318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28319$as_echo_n "checking what is not needed on bsd?... " >&6; }
28320    ALSA_NOT_NEEDED=yes
28321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28322$as_echo "alsa" >&6; }
28323fi
28324
28325if test "x$OPENJDK" = "xfalse"; then
28326    FREETYPE2_NOT_NEEDED=yes
28327fi
28328
28329if test "x$SUPPORT_HEADFUL" = xno; then
28330    X11_NOT_NEEDED=yes
28331fi
28332
28333###############################################################################
28334#
28335# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28336# that uses this API.
28337#
28338# Check whether --enable-macosx-runtime-support was given.
28339if test "${enable_macosx_runtime_support+set}" = set; then :
28340  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28341else
28342  MACOSX_RUNTIME_SUPPORT="no"
28343fi
28344
28345
28346USE_MACOSX_RUNTIME_SUPPORT=no
28347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28348$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28349if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28350    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28351        MACOSX_RUNTIME_SUPPORT=yes
28352        USE_MACOSX_RUNTIME_SUPPORT=yes
28353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28354$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28355    else
28356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28357$as_echo "yes, but explicitly disabled." >&6; }
28358    fi
28359else
28360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28361$as_echo "no" >&6; }
28362fi
28363
28364if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28366$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28367    X11_NOT_NEEDED=
28368    FREETYPE2_NOT_NEEDED=
28369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28370$as_echo "alsa pulse" >&6; }
28371fi
28372
28373
28374
28375
28376###############################################################################
28377#
28378# Check for X Windows
28379#
28380
28381# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28382# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28383# --x-libraries for the sysroot, if that seems to be correct.
28384if test "x$SYS_ROOT" != "x/"; then
28385  if test "x$x_includes" = xNONE; then
28386    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28387      x_includes="$SYS_ROOT/usr/X11R6/include"
28388    fi
28389  fi
28390  if test "x$x_libraries" = xNONE; then
28391    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28392      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28393    fi
28394  fi
28395fi
28396
28397# Now let autoconf do it's magic
28398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28399$as_echo_n "checking for X... " >&6; }
28400
28401
28402# Check whether --with-x was given.
28403if test "${with_x+set}" = set; then :
28404  withval=$with_x;
28405fi
28406
28407# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28408if test "x$with_x" = xno; then
28409  # The user explicitly disabled X.
28410  have_x=disabled
28411else
28412  case $x_includes,$x_libraries in #(
28413    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28414    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28415  $as_echo_n "(cached) " >&6
28416else
28417  # One or both of the vars are not set, and there is no cached value.
28418ac_x_includes=no ac_x_libraries=no
28419rm -f -r conftest.dir
28420if mkdir conftest.dir; then
28421  cd conftest.dir
28422  cat >Imakefile <<'_ACEOF'
28423incroot:
28424	@echo incroot='${INCROOT}'
28425usrlibdir:
28426	@echo usrlibdir='${USRLIBDIR}'
28427libdir:
28428	@echo libdir='${LIBDIR}'
28429_ACEOF
28430  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28431    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28432    for ac_var in incroot usrlibdir libdir; do
28433      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28434    done
28435    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28436    for ac_extension in a so sl dylib la dll; do
28437      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28438	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28439	ac_im_usrlibdir=$ac_im_libdir; break
28440      fi
28441    done
28442    # Screen out bogus values from the imake configuration.  They are
28443    # bogus both because they are the default anyway, and because
28444    # using them would break gcc on systems where it needs fixed includes.
28445    case $ac_im_incroot in
28446	/usr/include) ac_x_includes= ;;
28447	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28448    esac
28449    case $ac_im_usrlibdir in
28450	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28451	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28452    esac
28453  fi
28454  cd ..
28455  rm -f -r conftest.dir
28456fi
28457
28458# Standard set of common directories for X headers.
28459# Check X11 before X11Rn because it is often a symlink to the current release.
28460ac_x_header_dirs='
28461/usr/X11/include
28462/usr/X11R7/include
28463/usr/X11R6/include
28464/usr/X11R5/include
28465/usr/X11R4/include
28466
28467/usr/include/X11
28468/usr/include/X11R7
28469/usr/include/X11R6
28470/usr/include/X11R5
28471/usr/include/X11R4
28472
28473/usr/local/X11/include
28474/usr/local/X11R7/include
28475/usr/local/X11R6/include
28476/usr/local/X11R5/include
28477/usr/local/X11R4/include
28478
28479/usr/local/include/X11
28480/usr/local/include/X11R7
28481/usr/local/include/X11R6
28482/usr/local/include/X11R5
28483/usr/local/include/X11R4
28484
28485/usr/X386/include
28486/usr/x386/include
28487/usr/XFree86/include/X11
28488
28489/usr/include
28490/usr/local/include
28491/usr/unsupported/include
28492/usr/athena/include
28493/usr/local/x11r5/include
28494/usr/lpp/Xamples/include
28495
28496/usr/openwin/include
28497/usr/openwin/share/include'
28498
28499if test "$ac_x_includes" = no; then
28500  # Guess where to find include files, by looking for Xlib.h.
28501  # First, try using that file with no special directory specified.
28502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28503/* end confdefs.h.  */
28504#include <X11/Xlib.h>
28505_ACEOF
28506if ac_fn_cxx_try_cpp "$LINENO"; then :
28507  # We can compile using X headers with no special include directory.
28508ac_x_includes=
28509else
28510  for ac_dir in $ac_x_header_dirs; do
28511  if test -r "$ac_dir/X11/Xlib.h"; then
28512    ac_x_includes=$ac_dir
28513    break
28514  fi
28515done
28516fi
28517rm -f conftest.err conftest.i conftest.$ac_ext
28518fi # $ac_x_includes = no
28519
28520if test "$ac_x_libraries" = no; then
28521  # Check for the libraries.
28522  # See if we find them without any special options.
28523  # Don't add to $LIBS permanently.
28524  ac_save_LIBS=$LIBS
28525  LIBS="-lX11 $LIBS"
28526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28527/* end confdefs.h.  */
28528#include <X11/Xlib.h>
28529int
28530main ()
28531{
28532XrmInitialize ()
28533  ;
28534  return 0;
28535}
28536_ACEOF
28537if ac_fn_cxx_try_link "$LINENO"; then :
28538  LIBS=$ac_save_LIBS
28539# We can link X programs with no special library path.
28540ac_x_libraries=
28541else
28542  LIBS=$ac_save_LIBS
28543for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28544do
28545  # Don't even attempt the hair of trying to link an X program!
28546  for ac_extension in a so sl dylib la dll; do
28547    if test -r "$ac_dir/libX11.$ac_extension"; then
28548      ac_x_libraries=$ac_dir
28549      break 2
28550    fi
28551  done
28552done
28553fi
28554rm -f core conftest.err conftest.$ac_objext \
28555    conftest$ac_exeext conftest.$ac_ext
28556fi # $ac_x_libraries = no
28557
28558case $ac_x_includes,$ac_x_libraries in #(
28559  no,* | *,no | *\'*)
28560    # Didn't find X, or a directory has "'" in its name.
28561    ac_cv_have_x="have_x=no";; #(
28562  *)
28563    # Record where we found X for the cache.
28564    ac_cv_have_x="have_x=yes\
28565	ac_x_includes='$ac_x_includes'\
28566	ac_x_libraries='$ac_x_libraries'"
28567esac
28568fi
28569;; #(
28570    *) have_x=yes;;
28571  esac
28572  eval "$ac_cv_have_x"
28573fi # $with_x != no
28574
28575if test "$have_x" != yes; then
28576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28577$as_echo "$have_x" >&6; }
28578  no_x=yes
28579else
28580  # If each of the values was on the command line, it overrides each guess.
28581  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28582  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28583  # Update the cache value to reflect the command line values.
28584  ac_cv_have_x="have_x=yes\
28585	ac_x_includes='$x_includes'\
28586	ac_x_libraries='$x_libraries'"
28587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28588$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28589fi
28590
28591if test "$no_x" = yes; then
28592  # Not all programs may use this symbol, but it does not hurt to define it.
28593
28594$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28595
28596  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28597else
28598  if test -n "$x_includes"; then
28599    X_CFLAGS="$X_CFLAGS -I$x_includes"
28600  fi
28601
28602  # It would also be nice to do this for all -L options, not just this one.
28603  if test -n "$x_libraries"; then
28604    X_LIBS="$X_LIBS -L$x_libraries"
28605    # For Solaris; some versions of Sun CC require a space after -R and
28606    # others require no space.  Words are not sufficient . . . .
28607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28608$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28609    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28610    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28611    ac_cxx_werror_flag=yes
28612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28613/* end confdefs.h.  */
28614
28615int
28616main ()
28617{
28618
28619  ;
28620  return 0;
28621}
28622_ACEOF
28623if ac_fn_cxx_try_link "$LINENO"; then :
28624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28625$as_echo "no" >&6; }
28626       X_LIBS="$X_LIBS -R$x_libraries"
28627else
28628  LIBS="$ac_xsave_LIBS -R $x_libraries"
28629       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28630/* end confdefs.h.  */
28631
28632int
28633main ()
28634{
28635
28636  ;
28637  return 0;
28638}
28639_ACEOF
28640if ac_fn_cxx_try_link "$LINENO"; then :
28641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28642$as_echo "yes" >&6; }
28643	  X_LIBS="$X_LIBS -R $x_libraries"
28644else
28645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28646$as_echo "neither works" >&6; }
28647fi
28648rm -f core conftest.err conftest.$ac_objext \
28649    conftest$ac_exeext conftest.$ac_ext
28650fi
28651rm -f core conftest.err conftest.$ac_objext \
28652    conftest$ac_exeext conftest.$ac_ext
28653    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28654    LIBS=$ac_xsave_LIBS
28655  fi
28656
28657  # Check for system-dependent libraries X programs must link with.
28658  # Do this before checking for the system-independent R6 libraries
28659  # (-lICE), since we may need -lsocket or whatever for X linking.
28660
28661  if test "$ISC" = yes; then
28662    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28663  else
28664    # Martyn Johnson says this is needed for Ultrix, if the X
28665    # libraries were built with DECnet support.  And Karl Berry says
28666    # the Alpha needs dnet_stub (dnet does not exist).
28667    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28668    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28669/* end confdefs.h.  */
28670
28671/* Override any GCC internal prototype to avoid an error.
28672   Use char because int might match the return type of a GCC
28673   builtin and then its argument prototype would still apply.  */
28674#ifdef __cplusplus
28675extern "C"
28676#endif
28677char XOpenDisplay ();
28678int
28679main ()
28680{
28681return XOpenDisplay ();
28682  ;
28683  return 0;
28684}
28685_ACEOF
28686if ac_fn_cxx_try_link "$LINENO"; then :
28687
28688else
28689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28690$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28691if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28692  $as_echo_n "(cached) " >&6
28693else
28694  ac_check_lib_save_LIBS=$LIBS
28695LIBS="-ldnet  $LIBS"
28696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28697/* end confdefs.h.  */
28698
28699/* Override any GCC internal prototype to avoid an error.
28700   Use char because int might match the return type of a GCC
28701   builtin and then its argument prototype would still apply.  */
28702#ifdef __cplusplus
28703extern "C"
28704#endif
28705char dnet_ntoa ();
28706int
28707main ()
28708{
28709return dnet_ntoa ();
28710  ;
28711  return 0;
28712}
28713_ACEOF
28714if ac_fn_cxx_try_link "$LINENO"; then :
28715  ac_cv_lib_dnet_dnet_ntoa=yes
28716else
28717  ac_cv_lib_dnet_dnet_ntoa=no
28718fi
28719rm -f core conftest.err conftest.$ac_objext \
28720    conftest$ac_exeext conftest.$ac_ext
28721LIBS=$ac_check_lib_save_LIBS
28722fi
28723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28724$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28725if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28726  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28727fi
28728
28729    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28731$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28732if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28733  $as_echo_n "(cached) " >&6
28734else
28735  ac_check_lib_save_LIBS=$LIBS
28736LIBS="-ldnet_stub  $LIBS"
28737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28738/* end confdefs.h.  */
28739
28740/* Override any GCC internal prototype to avoid an error.
28741   Use char because int might match the return type of a GCC
28742   builtin and then its argument prototype would still apply.  */
28743#ifdef __cplusplus
28744extern "C"
28745#endif
28746char dnet_ntoa ();
28747int
28748main ()
28749{
28750return dnet_ntoa ();
28751  ;
28752  return 0;
28753}
28754_ACEOF
28755if ac_fn_cxx_try_link "$LINENO"; then :
28756  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28757else
28758  ac_cv_lib_dnet_stub_dnet_ntoa=no
28759fi
28760rm -f core conftest.err conftest.$ac_objext \
28761    conftest$ac_exeext conftest.$ac_ext
28762LIBS=$ac_check_lib_save_LIBS
28763fi
28764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28765$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28766if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28767  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28768fi
28769
28770    fi
28771fi
28772rm -f core conftest.err conftest.$ac_objext \
28773    conftest$ac_exeext conftest.$ac_ext
28774    LIBS="$ac_xsave_LIBS"
28775
28776    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28777    # to get the SysV transport functions.
28778    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28779    # needs -lnsl.
28780    # The nsl library prevents programs from opening the X display
28781    # on Irix 5.2, according to T.E. Dickey.
28782    # The functions gethostbyname, getservbyname, and inet_addr are
28783    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28784    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28785if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28786
28787fi
28788
28789    if test $ac_cv_func_gethostbyname = no; then
28790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28791$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28792if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28793  $as_echo_n "(cached) " >&6
28794else
28795  ac_check_lib_save_LIBS=$LIBS
28796LIBS="-lnsl  $LIBS"
28797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28798/* end confdefs.h.  */
28799
28800/* Override any GCC internal prototype to avoid an error.
28801   Use char because int might match the return type of a GCC
28802   builtin and then its argument prototype would still apply.  */
28803#ifdef __cplusplus
28804extern "C"
28805#endif
28806char gethostbyname ();
28807int
28808main ()
28809{
28810return gethostbyname ();
28811  ;
28812  return 0;
28813}
28814_ACEOF
28815if ac_fn_cxx_try_link "$LINENO"; then :
28816  ac_cv_lib_nsl_gethostbyname=yes
28817else
28818  ac_cv_lib_nsl_gethostbyname=no
28819fi
28820rm -f core conftest.err conftest.$ac_objext \
28821    conftest$ac_exeext conftest.$ac_ext
28822LIBS=$ac_check_lib_save_LIBS
28823fi
28824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28825$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28826if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28827  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28828fi
28829
28830      if test $ac_cv_lib_nsl_gethostbyname = no; then
28831	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28832$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28833if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28834  $as_echo_n "(cached) " >&6
28835else
28836  ac_check_lib_save_LIBS=$LIBS
28837LIBS="-lbsd  $LIBS"
28838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28839/* end confdefs.h.  */
28840
28841/* Override any GCC internal prototype to avoid an error.
28842   Use char because int might match the return type of a GCC
28843   builtin and then its argument prototype would still apply.  */
28844#ifdef __cplusplus
28845extern "C"
28846#endif
28847char gethostbyname ();
28848int
28849main ()
28850{
28851return gethostbyname ();
28852  ;
28853  return 0;
28854}
28855_ACEOF
28856if ac_fn_cxx_try_link "$LINENO"; then :
28857  ac_cv_lib_bsd_gethostbyname=yes
28858else
28859  ac_cv_lib_bsd_gethostbyname=no
28860fi
28861rm -f core conftest.err conftest.$ac_objext \
28862    conftest$ac_exeext conftest.$ac_ext
28863LIBS=$ac_check_lib_save_LIBS
28864fi
28865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28866$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28867if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28868  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28869fi
28870
28871      fi
28872    fi
28873
28874    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28875    # socket/setsockopt and other routines are undefined under SCO ODT
28876    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28877    # on later versions), says Simon Leinen: it contains gethostby*
28878    # variants that don't use the name server (or something).  -lsocket
28879    # must be given before -lnsl if both are needed.  We assume that
28880    # if connect needs -lnsl, so does gethostbyname.
28881    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28882if test "x$ac_cv_func_connect" = x""yes; then :
28883
28884fi
28885
28886    if test $ac_cv_func_connect = no; then
28887      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28888$as_echo_n "checking for connect in -lsocket... " >&6; }
28889if test "${ac_cv_lib_socket_connect+set}" = set; then :
28890  $as_echo_n "(cached) " >&6
28891else
28892  ac_check_lib_save_LIBS=$LIBS
28893LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28895/* end confdefs.h.  */
28896
28897/* Override any GCC internal prototype to avoid an error.
28898   Use char because int might match the return type of a GCC
28899   builtin and then its argument prototype would still apply.  */
28900#ifdef __cplusplus
28901extern "C"
28902#endif
28903char connect ();
28904int
28905main ()
28906{
28907return connect ();
28908  ;
28909  return 0;
28910}
28911_ACEOF
28912if ac_fn_cxx_try_link "$LINENO"; then :
28913  ac_cv_lib_socket_connect=yes
28914else
28915  ac_cv_lib_socket_connect=no
28916fi
28917rm -f core conftest.err conftest.$ac_objext \
28918    conftest$ac_exeext conftest.$ac_ext
28919LIBS=$ac_check_lib_save_LIBS
28920fi
28921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28922$as_echo "$ac_cv_lib_socket_connect" >&6; }
28923if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28924  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28925fi
28926
28927    fi
28928
28929    # Guillermo Gomez says -lposix is necessary on A/UX.
28930    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28931if test "x$ac_cv_func_remove" = x""yes; then :
28932
28933fi
28934
28935    if test $ac_cv_func_remove = no; then
28936      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28937$as_echo_n "checking for remove in -lposix... " >&6; }
28938if test "${ac_cv_lib_posix_remove+set}" = set; then :
28939  $as_echo_n "(cached) " >&6
28940else
28941  ac_check_lib_save_LIBS=$LIBS
28942LIBS="-lposix  $LIBS"
28943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28944/* end confdefs.h.  */
28945
28946/* Override any GCC internal prototype to avoid an error.
28947   Use char because int might match the return type of a GCC
28948   builtin and then its argument prototype would still apply.  */
28949#ifdef __cplusplus
28950extern "C"
28951#endif
28952char remove ();
28953int
28954main ()
28955{
28956return remove ();
28957  ;
28958  return 0;
28959}
28960_ACEOF
28961if ac_fn_cxx_try_link "$LINENO"; then :
28962  ac_cv_lib_posix_remove=yes
28963else
28964  ac_cv_lib_posix_remove=no
28965fi
28966rm -f core conftest.err conftest.$ac_objext \
28967    conftest$ac_exeext conftest.$ac_ext
28968LIBS=$ac_check_lib_save_LIBS
28969fi
28970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28971$as_echo "$ac_cv_lib_posix_remove" >&6; }
28972if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28973  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28974fi
28975
28976    fi
28977
28978    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28979    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28980if test "x$ac_cv_func_shmat" = x""yes; then :
28981
28982fi
28983
28984    if test $ac_cv_func_shmat = no; then
28985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28986$as_echo_n "checking for shmat in -lipc... " >&6; }
28987if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28988  $as_echo_n "(cached) " >&6
28989else
28990  ac_check_lib_save_LIBS=$LIBS
28991LIBS="-lipc  $LIBS"
28992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28993/* end confdefs.h.  */
28994
28995/* Override any GCC internal prototype to avoid an error.
28996   Use char because int might match the return type of a GCC
28997   builtin and then its argument prototype would still apply.  */
28998#ifdef __cplusplus
28999extern "C"
29000#endif
29001char shmat ();
29002int
29003main ()
29004{
29005return shmat ();
29006  ;
29007  return 0;
29008}
29009_ACEOF
29010if ac_fn_cxx_try_link "$LINENO"; then :
29011  ac_cv_lib_ipc_shmat=yes
29012else
29013  ac_cv_lib_ipc_shmat=no
29014fi
29015rm -f core conftest.err conftest.$ac_objext \
29016    conftest$ac_exeext conftest.$ac_ext
29017LIBS=$ac_check_lib_save_LIBS
29018fi
29019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29020$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29021if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29022  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29023fi
29024
29025    fi
29026  fi
29027
29028  # Check for libraries that X11R6 Xt/Xaw programs need.
29029  ac_save_LDFLAGS=$LDFLAGS
29030  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29031  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29032  # check for ICE first), but we must link in the order -lSM -lICE or
29033  # we get undefined symbols.  So assume we have SM if we have ICE.
29034  # These have to be linked with before -lX11, unlike the other
29035  # libraries we check for below, so use a different variable.
29036  # John Interrante, Karl Berry
29037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29038$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29039if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29040  $as_echo_n "(cached) " >&6
29041else
29042  ac_check_lib_save_LIBS=$LIBS
29043LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29045/* end confdefs.h.  */
29046
29047/* Override any GCC internal prototype to avoid an error.
29048   Use char because int might match the return type of a GCC
29049   builtin and then its argument prototype would still apply.  */
29050#ifdef __cplusplus
29051extern "C"
29052#endif
29053char IceConnectionNumber ();
29054int
29055main ()
29056{
29057return IceConnectionNumber ();
29058  ;
29059  return 0;
29060}
29061_ACEOF
29062if ac_fn_cxx_try_link "$LINENO"; then :
29063  ac_cv_lib_ICE_IceConnectionNumber=yes
29064else
29065  ac_cv_lib_ICE_IceConnectionNumber=no
29066fi
29067rm -f core conftest.err conftest.$ac_objext \
29068    conftest$ac_exeext conftest.$ac_ext
29069LIBS=$ac_check_lib_save_LIBS
29070fi
29071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29072$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29073if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29074  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29075fi
29076
29077  LDFLAGS=$ac_save_LDFLAGS
29078
29079fi
29080
29081
29082if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29083
29084    # Print a helpful message on how to acquire the necessary build dependency.
29085    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29086    MISSING_DEPENDENCY=x11
29087    PKGHANDLER_COMMAND=
29088
29089    case $PKGHANDLER in
29090	apt-get)
29091                apt_help     $MISSING_DEPENDENCY ;;
29092    yum)
29093                yum_help     $MISSING_DEPENDENCY ;;
29094	port)
29095                port_help    $MISSING_DEPENDENCY ;;
29096	pkgutil)
29097                pkgutil_help $MISSING_DEPENDENCY ;;
29098	pkgadd)
29099                pkgadd_help  $MISSING_DEPENDENCY ;;
29100    * )
29101      break ;;
29102    esac
29103
29104    if test "x$PKGHANDLER_COMMAND" != x; then
29105        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29106    fi
29107
29108    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29109fi
29110
29111# Some of the old makefiles require a setting of OPENWIN_HOME
29112# Since the X11R6 directory has disappeared on later Linuxes,
29113# we need to probe for it.
29114if test "x$OPENJDK_TARGET_OS" = xlinux; then
29115    if test -d "$SYS_ROOT/usr/X11R6"; then
29116        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29117    fi
29118    if test -d "$SYS_ROOT/usr/include/X11"; then
29119        OPENWIN_HOME="$SYS_ROOT/usr"
29120    fi
29121fi
29122if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29123    OPENWIN_HOME="/usr/openwin"
29124fi
29125
29126
29127
29128#
29129# Weird Sol10 something check...TODO change to try compile
29130#
29131if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29132  if test "`uname -r`" = "5.10"; then
29133     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29134     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29135     fi
29136  fi
29137fi
29138
29139ac_ext=c
29140ac_cpp='$CPP $CPPFLAGS'
29141ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29142ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29143ac_compiler_gnu=$ac_cv_c_compiler_gnu
29144
29145OLD_CFLAGS="$CFLAGS"
29146CFLAGS="$CFLAGS $X_CFLAGS"
29147
29148# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29149for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29150do :
29151  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29152ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29153                   # include <X11/Xutil.h>
29154
29155"
29156if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29157  cat >>confdefs.h <<_ACEOF
29158#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29159_ACEOF
29160 X11_A_OK=yes
29161else
29162  X11_A_OK=no
29163fi
29164
29165done
29166
29167
29168CFLAGS="$OLD_CFLAGS"
29169ac_ext=cpp
29170ac_cpp='$CXXCPP $CPPFLAGS'
29171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29174
29175
29176if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29177
29178    # Print a helpful message on how to acquire the necessary build dependency.
29179    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29180    MISSING_DEPENDENCY=x11
29181    PKGHANDLER_COMMAND=
29182
29183    case $PKGHANDLER in
29184	apt-get)
29185                apt_help     $MISSING_DEPENDENCY ;;
29186    yum)
29187                yum_help     $MISSING_DEPENDENCY ;;
29188	port)
29189                port_help    $MISSING_DEPENDENCY ;;
29190	pkgutil)
29191                pkgutil_help $MISSING_DEPENDENCY ;;
29192	pkgadd)
29193                pkgadd_help  $MISSING_DEPENDENCY ;;
29194    * )
29195      break ;;
29196    esac
29197
29198    if test "x$PKGHANDLER_COMMAND" != x; then
29199        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29200    fi
29201
29202    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29203fi
29204
29205
29206
29207
29208
29209
29210###############################################################################
29211#
29212# The common unix printing system cups is used to print from java.
29213#
29214
29215# Check whether --with-cups was given.
29216if test "${with_cups+set}" = set; then :
29217  withval=$with_cups;
29218fi
29219
29220
29221# Check whether --with-cups-include was given.
29222if test "${with_cups_include+set}" = set; then :
29223  withval=$with_cups_include;
29224fi
29225
29226
29227if test "x$CUPS_NOT_NEEDED" = xyes; then
29228	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29229		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29230$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29231	fi
29232	CUPS_CFLAGS=
29233else
29234	CUPS_FOUND=no
29235
29236	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29237	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29238	fi
29239
29240	if test "x${with_cups}" != x; then
29241	    CUPS_CFLAGS="-I${with_cups}/include"
29242	    CUPS_FOUND=yes
29243	fi
29244	if test "x${with_cups_include}" != x; then
29245	    CUPS_CFLAGS="-I${with_cups_include}"
29246	    CUPS_FOUND=yes
29247	fi
29248	if test "x$CUPS_FOUND" = xno; then
29249
29250
29251    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29252        # Source the builddeps file again, to make sure it uses the latest variables!
29253        . $builddepsfile
29254        # Look for a target and build machine specific resource!
29255        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29256        if test "x$resource" = x; then
29257            # Ok, lets instead look for a target specific resource
29258            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29259        fi
29260        if test "x$resource" = x; then
29261            # Ok, lets instead look for a build specific resource
29262            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29263        fi
29264        if test "x$resource" = x; then
29265            # Ok, lets instead look for a generic resource
29266            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29267            resource=${builddep_cups}
29268        fi
29269        if test "x$resource" != x; then
29270            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29271$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29272	    # If the resource in the builddeps.conf file is an existing directory,
29273	    # for example /java/linux/cups
29274	    if test -d ${resource}; then
29275	       depdir=${resource}
29276	    else
29277
29278# cups is for example mymodule
29279# $resource is for example libs/general/libmymod_1_2_3.zip
29280# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29281# $with_builddeps_dir is for example /localhome/builddeps
29282# depdir is the name of the variable into which we store the depdir, eg MYMOD
29283# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29284# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29285    filename=`basename $resource`
29286    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29287    filebase=${filename%%.*}
29288    extension=${filename#*.}
29289    installdir=$with_builddeps_dir/$filebase
29290    if test ! -f $installdir/$filename.unpacked; then
29291        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29292$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29293        if test ! -d $installdir; then
29294            mkdir -p $installdir
29295        fi
29296        if test ! -d $installdir; then
29297            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29298        fi
29299        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29300        touch $tmpfile
29301        if test ! -f $tmpfile; then
29302            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29303        fi
29304
29305    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29306    # $tmpfile is the local file name for the downloaded file.
29307    VALID_TOOL=no
29308    if test "x$BDEPS_FTP" = xwget; then
29309       VALID_TOOL=yes
29310       wget -O $tmpfile $with_builddeps_server/$resource
29311    fi
29312    if test "x$BDEPS_FTP" = xlftp; then
29313       VALID_TOOL=yes
29314       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29315    fi
29316    if test "x$BDEPS_FTP" = xftp; then
29317        VALID_TOOL=yes
29318        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29319        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29320        FTPUSERPWD=${FTPSERVER%%@*}
29321        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29322            FTPUSER=${userpwd%%:*}
29323            FTPPWD=${userpwd#*@}
29324            FTPSERVER=${FTPSERVER#*@}
29325        else
29326            FTPUSER=ftp
29327            FTPPWD=ftp
29328        fi
29329        # the "pass" command does not work on some
29330        # ftp clients (read ftp.exe) but if it works,
29331        # passive mode is better!
29332        (\
29333            echo "user $FTPUSER $FTPPWD"        ;\
29334            echo "pass"                         ;\
29335            echo "bin"                          ;\
29336            echo "get $FTPPATH $tmpfile"              ;\
29337        ) | ftp -in $FTPSERVER
29338    fi
29339    if test "x$VALID_TOOL" != xyes; then
29340       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29341    fi
29342
29343        mv $tmpfile $installdir/$filename
29344        if test ! -s $installdir/$filename; then
29345            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29346        fi
29347        case "$extension" in
29348            zip)  echo "Unzipping $installdir/$filename..."
29349               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29350            ;;
29351            tar.gz) echo "Untaring $installdir/$filename..."
29352               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29353            ;;
29354            tgz) echo "Untaring $installdir/$filename..."
29355               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29356            ;;
29357            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29358            ;;
29359        esac
29360    fi
29361    if test -f $installdir/$filename.unpacked; then
29362        depdir=$installdir
29363    fi
29364
29365	    fi
29366            # Source the builddeps file again, because in the previous command, the depdir
29367            # was updated to point at the current build dependency install directory.
29368            . $builddepsfile
29369            # Now extract variables from the builddeps.conf files.
29370            theroot=${builddep_cups_ROOT}
29371            thecflags=${builddep_cups_CFLAGS}
29372            thelibs=${builddep_cups_LIBS}
29373            if test "x$depdir" = x; then
29374                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29375            fi
29376            CUPS=$depdir
29377            if test "x$theroot" != x; then
29378               CUPS="$theroot"
29379            fi
29380            if test "x$thecflags" != x; then
29381               CUPS_CFLAGS="$thecflags"
29382            fi
29383            if test "x$thelibs" != x; then
29384               CUPS_LIBS="$thelibs"
29385            fi
29386            CUPS_FOUND=yes
29387
29388        fi
29389
29390    fi
29391
29392	fi
29393	if test "x$CUPS_FOUND" = xno; then
29394	    # Are the cups headers installed in the default /usr/include location?
29395	    for ac_header in cups/cups.h cups/ppd.h
29396do :
29397  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29398ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29399if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29400  cat >>confdefs.h <<_ACEOF
29401#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29402_ACEOF
29403 CUPS_FOUND=yes
29404	                      CUPS_CFLAGS=
29405	                      DEFAULT_CUPS=yes
29406fi
29407
29408done
29409
29410	fi
29411	if test "x$CUPS_FOUND" = xno; then
29412	    # Getting nervous now? Lets poke around for standard Solaris third-party
29413	    # package installation locations.
29414	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29415$as_echo_n "checking for cups headers... " >&6; }
29416	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29417	       # An SFW package seems to be installed!
29418	       CUPS_FOUND=yes
29419	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29420	    elif test -s /opt/csw/include/cups/cups.h; then
29421	       # A CSW package seems to be installed!
29422	       CUPS_FOUND=yes
29423	       CUPS_CFLAGS="-I/opt/csw/include"
29424	    fi
29425	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29426$as_echo "$CUPS_FOUND" >&6; }
29427	fi
29428	if test "x$CUPS_FOUND" = xno; then
29429
29430    # Print a helpful message on how to acquire the necessary build dependency.
29431    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29432    MISSING_DEPENDENCY=cups
29433    PKGHANDLER_COMMAND=
29434
29435    case $PKGHANDLER in
29436	apt-get)
29437                apt_help     $MISSING_DEPENDENCY ;;
29438    yum)
29439                yum_help     $MISSING_DEPENDENCY ;;
29440	port)
29441                port_help    $MISSING_DEPENDENCY ;;
29442	pkgutil)
29443                pkgutil_help $MISSING_DEPENDENCY ;;
29444	pkgadd)
29445                pkgadd_help  $MISSING_DEPENDENCY ;;
29446    * )
29447      break ;;
29448    esac
29449
29450    if test "x$PKGHANDLER_COMMAND" != x; then
29451        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29452    fi
29453
29454	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29455	fi
29456fi
29457
29458
29459
29460
29461
29462
29463###############################################################################
29464#
29465# The ubiquitous freetype2 library is used to render fonts.
29466#
29467
29468# Check whether --with-freetype was given.
29469if test "${with_freetype+set}" = set; then :
29470  withval=$with_freetype;
29471fi
29472
29473
29474# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29475USING_SYSTEM_FT_LIB=false
29476
29477if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29478	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29479		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29480$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29481	fi
29482	FREETYPE2_CFLAGS=
29483	FREETYPE2_LIBS=
29484        FREETYPE2_LIB_PATH=
29485else
29486	FREETYPE2_FOUND=no
29487
29488	if test "x$with_freetype" != x; then
29489
29490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29491
29492  # Input might be given as Windows format, start by converting to
29493  # unix format.
29494  path="$with_freetype"
29495  new_path=`$CYGPATH -u "$path"`
29496
29497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29500  # "foo.exe" is OK but "foo" is an error.
29501  #
29502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29503  # It is also a way to make sure we got the proper file name for the real test later on.
29504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29505  if test "x$test_shortpath" = x; then
29506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29507$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29508    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29509  fi
29510
29511  # Call helper function which possibly converts this using DOS-style short mode.
29512  # If so, the updated path is stored in $new_path.
29513
29514  input_path="$new_path"
29515  # Check if we need to convert this using DOS-style short mode. If the path
29516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29517  # take no chances and rewrite it.
29518  # Note: m4 eats our [], so we need to use [ and ] instead.
29519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29520  if test "x$has_forbidden_chars" != x; then
29521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29525      # Going to short mode and back again did indeed matter. Since short mode is
29526      # case insensitive, let's make it lowercase to improve readability.
29527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29528      # Now convert it back to Unix-stile (cygpath)
29529      input_path=`$CYGPATH -u "$shortmode_path"`
29530      new_path="$input_path"
29531    fi
29532  fi
29533
29534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29535  if test "x$test_cygdrive_prefix" = x; then
29536    # As a simple fix, exclude /usr/bin since it's not a real path.
29537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29539      # a path prefixed by /cygdrive for fixpath to work.
29540      new_path="$CYGWIN_ROOT_PATH$input_path"
29541    fi
29542  fi
29543
29544
29545  if test "x$path" != "x$new_path"; then
29546    with_freetype="$new_path"
29547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29548$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29549  fi
29550
29551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29552
29553  path="$with_freetype"
29554  has_colon=`$ECHO $path | $GREP ^.:`
29555  new_path="$path"
29556  if test "x$has_colon" = x; then
29557    # Not in mixed or Windows style, start by that.
29558    new_path=`cmd //c echo $path`
29559  fi
29560
29561
29562  input_path="$new_path"
29563  # Check if we need to convert this using DOS-style short mode. If the path
29564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29565  # take no chances and rewrite it.
29566  # Note: m4 eats our [], so we need to use [ and ] instead.
29567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29568  if test "x$has_forbidden_chars" != x; then
29569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29571  fi
29572
29573
29574  windows_path="$new_path"
29575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29576    unix_path=`$CYGPATH -u "$windows_path"`
29577    new_path="$unix_path"
29578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29580    new_path="$unix_path"
29581  fi
29582
29583  if test "x$path" != "x$new_path"; then
29584    with_freetype="$new_path"
29585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29586$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29587  fi
29588
29589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29591
29592  else
29593    # We're on a posix platform. Hooray! :)
29594    path="$with_freetype"
29595
29596    if test ! -f "$path" && test ! -d "$path"; then
29597      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29598    fi
29599
29600    has_space=`$ECHO "$path" | $GREP " "`
29601    if test "x$has_space" != x; then
29602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29603$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29604      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29605    fi
29606  fi
29607
29608	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29609            FREETYPE2_LIB_PATH="$with_freetype/lib"
29610            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29611                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29612                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29613            fi
29614            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29615                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29616            fi
29617	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29618            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29619                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29620            fi
29621 	    FREETYPE2_FOUND=yes
29622   	    if test "x$FREETYPE2_FOUND" = xyes; then
29623	        # Verify that the directories exist
29624                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29625		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29626		fi
29627	        # List the contents of the lib.
29628		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29629                if test "x$FREETYPELIB" = x; then
29630		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29631		fi
29632	        # Check one h-file
29633                if ! test -s "$with_freetype/include/ft2build.h"; then
29634		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29635		fi
29636            fi
29637        fi
29638	if test "x$FREETYPE2_FOUND" = xno; then
29639
29640
29641    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29642        # Source the builddeps file again, to make sure it uses the latest variables!
29643        . $builddepsfile
29644        # Look for a target and build machine specific resource!
29645        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29646        if test "x$resource" = x; then
29647            # Ok, lets instead look for a target specific resource
29648            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29649        fi
29650        if test "x$resource" = x; then
29651            # Ok, lets instead look for a build specific resource
29652            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29653        fi
29654        if test "x$resource" = x; then
29655            # Ok, lets instead look for a generic resource
29656            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29657            resource=${builddep_freetype2}
29658        fi
29659        if test "x$resource" != x; then
29660            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29661$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29662	    # If the resource in the builddeps.conf file is an existing directory,
29663	    # for example /java/linux/cups
29664	    if test -d ${resource}; then
29665	       depdir=${resource}
29666	    else
29667
29668# freetype2 is for example mymodule
29669# $resource is for example libs/general/libmymod_1_2_3.zip
29670# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29671# $with_builddeps_dir is for example /localhome/builddeps
29672# depdir is the name of the variable into which we store the depdir, eg MYMOD
29673# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29674# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29675    filename=`basename $resource`
29676    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29677    filebase=${filename%%.*}
29678    extension=${filename#*.}
29679    installdir=$with_builddeps_dir/$filebase
29680    if test ! -f $installdir/$filename.unpacked; then
29681        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29682$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29683        if test ! -d $installdir; then
29684            mkdir -p $installdir
29685        fi
29686        if test ! -d $installdir; then
29687            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29688        fi
29689        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29690        touch $tmpfile
29691        if test ! -f $tmpfile; then
29692            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29693        fi
29694
29695    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29696    # $tmpfile is the local file name for the downloaded file.
29697    VALID_TOOL=no
29698    if test "x$BDEPS_FTP" = xwget; then
29699       VALID_TOOL=yes
29700       wget -O $tmpfile $with_builddeps_server/$resource
29701    fi
29702    if test "x$BDEPS_FTP" = xlftp; then
29703       VALID_TOOL=yes
29704       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29705    fi
29706    if test "x$BDEPS_FTP" = xftp; then
29707        VALID_TOOL=yes
29708        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29709        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29710        FTPUSERPWD=${FTPSERVER%%@*}
29711        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29712            FTPUSER=${userpwd%%:*}
29713            FTPPWD=${userpwd#*@}
29714            FTPSERVER=${FTPSERVER#*@}
29715        else
29716            FTPUSER=ftp
29717            FTPPWD=ftp
29718        fi
29719        # the "pass" command does not work on some
29720        # ftp clients (read ftp.exe) but if it works,
29721        # passive mode is better!
29722        (\
29723            echo "user $FTPUSER $FTPPWD"        ;\
29724            echo "pass"                         ;\
29725            echo "bin"                          ;\
29726            echo "get $FTPPATH $tmpfile"              ;\
29727        ) | ftp -in $FTPSERVER
29728    fi
29729    if test "x$VALID_TOOL" != xyes; then
29730       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29731    fi
29732
29733        mv $tmpfile $installdir/$filename
29734        if test ! -s $installdir/$filename; then
29735            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29736        fi
29737        case "$extension" in
29738            zip)  echo "Unzipping $installdir/$filename..."
29739               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29740            ;;
29741            tar.gz) echo "Untaring $installdir/$filename..."
29742               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29743            ;;
29744            tgz) echo "Untaring $installdir/$filename..."
29745               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29746            ;;
29747            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29748            ;;
29749        esac
29750    fi
29751    if test -f $installdir/$filename.unpacked; then
29752        depdir=$installdir
29753    fi
29754
29755	    fi
29756            # Source the builddeps file again, because in the previous command, the depdir
29757            # was updated to point at the current build dependency install directory.
29758            . $builddepsfile
29759            # Now extract variables from the builddeps.conf files.
29760            theroot=${builddep_freetype2_ROOT}
29761            thecflags=${builddep_freetype2_CFLAGS}
29762            thelibs=${builddep_freetype2_LIBS}
29763            if test "x$depdir" = x; then
29764                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29765            fi
29766            FREETYPE2=$depdir
29767            if test "x$theroot" != x; then
29768               FREETYPE2="$theroot"
29769            fi
29770            if test "x$thecflags" != x; then
29771               FREETYPE2_CFLAGS="$thecflags"
29772            fi
29773            if test "x$thelibs" != x; then
29774               FREETYPE2_LIBS="$thelibs"
29775            fi
29776            FREETYPE2_FOUND=yes
29777            else FREETYPE2_FOUND=no
29778
29779        fi
29780        else FREETYPE2_FOUND=no
29781
29782    fi
29783
29784            USING_SYSTEM_FT_LIB=true
29785	fi
29786	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29787            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29788
29789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29790
29791  # Input might be given as Windows format, start by converting to
29792  # unix format.
29793  path="$FREETYPELOCATION"
29794  new_path=`$CYGPATH -u "$path"`
29795
29796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29799  # "foo.exe" is OK but "foo" is an error.
29800  #
29801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29802  # It is also a way to make sure we got the proper file name for the real test later on.
29803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29804  if test "x$test_shortpath" = x; then
29805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29806$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29807    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29808  fi
29809
29810  # Call helper function which possibly converts this using DOS-style short mode.
29811  # If so, the updated path is stored in $new_path.
29812
29813  input_path="$new_path"
29814  # Check if we need to convert this using DOS-style short mode. If the path
29815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29816  # take no chances and rewrite it.
29817  # Note: m4 eats our [], so we need to use [ and ] instead.
29818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29819  if test "x$has_forbidden_chars" != x; then
29820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29824      # Going to short mode and back again did indeed matter. Since short mode is
29825      # case insensitive, let's make it lowercase to improve readability.
29826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29827      # Now convert it back to Unix-stile (cygpath)
29828      input_path=`$CYGPATH -u "$shortmode_path"`
29829      new_path="$input_path"
29830    fi
29831  fi
29832
29833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29834  if test "x$test_cygdrive_prefix" = x; then
29835    # As a simple fix, exclude /usr/bin since it's not a real path.
29836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29838      # a path prefixed by /cygdrive for fixpath to work.
29839      new_path="$CYGWIN_ROOT_PATH$input_path"
29840    fi
29841  fi
29842
29843
29844  if test "x$path" != "x$new_path"; then
29845    FREETYPELOCATION="$new_path"
29846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29847$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29848  fi
29849
29850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29851
29852  path="$FREETYPELOCATION"
29853  has_colon=`$ECHO $path | $GREP ^.:`
29854  new_path="$path"
29855  if test "x$has_colon" = x; then
29856    # Not in mixed or Windows style, start by that.
29857    new_path=`cmd //c echo $path`
29858  fi
29859
29860
29861  input_path="$new_path"
29862  # Check if we need to convert this using DOS-style short mode. If the path
29863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29864  # take no chances and rewrite it.
29865  # Note: m4 eats our [], so we need to use [ and ] instead.
29866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29867  if test "x$has_forbidden_chars" != x; then
29868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29870  fi
29871
29872
29873  windows_path="$new_path"
29874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29875    unix_path=`$CYGPATH -u "$windows_path"`
29876    new_path="$unix_path"
29877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29879    new_path="$unix_path"
29880  fi
29881
29882  if test "x$path" != "x$new_path"; then
29883    FREETYPELOCATION="$new_path"
29884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29885$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29886  fi
29887
29888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29890
29891  else
29892    # We're on a posix platform. Hooray! :)
29893    path="$FREETYPELOCATION"
29894
29895    if test ! -f "$path" && test ! -d "$path"; then
29896      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29897    fi
29898
29899    has_space=`$ECHO "$path" | $GREP " "`
29900    if test "x$has_space" != x; then
29901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29902$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29903      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29904    fi
29905  fi
29906
29907	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29908$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29909	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29910	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29911	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29912 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29913                if ! test -s "$FREETYPE2_LIBS"; then
29914		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29915		fi
29916                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29917		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29918		fi
29919                USING_SYSTEM_FT_LIB=true
29920                FREETYPE2_FOUND=yes
29921	    fi
29922	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29923$as_echo "$FREETYPE2_FOUND" >&6; }
29924        fi
29925	if test "x$FREETYPE2_FOUND" = xno; then
29926
29927pkg_failed=no
29928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29929$as_echo_n "checking for FREETYPE2... " >&6; }
29930
29931if test -n "$FREETYPE2_CFLAGS"; then
29932    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29933 elif test -n "$PKG_CONFIG"; then
29934    if test -n "$PKG_CONFIG" && \
29935    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29936  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29937  ac_status=$?
29938  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29939  test $ac_status = 0; }; then
29940  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29941else
29942  pkg_failed=yes
29943fi
29944 else
29945    pkg_failed=untried
29946fi
29947if test -n "$FREETYPE2_LIBS"; then
29948    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29949 elif test -n "$PKG_CONFIG"; then
29950    if test -n "$PKG_CONFIG" && \
29951    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29952  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29953  ac_status=$?
29954  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29955  test $ac_status = 0; }; then
29956  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29957else
29958  pkg_failed=yes
29959fi
29960 else
29961    pkg_failed=untried
29962fi
29963
29964
29965
29966if test $pkg_failed = yes; then
29967
29968if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29969        _pkg_short_errors_supported=yes
29970else
29971        _pkg_short_errors_supported=no
29972fi
29973        if test $_pkg_short_errors_supported = yes; then
29974	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29975        else
29976	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29977        fi
29978	# Put the nasty error message in config.log where it belongs
29979	echo "$FREETYPE2_PKG_ERRORS" >&5
29980
29981	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29982$as_echo "no" >&6; }
29983                FREETYPE2_FOUND=no
29984elif test $pkg_failed = untried; then
29985	FREETYPE2_FOUND=no
29986else
29987	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29988	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29990$as_echo "yes" >&6; }
29991	FREETYPE2_FOUND=yes
29992fi
29993            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29994            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29995            USING_SYSTEM_FT_LIB=true
29996            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29997            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29998              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29999            fi
30000	fi
30001	if test "x$FREETYPE2_FOUND" = xno; then
30002	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30003$as_echo_n "checking for freetype in some standard locations... " >&6; }
30004
30005	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30006	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30007	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30008	    fi
30009	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30010	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30011	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30012	    fi
30013
30014	    PREV_CXXCFLAGS="$CXXFLAGS"
30015	    PREV_LDFLAGS="$LDFLAGS"
30016	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30017	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30018	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30019/* end confdefs.h.  */
30020#include<ft2build.h>
30021	                    #include FT_FREETYPE_H
30022	                   int main() { return 0; }
30023
30024_ACEOF
30025if ac_fn_cxx_try_link "$LINENO"; then :
30026
30027	                      # Yes, the default cflags and libs did the trick.
30028	                      FREETYPE2_FOUND=yes
30029	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30030	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30031
30032else
30033
30034	                      FREETYPE2_FOUND=no
30035
30036fi
30037rm -f core conftest.err conftest.$ac_objext \
30038    conftest$ac_exeext conftest.$ac_ext
30039            CXXCFLAGS="$PREV_CXXFLAGS"
30040	    LDFLAGS="$PREV_LDFLAGS"
30041	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30042$as_echo "$FREETYPE2_FOUND" >&6; }
30043            USING_SYSTEM_FT_LIB=true
30044	fi
30045	if test "x$FREETYPE2_FOUND" = xno; then
30046
30047    # Print a helpful message on how to acquire the necessary build dependency.
30048    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30049    MISSING_DEPENDENCY=freetype2
30050    PKGHANDLER_COMMAND=
30051
30052    case $PKGHANDLER in
30053	apt-get)
30054                apt_help     $MISSING_DEPENDENCY ;;
30055    yum)
30056                yum_help     $MISSING_DEPENDENCY ;;
30057	port)
30058                port_help    $MISSING_DEPENDENCY ;;
30059	pkgutil)
30060                pkgutil_help $MISSING_DEPENDENCY ;;
30061	pkgadd)
30062                pkgadd_help  $MISSING_DEPENDENCY ;;
30063    * )
30064      break ;;
30065    esac
30066
30067    if test "x$PKGHANDLER_COMMAND" != x; then
30068        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30069    fi
30070
30071		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30072	fi
30073
30074        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30075            # AC_CHECK_LIB does not support use of cl.exe
30076            PREV_LDFLAGS="$LDFLAGS"
30077            LDFLAGS="$FREETYPE2_LIBS"
30078            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30079$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30080if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30081  $as_echo_n "(cached) " >&6
30082else
30083  ac_check_lib_save_LIBS=$LIBS
30084LIBS="-lfreetype  $LIBS"
30085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30086/* end confdefs.h.  */
30087
30088/* Override any GCC internal prototype to avoid an error.
30089   Use char because int might match the return type of a GCC
30090   builtin and then its argument prototype would still apply.  */
30091#ifdef __cplusplus
30092extern "C"
30093#endif
30094char FT_Init_FreeType ();
30095int
30096main ()
30097{
30098return FT_Init_FreeType ();
30099  ;
30100  return 0;
30101}
30102_ACEOF
30103if ac_fn_cxx_try_link "$LINENO"; then :
30104  ac_cv_lib_freetype_FT_Init_FreeType=yes
30105else
30106  ac_cv_lib_freetype_FT_Init_FreeType=no
30107fi
30108rm -f core conftest.err conftest.$ac_objext \
30109    conftest$ac_exeext conftest.$ac_ext
30110LIBS=$ac_check_lib_save_LIBS
30111fi
30112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30113$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30114if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30115  FREETYPE2_FOUND=true
30116else
30117  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30118fi
30119
30120            LDFLAGS="$PREV_LDFLAGS"
30121        fi
30122fi
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132###############################################################################
30133#
30134# Check for alsa headers and libraries. Used on Linux/GNU systems.
30135#
30136
30137# Check whether --with-alsa was given.
30138if test "${with_alsa+set}" = set; then :
30139  withval=$with_alsa;
30140fi
30141
30142
30143# Check whether --with-alsa-include was given.
30144if test "${with_alsa_include+set}" = set; then :
30145  withval=$with_alsa_include;
30146fi
30147
30148
30149# Check whether --with-alsa-lib was given.
30150if test "${with_alsa_lib+set}" = set; then :
30151  withval=$with_alsa_lib;
30152fi
30153
30154
30155if test "x$ALSA_NOT_NEEDED" = xyes; then
30156	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30157		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30158$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30159	fi
30160	ALSA_CFLAGS=
30161	ALSA_LIBS=
30162else
30163	ALSA_FOUND=no
30164
30165	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30166	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30167	fi
30168
30169	if test "x${with_alsa}" != x; then
30170	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30171	    ALSA_CFLAGS="-I${with_alsa}/include"
30172	    ALSA_FOUND=yes
30173	fi
30174	if test "x${with_alsa_include}" != x; then
30175	    ALSA_CFLAGS="-I${with_alsa_include}"
30176	    ALSA_FOUND=yes
30177	fi
30178	if test "x${with_alsa_lib}" != x; then
30179	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30180	    ALSA_FOUND=yes
30181	fi
30182	if test "x$ALSA_FOUND" = xno; then
30183
30184
30185    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30186        # Source the builddeps file again, to make sure it uses the latest variables!
30187        . $builddepsfile
30188        # Look for a target and build machine specific resource!
30189        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30190        if test "x$resource" = x; then
30191            # Ok, lets instead look for a target specific resource
30192            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30193        fi
30194        if test "x$resource" = x; then
30195            # Ok, lets instead look for a build specific resource
30196            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30197        fi
30198        if test "x$resource" = x; then
30199            # Ok, lets instead look for a generic resource
30200            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30201            resource=${builddep_alsa}
30202        fi
30203        if test "x$resource" != x; then
30204            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30205$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30206	    # If the resource in the builddeps.conf file is an existing directory,
30207	    # for example /java/linux/cups
30208	    if test -d ${resource}; then
30209	       depdir=${resource}
30210	    else
30211
30212# alsa is for example mymodule
30213# $resource is for example libs/general/libmymod_1_2_3.zip
30214# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30215# $with_builddeps_dir is for example /localhome/builddeps
30216# depdir is the name of the variable into which we store the depdir, eg MYMOD
30217# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30218# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30219    filename=`basename $resource`
30220    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30221    filebase=${filename%%.*}
30222    extension=${filename#*.}
30223    installdir=$with_builddeps_dir/$filebase
30224    if test ! -f $installdir/$filename.unpacked; then
30225        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30226$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30227        if test ! -d $installdir; then
30228            mkdir -p $installdir
30229        fi
30230        if test ! -d $installdir; then
30231            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30232        fi
30233        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30234        touch $tmpfile
30235        if test ! -f $tmpfile; then
30236            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30237        fi
30238
30239    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30240    # $tmpfile is the local file name for the downloaded file.
30241    VALID_TOOL=no
30242    if test "x$BDEPS_FTP" = xwget; then
30243       VALID_TOOL=yes
30244       wget -O $tmpfile $with_builddeps_server/$resource
30245    fi
30246    if test "x$BDEPS_FTP" = xlftp; then
30247       VALID_TOOL=yes
30248       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30249    fi
30250    if test "x$BDEPS_FTP" = xftp; then
30251        VALID_TOOL=yes
30252        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30253        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30254        FTPUSERPWD=${FTPSERVER%%@*}
30255        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30256            FTPUSER=${userpwd%%:*}
30257            FTPPWD=${userpwd#*@}
30258            FTPSERVER=${FTPSERVER#*@}
30259        else
30260            FTPUSER=ftp
30261            FTPPWD=ftp
30262        fi
30263        # the "pass" command does not work on some
30264        # ftp clients (read ftp.exe) but if it works,
30265        # passive mode is better!
30266        (\
30267            echo "user $FTPUSER $FTPPWD"        ;\
30268            echo "pass"                         ;\
30269            echo "bin"                          ;\
30270            echo "get $FTPPATH $tmpfile"              ;\
30271        ) | ftp -in $FTPSERVER
30272    fi
30273    if test "x$VALID_TOOL" != xyes; then
30274       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30275    fi
30276
30277        mv $tmpfile $installdir/$filename
30278        if test ! -s $installdir/$filename; then
30279            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30280        fi
30281        case "$extension" in
30282            zip)  echo "Unzipping $installdir/$filename..."
30283               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30284            ;;
30285            tar.gz) echo "Untaring $installdir/$filename..."
30286               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30287            ;;
30288            tgz) echo "Untaring $installdir/$filename..."
30289               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30290            ;;
30291            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30292            ;;
30293        esac
30294    fi
30295    if test -f $installdir/$filename.unpacked; then
30296        depdir=$installdir
30297    fi
30298
30299	    fi
30300            # Source the builddeps file again, because in the previous command, the depdir
30301            # was updated to point at the current build dependency install directory.
30302            . $builddepsfile
30303            # Now extract variables from the builddeps.conf files.
30304            theroot=${builddep_alsa_ROOT}
30305            thecflags=${builddep_alsa_CFLAGS}
30306            thelibs=${builddep_alsa_LIBS}
30307            if test "x$depdir" = x; then
30308                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30309            fi
30310            ALSA=$depdir
30311            if test "x$theroot" != x; then
30312               ALSA="$theroot"
30313            fi
30314            if test "x$thecflags" != x; then
30315               ALSA_CFLAGS="$thecflags"
30316            fi
30317            if test "x$thelibs" != x; then
30318               ALSA_LIBS="$thelibs"
30319            fi
30320            ALSA_FOUND=yes
30321            else ALSA_FOUND=no
30322
30323        fi
30324        else ALSA_FOUND=no
30325
30326    fi
30327
30328	fi
30329	if test "x$ALSA_FOUND" = xno; then
30330
30331pkg_failed=no
30332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30333$as_echo_n "checking for ALSA... " >&6; }
30334
30335if test -n "$ALSA_CFLAGS"; then
30336    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30337 elif test -n "$PKG_CONFIG"; then
30338    if test -n "$PKG_CONFIG" && \
30339    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30340  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30341  ac_status=$?
30342  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30343  test $ac_status = 0; }; then
30344  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30345else
30346  pkg_failed=yes
30347fi
30348 else
30349    pkg_failed=untried
30350fi
30351if test -n "$ALSA_LIBS"; then
30352    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30353 elif test -n "$PKG_CONFIG"; then
30354    if test -n "$PKG_CONFIG" && \
30355    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30356  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30357  ac_status=$?
30358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30359  test $ac_status = 0; }; then
30360  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30361else
30362  pkg_failed=yes
30363fi
30364 else
30365    pkg_failed=untried
30366fi
30367
30368
30369
30370if test $pkg_failed = yes; then
30371
30372if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30373        _pkg_short_errors_supported=yes
30374else
30375        _pkg_short_errors_supported=no
30376fi
30377        if test $_pkg_short_errors_supported = yes; then
30378	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30379        else
30380	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30381        fi
30382	# Put the nasty error message in config.log where it belongs
30383	echo "$ALSA_PKG_ERRORS" >&5
30384
30385	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30386$as_echo "no" >&6; }
30387                ALSA_FOUND=no
30388elif test $pkg_failed = untried; then
30389	ALSA_FOUND=no
30390else
30391	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30392	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30394$as_echo "yes" >&6; }
30395	ALSA_FOUND=yes
30396fi
30397	fi
30398	if test "x$ALSA_FOUND" = xno; then
30399	    for ac_header in alsa/asoundlib.h
30400do :
30401  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30402if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30403  cat >>confdefs.h <<_ACEOF
30404#define HAVE_ALSA_ASOUNDLIB_H 1
30405_ACEOF
30406 ALSA_FOUND=yes
30407	                      ALSA_CFLAGS=-Iignoreme
30408	                      ALSA_LIBS=-lasound
30409	                      DEFAULT_ALSA=yes
30410else
30411  ALSA_FOUND=no
30412fi
30413
30414done
30415
30416	fi
30417	if test "x$ALSA_FOUND" = xno; then
30418
30419    # Print a helpful message on how to acquire the necessary build dependency.
30420    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30421    MISSING_DEPENDENCY=alsa
30422    PKGHANDLER_COMMAND=
30423
30424    case $PKGHANDLER in
30425	apt-get)
30426                apt_help     $MISSING_DEPENDENCY ;;
30427    yum)
30428                yum_help     $MISSING_DEPENDENCY ;;
30429	port)
30430                port_help    $MISSING_DEPENDENCY ;;
30431	pkgutil)
30432                pkgutil_help $MISSING_DEPENDENCY ;;
30433	pkgadd)
30434                pkgadd_help  $MISSING_DEPENDENCY ;;
30435    * )
30436      break ;;
30437    esac
30438
30439    if test "x$PKGHANDLER_COMMAND" != x; then
30440        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30441    fi
30442
30443	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30444	fi
30445fi
30446
30447
30448
30449
30450
30451
30452
30453###############################################################################
30454#
30455# Check for the jpeg library
30456#
30457
30458USE_EXTERNAL_LIBJPEG=true
30459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30460$as_echo_n "checking for main in -ljpeg... " >&6; }
30461if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30462  $as_echo_n "(cached) " >&6
30463else
30464  ac_check_lib_save_LIBS=$LIBS
30465LIBS="-ljpeg  $LIBS"
30466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30467/* end confdefs.h.  */
30468
30469
30470int
30471main ()
30472{
30473return main ();
30474  ;
30475  return 0;
30476}
30477_ACEOF
30478if ac_fn_cxx_try_link "$LINENO"; then :
30479  ac_cv_lib_jpeg_main=yes
30480else
30481  ac_cv_lib_jpeg_main=no
30482fi
30483rm -f core conftest.err conftest.$ac_objext \
30484    conftest$ac_exeext conftest.$ac_ext
30485LIBS=$ac_check_lib_save_LIBS
30486fi
30487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30488$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30489if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30490  cat >>confdefs.h <<_ACEOF
30491#define HAVE_LIBJPEG 1
30492_ACEOF
30493
30494  LIBS="-ljpeg $LIBS"
30495
30496else
30497   USE_EXTERNAL_LIBJPEG=false
30498               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30499$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30500
30501fi
30502
30503
30504
30505###############################################################################
30506#
30507# Check for the gif library
30508#
30509
30510USE_EXTERNAL_LIBJPEG=true
30511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30512$as_echo_n "checking for main in -lgif... " >&6; }
30513if test "${ac_cv_lib_gif_main+set}" = set; then :
30514  $as_echo_n "(cached) " >&6
30515else
30516  ac_check_lib_save_LIBS=$LIBS
30517LIBS="-lgif  $LIBS"
30518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30519/* end confdefs.h.  */
30520
30521
30522int
30523main ()
30524{
30525return main ();
30526  ;
30527  return 0;
30528}
30529_ACEOF
30530if ac_fn_cxx_try_link "$LINENO"; then :
30531  ac_cv_lib_gif_main=yes
30532else
30533  ac_cv_lib_gif_main=no
30534fi
30535rm -f core conftest.err conftest.$ac_objext \
30536    conftest$ac_exeext conftest.$ac_ext
30537LIBS=$ac_check_lib_save_LIBS
30538fi
30539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30540$as_echo "$ac_cv_lib_gif_main" >&6; }
30541if test "x$ac_cv_lib_gif_main" = x""yes; then :
30542  cat >>confdefs.h <<_ACEOF
30543#define HAVE_LIBGIF 1
30544_ACEOF
30545
30546  LIBS="-lgif $LIBS"
30547
30548else
30549   USE_EXTERNAL_LIBGIF=false
30550               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30551$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30552
30553fi
30554
30555
30556
30557###############################################################################
30558#
30559# Check for the zlib library
30560#
30561
30562
30563# Check whether --with-zlib was given.
30564if test "${with_zlib+set}" = set; then :
30565  withval=$with_zlib;
30566fi
30567
30568
30569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30570$as_echo_n "checking for compress in -lz... " >&6; }
30571if test "${ac_cv_lib_z_compress+set}" = set; then :
30572  $as_echo_n "(cached) " >&6
30573else
30574  ac_check_lib_save_LIBS=$LIBS
30575LIBS="-lz  $LIBS"
30576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30577/* end confdefs.h.  */
30578
30579/* Override any GCC internal prototype to avoid an error.
30580   Use char because int might match the return type of a GCC
30581   builtin and then its argument prototype would still apply.  */
30582#ifdef __cplusplus
30583extern "C"
30584#endif
30585char compress ();
30586int
30587main ()
30588{
30589return compress ();
30590  ;
30591  return 0;
30592}
30593_ACEOF
30594if ac_fn_cxx_try_link "$LINENO"; then :
30595  ac_cv_lib_z_compress=yes
30596else
30597  ac_cv_lib_z_compress=no
30598fi
30599rm -f core conftest.err conftest.$ac_objext \
30600    conftest$ac_exeext conftest.$ac_ext
30601LIBS=$ac_check_lib_save_LIBS
30602fi
30603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30604$as_echo "$ac_cv_lib_z_compress" >&6; }
30605if test "x$ac_cv_lib_z_compress" = x""yes; then :
30606   ZLIB_FOUND=yes
30607else
30608   ZLIB_FOUND=no
30609fi
30610
30611
30612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30613$as_echo_n "checking for which zlib to use... " >&6; }
30614
30615DEFAULT_ZLIB=bundled
30616if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30617#
30618# On macosx default is system...on others default is
30619#
30620    DEFAULT_ZLIB=system
30621fi
30622
30623if test "x${ZLIB_FOUND}" != "xyes"; then
30624#
30625# If we don't find any system...set default to bundled
30626#
30627    DEFAULT_ZLIB=bundled
30628fi
30629
30630#
30631# If user didn't specify, use DEFAULT_ZLIB
30632#
30633if test "x${with_zlib}" = "x"; then
30634    with_zlib=${DEFAULT_ZLIB}
30635fi
30636
30637if test "x${with_zlib}" = "xbundled"; then
30638    USE_EXTERNAL_LIBZ=false
30639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30640$as_echo "bundled" >&6; }
30641elif test "x${with_zlib}" = "xsystem"; then
30642    if test "x${ZLIB_FOUND}" = "xyes"; then
30643        USE_EXTERNAL_LIBZ=true
30644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30645$as_echo "system" >&6; }
30646    else
30647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30648$as_echo "system not found" >&6; }
30649        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30650    fi
30651else
30652    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30653fi
30654
30655
30656
30657###############################################################################
30658LIBZIP_CAN_USE_MMAP=true
30659
30660
30661
30662###############################################################################
30663#
30664# Check if altzone exists in time.h
30665#
30666
30667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30668/* end confdefs.h.  */
30669#include <time.h>
30670int
30671main ()
30672{
30673return (int)altzone;
30674  ;
30675  return 0;
30676}
30677_ACEOF
30678if ac_fn_cxx_try_link "$LINENO"; then :
30679  has_altzone=yes
30680else
30681  has_altzone=no
30682fi
30683rm -f core conftest.err conftest.$ac_objext \
30684    conftest$ac_exeext conftest.$ac_ext
30685if test "x$has_altzone" = xyes; then
30686
30687$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30688
30689fi
30690
30691###############################################################################
30692#
30693# Check the maths library
30694#
30695
30696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30697$as_echo_n "checking for cos in -lm... " >&6; }
30698if test "${ac_cv_lib_m_cos+set}" = set; then :
30699  $as_echo_n "(cached) " >&6
30700else
30701  ac_check_lib_save_LIBS=$LIBS
30702LIBS="-lm  $LIBS"
30703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30704/* end confdefs.h.  */
30705
30706/* Override any GCC internal prototype to avoid an error.
30707   Use char because int might match the return type of a GCC
30708   builtin and then its argument prototype would still apply.  */
30709#ifdef __cplusplus
30710extern "C"
30711#endif
30712char cos ();
30713int
30714main ()
30715{
30716return cos ();
30717  ;
30718  return 0;
30719}
30720_ACEOF
30721if ac_fn_cxx_try_link "$LINENO"; then :
30722  ac_cv_lib_m_cos=yes
30723else
30724  ac_cv_lib_m_cos=no
30725fi
30726rm -f core conftest.err conftest.$ac_objext \
30727    conftest$ac_exeext conftest.$ac_ext
30728LIBS=$ac_check_lib_save_LIBS
30729fi
30730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30731$as_echo "$ac_cv_lib_m_cos" >&6; }
30732if test "x$ac_cv_lib_m_cos" = x""yes; then :
30733  cat >>confdefs.h <<_ACEOF
30734#define HAVE_LIBM 1
30735_ACEOF
30736
30737  LIBS="-lm $LIBS"
30738
30739else
30740
30741                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30742$as_echo "$as_me: Maths library was not found" >&6;}
30743
30744fi
30745
30746
30747
30748###############################################################################
30749#
30750# Check for libdl.so
30751
30752save_LIBS="$LIBS"
30753LIBS=""
30754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30755$as_echo_n "checking for dlopen in -ldl... " >&6; }
30756if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30757  $as_echo_n "(cached) " >&6
30758else
30759  ac_check_lib_save_LIBS=$LIBS
30760LIBS="-ldl  $LIBS"
30761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30762/* end confdefs.h.  */
30763
30764/* Override any GCC internal prototype to avoid an error.
30765   Use char because int might match the return type of a GCC
30766   builtin and then its argument prototype would still apply.  */
30767#ifdef __cplusplus
30768extern "C"
30769#endif
30770char dlopen ();
30771int
30772main ()
30773{
30774return dlopen ();
30775  ;
30776  return 0;
30777}
30778_ACEOF
30779if ac_fn_cxx_try_link "$LINENO"; then :
30780  ac_cv_lib_dl_dlopen=yes
30781else
30782  ac_cv_lib_dl_dlopen=no
30783fi
30784rm -f core conftest.err conftest.$ac_objext \
30785    conftest$ac_exeext conftest.$ac_ext
30786LIBS=$ac_check_lib_save_LIBS
30787fi
30788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30789$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30790if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30791  cat >>confdefs.h <<_ACEOF
30792#define HAVE_LIBDL 1
30793_ACEOF
30794
30795  LIBS="-ldl $LIBS"
30796
30797fi
30798
30799LIBDL="$LIBS"
30800
30801LIBS="$save_LIBS"
30802
30803
30804
30805###############################################################################
30806#
30807# statically link libstdc++ before C++ ABI is stablized on Linux unless
30808# dynamic build is configured on command line.
30809#
30810
30811# Check whether --with-stdc++lib was given.
30812if test "${with_stdc__lib+set}" = set; then :
30813  withval=$with_stdc__lib;
30814    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30815        && test "x$with_stdc__lib" != xdefault; then
30816      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30817    fi
30818
30819else
30820  with_stdc__lib=default
30821
30822fi
30823
30824
30825if test "x$OPENJDK_TARGET_OS" = xlinux; then
30826    # Test if -lstdc++ works.
30827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30828$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30829    ac_ext=cpp
30830ac_cpp='$CXXCPP $CPPFLAGS'
30831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30834
30835    OLD_CXXFLAGS="$CXXFLAGS"
30836    CXXFLAGS="$CXXFLAGS -lstdc++"
30837    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30838/* end confdefs.h.  */
30839
30840int
30841main ()
30842{
30843return 0;
30844  ;
30845  return 0;
30846}
30847_ACEOF
30848if ac_fn_cxx_try_link "$LINENO"; then :
30849  has_dynamic_libstdcxx=yes
30850else
30851  has_dynamic_libstdcxx=no
30852fi
30853rm -f core conftest.err conftest.$ac_objext \
30854    conftest$ac_exeext conftest.$ac_ext
30855    CXXFLAGS="$OLD_CXXFLAGS"
30856    ac_ext=cpp
30857ac_cpp='$CXXCPP $CPPFLAGS'
30858ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30859ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30860ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30861
30862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30863$as_echo "$has_dynamic_libstdcxx" >&6; }
30864
30865    # Test if stdc++ can be linked statically.
30866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30867$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30868    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30869    ac_ext=cpp
30870ac_cpp='$CXXCPP $CPPFLAGS'
30871ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30872ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30873ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30874
30875    OLD_LIBS="$LIBS"
30876    OLD_CXX="$CXX"
30877    LIBS="$STATIC_STDCXX_FLAGS"
30878    CXX="$CC"
30879    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30880/* end confdefs.h.  */
30881
30882int
30883main ()
30884{
30885return 0;
30886  ;
30887  return 0;
30888}
30889_ACEOF
30890if ac_fn_cxx_try_link "$LINENO"; then :
30891  has_static_libstdcxx=yes
30892else
30893  has_static_libstdcxx=no
30894fi
30895rm -f core conftest.err conftest.$ac_objext \
30896    conftest$ac_exeext conftest.$ac_ext
30897    LIBS="$OLD_LIBS"
30898    CXX="$OLD_CXX"
30899    ac_ext=cpp
30900ac_cpp='$CXXCPP $CPPFLAGS'
30901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30904
30905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30906$as_echo "$has_static_libstdcxx" >&6; }
30907
30908    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30909        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30910    fi
30911
30912    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30913        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30914    fi
30915
30916    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30917        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30918    fi
30919
30920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30921$as_echo_n "checking how to link with libstdc++... " >&6; }
30922    # If dynamic was requested, it's available since it would fail above otherwise.
30923    # If dynamic wasn't requested, go with static unless it isn't available.
30924    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30925        LIBCXX="$LIBCXX -lstdc++"
30926        LDCXX="$CXX"
30927        STATIC_CXX_SETTING="STATIC_CXX=false"
30928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30929$as_echo "dynamic" >&6; }
30930    else
30931        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30932        LDCXX="$CC"
30933        STATIC_CXX_SETTING="STATIC_CXX=true"
30934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30935$as_echo "static" >&6; }
30936    fi
30937fi
30938
30939
30940# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30941if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30942    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30943fi
30944
30945# TODO better (platform agnostic) test
30946if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30947    LIBCXX="-lstdc++"
30948fi
30949
30950
30951
30952
30953
30954# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30955
30956# When using cygwin or msys, we need a wrapper binary that renames
30957# /cygdrive/c/ arguments into c:/ arguments and peeks into
30958# @files and rewrites these too! This wrapper binary is
30959# called fixpath.
30960FIXPATH=
30961if test "x$OPENJDK_BUILD_OS" = xwindows; then
30962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30963$as_echo_n "checking if fixpath can be created... " >&6; }
30964    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30965    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30966    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30967      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30968      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30969      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30970      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30971    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30972      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30973      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30974
30975      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30976      # @ was chosen as separator to minimize risk of other tools messing around with it
30977      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30978      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30979
30980      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30981    fi
30982    rm -f $OUTPUT_ROOT/fixpath*
30983    cd $OUTPUT_ROOT
30984    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30985    cd $CURDIR
30986
30987    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30989$as_echo "no" >&6; }
30990        cat $OUTPUT_ROOT/fixpath1.log
30991        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30992    fi
30993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30994$as_echo "yes" >&6; }
30995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30996$as_echo_n "checking if fixpath.exe works... " >&6; }
30997    cd $OUTPUT_ROOT
30998    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30999    cd $CURDIR
31000    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31002$as_echo "no" >&6; }
31003        cat $OUTPUT_ROOT/fixpath2.log
31004        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31005    fi
31006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31007$as_echo "yes" >&6; }
31008    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31009fi
31010
31011
31012
31013
31014###############################################################################
31015#
31016# We need to do some final tweaking, when everything else is done.
31017#
31018###############################################################################
31019
31020
31021HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31022
31023
31024# The name of the Service Agent jar.
31025SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31026if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31027    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31028fi
31029
31030
31031
31032
31033###############################################################################
31034#
31035# Configure parts of the build that only affect the build performance,
31036# not the result.
31037#
31038###############################################################################
31039
31040
31041# How many cores do we have on this build system?
31042
31043# Check whether --with-num-cores was given.
31044if test "${with_num_cores+set}" = set; then :
31045  withval=$with_num_cores;
31046fi
31047
31048if test "x$with_num_cores" = x; then
31049    # The number of cores were not specified, try to probe them.
31050
31051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31052$as_echo_n "checking for number of cores... " >&6; }
31053    NUM_CORES=1
31054    FOUND_CORES=no
31055
31056    if test -f /proc/cpuinfo; then
31057        # Looks like a Linux (or cygwin) system
31058        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31059        FOUND_CORES=yes
31060    elif test -x /usr/sbin/psrinfo; then
31061        # Looks like a Solaris system
31062        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31063        FOUND_CORES=yes
31064    elif test -x /usr/sbin/system_profiler; then
31065        # Looks like a MacOSX system
31066        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31067        FOUND_CORES=yes
31068    elif test -n "$NUMBER_OF_PROCESSORS"; then
31069        # On windows, look in the env
31070        NUM_CORES=$NUMBER_OF_PROCESSORS
31071        FOUND_CORES=yes
31072    fi
31073
31074    # For c/c++ code we run twice as many concurrent build
31075    # jobs than we have cores, otherwise we will stall on io.
31076    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31077
31078    if test "x$FOUND_CORES" = xyes; then
31079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31080$as_echo "$NUM_CORES" >&6; }
31081    else
31082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31083$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31085$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31086    fi
31087
31088
31089else
31090    NUM_CORES=$with_num_cores
31091    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31092fi
31093
31094
31095
31096
31097# How much memory do we have on this build system?
31098
31099# Check whether --with-memory-size was given.
31100if test "${with_memory_size+set}" = set; then :
31101  withval=$with_memory_size;
31102fi
31103
31104if test "x$with_memory_size" = x; then
31105    # The memory size was not specified, try to probe it.
31106
31107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31108$as_echo_n "checking for memory size... " >&6; }
31109    # Default to 1024 MB
31110    MEMORY_SIZE=1024
31111    FOUND_MEM=no
31112
31113    if test -f /proc/meminfo; then
31114        # Looks like a Linux (or cygwin) system
31115        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31116        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31117        FOUND_MEM=yes
31118    elif test -x /usr/sbin/prtconf; then
31119        # Looks like a Solaris system
31120        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31121        FOUND_MEM=yes
31122    elif test -x /usr/sbin/system_profiler; then
31123        # Looks like a MacOSX system
31124        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31125        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31126        FOUND_MEM=yes
31127    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31128        # Windows, but without cygwin
31129        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31130        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31131        FOUND_MEM=yes
31132    fi
31133
31134    if test "x$FOUND_MEM" = xyes; then
31135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31136$as_echo "$MEMORY_SIZE MB" >&6; }
31137    else
31138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31139$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31141$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31142    fi
31143
31144else
31145    MEMORY_SIZE=$with_memory_size
31146fi
31147
31148
31149
31150# Setup smart javac (after cores and memory have been setup)
31151
31152
31153# Check whether --with-sjavac-server-java was given.
31154if test "${with_sjavac_server_java+set}" = set; then :
31155  withval=$with_sjavac_server_java;
31156fi
31157
31158
31159if test "x$with_sjavac_server_java" != x; then
31160    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31161    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31162    if test "x$FOUND_VERSION" = x; then
31163        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31164    fi
31165else
31166    SJAVAC_SERVER_JAVA=""
31167    # Hotspot specific options.
31168
31169    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31170    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31171    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31172    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31173    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31174        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31175    fi
31176
31177    # JRockit specific options.
31178
31179    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31180    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31181    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31182    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31183    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31184        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31185    fi
31186
31187    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31188fi
31189
31190
31191
31192# Check whether --with-sjavac-server-cores was given.
31193if test "${with_sjavac_server_cores+set}" = set; then :
31194  withval=$with_sjavac_server_cores;
31195fi
31196
31197if test "x$with_sjavac_server_cores" != x; then
31198    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31199else
31200    if test "$NUM_CORES" -gt 16; then
31201        # We set this arbitrary limit because we want to limit the heap
31202        # size of the javac server.
31203        # In the future we will make the javac compilers in the server
31204        # share more and more state, thus enabling us to use more and
31205        # more concurrent threads in the server.
31206        SJAVAC_SERVER_CORES="16"
31207    else
31208        SJAVAC_SERVER_CORES="$NUM_CORES"
31209    fi
31210
31211    if test "$MEMORY_SIZE" -gt "17000"; then
31212        MAX_HEAP_MEM=10000
31213
31214    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31215    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31216    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31217    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31218    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31219        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31220    fi
31221
31222
31223    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31224    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31225    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31226    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31227    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31228        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31229    fi
31230
31231    elif test "$MEMORY_SIZE" -gt "10000"; then
31232        MAX_HEAP_MEM=6000
31233
31234    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31235    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31236    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31237    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31238    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31239        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31240    fi
31241
31242
31243    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31244    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31245    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31246    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31247    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31248        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31249    fi
31250
31251    elif test "$MEMORY_SIZE" -gt "5000"; then
31252        MAX_HEAP_MEM=3000
31253
31254    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31255    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31256    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31257    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31258    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31259        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31260    fi
31261
31262
31263    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31264    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31265    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31266    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31267    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31268        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31269    fi
31270
31271    elif test "$MEMORY_SIZE" -gt "3800"; then
31272        MAX_HEAP_MEM=2500
31273
31274    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31275    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31276    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31277    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31278    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31279        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31280    fi
31281
31282    elif test "$MEMORY_SIZE" -gt "1900"; then
31283        MAX_HEAP_MEM=1200
31284
31285    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31286    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31287    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31288    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31289    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31290        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31291    fi
31292
31293    elif test "$MEMORY_SIZE" -gt "1000"; then
31294        MAX_HEAP_MEM=900
31295
31296    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31297    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31298    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31299    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31300    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31301        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31302    fi
31303
31304    else
31305        MAX_HEAP_MEM=512
31306
31307    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31308    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31309    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31310    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31311    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31312        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31313    fi
31314
31315    fi
31316
31317
31318    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31319    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31320    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31321    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -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:PermSize=32m"
31324    fi
31325
31326
31327    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31328    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31329    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31330    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31331    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31332        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31333    fi
31334
31335
31336    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31337    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31338    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31339    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31340    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31341        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31342    fi
31343
31344
31345    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31346    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31348$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31349        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31351$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31352    fi
31353fi
31354
31355
31356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31357$as_echo_n "checking whether to use sjavac... " >&6; }
31358# Check whether --enable-sjavac was given.
31359if test "${enable_sjavac+set}" = set; then :
31360  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31361else
31362  ENABLE_SJAVAC='no'
31363fi
31364
31365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31366$as_echo "$ENABLE_SJAVAC" >&6; }
31367
31368
31369if test "x$ENABLE_SJAVAC" = xyes; then
31370    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31371else
31372    SJAVAC_SERVER_DIR=
31373fi
31374
31375
31376
31377
31378# Can the C/C++ compiler use precompiled headers?
31379
31380
31381###############################################################################
31382#
31383# Can the C/C++ compiler use precompiled headers?
31384#
31385# Check whether --enable-precompiled-headers was given.
31386if test "${enable_precompiled_headers+set}" = set; then :
31387  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31388else
31389  ENABLE_PRECOMPH=yes
31390fi
31391
31392
31393USE_PRECOMPILED_HEADER=1
31394if test "x$ENABLE_PRECOMPH" = xno; then
31395    USE_PRECOMPILED_HEADER=0
31396fi
31397
31398if test "x$ENABLE_PRECOMPH" = xyes; then
31399    # Check that the compiler actually supports precomp headers.
31400    if test "x$GCC" = xyes; then
31401         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31402$as_echo_n "checking that precompiled headers work... " >&6; }
31403         echo "int alfa();" > conftest.h
31404         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31405         if test ! -f conftest.hpp.gch; then
31406             USE_PRECOMPILED_HEADER=0
31407             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31408$as_echo "no" >&6; }
31409         else
31410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31411$as_echo "yes" >&6; }
31412         fi
31413         rm -f conftest.h conftest.hpp.gch
31414    fi
31415fi
31416
31417
31418
31419
31420# Setup use of ccache, if available
31421
31422    # Check whether --enable-ccache was given.
31423if test "${enable_ccache+set}" = set; then :
31424  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31425else
31426  ENABLE_CCACHE=yes
31427fi
31428
31429    if test "x$ENABLE_CCACHE" = xyes; then
31430        # Extract the first word of "ccache", so it can be a program name with args.
31431set dummy ccache; ac_word=$2
31432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31433$as_echo_n "checking for $ac_word... " >&6; }
31434if test "${ac_cv_path_CCACHE+set}" = set; then :
31435  $as_echo_n "(cached) " >&6
31436else
31437  case $CCACHE in
31438  [\\/]* | ?:[\\/]*)
31439  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31440  ;;
31441  *)
31442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31443for as_dir in $PATH
31444do
31445  IFS=$as_save_IFS
31446  test -z "$as_dir" && as_dir=.
31447    for ac_exec_ext in '' $ac_executable_extensions; do
31448  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31449    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31451    break 2
31452  fi
31453done
31454  done
31455IFS=$as_save_IFS
31456
31457  ;;
31458esac
31459fi
31460CCACHE=$ac_cv_path_CCACHE
31461if test -n "$CCACHE"; then
31462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31463$as_echo "$CCACHE" >&6; }
31464else
31465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31466$as_echo "no" >&6; }
31467fi
31468
31469
31470    else
31471        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31472$as_echo_n "checking for ccache... " >&6; }
31473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31474$as_echo "explicitly disabled" >&6; }
31475        CCACHE=
31476    fi
31477
31478
31479
31480# Check whether --with-ccache-dir was given.
31481if test "${with_ccache_dir+set}" = set; then :
31482  withval=$with_ccache_dir;
31483fi
31484
31485
31486    if test "x$with_ccache_dir" != x; then
31487        # When using a non home ccache directory, assume the use is to share ccache files
31488        # with other users. Thus change the umask.
31489        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31490    fi
31491    CCACHE_FOUND=""
31492    if test "x$CCACHE" != x; then
31493
31494    if test "x$CCACHE" != x; then
31495        CCACHE_FOUND="true"
31496        # Only use ccache if it is 3.1.4 or later, which supports
31497        # precompiled headers.
31498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31499$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31500        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31501        if test "x$HAS_GOOD_CCACHE" = x; then
31502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31503$as_echo "no, disabling ccache" >&6; }
31504            CCACHE=
31505        else
31506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31507$as_echo "yes" >&6; }
31508            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31509$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31510            PUSHED_FLAGS="$CXXFLAGS"
31511            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31512            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31513/* end confdefs.h.  */
31514
31515int
31516main ()
31517{
31518
31519  ;
31520  return 0;
31521}
31522_ACEOF
31523if ac_fn_cxx_try_compile "$LINENO"; then :
31524  CC_KNOWS_CCACHE_TRICK=yes
31525else
31526  CC_KNOWS_CCACHE_TRICK=no
31527fi
31528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31529            CXXFLAGS="$PUSHED_FLAGS"
31530            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31531                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31532$as_echo "yes" >&6; }
31533            else
31534                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31535$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31536                CCACHE=
31537            fi
31538        fi
31539    fi
31540
31541    if test "x$CCACHE" != x; then
31542        CCACHE_SLOPPINESS=time_macros
31543        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31544        CCACHE_FLAGS=-fpch-preprocess
31545
31546        if test "x$SET_CCACHE_DIR" != x; then
31547            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31548	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31549        fi
31550    fi
31551
31552    fi
31553
31554
31555###############################################################################
31556#
31557# And now the finish...
31558#
31559###############################################################################
31560
31561# Check for some common pitfalls
31562
31563  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31564    file_to_test="$SRC_ROOT/LICENSE"
31565    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31566      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
31567    fi
31568  fi
31569
31570
31571
31572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31573$as_echo_n "checking if build directory is on local disk... " >&6; }
31574
31575	# df -l lists only local disks; if the given directory is not found then
31576	# a non-zero exit code is given
31577  if test "x$DF" = x; then
31578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31579      # msys does not have df; use Windows "net use" instead.
31580      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31581      if test "x$IS_NETWORK_DISK" = x; then
31582        OUTPUT_DIR_IS_LOCAL="yes"
31583      else
31584        OUTPUT_DIR_IS_LOCAL="no"
31585      fi
31586    else
31587      # No df here, say it's local
31588      OUTPUT_DIR_IS_LOCAL="yes"
31589    fi
31590  else
31591    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31592      OUTPUT_DIR_IS_LOCAL="yes"
31593    else
31594      OUTPUT_DIR_IS_LOCAL="no"
31595    fi
31596  fi
31597
31598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31599$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31600
31601
31602
31603# Check if the user has any old-style ALT_ variables set.
31604FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31605
31606# Before generating output files, test if they exist. If they do, this is a reconfigure.
31607# Since we can't properly handle the dependencies for this, warn the user about the situation
31608if test -e $OUTPUT_ROOT/spec.gmk; then
31609  IS_RECONFIGURE=yes
31610else
31611  IS_RECONFIGURE=no
31612fi
31613
31614if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31615  HIDE_PERFORMANCE_HINTS=yes
31616else
31617  HIDE_PERFORMANCE_HINTS=no
31618  # Hide it the next time around...
31619  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31620fi
31621
31622
31623
31624# At the end, call the custom hook. (Dummy macro if no custom sources available)
31625
31626
31627# We're messing a bit with internal autoconf variables to put the config.status
31628# in the output directory instead of the current directory.
31629CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31630# Create the actual output files. Now the main work of configure is done.
31631cat >confcache <<\_ACEOF
31632# This file is a shell script that caches the results of configure
31633# tests run on this system so they can be shared between configure
31634# scripts and configure runs, see configure's option --config-cache.
31635# It is not useful on other systems.  If it contains results you don't
31636# want to keep, you may remove or edit it.
31637#
31638# config.status only pays attention to the cache file if you give it
31639# the --recheck option to rerun configure.
31640#
31641# `ac_cv_env_foo' variables (set or unset) will be overridden when
31642# loading this file, other *unset* `ac_cv_foo' will be assigned the
31643# following values.
31644
31645_ACEOF
31646
31647# The following way of writing the cache mishandles newlines in values,
31648# but we know of no workaround that is simple, portable, and efficient.
31649# So, we kill variables containing newlines.
31650# Ultrix sh set writes to stderr and can't be redirected directly,
31651# and sets the high bit in the cache file unless we assign to the vars.
31652(
31653  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31654    eval ac_val=\$$ac_var
31655    case $ac_val in #(
31656    *${as_nl}*)
31657      case $ac_var in #(
31658      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31659$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31660      esac
31661      case $ac_var in #(
31662      _ | IFS | as_nl) ;; #(
31663      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31664      *) { eval $ac_var=; unset $ac_var;} ;;
31665      esac ;;
31666    esac
31667  done
31668
31669  (set) 2>&1 |
31670    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31671    *${as_nl}ac_space=\ *)
31672      # `set' does not quote correctly, so add quotes: double-quote
31673      # substitution turns \\\\ into \\, and sed turns \\ into \.
31674      sed -n \
31675	"s/'/'\\\\''/g;
31676	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31677      ;; #(
31678    *)
31679      # `set' quotes correctly as required by POSIX, so do not add quotes.
31680      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31681      ;;
31682    esac |
31683    sort
31684) |
31685  sed '
31686     /^ac_cv_env_/b end
31687     t clear
31688     :clear
31689     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31690     t end
31691     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31692     :end' >>confcache
31693if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31694  if test -w "$cache_file"; then
31695    test "x$cache_file" != "x/dev/null" &&
31696      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31697$as_echo "$as_me: updating cache $cache_file" >&6;}
31698    cat confcache >$cache_file
31699  else
31700    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31701$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31702  fi
31703fi
31704rm -f confcache
31705
31706test "x$prefix" = xNONE && prefix=$ac_default_prefix
31707# Let make expand exec_prefix.
31708test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31709
31710DEFS=-DHAVE_CONFIG_H
31711
31712ac_libobjs=
31713ac_ltlibobjs=
31714U=
31715for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31716  # 1. Remove the extension, and $U if already installed.
31717  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31718  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31719  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31720  #    will be set to the directory where LIBOBJS objects are built.
31721  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31722  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31723done
31724LIBOBJS=$ac_libobjs
31725
31726LTLIBOBJS=$ac_ltlibobjs
31727
31728
31729
31730: ${CONFIG_STATUS=./config.status}
31731ac_write_fail=0
31732ac_clean_files_save=$ac_clean_files
31733ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31734{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31735$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31736as_write_fail=0
31737cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31738#! $SHELL
31739# Generated by $as_me.
31740# Run this file to recreate the current configuration.
31741# Compiler output produced by configure, useful for debugging
31742# configure, is in config.log if it exists.
31743
31744debug=false
31745ac_cs_recheck=false
31746ac_cs_silent=false
31747
31748SHELL=\${CONFIG_SHELL-$SHELL}
31749export SHELL
31750_ASEOF
31751cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31752## -------------------- ##
31753## M4sh Initialization. ##
31754## -------------------- ##
31755
31756# Be more Bourne compatible
31757DUALCASE=1; export DUALCASE # for MKS sh
31758if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31759  emulate sh
31760  NULLCMD=:
31761  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31762  # is contrary to our usage.  Disable this feature.
31763  alias -g '${1+"$@"}'='"$@"'
31764  setopt NO_GLOB_SUBST
31765else
31766  case `(set -o) 2>/dev/null` in #(
31767  *posix*) :
31768    set -o posix ;; #(
31769  *) :
31770     ;;
31771esac
31772fi
31773
31774
31775as_nl='
31776'
31777export as_nl
31778# Printing a long string crashes Solaris 7 /usr/bin/printf.
31779as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31780as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31781as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31782# Prefer a ksh shell builtin over an external printf program on Solaris,
31783# but without wasting forks for bash or zsh.
31784if test -z "$BASH_VERSION$ZSH_VERSION" \
31785    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31786  as_echo='print -r --'
31787  as_echo_n='print -rn --'
31788elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31789  as_echo='printf %s\n'
31790  as_echo_n='printf %s'
31791else
31792  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31793    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31794    as_echo_n='/usr/ucb/echo -n'
31795  else
31796    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31797    as_echo_n_body='eval
31798      arg=$1;
31799      case $arg in #(
31800      *"$as_nl"*)
31801	expr "X$arg" : "X\\(.*\\)$as_nl";
31802	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31803      esac;
31804      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31805    '
31806    export as_echo_n_body
31807    as_echo_n='sh -c $as_echo_n_body as_echo'
31808  fi
31809  export as_echo_body
31810  as_echo='sh -c $as_echo_body as_echo'
31811fi
31812
31813# The user is always right.
31814if test "${PATH_SEPARATOR+set}" != set; then
31815  PATH_SEPARATOR=:
31816  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31817    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31818      PATH_SEPARATOR=';'
31819  }
31820fi
31821
31822
31823# IFS
31824# We need space, tab and new line, in precisely that order.  Quoting is
31825# there to prevent editors from complaining about space-tab.
31826# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31827# splitting by setting IFS to empty value.)
31828IFS=" ""	$as_nl"
31829
31830# Find who we are.  Look in the path if we contain no directory separator.
31831case $0 in #((
31832  *[\\/]* ) as_myself=$0 ;;
31833  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31834for as_dir in $PATH
31835do
31836  IFS=$as_save_IFS
31837  test -z "$as_dir" && as_dir=.
31838    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31839  done
31840IFS=$as_save_IFS
31841
31842     ;;
31843esac
31844# We did not find ourselves, most probably we were run as `sh COMMAND'
31845# in which case we are not to be found in the path.
31846if test "x$as_myself" = x; then
31847  as_myself=$0
31848fi
31849if test ! -f "$as_myself"; then
31850  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31851  exit 1
31852fi
31853
31854# Unset variables that we do not need and which cause bugs (e.g. in
31855# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31856# suppresses any "Segmentation fault" message there.  '((' could
31857# trigger a bug in pdksh 5.2.14.
31858for as_var in BASH_ENV ENV MAIL MAILPATH
31859do eval test x\${$as_var+set} = xset \
31860  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31861done
31862PS1='$ '
31863PS2='> '
31864PS4='+ '
31865
31866# NLS nuisances.
31867LC_ALL=C
31868export LC_ALL
31869LANGUAGE=C
31870export LANGUAGE
31871
31872# CDPATH.
31873(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31874
31875
31876# as_fn_error STATUS ERROR [LINENO LOG_FD]
31877# ----------------------------------------
31878# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31879# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31880# script with STATUS, using 1 if that was 0.
31881as_fn_error ()
31882{
31883  as_status=$1; test $as_status -eq 0 && as_status=1
31884  if test "$4"; then
31885    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31886    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31887  fi
31888  $as_echo "$as_me: error: $2" >&2
31889  as_fn_exit $as_status
31890} # as_fn_error
31891
31892
31893# as_fn_set_status STATUS
31894# -----------------------
31895# Set $? to STATUS, without forking.
31896as_fn_set_status ()
31897{
31898  return $1
31899} # as_fn_set_status
31900
31901# as_fn_exit STATUS
31902# -----------------
31903# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31904as_fn_exit ()
31905{
31906  set +e
31907  as_fn_set_status $1
31908  exit $1
31909} # as_fn_exit
31910
31911# as_fn_unset VAR
31912# ---------------
31913# Portably unset VAR.
31914as_fn_unset ()
31915{
31916  { eval $1=; unset $1;}
31917}
31918as_unset=as_fn_unset
31919# as_fn_append VAR VALUE
31920# ----------------------
31921# Append the text in VALUE to the end of the definition contained in VAR. Take
31922# advantage of any shell optimizations that allow amortized linear growth over
31923# repeated appends, instead of the typical quadratic growth present in naive
31924# implementations.
31925if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31926  eval 'as_fn_append ()
31927  {
31928    eval $1+=\$2
31929  }'
31930else
31931  as_fn_append ()
31932  {
31933    eval $1=\$$1\$2
31934  }
31935fi # as_fn_append
31936
31937# as_fn_arith ARG...
31938# ------------------
31939# Perform arithmetic evaluation on the ARGs, and store the result in the
31940# global $as_val. Take advantage of shells that can avoid forks. The arguments
31941# must be portable across $(()) and expr.
31942if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31943  eval 'as_fn_arith ()
31944  {
31945    as_val=$(( $* ))
31946  }'
31947else
31948  as_fn_arith ()
31949  {
31950    as_val=`expr "$@" || test $? -eq 1`
31951  }
31952fi # as_fn_arith
31953
31954
31955if expr a : '\(a\)' >/dev/null 2>&1 &&
31956   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31957  as_expr=expr
31958else
31959  as_expr=false
31960fi
31961
31962if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31963  as_basename=basename
31964else
31965  as_basename=false
31966fi
31967
31968if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31969  as_dirname=dirname
31970else
31971  as_dirname=false
31972fi
31973
31974as_me=`$as_basename -- "$0" ||
31975$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31976	 X"$0" : 'X\(//\)$' \| \
31977	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31978$as_echo X/"$0" |
31979    sed '/^.*\/\([^/][^/]*\)\/*$/{
31980	    s//\1/
31981	    q
31982	  }
31983	  /^X\/\(\/\/\)$/{
31984	    s//\1/
31985	    q
31986	  }
31987	  /^X\/\(\/\).*/{
31988	    s//\1/
31989	    q
31990	  }
31991	  s/.*/./; q'`
31992
31993# Avoid depending upon Character Ranges.
31994as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31995as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31996as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31997as_cr_digits='0123456789'
31998as_cr_alnum=$as_cr_Letters$as_cr_digits
31999
32000ECHO_C= ECHO_N= ECHO_T=
32001case `echo -n x` in #(((((
32002-n*)
32003  case `echo 'xy\c'` in
32004  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32005  xy)  ECHO_C='\c';;
32006  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32007       ECHO_T='	';;
32008  esac;;
32009*)
32010  ECHO_N='-n';;
32011esac
32012
32013rm -f conf$$ conf$$.exe conf$$.file
32014if test -d conf$$.dir; then
32015  rm -f conf$$.dir/conf$$.file
32016else
32017  rm -f conf$$.dir
32018  mkdir conf$$.dir 2>/dev/null
32019fi
32020if (echo >conf$$.file) 2>/dev/null; then
32021  if ln -s conf$$.file conf$$ 2>/dev/null; then
32022    as_ln_s='ln -s'
32023    # ... but there are two gotchas:
32024    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32025    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32026    # In both cases, we have to default to `cp -p'.
32027    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32028      as_ln_s='cp -p'
32029  elif ln conf$$.file conf$$ 2>/dev/null; then
32030    as_ln_s=ln
32031  else
32032    as_ln_s='cp -p'
32033  fi
32034else
32035  as_ln_s='cp -p'
32036fi
32037rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32038rmdir conf$$.dir 2>/dev/null
32039
32040
32041# as_fn_mkdir_p
32042# -------------
32043# Create "$as_dir" as a directory, including parents if necessary.
32044as_fn_mkdir_p ()
32045{
32046
32047  case $as_dir in #(
32048  -*) as_dir=./$as_dir;;
32049  esac
32050  test -d "$as_dir" || eval $as_mkdir_p || {
32051    as_dirs=
32052    while :; do
32053      case $as_dir in #(
32054      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32055      *) as_qdir=$as_dir;;
32056      esac
32057      as_dirs="'$as_qdir' $as_dirs"
32058      as_dir=`$as_dirname -- "$as_dir" ||
32059$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32060	 X"$as_dir" : 'X\(//\)[^/]' \| \
32061	 X"$as_dir" : 'X\(//\)$' \| \
32062	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32063$as_echo X"$as_dir" |
32064    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32065	    s//\1/
32066	    q
32067	  }
32068	  /^X\(\/\/\)[^/].*/{
32069	    s//\1/
32070	    q
32071	  }
32072	  /^X\(\/\/\)$/{
32073	    s//\1/
32074	    q
32075	  }
32076	  /^X\(\/\).*/{
32077	    s//\1/
32078	    q
32079	  }
32080	  s/.*/./; q'`
32081      test -d "$as_dir" && break
32082    done
32083    test -z "$as_dirs" || eval "mkdir $as_dirs"
32084  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32085
32086
32087} # as_fn_mkdir_p
32088if mkdir -p . 2>/dev/null; then
32089  as_mkdir_p='mkdir -p "$as_dir"'
32090else
32091  test -d ./-p && rmdir ./-p
32092  as_mkdir_p=false
32093fi
32094
32095if test -x / >/dev/null 2>&1; then
32096  as_test_x='test -x'
32097else
32098  if ls -dL / >/dev/null 2>&1; then
32099    as_ls_L_option=L
32100  else
32101    as_ls_L_option=
32102  fi
32103  as_test_x='
32104    eval sh -c '\''
32105      if test -d "$1"; then
32106	test -d "$1/.";
32107      else
32108	case $1 in #(
32109	-*)set "./$1";;
32110	esac;
32111	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32112	???[sx]*):;;*)false;;esac;fi
32113    '\'' sh
32114  '
32115fi
32116as_executable_p=$as_test_x
32117
32118# Sed expression to map a string onto a valid CPP name.
32119as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32120
32121# Sed expression to map a string onto a valid variable name.
32122as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32123
32124
32125exec 6>&1
32126## ----------------------------------- ##
32127## Main body of $CONFIG_STATUS script. ##
32128## ----------------------------------- ##
32129_ASEOF
32130test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32131
32132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32133# Save the log message, to keep $0 and so on meaningful, and to
32134# report actual input values of CONFIG_FILES etc. instead of their
32135# values after options handling.
32136ac_log="
32137This file was extended by OpenJDK $as_me jdk8, which was
32138generated by GNU Autoconf 2.67.  Invocation command line was
32139
32140  CONFIG_FILES    = $CONFIG_FILES
32141  CONFIG_HEADERS  = $CONFIG_HEADERS
32142  CONFIG_LINKS    = $CONFIG_LINKS
32143  CONFIG_COMMANDS = $CONFIG_COMMANDS
32144  $ $0 $@
32145
32146on `(hostname || uname -n) 2>/dev/null | sed 1q`
32147"
32148
32149_ACEOF
32150
32151case $ac_config_files in *"
32152"*) set x $ac_config_files; shift; ac_config_files=$*;;
32153esac
32154
32155case $ac_config_headers in *"
32156"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32157esac
32158
32159
32160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32161# Files that config.status was made for.
32162config_files="$ac_config_files"
32163config_headers="$ac_config_headers"
32164
32165_ACEOF
32166
32167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32168ac_cs_usage="\
32169\`$as_me' instantiates files and other configuration actions
32170from templates according to the current configuration.  Unless the files
32171and actions are specified as TAGs, all are instantiated by default.
32172
32173Usage: $0 [OPTION]... [TAG]...
32174
32175  -h, --help       print this help, then exit
32176  -V, --version    print version number and configuration settings, then exit
32177      --config     print configuration, then exit
32178  -q, --quiet, --silent
32179                   do not print progress messages
32180  -d, --debug      don't remove temporary files
32181      --recheck    update $as_me by reconfiguring in the same conditions
32182      --file=FILE[:TEMPLATE]
32183                   instantiate the configuration file FILE
32184      --header=FILE[:TEMPLATE]
32185                   instantiate the configuration header FILE
32186
32187Configuration files:
32188$config_files
32189
32190Configuration headers:
32191$config_headers
32192
32193Report bugs to <build-dev@openjdk.java.net>.
32194OpenJDK home page: <http://openjdk.java.net>."
32195
32196_ACEOF
32197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32198ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32199ac_cs_version="\\
32200OpenJDK config.status jdk8
32201configured by $0, generated by GNU Autoconf 2.67,
32202  with options \\"\$ac_cs_config\\"
32203
32204Copyright (C) 2010 Free Software Foundation, Inc.
32205This config.status script is free software; the Free Software Foundation
32206gives unlimited permission to copy, distribute and modify it."
32207
32208ac_pwd='$ac_pwd'
32209srcdir='$srcdir'
32210AWK='$AWK'
32211test -n "\$AWK" || AWK=awk
32212_ACEOF
32213
32214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32215# The default lists apply if the user does not specify any file.
32216ac_need_defaults=:
32217while test $# != 0
32218do
32219  case $1 in
32220  --*=?*)
32221    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32222    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32223    ac_shift=:
32224    ;;
32225  --*=)
32226    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32227    ac_optarg=
32228    ac_shift=:
32229    ;;
32230  *)
32231    ac_option=$1
32232    ac_optarg=$2
32233    ac_shift=shift
32234    ;;
32235  esac
32236
32237  case $ac_option in
32238  # Handling of the options.
32239  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32240    ac_cs_recheck=: ;;
32241  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32242    $as_echo "$ac_cs_version"; exit ;;
32243  --config | --confi | --conf | --con | --co | --c )
32244    $as_echo "$ac_cs_config"; exit ;;
32245  --debug | --debu | --deb | --de | --d | -d )
32246    debug=: ;;
32247  --file | --fil | --fi | --f )
32248    $ac_shift
32249    case $ac_optarg in
32250    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32251    '') as_fn_error $? "missing file argument" ;;
32252    esac
32253    as_fn_append CONFIG_FILES " '$ac_optarg'"
32254    ac_need_defaults=false;;
32255  --header | --heade | --head | --hea )
32256    $ac_shift
32257    case $ac_optarg in
32258    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32259    esac
32260    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32261    ac_need_defaults=false;;
32262  --he | --h)
32263    # Conflict between --help and --header
32264    as_fn_error $? "ambiguous option: \`$1'
32265Try \`$0 --help' for more information.";;
32266  --help | --hel | -h )
32267    $as_echo "$ac_cs_usage"; exit ;;
32268  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32269  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32270    ac_cs_silent=: ;;
32271
32272  # This is an error.
32273  -*) as_fn_error $? "unrecognized option: \`$1'
32274Try \`$0 --help' for more information." ;;
32275
32276  *) as_fn_append ac_config_targets " $1"
32277     ac_need_defaults=false ;;
32278
32279  esac
32280  shift
32281done
32282
32283ac_configure_extra_args=
32284
32285if $ac_cs_silent; then
32286  exec 6>/dev/null
32287  ac_configure_extra_args="$ac_configure_extra_args --silent"
32288fi
32289
32290_ACEOF
32291cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32292if \$ac_cs_recheck; then
32293  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32294  shift
32295  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32296  CONFIG_SHELL='$SHELL'
32297  export CONFIG_SHELL
32298  exec "\$@"
32299fi
32300
32301_ACEOF
32302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32303exec 5>>config.log
32304{
32305  echo
32306  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32307## Running $as_me. ##
32308_ASBOX
32309  $as_echo "$ac_log"
32310} >&5
32311
32312_ACEOF
32313cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32314_ACEOF
32315
32316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32317
32318# Handling of arguments.
32319for ac_config_target in $ac_config_targets
32320do
32321  case $ac_config_target in
32322    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32323    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32324    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32325    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32326    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32327    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32328    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32329
32330  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32331  esac
32332done
32333
32334
32335# If the user did not use the arguments to specify the items to instantiate,
32336# then the envvar interface is used.  Set only those that are not.
32337# We use the long form for the default assignment because of an extremely
32338# bizarre bug on SunOS 4.1.3.
32339if $ac_need_defaults; then
32340  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32341  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32342fi
32343
32344# Have a temporary directory for convenience.  Make it in the build tree
32345# simply because there is no reason against having it here, and in addition,
32346# creating and moving files from /tmp can sometimes cause problems.
32347# Hook for its removal unless debugging.
32348# Note that there is a small window in which the directory will not be cleaned:
32349# after its creation but before its name has been assigned to `$tmp'.
32350$debug ||
32351{
32352  tmp=
32353  trap 'exit_status=$?
32354  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32355' 0
32356  trap 'as_fn_exit 1' 1 2 13 15
32357}
32358# Create a (secure) tmp directory for tmp files.
32359
32360{
32361  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32362  test -n "$tmp" && test -d "$tmp"
32363}  ||
32364{
32365  tmp=./conf$$-$RANDOM
32366  (umask 077 && mkdir "$tmp")
32367} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32368
32369# Set up the scripts for CONFIG_FILES section.
32370# No need to generate them if there are no CONFIG_FILES.
32371# This happens for instance with `./config.status config.h'.
32372if test -n "$CONFIG_FILES"; then
32373
32374
32375ac_cr=`echo X | tr X '\015'`
32376# On cygwin, bash can eat \r inside `` if the user requested igncr.
32377# But we know of no other shell where ac_cr would be empty at this
32378# point, so we can use a bashism as a fallback.
32379if test "x$ac_cr" = x; then
32380  eval ac_cr=\$\'\\r\'
32381fi
32382ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32383if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32384  ac_cs_awk_cr='\\r'
32385else
32386  ac_cs_awk_cr=$ac_cr
32387fi
32388
32389echo 'BEGIN {' >"$tmp/subs1.awk" &&
32390_ACEOF
32391
32392
32393{
32394  echo "cat >conf$$subs.awk <<_ACEOF" &&
32395  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32396  echo "_ACEOF"
32397} >conf$$subs.sh ||
32398  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32399ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32400ac_delim='%!_!# '
32401for ac_last_try in false false false false false :; do
32402  . ./conf$$subs.sh ||
32403    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32404
32405  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32406  if test $ac_delim_n = $ac_delim_num; then
32407    break
32408  elif $ac_last_try; then
32409    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32410  else
32411    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32412  fi
32413done
32414rm -f conf$$subs.sh
32415
32416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32417cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32418_ACEOF
32419sed -n '
32420h
32421s/^/S["/; s/!.*/"]=/
32422p
32423g
32424s/^[^!]*!//
32425:repl
32426t repl
32427s/'"$ac_delim"'$//
32428t delim
32429:nl
32430h
32431s/\(.\{148\}\)..*/\1/
32432t more1
32433s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32434p
32435n
32436b repl
32437:more1
32438s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32439p
32440g
32441s/.\{148\}//
32442t nl
32443:delim
32444h
32445s/\(.\{148\}\)..*/\1/
32446t more2
32447s/["\\]/\\&/g; s/^/"/; s/$/"/
32448p
32449b
32450:more2
32451s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32452p
32453g
32454s/.\{148\}//
32455t delim
32456' <conf$$subs.awk | sed '
32457/^[^""]/{
32458  N
32459  s/\n//
32460}
32461' >>$CONFIG_STATUS || ac_write_fail=1
32462rm -f conf$$subs.awk
32463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32464_ACAWK
32465cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32466  for (key in S) S_is_set[key] = 1
32467  FS = ""
32468
32469}
32470{
32471  line = $ 0
32472  nfields = split(line, field, "@")
32473  substed = 0
32474  len = length(field[1])
32475  for (i = 2; i < nfields; i++) {
32476    key = field[i]
32477    keylen = length(key)
32478    if (S_is_set[key]) {
32479      value = S[key]
32480      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32481      len += length(value) + length(field[++i])
32482      substed = 1
32483    } else
32484      len += 1 + keylen
32485  }
32486
32487  print line
32488}
32489
32490_ACAWK
32491_ACEOF
32492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32493if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32494  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32495else
32496  cat
32497fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32498  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32499_ACEOF
32500
32501# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32502# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32503# trailing colons and then remove the whole line if VPATH becomes empty
32504# (actually we leave an empty line to preserve line numbers).
32505if test "x$srcdir" = x.; then
32506  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32507h
32508s///
32509s/^/:/
32510s/[	 ]*$/:/
32511s/:\$(srcdir):/:/g
32512s/:\${srcdir}:/:/g
32513s/:@srcdir@:/:/g
32514s/^:*//
32515s/:*$//
32516x
32517s/\(=[	 ]*\).*/\1/
32518G
32519s/\n//
32520s/^[^=]*=[	 ]*$//
32521}'
32522fi
32523
32524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32525fi # test -n "$CONFIG_FILES"
32526
32527# Set up the scripts for CONFIG_HEADERS section.
32528# No need to generate them if there are no CONFIG_HEADERS.
32529# This happens for instance with `./config.status Makefile'.
32530if test -n "$CONFIG_HEADERS"; then
32531cat >"$tmp/defines.awk" <<\_ACAWK ||
32532BEGIN {
32533_ACEOF
32534
32535# Transform confdefs.h into an awk script `defines.awk', embedded as
32536# here-document in config.status, that substitutes the proper values into
32537# config.h.in to produce config.h.
32538
32539# Create a delimiter string that does not exist in confdefs.h, to ease
32540# handling of long lines.
32541ac_delim='%!_!# '
32542for ac_last_try in false false :; do
32543  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32544  if test -z "$ac_t"; then
32545    break
32546  elif $ac_last_try; then
32547    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32548  else
32549    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32550  fi
32551done
32552
32553# For the awk script, D is an array of macro values keyed by name,
32554# likewise P contains macro parameters if any.  Preserve backslash
32555# newline sequences.
32556
32557ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32558sed -n '
32559s/.\{148\}/&'"$ac_delim"'/g
32560t rset
32561:rset
32562s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32563t def
32564d
32565:def
32566s/\\$//
32567t bsnl
32568s/["\\]/\\&/g
32569s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32570D["\1"]=" \3"/p
32571s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32572d
32573:bsnl
32574s/["\\]/\\&/g
32575s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32576D["\1"]=" \3\\\\\\n"\\/p
32577t cont
32578s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32579t cont
32580d
32581:cont
32582n
32583s/.\{148\}/&'"$ac_delim"'/g
32584t clear
32585:clear
32586s/\\$//
32587t bsnlc
32588s/["\\]/\\&/g; s/^/"/; s/$/"/p
32589d
32590:bsnlc
32591s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32592b cont
32593' <confdefs.h | sed '
32594s/'"$ac_delim"'/"\\\
32595"/g' >>$CONFIG_STATUS || ac_write_fail=1
32596
32597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32598  for (key in D) D_is_set[key] = 1
32599  FS = ""
32600}
32601/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32602  line = \$ 0
32603  split(line, arg, " ")
32604  if (arg[1] == "#") {
32605    defundef = arg[2]
32606    mac1 = arg[3]
32607  } else {
32608    defundef = substr(arg[1], 2)
32609    mac1 = arg[2]
32610  }
32611  split(mac1, mac2, "(") #)
32612  macro = mac2[1]
32613  prefix = substr(line, 1, index(line, defundef) - 1)
32614  if (D_is_set[macro]) {
32615    # Preserve the white space surrounding the "#".
32616    print prefix "define", macro P[macro] D[macro]
32617    next
32618  } else {
32619    # Replace #undef with comments.  This is necessary, for example,
32620    # in the case of _POSIX_SOURCE, which is predefined and required
32621    # on some systems where configure will not decide to define it.
32622    if (defundef == "undef") {
32623      print "/*", prefix defundef, macro, "*/"
32624      next
32625    }
32626  }
32627}
32628{ print }
32629_ACAWK
32630_ACEOF
32631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32632  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32633fi # test -n "$CONFIG_HEADERS"
32634
32635
32636eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32637shift
32638for ac_tag
32639do
32640  case $ac_tag in
32641  :[FHLC]) ac_mode=$ac_tag; continue;;
32642  esac
32643  case $ac_mode$ac_tag in
32644  :[FHL]*:*);;
32645  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32646  :[FH]-) ac_tag=-:-;;
32647  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32648  esac
32649  ac_save_IFS=$IFS
32650  IFS=:
32651  set x $ac_tag
32652  IFS=$ac_save_IFS
32653  shift
32654  ac_file=$1
32655  shift
32656
32657  case $ac_mode in
32658  :L) ac_source=$1;;
32659  :[FH])
32660    ac_file_inputs=
32661    for ac_f
32662    do
32663      case $ac_f in
32664      -) ac_f="$tmp/stdin";;
32665      *) # Look for the file first in the build tree, then in the source tree
32666	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32667	 # because $ac_f cannot contain `:'.
32668	 test -f "$ac_f" ||
32669	   case $ac_f in
32670	   [\\/$]*) false;;
32671	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32672	   esac ||
32673	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32674      esac
32675      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32676      as_fn_append ac_file_inputs " '$ac_f'"
32677    done
32678
32679    # Let's still pretend it is `configure' which instantiates (i.e., don't
32680    # use $as_me), people would be surprised to read:
32681    #    /* config.h.  Generated by config.status.  */
32682    configure_input='Generated from '`
32683	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32684	`' by configure.'
32685    if test x"$ac_file" != x-; then
32686      configure_input="$ac_file.  $configure_input"
32687      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32688$as_echo "$as_me: creating $ac_file" >&6;}
32689    fi
32690    # Neutralize special characters interpreted by sed in replacement strings.
32691    case $configure_input in #(
32692    *\&* | *\|* | *\\* )
32693       ac_sed_conf_input=`$as_echo "$configure_input" |
32694       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32695    *) ac_sed_conf_input=$configure_input;;
32696    esac
32697
32698    case $ac_tag in
32699    *:-:* | *:-) cat >"$tmp/stdin" \
32700      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32701    esac
32702    ;;
32703  esac
32704
32705  ac_dir=`$as_dirname -- "$ac_file" ||
32706$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32707	 X"$ac_file" : 'X\(//\)[^/]' \| \
32708	 X"$ac_file" : 'X\(//\)$' \| \
32709	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32710$as_echo X"$ac_file" |
32711    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32712	    s//\1/
32713	    q
32714	  }
32715	  /^X\(\/\/\)[^/].*/{
32716	    s//\1/
32717	    q
32718	  }
32719	  /^X\(\/\/\)$/{
32720	    s//\1/
32721	    q
32722	  }
32723	  /^X\(\/\).*/{
32724	    s//\1/
32725	    q
32726	  }
32727	  s/.*/./; q'`
32728  as_dir="$ac_dir"; as_fn_mkdir_p
32729  ac_builddir=.
32730
32731case "$ac_dir" in
32732.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32733*)
32734  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32735  # A ".." for each directory in $ac_dir_suffix.
32736  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32737  case $ac_top_builddir_sub in
32738  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32739  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32740  esac ;;
32741esac
32742ac_abs_top_builddir=$ac_pwd
32743ac_abs_builddir=$ac_pwd$ac_dir_suffix
32744# for backward compatibility:
32745ac_top_builddir=$ac_top_build_prefix
32746
32747case $srcdir in
32748  .)  # We are building in place.
32749    ac_srcdir=.
32750    ac_top_srcdir=$ac_top_builddir_sub
32751    ac_abs_top_srcdir=$ac_pwd ;;
32752  [\\/]* | ?:[\\/]* )  # Absolute name.
32753    ac_srcdir=$srcdir$ac_dir_suffix;
32754    ac_top_srcdir=$srcdir
32755    ac_abs_top_srcdir=$srcdir ;;
32756  *) # Relative name.
32757    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32758    ac_top_srcdir=$ac_top_build_prefix$srcdir
32759    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32760esac
32761ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32762
32763
32764  case $ac_mode in
32765  :F)
32766  #
32767  # CONFIG_FILE
32768  #
32769
32770_ACEOF
32771
32772cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32773# If the template does not know about datarootdir, expand it.
32774# FIXME: This hack should be removed a few years after 2.60.
32775ac_datarootdir_hack=; ac_datarootdir_seen=
32776ac_sed_dataroot='
32777/datarootdir/ {
32778  p
32779  q
32780}
32781/@datadir@/p
32782/@docdir@/p
32783/@infodir@/p
32784/@localedir@/p
32785/@mandir@/p'
32786case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32787*datarootdir*) ac_datarootdir_seen=yes;;
32788*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32789  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32790$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32791_ACEOF
32792cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32793  ac_datarootdir_hack='
32794  s&@datadir@&$datadir&g
32795  s&@docdir@&$docdir&g
32796  s&@infodir@&$infodir&g
32797  s&@localedir@&$localedir&g
32798  s&@mandir@&$mandir&g
32799  s&\\\${datarootdir}&$datarootdir&g' ;;
32800esac
32801_ACEOF
32802
32803# Neutralize VPATH when `$srcdir' = `.'.
32804# Shell code in configure.ac might set extrasub.
32805# FIXME: do we really want to maintain this feature?
32806cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32807ac_sed_extra="$ac_vpsub
32808$extrasub
32809_ACEOF
32810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32811:t
32812/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32813s|@configure_input@|$ac_sed_conf_input|;t t
32814s&@top_builddir@&$ac_top_builddir_sub&;t t
32815s&@top_build_prefix@&$ac_top_build_prefix&;t t
32816s&@srcdir@&$ac_srcdir&;t t
32817s&@abs_srcdir@&$ac_abs_srcdir&;t t
32818s&@top_srcdir@&$ac_top_srcdir&;t t
32819s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32820s&@builddir@&$ac_builddir&;t t
32821s&@abs_builddir@&$ac_abs_builddir&;t t
32822s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32823$ac_datarootdir_hack
32824"
32825eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32826  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32827
32828test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32829  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32830  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32831  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32832which seems to be undefined.  Please make sure it is defined" >&5
32833$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32834which seems to be undefined.  Please make sure it is defined" >&2;}
32835
32836  rm -f "$tmp/stdin"
32837  case $ac_file in
32838  -) cat "$tmp/out" && rm -f "$tmp/out";;
32839  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32840  esac \
32841  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32842 ;;
32843  :H)
32844  #
32845  # CONFIG_HEADER
32846  #
32847  if test x"$ac_file" != x-; then
32848    {
32849      $as_echo "/* $configure_input  */" \
32850      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32851    } >"$tmp/config.h" \
32852      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32853    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32854      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32855$as_echo "$as_me: $ac_file is unchanged" >&6;}
32856    else
32857      rm -f "$ac_file"
32858      mv "$tmp/config.h" "$ac_file" \
32859	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32860    fi
32861  else
32862    $as_echo "/* $configure_input  */" \
32863      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32864      || as_fn_error $? "could not create -" "$LINENO" 5
32865  fi
32866 ;;
32867
32868
32869  esac
32870
32871done # for ac_tag
32872
32873
32874as_fn_exit 0
32875_ACEOF
32876ac_clean_files=$ac_clean_files_save
32877
32878test $ac_write_fail = 0 ||
32879  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32880
32881
32882# configure is writing to config.log, and then calls config.status.
32883# config.status does its own redirection, appending to config.log.
32884# Unfortunately, on DOS this fails, as config.log is still kept open
32885# by configure, so config.status won't be able to write to it; its
32886# output is simply discarded.  So we exec the FD to /dev/null,
32887# effectively closing config.log, so it can be properly (re)opened and
32888# appended to by config.status.  When coming back to configure, we
32889# need to make the FD available again.
32890if test "$no_create" != yes; then
32891  ac_cs_success=:
32892  ac_config_status_args=
32893  test "$silent" = yes &&
32894    ac_config_status_args="$ac_config_status_args --quiet"
32895  exec 5>/dev/null
32896  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32897  exec 5>>config.log
32898  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32899  # would make configure fail if this is the last instruction.
32900  $ac_cs_success || as_fn_exit 1
32901fi
32902if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32903  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32904$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32905fi
32906
32907
32908# Make the compare script executable
32909$CHMOD +x $OUTPUT_ROOT/compare.sh
32910
32911# Finally output some useful information to the user
32912
32913# Finally output some useful information to the user
32914
32915if test "x$CCACHE_FOUND" != x; then
32916	if  test "x$HAS_GOOD_CCACHE" = x; then
32917		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32918		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32919	else
32920		CCACHE_STATUS="installed and in use"
32921	fi
32922else
32923	if test "x$GCC" = xyes; then
32924		CCACHE_STATUS="not installed (consider installing)"
32925		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32926	else
32927		CCACHE_STATUS="not available for your system"
32928	fi
32929fi
32930
32931printf "\n"
32932printf "====================================================\n"
32933printf "A new configuration has been successfully created in\n"
32934printf "$OUTPUT_ROOT\n"
32935if test "x$CONFIGURE_COMMAND_LINE" != x; then
32936	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32937else
32938	printf "using default settings.\n"
32939fi
32940
32941printf "\n"
32942printf "Configuration summary:\n"
32943printf "* Debug level:    $DEBUG_LEVEL\n"
32944printf "* JDK variant:    $JDK_VARIANT\n"
32945printf "* JVM variants:   $with_jvm_variants\n"
32946printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32947
32948printf "\n"
32949printf "Tools summary:\n"
32950if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32951  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32952fi
32953printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32954printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32955printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32956
32957printf "\n"
32958printf "Build performance summary:\n"
32959printf "* Cores to use:   $NUM_CORES\n"
32960printf "* Memory limit:   $MEMORY_SIZE MB\n"
32961printf "* ccache status:  $CCACHE_STATUS\n"
32962printf "\n"
32963
32964if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32965	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32966	printf "$CCACHE_HELP_MSG\n"
32967
32968    # Print a helpful message on how to acquire the necessary build dependency.
32969    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32970    MISSING_DEPENDENCY=ccache
32971    PKGHANDLER_COMMAND=
32972
32973    case $PKGHANDLER in
32974	apt-get)
32975                apt_help     $MISSING_DEPENDENCY ;;
32976    yum)
32977                yum_help     $MISSING_DEPENDENCY ;;
32978	port)
32979                port_help    $MISSING_DEPENDENCY ;;
32980	pkgutil)
32981                pkgutil_help $MISSING_DEPENDENCY ;;
32982	pkgadd)
32983                pkgadd_help  $MISSING_DEPENDENCY ;;
32984    * )
32985      break ;;
32986    esac
32987
32988    if test "x$PKGHANDLER_COMMAND" != x; then
32989        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32990    fi
32991
32992	printf "$HELP_MSG\n"
32993	printf "\n"
32994fi
32995
32996if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32997	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32998	printf "will result in longer build times.\n"
32999	printf "\n"
33000fi
33001
33002if test "x$FOUND_ALT_VARIABLES" != "x"; then
33003	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33004	printf "These are not respected, and will be ignored. It is recommended\n"
33005	printf "that you clean your environment. The following variables are set:\n"
33006	printf "$FOUND_ALT_VARIABLES\n"
33007	printf "\n"
33008fi
33009
33010if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33011	printf "WARNING: Your build output directory is not on a local disk.\n"
33012	printf "This will severely degrade build performance!\n"
33013	printf "It is recommended that you create an output directory on a local disk,\n"
33014	printf "and run the configure script again from that directory.\n"
33015	printf "\n"
33016fi
33017
33018if test "x$IS_RECONFIGURE" = "xyes"; then
33019	printf "WARNING: The result of this configuration has overridden an older\n"
33020	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33021	printf "proper build. Failure to do so might result in strange build problems.\n"
33022	printf "\n"
33023fi
33024
33025