generated-configure.sh revision 531:e175ecff1391
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741HOTSPOT_TOPDIR
742JAXWS_TOPDIR
743JAXP_TOPDIR
744CORBA_TOPDIR
745LANGTOOLS_TOPDIR
746BOOT_JDK_JVMARGS
747JAVAC_FLAGS
748BOOT_JDK_SOURCETARGET
749BOOT_JDK
750BOOT_TOOLSJAR
751BOOT_RTJAR
752JAVA_CHECK
753JAVAC_CHECK
754COOKED_BUILD_NUMBER
755FULL_VERSION
756RELEASE
757JDK_VERSION
758RUNTIME_NAME
759COPYRIGHT_YEAR
760MACOSX_BUNDLE_ID_BASE
761MACOSX_BUNDLE_NAME_BASE
762COMPANY_NAME
763JDK_RC_PLATFORM_NAME
764PRODUCT_SUFFIX
765PRODUCT_NAME
766LAUNCHER_NAME
767MILESTONE
768JDK_BUILD_NUMBER
769JDK_UPDATE_VERSION
770JDK_MICRO_VERSION
771JDK_MINOR_VERSION
772JDK_MAJOR_VERSION
773COMPRESS_JARS
774UNLIMITED_CRYPTO
775CACERTS_FILE
776TEST_IN_BUILD
777BUILD_HEADLESS
778SUPPORT_HEADFUL
779SUPPORT_HEADLESS
780SET_OPENJDK
781BDEPS_FTP
782BDEPS_UNZIP
783OS_VERSION_MICRO
784OS_VERSION_MINOR
785OS_VERSION_MAJOR
786PKG_CONFIG
787COMM
788TIME
789STAT
790HG
791READELF
792OTOOL
793LDD
794ZIP
795UNZIP
796FIND_DELETE
797MAKE
798CHECK_TOOLSDIR_MAKE
799CHECK_TOOLSDIR_GMAKE
800CHECK_MAKE
801CHECK_GMAKE
802PKGHANDLER
803OUTPUT_ROOT
804CONF_NAME
805SPEC
806BUILD_VARIANT_RELEASE
807DEBUG_CLASSFILES
808FASTDEBUG
809VARIANT
810DEBUG_LEVEL
811MACOSX_UNIVERSAL
812JVM_VARIANT_ZEROSHARK
813JVM_VARIANT_ZERO
814JVM_VARIANT_KERNEL
815JVM_VARIANT_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_boot_jdk
972with_boot_jdk_jvmargs
973with_add_source_root
974with_override_source_root
975with_adds_and_overrides
976with_override_langtools
977with_override_corba
978with_override_jaxp
979with_override_jaxws
980with_override_hotspot
981with_override_jdk
982with_import_hotspot
983with_msvcr_dll
984with_extra_cflags
985with_extra_cxxflags
986with_extra_ldflags
987enable_debug_symbols
988enable_zip_debug_info
989enable_macosx_runtime_support
990with_x
991with_cups
992with_cups_include
993with_freetype
994with_alsa
995with_alsa_include
996with_alsa_lib
997with_zlib
998with_stdc__lib
999with_num_cores
1000with_memory_size
1001with_sjavac_server_java
1002with_sjavac_server_cores
1003enable_sjavac
1004enable_precompiled_headers
1005enable_ccache
1006with_ccache_dir
1007'
1008      ac_precious_vars='build_alias
1009host_alias
1010target_alias
1011PKG_CONFIG
1012CC
1013CFLAGS
1014LDFLAGS
1015LIBS
1016CPPFLAGS
1017CXX
1018CXXFLAGS
1019CCC
1020OBJC
1021OBJCFLAGS
1022CPP
1023CXXCPP
1024XMKMF
1025FREETYPE2_CFLAGS
1026FREETYPE2_LIBS
1027ALSA_CFLAGS
1028ALSA_LIBS'
1029
1030
1031# Initialize some variables set by options.
1032ac_init_help=
1033ac_init_version=false
1034ac_unrecognized_opts=
1035ac_unrecognized_sep=
1036# The variables have the same names as the options, with
1037# dashes changed to underlines.
1038cache_file=/dev/null
1039exec_prefix=NONE
1040no_create=
1041no_recursion=
1042prefix=NONE
1043program_prefix=NONE
1044program_suffix=NONE
1045program_transform_name=s,x,x,
1046silent=
1047site=
1048srcdir=
1049verbose=
1050x_includes=NONE
1051x_libraries=NONE
1052
1053# Installation directory options.
1054# These are left unexpanded so users can "make install exec_prefix=/foo"
1055# and all the variables that are supposed to be based on exec_prefix
1056# by default will actually change.
1057# Use braces instead of parens because sh, perl, etc. also accept them.
1058# (The list follows the same order as the GNU Coding Standards.)
1059bindir='${exec_prefix}/bin'
1060sbindir='${exec_prefix}/sbin'
1061libexecdir='${exec_prefix}/libexec'
1062datarootdir='${prefix}/share'
1063datadir='${datarootdir}'
1064sysconfdir='${prefix}/etc'
1065sharedstatedir='${prefix}/com'
1066localstatedir='${prefix}/var'
1067includedir='${prefix}/include'
1068oldincludedir='/usr/include'
1069docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1070infodir='${datarootdir}/info'
1071htmldir='${docdir}'
1072dvidir='${docdir}'
1073pdfdir='${docdir}'
1074psdir='${docdir}'
1075libdir='${exec_prefix}/lib'
1076localedir='${datarootdir}/locale'
1077mandir='${datarootdir}/man'
1078
1079ac_prev=
1080ac_dashdash=
1081for ac_option
1082do
1083  # If the previous option needs an argument, assign it.
1084  if test -n "$ac_prev"; then
1085    eval $ac_prev=\$ac_option
1086    ac_prev=
1087    continue
1088  fi
1089
1090  case $ac_option in
1091  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1092  *=)   ac_optarg= ;;
1093  *)    ac_optarg=yes ;;
1094  esac
1095
1096  # Accept the important Cygnus configure options, so we can diagnose typos.
1097
1098  case $ac_dashdash$ac_option in
1099  --)
1100    ac_dashdash=yes ;;
1101
1102  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1103    ac_prev=bindir ;;
1104  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1105    bindir=$ac_optarg ;;
1106
1107  -build | --build | --buil | --bui | --bu)
1108    ac_prev=build_alias ;;
1109  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1110    build_alias=$ac_optarg ;;
1111
1112  -cache-file | --cache-file | --cache-fil | --cache-fi \
1113  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1114    ac_prev=cache_file ;;
1115  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1116  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1117    cache_file=$ac_optarg ;;
1118
1119  --config-cache | -C)
1120    cache_file=config.cache ;;
1121
1122  -datadir | --datadir | --datadi | --datad)
1123    ac_prev=datadir ;;
1124  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1125    datadir=$ac_optarg ;;
1126
1127  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1128  | --dataroo | --dataro | --datar)
1129    ac_prev=datarootdir ;;
1130  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1131  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1132    datarootdir=$ac_optarg ;;
1133
1134  -disable-* | --disable-*)
1135    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1136    # Reject names that are not valid shell variable names.
1137    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1138      as_fn_error $? "invalid feature name: $ac_useropt"
1139    ac_useropt_orig=$ac_useropt
1140    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141    case $ac_user_opts in
1142      *"
1143"enable_$ac_useropt"
1144"*) ;;
1145      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1146	 ac_unrecognized_sep=', ';;
1147    esac
1148    eval enable_$ac_useropt=no ;;
1149
1150  -docdir | --docdir | --docdi | --doc | --do)
1151    ac_prev=docdir ;;
1152  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1153    docdir=$ac_optarg ;;
1154
1155  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1156    ac_prev=dvidir ;;
1157  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1158    dvidir=$ac_optarg ;;
1159
1160  -enable-* | --enable-*)
1161    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1162    # Reject names that are not valid shell variable names.
1163    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1164      as_fn_error $? "invalid feature name: $ac_useropt"
1165    ac_useropt_orig=$ac_useropt
1166    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1167    case $ac_user_opts in
1168      *"
1169"enable_$ac_useropt"
1170"*) ;;
1171      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1172	 ac_unrecognized_sep=', ';;
1173    esac
1174    eval enable_$ac_useropt=\$ac_optarg ;;
1175
1176  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1177  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1178  | --exec | --exe | --ex)
1179    ac_prev=exec_prefix ;;
1180  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1181  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1182  | --exec=* | --exe=* | --ex=*)
1183    exec_prefix=$ac_optarg ;;
1184
1185  -gas | --gas | --ga | --g)
1186    # Obsolete; use --with-gas.
1187    with_gas=yes ;;
1188
1189  -help | --help | --hel | --he | -h)
1190    ac_init_help=long ;;
1191  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1192    ac_init_help=recursive ;;
1193  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1194    ac_init_help=short ;;
1195
1196  -host | --host | --hos | --ho)
1197    ac_prev=host_alias ;;
1198  -host=* | --host=* | --hos=* | --ho=*)
1199    host_alias=$ac_optarg ;;
1200
1201  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1202    ac_prev=htmldir ;;
1203  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1204  | --ht=*)
1205    htmldir=$ac_optarg ;;
1206
1207  -includedir | --includedir | --includedi | --included | --include \
1208  | --includ | --inclu | --incl | --inc)
1209    ac_prev=includedir ;;
1210  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1211  | --includ=* | --inclu=* | --incl=* | --inc=*)
1212    includedir=$ac_optarg ;;
1213
1214  -infodir | --infodir | --infodi | --infod | --info | --inf)
1215    ac_prev=infodir ;;
1216  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1217    infodir=$ac_optarg ;;
1218
1219  -libdir | --libdir | --libdi | --libd)
1220    ac_prev=libdir ;;
1221  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1222    libdir=$ac_optarg ;;
1223
1224  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1225  | --libexe | --libex | --libe)
1226    ac_prev=libexecdir ;;
1227  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1228  | --libexe=* | --libex=* | --libe=*)
1229    libexecdir=$ac_optarg ;;
1230
1231  -localedir | --localedir | --localedi | --localed | --locale)
1232    ac_prev=localedir ;;
1233  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1234    localedir=$ac_optarg ;;
1235
1236  -localstatedir | --localstatedir | --localstatedi | --localstated \
1237  | --localstate | --localstat | --localsta | --localst | --locals)
1238    ac_prev=localstatedir ;;
1239  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1240  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1241    localstatedir=$ac_optarg ;;
1242
1243  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1244    ac_prev=mandir ;;
1245  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1246    mandir=$ac_optarg ;;
1247
1248  -nfp | --nfp | --nf)
1249    # Obsolete; use --without-fp.
1250    with_fp=no ;;
1251
1252  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1253  | --no-cr | --no-c | -n)
1254    no_create=yes ;;
1255
1256  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1257  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1258    no_recursion=yes ;;
1259
1260  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1261  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1262  | --oldin | --oldi | --old | --ol | --o)
1263    ac_prev=oldincludedir ;;
1264  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1265  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1266  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1267    oldincludedir=$ac_optarg ;;
1268
1269  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1270    ac_prev=prefix ;;
1271  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1272    prefix=$ac_optarg ;;
1273
1274  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1275  | --program-pre | --program-pr | --program-p)
1276    ac_prev=program_prefix ;;
1277  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1278  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1279    program_prefix=$ac_optarg ;;
1280
1281  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1282  | --program-suf | --program-su | --program-s)
1283    ac_prev=program_suffix ;;
1284  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1285  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1286    program_suffix=$ac_optarg ;;
1287
1288  -program-transform-name | --program-transform-name \
1289  | --program-transform-nam | --program-transform-na \
1290  | --program-transform-n | --program-transform- \
1291  | --program-transform | --program-transfor \
1292  | --program-transfo | --program-transf \
1293  | --program-trans | --program-tran \
1294  | --progr-tra | --program-tr | --program-t)
1295    ac_prev=program_transform_name ;;
1296  -program-transform-name=* | --program-transform-name=* \
1297  | --program-transform-nam=* | --program-transform-na=* \
1298  | --program-transform-n=* | --program-transform-=* \
1299  | --program-transform=* | --program-transfor=* \
1300  | --program-transfo=* | --program-transf=* \
1301  | --program-trans=* | --program-tran=* \
1302  | --progr-tra=* | --program-tr=* | --program-t=*)
1303    program_transform_name=$ac_optarg ;;
1304
1305  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1306    ac_prev=pdfdir ;;
1307  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1308    pdfdir=$ac_optarg ;;
1309
1310  -psdir | --psdir | --psdi | --psd | --ps)
1311    ac_prev=psdir ;;
1312  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1313    psdir=$ac_optarg ;;
1314
1315  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1316  | -silent | --silent | --silen | --sile | --sil)
1317    silent=yes ;;
1318
1319  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1320    ac_prev=sbindir ;;
1321  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1322  | --sbi=* | --sb=*)
1323    sbindir=$ac_optarg ;;
1324
1325  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1326  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1327  | --sharedst | --shareds | --shared | --share | --shar \
1328  | --sha | --sh)
1329    ac_prev=sharedstatedir ;;
1330  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1331  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1332  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1333  | --sha=* | --sh=*)
1334    sharedstatedir=$ac_optarg ;;
1335
1336  -site | --site | --sit)
1337    ac_prev=site ;;
1338  -site=* | --site=* | --sit=*)
1339    site=$ac_optarg ;;
1340
1341  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1342    ac_prev=srcdir ;;
1343  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1344    srcdir=$ac_optarg ;;
1345
1346  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1347  | --syscon | --sysco | --sysc | --sys | --sy)
1348    ac_prev=sysconfdir ;;
1349  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1350  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1351    sysconfdir=$ac_optarg ;;
1352
1353  -target | --target | --targe | --targ | --tar | --ta | --t)
1354    ac_prev=target_alias ;;
1355  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1356    target_alias=$ac_optarg ;;
1357
1358  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1359    verbose=yes ;;
1360
1361  -version | --version | --versio | --versi | --vers | -V)
1362    ac_init_version=: ;;
1363
1364  -with-* | --with-*)
1365    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1366    # Reject names that are not valid shell variable names.
1367    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1368      as_fn_error $? "invalid package name: $ac_useropt"
1369    ac_useropt_orig=$ac_useropt
1370    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1371    case $ac_user_opts in
1372      *"
1373"with_$ac_useropt"
1374"*) ;;
1375      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1376	 ac_unrecognized_sep=', ';;
1377    esac
1378    eval with_$ac_useropt=\$ac_optarg ;;
1379
1380  -without-* | --without-*)
1381    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1382    # Reject names that are not valid shell variable names.
1383    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1384      as_fn_error $? "invalid package name: $ac_useropt"
1385    ac_useropt_orig=$ac_useropt
1386    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1387    case $ac_user_opts in
1388      *"
1389"with_$ac_useropt"
1390"*) ;;
1391      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1392	 ac_unrecognized_sep=', ';;
1393    esac
1394    eval with_$ac_useropt=no ;;
1395
1396  --x)
1397    # Obsolete; use --with-x.
1398    with_x=yes ;;
1399
1400  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1401  | --x-incl | --x-inc | --x-in | --x-i)
1402    ac_prev=x_includes ;;
1403  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1404  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1405    x_includes=$ac_optarg ;;
1406
1407  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1408  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1409    ac_prev=x_libraries ;;
1410  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1411  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1412    x_libraries=$ac_optarg ;;
1413
1414  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1415Try \`$0 --help' for more information"
1416    ;;
1417
1418  *=*)
1419    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1420    # Reject names that are not valid shell variable names.
1421    case $ac_envvar in #(
1422      '' | [0-9]* | *[!_$as_cr_alnum]* )
1423      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1424    esac
1425    eval $ac_envvar=\$ac_optarg
1426    export $ac_envvar ;;
1427
1428  *)
1429    # FIXME: should be removed in autoconf 3.0.
1430    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1431    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1432      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1433    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1434    ;;
1435
1436  esac
1437done
1438
1439if test -n "$ac_prev"; then
1440  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1441  as_fn_error $? "missing argument to $ac_option"
1442fi
1443
1444if test -n "$ac_unrecognized_opts"; then
1445  case $enable_option_checking in
1446    no) ;;
1447    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1448    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1449  esac
1450fi
1451
1452# Check all directory arguments for consistency.
1453for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1454		datadir sysconfdir sharedstatedir localstatedir includedir \
1455		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1456		libdir localedir mandir
1457do
1458  eval ac_val=\$$ac_var
1459  # Remove trailing slashes.
1460  case $ac_val in
1461    */ )
1462      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1463      eval $ac_var=\$ac_val;;
1464  esac
1465  # Be sure to have absolute directory names.
1466  case $ac_val in
1467    [\\/$]* | ?:[\\/]* )  continue;;
1468    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1469  esac
1470  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1471done
1472
1473# There might be people who depend on the old broken behavior: `$host'
1474# used to hold the argument of --host etc.
1475# FIXME: To remove some day.
1476build=$build_alias
1477host=$host_alias
1478target=$target_alias
1479
1480# FIXME: To remove some day.
1481if test "x$host_alias" != x; then
1482  if test "x$build_alias" = x; then
1483    cross_compiling=maybe
1484    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1485    If a cross compiler is detected then cross compile mode will be used" >&2
1486  elif test "x$build_alias" != "x$host_alias"; then
1487    cross_compiling=yes
1488  fi
1489fi
1490
1491ac_tool_prefix=
1492test -n "$host_alias" && ac_tool_prefix=$host_alias-
1493
1494test "$silent" = yes && exec 6>/dev/null
1495
1496
1497ac_pwd=`pwd` && test -n "$ac_pwd" &&
1498ac_ls_di=`ls -di .` &&
1499ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1500  as_fn_error $? "working directory cannot be determined"
1501test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1502  as_fn_error $? "pwd does not report name of working directory"
1503
1504
1505# Find the source files, if location was not specified.
1506if test -z "$srcdir"; then
1507  ac_srcdir_defaulted=yes
1508  # Try the directory containing this script, then the parent directory.
1509  ac_confdir=`$as_dirname -- "$as_myself" ||
1510$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1511	 X"$as_myself" : 'X\(//\)[^/]' \| \
1512	 X"$as_myself" : 'X\(//\)$' \| \
1513	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1514$as_echo X"$as_myself" |
1515    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1516	    s//\1/
1517	    q
1518	  }
1519	  /^X\(\/\/\)[^/].*/{
1520	    s//\1/
1521	    q
1522	  }
1523	  /^X\(\/\/\)$/{
1524	    s//\1/
1525	    q
1526	  }
1527	  /^X\(\/\).*/{
1528	    s//\1/
1529	    q
1530	  }
1531	  s/.*/./; q'`
1532  srcdir=$ac_confdir
1533  if test ! -r "$srcdir/$ac_unique_file"; then
1534    srcdir=..
1535  fi
1536else
1537  ac_srcdir_defaulted=no
1538fi
1539if test ! -r "$srcdir/$ac_unique_file"; then
1540  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1541  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1542fi
1543ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1544ac_abs_confdir=`(
1545	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1546	pwd)`
1547# When building in place, set srcdir=.
1548if test "$ac_abs_confdir" = "$ac_pwd"; then
1549  srcdir=.
1550fi
1551# Remove unnecessary trailing slashes from srcdir.
1552# Double slashes in file names in object file debugging info
1553# mess up M-x gdb in Emacs.
1554case $srcdir in
1555*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1556esac
1557for ac_var in $ac_precious_vars; do
1558  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1559  eval ac_env_${ac_var}_value=\$${ac_var}
1560  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1561  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1562done
1563
1564#
1565# Report the --help message.
1566#
1567if test "$ac_init_help" = "long"; then
1568  # Omit some internal or obsolete options to make the list less imposing.
1569  # This message is too long to be a string in the A/UX 3.1 sh.
1570  cat <<_ACEOF
1571\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1572
1573Usage: $0 [OPTION]... [VAR=VALUE]...
1574
1575To assign environment variables (e.g., CC, CFLAGS...), specify them as
1576VAR=VALUE.  See below for descriptions of some of the useful variables.
1577
1578Defaults for the options are specified in brackets.
1579
1580Configuration:
1581  -h, --help              display this help and exit
1582      --help=short        display options specific to this package
1583      --help=recursive    display the short help of all the included packages
1584  -V, --version           display version information and exit
1585  -q, --quiet, --silent   do not print \`checking ...' messages
1586      --cache-file=FILE   cache test results in FILE [disabled]
1587  -C, --config-cache      alias for \`--cache-file=config.cache'
1588  -n, --no-create         do not create output files
1589      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1590
1591Installation directories:
1592  --prefix=PREFIX         install architecture-independent files in PREFIX
1593                          [$ac_default_prefix]
1594  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1595                          [PREFIX]
1596
1597By default, \`make install' will install all the files in
1598\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1599an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1600for instance \`--prefix=\$HOME'.
1601
1602For better control, use the options below.
1603
1604Fine tuning of the installation directories:
1605  --bindir=DIR            user executables [EPREFIX/bin]
1606  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1607  --libexecdir=DIR        program executables [EPREFIX/libexec]
1608  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1609  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1610  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1611  --libdir=DIR            object code libraries [EPREFIX/lib]
1612  --includedir=DIR        C header files [PREFIX/include]
1613  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1614  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1615  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1616  --infodir=DIR           info documentation [DATAROOTDIR/info]
1617  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1618  --mandir=DIR            man documentation [DATAROOTDIR/man]
1619  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1620  --htmldir=DIR           html documentation [DOCDIR]
1621  --dvidir=DIR            dvi documentation [DOCDIR]
1622  --pdfdir=DIR            pdf documentation [DOCDIR]
1623  --psdir=DIR             ps documentation [DOCDIR]
1624_ACEOF
1625
1626  cat <<\_ACEOF
1627
1628X features:
1629  --x-includes=DIR    X include files are in DIR
1630  --x-libraries=DIR   X library files are in DIR
1631
1632System types:
1633  --build=BUILD     configure for building on BUILD [guessed]
1634  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1635  --target=TARGET   configure for building compilers for TARGET [HOST]
1636_ACEOF
1637fi
1638
1639if test -n "$ac_init_help"; then
1640  case $ac_init_help in
1641     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1642   esac
1643  cat <<\_ACEOF
1644
1645Optional Features:
1646  --disable-option-checking  ignore unrecognized --enable/--with options
1647  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1648  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1649  --enable-debug          set the debug level to fastdebug (shorthand for
1650                          --with-debug-level=fastdebug) [disabled]
1651  --enable-openjdk-only   supress building closed source even if present
1652                          [disabled]
1653  --disable-headful       disable building headful support (graphical UI
1654                          support) [enabled]
1655  --enable-hotspot-test-in-build
1656                          run the Queens test after Hotspot build [disabled]
1657  --enable-unlimited-crypto
1658                          Enable unlimited crypto policy [disabled]
1659  --disable-debug-symbols disable generation of debug symbols [enabled]
1660  --disable-zip-debug-info
1661                          disable zipping of debug-info files [enabled]
1662  --disable-macosx-runtime-support
1663                          disable the use of MacOSX Java runtime support
1664                          framework [enabled]
1665  --enable-sjavac         use sjavac to do fast incremental compiles
1666                          [disabled]
1667  --disable-precompiled-headers
1668                          disable using precompiled headers when compiling C++
1669                          [enabled]
1670  --disable-ccache        disable using ccache to speed up recompilations
1671                          [enabled]
1672
1673Optional Packages:
1674  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1675  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1676  --with-custom-make-dir  use this directory for custom build/make files
1677  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1678                          support it), e.g. --with-target-bits=32 [guessed]
1679  --with-sys-root         pass this sys-root to the compilers and tools (for
1680                          cross-compiling)
1681  --with-tools-dir        search this directory for compilers and tools (for
1682                          cross-compiling)
1683  --with-devkit           use this directory as base for tools-dir and
1684                          sys-root (for cross-compiling)
1685  --with-jdk-variant      JDK variant to build (normal) [normal]
1686  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1687                          client, kernel, zero, zeroshark) [server]
1688  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1689                          [release]
1690  --with-conf-name        use this as the name of the configuration [generated
1691                          from important configuration options]
1692  --with-builddeps-conf   use this configuration file for the builddeps
1693  --with-builddeps-server download and use build dependencies from this server
1694                          url
1695  --with-builddeps-dir    store downloaded build dependencies here
1696                          [/localhome/builddeps]
1697  --with-builddeps-group  chgrp the downloaded build dependencies to this
1698                          group
1699  --with-cacerts-file     specify alternative cacerts file
1700  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1701  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1702                          invocations of the Boot JDK, overriding the default
1703                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1704                          -enableassertions"
1705  --with-add-source-root  for each and every source directory, look in this
1706                          additional source root for the same directory; if it
1707                          exists and have files in it, include it in the build
1708  --with-override-source-root
1709                          for each and every source directory, look in this
1710                          override source root for the same directory; if it
1711                          exists, use that directory instead and ignore the
1712                          directory in the original source root
1713  --with-adds-and-overrides
1714                          use the subdirs 'adds' and 'overrides' in the
1715                          specified directory as add-source-root and
1716                          override-source-root
1717  --with-override-langtools
1718                          use this langtools dir for the build
1719  --with-override-corba   use this corba dir for the build
1720  --with-override-jaxp    use this jaxp dir for the build
1721  --with-override-jaxws   use this jaxws dir for the build
1722  --with-override-hotspot use this hotspot dir for the build
1723  --with-override-jdk     use this jdk dir for the build
1724  --with-import-hotspot   import hotspot binaries from this jdk image or
1725                          hotspot build dist dir instead of building from
1726                          source
1727  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1728                          only) [probed]
1729  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1730  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1731  --with-extra-ldflags    extra flags to be used when linking jdk
1732  --with-x                use the X Window System
1733  --with-cups             specify prefix directory for the cups package
1734                          (expecting the headers under PATH/include)
1735  --with-cups-include     specify directory for the cups include files
1736  --with-freetype         specify prefix directory for the freetype2 package
1737                          (expecting the libraries under PATH/lib and the
1738                          headers under PATH/include)
1739  --with-alsa             specify prefix directory for the alsa package
1740                          (expecting the libraries under PATH/lib and the
1741                          headers under PATH/include)
1742  --with-alsa-include     specify directory for the alsa include files
1743  --with-alsa-lib         specify directory for the alsa library
1744  --with-zlib             use zlib from build system or OpenJDK source
1745                          (system, bundled) [bundled]
1746  --with-stdc++lib=<static>,<dynamic>,<default>
1747                          force linking of the C++ runtime on Linux to either
1748                          static or dynamic, default is static with dynamic as
1749                          fallback
1750  --with-num-cores        number of cores in the build system, e.g.
1751                          --with-num-cores=8 [probed]
1752  --with-memory-size      memory (in MB) available in the build system, e.g.
1753                          --with-memory-size=1024 [probed]
1754  --with-sjavac-server-java
1755                          use this java binary for running the sjavac
1756                          background server [Boot JDK java]
1757  --with-sjavac-server-cores
1758                          use at most this number of concurrent threads on the
1759                          sjavac server [probed]
1760  --with-ccache-dir       where to store ccache files [~/.ccache]
1761
1762Some influential environment variables:
1763  PKG_CONFIG  path to pkg-config utility
1764  CC          C compiler command
1765  CFLAGS      C compiler flags
1766  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1767              nonstandard directory <lib dir>
1768  LIBS        libraries to pass to the linker, e.g. -l<library>
1769  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1770              you have headers in a nonstandard directory <include dir>
1771  CXX         C++ compiler command
1772  CXXFLAGS    C++ compiler flags
1773  OBJC        Objective C compiler command
1774  OBJCFLAGS   Objective C compiler flags
1775  CPP         C preprocessor
1776  CXXCPP      C++ preprocessor
1777  XMKMF       Path to xmkmf, Makefile generator for X Window System
1778  FREETYPE2_CFLAGS
1779              C compiler flags for FREETYPE2, overriding pkg-config
1780  FREETYPE2_LIBS
1781              linker flags for FREETYPE2, overriding pkg-config
1782  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1783  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1784
1785Use these variables to override the choices made by `configure' or to help
1786it to find libraries and programs with nonstandard names/locations.
1787
1788Report bugs to <build-dev@openjdk.java.net>.
1789OpenJDK home page: <http://openjdk.java.net>.
1790_ACEOF
1791ac_status=$?
1792fi
1793
1794if test "$ac_init_help" = "recursive"; then
1795  # If there are subdirs, report their specific --help.
1796  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1797    test -d "$ac_dir" ||
1798      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1799      continue
1800    ac_builddir=.
1801
1802case "$ac_dir" in
1803.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1804*)
1805  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1806  # A ".." for each directory in $ac_dir_suffix.
1807  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1808  case $ac_top_builddir_sub in
1809  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1810  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1811  esac ;;
1812esac
1813ac_abs_top_builddir=$ac_pwd
1814ac_abs_builddir=$ac_pwd$ac_dir_suffix
1815# for backward compatibility:
1816ac_top_builddir=$ac_top_build_prefix
1817
1818case $srcdir in
1819  .)  # We are building in place.
1820    ac_srcdir=.
1821    ac_top_srcdir=$ac_top_builddir_sub
1822    ac_abs_top_srcdir=$ac_pwd ;;
1823  [\\/]* | ?:[\\/]* )  # Absolute name.
1824    ac_srcdir=$srcdir$ac_dir_suffix;
1825    ac_top_srcdir=$srcdir
1826    ac_abs_top_srcdir=$srcdir ;;
1827  *) # Relative name.
1828    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1829    ac_top_srcdir=$ac_top_build_prefix$srcdir
1830    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1831esac
1832ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1833
1834    cd "$ac_dir" || { ac_status=$?; continue; }
1835    # Check for guested configure.
1836    if test -f "$ac_srcdir/configure.gnu"; then
1837      echo &&
1838      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1839    elif test -f "$ac_srcdir/configure"; then
1840      echo &&
1841      $SHELL "$ac_srcdir/configure" --help=recursive
1842    else
1843      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1844    fi || ac_status=$?
1845    cd "$ac_pwd" || { ac_status=$?; break; }
1846  done
1847fi
1848
1849test -n "$ac_init_help" && exit $ac_status
1850if $ac_init_version; then
1851  cat <<\_ACEOF
1852OpenJDK configure jdk8
1853generated by GNU Autoconf 2.67
1854
1855Copyright (C) 2010 Free Software Foundation, Inc.
1856This configure script is free software; the Free Software Foundation
1857gives unlimited permission to copy, distribute and modify it.
1858_ACEOF
1859  exit
1860fi
1861
1862## ------------------------ ##
1863## Autoconf initialization. ##
1864## ------------------------ ##
1865
1866# ac_fn_c_try_compile LINENO
1867# --------------------------
1868# Try to compile conftest.$ac_ext, and return whether this succeeded.
1869ac_fn_c_try_compile ()
1870{
1871  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872  rm -f conftest.$ac_objext
1873  if { { ac_try="$ac_compile"
1874case "(($ac_try" in
1875  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1876  *) ac_try_echo=$ac_try;;
1877esac
1878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1879$as_echo "$ac_try_echo"; } >&5
1880  (eval "$ac_compile") 2>conftest.err
1881  ac_status=$?
1882  if test -s conftest.err; then
1883    grep -v '^ *+' conftest.err >conftest.er1
1884    cat conftest.er1 >&5
1885    mv -f conftest.er1 conftest.err
1886  fi
1887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888  test $ac_status = 0; } && {
1889	 test -z "$ac_c_werror_flag" ||
1890	 test ! -s conftest.err
1891       } && test -s conftest.$ac_objext; then :
1892  ac_retval=0
1893else
1894  $as_echo "$as_me: failed program was:" >&5
1895sed 's/^/| /' conftest.$ac_ext >&5
1896
1897	ac_retval=1
1898fi
1899  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1900  as_fn_set_status $ac_retval
1901
1902} # ac_fn_c_try_compile
1903
1904# ac_fn_cxx_try_compile LINENO
1905# ----------------------------
1906# Try to compile conftest.$ac_ext, and return whether this succeeded.
1907ac_fn_cxx_try_compile ()
1908{
1909  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910  rm -f conftest.$ac_objext
1911  if { { ac_try="$ac_compile"
1912case "(($ac_try" in
1913  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1914  *) ac_try_echo=$ac_try;;
1915esac
1916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1917$as_echo "$ac_try_echo"; } >&5
1918  (eval "$ac_compile") 2>conftest.err
1919  ac_status=$?
1920  if test -s conftest.err; then
1921    grep -v '^ *+' conftest.err >conftest.er1
1922    cat conftest.er1 >&5
1923    mv -f conftest.er1 conftest.err
1924  fi
1925  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1926  test $ac_status = 0; } && {
1927	 test -z "$ac_cxx_werror_flag" ||
1928	 test ! -s conftest.err
1929       } && test -s conftest.$ac_objext; then :
1930  ac_retval=0
1931else
1932  $as_echo "$as_me: failed program was:" >&5
1933sed 's/^/| /' conftest.$ac_ext >&5
1934
1935	ac_retval=1
1936fi
1937  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1938  as_fn_set_status $ac_retval
1939
1940} # ac_fn_cxx_try_compile
1941
1942# ac_fn_objc_try_compile LINENO
1943# -----------------------------
1944# Try to compile conftest.$ac_ext, and return whether this succeeded.
1945ac_fn_objc_try_compile ()
1946{
1947  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948  rm -f conftest.$ac_objext
1949  if { { ac_try="$ac_compile"
1950case "(($ac_try" in
1951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1952  *) ac_try_echo=$ac_try;;
1953esac
1954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1955$as_echo "$ac_try_echo"; } >&5
1956  (eval "$ac_compile") 2>conftest.err
1957  ac_status=$?
1958  if test -s conftest.err; then
1959    grep -v '^ *+' conftest.err >conftest.er1
1960    cat conftest.er1 >&5
1961    mv -f conftest.er1 conftest.err
1962  fi
1963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1964  test $ac_status = 0; } && {
1965	 test -z "$ac_objc_werror_flag" ||
1966	 test ! -s conftest.err
1967       } && test -s conftest.$ac_objext; then :
1968  ac_retval=0
1969else
1970  $as_echo "$as_me: failed program was:" >&5
1971sed 's/^/| /' conftest.$ac_ext >&5
1972
1973	ac_retval=1
1974fi
1975  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1976  as_fn_set_status $ac_retval
1977
1978} # ac_fn_objc_try_compile
1979
1980# ac_fn_c_try_cpp LINENO
1981# ----------------------
1982# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1983ac_fn_c_try_cpp ()
1984{
1985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1986  if { { ac_try="$ac_cpp conftest.$ac_ext"
1987case "(($ac_try" in
1988  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1989  *) ac_try_echo=$ac_try;;
1990esac
1991eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1992$as_echo "$ac_try_echo"; } >&5
1993  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1994  ac_status=$?
1995  if test -s conftest.err; then
1996    grep -v '^ *+' conftest.err >conftest.er1
1997    cat conftest.er1 >&5
1998    mv -f conftest.er1 conftest.err
1999  fi
2000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2001  test $ac_status = 0; } > conftest.i && {
2002	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2003	 test ! -s conftest.err
2004       }; then :
2005  ac_retval=0
2006else
2007  $as_echo "$as_me: failed program was:" >&5
2008sed 's/^/| /' conftest.$ac_ext >&5
2009
2010    ac_retval=1
2011fi
2012  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2013  as_fn_set_status $ac_retval
2014
2015} # ac_fn_c_try_cpp
2016
2017# ac_fn_cxx_try_cpp LINENO
2018# ------------------------
2019# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2020ac_fn_cxx_try_cpp ()
2021{
2022  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023  if { { ac_try="$ac_cpp conftest.$ac_ext"
2024case "(($ac_try" in
2025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026  *) ac_try_echo=$ac_try;;
2027esac
2028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029$as_echo "$ac_try_echo"; } >&5
2030  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2031  ac_status=$?
2032  if test -s conftest.err; then
2033    grep -v '^ *+' conftest.err >conftest.er1
2034    cat conftest.er1 >&5
2035    mv -f conftest.er1 conftest.err
2036  fi
2037  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2038  test $ac_status = 0; } > conftest.i && {
2039	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2040	 test ! -s conftest.err
2041       }; then :
2042  ac_retval=0
2043else
2044  $as_echo "$as_me: failed program was:" >&5
2045sed 's/^/| /' conftest.$ac_ext >&5
2046
2047    ac_retval=1
2048fi
2049  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2050  as_fn_set_status $ac_retval
2051
2052} # ac_fn_cxx_try_cpp
2053
2054# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2055# ---------------------------------------------------------
2056# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2057# the include files in INCLUDES and setting the cache variable VAR
2058# accordingly.
2059ac_fn_cxx_check_header_mongrel ()
2060{
2061  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062  if eval "test \"\${$3+set}\"" = set; then :
2063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2064$as_echo_n "checking for $2... " >&6; }
2065if eval "test \"\${$3+set}\"" = set; then :
2066  $as_echo_n "(cached) " >&6
2067fi
2068eval ac_res=\$$3
2069	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2070$as_echo "$ac_res" >&6; }
2071else
2072  # Is the header compilable?
2073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2074$as_echo_n "checking $2 usability... " >&6; }
2075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h.  */
2077$4
2078#include <$2>
2079_ACEOF
2080if ac_fn_cxx_try_compile "$LINENO"; then :
2081  ac_header_compiler=yes
2082else
2083  ac_header_compiler=no
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2087$as_echo "$ac_header_compiler" >&6; }
2088
2089# Is the header present?
2090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2091$as_echo_n "checking $2 presence... " >&6; }
2092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h.  */
2094#include <$2>
2095_ACEOF
2096if ac_fn_cxx_try_cpp "$LINENO"; then :
2097  ac_header_preproc=yes
2098else
2099  ac_header_preproc=no
2100fi
2101rm -f conftest.err conftest.i conftest.$ac_ext
2102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2103$as_echo "$ac_header_preproc" >&6; }
2104
2105# So?  What about this header?
2106case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2107  yes:no: )
2108    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2109$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2110    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2111$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2112    ;;
2113  no:yes:* )
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2115$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2117$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2119$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2121$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2123$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2124( $as_echo "## ----------------------------------------- ##
2125## Report this to build-dev@openjdk.java.net ##
2126## ----------------------------------------- ##"
2127     ) | sed "s/^/$as_me: WARNING:     /" >&2
2128    ;;
2129esac
2130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2131$as_echo_n "checking for $2... " >&6; }
2132if eval "test \"\${$3+set}\"" = set; then :
2133  $as_echo_n "(cached) " >&6
2134else
2135  eval "$3=\$ac_header_compiler"
2136fi
2137eval ac_res=\$$3
2138	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2139$as_echo "$ac_res" >&6; }
2140fi
2141  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2142
2143} # ac_fn_cxx_check_header_mongrel
2144
2145# ac_fn_cxx_try_run LINENO
2146# ------------------------
2147# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2148# that executables *can* be run.
2149ac_fn_cxx_try_run ()
2150{
2151  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2152  if { { ac_try="$ac_link"
2153case "(($ac_try" in
2154  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2155  *) ac_try_echo=$ac_try;;
2156esac
2157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2158$as_echo "$ac_try_echo"; } >&5
2159  (eval "$ac_link") 2>&5
2160  ac_status=$?
2161  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2162  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2163  { { case "(($ac_try" in
2164  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2165  *) ac_try_echo=$ac_try;;
2166esac
2167eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2168$as_echo "$ac_try_echo"; } >&5
2169  (eval "$ac_try") 2>&5
2170  ac_status=$?
2171  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2172  test $ac_status = 0; }; }; then :
2173  ac_retval=0
2174else
2175  $as_echo "$as_me: program exited with status $ac_status" >&5
2176       $as_echo "$as_me: failed program was:" >&5
2177sed 's/^/| /' conftest.$ac_ext >&5
2178
2179       ac_retval=$ac_status
2180fi
2181  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2182  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2183  as_fn_set_status $ac_retval
2184
2185} # ac_fn_cxx_try_run
2186
2187# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2188# ---------------------------------------------------------
2189# Tests whether HEADER exists and can be compiled using the include files in
2190# INCLUDES, setting the cache variable VAR accordingly.
2191ac_fn_cxx_check_header_compile ()
2192{
2193  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2195$as_echo_n "checking for $2... " >&6; }
2196if eval "test \"\${$3+set}\"" = set; then :
2197  $as_echo_n "(cached) " >&6
2198else
2199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h.  */
2201$4
2202#include <$2>
2203_ACEOF
2204if ac_fn_cxx_try_compile "$LINENO"; then :
2205  eval "$3=yes"
2206else
2207  eval "$3=no"
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210fi
2211eval ac_res=\$$3
2212	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2215
2216} # ac_fn_cxx_check_header_compile
2217
2218# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2219# ----------------------------------------------
2220# Tries to find the compile-time value of EXPR in a program that includes
2221# INCLUDES, setting VAR accordingly. Returns whether the value could be
2222# computed
2223ac_fn_cxx_compute_int ()
2224{
2225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226  if test "$cross_compiling" = yes; then
2227    # Depending upon the size, compute the lo and hi bounds.
2228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229/* end confdefs.h.  */
2230$4
2231int
2232main ()
2233{
2234static int test_array [1 - 2 * !(($2) >= 0)];
2235test_array [0] = 0
2236
2237  ;
2238  return 0;
2239}
2240_ACEOF
2241if ac_fn_cxx_try_compile "$LINENO"; then :
2242  ac_lo=0 ac_mid=0
2243  while :; do
2244    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h.  */
2246$4
2247int
2248main ()
2249{
2250static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2251test_array [0] = 0
2252
2253  ;
2254  return 0;
2255}
2256_ACEOF
2257if ac_fn_cxx_try_compile "$LINENO"; then :
2258  ac_hi=$ac_mid; break
2259else
2260  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2261			if test $ac_lo -le $ac_mid; then
2262			  ac_lo= ac_hi=
2263			  break
2264			fi
2265			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2266fi
2267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2268  done
2269else
2270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h.  */
2272$4
2273int
2274main ()
2275{
2276static int test_array [1 - 2 * !(($2) < 0)];
2277test_array [0] = 0
2278
2279  ;
2280  return 0;
2281}
2282_ACEOF
2283if ac_fn_cxx_try_compile "$LINENO"; then :
2284  ac_hi=-1 ac_mid=-1
2285  while :; do
2286    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2287/* end confdefs.h.  */
2288$4
2289int
2290main ()
2291{
2292static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2293test_array [0] = 0
2294
2295  ;
2296  return 0;
2297}
2298_ACEOF
2299if ac_fn_cxx_try_compile "$LINENO"; then :
2300  ac_lo=$ac_mid; break
2301else
2302  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2303			if test $ac_mid -le $ac_hi; then
2304			  ac_lo= ac_hi=
2305			  break
2306			fi
2307			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2308fi
2309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310  done
2311else
2312  ac_lo= ac_hi=
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315fi
2316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2317# Binary search between lo and hi bounds.
2318while test "x$ac_lo" != "x$ac_hi"; do
2319  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h.  */
2322$4
2323int
2324main ()
2325{
2326static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2327test_array [0] = 0
2328
2329  ;
2330  return 0;
2331}
2332_ACEOF
2333if ac_fn_cxx_try_compile "$LINENO"; then :
2334  ac_hi=$ac_mid
2335else
2336  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339done
2340case $ac_lo in #((
2341?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2342'') ac_retval=1 ;;
2343esac
2344  else
2345    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h.  */
2347$4
2348static long int longval () { return $2; }
2349static unsigned long int ulongval () { return $2; }
2350#include <stdio.h>
2351#include <stdlib.h>
2352int
2353main ()
2354{
2355
2356  FILE *f = fopen ("conftest.val", "w");
2357  if (! f)
2358    return 1;
2359  if (($2) < 0)
2360    {
2361      long int i = longval ();
2362      if (i != ($2))
2363	return 1;
2364      fprintf (f, "%ld", i);
2365    }
2366  else
2367    {
2368      unsigned long int i = ulongval ();
2369      if (i != ($2))
2370	return 1;
2371      fprintf (f, "%lu", i);
2372    }
2373  /* Do not output a trailing newline, as this causes \r\n confusion
2374     on some platforms.  */
2375  return ferror (f) || fclose (f) != 0;
2376
2377  ;
2378  return 0;
2379}
2380_ACEOF
2381if ac_fn_cxx_try_run "$LINENO"; then :
2382  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2383else
2384  ac_retval=1
2385fi
2386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2387  conftest.$ac_objext conftest.beam conftest.$ac_ext
2388rm -f conftest.val
2389
2390  fi
2391  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2392  as_fn_set_status $ac_retval
2393
2394} # ac_fn_cxx_compute_int
2395
2396# ac_fn_cxx_try_link LINENO
2397# -------------------------
2398# Try to link conftest.$ac_ext, and return whether this succeeded.
2399ac_fn_cxx_try_link ()
2400{
2401  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2402  rm -f conftest.$ac_objext conftest$ac_exeext
2403  if { { ac_try="$ac_link"
2404case "(($ac_try" in
2405  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2406  *) ac_try_echo=$ac_try;;
2407esac
2408eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2409$as_echo "$ac_try_echo"; } >&5
2410  (eval "$ac_link") 2>conftest.err
2411  ac_status=$?
2412  if test -s conftest.err; then
2413    grep -v '^ *+' conftest.err >conftest.er1
2414    cat conftest.er1 >&5
2415    mv -f conftest.er1 conftest.err
2416  fi
2417  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2418  test $ac_status = 0; } && {
2419	 test -z "$ac_cxx_werror_flag" ||
2420	 test ! -s conftest.err
2421       } && test -s conftest$ac_exeext && {
2422	 test "$cross_compiling" = yes ||
2423	 $as_test_x conftest$ac_exeext
2424       }; then :
2425  ac_retval=0
2426else
2427  $as_echo "$as_me: failed program was:" >&5
2428sed 's/^/| /' conftest.$ac_ext >&5
2429
2430	ac_retval=1
2431fi
2432  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2433  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2434  # interfere with the next link command; also delete a directory that is
2435  # left behind by Apple's compiler.  We do this before executing the actions.
2436  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2437  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2438  as_fn_set_status $ac_retval
2439
2440} # ac_fn_cxx_try_link
2441
2442# ac_fn_cxx_check_func LINENO FUNC VAR
2443# ------------------------------------
2444# Tests whether FUNC exists, setting the cache variable VAR accordingly
2445ac_fn_cxx_check_func ()
2446{
2447  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2449$as_echo_n "checking for $2... " >&6; }
2450if eval "test \"\${$3+set}\"" = set; then :
2451  $as_echo_n "(cached) " >&6
2452else
2453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h.  */
2455/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2456   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2457#define $2 innocuous_$2
2458
2459/* System header to define __stub macros and hopefully few prototypes,
2460    which can conflict with char $2 (); below.
2461    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2462    <limits.h> exists even on freestanding compilers.  */
2463
2464#ifdef __STDC__
2465# include <limits.h>
2466#else
2467# include <assert.h>
2468#endif
2469
2470#undef $2
2471
2472/* Override any GCC internal prototype to avoid an error.
2473   Use char because int might match the return type of a GCC
2474   builtin and then its argument prototype would still apply.  */
2475#ifdef __cplusplus
2476extern "C"
2477#endif
2478char $2 ();
2479/* The GNU C library defines this for functions which it implements
2480    to always fail with ENOSYS.  Some functions are actually named
2481    something starting with __ and the normal name is an alias.  */
2482#if defined __stub_$2 || defined __stub___$2
2483choke me
2484#endif
2485
2486int
2487main ()
2488{
2489return $2 ();
2490  ;
2491  return 0;
2492}
2493_ACEOF
2494if ac_fn_cxx_try_link "$LINENO"; then :
2495  eval "$3=yes"
2496else
2497  eval "$3=no"
2498fi
2499rm -f core conftest.err conftest.$ac_objext \
2500    conftest$ac_exeext conftest.$ac_ext
2501fi
2502eval ac_res=\$$3
2503	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2504$as_echo "$ac_res" >&6; }
2505  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2506
2507} # ac_fn_cxx_check_func
2508
2509# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2510# -------------------------------------------------------
2511# Tests whether HEADER exists and can be compiled using the include files in
2512# INCLUDES, setting the cache variable VAR accordingly.
2513ac_fn_c_check_header_compile ()
2514{
2515  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2517$as_echo_n "checking for $2... " >&6; }
2518if eval "test \"\${$3+set}\"" = set; then :
2519  $as_echo_n "(cached) " >&6
2520else
2521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2522/* end confdefs.h.  */
2523$4
2524#include <$2>
2525_ACEOF
2526if ac_fn_c_try_compile "$LINENO"; then :
2527  eval "$3=yes"
2528else
2529  eval "$3=no"
2530fi
2531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2532fi
2533eval ac_res=\$$3
2534	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2535$as_echo "$ac_res" >&6; }
2536  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2537
2538} # ac_fn_c_check_header_compile
2539cat >config.log <<_ACEOF
2540This file contains any messages produced by compilers while
2541running configure, to aid debugging if configure makes a mistake.
2542
2543It was created by OpenJDK $as_me jdk8, which was
2544generated by GNU Autoconf 2.67.  Invocation command line was
2545
2546  $ $0 $@
2547
2548_ACEOF
2549exec 5>>config.log
2550{
2551cat <<_ASUNAME
2552## --------- ##
2553## Platform. ##
2554## --------- ##
2555
2556hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2557uname -m = `(uname -m) 2>/dev/null || echo unknown`
2558uname -r = `(uname -r) 2>/dev/null || echo unknown`
2559uname -s = `(uname -s) 2>/dev/null || echo unknown`
2560uname -v = `(uname -v) 2>/dev/null || echo unknown`
2561
2562/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2563/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2564
2565/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2566/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2567/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2568/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2569/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2570/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2571/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2572
2573_ASUNAME
2574
2575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2576for as_dir in $PATH
2577do
2578  IFS=$as_save_IFS
2579  test -z "$as_dir" && as_dir=.
2580    $as_echo "PATH: $as_dir"
2581  done
2582IFS=$as_save_IFS
2583
2584} >&5
2585
2586cat >&5 <<_ACEOF
2587
2588
2589## ----------- ##
2590## Core tests. ##
2591## ----------- ##
2592
2593_ACEOF
2594
2595
2596# Keep a trace of the command line.
2597# Strip out --no-create and --no-recursion so they do not pile up.
2598# Strip out --silent because we don't want to record it for future runs.
2599# Also quote any args containing shell meta-characters.
2600# Make two passes to allow for proper duplicate-argument suppression.
2601ac_configure_args=
2602ac_configure_args0=
2603ac_configure_args1=
2604ac_must_keep_next=false
2605for ac_pass in 1 2
2606do
2607  for ac_arg
2608  do
2609    case $ac_arg in
2610    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2611    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2612    | -silent | --silent | --silen | --sile | --sil)
2613      continue ;;
2614    *\'*)
2615      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2616    esac
2617    case $ac_pass in
2618    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2619    2)
2620      as_fn_append ac_configure_args1 " '$ac_arg'"
2621      if test $ac_must_keep_next = true; then
2622	ac_must_keep_next=false # Got value, back to normal.
2623      else
2624	case $ac_arg in
2625	  *=* | --config-cache | -C | -disable-* | --disable-* \
2626	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2627	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2628	  | -with-* | --with-* | -without-* | --without-* | --x)
2629	    case "$ac_configure_args0 " in
2630	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2631	    esac
2632	    ;;
2633	  -* ) ac_must_keep_next=true ;;
2634	esac
2635      fi
2636      as_fn_append ac_configure_args " '$ac_arg'"
2637      ;;
2638    esac
2639  done
2640done
2641{ ac_configure_args0=; unset ac_configure_args0;}
2642{ ac_configure_args1=; unset ac_configure_args1;}
2643
2644# When interrupted or exit'd, cleanup temporary files, and complete
2645# config.log.  We remove comments because anyway the quotes in there
2646# would cause problems or look ugly.
2647# WARNING: Use '\'' to represent an apostrophe within the trap.
2648# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2649trap 'exit_status=$?
2650  # Save into config.log some information that might help in debugging.
2651  {
2652    echo
2653
2654    $as_echo "## ---------------- ##
2655## Cache variables. ##
2656## ---------------- ##"
2657    echo
2658    # The following way of writing the cache mishandles newlines in values,
2659(
2660  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2661    eval ac_val=\$$ac_var
2662    case $ac_val in #(
2663    *${as_nl}*)
2664      case $ac_var in #(
2665      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2666$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2667      esac
2668      case $ac_var in #(
2669      _ | IFS | as_nl) ;; #(
2670      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2671      *) { eval $ac_var=; unset $ac_var;} ;;
2672      esac ;;
2673    esac
2674  done
2675  (set) 2>&1 |
2676    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2677    *${as_nl}ac_space=\ *)
2678      sed -n \
2679	"s/'\''/'\''\\\\'\'''\''/g;
2680	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2681      ;; #(
2682    *)
2683      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2684      ;;
2685    esac |
2686    sort
2687)
2688    echo
2689
2690    $as_echo "## ----------------- ##
2691## Output variables. ##
2692## ----------------- ##"
2693    echo
2694    for ac_var in $ac_subst_vars
2695    do
2696      eval ac_val=\$$ac_var
2697      case $ac_val in
2698      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2699      esac
2700      $as_echo "$ac_var='\''$ac_val'\''"
2701    done | sort
2702    echo
2703
2704    if test -n "$ac_subst_files"; then
2705      $as_echo "## ------------------- ##
2706## File substitutions. ##
2707## ------------------- ##"
2708      echo
2709      for ac_var in $ac_subst_files
2710      do
2711	eval ac_val=\$$ac_var
2712	case $ac_val in
2713	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2714	esac
2715	$as_echo "$ac_var='\''$ac_val'\''"
2716      done | sort
2717      echo
2718    fi
2719
2720    if test -s confdefs.h; then
2721      $as_echo "## ----------- ##
2722## confdefs.h. ##
2723## ----------- ##"
2724      echo
2725      cat confdefs.h
2726      echo
2727    fi
2728    test "$ac_signal" != 0 &&
2729      $as_echo "$as_me: caught signal $ac_signal"
2730    $as_echo "$as_me: exit $exit_status"
2731  } >&5
2732  rm -f core *.core core.conftest.* &&
2733    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2734    exit $exit_status
2735' 0
2736for ac_signal in 1 2 13 15; do
2737  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2738done
2739ac_signal=0
2740
2741# confdefs.h avoids OS command line length limits that DEFS can exceed.
2742rm -f -r conftest* confdefs.h
2743
2744$as_echo "/* confdefs.h */" > confdefs.h
2745
2746# Predefined preprocessor variables.
2747
2748cat >>confdefs.h <<_ACEOF
2749#define PACKAGE_NAME "$PACKAGE_NAME"
2750_ACEOF
2751
2752cat >>confdefs.h <<_ACEOF
2753#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2754_ACEOF
2755
2756cat >>confdefs.h <<_ACEOF
2757#define PACKAGE_VERSION "$PACKAGE_VERSION"
2758_ACEOF
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_STRING "$PACKAGE_STRING"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_URL "$PACKAGE_URL"
2770_ACEOF
2771
2772
2773# Let the site file select an alternate cache file if it wants to.
2774# Prefer an explicitly selected file to automatically selected ones.
2775ac_site_file1=NONE
2776ac_site_file2=NONE
2777if test -n "$CONFIG_SITE"; then
2778  # We do not want a PATH search for config.site.
2779  case $CONFIG_SITE in #((
2780    -*)  ac_site_file1=./$CONFIG_SITE;;
2781    */*) ac_site_file1=$CONFIG_SITE;;
2782    *)   ac_site_file1=./$CONFIG_SITE;;
2783  esac
2784elif test "x$prefix" != xNONE; then
2785  ac_site_file1=$prefix/share/config.site
2786  ac_site_file2=$prefix/etc/config.site
2787else
2788  ac_site_file1=$ac_default_prefix/share/config.site
2789  ac_site_file2=$ac_default_prefix/etc/config.site
2790fi
2791for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2792do
2793  test "x$ac_site_file" = xNONE && continue
2794  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2795    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2796$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2797    sed 's/^/| /' "$ac_site_file" >&5
2798    . "$ac_site_file" \
2799      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2801as_fn_error $? "failed to load site script $ac_site_file
2802See \`config.log' for more details" "$LINENO" 5 ; }
2803  fi
2804done
2805
2806if test -r "$cache_file"; then
2807  # Some versions of bash will fail to source /dev/null (special files
2808  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2809  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2810    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2811$as_echo "$as_me: loading cache $cache_file" >&6;}
2812    case $cache_file in
2813      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2814      *)                      . "./$cache_file";;
2815    esac
2816  fi
2817else
2818  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2819$as_echo "$as_me: creating cache $cache_file" >&6;}
2820  >$cache_file
2821fi
2822
2823# Check that the precious variables saved in the cache have kept the same
2824# value.
2825ac_cache_corrupted=false
2826for ac_var in $ac_precious_vars; do
2827  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2828  eval ac_new_set=\$ac_env_${ac_var}_set
2829  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2830  eval ac_new_val=\$ac_env_${ac_var}_value
2831  case $ac_old_set,$ac_new_set in
2832    set,)
2833      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2834$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2835      ac_cache_corrupted=: ;;
2836    ,set)
2837      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2838$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2839      ac_cache_corrupted=: ;;
2840    ,);;
2841    *)
2842      if test "x$ac_old_val" != "x$ac_new_val"; then
2843	# differences in whitespace do not lead to failure.
2844	ac_old_val_w=`echo x $ac_old_val`
2845	ac_new_val_w=`echo x $ac_new_val`
2846	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2847	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2848$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2849	  ac_cache_corrupted=:
2850	else
2851	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2852$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2853	  eval $ac_var=\$ac_old_val
2854	fi
2855	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2856$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2857	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2858$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2859      fi;;
2860  esac
2861  # Pass precious variables to config.status.
2862  if test "$ac_new_set" = set; then
2863    case $ac_new_val in
2864    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2865    *) ac_arg=$ac_var=$ac_new_val ;;
2866    esac
2867    case " $ac_configure_args " in
2868      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2869      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2870    esac
2871  fi
2872done
2873if $ac_cache_corrupted; then
2874  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2876  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2877$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2878  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2879fi
2880## -------------------- ##
2881## Main body of script. ##
2882## -------------------- ##
2883
2884ac_ext=c
2885ac_cpp='$CPP $CPPFLAGS'
2886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2888ac_compiler_gnu=$ac_cv_c_compiler_gnu
2889
2890
2891
2892ac_aux_dir=
2893for ac_dir in build-aux "$srcdir"/build-aux; do
2894  if test -f "$ac_dir/install-sh"; then
2895    ac_aux_dir=$ac_dir
2896    ac_install_sh="$ac_aux_dir/install-sh -c"
2897    break
2898  elif 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/shtool"; then
2903    ac_aux_dir=$ac_dir
2904    ac_install_sh="$ac_aux_dir/shtool install -c"
2905    break
2906  fi
2907done
2908if test -z "$ac_aux_dir"; then
2909  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2910fi
2911
2912# These three variables are undocumented and unsupported,
2913# and are intended to be withdrawn in a future Autoconf release.
2914# They can cause serious problems if a builder's source tree is in a directory
2915# whose full name contains unusual characters.
2916ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2917ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2918ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2919
2920
2921# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2922#
2923# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2924#
2925# This program is free software; you can redistribute it and/or modify
2926# it under the terms of the GNU General Public License as published by
2927# the Free Software Foundation; either version 2 of the License, or
2928# (at your option) any later version.
2929#
2930# This program is distributed in the hope that it will be useful, but
2931# WITHOUT ANY WARRANTY; without even the implied warranty of
2932# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2933# General Public License for more details.
2934#
2935# You should have received a copy of the GNU General Public License
2936# along with this program; if not, write to the Free Software
2937# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2938#
2939# As a special exception to the GNU General Public License, if you
2940# distribute this file as part of a program that contains a
2941# configuration script generated by Autoconf, you may include it under
2942# the same distribution terms that you use for the rest of that program.
2943
2944# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2945# ----------------------------------
2946# PKG_PROG_PKG_CONFIG
2947
2948# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2949#
2950# Check to see whether a particular set of modules exists.  Similar
2951# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2952#
2953#
2954# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2955# this or PKG_CHECK_MODULES is called, or make sure to call
2956# PKG_CHECK_EXISTS manually
2957# --------------------------------------------------------------
2958
2959
2960
2961# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2962# ---------------------------------------------
2963# _PKG_CONFIG
2964
2965# _PKG_SHORT_ERRORS_SUPPORTED
2966# -----------------------------
2967# _PKG_SHORT_ERRORS_SUPPORTED
2968
2969
2970# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2971# [ACTION-IF-NOT-FOUND])
2972#
2973#
2974# Note that if there is a possibility the first call to
2975# PKG_CHECK_MODULES might not happen, you should be sure to include an
2976# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2977#
2978#
2979# --------------------------------------------------------------
2980# PKG_CHECK_MODULES
2981
2982
2983# Include these first...
2984#
2985# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2986# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2987#
2988# This code is free software; you can redistribute it and/or modify it
2989# under the terms of the GNU General Public License version 2 only, as
2990# published by the Free Software Foundation.  Oracle designates this
2991# particular file as subject to the "Classpath" exception as provided
2992# by Oracle in the LICENSE file that accompanied this code.
2993#
2994# This code is distributed in the hope that it will be useful, but WITHOUT
2995# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2996# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2997# version 2 for more details (a copy is included in the LICENSE file that
2998# accompanied this code).
2999#
3000# You should have received a copy of the GNU General Public License version
3001# 2 along with this work; if not, write to the Free Software Foundation,
3002# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3003#
3004# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3005# or visit www.oracle.com if you need additional information or have any
3006# questions.
3007#
3008
3009
3010
3011# This will make sure the given variable points to a full and proper
3012# path. This means:
3013# 1) There will be no spaces in the path. On posix platforms,
3014#    spaces in the path will result in an error. On Windows,
3015#    the path will be rewritten using short-style to be space-free.
3016# 2) The path will be absolute, and it will be in unix-style (on
3017#     cygwin).
3018# $1: The name of the variable to fix
3019
3020
3021# This will make sure the given variable points to a executable
3022# with a full and proper path. This means:
3023# 1) There will be no spaces in the path. On posix platforms,
3024#    spaces in the path will result in an error. On Windows,
3025#    the path will be rewritten using short-style to be space-free.
3026# 2) The path will be absolute, and it will be in unix-style (on
3027#     cygwin).
3028# Any arguments given to the executable is preserved.
3029# If the input variable does not have a directory specification, then
3030# it need to be in the PATH.
3031# $1: The name of the variable to fix
3032
3033
3034
3035
3036
3037
3038# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3039# $1: variable to check
3040# $2: executable name to print in warning (optional)
3041
3042
3043# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3044# Arguments as AC_PATH_PROG:
3045# $1: variable to set
3046# $2: executable name to look for
3047
3048
3049# Setup the most fundamental tools that relies on not much else to set up,
3050# but is used by much of the early bootstrap code.
3051
3052
3053# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3054
3055
3056
3057
3058
3059
3060
3061#%%% Simple tools %%%
3062
3063# Check if we have found a usable version of make
3064# $1: the path to a potential make binary (or empty)
3065# $2: the description on how we found this
3066
3067
3068# Goes looking for a usable version of GNU make.
3069
3070
3071
3072
3073
3074
3075# Check if build directory is on local disk. If not possible to determine,
3076# we prefer to claim it's local.
3077# Argument 1: directory to test
3078# Argument 2: what to do if it is on local disk
3079# Argument 3: what to do otherwise (remote disk or failure)
3080
3081
3082
3083
3084#
3085# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3086# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3087#
3088# This code is free software; you can redistribute it and/or modify it
3089# under the terms of the GNU General Public License version 2 only, as
3090# published by the Free Software Foundation.  Oracle designates this
3091# particular file as subject to the "Classpath" exception as provided
3092# by Oracle in the LICENSE file that accompanied this code.
3093#
3094# This code is distributed in the hope that it will be useful, but WITHOUT
3095# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3096# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3097# version 2 for more details (a copy is included in the LICENSE file that
3098# accompanied this code).
3099#
3100# You should have received a copy of the GNU General Public License version
3101# 2 along with this work; if not, write to the Free Software Foundation,
3102# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3103#
3104# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3105# or visit www.oracle.com if you need additional information or have any
3106# questions.
3107#
3108
3109
3110
3111
3112
3113# Helper function which possibly converts a path using DOS-style short mode.
3114# If so, the updated path is stored in $new_path.
3115# $1: The path to check
3116
3117
3118# Helper function which possibly converts a path using DOS-style short mode.
3119# If so, the updated path is stored in $new_path.
3120# $1: The path to check
3121
3122
3123# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3124# and could probably be heavily simplified. However, all changes in this
3125# area tend to need lot of testing in different scenarios, and in lack of
3126# proper unit testing, cleaning this up has not been deemed worth the effort
3127# at the moment.
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3138
3139
3140
3141
3142#
3143# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3144# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3145#
3146# This code is free software; you can redistribute it and/or modify it
3147# under the terms of the GNU General Public License version 2 only, as
3148# published by the Free Software Foundation.  Oracle designates this
3149# particular file as subject to the "Classpath" exception as provided
3150# by Oracle in the LICENSE file that accompanied this code.
3151#
3152# This code is distributed in the hope that it will be useful, but WITHOUT
3153# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3154# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3155# version 2 for more details (a copy is included in the LICENSE file that
3156# accompanied this code).
3157#
3158# You should have received a copy of the GNU General Public License version
3159# 2 along with this work; if not, write to the Free Software Foundation,
3160# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3161#
3162# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3163# or visit www.oracle.com if you need additional information or have any
3164# questions.
3165#
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177# ... then the rest
3178#
3179# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3180# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3181#
3182# This code is free software; you can redistribute it and/or modify it
3183# under the terms of the GNU General Public License version 2 only, as
3184# published by the Free Software Foundation.  Oracle designates this
3185# particular file as subject to the "Classpath" exception as provided
3186# by Oracle in the LICENSE file that accompanied this code.
3187#
3188# This code is distributed in the hope that it will be useful, but WITHOUT
3189# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3190# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3191# version 2 for more details (a copy is included in the LICENSE file that
3192# accompanied this code).
3193#
3194# You should have received a copy of the GNU General Public License version
3195# 2 along with this work; if not, write to the Free Software Foundation,
3196# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3197#
3198# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3199# or visit www.oracle.com if you need additional information or have any
3200# questions.
3201#
3202
3203# Execute the check given as argument, and verify the result
3204# If the Boot JDK was previously found, do nothing
3205# $1 A command line (typically autoconf macro) to execute
3206
3207
3208# Test: Is bootjdk explicitely set by command line arguments?
3209
3210
3211# Test: Is bootjdk available from builddeps?
3212
3213
3214# Test: Is $JAVA_HOME set?
3215
3216
3217# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3218
3219
3220# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3221
3222
3223# Look for a jdk in the given path. If there are multiple, try to select the newest.
3224# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3225# $1 = Path to directory containing jdk installations.
3226# $2 = String to append to the found JDK directory to get the proper JDK home
3227
3228
3229# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3230# environmental variable as base for where to look.
3231# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3232
3233
3234# Test: Is there a JDK installed in default, well-known locations?
3235
3236
3237# Check that a command-line tool in the Boot JDK is correct
3238# $1 = name of variable to assign
3239# $2 = name of binary
3240
3241
3242###############################################################################
3243#
3244# We need a Boot JDK to bootstrap the build.
3245#
3246
3247
3248
3249
3250
3251#
3252# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3253# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3254#
3255# This code is free software; you can redistribute it and/or modify it
3256# under the terms of the GNU General Public License version 2 only, as
3257# published by the Free Software Foundation.  Oracle designates this
3258# particular file as subject to the "Classpath" exception as provided
3259# by Oracle in the LICENSE file that accompanied this code.
3260#
3261# This code is distributed in the hope that it will be useful, but WITHOUT
3262# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3263# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3264# version 2 for more details (a copy is included in the LICENSE file that
3265# accompanied this code).
3266#
3267# You should have received a copy of the GNU General Public License version
3268# 2 along with this work; if not, write to the Free Software Foundation,
3269# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3270#
3271# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3272# or visit www.oracle.com if you need additional information or have any
3273# questions.
3274#
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293#
3294# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3295# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3296#
3297# This code is free software; you can redistribute it and/or modify it
3298# under the terms of the GNU General Public License version 2 only, as
3299# published by the Free Software Foundation.  Oracle designates this
3300# particular file as subject to the "Classpath" exception as provided
3301# by Oracle in the LICENSE file that accompanied this code.
3302#
3303# This code is distributed in the hope that it will be useful, but WITHOUT
3304# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3305# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3306# version 2 for more details (a copy is included in the LICENSE file that
3307# accompanied this code).
3308#
3309# You should have received a copy of the GNU General Public License version
3310# 2 along with this work; if not, write to the Free Software Foundation,
3311# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3312#
3313# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3314# or visit www.oracle.com if you need additional information or have any
3315# questions.
3316#
3317
3318
3319
3320
3321
3322cygwin_help() {
3323    case $1 in
3324    unzip)
3325        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3326    zip)
3327        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3328    make)
3329        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3330    * )
3331       break ;;
3332    esac
3333}
3334
3335apt_help() {
3336    case $1 in
3337    devkit)
3338        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3339    openjdk)
3340        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3341    alsa)
3342        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3343    cups)
3344        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3345    freetype2)
3346        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3347    pulse)
3348        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3349    x11)
3350        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3351    ccache)
3352        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3353    * )
3354       break ;;
3355    esac
3356}
3357
3358yum_help() {
3359    case $1 in
3360    devkit)
3361        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3362    openjdk)
3363        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3364    alsa)
3365        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3366    cups)
3367        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3368    freetype2)
3369        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3370    pulse)
3371        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3372    x11)
3373        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3374    ccache)
3375        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3376    * )
3377       break ;;
3378    esac
3379}
3380
3381port_help() {
3382    PKGHANDLER_COMMAND=""
3383}
3384
3385pkgutil_help() {
3386    PKGHANDLER_COMMAND=""
3387}
3388
3389pkgadd_help() {
3390    PKGHANDLER_COMMAND=""
3391}
3392
3393
3394
3395#
3396# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3397# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3398#
3399# This code is free software; you can redistribute it and/or modify it
3400# under the terms of the GNU General Public License version 2 only, as
3401# published by the Free Software Foundation.  Oracle designates this
3402# particular file as subject to the "Classpath" exception as provided
3403# by Oracle in the LICENSE file that accompanied this code.
3404#
3405# This code is distributed in the hope that it will be useful, but WITHOUT
3406# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3407# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3408# version 2 for more details (a copy is included in the LICENSE file that
3409# accompanied this code).
3410#
3411# You should have received a copy of the GNU General Public License version
3412# 2 along with this work; if not, write to the Free Software Foundation,
3413# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3414#
3415# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3416# or visit www.oracle.com if you need additional information or have any
3417# questions.
3418#
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434# Support for customization of the build process. Some build files
3435# will include counterparts from this location, if they exist. This allows
3436# for a degree of customization of the build targets and the rules/recipes
3437# to create them
3438
3439# Check whether --with-custom-make-dir was given.
3440if test "${with_custom_make_dir+set}" = set; then :
3441  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3442fi
3443
3444
3445
3446#
3447# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3448# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3449#
3450# This code is free software; you can redistribute it and/or modify it
3451# under the terms of the GNU General Public License version 2 only, as
3452# published by the Free Software Foundation.  Oracle designates this
3453# particular file as subject to the "Classpath" exception as provided
3454# by Oracle in the LICENSE file that accompanied this code.
3455#
3456# This code is distributed in the hope that it will be useful, but WITHOUT
3457# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3458# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3459# version 2 for more details (a copy is included in the LICENSE file that
3460# accompanied this code).
3461#
3462# You should have received a copy of the GNU General Public License version
3463# 2 along with this work; if not, write to the Free Software Foundation,
3464# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3465#
3466# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3467# or visit www.oracle.com if you need additional information or have any
3468# questions.
3469#
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485#
3486# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3487# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3488#
3489# This code is free software; you can redistribute it and/or modify it
3490# under the terms of the GNU General Public License version 2 only, as
3491# published by the Free Software Foundation.  Oracle designates this
3492# particular file as subject to the "Classpath" exception as provided
3493# by Oracle in the LICENSE file that accompanied this code.
3494#
3495# This code is distributed in the hope that it will be useful, but WITHOUT
3496# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3497# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3498# version 2 for more details (a copy is included in the LICENSE file that
3499# accompanied this code).
3500#
3501# You should have received a copy of the GNU General Public License version
3502# 2 along with this work; if not, write to the Free Software Foundation,
3503# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3504#
3505# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3506# or visit www.oracle.com if you need additional information or have any
3507# questions.
3508#
3509
3510# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3511# Converts autoconf style CPU name to OpenJDK style, into
3512# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3513
3514
3515# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3516# Converts autoconf style OS name to OpenJDK style, into
3517# VAR_OS and VAR_OS_API.
3518
3519
3520# Expects $host_os $host_cpu $build_os and $build_cpu
3521# and $with_target_bits to have been setup!
3522#
3523# Translate the standard triplet(quadruplet) definition
3524# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3525# OPENJDK_BUILD_OS, etc.
3526
3527
3528# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3529# accordingly. Must be done after setting up build and target system, but before
3530# doing anything else with these values.
3531
3532
3533    # Setup the legacy variables, for controlling the old makefiles.
3534    #
3535
3536
3537
3538
3539#%%% Build and target systems %%%
3540
3541
3542
3543
3544# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3545# Add -mX to various FLAGS variables.
3546
3547
3548
3549
3550
3551
3552#
3553# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3554# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3555#
3556# This code is free software; you can redistribute it and/or modify it
3557# under the terms of the GNU General Public License version 2 only, as
3558# published by the Free Software Foundation.  Oracle designates this
3559# particular file as subject to the "Classpath" exception as provided
3560# by Oracle in the LICENSE file that accompanied this code.
3561#
3562# This code is distributed in the hope that it will be useful, but WITHOUT
3563# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3564# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3565# version 2 for more details (a copy is included in the LICENSE file that
3566# accompanied this code).
3567#
3568# You should have received a copy of the GNU General Public License version
3569# 2 along with this work; if not, write to the Free Software Foundation,
3570# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3571#
3572# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3573# or visit www.oracle.com if you need additional information or have any
3574# questions.
3575#
3576
3577
3578
3579
3580
3581
3582
3583
3584#
3585# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3586# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3587#
3588# This code is free software; you can redistribute it and/or modify it
3589# under the terms of the GNU General Public License version 2 only, as
3590# published by the Free Software Foundation.  Oracle designates this
3591# particular file as subject to the "Classpath" exception as provided
3592# by Oracle in the LICENSE file that accompanied this code.
3593#
3594# This code is distributed in the hope that it will be useful, but WITHOUT
3595# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3596# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3597# version 2 for more details (a copy is included in the LICENSE file that
3598# accompanied this code).
3599#
3600# You should have received a copy of the GNU General Public License version
3601# 2 along with this work; if not, write to the Free Software Foundation,
3602# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3603#
3604# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3605# or visit www.oracle.com if you need additional information or have any
3606# questions.
3607#
3608
3609# $1 = compiler to test (CC or CXX)
3610# $2 = human readable name of compiler (C or C++)
3611
3612
3613
3614
3615
3616# $1 = compiler to test (CC or CXX)
3617# $2 = human readable name of compiler (C or C++)
3618# $3 = list of compiler names to search for
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631#
3632# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3633# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3634#
3635# This code is free software; you can redistribute it and/or modify it
3636# under the terms of the GNU General Public License version 2 only, as
3637# published by the Free Software Foundation.  Oracle designates this
3638# particular file as subject to the "Classpath" exception as provided
3639# by Oracle in the LICENSE file that accompanied this code.
3640#
3641# This code is distributed in the hope that it will be useful, but WITHOUT
3642# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3643# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3644# version 2 for more details (a copy is included in the LICENSE file that
3645# accompanied this code).
3646#
3647# You should have received a copy of the GNU General Public License version
3648# 2 along with this work; if not, write to the Free Software Foundation,
3649# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3650#
3651# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3652# or visit www.oracle.com if you need additional information or have any
3653# questions.
3654#
3655
3656
3657
3658
3659
3660
3661
3662# Check if the VS env variables were setup prior to running configure.
3663# If not, then find vcvarsall.bat and run it automatically, and integrate
3664# the set env variables into the spec file.
3665
3666
3667
3668
3669
3670
3671# This line needs to be here, verbatim, after all includes and the dummy hook
3672# definitions. It is replaced with custom functionality when building
3673# custom sources.
3674#CUSTOM_AUTOCONF_INCLUDE
3675
3676# Do not change or remove the following line, it is needed for consistency checks:
3677DATE_WHEN_GENERATED=1355221914
3678
3679###############################################################################
3680#
3681# Initialization / Boot-strapping
3682#
3683# The bootstrapping process needs to solve the "chicken or the egg" problem,
3684# thus it jumps back and forth, each time gaining something needed later on.
3685#
3686###############################################################################
3687
3688# Basic initialization that must happen first of all
3689
3690# Save the original command line. This is passed to us by the wrapper configure script.
3691
3692DATE_WHEN_CONFIGURED=`LANG=C date`
3693
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3695$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3697$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3698
3699
3700
3701# Start with tools that do not need have cross compilation support
3702# and can be expected to be found in the default PATH. These tools are
3703# used by configure. Nor are these tools expected to be found in the
3704# devkit from the builddeps server either, since they are
3705# needed to download the devkit.
3706
3707# First are all the simple required tools.
3708
3709    for ac_prog in basename
3710do
3711  # Extract the first word of "$ac_prog", so it can be a program name with args.
3712set dummy $ac_prog; ac_word=$2
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3714$as_echo_n "checking for $ac_word... " >&6; }
3715if test "${ac_cv_path_BASENAME+set}" = set; then :
3716  $as_echo_n "(cached) " >&6
3717else
3718  case $BASENAME in
3719  [\\/]* | ?:[\\/]*)
3720  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3721  ;;
3722  *)
3723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726  IFS=$as_save_IFS
3727  test -z "$as_dir" && as_dir=.
3728    for ac_exec_ext in '' $ac_executable_extensions; do
3729  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3730    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3732    break 2
3733  fi
3734done
3735  done
3736IFS=$as_save_IFS
3737
3738  ;;
3739esac
3740fi
3741BASENAME=$ac_cv_path_BASENAME
3742if test -n "$BASENAME"; then
3743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3744$as_echo "$BASENAME" >&6; }
3745else
3746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
3748fi
3749
3750
3751  test -n "$BASENAME" && break
3752done
3753
3754
3755    if test "x$BASENAME" = x; then
3756        if test "xbasename" = x; then
3757          PROG_NAME=basename
3758        else
3759          PROG_NAME=basename
3760        fi
3761        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3762$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3763        as_fn_error $? "Cannot continue" "$LINENO" 5
3764    fi
3765
3766
3767
3768    for ac_prog in bash
3769do
3770  # Extract the first word of "$ac_prog", so it can be a program name with args.
3771set dummy $ac_prog; ac_word=$2
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
3774if test "${ac_cv_path_BASH+set}" = set; then :
3775  $as_echo_n "(cached) " >&6
3776else
3777  case $BASH in
3778  [\\/]* | ?:[\\/]*)
3779  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3780  ;;
3781  *)
3782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785  IFS=$as_save_IFS
3786  test -z "$as_dir" && as_dir=.
3787    for ac_exec_ext in '' $ac_executable_extensions; do
3788  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3789    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3791    break 2
3792  fi
3793done
3794  done
3795IFS=$as_save_IFS
3796
3797  ;;
3798esac
3799fi
3800BASH=$ac_cv_path_BASH
3801if test -n "$BASH"; then
3802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3803$as_echo "$BASH" >&6; }
3804else
3805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
3807fi
3808
3809
3810  test -n "$BASH" && break
3811done
3812
3813
3814    if test "x$BASH" = x; then
3815        if test "xbash" = x; then
3816          PROG_NAME=bash
3817        else
3818          PROG_NAME=bash
3819        fi
3820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3821$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3822        as_fn_error $? "Cannot continue" "$LINENO" 5
3823    fi
3824
3825
3826
3827    for ac_prog in cat
3828do
3829  # Extract the first word of "$ac_prog", so it can be a program name with args.
3830set dummy $ac_prog; ac_word=$2
3831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3832$as_echo_n "checking for $ac_word... " >&6; }
3833if test "${ac_cv_path_CAT+set}" = set; then :
3834  $as_echo_n "(cached) " >&6
3835else
3836  case $CAT in
3837  [\\/]* | ?:[\\/]*)
3838  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3839  ;;
3840  *)
3841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844  IFS=$as_save_IFS
3845  test -z "$as_dir" && as_dir=.
3846    for ac_exec_ext in '' $ac_executable_extensions; do
3847  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3848    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850    break 2
3851  fi
3852done
3853  done
3854IFS=$as_save_IFS
3855
3856  ;;
3857esac
3858fi
3859CAT=$ac_cv_path_CAT
3860if test -n "$CAT"; then
3861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3862$as_echo "$CAT" >&6; }
3863else
3864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
3866fi
3867
3868
3869  test -n "$CAT" && break
3870done
3871
3872
3873    if test "x$CAT" = x; then
3874        if test "xcat" = x; then
3875          PROG_NAME=cat
3876        else
3877          PROG_NAME=cat
3878        fi
3879        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3880$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3881        as_fn_error $? "Cannot continue" "$LINENO" 5
3882    fi
3883
3884
3885
3886    for ac_prog in chmod
3887do
3888  # Extract the first word of "$ac_prog", so it can be a program name with args.
3889set dummy $ac_prog; ac_word=$2
3890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3891$as_echo_n "checking for $ac_word... " >&6; }
3892if test "${ac_cv_path_CHMOD+set}" = set; then :
3893  $as_echo_n "(cached) " >&6
3894else
3895  case $CHMOD in
3896  [\\/]* | ?:[\\/]*)
3897  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3898  ;;
3899  *)
3900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3901for as_dir in $PATH
3902do
3903  IFS=$as_save_IFS
3904  test -z "$as_dir" && as_dir=.
3905    for ac_exec_ext in '' $ac_executable_extensions; do
3906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3907    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3909    break 2
3910  fi
3911done
3912  done
3913IFS=$as_save_IFS
3914
3915  ;;
3916esac
3917fi
3918CHMOD=$ac_cv_path_CHMOD
3919if test -n "$CHMOD"; then
3920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3921$as_echo "$CHMOD" >&6; }
3922else
3923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3924$as_echo "no" >&6; }
3925fi
3926
3927
3928  test -n "$CHMOD" && break
3929done
3930
3931
3932    if test "x$CHMOD" = x; then
3933        if test "xchmod" = x; then
3934          PROG_NAME=chmod
3935        else
3936          PROG_NAME=chmod
3937        fi
3938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3940        as_fn_error $? "Cannot continue" "$LINENO" 5
3941    fi
3942
3943
3944
3945    for ac_prog in cmp
3946do
3947  # Extract the first word of "$ac_prog", so it can be a program name with args.
3948set dummy $ac_prog; ac_word=$2
3949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3950$as_echo_n "checking for $ac_word... " >&6; }
3951if test "${ac_cv_path_CMP+set}" = set; then :
3952  $as_echo_n "(cached) " >&6
3953else
3954  case $CMP in
3955  [\\/]* | ?:[\\/]*)
3956  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3957  ;;
3958  *)
3959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960for as_dir in $PATH
3961do
3962  IFS=$as_save_IFS
3963  test -z "$as_dir" && as_dir=.
3964    for ac_exec_ext in '' $ac_executable_extensions; do
3965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3966    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3968    break 2
3969  fi
3970done
3971  done
3972IFS=$as_save_IFS
3973
3974  ;;
3975esac
3976fi
3977CMP=$ac_cv_path_CMP
3978if test -n "$CMP"; then
3979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3980$as_echo "$CMP" >&6; }
3981else
3982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
3984fi
3985
3986
3987  test -n "$CMP" && break
3988done
3989
3990
3991    if test "x$CMP" = x; then
3992        if test "xcmp" = x; then
3993          PROG_NAME=cmp
3994        else
3995          PROG_NAME=cmp
3996        fi
3997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3999        as_fn_error $? "Cannot continue" "$LINENO" 5
4000    fi
4001
4002
4003
4004    for ac_prog in cp
4005do
4006  # Extract the first word of "$ac_prog", so it can be a program name with args.
4007set dummy $ac_prog; ac_word=$2
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4009$as_echo_n "checking for $ac_word... " >&6; }
4010if test "${ac_cv_path_CP+set}" = set; then :
4011  $as_echo_n "(cached) " >&6
4012else
4013  case $CP in
4014  [\\/]* | ?:[\\/]*)
4015  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4016  ;;
4017  *)
4018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019for as_dir in $PATH
4020do
4021  IFS=$as_save_IFS
4022  test -z "$as_dir" && as_dir=.
4023    for ac_exec_ext in '' $ac_executable_extensions; do
4024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4025    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4027    break 2
4028  fi
4029done
4030  done
4031IFS=$as_save_IFS
4032
4033  ;;
4034esac
4035fi
4036CP=$ac_cv_path_CP
4037if test -n "$CP"; then
4038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4039$as_echo "$CP" >&6; }
4040else
4041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042$as_echo "no" >&6; }
4043fi
4044
4045
4046  test -n "$CP" && break
4047done
4048
4049
4050    if test "x$CP" = x; then
4051        if test "xcp" = x; then
4052          PROG_NAME=cp
4053        else
4054          PROG_NAME=cp
4055        fi
4056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4058        as_fn_error $? "Cannot continue" "$LINENO" 5
4059    fi
4060
4061
4062
4063    for ac_prog in cut
4064do
4065  # Extract the first word of "$ac_prog", so it can be a program name with args.
4066set dummy $ac_prog; ac_word=$2
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4068$as_echo_n "checking for $ac_word... " >&6; }
4069if test "${ac_cv_path_CUT+set}" = set; then :
4070  $as_echo_n "(cached) " >&6
4071else
4072  case $CUT in
4073  [\\/]* | ?:[\\/]*)
4074  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4075  ;;
4076  *)
4077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4078for as_dir in $PATH
4079do
4080  IFS=$as_save_IFS
4081  test -z "$as_dir" && as_dir=.
4082    for ac_exec_ext in '' $ac_executable_extensions; do
4083  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4084    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4086    break 2
4087  fi
4088done
4089  done
4090IFS=$as_save_IFS
4091
4092  ;;
4093esac
4094fi
4095CUT=$ac_cv_path_CUT
4096if test -n "$CUT"; then
4097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4098$as_echo "$CUT" >&6; }
4099else
4100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4101$as_echo "no" >&6; }
4102fi
4103
4104
4105  test -n "$CUT" && break
4106done
4107
4108
4109    if test "x$CUT" = x; then
4110        if test "xcut" = x; then
4111          PROG_NAME=cut
4112        else
4113          PROG_NAME=cut
4114        fi
4115        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4116$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4117        as_fn_error $? "Cannot continue" "$LINENO" 5
4118    fi
4119
4120
4121
4122    for ac_prog in date
4123do
4124  # Extract the first word of "$ac_prog", so it can be a program name with args.
4125set dummy $ac_prog; ac_word=$2
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4127$as_echo_n "checking for $ac_word... " >&6; }
4128if test "${ac_cv_path_DATE+set}" = set; then :
4129  $as_echo_n "(cached) " >&6
4130else
4131  case $DATE in
4132  [\\/]* | ?:[\\/]*)
4133  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4134  ;;
4135  *)
4136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4137for as_dir in $PATH
4138do
4139  IFS=$as_save_IFS
4140  test -z "$as_dir" && as_dir=.
4141    for ac_exec_ext in '' $ac_executable_extensions; do
4142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4143    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4145    break 2
4146  fi
4147done
4148  done
4149IFS=$as_save_IFS
4150
4151  ;;
4152esac
4153fi
4154DATE=$ac_cv_path_DATE
4155if test -n "$DATE"; then
4156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4157$as_echo "$DATE" >&6; }
4158else
4159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4160$as_echo "no" >&6; }
4161fi
4162
4163
4164  test -n "$DATE" && break
4165done
4166
4167
4168    if test "x$DATE" = x; then
4169        if test "xdate" = x; then
4170          PROG_NAME=date
4171        else
4172          PROG_NAME=date
4173        fi
4174        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4175$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4176        as_fn_error $? "Cannot continue" "$LINENO" 5
4177    fi
4178
4179
4180
4181    for ac_prog in gdiff diff
4182do
4183  # Extract the first word of "$ac_prog", so it can be a program name with args.
4184set dummy $ac_prog; ac_word=$2
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4186$as_echo_n "checking for $ac_word... " >&6; }
4187if test "${ac_cv_path_DIFF+set}" = set; then :
4188  $as_echo_n "(cached) " >&6
4189else
4190  case $DIFF in
4191  [\\/]* | ?:[\\/]*)
4192  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4193  ;;
4194  *)
4195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4196for as_dir in $PATH
4197do
4198  IFS=$as_save_IFS
4199  test -z "$as_dir" && as_dir=.
4200    for ac_exec_ext in '' $ac_executable_extensions; do
4201  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4202    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4204    break 2
4205  fi
4206done
4207  done
4208IFS=$as_save_IFS
4209
4210  ;;
4211esac
4212fi
4213DIFF=$ac_cv_path_DIFF
4214if test -n "$DIFF"; then
4215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4216$as_echo "$DIFF" >&6; }
4217else
4218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4219$as_echo "no" >&6; }
4220fi
4221
4222
4223  test -n "$DIFF" && break
4224done
4225
4226
4227    if test "x$DIFF" = x; then
4228        if test "xgdiff diff" = x; then
4229          PROG_NAME=diff
4230        else
4231          PROG_NAME=gdiff diff
4232        fi
4233        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4234$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4235        as_fn_error $? "Cannot continue" "$LINENO" 5
4236    fi
4237
4238
4239
4240    for ac_prog in dirname
4241do
4242  # Extract the first word of "$ac_prog", so it can be a program name with args.
4243set dummy $ac_prog; ac_word=$2
4244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4245$as_echo_n "checking for $ac_word... " >&6; }
4246if test "${ac_cv_path_DIRNAME+set}" = set; then :
4247  $as_echo_n "(cached) " >&6
4248else
4249  case $DIRNAME in
4250  [\\/]* | ?:[\\/]*)
4251  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4252  ;;
4253  *)
4254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255for as_dir in $PATH
4256do
4257  IFS=$as_save_IFS
4258  test -z "$as_dir" && as_dir=.
4259    for ac_exec_ext in '' $ac_executable_extensions; do
4260  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4261    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4263    break 2
4264  fi
4265done
4266  done
4267IFS=$as_save_IFS
4268
4269  ;;
4270esac
4271fi
4272DIRNAME=$ac_cv_path_DIRNAME
4273if test -n "$DIRNAME"; then
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4275$as_echo "$DIRNAME" >&6; }
4276else
4277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4278$as_echo "no" >&6; }
4279fi
4280
4281
4282  test -n "$DIRNAME" && break
4283done
4284
4285
4286    if test "x$DIRNAME" = x; then
4287        if test "xdirname" = x; then
4288          PROG_NAME=dirname
4289        else
4290          PROG_NAME=dirname
4291        fi
4292        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4293$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4294        as_fn_error $? "Cannot continue" "$LINENO" 5
4295    fi
4296
4297
4298
4299    for ac_prog in echo
4300do
4301  # Extract the first word of "$ac_prog", so it can be a program name with args.
4302set dummy $ac_prog; ac_word=$2
4303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4304$as_echo_n "checking for $ac_word... " >&6; }
4305if test "${ac_cv_path_ECHO+set}" = set; then :
4306  $as_echo_n "(cached) " >&6
4307else
4308  case $ECHO in
4309  [\\/]* | ?:[\\/]*)
4310  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4311  ;;
4312  *)
4313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4314for as_dir in $PATH
4315do
4316  IFS=$as_save_IFS
4317  test -z "$as_dir" && as_dir=.
4318    for ac_exec_ext in '' $ac_executable_extensions; do
4319  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4320    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4322    break 2
4323  fi
4324done
4325  done
4326IFS=$as_save_IFS
4327
4328  ;;
4329esac
4330fi
4331ECHO=$ac_cv_path_ECHO
4332if test -n "$ECHO"; then
4333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4334$as_echo "$ECHO" >&6; }
4335else
4336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4337$as_echo "no" >&6; }
4338fi
4339
4340
4341  test -n "$ECHO" && break
4342done
4343
4344
4345    if test "x$ECHO" = x; then
4346        if test "xecho" = x; then
4347          PROG_NAME=echo
4348        else
4349          PROG_NAME=echo
4350        fi
4351        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4352$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4353        as_fn_error $? "Cannot continue" "$LINENO" 5
4354    fi
4355
4356
4357
4358    for ac_prog in expr
4359do
4360  # Extract the first word of "$ac_prog", so it can be a program name with args.
4361set dummy $ac_prog; ac_word=$2
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4363$as_echo_n "checking for $ac_word... " >&6; }
4364if test "${ac_cv_path_EXPR+set}" = set; then :
4365  $as_echo_n "(cached) " >&6
4366else
4367  case $EXPR in
4368  [\\/]* | ?:[\\/]*)
4369  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4370  ;;
4371  *)
4372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4373for as_dir in $PATH
4374do
4375  IFS=$as_save_IFS
4376  test -z "$as_dir" && as_dir=.
4377    for ac_exec_ext in '' $ac_executable_extensions; do
4378  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4379    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4381    break 2
4382  fi
4383done
4384  done
4385IFS=$as_save_IFS
4386
4387  ;;
4388esac
4389fi
4390EXPR=$ac_cv_path_EXPR
4391if test -n "$EXPR"; then
4392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4393$as_echo "$EXPR" >&6; }
4394else
4395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4396$as_echo "no" >&6; }
4397fi
4398
4399
4400  test -n "$EXPR" && break
4401done
4402
4403
4404    if test "x$EXPR" = x; then
4405        if test "xexpr" = x; then
4406          PROG_NAME=expr
4407        else
4408          PROG_NAME=expr
4409        fi
4410        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4411$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4412        as_fn_error $? "Cannot continue" "$LINENO" 5
4413    fi
4414
4415
4416
4417    for ac_prog in file
4418do
4419  # Extract the first word of "$ac_prog", so it can be a program name with args.
4420set dummy $ac_prog; ac_word=$2
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4422$as_echo_n "checking for $ac_word... " >&6; }
4423if test "${ac_cv_path_FILE+set}" = set; then :
4424  $as_echo_n "(cached) " >&6
4425else
4426  case $FILE in
4427  [\\/]* | ?:[\\/]*)
4428  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4429  ;;
4430  *)
4431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4432for as_dir in $PATH
4433do
4434  IFS=$as_save_IFS
4435  test -z "$as_dir" && as_dir=.
4436    for ac_exec_ext in '' $ac_executable_extensions; do
4437  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4438    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4440    break 2
4441  fi
4442done
4443  done
4444IFS=$as_save_IFS
4445
4446  ;;
4447esac
4448fi
4449FILE=$ac_cv_path_FILE
4450if test -n "$FILE"; then
4451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4452$as_echo "$FILE" >&6; }
4453else
4454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4455$as_echo "no" >&6; }
4456fi
4457
4458
4459  test -n "$FILE" && break
4460done
4461
4462
4463    if test "x$FILE" = x; then
4464        if test "xfile" = x; then
4465          PROG_NAME=file
4466        else
4467          PROG_NAME=file
4468        fi
4469        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4470$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4471        as_fn_error $? "Cannot continue" "$LINENO" 5
4472    fi
4473
4474
4475
4476    for ac_prog in find
4477do
4478  # Extract the first word of "$ac_prog", so it can be a program name with args.
4479set dummy $ac_prog; ac_word=$2
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4481$as_echo_n "checking for $ac_word... " >&6; }
4482if test "${ac_cv_path_FIND+set}" = set; then :
4483  $as_echo_n "(cached) " >&6
4484else
4485  case $FIND in
4486  [\\/]* | ?:[\\/]*)
4487  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4488  ;;
4489  *)
4490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in $PATH
4492do
4493  IFS=$as_save_IFS
4494  test -z "$as_dir" && as_dir=.
4495    for ac_exec_ext in '' $ac_executable_extensions; do
4496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4497    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4499    break 2
4500  fi
4501done
4502  done
4503IFS=$as_save_IFS
4504
4505  ;;
4506esac
4507fi
4508FIND=$ac_cv_path_FIND
4509if test -n "$FIND"; then
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4511$as_echo "$FIND" >&6; }
4512else
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514$as_echo "no" >&6; }
4515fi
4516
4517
4518  test -n "$FIND" && break
4519done
4520
4521
4522    if test "x$FIND" = x; then
4523        if test "xfind" = x; then
4524          PROG_NAME=find
4525        else
4526          PROG_NAME=find
4527        fi
4528        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4529$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4530        as_fn_error $? "Cannot continue" "$LINENO" 5
4531    fi
4532
4533
4534
4535    for ac_prog in head
4536do
4537  # Extract the first word of "$ac_prog", so it can be a program name with args.
4538set dummy $ac_prog; ac_word=$2
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540$as_echo_n "checking for $ac_word... " >&6; }
4541if test "${ac_cv_path_HEAD+set}" = set; then :
4542  $as_echo_n "(cached) " >&6
4543else
4544  case $HEAD in
4545  [\\/]* | ?:[\\/]*)
4546  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4547  ;;
4548  *)
4549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in $PATH
4551do
4552  IFS=$as_save_IFS
4553  test -z "$as_dir" && as_dir=.
4554    for ac_exec_ext in '' $ac_executable_extensions; do
4555  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4556    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4558    break 2
4559  fi
4560done
4561  done
4562IFS=$as_save_IFS
4563
4564  ;;
4565esac
4566fi
4567HEAD=$ac_cv_path_HEAD
4568if test -n "$HEAD"; then
4569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4570$as_echo "$HEAD" >&6; }
4571else
4572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
4574fi
4575
4576
4577  test -n "$HEAD" && break
4578done
4579
4580
4581    if test "x$HEAD" = x; then
4582        if test "xhead" = x; then
4583          PROG_NAME=head
4584        else
4585          PROG_NAME=head
4586        fi
4587        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4588$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4589        as_fn_error $? "Cannot continue" "$LINENO" 5
4590    fi
4591
4592
4593
4594    for ac_prog in ln
4595do
4596  # Extract the first word of "$ac_prog", so it can be a program name with args.
4597set dummy $ac_prog; ac_word=$2
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4599$as_echo_n "checking for $ac_word... " >&6; }
4600if test "${ac_cv_path_LN+set}" = set; then :
4601  $as_echo_n "(cached) " >&6
4602else
4603  case $LN in
4604  [\\/]* | ?:[\\/]*)
4605  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4606  ;;
4607  *)
4608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH
4610do
4611  IFS=$as_save_IFS
4612  test -z "$as_dir" && as_dir=.
4613    for ac_exec_ext in '' $ac_executable_extensions; do
4614  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4615    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4617    break 2
4618  fi
4619done
4620  done
4621IFS=$as_save_IFS
4622
4623  ;;
4624esac
4625fi
4626LN=$ac_cv_path_LN
4627if test -n "$LN"; then
4628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4629$as_echo "$LN" >&6; }
4630else
4631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4632$as_echo "no" >&6; }
4633fi
4634
4635
4636  test -n "$LN" && break
4637done
4638
4639
4640    if test "x$LN" = x; then
4641        if test "xln" = x; then
4642          PROG_NAME=ln
4643        else
4644          PROG_NAME=ln
4645        fi
4646        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4647$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4648        as_fn_error $? "Cannot continue" "$LINENO" 5
4649    fi
4650
4651
4652
4653    for ac_prog in ls
4654do
4655  # Extract the first word of "$ac_prog", so it can be a program name with args.
4656set dummy $ac_prog; ac_word=$2
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4658$as_echo_n "checking for $ac_word... " >&6; }
4659if test "${ac_cv_path_LS+set}" = set; then :
4660  $as_echo_n "(cached) " >&6
4661else
4662  case $LS in
4663  [\\/]* | ?:[\\/]*)
4664  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4665  ;;
4666  *)
4667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668for as_dir in $PATH
4669do
4670  IFS=$as_save_IFS
4671  test -z "$as_dir" && as_dir=.
4672    for ac_exec_ext in '' $ac_executable_extensions; do
4673  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4674    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4676    break 2
4677  fi
4678done
4679  done
4680IFS=$as_save_IFS
4681
4682  ;;
4683esac
4684fi
4685LS=$ac_cv_path_LS
4686if test -n "$LS"; then
4687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4688$as_echo "$LS" >&6; }
4689else
4690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4691$as_echo "no" >&6; }
4692fi
4693
4694
4695  test -n "$LS" && break
4696done
4697
4698
4699    if test "x$LS" = x; then
4700        if test "xls" = x; then
4701          PROG_NAME=ls
4702        else
4703          PROG_NAME=ls
4704        fi
4705        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4706$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4707        as_fn_error $? "Cannot continue" "$LINENO" 5
4708    fi
4709
4710
4711
4712    for ac_prog in mkdir
4713do
4714  # Extract the first word of "$ac_prog", so it can be a program name with args.
4715set dummy $ac_prog; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
4718if test "${ac_cv_path_MKDIR+set}" = set; then :
4719  $as_echo_n "(cached) " >&6
4720else
4721  case $MKDIR in
4722  [\\/]* | ?:[\\/]*)
4723  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4724  ;;
4725  *)
4726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in $PATH
4728do
4729  IFS=$as_save_IFS
4730  test -z "$as_dir" && as_dir=.
4731    for ac_exec_ext in '' $ac_executable_extensions; do
4732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4733    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4735    break 2
4736  fi
4737done
4738  done
4739IFS=$as_save_IFS
4740
4741  ;;
4742esac
4743fi
4744MKDIR=$ac_cv_path_MKDIR
4745if test -n "$MKDIR"; then
4746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4747$as_echo "$MKDIR" >&6; }
4748else
4749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
4751fi
4752
4753
4754  test -n "$MKDIR" && break
4755done
4756
4757
4758    if test "x$MKDIR" = x; then
4759        if test "xmkdir" = x; then
4760          PROG_NAME=mkdir
4761        else
4762          PROG_NAME=mkdir
4763        fi
4764        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4765$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4766        as_fn_error $? "Cannot continue" "$LINENO" 5
4767    fi
4768
4769
4770
4771    for ac_prog in mktemp
4772do
4773  # Extract the first word of "$ac_prog", so it can be a program name with args.
4774set dummy $ac_prog; ac_word=$2
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
4777if test "${ac_cv_path_MKTEMP+set}" = set; then :
4778  $as_echo_n "(cached) " >&6
4779else
4780  case $MKTEMP in
4781  [\\/]* | ?:[\\/]*)
4782  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4783  ;;
4784  *)
4785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in $PATH
4787do
4788  IFS=$as_save_IFS
4789  test -z "$as_dir" && as_dir=.
4790    for ac_exec_ext in '' $ac_executable_extensions; do
4791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4792    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4794    break 2
4795  fi
4796done
4797  done
4798IFS=$as_save_IFS
4799
4800  ;;
4801esac
4802fi
4803MKTEMP=$ac_cv_path_MKTEMP
4804if test -n "$MKTEMP"; then
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4806$as_echo "$MKTEMP" >&6; }
4807else
4808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809$as_echo "no" >&6; }
4810fi
4811
4812
4813  test -n "$MKTEMP" && break
4814done
4815
4816
4817    if test "x$MKTEMP" = x; then
4818        if test "xmktemp" = x; then
4819          PROG_NAME=mktemp
4820        else
4821          PROG_NAME=mktemp
4822        fi
4823        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4824$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4825        as_fn_error $? "Cannot continue" "$LINENO" 5
4826    fi
4827
4828
4829
4830    for ac_prog in mv
4831do
4832  # Extract the first word of "$ac_prog", so it can be a program name with args.
4833set dummy $ac_prog; ac_word=$2
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
4836if test "${ac_cv_path_MV+set}" = set; then :
4837  $as_echo_n "(cached) " >&6
4838else
4839  case $MV in
4840  [\\/]* | ?:[\\/]*)
4841  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4842  ;;
4843  *)
4844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in $PATH
4846do
4847  IFS=$as_save_IFS
4848  test -z "$as_dir" && as_dir=.
4849    for ac_exec_ext in '' $ac_executable_extensions; do
4850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4851    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4853    break 2
4854  fi
4855done
4856  done
4857IFS=$as_save_IFS
4858
4859  ;;
4860esac
4861fi
4862MV=$ac_cv_path_MV
4863if test -n "$MV"; then
4864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4865$as_echo "$MV" >&6; }
4866else
4867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
4869fi
4870
4871
4872  test -n "$MV" && break
4873done
4874
4875
4876    if test "x$MV" = x; then
4877        if test "xmv" = x; then
4878          PROG_NAME=mv
4879        else
4880          PROG_NAME=mv
4881        fi
4882        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4883$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4884        as_fn_error $? "Cannot continue" "$LINENO" 5
4885    fi
4886
4887
4888
4889    for ac_prog in printf
4890do
4891  # Extract the first word of "$ac_prog", so it can be a program name with args.
4892set dummy $ac_prog; ac_word=$2
4893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4894$as_echo_n "checking for $ac_word... " >&6; }
4895if test "${ac_cv_path_PRINTF+set}" = set; then :
4896  $as_echo_n "(cached) " >&6
4897else
4898  case $PRINTF in
4899  [\\/]* | ?:[\\/]*)
4900  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4901  ;;
4902  *)
4903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4904for as_dir in $PATH
4905do
4906  IFS=$as_save_IFS
4907  test -z "$as_dir" && as_dir=.
4908    for ac_exec_ext in '' $ac_executable_extensions; do
4909  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4910    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4912    break 2
4913  fi
4914done
4915  done
4916IFS=$as_save_IFS
4917
4918  ;;
4919esac
4920fi
4921PRINTF=$ac_cv_path_PRINTF
4922if test -n "$PRINTF"; then
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4924$as_echo "$PRINTF" >&6; }
4925else
4926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4927$as_echo "no" >&6; }
4928fi
4929
4930
4931  test -n "$PRINTF" && break
4932done
4933
4934
4935    if test "x$PRINTF" = x; then
4936        if test "xprintf" = x; then
4937          PROG_NAME=printf
4938        else
4939          PROG_NAME=printf
4940        fi
4941        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4942$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4943        as_fn_error $? "Cannot continue" "$LINENO" 5
4944    fi
4945
4946
4947
4948    for ac_prog in pwd
4949do
4950  # Extract the first word of "$ac_prog", so it can be a program name with args.
4951set dummy $ac_prog; ac_word=$2
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953$as_echo_n "checking for $ac_word... " >&6; }
4954if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4955  $as_echo_n "(cached) " >&6
4956else
4957  case $THEPWDCMD in
4958  [\\/]* | ?:[\\/]*)
4959  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4960  ;;
4961  *)
4962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in $PATH
4964do
4965  IFS=$as_save_IFS
4966  test -z "$as_dir" && as_dir=.
4967    for ac_exec_ext in '' $ac_executable_extensions; do
4968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4969    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4971    break 2
4972  fi
4973done
4974  done
4975IFS=$as_save_IFS
4976
4977  ;;
4978esac
4979fi
4980THEPWDCMD=$ac_cv_path_THEPWDCMD
4981if test -n "$THEPWDCMD"; then
4982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4983$as_echo "$THEPWDCMD" >&6; }
4984else
4985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986$as_echo "no" >&6; }
4987fi
4988
4989
4990  test -n "$THEPWDCMD" && break
4991done
4992
4993
4994    if test "x$THEPWDCMD" = x; then
4995        if test "xpwd" = x; then
4996          PROG_NAME=thepwdcmd
4997        else
4998          PROG_NAME=pwd
4999        fi
5000        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5001$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5002        as_fn_error $? "Cannot continue" "$LINENO" 5
5003    fi
5004
5005
5006
5007    for ac_prog in rm
5008do
5009  # Extract the first word of "$ac_prog", so it can be a program name with args.
5010set dummy $ac_prog; ac_word=$2
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
5013if test "${ac_cv_path_RM+set}" = set; then :
5014  $as_echo_n "(cached) " >&6
5015else
5016  case $RM in
5017  [\\/]* | ?:[\\/]*)
5018  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5019  ;;
5020  *)
5021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024  IFS=$as_save_IFS
5025  test -z "$as_dir" && as_dir=.
5026    for ac_exec_ext in '' $ac_executable_extensions; do
5027  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5028    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030    break 2
5031  fi
5032done
5033  done
5034IFS=$as_save_IFS
5035
5036  ;;
5037esac
5038fi
5039RM=$ac_cv_path_RM
5040if test -n "$RM"; then
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5042$as_echo "$RM" >&6; }
5043else
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
5046fi
5047
5048
5049  test -n "$RM" && break
5050done
5051
5052
5053    if test "x$RM" = x; then
5054        if test "xrm" = x; then
5055          PROG_NAME=rm
5056        else
5057          PROG_NAME=rm
5058        fi
5059        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5060$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5061        as_fn_error $? "Cannot continue" "$LINENO" 5
5062    fi
5063
5064
5065
5066    for ac_prog in sh
5067do
5068  # Extract the first word of "$ac_prog", so it can be a program name with args.
5069set dummy $ac_prog; ac_word=$2
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5071$as_echo_n "checking for $ac_word... " >&6; }
5072if test "${ac_cv_path_SH+set}" = set; then :
5073  $as_echo_n "(cached) " >&6
5074else
5075  case $SH in
5076  [\\/]* | ?:[\\/]*)
5077  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5078  ;;
5079  *)
5080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083  IFS=$as_save_IFS
5084  test -z "$as_dir" && as_dir=.
5085    for ac_exec_ext in '' $ac_executable_extensions; do
5086  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5087    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5089    break 2
5090  fi
5091done
5092  done
5093IFS=$as_save_IFS
5094
5095  ;;
5096esac
5097fi
5098SH=$ac_cv_path_SH
5099if test -n "$SH"; then
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5101$as_echo "$SH" >&6; }
5102else
5103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
5105fi
5106
5107
5108  test -n "$SH" && break
5109done
5110
5111
5112    if test "x$SH" = x; then
5113        if test "xsh" = x; then
5114          PROG_NAME=sh
5115        else
5116          PROG_NAME=sh
5117        fi
5118        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5119$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5120        as_fn_error $? "Cannot continue" "$LINENO" 5
5121    fi
5122
5123
5124
5125    for ac_prog in sort
5126do
5127  # Extract the first word of "$ac_prog", so it can be a program name with args.
5128set dummy $ac_prog; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if test "${ac_cv_path_SORT+set}" = set; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  case $SORT in
5135  [\\/]* | ?:[\\/]*)
5136  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5137  ;;
5138  *)
5139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142  IFS=$as_save_IFS
5143  test -z "$as_dir" && as_dir=.
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5146    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154  ;;
5155esac
5156fi
5157SORT=$ac_cv_path_SORT
5158if test -n "$SORT"; then
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5160$as_echo "$SORT" >&6; }
5161else
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167  test -n "$SORT" && break
5168done
5169
5170
5171    if test "x$SORT" = x; then
5172        if test "xsort" = x; then
5173          PROG_NAME=sort
5174        else
5175          PROG_NAME=sort
5176        fi
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5178$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5179        as_fn_error $? "Cannot continue" "$LINENO" 5
5180    fi
5181
5182
5183
5184    for ac_prog in tail
5185do
5186  # Extract the first word of "$ac_prog", so it can be a program name with args.
5187set dummy $ac_prog; ac_word=$2
5188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5189$as_echo_n "checking for $ac_word... " >&6; }
5190if test "${ac_cv_path_TAIL+set}" = set; then :
5191  $as_echo_n "(cached) " >&6
5192else
5193  case $TAIL in
5194  [\\/]* | ?:[\\/]*)
5195  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5196  ;;
5197  *)
5198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201  IFS=$as_save_IFS
5202  test -z "$as_dir" && as_dir=.
5203    for ac_exec_ext in '' $ac_executable_extensions; do
5204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5205    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5207    break 2
5208  fi
5209done
5210  done
5211IFS=$as_save_IFS
5212
5213  ;;
5214esac
5215fi
5216TAIL=$ac_cv_path_TAIL
5217if test -n "$TAIL"; then
5218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5219$as_echo "$TAIL" >&6; }
5220else
5221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5222$as_echo "no" >&6; }
5223fi
5224
5225
5226  test -n "$TAIL" && break
5227done
5228
5229
5230    if test "x$TAIL" = x; then
5231        if test "xtail" = x; then
5232          PROG_NAME=tail
5233        else
5234          PROG_NAME=tail
5235        fi
5236        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5237$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5238        as_fn_error $? "Cannot continue" "$LINENO" 5
5239    fi
5240
5241
5242
5243    for ac_prog in tar
5244do
5245  # Extract the first word of "$ac_prog", so it can be a program name with args.
5246set dummy $ac_prog; ac_word=$2
5247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5248$as_echo_n "checking for $ac_word... " >&6; }
5249if test "${ac_cv_path_TAR+set}" = set; then :
5250  $as_echo_n "(cached) " >&6
5251else
5252  case $TAR in
5253  [\\/]* | ?:[\\/]*)
5254  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5255  ;;
5256  *)
5257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5258for as_dir in $PATH
5259do
5260  IFS=$as_save_IFS
5261  test -z "$as_dir" && as_dir=.
5262    for ac_exec_ext in '' $ac_executable_extensions; do
5263  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5264    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5266    break 2
5267  fi
5268done
5269  done
5270IFS=$as_save_IFS
5271
5272  ;;
5273esac
5274fi
5275TAR=$ac_cv_path_TAR
5276if test -n "$TAR"; then
5277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5278$as_echo "$TAR" >&6; }
5279else
5280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5281$as_echo "no" >&6; }
5282fi
5283
5284
5285  test -n "$TAR" && break
5286done
5287
5288
5289    if test "x$TAR" = x; then
5290        if test "xtar" = x; then
5291          PROG_NAME=tar
5292        else
5293          PROG_NAME=tar
5294        fi
5295        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5296$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5297        as_fn_error $? "Cannot continue" "$LINENO" 5
5298    fi
5299
5300
5301
5302    for ac_prog in tee
5303do
5304  # Extract the first word of "$ac_prog", so it can be a program name with args.
5305set dummy $ac_prog; ac_word=$2
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5307$as_echo_n "checking for $ac_word... " >&6; }
5308if test "${ac_cv_path_TEE+set}" = set; then :
5309  $as_echo_n "(cached) " >&6
5310else
5311  case $TEE in
5312  [\\/]* | ?:[\\/]*)
5313  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5314  ;;
5315  *)
5316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5317for as_dir in $PATH
5318do
5319  IFS=$as_save_IFS
5320  test -z "$as_dir" && as_dir=.
5321    for ac_exec_ext in '' $ac_executable_extensions; do
5322  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5323    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5325    break 2
5326  fi
5327done
5328  done
5329IFS=$as_save_IFS
5330
5331  ;;
5332esac
5333fi
5334TEE=$ac_cv_path_TEE
5335if test -n "$TEE"; then
5336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5337$as_echo "$TEE" >&6; }
5338else
5339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
5341fi
5342
5343
5344  test -n "$TEE" && break
5345done
5346
5347
5348    if test "x$TEE" = x; then
5349        if test "xtee" = x; then
5350          PROG_NAME=tee
5351        else
5352          PROG_NAME=tee
5353        fi
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5355$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5356        as_fn_error $? "Cannot continue" "$LINENO" 5
5357    fi
5358
5359
5360
5361    for ac_prog in touch
5362do
5363  # Extract the first word of "$ac_prog", so it can be a program name with args.
5364set dummy $ac_prog; ac_word=$2
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5366$as_echo_n "checking for $ac_word... " >&6; }
5367if test "${ac_cv_path_TOUCH+set}" = set; then :
5368  $as_echo_n "(cached) " >&6
5369else
5370  case $TOUCH in
5371  [\\/]* | ?:[\\/]*)
5372  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5373  ;;
5374  *)
5375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5376for as_dir in $PATH
5377do
5378  IFS=$as_save_IFS
5379  test -z "$as_dir" && as_dir=.
5380    for ac_exec_ext in '' $ac_executable_extensions; do
5381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5382    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5384    break 2
5385  fi
5386done
5387  done
5388IFS=$as_save_IFS
5389
5390  ;;
5391esac
5392fi
5393TOUCH=$ac_cv_path_TOUCH
5394if test -n "$TOUCH"; then
5395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5396$as_echo "$TOUCH" >&6; }
5397else
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
5400fi
5401
5402
5403  test -n "$TOUCH" && break
5404done
5405
5406
5407    if test "x$TOUCH" = x; then
5408        if test "xtouch" = x; then
5409          PROG_NAME=touch
5410        else
5411          PROG_NAME=touch
5412        fi
5413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5414$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5415        as_fn_error $? "Cannot continue" "$LINENO" 5
5416    fi
5417
5418
5419
5420    for ac_prog in tr
5421do
5422  # Extract the first word of "$ac_prog", so it can be a program name with args.
5423set dummy $ac_prog; ac_word=$2
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425$as_echo_n "checking for $ac_word... " >&6; }
5426if test "${ac_cv_path_TR+set}" = set; then :
5427  $as_echo_n "(cached) " >&6
5428else
5429  case $TR in
5430  [\\/]* | ?:[\\/]*)
5431  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5432  ;;
5433  *)
5434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435for as_dir in $PATH
5436do
5437  IFS=$as_save_IFS
5438  test -z "$as_dir" && as_dir=.
5439    for ac_exec_ext in '' $ac_executable_extensions; do
5440  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5441    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443    break 2
5444  fi
5445done
5446  done
5447IFS=$as_save_IFS
5448
5449  ;;
5450esac
5451fi
5452TR=$ac_cv_path_TR
5453if test -n "$TR"; then
5454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5455$as_echo "$TR" >&6; }
5456else
5457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458$as_echo "no" >&6; }
5459fi
5460
5461
5462  test -n "$TR" && break
5463done
5464
5465
5466    if test "x$TR" = x; then
5467        if test "xtr" = x; then
5468          PROG_NAME=tr
5469        else
5470          PROG_NAME=tr
5471        fi
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5473$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5474        as_fn_error $? "Cannot continue" "$LINENO" 5
5475    fi
5476
5477
5478
5479    for ac_prog in uname
5480do
5481  # Extract the first word of "$ac_prog", so it can be a program name with args.
5482set dummy $ac_prog; ac_word=$2
5483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5484$as_echo_n "checking for $ac_word... " >&6; }
5485if test "${ac_cv_path_UNAME+set}" = set; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488  case $UNAME in
5489  [\\/]* | ?:[\\/]*)
5490  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5491  ;;
5492  *)
5493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5494for as_dir in $PATH
5495do
5496  IFS=$as_save_IFS
5497  test -z "$as_dir" && as_dir=.
5498    for ac_exec_ext in '' $ac_executable_extensions; do
5499  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5500    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502    break 2
5503  fi
5504done
5505  done
5506IFS=$as_save_IFS
5507
5508  ;;
5509esac
5510fi
5511UNAME=$ac_cv_path_UNAME
5512if test -n "$UNAME"; then
5513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5514$as_echo "$UNAME" >&6; }
5515else
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5517$as_echo "no" >&6; }
5518fi
5519
5520
5521  test -n "$UNAME" && break
5522done
5523
5524
5525    if test "x$UNAME" = x; then
5526        if test "xuname" = x; then
5527          PROG_NAME=uname
5528        else
5529          PROG_NAME=uname
5530        fi
5531        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5532$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5533        as_fn_error $? "Cannot continue" "$LINENO" 5
5534    fi
5535
5536
5537
5538    for ac_prog in uniq
5539do
5540  # Extract the first word of "$ac_prog", so it can be a program name with args.
5541set dummy $ac_prog; ac_word=$2
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5543$as_echo_n "checking for $ac_word... " >&6; }
5544if test "${ac_cv_path_UNIQ+set}" = set; then :
5545  $as_echo_n "(cached) " >&6
5546else
5547  case $UNIQ in
5548  [\\/]* | ?:[\\/]*)
5549  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5550  ;;
5551  *)
5552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553for as_dir in $PATH
5554do
5555  IFS=$as_save_IFS
5556  test -z "$as_dir" && as_dir=.
5557    for ac_exec_ext in '' $ac_executable_extensions; do
5558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5559    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5561    break 2
5562  fi
5563done
5564  done
5565IFS=$as_save_IFS
5566
5567  ;;
5568esac
5569fi
5570UNIQ=$ac_cv_path_UNIQ
5571if test -n "$UNIQ"; then
5572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5573$as_echo "$UNIQ" >&6; }
5574else
5575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576$as_echo "no" >&6; }
5577fi
5578
5579
5580  test -n "$UNIQ" && break
5581done
5582
5583
5584    if test "x$UNIQ" = x; then
5585        if test "xuniq" = x; then
5586          PROG_NAME=uniq
5587        else
5588          PROG_NAME=uniq
5589        fi
5590        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5591$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5592        as_fn_error $? "Cannot continue" "$LINENO" 5
5593    fi
5594
5595
5596
5597    for ac_prog in wc
5598do
5599  # Extract the first word of "$ac_prog", so it can be a program name with args.
5600set dummy $ac_prog; ac_word=$2
5601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5602$as_echo_n "checking for $ac_word... " >&6; }
5603if test "${ac_cv_path_WC+set}" = set; then :
5604  $as_echo_n "(cached) " >&6
5605else
5606  case $WC in
5607  [\\/]* | ?:[\\/]*)
5608  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5609  ;;
5610  *)
5611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5612for as_dir in $PATH
5613do
5614  IFS=$as_save_IFS
5615  test -z "$as_dir" && as_dir=.
5616    for ac_exec_ext in '' $ac_executable_extensions; do
5617  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5618    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5620    break 2
5621  fi
5622done
5623  done
5624IFS=$as_save_IFS
5625
5626  ;;
5627esac
5628fi
5629WC=$ac_cv_path_WC
5630if test -n "$WC"; then
5631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5632$as_echo "$WC" >&6; }
5633else
5634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5635$as_echo "no" >&6; }
5636fi
5637
5638
5639  test -n "$WC" && break
5640done
5641
5642
5643    if test "x$WC" = x; then
5644        if test "xwc" = x; then
5645          PROG_NAME=wc
5646        else
5647          PROG_NAME=wc
5648        fi
5649        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5650$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5651        as_fn_error $? "Cannot continue" "$LINENO" 5
5652    fi
5653
5654
5655
5656    for ac_prog in which
5657do
5658  # Extract the first word of "$ac_prog", so it can be a program name with args.
5659set dummy $ac_prog; ac_word=$2
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661$as_echo_n "checking for $ac_word... " >&6; }
5662if test "${ac_cv_path_WHICH+set}" = set; then :
5663  $as_echo_n "(cached) " >&6
5664else
5665  case $WHICH in
5666  [\\/]* | ?:[\\/]*)
5667  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5668  ;;
5669  *)
5670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5671for as_dir in $PATH
5672do
5673  IFS=$as_save_IFS
5674  test -z "$as_dir" && as_dir=.
5675    for ac_exec_ext in '' $ac_executable_extensions; do
5676  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5677    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5679    break 2
5680  fi
5681done
5682  done
5683IFS=$as_save_IFS
5684
5685  ;;
5686esac
5687fi
5688WHICH=$ac_cv_path_WHICH
5689if test -n "$WHICH"; then
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5691$as_echo "$WHICH" >&6; }
5692else
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
5695fi
5696
5697
5698  test -n "$WHICH" && break
5699done
5700
5701
5702    if test "x$WHICH" = x; then
5703        if test "xwhich" = x; then
5704          PROG_NAME=which
5705        else
5706          PROG_NAME=which
5707        fi
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5709$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5710        as_fn_error $? "Cannot continue" "$LINENO" 5
5711    fi
5712
5713
5714
5715    for ac_prog in xargs
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if test "${ac_cv_path_XARGS+set}" = set; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $XARGS in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5736    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747XARGS=$ac_cv_path_XARGS
5748if test -n "$XARGS"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5750$as_echo "$XARGS" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$XARGS" && break
5758done
5759
5760
5761    if test "x$XARGS" = x; then
5762        if test "xxargs" = x; then
5763          PROG_NAME=xargs
5764        else
5765          PROG_NAME=xargs
5766        fi
5767        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5768$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5769        as_fn_error $? "Cannot continue" "$LINENO" 5
5770    fi
5771
5772
5773
5774# Then required tools that require some special treatment.
5775for ac_prog in gawk mawk nawk awk
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if test "${ac_cv_prog_AWK+set}" = set; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  if test -n "$AWK"; then
5785  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5786else
5787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5788for as_dir in $PATH
5789do
5790  IFS=$as_save_IFS
5791  test -z "$as_dir" && as_dir=.
5792    for ac_exec_ext in '' $ac_executable_extensions; do
5793  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5794    ac_cv_prog_AWK="$ac_prog"
5795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5796    break 2
5797  fi
5798done
5799  done
5800IFS=$as_save_IFS
5801
5802fi
5803fi
5804AWK=$ac_cv_prog_AWK
5805if test -n "$AWK"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5807$as_echo "$AWK" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814  test -n "$AWK" && break
5815done
5816
5817
5818    if test "x$AWK" = x; then
5819        if test "x" = x; then
5820          PROG_NAME=awk
5821        else
5822          PROG_NAME=
5823        fi
5824        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5825$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5826        as_fn_error $? "Cannot continue" "$LINENO" 5
5827    fi
5828
5829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5830$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5831if test "${ac_cv_path_GREP+set}" = set; then :
5832  $as_echo_n "(cached) " >&6
5833else
5834  if test -z "$GREP"; then
5835  ac_path_GREP_found=false
5836  # Loop through the user's path and test for each of PROGNAME-LIST
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_prog in grep ggrep; do
5843    for ac_exec_ext in '' $ac_executable_extensions; do
5844      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5845      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5846# Check for GNU ac_path_GREP and select it if it is found.
5847  # Check for GNU $ac_path_GREP
5848case `"$ac_path_GREP" --version 2>&1` in
5849*GNU*)
5850  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5851*)
5852  ac_count=0
5853  $as_echo_n 0123456789 >"conftest.in"
5854  while :
5855  do
5856    cat "conftest.in" "conftest.in" >"conftest.tmp"
5857    mv "conftest.tmp" "conftest.in"
5858    cp "conftest.in" "conftest.nl"
5859    $as_echo 'GREP' >> "conftest.nl"
5860    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5861    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5862    as_fn_arith $ac_count + 1 && ac_count=$as_val
5863    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5864      # Best one so far, save it but keep looking for a better one
5865      ac_cv_path_GREP="$ac_path_GREP"
5866      ac_path_GREP_max=$ac_count
5867    fi
5868    # 10*(2^10) chars as input seems more than enough
5869    test $ac_count -gt 10 && break
5870  done
5871  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5872esac
5873
5874      $ac_path_GREP_found && break 3
5875    done
5876  done
5877  done
5878IFS=$as_save_IFS
5879  if test -z "$ac_cv_path_GREP"; then
5880    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5881  fi
5882else
5883  ac_cv_path_GREP=$GREP
5884fi
5885
5886fi
5887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5888$as_echo "$ac_cv_path_GREP" >&6; }
5889 GREP="$ac_cv_path_GREP"
5890
5891
5892
5893    if test "x$GREP" = x; then
5894        if test "x" = x; then
5895          PROG_NAME=grep
5896        else
5897          PROG_NAME=
5898        fi
5899        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5900$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5901        as_fn_error $? "Cannot continue" "$LINENO" 5
5902    fi
5903
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5905$as_echo_n "checking for egrep... " >&6; }
5906if test "${ac_cv_path_EGREP+set}" = set; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5910   then ac_cv_path_EGREP="$GREP -E"
5911   else
5912     if test -z "$EGREP"; then
5913  ac_path_EGREP_found=false
5914  # Loop through the user's path and test for each of PROGNAME-LIST
5915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5917do
5918  IFS=$as_save_IFS
5919  test -z "$as_dir" && as_dir=.
5920    for ac_prog in egrep; do
5921    for ac_exec_ext in '' $ac_executable_extensions; do
5922      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5923      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5924# Check for GNU ac_path_EGREP and select it if it is found.
5925  # Check for GNU $ac_path_EGREP
5926case `"$ac_path_EGREP" --version 2>&1` in
5927*GNU*)
5928  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5929*)
5930  ac_count=0
5931  $as_echo_n 0123456789 >"conftest.in"
5932  while :
5933  do
5934    cat "conftest.in" "conftest.in" >"conftest.tmp"
5935    mv "conftest.tmp" "conftest.in"
5936    cp "conftest.in" "conftest.nl"
5937    $as_echo 'EGREP' >> "conftest.nl"
5938    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5939    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5940    as_fn_arith $ac_count + 1 && ac_count=$as_val
5941    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5942      # Best one so far, save it but keep looking for a better one
5943      ac_cv_path_EGREP="$ac_path_EGREP"
5944      ac_path_EGREP_max=$ac_count
5945    fi
5946    # 10*(2^10) chars as input seems more than enough
5947    test $ac_count -gt 10 && break
5948  done
5949  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5950esac
5951
5952      $ac_path_EGREP_found && break 3
5953    done
5954  done
5955  done
5956IFS=$as_save_IFS
5957  if test -z "$ac_cv_path_EGREP"; then
5958    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5959  fi
5960else
5961  ac_cv_path_EGREP=$EGREP
5962fi
5963
5964   fi
5965fi
5966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5967$as_echo "$ac_cv_path_EGREP" >&6; }
5968 EGREP="$ac_cv_path_EGREP"
5969
5970
5971
5972    if test "x$EGREP" = x; then
5973        if test "x" = x; then
5974          PROG_NAME=egrep
5975        else
5976          PROG_NAME=
5977        fi
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5979$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5980        as_fn_error $? "Cannot continue" "$LINENO" 5
5981    fi
5982
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5984$as_echo_n "checking for fgrep... " >&6; }
5985if test "${ac_cv_path_FGREP+set}" = set; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5989   then ac_cv_path_FGREP="$GREP -F"
5990   else
5991     if test -z "$FGREP"; then
5992  ac_path_FGREP_found=false
5993  # Loop through the user's path and test for each of PROGNAME-LIST
5994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5996do
5997  IFS=$as_save_IFS
5998  test -z "$as_dir" && as_dir=.
5999    for ac_prog in fgrep; do
6000    for ac_exec_ext in '' $ac_executable_extensions; do
6001      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6002      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6003# Check for GNU ac_path_FGREP and select it if it is found.
6004  # Check for GNU $ac_path_FGREP
6005case `"$ac_path_FGREP" --version 2>&1` in
6006*GNU*)
6007  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6008*)
6009  ac_count=0
6010  $as_echo_n 0123456789 >"conftest.in"
6011  while :
6012  do
6013    cat "conftest.in" "conftest.in" >"conftest.tmp"
6014    mv "conftest.tmp" "conftest.in"
6015    cp "conftest.in" "conftest.nl"
6016    $as_echo 'FGREP' >> "conftest.nl"
6017    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6018    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6019    as_fn_arith $ac_count + 1 && ac_count=$as_val
6020    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6021      # Best one so far, save it but keep looking for a better one
6022      ac_cv_path_FGREP="$ac_path_FGREP"
6023      ac_path_FGREP_max=$ac_count
6024    fi
6025    # 10*(2^10) chars as input seems more than enough
6026    test $ac_count -gt 10 && break
6027  done
6028  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6029esac
6030
6031      $ac_path_FGREP_found && break 3
6032    done
6033  done
6034  done
6035IFS=$as_save_IFS
6036  if test -z "$ac_cv_path_FGREP"; then
6037    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6038  fi
6039else
6040  ac_cv_path_FGREP=$FGREP
6041fi
6042
6043   fi
6044fi
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6046$as_echo "$ac_cv_path_FGREP" >&6; }
6047 FGREP="$ac_cv_path_FGREP"
6048
6049
6050
6051    if test "x$FGREP" = x; then
6052        if test "x" = x; then
6053          PROG_NAME=fgrep
6054        else
6055          PROG_NAME=
6056        fi
6057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6059        as_fn_error $? "Cannot continue" "$LINENO" 5
6060    fi
6061
6062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6063$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6064if test "${ac_cv_path_SED+set}" = set; then :
6065  $as_echo_n "(cached) " >&6
6066else
6067            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6068     for ac_i in 1 2 3 4 5 6 7; do
6069       ac_script="$ac_script$as_nl$ac_script"
6070     done
6071     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6072     { ac_script=; unset ac_script;}
6073     if test -z "$SED"; then
6074  ac_path_SED_found=false
6075  # Loop through the user's path and test for each of PROGNAME-LIST
6076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077for as_dir in $PATH
6078do
6079  IFS=$as_save_IFS
6080  test -z "$as_dir" && as_dir=.
6081    for ac_prog in sed gsed; do
6082    for ac_exec_ext in '' $ac_executable_extensions; do
6083      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6084      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6085# Check for GNU ac_path_SED and select it if it is found.
6086  # Check for GNU $ac_path_SED
6087case `"$ac_path_SED" --version 2>&1` in
6088*GNU*)
6089  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6090*)
6091  ac_count=0
6092  $as_echo_n 0123456789 >"conftest.in"
6093  while :
6094  do
6095    cat "conftest.in" "conftest.in" >"conftest.tmp"
6096    mv "conftest.tmp" "conftest.in"
6097    cp "conftest.in" "conftest.nl"
6098    $as_echo '' >> "conftest.nl"
6099    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6100    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6101    as_fn_arith $ac_count + 1 && ac_count=$as_val
6102    if test $ac_count -gt ${ac_path_SED_max-0}; then
6103      # Best one so far, save it but keep looking for a better one
6104      ac_cv_path_SED="$ac_path_SED"
6105      ac_path_SED_max=$ac_count
6106    fi
6107    # 10*(2^10) chars as input seems more than enough
6108    test $ac_count -gt 10 && break
6109  done
6110  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6111esac
6112
6113      $ac_path_SED_found && break 3
6114    done
6115  done
6116  done
6117IFS=$as_save_IFS
6118  if test -z "$ac_cv_path_SED"; then
6119    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6120  fi
6121else
6122  ac_cv_path_SED=$SED
6123fi
6124
6125fi
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6127$as_echo "$ac_cv_path_SED" >&6; }
6128 SED="$ac_cv_path_SED"
6129  rm -f conftest.sed
6130
6131
6132    if test "x$SED" = x; then
6133        if test "x" = x; then
6134          PROG_NAME=sed
6135        else
6136          PROG_NAME=
6137        fi
6138        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6139$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6140        as_fn_error $? "Cannot continue" "$LINENO" 5
6141    fi
6142
6143
6144for ac_prog in nawk gawk awk
6145do
6146  # Extract the first word of "$ac_prog", so it can be a program name with args.
6147set dummy $ac_prog; ac_word=$2
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6149$as_echo_n "checking for $ac_word... " >&6; }
6150if test "${ac_cv_path_NAWK+set}" = set; then :
6151  $as_echo_n "(cached) " >&6
6152else
6153  case $NAWK in
6154  [\\/]* | ?:[\\/]*)
6155  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6156  ;;
6157  *)
6158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH
6160do
6161  IFS=$as_save_IFS
6162  test -z "$as_dir" && as_dir=.
6163    for ac_exec_ext in '' $ac_executable_extensions; do
6164  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6165    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6167    break 2
6168  fi
6169done
6170  done
6171IFS=$as_save_IFS
6172
6173  ;;
6174esac
6175fi
6176NAWK=$ac_cv_path_NAWK
6177if test -n "$NAWK"; then
6178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6179$as_echo "$NAWK" >&6; }
6180else
6181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6182$as_echo "no" >&6; }
6183fi
6184
6185
6186  test -n "$NAWK" && break
6187done
6188
6189
6190    if test "x$NAWK" = x; then
6191        if test "x" = x; then
6192          PROG_NAME=nawk
6193        else
6194          PROG_NAME=
6195        fi
6196        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6197$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6198        as_fn_error $? "Cannot continue" "$LINENO" 5
6199    fi
6200
6201
6202# Always force rm.
6203RM="$RM -f"
6204
6205# These are not required on all platforms
6206# Extract the first word of "cygpath", so it can be a program name with args.
6207set dummy cygpath; ac_word=$2
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6209$as_echo_n "checking for $ac_word... " >&6; }
6210if test "${ac_cv_path_CYGPATH+set}" = set; then :
6211  $as_echo_n "(cached) " >&6
6212else
6213  case $CYGPATH in
6214  [\\/]* | ?:[\\/]*)
6215  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6216  ;;
6217  *)
6218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH
6220do
6221  IFS=$as_save_IFS
6222  test -z "$as_dir" && as_dir=.
6223    for ac_exec_ext in '' $ac_executable_extensions; do
6224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6225    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6227    break 2
6228  fi
6229done
6230  done
6231IFS=$as_save_IFS
6232
6233  ;;
6234esac
6235fi
6236CYGPATH=$ac_cv_path_CYGPATH
6237if test -n "$CYGPATH"; then
6238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6239$as_echo "$CYGPATH" >&6; }
6240else
6241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
6243fi
6244
6245
6246# Extract the first word of "readlink", so it can be a program name with args.
6247set dummy readlink; ac_word=$2
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6249$as_echo_n "checking for $ac_word... " >&6; }
6250if test "${ac_cv_path_READLINK+set}" = set; then :
6251  $as_echo_n "(cached) " >&6
6252else
6253  case $READLINK in
6254  [\\/]* | ?:[\\/]*)
6255  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6256  ;;
6257  *)
6258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259for as_dir in $PATH
6260do
6261  IFS=$as_save_IFS
6262  test -z "$as_dir" && as_dir=.
6263    for ac_exec_ext in '' $ac_executable_extensions; do
6264  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6265    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6267    break 2
6268  fi
6269done
6270  done
6271IFS=$as_save_IFS
6272
6273  ;;
6274esac
6275fi
6276READLINK=$ac_cv_path_READLINK
6277if test -n "$READLINK"; then
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6279$as_echo "$READLINK" >&6; }
6280else
6281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6282$as_echo "no" >&6; }
6283fi
6284
6285
6286# Extract the first word of "df", so it can be a program name with args.
6287set dummy df; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
6290if test "${ac_cv_path_DF+set}" = set; then :
6291  $as_echo_n "(cached) " >&6
6292else
6293  case $DF in
6294  [\\/]* | ?:[\\/]*)
6295  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6296  ;;
6297  *)
6298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299for as_dir in $PATH
6300do
6301  IFS=$as_save_IFS
6302  test -z "$as_dir" && as_dir=.
6303    for ac_exec_ext in '' $ac_executable_extensions; do
6304  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6305    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307    break 2
6308  fi
6309done
6310  done
6311IFS=$as_save_IFS
6312
6313  ;;
6314esac
6315fi
6316DF=$ac_cv_path_DF
6317if test -n "$DF"; then
6318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6319$as_echo "$DF" >&6; }
6320else
6321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6322$as_echo "no" >&6; }
6323fi
6324
6325
6326# Extract the first word of "SetFile", so it can be a program name with args.
6327set dummy SetFile; ac_word=$2
6328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6329$as_echo_n "checking for $ac_word... " >&6; }
6330if test "${ac_cv_path_SETFILE+set}" = set; then :
6331  $as_echo_n "(cached) " >&6
6332else
6333  case $SETFILE in
6334  [\\/]* | ?:[\\/]*)
6335  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6336  ;;
6337  *)
6338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339for as_dir in $PATH
6340do
6341  IFS=$as_save_IFS
6342  test -z "$as_dir" && as_dir=.
6343    for ac_exec_ext in '' $ac_executable_extensions; do
6344  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6345    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6347    break 2
6348  fi
6349done
6350  done
6351IFS=$as_save_IFS
6352
6353  ;;
6354esac
6355fi
6356SETFILE=$ac_cv_path_SETFILE
6357if test -n "$SETFILE"; then
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6359$as_echo "$SETFILE" >&6; }
6360else
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
6365
6366
6367
6368# Now we can determine OpenJDK build and target platforms. This is required to
6369# have early on.
6370# Make sure we can run config.sub.
6371$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6372  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6373
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6375$as_echo_n "checking build system type... " >&6; }
6376if test "${ac_cv_build+set}" = set; then :
6377  $as_echo_n "(cached) " >&6
6378else
6379  ac_build_alias=$build_alias
6380test "x$ac_build_alias" = x &&
6381  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6382test "x$ac_build_alias" = x &&
6383  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6384ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6385  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6386
6387fi
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6389$as_echo "$ac_cv_build" >&6; }
6390case $ac_cv_build in
6391*-*-*) ;;
6392*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6393esac
6394build=$ac_cv_build
6395ac_save_IFS=$IFS; IFS='-'
6396set x $ac_cv_build
6397shift
6398build_cpu=$1
6399build_vendor=$2
6400shift; shift
6401# Remember, the first character of IFS is used to create $*,
6402# except with old shells:
6403build_os=$*
6404IFS=$ac_save_IFS
6405case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6406
6407
6408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6409$as_echo_n "checking host system type... " >&6; }
6410if test "${ac_cv_host+set}" = set; then :
6411  $as_echo_n "(cached) " >&6
6412else
6413  if test "x$host_alias" = x; then
6414  ac_cv_host=$ac_cv_build
6415else
6416  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6417    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6418fi
6419
6420fi
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6422$as_echo "$ac_cv_host" >&6; }
6423case $ac_cv_host in
6424*-*-*) ;;
6425*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6426esac
6427host=$ac_cv_host
6428ac_save_IFS=$IFS; IFS='-'
6429set x $ac_cv_host
6430shift
6431host_cpu=$1
6432host_vendor=$2
6433shift; shift
6434# Remember, the first character of IFS is used to create $*,
6435# except with old shells:
6436host_os=$*
6437IFS=$ac_save_IFS
6438case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6439
6440
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6442$as_echo_n "checking target system type... " >&6; }
6443if test "${ac_cv_target+set}" = set; then :
6444  $as_echo_n "(cached) " >&6
6445else
6446  if test "x$target_alias" = x; then
6447  ac_cv_target=$ac_cv_host
6448else
6449  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6450    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6451fi
6452
6453fi
6454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6455$as_echo "$ac_cv_target" >&6; }
6456case $ac_cv_target in
6457*-*-*) ;;
6458*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6459esac
6460target=$ac_cv_target
6461ac_save_IFS=$IFS; IFS='-'
6462set x $ac_cv_target
6463shift
6464target_cpu=$1
6465target_vendor=$2
6466shift; shift
6467# Remember, the first character of IFS is used to create $*,
6468# except with old shells:
6469target_os=$*
6470IFS=$ac_save_IFS
6471case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6472
6473
6474# The aliases save the names the user supplied, while $host etc.
6475# will get canonicalized.
6476test -n "$target_alias" &&
6477  test "$program_prefix$program_suffix$program_transform_name" = \
6478    NONENONEs,x,x, &&
6479  program_prefix=${target_alias}-
6480
6481# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6482# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6483# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6484# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6485# to use the configure naming style.
6486
6487
6488
6489
6490
6491    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6492    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6493    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6494    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6495    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6496    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6497
6498
6499
6500    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6501
6502  case "$build_os" in
6503    *linux*)
6504      VAR_OS=linux
6505      VAR_OS_API=posix
6506      VAR_OS_ENV=linux
6507      ;;
6508    *solaris*)
6509      VAR_OS=solaris
6510      VAR_OS_API=posix
6511      VAR_OS_ENV=solaris
6512      ;;
6513    *darwin*)
6514      VAR_OS=macosx
6515      VAR_OS_API=posix
6516      VAR_OS_ENV=macosx
6517      ;;
6518    *bsd*)
6519      VAR_OS=bsd
6520      VAR_OS_API=posix
6521      VAR_OS_ENV=bsd
6522      ;;
6523    *cygwin*)
6524      VAR_OS=windows
6525      VAR_OS_API=winapi
6526      VAR_OS_ENV=windows.cygwin
6527      ;;
6528    *mingw*)
6529      VAR_OS=windows
6530      VAR_OS_API=winapi
6531      VAR_OS_ENV=windows.msys
6532      ;;
6533    *)
6534      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6535      ;;
6536  esac
6537
6538
6539  # First argument is the cpu name from the trip/quad
6540  case "$build_cpu" in
6541    x86_64)
6542      VAR_CPU=x86_64
6543      VAR_CPU_ARCH=x86
6544      VAR_CPU_BITS=64
6545      VAR_CPU_ENDIAN=little
6546      ;;
6547    i?86)
6548      VAR_CPU=x86
6549      VAR_CPU_ARCH=x86
6550      VAR_CPU_BITS=32
6551      VAR_CPU_ENDIAN=little
6552      ;;
6553    arm*)
6554      VAR_CPU=arm
6555      VAR_CPU_ARCH=arm
6556      VAR_CPU_BITS=32
6557      VAR_CPU_ENDIAN=little
6558      ;;
6559    powerpc)
6560      VAR_CPU=ppc
6561      VAR_CPU_ARCH=ppc
6562      VAR_CPU_BITS=32
6563      VAR_CPU_ENDIAN=big
6564       ;;
6565    powerpc64)
6566      VAR_CPU=ppc64
6567      VAR_CPU_ARCH=ppc
6568      VAR_CPU_BITS=64
6569      VAR_CPU_ENDIAN=big
6570       ;;
6571    sparc)
6572      VAR_CPU=sparc
6573      VAR_CPU_ARCH=sparc
6574      VAR_CPU_BITS=32
6575      VAR_CPU_ENDIAN=big
6576       ;;
6577    sparcv9)
6578      VAR_CPU=sparcv9
6579      VAR_CPU_ARCH=sparc
6580      VAR_CPU_BITS=64
6581      VAR_CPU_ENDIAN=big
6582       ;;
6583    *)
6584      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6585      ;;
6586  esac
6587
6588    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6589    OPENJDK_BUILD_OS="$VAR_OS"
6590    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6591    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6592    OPENJDK_BUILD_CPU="$VAR_CPU"
6593    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6594    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6595    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6596
6597
6598
6599
6600
6601
6602
6603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6604$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6606$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6607
6608    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6609
6610  case "$host_os" in
6611    *linux*)
6612      VAR_OS=linux
6613      VAR_OS_API=posix
6614      VAR_OS_ENV=linux
6615      ;;
6616    *solaris*)
6617      VAR_OS=solaris
6618      VAR_OS_API=posix
6619      VAR_OS_ENV=solaris
6620      ;;
6621    *darwin*)
6622      VAR_OS=macosx
6623      VAR_OS_API=posix
6624      VAR_OS_ENV=macosx
6625      ;;
6626    *bsd*)
6627      VAR_OS=bsd
6628      VAR_OS_API=posix
6629      VAR_OS_ENV=bsd
6630      ;;
6631    *cygwin*)
6632      VAR_OS=windows
6633      VAR_OS_API=winapi
6634      VAR_OS_ENV=windows.cygwin
6635      ;;
6636    *mingw*)
6637      VAR_OS=windows
6638      VAR_OS_API=winapi
6639      VAR_OS_ENV=windows.msys
6640      ;;
6641    *)
6642      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6643      ;;
6644  esac
6645
6646
6647  # First argument is the cpu name from the trip/quad
6648  case "$host_cpu" in
6649    x86_64)
6650      VAR_CPU=x86_64
6651      VAR_CPU_ARCH=x86
6652      VAR_CPU_BITS=64
6653      VAR_CPU_ENDIAN=little
6654      ;;
6655    i?86)
6656      VAR_CPU=x86
6657      VAR_CPU_ARCH=x86
6658      VAR_CPU_BITS=32
6659      VAR_CPU_ENDIAN=little
6660      ;;
6661    arm*)
6662      VAR_CPU=arm
6663      VAR_CPU_ARCH=arm
6664      VAR_CPU_BITS=32
6665      VAR_CPU_ENDIAN=little
6666      ;;
6667    powerpc)
6668      VAR_CPU=ppc
6669      VAR_CPU_ARCH=ppc
6670      VAR_CPU_BITS=32
6671      VAR_CPU_ENDIAN=big
6672       ;;
6673    powerpc64)
6674      VAR_CPU=ppc64
6675      VAR_CPU_ARCH=ppc
6676      VAR_CPU_BITS=64
6677      VAR_CPU_ENDIAN=big
6678       ;;
6679    sparc)
6680      VAR_CPU=sparc
6681      VAR_CPU_ARCH=sparc
6682      VAR_CPU_BITS=32
6683      VAR_CPU_ENDIAN=big
6684       ;;
6685    sparcv9)
6686      VAR_CPU=sparcv9
6687      VAR_CPU_ARCH=sparc
6688      VAR_CPU_BITS=64
6689      VAR_CPU_ENDIAN=big
6690       ;;
6691    *)
6692      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6693      ;;
6694  esac
6695
6696    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6697    OPENJDK_TARGET_OS="$VAR_OS"
6698    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6699    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6700    OPENJDK_TARGET_CPU="$VAR_CPU"
6701    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6702    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6703    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6704
6705
6706
6707
6708
6709
6710
6711    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6712$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6714$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6715
6716
6717
6718# Check whether --with-target-bits was given.
6719if test "${with_target_bits+set}" = set; then :
6720  withval=$with_target_bits;
6721fi
6722
6723
6724  # We have three types of compiles:
6725  # native  == normal compilation, target system == build system
6726  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6727  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6728  #
6729  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6730    # We're doing a proper cross-compilation
6731    COMPILE_TYPE="cross"
6732  else
6733    COMPILE_TYPE="native"
6734  fi
6735
6736  if test "x$with_target_bits" != x; then
6737    if test "x$COMPILE_TYPE" = "xcross"; then
6738      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6739    fi
6740
6741    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6742      # A reduced build is requested
6743      COMPILE_TYPE="reduced"
6744      OPENJDK_TARGET_CPU_BITS=32
6745      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6746        OPENJDK_TARGET_CPU=x86
6747      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6748        OPENJDK_TARGET_CPU=sparc
6749      else
6750        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6751      fi
6752    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6753      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
6754    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6755      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6756$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6757    else
6758      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6759    fi
6760  fi
6761
6762
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6764$as_echo_n "checking compilation type... " >&6; }
6765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6766$as_echo "$COMPILE_TYPE" >&6; }
6767
6768
6769    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6770       REQUIRED_OS_NAME=SunOS
6771       REQUIRED_OS_VERSION=5.10
6772    fi
6773    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6774       REQUIRED_OS_NAME=Linux
6775       REQUIRED_OS_VERSION=2.6
6776    fi
6777    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6778        REQUIRED_OS_NAME=Windows
6779        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6780            REQUIRED_OS_VERSION=5.2
6781        else
6782            REQUIRED_OS_VERSION=5.1
6783        fi
6784    fi
6785    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6786        REQUIRED_OS_NAME=Darwin
6787        REQUIRED_OS_VERSION=11.2
6788    fi
6789
6790
6791
6792
6793
6794    # Also store the legacy naming of the cpu.
6795    # Ie i586 and amd64 instead of x86 and x86_64
6796    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6797    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6798      OPENJDK_TARGET_CPU_LEGACY="i586"
6799    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6800      # On all platforms except MacOSX replace x86_64 with amd64.
6801      OPENJDK_TARGET_CPU_LEGACY="amd64"
6802    fi
6803
6804
6805    # And the second legacy naming of the cpu.
6806    # Ie i386 and amd64 instead of x86 and x86_64.
6807    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6808    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6809      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6810    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6811      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6812    fi
6813
6814
6815    # This is the name of the cpu (but using i386 and amd64 instead of
6816    # x86 and x86_64, respectively), preceeded by a /, to be used when
6817    # locating libraries. On macosx, it's empty, though.
6818    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6819    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6820        OPENJDK_TARGET_CPU_LIBDIR=""
6821    fi
6822
6823
6824    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6825    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6826    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6827    OPENJDK_TARGET_CPU_ISADIR=""
6828    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6829      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6830          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6831      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6832          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6833      fi
6834    fi
6835
6836
6837    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6838    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6839    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6840      # On linux only, we replace x86 with i386.
6841      OPENJDK_TARGET_CPU_OSARCH="i386"
6842    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6843      # On all platforms except macosx, we replace x86_64 with amd64.
6844      OPENJDK_TARGET_CPU_OSARCH="amd64"
6845    fi
6846
6847
6848    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6849    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6850      OPENJDK_TARGET_CPU_JLI="i386"
6851    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6852      # On all platforms except macosx, we replace x86_64 with amd64.
6853      OPENJDK_TARGET_CPU_JLI="amd64"
6854    fi
6855    # Now setup the -D flags for building libjli.
6856    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6857    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6858      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6859        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6860      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6861        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6862      fi
6863    fi
6864
6865
6866    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6867    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6868        OPENJDK_TARGET_OS_API_DIR="solaris"
6869    fi
6870    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6871        OPENJDK_TARGET_OS_API_DIR="windows"
6872    fi
6873
6874
6875    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6876        A_LP64="LP64:="
6877        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6878        # unpack200.exe
6879        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6880            ADD_LP64="-D_LP64=1"
6881        fi
6882    fi
6883    LP64=$A_LP64
6884
6885
6886    if test "x$COMPILE_TYPE" = "xcross"; then
6887      # FIXME: ... or should this include reduced builds..?
6888      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6889    else
6890      DEFINE_CROSS_COMPILE_ARCH=""
6891    fi
6892
6893
6894
6895
6896# Continue setting up basic stuff. Most remaining code require fundamental tools.
6897
6898# Locate the directory of this script.
6899SCRIPT="$0"
6900
6901    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6902        # Follow a chain of symbolic links. Use readlink
6903        # where it exists, else fall back to horribly
6904        # complicated shell code.
6905        if test "x$READLINK_TESTED" != yes; then
6906            # On MacOSX there is a readlink tool with a different
6907            # purpose than the GNU readlink tool. Check the found readlink.
6908            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
6909            if test "x$ISGNU" = x; then
6910                 # A readlink that we do not know how to use.
6911                 # Are there other non-GNU readlinks out there?
6912                 READLINK_TESTED=yes
6913                 READLINK=
6914            fi
6915        fi
6916
6917        if test "x$READLINK" != x; then
6918            SCRIPT=`$READLINK -f $SCRIPT`
6919        else
6920            # Save the current directory for restoring afterwards
6921            STARTDIR=$PWD
6922            COUNTER=0
6923            sym_link_dir=`$DIRNAME $SCRIPT`
6924            sym_link_file=`$BASENAME $SCRIPT`
6925            # Use the system pwd and not the shell builtin to resolve directory symlinks
6926            cd $sym_link_dir
6927            cd `$THEPWDCMD`
6928            sym_link_dir=`$THEPWDCMD`
6929            # Resolve file symlinks
6930            while test $COUNTER -lt 20; do
6931                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6932                if test "x$ISLINK" == x; then
6933                    # This is not a symbolic link! We are done!
6934                    break
6935                fi
6936                # Again resolve directory symlinks since the target of the just found
6937                # link could be in a different directory
6938                cd `$DIRNAME $ISLINK`
6939                sym_link_dir=`$THEPWDCMD`
6940                sym_link_file=`$BASENAME $ISLINK`
6941                let COUNTER=COUNTER+1
6942            done
6943            cd $STARTDIR
6944            SCRIPT=$sym_link_dir/$sym_link_file
6945        fi
6946    fi
6947
6948AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6949
6950# Where is the source? It is located two levels above the configure script.
6951CURDIR="$PWD"
6952cd "$AUTOCONF_DIR/../.."
6953SRC_ROOT="`$THEPWDCMD`"
6954
6955if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6956  PATH_SEP=";"
6957
6958  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6959  if test $SRC_ROOT_LENGTH -gt 100; then
6960      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6961  fi
6962
6963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6965$as_echo_n "checking cygwin release... " >&6; }
6966    CYGWIN_VERSION=`$UNAME -r`
6967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6968$as_echo "$CYGWIN_VERSION" >&6; }
6969    WINDOWS_ENV_VENDOR='cygwin'
6970    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6971
6972    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6973    if test "x$CYGWIN_VERSION_OK" = x; then
6974      { $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
6975$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;}
6976      as_fn_error $? "Cannot continue" "$LINENO" 5
6977    fi
6978    if test "x$CYGPATH" = x; then
6979        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6980    fi
6981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6982$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6983    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6984    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6985    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6986    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6988$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6989    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6990    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6991    if test "x$test_cygdrive_prefix" = x; then
6992        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6993    fi
6994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6996$as_echo_n "checking msys release... " >&6; }
6997    MSYS_VERSION=`$UNAME -r`
6998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6999$as_echo "$MSYS_VERSION" >&6; }
7000
7001    WINDOWS_ENV_VENDOR='msys'
7002    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7003
7004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7005$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7006    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7007    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7008
7009  windows_path="$MSYS_ROOT_PATH"
7010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7011    unix_path=`$CYGPATH -u "$windows_path"`
7012    MSYS_ROOT_PATH="$unix_path"
7013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7015    MSYS_ROOT_PATH="$unix_path"
7016  fi
7017
7018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7019$as_echo "$MSYS_ROOT_PATH" >&6; }
7020    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7021  else
7022    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7023  fi
7024
7025  # Test if windows or unix (cygwin/msys) find is first in path.
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7027$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7028  FIND_BINARY_OUTPUT=`find --version 2>&1`
7029  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7031$as_echo "unix style" >&6; }
7032  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7034$as_echo "Windows" >&6; }
7035    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7036$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7037    { $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
7038$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7039    as_fn_error $? "Cannot continue" "$LINENO" 5
7040  else
7041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7042$as_echo "unknown" >&6; }
7043    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7044$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7045  fi
7046
7047else
7048  PATH_SEP=":"
7049fi
7050
7051
7052
7053cd "$CURDIR"
7054
7055
7056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7057
7058  # Input might be given as Windows format, start by converting to
7059  # unix format.
7060  path="$SRC_ROOT"
7061  new_path=`$CYGPATH -u "$path"`
7062
7063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7066  # "foo.exe" is OK but "foo" is an error.
7067  #
7068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7069  # It is also a way to make sure we got the proper file name for the real test later on.
7070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7071  if test "x$test_shortpath" = x; then
7072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7073$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7074    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7075  fi
7076
7077  # Call helper function which possibly converts this using DOS-style short mode.
7078  # If so, the updated path is stored in $new_path.
7079
7080  input_path="$new_path"
7081  # Check if we need to convert this using DOS-style short mode. If the path
7082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7083  # take no chances and rewrite it.
7084  # Note: m4 eats our [], so we need to use [ and ] instead.
7085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7086  if test "x$has_forbidden_chars" != x; then
7087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7091      # Going to short mode and back again did indeed matter. Since short mode is
7092      # case insensitive, let's make it lowercase to improve readability.
7093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7094      # Now convert it back to Unix-stile (cygpath)
7095      input_path=`$CYGPATH -u "$shortmode_path"`
7096      new_path="$input_path"
7097    fi
7098  fi
7099
7100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7101  if test "x$test_cygdrive_prefix" = x; then
7102    # As a simple fix, exclude /usr/bin since it's not a real path.
7103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7105      # a path prefixed by /cygdrive for fixpath to work.
7106      new_path="$CYGWIN_ROOT_PATH$input_path"
7107    fi
7108  fi
7109
7110
7111  if test "x$path" != "x$new_path"; then
7112    SRC_ROOT="$new_path"
7113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7114$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7115  fi
7116
7117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7118
7119  path="$SRC_ROOT"
7120  has_colon=`$ECHO $path | $GREP ^.:`
7121  new_path="$path"
7122  if test "x$has_colon" = x; then
7123    # Not in mixed or Windows style, start by that.
7124    new_path=`cmd //c echo $path`
7125  fi
7126
7127
7128  input_path="$new_path"
7129  # Check if we need to convert this using DOS-style short mode. If the path
7130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7131  # take no chances and rewrite it.
7132  # Note: m4 eats our [], so we need to use [ and ] instead.
7133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7134  if test "x$has_forbidden_chars" != x; then
7135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7137  fi
7138
7139
7140  windows_path="$new_path"
7141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7142    unix_path=`$CYGPATH -u "$windows_path"`
7143    new_path="$unix_path"
7144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7146    new_path="$unix_path"
7147  fi
7148
7149  if test "x$path" != "x$new_path"; then
7150    SRC_ROOT="$new_path"
7151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7152$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7153  fi
7154
7155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7157
7158  else
7159    # We're on a posix platform. Hooray! :)
7160    path="$SRC_ROOT"
7161
7162    if test ! -f "$path" && test ! -d "$path"; then
7163      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7164    fi
7165
7166    has_space=`$ECHO "$path" | $GREP " "`
7167    if test "x$has_space" != x; then
7168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7169$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7170      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7171    fi
7172  fi
7173
7174
7175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7176
7177  # Input might be given as Windows format, start by converting to
7178  # unix format.
7179  path="$CURDIR"
7180  new_path=`$CYGPATH -u "$path"`
7181
7182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7185  # "foo.exe" is OK but "foo" is an error.
7186  #
7187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7188  # It is also a way to make sure we got the proper file name for the real test later on.
7189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7190  if test "x$test_shortpath" = x; then
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7192$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7193    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7194  fi
7195
7196  # Call helper function which possibly converts this using DOS-style short mode.
7197  # If so, the updated path is stored in $new_path.
7198
7199  input_path="$new_path"
7200  # Check if we need to convert this using DOS-style short mode. If the path
7201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7202  # take no chances and rewrite it.
7203  # Note: m4 eats our [], so we need to use [ and ] instead.
7204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7205  if test "x$has_forbidden_chars" != x; then
7206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7210      # Going to short mode and back again did indeed matter. Since short mode is
7211      # case insensitive, let's make it lowercase to improve readability.
7212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7213      # Now convert it back to Unix-stile (cygpath)
7214      input_path=`$CYGPATH -u "$shortmode_path"`
7215      new_path="$input_path"
7216    fi
7217  fi
7218
7219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7220  if test "x$test_cygdrive_prefix" = x; then
7221    # As a simple fix, exclude /usr/bin since it's not a real path.
7222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7224      # a path prefixed by /cygdrive for fixpath to work.
7225      new_path="$CYGWIN_ROOT_PATH$input_path"
7226    fi
7227  fi
7228
7229
7230  if test "x$path" != "x$new_path"; then
7231    CURDIR="$new_path"
7232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7233$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7234  fi
7235
7236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7237
7238  path="$CURDIR"
7239  has_colon=`$ECHO $path | $GREP ^.:`
7240  new_path="$path"
7241  if test "x$has_colon" = x; then
7242    # Not in mixed or Windows style, start by that.
7243    new_path=`cmd //c echo $path`
7244  fi
7245
7246
7247  input_path="$new_path"
7248  # Check if we need to convert this using DOS-style short mode. If the path
7249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7250  # take no chances and rewrite it.
7251  # Note: m4 eats our [], so we need to use [ and ] instead.
7252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7253  if test "x$has_forbidden_chars" != x; then
7254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7256  fi
7257
7258
7259  windows_path="$new_path"
7260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7261    unix_path=`$CYGPATH -u "$windows_path"`
7262    new_path="$unix_path"
7263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7265    new_path="$unix_path"
7266  fi
7267
7268  if test "x$path" != "x$new_path"; then
7269    CURDIR="$new_path"
7270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7271$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7272  fi
7273
7274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7276
7277  else
7278    # We're on a posix platform. Hooray! :)
7279    path="$CURDIR"
7280
7281    if test ! -f "$path" && test ! -d "$path"; then
7282      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7283    fi
7284
7285    has_space=`$ECHO "$path" | $GREP " "`
7286    if test "x$has_space" != x; then
7287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7288$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7289      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7290    fi
7291  fi
7292
7293
7294if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7295    # Add extra search paths on solaris for utilities like ar and as etc...
7296    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7297fi
7298
7299# You can force the sys-root if the sys-root encoded into the cross compiler tools
7300# is not correct.
7301
7302# Check whether --with-sys-root was given.
7303if test "${with_sys_root+set}" = set; then :
7304  withval=$with_sys_root;
7305fi
7306
7307
7308if test "x$with_sys_root" != x; then
7309  SYS_ROOT=$with_sys_root
7310else
7311  SYS_ROOT=/
7312fi
7313
7314
7315
7316# Check whether --with-tools-dir was given.
7317if test "${with_tools_dir+set}" = set; then :
7318  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7319fi
7320
7321
7322
7323# Check whether --with-devkit was given.
7324if test "${with_devkit+set}" = set; then :
7325  withval=$with_devkit;
7326    if test "x$with_sys_root" != x; then
7327      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7328    fi
7329    if test "x$with_tools_dir" != x; then
7330      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7331    fi
7332    TOOLS_DIR=$with_devkit/bin
7333    SYS_ROOT=$with_devkit/$host_alias/libc
7334
7335fi
7336
7337
7338
7339
7340# Setup default logging of stdout and stderr to build.log in the output root.
7341BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7342BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7343BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7344
7345
7346
7347
7348
7349# These are needed to be able to create a configuration name (and thus the output directory)
7350
7351###############################################################################
7352#
7353# Check which variant of the JDK that we want to build.
7354# Currently we have:
7355#    normal:   standard edition
7356# but the custom make system may add other variants
7357#
7358# Effectively the JDK variant gives a name to a specific set of
7359# modules to compile into the JDK. In the future, these modules
7360# might even be Jigsaw modules.
7361#
7362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7363$as_echo_n "checking which variant of the JDK to build... " >&6; }
7364
7365# Check whether --with-jdk-variant was given.
7366if test "${with_jdk_variant+set}" = set; then :
7367  withval=$with_jdk_variant;
7368fi
7369
7370
7371if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7372    JDK_VARIANT="normal"
7373else
7374    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7375fi
7376
7377
7378
7379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7380$as_echo "$JDK_VARIANT" >&6; }
7381
7382
7383
7384###############################################################################
7385#
7386# Check which variants of the JVM that we want to build.
7387# Currently we have:
7388#    server: normal interpreter and a tiered C1/C2 compiler
7389#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7390#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7391#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7392#    zero: no machine code interpreter, no compiler
7393#    zeroshark: zero interpreter and shark/llvm compiler backend
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7395$as_echo_n "checking which variants of the JVM to build... " >&6; }
7396
7397# Check whether --with-jvm-variants was given.
7398if test "${with_jvm_variants+set}" = set; then :
7399  withval=$with_jvm_variants;
7400fi
7401
7402
7403if test "x$with_jvm_variants" = x; then
7404     with_jvm_variants="server"
7405fi
7406
7407JVM_VARIANTS=",$with_jvm_variants,"
7408TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7409
7410if test "x$TEST_VARIANTS" != "x,"; then
7411   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7412fi
7413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7414$as_echo "$with_jvm_variants" >&6; }
7415
7416JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7417JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7418JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7419JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7420JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7421
7422if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7423    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7424        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7425    fi
7426fi
7427if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7428    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7429        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7430    fi
7431fi
7432
7433# Replace the commas with AND for use in the build directory name.
7434ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7435COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7436if test "x$COUNT_VARIANTS" != "x,1"; then
7437    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7438else
7439    BUILDING_MULTIPLE_JVM_VARIANTS=no
7440fi
7441
7442
7443
7444
7445
7446
7447
7448
7449if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7450   MACOSX_UNIVERSAL="true"
7451fi
7452
7453
7454
7455
7456
7457###############################################################################
7458#
7459# Set the debug level
7460#    release: no debug information, all optimizations, no asserts.
7461#    fastdebug: debug information (-g), all optimizations, all asserts
7462#    slowdebug: debug information (-g), no optimizations, all asserts
7463#
7464DEBUG_LEVEL="release"
7465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7466$as_echo_n "checking which debug level to use... " >&6; }
7467# Check whether --enable-debug was given.
7468if test "${enable_debug+set}" = set; then :
7469  enableval=$enable_debug;
7470        ENABLE_DEBUG="${enableval}"
7471        DEBUG_LEVEL="fastdebug"
7472
7473else
7474  ENABLE_DEBUG="no"
7475fi
7476
7477
7478
7479# Check whether --with-debug-level was given.
7480if test "${with_debug_level+set}" = set; then :
7481  withval=$with_debug_level;
7482        DEBUG_LEVEL="${withval}"
7483        if test "x$ENABLE_DEBUG" = xyes; then
7484			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7485        fi
7486
7487fi
7488
7489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7490$as_echo "$DEBUG_LEVEL" >&6; }
7491
7492if test "x$DEBUG_LEVEL" != xrelease && \
7493   test "x$DEBUG_LEVEL" != xfastdebug && \
7494   test "x$DEBUG_LEVEL" != xslowdebug; then
7495   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7496fi
7497
7498
7499###############################################################################
7500#
7501# Setup legacy vars/targets and new vars to deal with different debug levels.
7502#
7503
7504case $DEBUG_LEVEL in
7505      release )
7506          VARIANT="OPT"
7507          FASTDEBUG="false"
7508          DEBUG_CLASSFILES="false"
7509          BUILD_VARIANT_RELEASE=""
7510          HOTSPOT_DEBUG_LEVEL="product"
7511          HOTSPOT_EXPORT="product"
7512           ;;
7513      fastdebug )
7514          VARIANT="DBG"
7515          FASTDEBUG="true"
7516          DEBUG_CLASSFILES="true"
7517          BUILD_VARIANT_RELEASE="-fastdebug"
7518          HOTSPOT_DEBUG_LEVEL="fastdebug"
7519          HOTSPOT_EXPORT="fastdebug"
7520           ;;
7521      slowdebug )
7522          VARIANT="DBG"
7523          FASTDEBUG="false"
7524          DEBUG_CLASSFILES="true"
7525          BUILD_VARIANT_RELEASE="-debug"
7526          HOTSPOT_DEBUG_LEVEL="jvmg"
7527          HOTSPOT_EXPORT="debug"
7528           ;;
7529esac
7530
7531#####
7532# Generate the legacy makefile targets for hotspot.
7533# The hotspot api for selecting the build artifacts, really, needs to be improved.
7534#
7535HOTSPOT_TARGET=""
7536
7537if test "x$JVM_VARIANT_SERVER" = xtrue; then
7538    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7539fi
7540
7541if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7542    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7543fi
7544
7545if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7546    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7547fi
7548
7549if test "x$JVM_VARIANT_ZERO" = xtrue; then
7550    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7551fi
7552
7553if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7554    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7555fi
7556
7557HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7558
7559# On Macosx universal binaries are produced, but they only contain
7560# 64 bit intel. This invalidates control of which jvms are built
7561# from configure, but only server is valid anyway. Fix this
7562# when hotspot makefiles are rewritten.
7563if test "x$MACOSX_UNIVERSAL" = xtrue; then
7564    HOTSPOT_TARGET=universal_product
7565fi
7566
7567#####
7568
7569
7570
7571
7572
7573
7574
7575
7576# With basic setup done, call the custom early hook.
7577
7578
7579# To properly create a configuration name, we need to have the OpenJDK target
7580# and options (variants and debug level) parsed.
7581
7582
7583
7584# Check whether --with-conf-name was given.
7585if test "${with_conf_name+set}" = set; then :
7586  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7587fi
7588
7589
7590# Test from where we are running configure, in or outside of src root.
7591# To enable comparison of directories, CURDIR needs to be symlink free
7592# just like SRC_ROOT already is
7593NOSYM_CURDIR="$CURDIR"
7594
7595    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7596        # Follow a chain of symbolic links. Use readlink
7597        # where it exists, else fall back to horribly
7598        # complicated shell code.
7599        if test "x$READLINK_TESTED" != yes; then
7600            # On MacOSX there is a readlink tool with a different
7601            # purpose than the GNU readlink tool. Check the found readlink.
7602            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7603            if test "x$ISGNU" = x; then
7604                 # A readlink that we do not know how to use.
7605                 # Are there other non-GNU readlinks out there?
7606                 READLINK_TESTED=yes
7607                 READLINK=
7608            fi
7609        fi
7610
7611        if test "x$READLINK" != x; then
7612            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7613        else
7614            # Save the current directory for restoring afterwards
7615            STARTDIR=$PWD
7616            COUNTER=0
7617            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7618            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7619            # Use the system pwd and not the shell builtin to resolve directory symlinks
7620            cd $sym_link_dir
7621            cd `$THEPWDCMD`
7622            sym_link_dir=`$THEPWDCMD`
7623            # Resolve file symlinks
7624            while test $COUNTER -lt 20; do
7625                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7626                if test "x$ISLINK" == x; then
7627                    # This is not a symbolic link! We are done!
7628                    break
7629                fi
7630                # Again resolve directory symlinks since the target of the just found
7631                # link could be in a different directory
7632                cd `$DIRNAME $ISLINK`
7633                sym_link_dir=`$THEPWDCMD`
7634                sym_link_file=`$BASENAME $ISLINK`
7635                let COUNTER=COUNTER+1
7636            done
7637            cd $STARTDIR
7638            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7639        fi
7640    fi
7641
7642if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7643        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7644        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7645    # We are running configure from the src root.
7646    # Create a default ./build/target-variant-debuglevel output root.
7647    if test "x${CONF_NAME}" = x; then
7648        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7649    fi
7650    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7651    $MKDIR -p "$OUTPUT_ROOT"
7652    if test ! -d "$OUTPUT_ROOT"; then
7653        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7654    fi
7655else
7656    # We are running configure from outside of the src dir.
7657    # Then use the current directory as output dir!
7658    # If configuration is situated in normal build directory, just use the build
7659    # directory name as configuration name, otherwise use the complete path.
7660    if test "x${CONF_NAME}" = x; then
7661        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7662    fi
7663    OUTPUT_ROOT="$CURDIR"
7664
7665    # WARNING: This might be a bad thing to do. You need to be sure you want to
7666    # have a configuration in this directory. Do some sanity checks!
7667
7668    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7669      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7670      # other files
7671      files_present=`$LS $OUTPUT_ROOT`
7672      # Configure has already touched config.log and confdefs.h in the current dir when this check
7673      # is performed.
7674      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7675                                             | $TR -d '\n'`
7676      if test "x$filtered_files" != x; then
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7678$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7680$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7682$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7683        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7684$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7685        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7686$as_echo "$as_me: seriously mess up just about everything." >&6;}
7687        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7688$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7689        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7690$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7691        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7692      fi
7693    fi
7694fi
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7696$as_echo_n "checking what configuration name to use... " >&6; }
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7698$as_echo "$CONF_NAME" >&6; }
7699
7700
7701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7702
7703  # Input might be given as Windows format, start by converting to
7704  # unix format.
7705  path="$OUTPUT_ROOT"
7706  new_path=`$CYGPATH -u "$path"`
7707
7708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7711  # "foo.exe" is OK but "foo" is an error.
7712  #
7713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7714  # It is also a way to make sure we got the proper file name for the real test later on.
7715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7716  if test "x$test_shortpath" = x; then
7717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7718$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7719    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7720  fi
7721
7722  # Call helper function which possibly converts this using DOS-style short mode.
7723  # If so, the updated path is stored in $new_path.
7724
7725  input_path="$new_path"
7726  # Check if we need to convert this using DOS-style short mode. If the path
7727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7728  # take no chances and rewrite it.
7729  # Note: m4 eats our [], so we need to use [ and ] instead.
7730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7731  if test "x$has_forbidden_chars" != x; then
7732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7736      # Going to short mode and back again did indeed matter. Since short mode is
7737      # case insensitive, let's make it lowercase to improve readability.
7738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7739      # Now convert it back to Unix-stile (cygpath)
7740      input_path=`$CYGPATH -u "$shortmode_path"`
7741      new_path="$input_path"
7742    fi
7743  fi
7744
7745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7746  if test "x$test_cygdrive_prefix" = x; then
7747    # As a simple fix, exclude /usr/bin since it's not a real path.
7748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7750      # a path prefixed by /cygdrive for fixpath to work.
7751      new_path="$CYGWIN_ROOT_PATH$input_path"
7752    fi
7753  fi
7754
7755
7756  if test "x$path" != "x$new_path"; then
7757    OUTPUT_ROOT="$new_path"
7758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7759$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7760  fi
7761
7762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7763
7764  path="$OUTPUT_ROOT"
7765  has_colon=`$ECHO $path | $GREP ^.:`
7766  new_path="$path"
7767  if test "x$has_colon" = x; then
7768    # Not in mixed or Windows style, start by that.
7769    new_path=`cmd //c echo $path`
7770  fi
7771
7772
7773  input_path="$new_path"
7774  # Check if we need to convert this using DOS-style short mode. If the path
7775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7776  # take no chances and rewrite it.
7777  # Note: m4 eats our [], so we need to use [ and ] instead.
7778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7779  if test "x$has_forbidden_chars" != x; then
7780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7782  fi
7783
7784
7785  windows_path="$new_path"
7786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7787    unix_path=`$CYGPATH -u "$windows_path"`
7788    new_path="$unix_path"
7789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7791    new_path="$unix_path"
7792  fi
7793
7794  if test "x$path" != "x$new_path"; then
7795    OUTPUT_ROOT="$new_path"
7796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7797$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7798  fi
7799
7800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7802
7803  else
7804    # We're on a posix platform. Hooray! :)
7805    path="$OUTPUT_ROOT"
7806
7807    if test ! -f "$path" && test ! -d "$path"; then
7808      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7809    fi
7810
7811    has_space=`$ECHO "$path" | $GREP " "`
7812    if test "x$has_space" != x; then
7813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7814$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7815      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7816    fi
7817  fi
7818
7819
7820SPEC=$OUTPUT_ROOT/spec.gmk
7821
7822CONF_NAME=$CONF_NAME
7823
7824OUTPUT_ROOT=$OUTPUT_ROOT
7825
7826
7827# Most of the probed defines are put into config.h
7828ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7829
7830# The spec.gmk file contains all variables for the make system.
7831ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7832
7833# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7834ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7835
7836# The bootcycle-spec.gmk file contains support for boot cycle builds.
7837ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7838
7839# The compare.sh is used to compare the build output to other builds.
7840ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7841
7842# Spec.sh is currently used by compare-objects.sh
7843ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7844
7845# The generated Makefile knows where the spec.gmk is and where the source is.
7846# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7847# which will look for generated configurations
7848ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7849
7850
7851# Save the arguments given to us
7852echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7853
7854
7855# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7856
7857    for ac_prog in apt-get yum port pkgutil pkgadd
7858do
7859  # Extract the first word of "$ac_prog", so it can be a program name with args.
7860set dummy $ac_prog; ac_word=$2
7861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7862$as_echo_n "checking for $ac_word... " >&6; }
7863if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7864  $as_echo_n "(cached) " >&6
7865else
7866  if test -n "$PKGHANDLER"; then
7867  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7868else
7869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7870for as_dir in $PATH
7871do
7872  IFS=$as_save_IFS
7873  test -z "$as_dir" && as_dir=.
7874    for ac_exec_ext in '' $ac_executable_extensions; do
7875  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7876    ac_cv_prog_PKGHANDLER="$ac_prog"
7877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7878    break 2
7879  fi
7880done
7881  done
7882IFS=$as_save_IFS
7883
7884fi
7885fi
7886PKGHANDLER=$ac_cv_prog_PKGHANDLER
7887if test -n "$PKGHANDLER"; then
7888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7889$as_echo "$PKGHANDLER" >&6; }
7890else
7891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7892$as_echo "no" >&6; }
7893fi
7894
7895
7896  test -n "$PKGHANDLER" && break
7897done
7898
7899
7900
7901# Setup tools that requires more complex handling, or that is not needed by the configure script.
7902
7903
7904  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7905  if test "x$MAKE" != x; then
7906    # User has supplied a make, test it.
7907    if test ! -f "$MAKE"; then
7908      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7909    fi
7910
7911  MAKE_CANDIDATE=""$MAKE""
7912  DESCRIPTION="user supplied MAKE=$MAKE"
7913  if test "x$MAKE_CANDIDATE" != x; then
7914    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7915$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7916    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7917    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7918    if test "x$IS_GNU_MAKE" = x; then
7919      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7920$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7921    else
7922      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7923      if test "x$IS_MODERN_MAKE" = x; then
7924        { $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
7925$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;}
7926      else
7927        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7928          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7929            MAKE_EXPECTED_ENV='cygwin'
7930          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7931            MAKE_EXPECTED_ENV='msys'
7932          else
7933            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7934          fi
7935          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7936          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7937        else
7938          # Not relevant for non-Windows
7939          IS_MAKE_CORRECT_ENV=true
7940        fi
7941        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7942          { $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
7943$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;}
7944        else
7945          FOUND_MAKE=$MAKE_CANDIDATE
7946
7947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7948
7949  # First separate the path from the arguments. This will split at the first
7950  # space.
7951  complete="$FOUND_MAKE"
7952  path="${complete%% *}"
7953  tmp="$complete EOL"
7954  arguments="${tmp#* }"
7955
7956  # Input might be given as Windows format, start by converting to
7957  # unix format.
7958  new_path=`$CYGPATH -u "$path"`
7959
7960  # Now try to locate executable using which
7961  new_path=`$WHICH "$new_path" 2> /dev/null`
7962  # bat and cmd files are not always considered executable in cygwin causing which
7963  # to not find them
7964  if test "x$new_path" = x \
7965           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7966           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7967    new_path=`$CYGPATH -u "$path"`
7968  fi
7969  if test "x$new_path" = x; then
7970    # Oops. Which didn't find the executable.
7971    # The splitting of arguments from the executable at a space might have been incorrect,
7972    # since paths with space are more likely in Windows. Give it another try with the whole
7973    # argument.
7974    path="$complete"
7975    arguments="EOL"
7976    new_path=`$CYGPATH -u "$path"`
7977    new_path=`$WHICH "$new_path" 2> /dev/null`
7978    # bat and cmd files are not always considered executable in cygwin causing which
7979    # to not find them
7980    if test "x$new_path" = x \
7981             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7982             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7983      new_path=`$CYGPATH -u "$path"`
7984    fi
7985    if test "x$new_path" = x; then
7986      # It's still not found. Now this is an unrecoverable error.
7987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7988$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7989      has_space=`$ECHO "$complete" | $GREP " "`
7990      if test "x$has_space" != x; then
7991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7993      fi
7994      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7995    fi
7996  fi
7997
7998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8001  # "foo.exe" is OK but "foo" is an error.
8002  #
8003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8004  # It is also a way to make sure we got the proper file name for the real test later on.
8005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8006  if test "x$test_shortpath" = x; then
8007    # Short path failed, file does not exist as specified.
8008    # Try adding .exe or .cmd
8009    if test -f "${new_path}.exe"; then
8010       input_to_shortpath="${new_path}.exe"
8011    elif test -f "${new_path}.cmd"; then
8012       input_to_shortpath="${new_path}.cmd"
8013    else
8014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8015$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8018      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8019    fi
8020  else
8021    input_to_shortpath="$new_path"
8022  fi
8023
8024  # Call helper function which possibly converts this using DOS-style short mode.
8025  # If so, the updated path is stored in $new_path.
8026  new_path="$input_to_shortpath"
8027
8028  input_path="$input_to_shortpath"
8029  # Check if we need to convert this using DOS-style short mode. If the path
8030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8031  # take no chances and rewrite it.
8032  # Note: m4 eats our [], so we need to use [ and ] instead.
8033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8034  if test "x$has_forbidden_chars" != x; then
8035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8039      # Going to short mode and back again did indeed matter. Since short mode is
8040      # case insensitive, let's make it lowercase to improve readability.
8041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8042      # Now convert it back to Unix-stile (cygpath)
8043      input_path=`$CYGPATH -u "$shortmode_path"`
8044      new_path="$input_path"
8045    fi
8046  fi
8047
8048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8049  if test "x$test_cygdrive_prefix" = x; then
8050    # As a simple fix, exclude /usr/bin since it's not a real path.
8051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8053      # a path prefixed by /cygdrive for fixpath to work.
8054      new_path="$CYGWIN_ROOT_PATH$input_path"
8055    fi
8056  fi
8057
8058  # remove trailing .exe if any
8059  new_path="${new_path/%.exe/}"
8060
8061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8062
8063  # First separate the path from the arguments. This will split at the first
8064  # space.
8065  complete="$FOUND_MAKE"
8066  path="${complete%% *}"
8067  tmp="$complete EOL"
8068  arguments="${tmp#* }"
8069
8070  # Input might be given as Windows format, start by converting to
8071  # unix format.
8072  new_path="$path"
8073
8074  windows_path="$new_path"
8075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8076    unix_path=`$CYGPATH -u "$windows_path"`
8077    new_path="$unix_path"
8078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8080    new_path="$unix_path"
8081  fi
8082
8083
8084  # Now try to locate executable using which
8085  new_path=`$WHICH "$new_path" 2> /dev/null`
8086
8087  if test "x$new_path" = x; then
8088    # Oops. Which didn't find the executable.
8089    # The splitting of arguments from the executable at a space might have been incorrect,
8090    # since paths with space are more likely in Windows. Give it another try with the whole
8091    # argument.
8092    path="$complete"
8093    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
8107
8108    if test "x$new_path" = x; then
8109      # It's still not found. Now this is an unrecoverable error.
8110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8111$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8112      has_space=`$ECHO "$complete" | $GREP " "`
8113      if test "x$has_space" != x; then
8114        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8115$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8116      fi
8117      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8118    fi
8119  fi
8120
8121  # Now new_path has a complete unix path to the binary
8122  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8123    # Keep paths in /bin as-is, but remove trailing .exe if any
8124    new_path="${new_path/%.exe/}"
8125    # Do not save /bin paths to all_fixpath_prefixes!
8126  else
8127    # Not in mixed or Windows style, start by that.
8128    new_path=`cmd //c echo $new_path`
8129
8130  input_path="$new_path"
8131  # Check if we need to convert this using DOS-style short mode. If the path
8132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8133  # take no chances and rewrite it.
8134  # Note: m4 eats our [], so we need to use [ and ] instead.
8135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8136  if test "x$has_forbidden_chars" != x; then
8137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8138    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8139  fi
8140
8141    # Output is in $new_path
8142
8143  windows_path="$new_path"
8144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8145    unix_path=`$CYGPATH -u "$windows_path"`
8146    new_path="$unix_path"
8147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8149    new_path="$unix_path"
8150  fi
8151
8152    # remove trailing .exe if any
8153    new_path="${new_path/%.exe/}"
8154
8155    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8156    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8157  fi
8158
8159  else
8160    # We're on a posix platform. Hooray! :)
8161    # First separate the path from the arguments. This will split at the first
8162    # space.
8163    complete="$FOUND_MAKE"
8164    path="${complete%% *}"
8165    tmp="$complete EOL"
8166    arguments="${tmp#* }"
8167
8168    new_path=`$WHICH $path 2> /dev/null`
8169    if test "x$new_path" = x; then
8170      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8171      if test "x$is_absolute_path" != x; then
8172        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8173$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8174        new_path="$path"
8175      else
8176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8177$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8178        has_space=`$ECHO "$complete" | $GREP " "`
8179        if test "x$has_space" != x; then
8180          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8181$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8182        fi
8183        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8184      fi
8185    fi
8186  fi
8187
8188  # Now join together the path and the arguments once again
8189  if test "x$arguments" != xEOL; then
8190      new_complete="$new_path ${arguments% *}"
8191  else
8192      new_complete="$new_path"
8193  fi
8194
8195  if test "x$complete" != "x$new_complete"; then
8196    FOUND_MAKE="$new_complete"
8197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8198$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8199  fi
8200
8201        fi
8202      fi
8203    fi
8204  fi
8205
8206    if test "x$FOUND_MAKE" = x; then
8207      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8208    fi
8209  else
8210    # Try our hardest to locate a correct version of GNU make
8211    for ac_prog in gmake
8212do
8213  # Extract the first word of "$ac_prog", so it can be a program name with args.
8214set dummy $ac_prog; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $CHECK_GMAKE in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8232    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8244if test -n "$CHECK_GMAKE"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8246$as_echo "$CHECK_GMAKE" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253  test -n "$CHECK_GMAKE" && break
8254done
8255
8256
8257  MAKE_CANDIDATE=""$CHECK_GMAKE""
8258  DESCRIPTION="gmake in PATH"
8259  if test "x$MAKE_CANDIDATE" != x; then
8260    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8261$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8262    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8263    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8264    if test "x$IS_GNU_MAKE" = x; then
8265      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8266$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8267    else
8268      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8269      if test "x$IS_MODERN_MAKE" = x; then
8270        { $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
8271$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;}
8272      else
8273        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8274          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8275            MAKE_EXPECTED_ENV='cygwin'
8276          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8277            MAKE_EXPECTED_ENV='msys'
8278          else
8279            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8280          fi
8281          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8282          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8283        else
8284          # Not relevant for non-Windows
8285          IS_MAKE_CORRECT_ENV=true
8286        fi
8287        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8288          { $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
8289$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;}
8290        else
8291          FOUND_MAKE=$MAKE_CANDIDATE
8292
8293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8294
8295  # First separate the path from the arguments. This will split at the first
8296  # space.
8297  complete="$FOUND_MAKE"
8298  path="${complete%% *}"
8299  tmp="$complete EOL"
8300  arguments="${tmp#* }"
8301
8302  # Input might be given as Windows format, start by converting to
8303  # unix format.
8304  new_path=`$CYGPATH -u "$path"`
8305
8306  # Now try to locate executable using which
8307  new_path=`$WHICH "$new_path" 2> /dev/null`
8308  # bat and cmd files are not always considered executable in cygwin causing which
8309  # to not find them
8310  if test "x$new_path" = x \
8311           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8312           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8313    new_path=`$CYGPATH -u "$path"`
8314  fi
8315  if test "x$new_path" = x; then
8316    # Oops. Which didn't find the executable.
8317    # The splitting of arguments from the executable at a space might have been incorrect,
8318    # since paths with space are more likely in Windows. Give it another try with the whole
8319    # argument.
8320    path="$complete"
8321    arguments="EOL"
8322    new_path=`$CYGPATH -u "$path"`
8323    new_path=`$WHICH "$new_path" 2> /dev/null`
8324    # bat and cmd files are not always considered executable in cygwin causing which
8325    # to not find them
8326    if test "x$new_path" = x \
8327             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8328             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8329      new_path=`$CYGPATH -u "$path"`
8330    fi
8331    if test "x$new_path" = x; then
8332      # It's still not found. Now this is an unrecoverable error.
8333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8334$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8335      has_space=`$ECHO "$complete" | $GREP " "`
8336      if test "x$has_space" != x; then
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8339      fi
8340      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8341    fi
8342  fi
8343
8344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8347  # "foo.exe" is OK but "foo" is an error.
8348  #
8349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8350  # It is also a way to make sure we got the proper file name for the real test later on.
8351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8352  if test "x$test_shortpath" = x; then
8353    # Short path failed, file does not exist as specified.
8354    # Try adding .exe or .cmd
8355    if test -f "${new_path}.exe"; then
8356       input_to_shortpath="${new_path}.exe"
8357    elif test -f "${new_path}.cmd"; then
8358       input_to_shortpath="${new_path}.cmd"
8359    else
8360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8361$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8365    fi
8366  else
8367    input_to_shortpath="$new_path"
8368  fi
8369
8370  # Call helper function which possibly converts this using DOS-style short mode.
8371  # If so, the updated path is stored in $new_path.
8372  new_path="$input_to_shortpath"
8373
8374  input_path="$input_to_shortpath"
8375  # Check if we need to convert this using DOS-style short mode. If the path
8376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8377  # take no chances and rewrite it.
8378  # Note: m4 eats our [], so we need to use [ and ] instead.
8379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8380  if test "x$has_forbidden_chars" != x; then
8381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8385      # Going to short mode and back again did indeed matter. Since short mode is
8386      # case insensitive, let's make it lowercase to improve readability.
8387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8388      # Now convert it back to Unix-stile (cygpath)
8389      input_path=`$CYGPATH -u "$shortmode_path"`
8390      new_path="$input_path"
8391    fi
8392  fi
8393
8394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8395  if test "x$test_cygdrive_prefix" = x; then
8396    # As a simple fix, exclude /usr/bin since it's not a real path.
8397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8399      # a path prefixed by /cygdrive for fixpath to work.
8400      new_path="$CYGWIN_ROOT_PATH$input_path"
8401    fi
8402  fi
8403
8404  # remove trailing .exe if any
8405  new_path="${new_path/%.exe/}"
8406
8407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8408
8409  # First separate the path from the arguments. This will split at the first
8410  # space.
8411  complete="$FOUND_MAKE"
8412  path="${complete%% *}"
8413  tmp="$complete EOL"
8414  arguments="${tmp#* }"
8415
8416  # Input might be given as Windows format, start by converting to
8417  # unix format.
8418  new_path="$path"
8419
8420  windows_path="$new_path"
8421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8422    unix_path=`$CYGPATH -u "$windows_path"`
8423    new_path="$unix_path"
8424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8426    new_path="$unix_path"
8427  fi
8428
8429
8430  # Now try to locate executable using which
8431  new_path=`$WHICH "$new_path" 2> /dev/null`
8432
8433  if test "x$new_path" = x; then
8434    # Oops. Which didn't find the executable.
8435    # The splitting of arguments from the executable at a space might have been incorrect,
8436    # since paths with space are more likely in Windows. Give it another try with the whole
8437    # argument.
8438    path="$complete"
8439    arguments="EOL"
8440    new_path="$path"
8441
8442  windows_path="$new_path"
8443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8444    unix_path=`$CYGPATH -u "$windows_path"`
8445    new_path="$unix_path"
8446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8448    new_path="$unix_path"
8449  fi
8450
8451
8452    new_path=`$WHICH "$new_path" 2> /dev/null`
8453
8454    if test "x$new_path" = x; then
8455      # It's still not found. Now this is an unrecoverable error.
8456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8457$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8458      has_space=`$ECHO "$complete" | $GREP " "`
8459      if test "x$has_space" != x; then
8460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8462      fi
8463      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8464    fi
8465  fi
8466
8467  # Now new_path has a complete unix path to the binary
8468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8469    # Keep paths in /bin as-is, but remove trailing .exe if any
8470    new_path="${new_path/%.exe/}"
8471    # Do not save /bin paths to all_fixpath_prefixes!
8472  else
8473    # Not in mixed or Windows style, start by that.
8474    new_path=`cmd //c echo $new_path`
8475
8476  input_path="$new_path"
8477  # Check if we need to convert this using DOS-style short mode. If the path
8478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8479  # take no chances and rewrite it.
8480  # Note: m4 eats our [], so we need to use [ and ] instead.
8481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8482  if test "x$has_forbidden_chars" != x; then
8483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8485  fi
8486
8487    # Output is in $new_path
8488
8489  windows_path="$new_path"
8490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8491    unix_path=`$CYGPATH -u "$windows_path"`
8492    new_path="$unix_path"
8493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8495    new_path="$unix_path"
8496  fi
8497
8498    # remove trailing .exe if any
8499    new_path="${new_path/%.exe/}"
8500
8501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8503  fi
8504
8505  else
8506    # We're on a posix platform. Hooray! :)
8507    # First separate the path from the arguments. This will split at the first
8508    # space.
8509    complete="$FOUND_MAKE"
8510    path="${complete%% *}"
8511    tmp="$complete EOL"
8512    arguments="${tmp#* }"
8513
8514    new_path=`$WHICH $path 2> /dev/null`
8515    if test "x$new_path" = x; then
8516      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8517      if test "x$is_absolute_path" != x; then
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8519$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8520        new_path="$path"
8521      else
8522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8523$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8524        has_space=`$ECHO "$complete" | $GREP " "`
8525        if test "x$has_space" != x; then
8526          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8528        fi
8529        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8530      fi
8531    fi
8532  fi
8533
8534  # Now join together the path and the arguments once again
8535  if test "x$arguments" != xEOL; then
8536      new_complete="$new_path ${arguments% *}"
8537  else
8538      new_complete="$new_path"
8539  fi
8540
8541  if test "x$complete" != "x$new_complete"; then
8542    FOUND_MAKE="$new_complete"
8543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8544$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8545  fi
8546
8547        fi
8548      fi
8549    fi
8550  fi
8551
8552
8553    if test "x$FOUND_MAKE" = x; then
8554      for ac_prog in make
8555do
8556  # Extract the first word of "$ac_prog", so it can be a program name with args.
8557set dummy $ac_prog; ac_word=$2
8558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8559$as_echo_n "checking for $ac_word... " >&6; }
8560if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8561  $as_echo_n "(cached) " >&6
8562else
8563  case $CHECK_MAKE in
8564  [\\/]* | ?:[\\/]*)
8565  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8566  ;;
8567  *)
8568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8569for as_dir in $PATH
8570do
8571  IFS=$as_save_IFS
8572  test -z "$as_dir" && as_dir=.
8573    for ac_exec_ext in '' $ac_executable_extensions; do
8574  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8575    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8577    break 2
8578  fi
8579done
8580  done
8581IFS=$as_save_IFS
8582
8583  ;;
8584esac
8585fi
8586CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8587if test -n "$CHECK_MAKE"; then
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8589$as_echo "$CHECK_MAKE" >&6; }
8590else
8591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8592$as_echo "no" >&6; }
8593fi
8594
8595
8596  test -n "$CHECK_MAKE" && break
8597done
8598
8599
8600  MAKE_CANDIDATE=""$CHECK_MAKE""
8601  DESCRIPTION="make in PATH"
8602  if test "x$MAKE_CANDIDATE" != x; then
8603    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8604$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8605    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8606    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8607    if test "x$IS_GNU_MAKE" = x; then
8608      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8609$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8610    else
8611      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8612      if test "x$IS_MODERN_MAKE" = x; then
8613        { $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
8614$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;}
8615      else
8616        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8617          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8618            MAKE_EXPECTED_ENV='cygwin'
8619          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8620            MAKE_EXPECTED_ENV='msys'
8621          else
8622            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8623          fi
8624          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8625          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8626        else
8627          # Not relevant for non-Windows
8628          IS_MAKE_CORRECT_ENV=true
8629        fi
8630        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8631          { $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
8632$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;}
8633        else
8634          FOUND_MAKE=$MAKE_CANDIDATE
8635
8636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8637
8638  # First separate the path from the arguments. This will split at the first
8639  # space.
8640  complete="$FOUND_MAKE"
8641  path="${complete%% *}"
8642  tmp="$complete EOL"
8643  arguments="${tmp#* }"
8644
8645  # Input might be given as Windows format, start by converting to
8646  # unix format.
8647  new_path=`$CYGPATH -u "$path"`
8648
8649  # Now try to locate executable using which
8650  new_path=`$WHICH "$new_path" 2> /dev/null`
8651  # bat and cmd files are not always considered executable in cygwin causing which
8652  # to not find them
8653  if test "x$new_path" = x \
8654           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8655           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8656    new_path=`$CYGPATH -u "$path"`
8657  fi
8658  if test "x$new_path" = x; then
8659    # Oops. Which didn't find the executable.
8660    # The splitting of arguments from the executable at a space might have been incorrect,
8661    # since paths with space are more likely in Windows. Give it another try with the whole
8662    # argument.
8663    path="$complete"
8664    arguments="EOL"
8665    new_path=`$CYGPATH -u "$path"`
8666    new_path=`$WHICH "$new_path" 2> /dev/null`
8667    # bat and cmd files are not always considered executable in cygwin causing which
8668    # to not find them
8669    if test "x$new_path" = x \
8670             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8671             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8672      new_path=`$CYGPATH -u "$path"`
8673    fi
8674    if test "x$new_path" = x; then
8675      # It's still not found. Now this is an unrecoverable error.
8676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8678      has_space=`$ECHO "$complete" | $GREP " "`
8679      if test "x$has_space" != x; then
8680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8682      fi
8683      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8684    fi
8685  fi
8686
8687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8690  # "foo.exe" is OK but "foo" is an error.
8691  #
8692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8693  # It is also a way to make sure we got the proper file name for the real test later on.
8694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8695  if test "x$test_shortpath" = x; then
8696    # Short path failed, file does not exist as specified.
8697    # Try adding .exe or .cmd
8698    if test -f "${new_path}.exe"; then
8699       input_to_shortpath="${new_path}.exe"
8700    elif test -f "${new_path}.cmd"; then
8701       input_to_shortpath="${new_path}.cmd"
8702    else
8703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8705      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8706$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8707      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8708    fi
8709  else
8710    input_to_shortpath="$new_path"
8711  fi
8712
8713  # Call helper function which possibly converts this using DOS-style short mode.
8714  # If so, the updated path is stored in $new_path.
8715  new_path="$input_to_shortpath"
8716
8717  input_path="$input_to_shortpath"
8718  # Check if we need to convert this using DOS-style short mode. If the path
8719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8720  # take no chances and rewrite it.
8721  # Note: m4 eats our [], so we need to use [ and ] instead.
8722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8723  if test "x$has_forbidden_chars" != x; then
8724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8728      # Going to short mode and back again did indeed matter. Since short mode is
8729      # case insensitive, let's make it lowercase to improve readability.
8730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8731      # Now convert it back to Unix-stile (cygpath)
8732      input_path=`$CYGPATH -u "$shortmode_path"`
8733      new_path="$input_path"
8734    fi
8735  fi
8736
8737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8738  if test "x$test_cygdrive_prefix" = x; then
8739    # As a simple fix, exclude /usr/bin since it's not a real path.
8740    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8742      # a path prefixed by /cygdrive for fixpath to work.
8743      new_path="$CYGWIN_ROOT_PATH$input_path"
8744    fi
8745  fi
8746
8747  # remove trailing .exe if any
8748  new_path="${new_path/%.exe/}"
8749
8750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8751
8752  # First separate the path from the arguments. This will split at the first
8753  # space.
8754  complete="$FOUND_MAKE"
8755  path="${complete%% *}"
8756  tmp="$complete EOL"
8757  arguments="${tmp#* }"
8758
8759  # Input might be given as Windows format, start by converting to
8760  # unix format.
8761  new_path="$path"
8762
8763  windows_path="$new_path"
8764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8765    unix_path=`$CYGPATH -u "$windows_path"`
8766    new_path="$unix_path"
8767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8769    new_path="$unix_path"
8770  fi
8771
8772
8773  # Now try to locate executable using which
8774  new_path=`$WHICH "$new_path" 2> /dev/null`
8775
8776  if test "x$new_path" = x; then
8777    # Oops. Which didn't find the executable.
8778    # The splitting of arguments from the executable at a space might have been incorrect,
8779    # since paths with space are more likely in Windows. Give it another try with the whole
8780    # argument.
8781    path="$complete"
8782    arguments="EOL"
8783    new_path="$path"
8784
8785  windows_path="$new_path"
8786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8787    unix_path=`$CYGPATH -u "$windows_path"`
8788    new_path="$unix_path"
8789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8791    new_path="$unix_path"
8792  fi
8793
8794
8795    new_path=`$WHICH "$new_path" 2> /dev/null`
8796
8797    if test "x$new_path" = x; then
8798      # It's still not found. Now this is an unrecoverable error.
8799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8800$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8801      has_space=`$ECHO "$complete" | $GREP " "`
8802      if test "x$has_space" != x; then
8803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8805      fi
8806      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8807    fi
8808  fi
8809
8810  # Now new_path has a complete unix path to the binary
8811  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8812    # Keep paths in /bin as-is, but remove trailing .exe if any
8813    new_path="${new_path/%.exe/}"
8814    # Do not save /bin paths to all_fixpath_prefixes!
8815  else
8816    # Not in mixed or Windows style, start by that.
8817    new_path=`cmd //c echo $new_path`
8818
8819  input_path="$new_path"
8820  # Check if we need to convert this using DOS-style short mode. If the path
8821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8822  # take no chances and rewrite it.
8823  # Note: m4 eats our [], so we need to use [ and ] instead.
8824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8825  if test "x$has_forbidden_chars" != x; then
8826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8828  fi
8829
8830    # Output is in $new_path
8831
8832  windows_path="$new_path"
8833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8834    unix_path=`$CYGPATH -u "$windows_path"`
8835    new_path="$unix_path"
8836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8838    new_path="$unix_path"
8839  fi
8840
8841    # remove trailing .exe if any
8842    new_path="${new_path/%.exe/}"
8843
8844    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8845    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8846  fi
8847
8848  else
8849    # We're on a posix platform. Hooray! :)
8850    # First separate the path from the arguments. This will split at the first
8851    # space.
8852    complete="$FOUND_MAKE"
8853    path="${complete%% *}"
8854    tmp="$complete EOL"
8855    arguments="${tmp#* }"
8856
8857    new_path=`$WHICH $path 2> /dev/null`
8858    if test "x$new_path" = x; then
8859      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8860      if test "x$is_absolute_path" != x; then
8861        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8862$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8863        new_path="$path"
8864      else
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8867        has_space=`$ECHO "$complete" | $GREP " "`
8868        if test "x$has_space" != x; then
8869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8871        fi
8872        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8873      fi
8874    fi
8875  fi
8876
8877  # Now join together the path and the arguments once again
8878  if test "x$arguments" != xEOL; then
8879      new_complete="$new_path ${arguments% *}"
8880  else
8881      new_complete="$new_path"
8882  fi
8883
8884  if test "x$complete" != "x$new_complete"; then
8885    FOUND_MAKE="$new_complete"
8886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8887$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8888  fi
8889
8890        fi
8891      fi
8892    fi
8893  fi
8894
8895    fi
8896
8897    if test "x$FOUND_MAKE" = x; then
8898      if test "x$TOOLS_DIR" != x; then
8899        # We have a tools-dir, check that as well before giving up.
8900        OLD_PATH=$PATH
8901        PATH=$TOOLS_DIR:$PATH
8902        for ac_prog in gmake
8903do
8904  # Extract the first word of "$ac_prog", so it can be a program name with args.
8905set dummy $ac_prog; ac_word=$2
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8907$as_echo_n "checking for $ac_word... " >&6; }
8908if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8909  $as_echo_n "(cached) " >&6
8910else
8911  case $CHECK_TOOLSDIR_GMAKE in
8912  [\\/]* | ?:[\\/]*)
8913  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8914  ;;
8915  *)
8916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919  IFS=$as_save_IFS
8920  test -z "$as_dir" && as_dir=.
8921    for ac_exec_ext in '' $ac_executable_extensions; do
8922  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8923    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925    break 2
8926  fi
8927done
8928  done
8929IFS=$as_save_IFS
8930
8931  ;;
8932esac
8933fi
8934CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8935if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8937$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8938else
8939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
8941fi
8942
8943
8944  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8945done
8946
8947
8948  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8949  DESCRIPTION="gmake in tools-dir"
8950  if test "x$MAKE_CANDIDATE" != x; then
8951    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8952$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8953    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8954    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8955    if test "x$IS_GNU_MAKE" = x; then
8956      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8957$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8958    else
8959      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8960      if test "x$IS_MODERN_MAKE" = x; then
8961        { $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
8962$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;}
8963      else
8964        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8965          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8966            MAKE_EXPECTED_ENV='cygwin'
8967          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8968            MAKE_EXPECTED_ENV='msys'
8969          else
8970            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8971          fi
8972          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8973          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8974        else
8975          # Not relevant for non-Windows
8976          IS_MAKE_CORRECT_ENV=true
8977        fi
8978        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8979          { $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
8980$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;}
8981        else
8982          FOUND_MAKE=$MAKE_CANDIDATE
8983
8984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8985
8986  # First separate the path from the arguments. This will split at the first
8987  # space.
8988  complete="$FOUND_MAKE"
8989  path="${complete%% *}"
8990  tmp="$complete EOL"
8991  arguments="${tmp#* }"
8992
8993  # Input might be given as Windows format, start by converting to
8994  # unix format.
8995  new_path=`$CYGPATH -u "$path"`
8996
8997  # Now try to locate executable using which
8998  new_path=`$WHICH "$new_path" 2> /dev/null`
8999  # bat and cmd files are not always considered executable in cygwin causing which
9000  # to not find them
9001  if test "x$new_path" = x \
9002           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9003           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9004    new_path=`$CYGPATH -u "$path"`
9005  fi
9006  if test "x$new_path" = x; then
9007    # Oops. Which didn't find the executable.
9008    # The splitting of arguments from the executable at a space might have been incorrect,
9009    # since paths with space are more likely in Windows. Give it another try with the whole
9010    # argument.
9011    path="$complete"
9012    arguments="EOL"
9013    new_path=`$CYGPATH -u "$path"`
9014    new_path=`$WHICH "$new_path" 2> /dev/null`
9015    # bat and cmd files are not always considered executable in cygwin causing which
9016    # to not find them
9017    if test "x$new_path" = x \
9018             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9019             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9020      new_path=`$CYGPATH -u "$path"`
9021    fi
9022    if test "x$new_path" = x; then
9023      # It's still not found. Now this is an unrecoverable error.
9024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9025$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9026      has_space=`$ECHO "$complete" | $GREP " "`
9027      if test "x$has_space" != x; then
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9030      fi
9031      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9032    fi
9033  fi
9034
9035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9038  # "foo.exe" is OK but "foo" is an error.
9039  #
9040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9041  # It is also a way to make sure we got the proper file name for the real test later on.
9042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9043  if test "x$test_shortpath" = x; then
9044    # Short path failed, file does not exist as specified.
9045    # Try adding .exe or .cmd
9046    if test -f "${new_path}.exe"; then
9047       input_to_shortpath="${new_path}.exe"
9048    elif test -f "${new_path}.cmd"; then
9049       input_to_shortpath="${new_path}.cmd"
9050    else
9051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9052$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9053      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9054$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9055      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9056    fi
9057  else
9058    input_to_shortpath="$new_path"
9059  fi
9060
9061  # Call helper function which possibly converts this using DOS-style short mode.
9062  # If so, the updated path is stored in $new_path.
9063  new_path="$input_to_shortpath"
9064
9065  input_path="$input_to_shortpath"
9066  # Check if we need to convert this using DOS-style short mode. If the path
9067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9068  # take no chances and rewrite it.
9069  # Note: m4 eats our [], so we need to use [ and ] instead.
9070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9071  if test "x$has_forbidden_chars" != x; then
9072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9076      # Going to short mode and back again did indeed matter. Since short mode is
9077      # case insensitive, let's make it lowercase to improve readability.
9078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9079      # Now convert it back to Unix-stile (cygpath)
9080      input_path=`$CYGPATH -u "$shortmode_path"`
9081      new_path="$input_path"
9082    fi
9083  fi
9084
9085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9086  if test "x$test_cygdrive_prefix" = x; then
9087    # As a simple fix, exclude /usr/bin since it's not a real path.
9088    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9090      # a path prefixed by /cygdrive for fixpath to work.
9091      new_path="$CYGWIN_ROOT_PATH$input_path"
9092    fi
9093  fi
9094
9095  # remove trailing .exe if any
9096  new_path="${new_path/%.exe/}"
9097
9098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9099
9100  # First separate the path from the arguments. This will split at the first
9101  # space.
9102  complete="$FOUND_MAKE"
9103  path="${complete%% *}"
9104  tmp="$complete EOL"
9105  arguments="${tmp#* }"
9106
9107  # Input might be given as Windows format, start by converting to
9108  # unix format.
9109  new_path="$path"
9110
9111  windows_path="$new_path"
9112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9113    unix_path=`$CYGPATH -u "$windows_path"`
9114    new_path="$unix_path"
9115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9117    new_path="$unix_path"
9118  fi
9119
9120
9121  # Now try to locate executable using which
9122  new_path=`$WHICH "$new_path" 2> /dev/null`
9123
9124  if test "x$new_path" = x; then
9125    # Oops. Which didn't find the executable.
9126    # The splitting of arguments from the executable at a space might have been incorrect,
9127    # since paths with space are more likely in Windows. Give it another try with the whole
9128    # argument.
9129    path="$complete"
9130    arguments="EOL"
9131    new_path="$path"
9132
9133  windows_path="$new_path"
9134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9135    unix_path=`$CYGPATH -u "$windows_path"`
9136    new_path="$unix_path"
9137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9139    new_path="$unix_path"
9140  fi
9141
9142
9143    new_path=`$WHICH "$new_path" 2> /dev/null`
9144
9145    if test "x$new_path" = x; then
9146      # It's still not found. Now this is an unrecoverable error.
9147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9148$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9149      has_space=`$ECHO "$complete" | $GREP " "`
9150      if test "x$has_space" != x; then
9151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9153      fi
9154      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9155    fi
9156  fi
9157
9158  # Now new_path has a complete unix path to the binary
9159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9160    # Keep paths in /bin as-is, but remove trailing .exe if any
9161    new_path="${new_path/%.exe/}"
9162    # Do not save /bin paths to all_fixpath_prefixes!
9163  else
9164    # Not in mixed or Windows style, start by that.
9165    new_path=`cmd //c echo $new_path`
9166
9167  input_path="$new_path"
9168  # Check if we need to convert this using DOS-style short mode. If the path
9169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9170  # take no chances and rewrite it.
9171  # Note: m4 eats our [], so we need to use [ and ] instead.
9172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9173  if test "x$has_forbidden_chars" != x; then
9174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9176  fi
9177
9178    # Output is in $new_path
9179
9180  windows_path="$new_path"
9181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9182    unix_path=`$CYGPATH -u "$windows_path"`
9183    new_path="$unix_path"
9184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9186    new_path="$unix_path"
9187  fi
9188
9189    # remove trailing .exe if any
9190    new_path="${new_path/%.exe/}"
9191
9192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9194  fi
9195
9196  else
9197    # We're on a posix platform. Hooray! :)
9198    # First separate the path from the arguments. This will split at the first
9199    # space.
9200    complete="$FOUND_MAKE"
9201    path="${complete%% *}"
9202    tmp="$complete EOL"
9203    arguments="${tmp#* }"
9204
9205    new_path=`$WHICH $path 2> /dev/null`
9206    if test "x$new_path" = x; then
9207      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9208      if test "x$is_absolute_path" != x; then
9209        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9210$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9211        new_path="$path"
9212      else
9213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9214$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9215        has_space=`$ECHO "$complete" | $GREP " "`
9216        if test "x$has_space" != x; then
9217          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9218$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9219        fi
9220        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9221      fi
9222    fi
9223  fi
9224
9225  # Now join together the path and the arguments once again
9226  if test "x$arguments" != xEOL; then
9227      new_complete="$new_path ${arguments% *}"
9228  else
9229      new_complete="$new_path"
9230  fi
9231
9232  if test "x$complete" != "x$new_complete"; then
9233    FOUND_MAKE="$new_complete"
9234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9235$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9236  fi
9237
9238        fi
9239      fi
9240    fi
9241  fi
9242
9243        if test "x$FOUND_MAKE" = x; then
9244          for ac_prog in make
9245do
9246  # Extract the first word of "$ac_prog", so it can be a program name with args.
9247set dummy $ac_prog; ac_word=$2
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249$as_echo_n "checking for $ac_word... " >&6; }
9250if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9251  $as_echo_n "(cached) " >&6
9252else
9253  case $CHECK_TOOLSDIR_MAKE in
9254  [\\/]* | ?:[\\/]*)
9255  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9256  ;;
9257  *)
9258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259for as_dir in $PATH
9260do
9261  IFS=$as_save_IFS
9262  test -z "$as_dir" && as_dir=.
9263    for ac_exec_ext in '' $ac_executable_extensions; do
9264  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9265    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9267    break 2
9268  fi
9269done
9270  done
9271IFS=$as_save_IFS
9272
9273  ;;
9274esac
9275fi
9276CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9277if test -n "$CHECK_TOOLSDIR_MAKE"; then
9278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9279$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9280else
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282$as_echo "no" >&6; }
9283fi
9284
9285
9286  test -n "$CHECK_TOOLSDIR_MAKE" && break
9287done
9288
9289
9290  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9291  DESCRIPTION="make in tools-dir"
9292  if test "x$MAKE_CANDIDATE" != x; then
9293    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9294$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9295    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9296    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9297    if test "x$IS_GNU_MAKE" = x; then
9298      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9299$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9300    else
9301      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9302      if test "x$IS_MODERN_MAKE" = x; then
9303        { $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
9304$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;}
9305      else
9306        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9307          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9308            MAKE_EXPECTED_ENV='cygwin'
9309          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9310            MAKE_EXPECTED_ENV='msys'
9311          else
9312            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9313          fi
9314          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9315          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9316        else
9317          # Not relevant for non-Windows
9318          IS_MAKE_CORRECT_ENV=true
9319        fi
9320        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9321          { $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
9322$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;}
9323        else
9324          FOUND_MAKE=$MAKE_CANDIDATE
9325
9326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9327
9328  # First separate the path from the arguments. This will split at the first
9329  # space.
9330  complete="$FOUND_MAKE"
9331  path="${complete%% *}"
9332  tmp="$complete EOL"
9333  arguments="${tmp#* }"
9334
9335  # Input might be given as Windows format, start by converting to
9336  # unix format.
9337  new_path=`$CYGPATH -u "$path"`
9338
9339  # Now try to locate executable using which
9340  new_path=`$WHICH "$new_path" 2> /dev/null`
9341  # bat and cmd files are not always considered executable in cygwin causing which
9342  # to not find them
9343  if test "x$new_path" = x \
9344           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9345           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9346    new_path=`$CYGPATH -u "$path"`
9347  fi
9348  if test "x$new_path" = x; then
9349    # Oops. Which didn't find the executable.
9350    # The splitting of arguments from the executable at a space might have been incorrect,
9351    # since paths with space are more likely in Windows. Give it another try with the whole
9352    # argument.
9353    path="$complete"
9354    arguments="EOL"
9355    new_path=`$CYGPATH -u "$path"`
9356    new_path=`$WHICH "$new_path" 2> /dev/null`
9357    # bat and cmd files are not always considered executable in cygwin causing which
9358    # to not find them
9359    if test "x$new_path" = x \
9360             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9361             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9362      new_path=`$CYGPATH -u "$path"`
9363    fi
9364    if test "x$new_path" = x; then
9365      # It's still not found. Now this is an unrecoverable error.
9366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9367$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9368      has_space=`$ECHO "$complete" | $GREP " "`
9369      if test "x$has_space" != x; then
9370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9372      fi
9373      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9374    fi
9375  fi
9376
9377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9380  # "foo.exe" is OK but "foo" is an error.
9381  #
9382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9383  # It is also a way to make sure we got the proper file name for the real test later on.
9384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9385  if test "x$test_shortpath" = x; then
9386    # Short path failed, file does not exist as specified.
9387    # Try adding .exe or .cmd
9388    if test -f "${new_path}.exe"; then
9389       input_to_shortpath="${new_path}.exe"
9390    elif test -f "${new_path}.cmd"; then
9391       input_to_shortpath="${new_path}.cmd"
9392    else
9393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9394$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9397      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9398    fi
9399  else
9400    input_to_shortpath="$new_path"
9401  fi
9402
9403  # Call helper function which possibly converts this using DOS-style short mode.
9404  # If so, the updated path is stored in $new_path.
9405  new_path="$input_to_shortpath"
9406
9407  input_path="$input_to_shortpath"
9408  # Check if we need to convert this using DOS-style short mode. If the path
9409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9410  # take no chances and rewrite it.
9411  # Note: m4 eats our [], so we need to use [ and ] instead.
9412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9413  if test "x$has_forbidden_chars" != x; then
9414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9418      # Going to short mode and back again did indeed matter. Since short mode is
9419      # case insensitive, let's make it lowercase to improve readability.
9420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9421      # Now convert it back to Unix-stile (cygpath)
9422      input_path=`$CYGPATH -u "$shortmode_path"`
9423      new_path="$input_path"
9424    fi
9425  fi
9426
9427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9428  if test "x$test_cygdrive_prefix" = x; then
9429    # As a simple fix, exclude /usr/bin since it's not a real path.
9430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9432      # a path prefixed by /cygdrive for fixpath to work.
9433      new_path="$CYGWIN_ROOT_PATH$input_path"
9434    fi
9435  fi
9436
9437  # remove trailing .exe if any
9438  new_path="${new_path/%.exe/}"
9439
9440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9441
9442  # First separate the path from the arguments. This will split at the first
9443  # space.
9444  complete="$FOUND_MAKE"
9445  path="${complete%% *}"
9446  tmp="$complete EOL"
9447  arguments="${tmp#* }"
9448
9449  # Input might be given as Windows format, start by converting to
9450  # unix format.
9451  new_path="$path"
9452
9453  windows_path="$new_path"
9454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9455    unix_path=`$CYGPATH -u "$windows_path"`
9456    new_path="$unix_path"
9457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9459    new_path="$unix_path"
9460  fi
9461
9462
9463  # Now try to locate executable using which
9464  new_path=`$WHICH "$new_path" 2> /dev/null`
9465
9466  if test "x$new_path" = x; then
9467    # Oops. Which didn't find the executable.
9468    # The splitting of arguments from the executable at a space might have been incorrect,
9469    # since paths with space are more likely in Windows. Give it another try with the whole
9470    # argument.
9471    path="$complete"
9472    arguments="EOL"
9473    new_path="$path"
9474
9475  windows_path="$new_path"
9476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9477    unix_path=`$CYGPATH -u "$windows_path"`
9478    new_path="$unix_path"
9479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9481    new_path="$unix_path"
9482  fi
9483
9484
9485    new_path=`$WHICH "$new_path" 2> /dev/null`
9486
9487    if test "x$new_path" = x; then
9488      # It's still not found. Now this is an unrecoverable error.
9489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9490$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9491      has_space=`$ECHO "$complete" | $GREP " "`
9492      if test "x$has_space" != x; then
9493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9495      fi
9496      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9497    fi
9498  fi
9499
9500  # Now new_path has a complete unix path to the binary
9501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9502    # Keep paths in /bin as-is, but remove trailing .exe if any
9503    new_path="${new_path/%.exe/}"
9504    # Do not save /bin paths to all_fixpath_prefixes!
9505  else
9506    # Not in mixed or Windows style, start by that.
9507    new_path=`cmd //c echo $new_path`
9508
9509  input_path="$new_path"
9510  # Check if we need to convert this using DOS-style short mode. If the path
9511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9512  # take no chances and rewrite it.
9513  # Note: m4 eats our [], so we need to use [ and ] instead.
9514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9515  if test "x$has_forbidden_chars" != x; then
9516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9518  fi
9519
9520    # Output is in $new_path
9521
9522  windows_path="$new_path"
9523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9524    unix_path=`$CYGPATH -u "$windows_path"`
9525    new_path="$unix_path"
9526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9528    new_path="$unix_path"
9529  fi
9530
9531    # remove trailing .exe if any
9532    new_path="${new_path/%.exe/}"
9533
9534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9536  fi
9537
9538  else
9539    # We're on a posix platform. Hooray! :)
9540    # First separate the path from the arguments. This will split at the first
9541    # space.
9542    complete="$FOUND_MAKE"
9543    path="${complete%% *}"
9544    tmp="$complete EOL"
9545    arguments="${tmp#* }"
9546
9547    new_path=`$WHICH $path 2> /dev/null`
9548    if test "x$new_path" = x; then
9549      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9550      if test "x$is_absolute_path" != x; then
9551        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9552$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9553        new_path="$path"
9554      else
9555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9556$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9557        has_space=`$ECHO "$complete" | $GREP " "`
9558        if test "x$has_space" != x; then
9559          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9560$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9561        fi
9562        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9563      fi
9564    fi
9565  fi
9566
9567  # Now join together the path and the arguments once again
9568  if test "x$arguments" != xEOL; then
9569      new_complete="$new_path ${arguments% *}"
9570  else
9571      new_complete="$new_path"
9572  fi
9573
9574  if test "x$complete" != "x$new_complete"; then
9575    FOUND_MAKE="$new_complete"
9576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9577$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9578  fi
9579
9580        fi
9581      fi
9582    fi
9583  fi
9584
9585        fi
9586        PATH=$OLD_PATH
9587      fi
9588    fi
9589
9590    if test "x$FOUND_MAKE" = x; then
9591      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
9592    fi
9593  fi
9594
9595  MAKE=$FOUND_MAKE
9596
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9598$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9599
9600
9601
9602    # Test if find supports -delete
9603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9604$as_echo_n "checking if find supports -delete... " >&6; }
9605    FIND_DELETE="-delete"
9606
9607    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9608
9609    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9610
9611    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9612    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9613        # No, it does not.
9614        rm $DELETEDIR/TestIfFindSupportsDelete
9615        FIND_DELETE="-exec rm \{\} \+"
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9617$as_echo "no" >&6; }
9618    else
9619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9620$as_echo "yes" >&6; }
9621    fi
9622    rmdir $DELETEDIR
9623
9624
9625
9626# These tools might not be installed by default,
9627# need hint on how to install them.
9628
9629    for ac_prog in unzip
9630do
9631  # Extract the first word of "$ac_prog", so it can be a program name with args.
9632set dummy $ac_prog; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if test "${ac_cv_path_UNZIP+set}" = set; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $UNZIP in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9650    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661UNZIP=$ac_cv_path_UNZIP
9662if test -n "$UNZIP"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9664$as_echo "$UNZIP" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671  test -n "$UNZIP" && break
9672done
9673
9674
9675    if test "x$UNZIP" = x; then
9676        if test "xunzip" = x; then
9677          PROG_NAME=unzip
9678        else
9679          PROG_NAME=unzip
9680        fi
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9682$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9683        as_fn_error $? "Cannot continue" "$LINENO" 5
9684    fi
9685
9686
9687
9688    for ac_prog in zip
9689do
9690  # Extract the first word of "$ac_prog", so it can be a program name with args.
9691set dummy $ac_prog; ac_word=$2
9692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9693$as_echo_n "checking for $ac_word... " >&6; }
9694if test "${ac_cv_path_ZIP+set}" = set; then :
9695  $as_echo_n "(cached) " >&6
9696else
9697  case $ZIP in
9698  [\\/]* | ?:[\\/]*)
9699  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9700  ;;
9701  *)
9702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9703for as_dir in $PATH
9704do
9705  IFS=$as_save_IFS
9706  test -z "$as_dir" && as_dir=.
9707    for ac_exec_ext in '' $ac_executable_extensions; do
9708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9709    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9711    break 2
9712  fi
9713done
9714  done
9715IFS=$as_save_IFS
9716
9717  ;;
9718esac
9719fi
9720ZIP=$ac_cv_path_ZIP
9721if test -n "$ZIP"; then
9722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9723$as_echo "$ZIP" >&6; }
9724else
9725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9726$as_echo "no" >&6; }
9727fi
9728
9729
9730  test -n "$ZIP" && break
9731done
9732
9733
9734    if test "x$ZIP" = x; then
9735        if test "xzip" = x; then
9736          PROG_NAME=zip
9737        else
9738          PROG_NAME=zip
9739        fi
9740        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9741$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9742        as_fn_error $? "Cannot continue" "$LINENO" 5
9743    fi
9744
9745
9746
9747# Non-required basic tools
9748
9749# Extract the first word of "ldd", so it can be a program name with args.
9750set dummy ldd; ac_word=$2
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9752$as_echo_n "checking for $ac_word... " >&6; }
9753if test "${ac_cv_path_LDD+set}" = set; then :
9754  $as_echo_n "(cached) " >&6
9755else
9756  case $LDD in
9757  [\\/]* | ?:[\\/]*)
9758  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9759  ;;
9760  *)
9761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9762for as_dir in $PATH
9763do
9764  IFS=$as_save_IFS
9765  test -z "$as_dir" && as_dir=.
9766    for ac_exec_ext in '' $ac_executable_extensions; do
9767  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9768    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9770    break 2
9771  fi
9772done
9773  done
9774IFS=$as_save_IFS
9775
9776  ;;
9777esac
9778fi
9779LDD=$ac_cv_path_LDD
9780if test -n "$LDD"; then
9781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9782$as_echo "$LDD" >&6; }
9783else
9784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785$as_echo "no" >&6; }
9786fi
9787
9788
9789if test "x$LDD" = "x"; then
9790    # List shared lib dependencies is used for
9791    # debug output and checking for forbidden dependencies.
9792    # We can build without it.
9793    LDD="true"
9794fi
9795# Extract the first word of "otool", so it can be a program name with args.
9796set dummy otool; ac_word=$2
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9798$as_echo_n "checking for $ac_word... " >&6; }
9799if test "${ac_cv_path_OTOOL+set}" = set; then :
9800  $as_echo_n "(cached) " >&6
9801else
9802  case $OTOOL in
9803  [\\/]* | ?:[\\/]*)
9804  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9805  ;;
9806  *)
9807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9808for as_dir in $PATH
9809do
9810  IFS=$as_save_IFS
9811  test -z "$as_dir" && as_dir=.
9812    for ac_exec_ext in '' $ac_executable_extensions; do
9813  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9814    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9816    break 2
9817  fi
9818done
9819  done
9820IFS=$as_save_IFS
9821
9822  ;;
9823esac
9824fi
9825OTOOL=$ac_cv_path_OTOOL
9826if test -n "$OTOOL"; then
9827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9828$as_echo "$OTOOL" >&6; }
9829else
9830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9831$as_echo "no" >&6; }
9832fi
9833
9834
9835if test "x$OTOOL" = "x"; then
9836   OTOOL="true"
9837fi
9838for ac_prog in readelf greadelf
9839do
9840  # Extract the first word of "$ac_prog", so it can be a program name with args.
9841set dummy $ac_prog; ac_word=$2
9842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9843$as_echo_n "checking for $ac_word... " >&6; }
9844if test "${ac_cv_path_READELF+set}" = set; then :
9845  $as_echo_n "(cached) " >&6
9846else
9847  case $READELF in
9848  [\\/]* | ?:[\\/]*)
9849  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9850  ;;
9851  *)
9852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9853for as_dir in $PATH
9854do
9855  IFS=$as_save_IFS
9856  test -z "$as_dir" && as_dir=.
9857    for ac_exec_ext in '' $ac_executable_extensions; do
9858  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9859    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9861    break 2
9862  fi
9863done
9864  done
9865IFS=$as_save_IFS
9866
9867  ;;
9868esac
9869fi
9870READELF=$ac_cv_path_READELF
9871if test -n "$READELF"; then
9872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9873$as_echo "$READELF" >&6; }
9874else
9875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9876$as_echo "no" >&6; }
9877fi
9878
9879
9880  test -n "$READELF" && break
9881done
9882
9883# Extract the first word of "hg", so it can be a program name with args.
9884set dummy hg; ac_word=$2
9885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9886$as_echo_n "checking for $ac_word... " >&6; }
9887if test "${ac_cv_path_HG+set}" = set; then :
9888  $as_echo_n "(cached) " >&6
9889else
9890  case $HG in
9891  [\\/]* | ?:[\\/]*)
9892  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9893  ;;
9894  *)
9895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9896for as_dir in $PATH
9897do
9898  IFS=$as_save_IFS
9899  test -z "$as_dir" && as_dir=.
9900    for ac_exec_ext in '' $ac_executable_extensions; do
9901  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9902    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9904    break 2
9905  fi
9906done
9907  done
9908IFS=$as_save_IFS
9909
9910  ;;
9911esac
9912fi
9913HG=$ac_cv_path_HG
9914if test -n "$HG"; then
9915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9916$as_echo "$HG" >&6; }
9917else
9918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9919$as_echo "no" >&6; }
9920fi
9921
9922
9923# Extract the first word of "stat", so it can be a program name with args.
9924set dummy stat; ac_word=$2
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9926$as_echo_n "checking for $ac_word... " >&6; }
9927if test "${ac_cv_path_STAT+set}" = set; then :
9928  $as_echo_n "(cached) " >&6
9929else
9930  case $STAT in
9931  [\\/]* | ?:[\\/]*)
9932  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9933  ;;
9934  *)
9935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9936for as_dir in $PATH
9937do
9938  IFS=$as_save_IFS
9939  test -z "$as_dir" && as_dir=.
9940    for ac_exec_ext in '' $ac_executable_extensions; do
9941  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9942    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9944    break 2
9945  fi
9946done
9947  done
9948IFS=$as_save_IFS
9949
9950  ;;
9951esac
9952fi
9953STAT=$ac_cv_path_STAT
9954if test -n "$STAT"; then
9955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9956$as_echo "$STAT" >&6; }
9957else
9958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9959$as_echo "no" >&6; }
9960fi
9961
9962
9963# Extract the first word of "time", so it can be a program name with args.
9964set dummy time; ac_word=$2
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9966$as_echo_n "checking for $ac_word... " >&6; }
9967if test "${ac_cv_path_TIME+set}" = set; then :
9968  $as_echo_n "(cached) " >&6
9969else
9970  case $TIME in
9971  [\\/]* | ?:[\\/]*)
9972  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9973  ;;
9974  *)
9975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9976for as_dir in $PATH
9977do
9978  IFS=$as_save_IFS
9979  test -z "$as_dir" && as_dir=.
9980    for ac_exec_ext in '' $ac_executable_extensions; do
9981  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9982    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9984    break 2
9985  fi
9986done
9987  done
9988IFS=$as_save_IFS
9989
9990  ;;
9991esac
9992fi
9993TIME=$ac_cv_path_TIME
9994if test -n "$TIME"; then
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9996$as_echo "$TIME" >&6; }
9997else
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
10000fi
10001
10002
10003
10004if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10005
10006    for ac_prog in comm
10007do
10008  # Extract the first word of "$ac_prog", so it can be a program name with args.
10009set dummy $ac_prog; ac_word=$2
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10011$as_echo_n "checking for $ac_word... " >&6; }
10012if test "${ac_cv_path_COMM+set}" = set; then :
10013  $as_echo_n "(cached) " >&6
10014else
10015  case $COMM in
10016  [\\/]* | ?:[\\/]*)
10017  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10018  ;;
10019  *)
10020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10021for as_dir in $PATH
10022do
10023  IFS=$as_save_IFS
10024  test -z "$as_dir" && as_dir=.
10025    for ac_exec_ext in '' $ac_executable_extensions; do
10026  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10027    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10029    break 2
10030  fi
10031done
10032  done
10033IFS=$as_save_IFS
10034
10035  ;;
10036esac
10037fi
10038COMM=$ac_cv_path_COMM
10039if test -n "$COMM"; then
10040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10041$as_echo "$COMM" >&6; }
10042else
10043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
10045fi
10046
10047
10048  test -n "$COMM" && break
10049done
10050
10051
10052    if test "x$COMM" = x; then
10053        if test "xcomm" = x; then
10054          PROG_NAME=comm
10055        else
10056          PROG_NAME=comm
10057        fi
10058        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10059$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10060        as_fn_error $? "Cannot continue" "$LINENO" 5
10061    fi
10062
10063
10064fi
10065
10066
10067# Check if pkg-config is available.
10068
10069
10070if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10071	if test -n "$ac_tool_prefix"; then
10072  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10073set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10075$as_echo_n "checking for $ac_word... " >&6; }
10076if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10077  $as_echo_n "(cached) " >&6
10078else
10079  case $PKG_CONFIG in
10080  [\\/]* | ?:[\\/]*)
10081  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10082  ;;
10083  *)
10084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10085for as_dir in $PATH
10086do
10087  IFS=$as_save_IFS
10088  test -z "$as_dir" && as_dir=.
10089    for ac_exec_ext in '' $ac_executable_extensions; do
10090  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10091    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10093    break 2
10094  fi
10095done
10096  done
10097IFS=$as_save_IFS
10098
10099  ;;
10100esac
10101fi
10102PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10103if test -n "$PKG_CONFIG"; then
10104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10105$as_echo "$PKG_CONFIG" >&6; }
10106else
10107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10108$as_echo "no" >&6; }
10109fi
10110
10111
10112fi
10113if test -z "$ac_cv_path_PKG_CONFIG"; then
10114  ac_pt_PKG_CONFIG=$PKG_CONFIG
10115  # Extract the first word of "pkg-config", so it can be a program name with args.
10116set dummy pkg-config; ac_word=$2
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10118$as_echo_n "checking for $ac_word... " >&6; }
10119if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10120  $as_echo_n "(cached) " >&6
10121else
10122  case $ac_pt_PKG_CONFIG in
10123  [\\/]* | ?:[\\/]*)
10124  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10125  ;;
10126  *)
10127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10128for as_dir in $PATH
10129do
10130  IFS=$as_save_IFS
10131  test -z "$as_dir" && as_dir=.
10132    for ac_exec_ext in '' $ac_executable_extensions; do
10133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10134    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10136    break 2
10137  fi
10138done
10139  done
10140IFS=$as_save_IFS
10141
10142  ;;
10143esac
10144fi
10145ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10146if test -n "$ac_pt_PKG_CONFIG"; then
10147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10148$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10149else
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
10152fi
10153
10154  if test "x$ac_pt_PKG_CONFIG" = x; then
10155    PKG_CONFIG=""
10156  else
10157    case $cross_compiling:$ac_tool_warned in
10158yes:)
10159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10161ac_tool_warned=yes ;;
10162esac
10163    PKG_CONFIG=$ac_pt_PKG_CONFIG
10164  fi
10165else
10166  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10167fi
10168
10169fi
10170if test -n "$PKG_CONFIG"; then
10171	_pkg_min_version=0.9.0
10172	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10173$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10174	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10175		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10176$as_echo "yes" >&6; }
10177	else
10178		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179$as_echo "no" >&6; }
10180		PKG_CONFIG=""
10181	fi
10182
10183fi
10184
10185# After basic tools have been setup, we can check build os specific details.
10186
10187###############################################################################
10188
10189# Note that this is the build platform OS version!
10190
10191OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10192OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10193OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10194OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10195
10196
10197
10198
10199
10200# Setup builddeps, for automatic downloading of tools we need.
10201# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10202# boot-jdk setup, but we need to have basic tools setup first.
10203
10204
10205# Check whether --with-builddeps-conf was given.
10206if test "${with_builddeps_conf+set}" = set; then :
10207  withval=$with_builddeps_conf;
10208fi
10209
10210
10211
10212# Check whether --with-builddeps-server was given.
10213if test "${with_builddeps_server+set}" = set; then :
10214  withval=$with_builddeps_server;
10215fi
10216
10217
10218
10219# Check whether --with-builddeps-dir was given.
10220if test "${with_builddeps_dir+set}" = set; then :
10221  withval=$with_builddeps_dir;
10222else
10223  with_builddeps_dir=/localhome/builddeps
10224fi
10225
10226
10227
10228# Check whether --with-builddeps-group was given.
10229if test "${with_builddeps_group+set}" = set; then :
10230  withval=$with_builddeps_group;
10231fi
10232
10233
10234
10235
10236    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10237        if test "x$with_builddeps_conf" != x; then
10238            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10239$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10240            builddepsfile=$with_builddeps_conf
10241            if test -s $builddepsfile; then
10242                . $builddepsfile
10243                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10244$as_echo "loaded!" >&6; }
10245            else
10246               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10247           fi
10248        else
10249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10250$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10251            builddepsfile=`mktemp`
10252            touch $builddepsfile
10253            # Put all found confs into a single file.
10254            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10255            # Source the file to acquire the variables
10256            if test -s $builddepsfile; then
10257                . $builddepsfile
10258                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10259$as_echo "found at least one!" >&6; }
10260            else
10261               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10262           fi
10263        fi
10264        # Create build and target names that use _ instead of "-" and ".".
10265        # This is necessary to use them in variable names.
10266        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10267        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10268        # Extract rewrite information for build and target
10269        eval rewritten_build=\${REWRITE_${build_var}}
10270        if test "x$rewritten_build" = x; then
10271            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10272            echo Build stays the same $rewritten_build
10273        else
10274            echo Rewriting build for builddeps into $rewritten_build
10275        fi
10276        eval rewritten_target=\${REWRITE_${target_var}}
10277        if test "x$rewritten_target" = x; then
10278            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10279            echo Target stays the same $rewritten_target
10280        else
10281            echo Rewriting target for builddeps into $rewritten_target
10282        fi
10283        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10284        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10285    fi
10286    for ac_prog in 7z unzip
10287do
10288  # Extract the first word of "$ac_prog", so it can be a program name with args.
10289set dummy $ac_prog; ac_word=$2
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10291$as_echo_n "checking for $ac_word... " >&6; }
10292if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  if test -n "$BDEPS_UNZIP"; then
10296  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10297else
10298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10299for as_dir in $PATH
10300do
10301  IFS=$as_save_IFS
10302  test -z "$as_dir" && as_dir=.
10303    for ac_exec_ext in '' $ac_executable_extensions; do
10304  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10305    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10307    break 2
10308  fi
10309done
10310  done
10311IFS=$as_save_IFS
10312
10313fi
10314fi
10315BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10316if test -n "$BDEPS_UNZIP"; then
10317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10318$as_echo "$BDEPS_UNZIP" >&6; }
10319else
10320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
10322fi
10323
10324
10325  test -n "$BDEPS_UNZIP" && break
10326done
10327
10328    if test "x$BDEPS_UNZIP" = x7z; then
10329        BDEPS_UNZIP="7z x"
10330    fi
10331
10332    for ac_prog in wget lftp ftp
10333do
10334  # Extract the first word of "$ac_prog", so it can be a program name with args.
10335set dummy $ac_prog; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  if test -n "$BDEPS_FTP"; then
10342  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10343else
10344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10351    ac_cv_prog_BDEPS_FTP="$ac_prog"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359fi
10360fi
10361BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10362if test -n "$BDEPS_FTP"; then
10363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10364$as_echo "$BDEPS_FTP" >&6; }
10365else
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10367$as_echo "no" >&6; }
10368fi
10369
10370
10371  test -n "$BDEPS_FTP" && break
10372done
10373
10374
10375
10376###############################################################################
10377#
10378# Determine OpenJDK variants, options and version numbers.
10379#
10380###############################################################################
10381
10382# We need build & target for this.
10383
10384
10385###############################################################################
10386#
10387# Should we build only OpenJDK even if closed sources are present?
10388#
10389# Check whether --enable-openjdk-only was given.
10390if test "${enable_openjdk_only+set}" = set; then :
10391  enableval=$enable_openjdk_only;
10392else
10393  enable_openjdk_only="no"
10394fi
10395
10396
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10398$as_echo_n "checking for presence of closed sources... " >&6; }
10399if test -d "$SRC_ROOT/jdk/src/closed"; then
10400    CLOSED_SOURCE_PRESENT=yes
10401else
10402    CLOSED_SOURCE_PRESENT=no
10403fi
10404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10405$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10406
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10408$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10409SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10411$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10412
10413if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10414  OPENJDK=true
10415  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10416    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10417$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10418  fi
10419else
10420  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10421    OPENJDK=true
10422  else
10423    OPENJDK=false
10424  fi
10425fi
10426
10427if test "x$OPENJDK" = "xtrue"; then
10428    SET_OPENJDK="OPENJDK=true"
10429fi
10430
10431
10432
10433###############################################################################
10434#
10435# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10436# We always build headless support.
10437#
10438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10439$as_echo_n "checking headful support... " >&6; }
10440# Check whether --enable-headful was given.
10441if test "${enable_headful+set}" = set; then :
10442  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10443else
10444  SUPPORT_HEADFUL=yes
10445fi
10446
10447
10448SUPPORT_HEADLESS=yes
10449BUILD_HEADLESS="BUILD_HEADLESS:=true"
10450
10451if test "x$SUPPORT_HEADFUL" = xyes; then
10452    # We are building both headful and headless.
10453    headful_msg="inlude support for both headful and headless"
10454fi
10455
10456if test "x$SUPPORT_HEADFUL" = xno; then
10457    # Thus we are building headless only.
10458    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10459    headful_msg="headless only"
10460fi
10461
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10463$as_echo "$headful_msg" >&6; }
10464
10465
10466
10467
10468
10469# Control wether Hotspot runs Queens test after build.
10470# Check whether --enable-hotspot-test-in-build was given.
10471if test "${enable_hotspot_test_in_build+set}" = set; then :
10472  enableval=$enable_hotspot_test_in_build;
10473else
10474  enable_hotspot_test_in_build=no
10475fi
10476
10477if test "x$enable_hotspot_test_in_build" = "xyes"; then
10478    TEST_IN_BUILD=true
10479else
10480    TEST_IN_BUILD=false
10481fi
10482
10483
10484###############################################################################
10485#
10486# Choose cacerts source file
10487#
10488
10489# Check whether --with-cacerts-file was given.
10490if test "${with_cacerts_file+set}" = set; then :
10491  withval=$with_cacerts_file;
10492fi
10493
10494if test "x$with_cacerts_file" != x; then
10495    CACERTS_FILE=$with_cacerts_file
10496else
10497    if test "x$OPENJDK" = "xtrue"; then
10498        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10499    else
10500        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10501    fi
10502fi
10503
10504
10505###############################################################################
10506#
10507# Enable or disable unlimited crypto
10508#
10509# Check whether --enable-unlimited-crypto was given.
10510if test "${enable_unlimited_crypto+set}" = set; then :
10511  enableval=$enable_unlimited_crypto;
10512else
10513  enable_unlimited_crypto=no
10514fi
10515
10516if test "x$enable_unlimited_crypto" = "xyes"; then
10517    UNLIMITED_CRYPTO=true
10518else
10519    UNLIMITED_CRYPTO=false
10520fi
10521
10522
10523###############################################################################
10524#
10525# Compress jars
10526#
10527COMPRESS_JARS=false
10528
10529
10530
10531
10532# Source the version numbers
10533. $AUTOCONF_DIR/version.numbers
10534if test "x$OPENJDK" = "xfalse"; then
10535    . $AUTOCONF_DIR/closed.version.numbers
10536fi
10537# Now set the JDK version, milestone, build number etc.
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552COPYRIGHT_YEAR=`date +'%Y'`
10553
10554
10555RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10556
10557
10558if test "x$JDK_UPDATE_VERSION" != x; then
10559    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10560else
10561    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10562fi
10563
10564
10565if test "x$MILESTONE" != x; then
10566    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10567else
10568    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10569fi
10570
10571
10572if test "x$JDK_BUILD_NUMBER" != x; then
10573    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10574else
10575    JDK_BUILD_NUMBER=b00
10576    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10577    # Avoid [:alnum:] since it depends on the locale.
10578    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10579    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10580    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10581fi
10582
10583COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10584
10585
10586
10587###############################################################################
10588#
10589# Setup BootJDK, used to bootstrap the build.
10590#
10591###############################################################################
10592
10593
10594BOOT_JDK_FOUND=no
10595
10596# Check whether --with-boot-jdk was given.
10597if test "${with_boot_jdk+set}" = set; then :
10598  withval=$with_boot_jdk;
10599fi
10600
10601
10602# We look for the Boot JDK through various means, going from more certain to
10603# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10604# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10605# must check if this is indeed valid; otherwise we'll continue looking.
10606
10607# Test: Is bootjdk explicitely set by command line arguments?
10608
10609  if test "x$BOOT_JDK_FOUND" = xno; then
10610    # Now execute the test
10611
10612if test "x$with_boot_jdk" != x; then
10613    BOOT_JDK=$with_boot_jdk
10614    BOOT_JDK_FOUND=maybe
10615    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10616$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10617fi
10618
10619
10620    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10621    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10622      # Do we have a bin/java?
10623      if test ! -x "$BOOT_JDK/bin/java"; then
10624        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10626        BOOT_JDK_FOUND=no
10627      else
10628        # Do we have a bin/javac?
10629        if test ! -x "$BOOT_JDK/bin/javac"; then
10630          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10632          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10633$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10634          BOOT_JDK_FOUND=no
10635        else
10636          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10637          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10638            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10640            BOOT_JDK_FOUND=no
10641          else
10642            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10643            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10644
10645            # Extra M4 quote needed to protect [] in grep expression.
10646            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10647            if test "x$FOUND_VERSION_78" = x; then
10648              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10650              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10651$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10652              BOOT_JDK_FOUND=no
10653            else
10654              # We're done! :-)
10655              BOOT_JDK_FOUND=yes
10656
10657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10658
10659  # Input might be given as Windows format, start by converting to
10660  # unix format.
10661  path="$BOOT_JDK"
10662  new_path=`$CYGPATH -u "$path"`
10663
10664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10667  # "foo.exe" is OK but "foo" is an error.
10668  #
10669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10670  # It is also a way to make sure we got the proper file name for the real test later on.
10671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10672  if test "x$test_shortpath" = x; then
10673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10675    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10676  fi
10677
10678  # Call helper function which possibly converts this using DOS-style short mode.
10679  # If so, the updated path is stored in $new_path.
10680
10681  input_path="$new_path"
10682  # Check if we need to convert this using DOS-style short mode. If the path
10683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10684  # take no chances and rewrite it.
10685  # Note: m4 eats our [], so we need to use [ and ] instead.
10686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10687  if test "x$has_forbidden_chars" != x; then
10688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10692      # Going to short mode and back again did indeed matter. Since short mode is
10693      # case insensitive, let's make it lowercase to improve readability.
10694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10695      # Now convert it back to Unix-stile (cygpath)
10696      input_path=`$CYGPATH -u "$shortmode_path"`
10697      new_path="$input_path"
10698    fi
10699  fi
10700
10701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10702  if test "x$test_cygdrive_prefix" = x; then
10703    # As a simple fix, exclude /usr/bin since it's not a real path.
10704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10706      # a path prefixed by /cygdrive for fixpath to work.
10707      new_path="$CYGWIN_ROOT_PATH$input_path"
10708    fi
10709  fi
10710
10711
10712  if test "x$path" != "x$new_path"; then
10713    BOOT_JDK="$new_path"
10714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10715$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10716  fi
10717
10718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10719
10720  path="$BOOT_JDK"
10721  has_colon=`$ECHO $path | $GREP ^.:`
10722  new_path="$path"
10723  if test "x$has_colon" = x; then
10724    # Not in mixed or Windows style, start by that.
10725    new_path=`cmd //c echo $path`
10726  fi
10727
10728
10729  input_path="$new_path"
10730  # Check if we need to convert this using DOS-style short mode. If the path
10731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10732  # take no chances and rewrite it.
10733  # Note: m4 eats our [], so we need to use [ and ] instead.
10734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10735  if test "x$has_forbidden_chars" != x; then
10736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10738  fi
10739
10740
10741  windows_path="$new_path"
10742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10743    unix_path=`$CYGPATH -u "$windows_path"`
10744    new_path="$unix_path"
10745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10747    new_path="$unix_path"
10748  fi
10749
10750  if test "x$path" != "x$new_path"; then
10751    BOOT_JDK="$new_path"
10752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10754  fi
10755
10756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10758
10759  else
10760    # We're on a posix platform. Hooray! :)
10761    path="$BOOT_JDK"
10762
10763    if test ! -f "$path" && test ! -d "$path"; then
10764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10765    fi
10766
10767    has_space=`$ECHO "$path" | $GREP " "`
10768    if test "x$has_space" != x; then
10769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10772    fi
10773  fi
10774
10775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10776$as_echo_n "checking for Boot JDK... " >&6; }
10777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10778$as_echo "$BOOT_JDK" >&6; }
10779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10780$as_echo_n "checking Boot JDK version... " >&6; }
10781              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10782              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10783$as_echo "$BOOT_JDK_VERSION" >&6; }
10784            fi # end check jdk version
10785          fi # end check rt.jar
10786        fi # end check javac
10787      fi # end check java
10788    fi # end check boot jdk found
10789  fi
10790
10791if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10792  # Having specified an argument which is incorrect will produce an instant failure;
10793  # we should not go on looking
10794  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10795fi
10796
10797# Test: Is bootjdk available from builddeps?
10798
10799  if test "x$BOOT_JDK_FOUND" = xno; then
10800    # Now execute the test
10801
10802
10803
10804    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10805        # Source the builddeps file again, to make sure it uses the latest variables!
10806        . $builddepsfile
10807        # Look for a target and build machine specific resource!
10808        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10809        if test "x$resource" = x; then
10810            # Ok, lets instead look for a target specific resource
10811            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10812        fi
10813        if test "x$resource" = x; then
10814            # Ok, lets instead look for a build specific resource
10815            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10816        fi
10817        if test "x$resource" = x; then
10818            # Ok, lets instead look for a generic resource
10819            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10820            resource=${builddep_bootjdk}
10821        fi
10822        if test "x$resource" != x; then
10823            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10824$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10825	    # If the resource in the builddeps.conf file is an existing directory,
10826	    # for example /java/linux/cups
10827	    if test -d ${resource}; then
10828	       depdir=${resource}
10829	    else
10830
10831# bootjdk is for example mymodule
10832# $resource is for example libs/general/libmymod_1_2_3.zip
10833# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10834# $with_builddeps_dir is for example /localhome/builddeps
10835# depdir is the name of the variable into which we store the depdir, eg MYMOD
10836# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10837# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10838    filename=`basename $resource`
10839    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10840    filebase=${filename%%.*}
10841    extension=${filename#*.}
10842    installdir=$with_builddeps_dir/$filebase
10843    if test ! -f $installdir/$filename.unpacked; then
10844        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10845$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10846        if test ! -d $installdir; then
10847            mkdir -p $installdir
10848        fi
10849        if test ! -d $installdir; then
10850            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10851        fi
10852        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10853        touch $tmpfile
10854        if test ! -f $tmpfile; then
10855            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10856        fi
10857
10858    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10859    # $tmpfile is the local file name for the downloaded file.
10860    VALID_TOOL=no
10861    if test "x$BDEPS_FTP" = xwget; then
10862       VALID_TOOL=yes
10863       wget -O $tmpfile $with_builddeps_server/$resource
10864    fi
10865    if test "x$BDEPS_FTP" = xlftp; then
10866       VALID_TOOL=yes
10867       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10868    fi
10869    if test "x$BDEPS_FTP" = xftp; then
10870        VALID_TOOL=yes
10871        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10872        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10873        FTPUSERPWD=${FTPSERVER%%@*}
10874        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10875            FTPUSER=${userpwd%%:*}
10876            FTPPWD=${userpwd#*@}
10877            FTPSERVER=${FTPSERVER#*@}
10878        else
10879            FTPUSER=ftp
10880            FTPPWD=ftp
10881        fi
10882        # the "pass" command does not work on some
10883        # ftp clients (read ftp.exe) but if it works,
10884        # passive mode is better!
10885        (\
10886            echo "user $FTPUSER $FTPPWD"        ;\
10887            echo "pass"                         ;\
10888            echo "bin"                          ;\
10889            echo "get $FTPPATH $tmpfile"              ;\
10890        ) | ftp -in $FTPSERVER
10891    fi
10892    if test "x$VALID_TOOL" != xyes; then
10893       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10894    fi
10895
10896        mv $tmpfile $installdir/$filename
10897        if test ! -s $installdir/$filename; then
10898            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10899        fi
10900        case "$extension" in
10901            zip)  echo "Unzipping $installdir/$filename..."
10902               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10903            ;;
10904            tar.gz) echo "Untaring $installdir/$filename..."
10905               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10906            ;;
10907            tgz) echo "Untaring $installdir/$filename..."
10908               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10909            ;;
10910            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10911            ;;
10912        esac
10913    fi
10914    if test -f $installdir/$filename.unpacked; then
10915        depdir=$installdir
10916    fi
10917
10918	    fi
10919            # Source the builddeps file again, because in the previous command, the depdir
10920            # was updated to point at the current build dependency install directory.
10921            . $builddepsfile
10922            # Now extract variables from the builddeps.conf files.
10923            theroot=${builddep_bootjdk_ROOT}
10924            thecflags=${builddep_bootjdk_CFLAGS}
10925            thelibs=${builddep_bootjdk_LIBS}
10926            if test "x$depdir" = x; then
10927                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10928            fi
10929            BOOT_JDK=$depdir
10930            if test "x$theroot" != x; then
10931               BOOT_JDK="$theroot"
10932            fi
10933            if test "x$thecflags" != x; then
10934               BOOT_JDK_CFLAGS="$thecflags"
10935            fi
10936            if test "x$thelibs" != x; then
10937               BOOT_JDK_LIBS="$thelibs"
10938            fi
10939            BOOT_JDK_FOUND=maybe
10940            else BOOT_JDK_FOUND=no
10941
10942        fi
10943        else BOOT_JDK_FOUND=no
10944
10945    fi
10946
10947
10948
10949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10951      # Do we have a bin/java?
10952      if test ! -x "$BOOT_JDK/bin/java"; then
10953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10955        BOOT_JDK_FOUND=no
10956      else
10957        # Do we have a bin/javac?
10958        if test ! -x "$BOOT_JDK/bin/javac"; then
10959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10963          BOOT_JDK_FOUND=no
10964        else
10965          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10966          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10969            BOOT_JDK_FOUND=no
10970          else
10971            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10972            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10973
10974            # Extra M4 quote needed to protect [] in grep expression.
10975            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10976            if test "x$FOUND_VERSION_78" = x; then
10977              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10979              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10980$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10981              BOOT_JDK_FOUND=no
10982            else
10983              # We're done! :-)
10984              BOOT_JDK_FOUND=yes
10985
10986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10987
10988  # Input might be given as Windows format, start by converting to
10989  # unix format.
10990  path="$BOOT_JDK"
10991  new_path=`$CYGPATH -u "$path"`
10992
10993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10996  # "foo.exe" is OK but "foo" is an error.
10997  #
10998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10999  # It is also a way to make sure we got the proper file name for the real test later on.
11000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11001  if test "x$test_shortpath" = x; then
11002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11004    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11005  fi
11006
11007  # Call helper function which possibly converts this using DOS-style short mode.
11008  # If so, the updated path is stored in $new_path.
11009
11010  input_path="$new_path"
11011  # Check if we need to convert this using DOS-style short mode. If the path
11012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11013  # take no chances and rewrite it.
11014  # Note: m4 eats our [], so we need to use [ and ] instead.
11015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11016  if test "x$has_forbidden_chars" != x; then
11017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11021      # Going to short mode and back again did indeed matter. Since short mode is
11022      # case insensitive, let's make it lowercase to improve readability.
11023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11024      # Now convert it back to Unix-stile (cygpath)
11025      input_path=`$CYGPATH -u "$shortmode_path"`
11026      new_path="$input_path"
11027    fi
11028  fi
11029
11030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11031  if test "x$test_cygdrive_prefix" = x; then
11032    # As a simple fix, exclude /usr/bin since it's not a real path.
11033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11035      # a path prefixed by /cygdrive for fixpath to work.
11036      new_path="$CYGWIN_ROOT_PATH$input_path"
11037    fi
11038  fi
11039
11040
11041  if test "x$path" != "x$new_path"; then
11042    BOOT_JDK="$new_path"
11043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11045  fi
11046
11047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11048
11049  path="$BOOT_JDK"
11050  has_colon=`$ECHO $path | $GREP ^.:`
11051  new_path="$path"
11052  if test "x$has_colon" = x; then
11053    # Not in mixed or Windows style, start by that.
11054    new_path=`cmd //c echo $path`
11055  fi
11056
11057
11058  input_path="$new_path"
11059  # Check if we need to convert this using DOS-style short mode. If the path
11060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11061  # take no chances and rewrite it.
11062  # Note: m4 eats our [], so we need to use [ and ] instead.
11063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11064  if test "x$has_forbidden_chars" != x; then
11065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11067  fi
11068
11069
11070  windows_path="$new_path"
11071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11072    unix_path=`$CYGPATH -u "$windows_path"`
11073    new_path="$unix_path"
11074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11076    new_path="$unix_path"
11077  fi
11078
11079  if test "x$path" != "x$new_path"; then
11080    BOOT_JDK="$new_path"
11081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11083  fi
11084
11085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11087
11088  else
11089    # We're on a posix platform. Hooray! :)
11090    path="$BOOT_JDK"
11091
11092    if test ! -f "$path" && test ! -d "$path"; then
11093      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11094    fi
11095
11096    has_space=`$ECHO "$path" | $GREP " "`
11097    if test "x$has_space" != x; then
11098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11100      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11101    fi
11102  fi
11103
11104              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11105$as_echo_n "checking for Boot JDK... " >&6; }
11106              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11107$as_echo "$BOOT_JDK" >&6; }
11108              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11109$as_echo_n "checking Boot JDK version... " >&6; }
11110              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11111              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11112$as_echo "$BOOT_JDK_VERSION" >&6; }
11113            fi # end check jdk version
11114          fi # end check rt.jar
11115        fi # end check javac
11116      fi # end check java
11117    fi # end check boot jdk found
11118  fi
11119
11120
11121# Test: Is $JAVA_HOME set?
11122
11123  if test "x$BOOT_JDK_FOUND" = xno; then
11124    # Now execute the test
11125
11126    if test "x$JAVA_HOME" != x; then
11127        JAVA_HOME_PROCESSED="$JAVA_HOME"
11128
11129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11130
11131  # Input might be given as Windows format, start by converting to
11132  # unix format.
11133  path="$JAVA_HOME_PROCESSED"
11134  new_path=`$CYGPATH -u "$path"`
11135
11136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11139  # "foo.exe" is OK but "foo" is an error.
11140  #
11141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11142  # It is also a way to make sure we got the proper file name for the real test later on.
11143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11144  if test "x$test_shortpath" = x; then
11145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11146$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11147    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11148  fi
11149
11150  # Call helper function which possibly converts this using DOS-style short mode.
11151  # If so, the updated path is stored in $new_path.
11152
11153  input_path="$new_path"
11154  # Check if we need to convert this using DOS-style short mode. If the path
11155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11156  # take no chances and rewrite it.
11157  # Note: m4 eats our [], so we need to use [ and ] instead.
11158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11159  if test "x$has_forbidden_chars" != x; then
11160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11164      # Going to short mode and back again did indeed matter. Since short mode is
11165      # case insensitive, let's make it lowercase to improve readability.
11166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11167      # Now convert it back to Unix-stile (cygpath)
11168      input_path=`$CYGPATH -u "$shortmode_path"`
11169      new_path="$input_path"
11170    fi
11171  fi
11172
11173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11174  if test "x$test_cygdrive_prefix" = x; then
11175    # As a simple fix, exclude /usr/bin since it's not a real path.
11176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11178      # a path prefixed by /cygdrive for fixpath to work.
11179      new_path="$CYGWIN_ROOT_PATH$input_path"
11180    fi
11181  fi
11182
11183
11184  if test "x$path" != "x$new_path"; then
11185    JAVA_HOME_PROCESSED="$new_path"
11186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11187$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11188  fi
11189
11190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11191
11192  path="$JAVA_HOME_PROCESSED"
11193  has_colon=`$ECHO $path | $GREP ^.:`
11194  new_path="$path"
11195  if test "x$has_colon" = x; then
11196    # Not in mixed or Windows style, start by that.
11197    new_path=`cmd //c echo $path`
11198  fi
11199
11200
11201  input_path="$new_path"
11202  # Check if we need to convert this using DOS-style short mode. If the path
11203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11204  # take no chances and rewrite it.
11205  # Note: m4 eats our [], so we need to use [ and ] instead.
11206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11207  if test "x$has_forbidden_chars" != x; then
11208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11210  fi
11211
11212
11213  windows_path="$new_path"
11214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11215    unix_path=`$CYGPATH -u "$windows_path"`
11216    new_path="$unix_path"
11217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11219    new_path="$unix_path"
11220  fi
11221
11222  if test "x$path" != "x$new_path"; then
11223    JAVA_HOME_PROCESSED="$new_path"
11224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11225$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11226  fi
11227
11228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11230
11231  else
11232    # We're on a posix platform. Hooray! :)
11233    path="$JAVA_HOME_PROCESSED"
11234
11235    if test ! -f "$path" && test ! -d "$path"; then
11236      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11237    fi
11238
11239    has_space=`$ECHO "$path" | $GREP " "`
11240    if test "x$has_space" != x; then
11241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11242$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11243      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11244    fi
11245  fi
11246
11247        if test ! -d "$JAVA_HOME_PROCESSED"; then
11248            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11249$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11250        else
11251          # Aha, the user has set a JAVA_HOME
11252          # let us use that as the Boot JDK.
11253          BOOT_JDK="$JAVA_HOME_PROCESSED"
11254          BOOT_JDK_FOUND=maybe
11255          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11256$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11257        fi
11258    fi
11259
11260
11261    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11262    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11263      # Do we have a bin/java?
11264      if test ! -x "$BOOT_JDK/bin/java"; then
11265        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11267        BOOT_JDK_FOUND=no
11268      else
11269        # Do we have a bin/javac?
11270        if test ! -x "$BOOT_JDK/bin/javac"; then
11271          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11273          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11274$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11275          BOOT_JDK_FOUND=no
11276        else
11277          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11278          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11279            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11281            BOOT_JDK_FOUND=no
11282          else
11283            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11284            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11285
11286            # Extra M4 quote needed to protect [] in grep expression.
11287            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11288            if test "x$FOUND_VERSION_78" = x; then
11289              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11291              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11292$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11293              BOOT_JDK_FOUND=no
11294            else
11295              # We're done! :-)
11296              BOOT_JDK_FOUND=yes
11297
11298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11299
11300  # Input might be given as Windows format, start by converting to
11301  # unix format.
11302  path="$BOOT_JDK"
11303  new_path=`$CYGPATH -u "$path"`
11304
11305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11308  # "foo.exe" is OK but "foo" is an error.
11309  #
11310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11311  # It is also a way to make sure we got the proper file name for the real test later on.
11312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11313  if test "x$test_shortpath" = x; then
11314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11316    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11317  fi
11318
11319  # Call helper function which possibly converts this using DOS-style short mode.
11320  # If so, the updated path is stored in $new_path.
11321
11322  input_path="$new_path"
11323  # Check if we need to convert this using DOS-style short mode. If the path
11324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11325  # take no chances and rewrite it.
11326  # Note: m4 eats our [], so we need to use [ and ] instead.
11327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11328  if test "x$has_forbidden_chars" != x; then
11329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11333      # Going to short mode and back again did indeed matter. Since short mode is
11334      # case insensitive, let's make it lowercase to improve readability.
11335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11336      # Now convert it back to Unix-stile (cygpath)
11337      input_path=`$CYGPATH -u "$shortmode_path"`
11338      new_path="$input_path"
11339    fi
11340  fi
11341
11342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11343  if test "x$test_cygdrive_prefix" = x; then
11344    # As a simple fix, exclude /usr/bin since it's not a real path.
11345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11347      # a path prefixed by /cygdrive for fixpath to work.
11348      new_path="$CYGWIN_ROOT_PATH$input_path"
11349    fi
11350  fi
11351
11352
11353  if test "x$path" != "x$new_path"; then
11354    BOOT_JDK="$new_path"
11355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11357  fi
11358
11359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11360
11361  path="$BOOT_JDK"
11362  has_colon=`$ECHO $path | $GREP ^.:`
11363  new_path="$path"
11364  if test "x$has_colon" = x; then
11365    # Not in mixed or Windows style, start by that.
11366    new_path=`cmd //c echo $path`
11367  fi
11368
11369
11370  input_path="$new_path"
11371  # Check if we need to convert this using DOS-style short mode. If the path
11372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11373  # take no chances and rewrite it.
11374  # Note: m4 eats our [], so we need to use [ and ] instead.
11375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11376  if test "x$has_forbidden_chars" != x; then
11377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11379  fi
11380
11381
11382  windows_path="$new_path"
11383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11384    unix_path=`$CYGPATH -u "$windows_path"`
11385    new_path="$unix_path"
11386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11388    new_path="$unix_path"
11389  fi
11390
11391  if test "x$path" != "x$new_path"; then
11392    BOOT_JDK="$new_path"
11393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11395  fi
11396
11397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11399
11400  else
11401    # We're on a posix platform. Hooray! :)
11402    path="$BOOT_JDK"
11403
11404    if test ! -f "$path" && test ! -d "$path"; then
11405      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11406    fi
11407
11408    has_space=`$ECHO "$path" | $GREP " "`
11409    if test "x$has_space" != x; then
11410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11412      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11413    fi
11414  fi
11415
11416              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11417$as_echo_n "checking for Boot JDK... " >&6; }
11418              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11419$as_echo "$BOOT_JDK" >&6; }
11420              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11421$as_echo_n "checking Boot JDK version... " >&6; }
11422              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11423              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11424$as_echo "$BOOT_JDK_VERSION" >&6; }
11425            fi # end check jdk version
11426          fi # end check rt.jar
11427        fi # end check javac
11428      fi # end check java
11429    fi # end check boot jdk found
11430  fi
11431
11432
11433# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11434
11435  if test "x$BOOT_JDK_FOUND" = xno; then
11436    # Now execute the test
11437
11438    if test -x /usr/libexec/java_home; then
11439        BOOT_JDK=`/usr/libexec/java_home`
11440        BOOT_JDK_FOUND=maybe
11441        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11442$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11443    fi
11444
11445
11446    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11447    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11448      # Do we have a bin/java?
11449      if test ! -x "$BOOT_JDK/bin/java"; then
11450        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11452        BOOT_JDK_FOUND=no
11453      else
11454        # Do we have a bin/javac?
11455        if test ! -x "$BOOT_JDK/bin/javac"; then
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11458          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11459$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11460          BOOT_JDK_FOUND=no
11461        else
11462          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11463          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11464            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11466            BOOT_JDK_FOUND=no
11467          else
11468            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11469            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11470
11471            # Extra M4 quote needed to protect [] in grep expression.
11472            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11473            if test "x$FOUND_VERSION_78" = x; then
11474              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11476              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11477$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11478              BOOT_JDK_FOUND=no
11479            else
11480              # We're done! :-)
11481              BOOT_JDK_FOUND=yes
11482
11483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11484
11485  # Input might be given as Windows format, start by converting to
11486  # unix format.
11487  path="$BOOT_JDK"
11488  new_path=`$CYGPATH -u "$path"`
11489
11490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11493  # "foo.exe" is OK but "foo" is an error.
11494  #
11495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11496  # It is also a way to make sure we got the proper file name for the real test later on.
11497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11498  if test "x$test_shortpath" = x; then
11499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11501    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11502  fi
11503
11504  # Call helper function which possibly converts this using DOS-style short mode.
11505  # If so, the updated path is stored in $new_path.
11506
11507  input_path="$new_path"
11508  # Check if we need to convert this using DOS-style short mode. If the path
11509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11510  # take no chances and rewrite it.
11511  # Note: m4 eats our [], so we need to use [ and ] instead.
11512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11513  if test "x$has_forbidden_chars" != x; then
11514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11518      # Going to short mode and back again did indeed matter. Since short mode is
11519      # case insensitive, let's make it lowercase to improve readability.
11520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11521      # Now convert it back to Unix-stile (cygpath)
11522      input_path=`$CYGPATH -u "$shortmode_path"`
11523      new_path="$input_path"
11524    fi
11525  fi
11526
11527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11528  if test "x$test_cygdrive_prefix" = x; then
11529    # As a simple fix, exclude /usr/bin since it's not a real path.
11530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11532      # a path prefixed by /cygdrive for fixpath to work.
11533      new_path="$CYGWIN_ROOT_PATH$input_path"
11534    fi
11535  fi
11536
11537
11538  if test "x$path" != "x$new_path"; then
11539    BOOT_JDK="$new_path"
11540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11541$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11542  fi
11543
11544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11545
11546  path="$BOOT_JDK"
11547  has_colon=`$ECHO $path | $GREP ^.:`
11548  new_path="$path"
11549  if test "x$has_colon" = x; then
11550    # Not in mixed or Windows style, start by that.
11551    new_path=`cmd //c echo $path`
11552  fi
11553
11554
11555  input_path="$new_path"
11556  # Check if we need to convert this using DOS-style short mode. If the path
11557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11558  # take no chances and rewrite it.
11559  # Note: m4 eats our [], so we need to use [ and ] instead.
11560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11561  if test "x$has_forbidden_chars" != x; then
11562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11564  fi
11565
11566
11567  windows_path="$new_path"
11568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11569    unix_path=`$CYGPATH -u "$windows_path"`
11570    new_path="$unix_path"
11571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11573    new_path="$unix_path"
11574  fi
11575
11576  if test "x$path" != "x$new_path"; then
11577    BOOT_JDK="$new_path"
11578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11580  fi
11581
11582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11584
11585  else
11586    # We're on a posix platform. Hooray! :)
11587    path="$BOOT_JDK"
11588
11589    if test ! -f "$path" && test ! -d "$path"; then
11590      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11591    fi
11592
11593    has_space=`$ECHO "$path" | $GREP " "`
11594    if test "x$has_space" != x; then
11595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11597      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11598    fi
11599  fi
11600
11601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11602$as_echo_n "checking for Boot JDK... " >&6; }
11603              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11604$as_echo "$BOOT_JDK" >&6; }
11605              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11606$as_echo_n "checking Boot JDK version... " >&6; }
11607              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11608              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11609$as_echo "$BOOT_JDK_VERSION" >&6; }
11610            fi # end check jdk version
11611          fi # end check rt.jar
11612        fi # end check javac
11613      fi # end check java
11614    fi # end check boot jdk found
11615  fi
11616
11617
11618# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11619
11620  if test "x$BOOT_JDK_FOUND" = xno; then
11621    # Now execute the test
11622
11623    # Extract the first word of "javac", so it can be a program name with args.
11624set dummy javac; ac_word=$2
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
11627if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11628  $as_echo_n "(cached) " >&6
11629else
11630  case $JAVAC_CHECK in
11631  [\\/]* | ?:[\\/]*)
11632  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11633  ;;
11634  *)
11635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_exec_ext in '' $ac_executable_extensions; do
11641  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11642    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11644    break 2
11645  fi
11646done
11647  done
11648IFS=$as_save_IFS
11649
11650  ;;
11651esac
11652fi
11653JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11654if test -n "$JAVAC_CHECK"; then
11655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11656$as_echo "$JAVAC_CHECK" >&6; }
11657else
11658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
11660fi
11661
11662
11663    # Extract the first word of "java", so it can be a program name with args.
11664set dummy java; ac_word=$2
11665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11666$as_echo_n "checking for $ac_word... " >&6; }
11667if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11668  $as_echo_n "(cached) " >&6
11669else
11670  case $JAVA_CHECK in
11671  [\\/]* | ?:[\\/]*)
11672  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11673  ;;
11674  *)
11675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11676for as_dir in $PATH
11677do
11678  IFS=$as_save_IFS
11679  test -z "$as_dir" && as_dir=.
11680    for ac_exec_ext in '' $ac_executable_extensions; do
11681  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11682    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11684    break 2
11685  fi
11686done
11687  done
11688IFS=$as_save_IFS
11689
11690  ;;
11691esac
11692fi
11693JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11694if test -n "$JAVA_CHECK"; then
11695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11696$as_echo "$JAVA_CHECK" >&6; }
11697else
11698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11699$as_echo "no" >&6; }
11700fi
11701
11702
11703    BINARY="$JAVAC_CHECK"
11704    if test "x$JAVAC_CHECK" = x; then
11705        BINARY="$JAVA_CHECK"
11706    fi
11707    if test "x$BINARY" != x; then
11708        # So there is a java(c) binary, it might be part of a JDK.
11709        # Lets find the JDK/JRE directory by following symbolic links.
11710        # Linux/GNU systems often have links from /usr/bin/java to
11711        # /etc/alternatives/java to the real JDK binary.
11712
11713    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11714        # Follow a chain of symbolic links. Use readlink
11715        # where it exists, else fall back to horribly
11716        # complicated shell code.
11717        if test "x$READLINK_TESTED" != yes; then
11718            # On MacOSX there is a readlink tool with a different
11719            # purpose than the GNU readlink tool. Check the found readlink.
11720            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11721            if test "x$ISGNU" = x; then
11722                 # A readlink that we do not know how to use.
11723                 # Are there other non-GNU readlinks out there?
11724                 READLINK_TESTED=yes
11725                 READLINK=
11726            fi
11727        fi
11728
11729        if test "x$READLINK" != x; then
11730            BINARY=`$READLINK -f $BINARY`
11731        else
11732            # Save the current directory for restoring afterwards
11733            STARTDIR=$PWD
11734            COUNTER=0
11735            sym_link_dir=`$DIRNAME $BINARY`
11736            sym_link_file=`$BASENAME $BINARY`
11737            # Use the system pwd and not the shell builtin to resolve directory symlinks
11738            cd $sym_link_dir
11739            cd `$THEPWDCMD`
11740            sym_link_dir=`$THEPWDCMD`
11741            # Resolve file symlinks
11742            while test $COUNTER -lt 20; do
11743                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11744                if test "x$ISLINK" == x; then
11745                    # This is not a symbolic link! We are done!
11746                    break
11747                fi
11748                # Again resolve directory symlinks since the target of the just found
11749                # link could be in a different directory
11750                cd `$DIRNAME $ISLINK`
11751                sym_link_dir=`$THEPWDCMD`
11752                sym_link_file=`$BASENAME $ISLINK`
11753                let COUNTER=COUNTER+1
11754            done
11755            cd $STARTDIR
11756            BINARY=$sym_link_dir/$sym_link_file
11757        fi
11758    fi
11759
11760        BOOT_JDK=`dirname "$BINARY"`
11761        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11762        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11763            # Looks like we found ourselves an JDK
11764            BOOT_JDK_FOUND=maybe
11765            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11766$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11767        fi
11768    fi
11769
11770
11771    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11772    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11773      # Do we have a bin/java?
11774      if test ! -x "$BOOT_JDK/bin/java"; then
11775        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11777        BOOT_JDK_FOUND=no
11778      else
11779        # Do we have a bin/javac?
11780        if test ! -x "$BOOT_JDK/bin/javac"; then
11781          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11783          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11784$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11785          BOOT_JDK_FOUND=no
11786        else
11787          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11788          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11789            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11791            BOOT_JDK_FOUND=no
11792          else
11793            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11794            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11795
11796            # Extra M4 quote needed to protect [] in grep expression.
11797            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11798            if test "x$FOUND_VERSION_78" = x; then
11799              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11801              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11802$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11803              BOOT_JDK_FOUND=no
11804            else
11805              # We're done! :-)
11806              BOOT_JDK_FOUND=yes
11807
11808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11809
11810  # Input might be given as Windows format, start by converting to
11811  # unix format.
11812  path="$BOOT_JDK"
11813  new_path=`$CYGPATH -u "$path"`
11814
11815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11818  # "foo.exe" is OK but "foo" is an error.
11819  #
11820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11821  # It is also a way to make sure we got the proper file name for the real test later on.
11822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11823  if test "x$test_shortpath" = x; then
11824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11827  fi
11828
11829  # Call helper function which possibly converts this using DOS-style short mode.
11830  # If so, the updated path is stored in $new_path.
11831
11832  input_path="$new_path"
11833  # Check if we need to convert this using DOS-style short mode. If the path
11834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11835  # take no chances and rewrite it.
11836  # Note: m4 eats our [], so we need to use [ and ] instead.
11837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11838  if test "x$has_forbidden_chars" != x; then
11839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11843      # Going to short mode and back again did indeed matter. Since short mode is
11844      # case insensitive, let's make it lowercase to improve readability.
11845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11846      # Now convert it back to Unix-stile (cygpath)
11847      input_path=`$CYGPATH -u "$shortmode_path"`
11848      new_path="$input_path"
11849    fi
11850  fi
11851
11852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11853  if test "x$test_cygdrive_prefix" = x; then
11854    # As a simple fix, exclude /usr/bin since it's not a real path.
11855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11857      # a path prefixed by /cygdrive for fixpath to work.
11858      new_path="$CYGWIN_ROOT_PATH$input_path"
11859    fi
11860  fi
11861
11862
11863  if test "x$path" != "x$new_path"; then
11864    BOOT_JDK="$new_path"
11865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11867  fi
11868
11869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11870
11871  path="$BOOT_JDK"
11872  has_colon=`$ECHO $path | $GREP ^.:`
11873  new_path="$path"
11874  if test "x$has_colon" = x; then
11875    # Not in mixed or Windows style, start by that.
11876    new_path=`cmd //c echo $path`
11877  fi
11878
11879
11880  input_path="$new_path"
11881  # Check if we need to convert this using DOS-style short mode. If the path
11882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11883  # take no chances and rewrite it.
11884  # Note: m4 eats our [], so we need to use [ and ] instead.
11885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11886  if test "x$has_forbidden_chars" != x; then
11887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11889  fi
11890
11891
11892  windows_path="$new_path"
11893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11894    unix_path=`$CYGPATH -u "$windows_path"`
11895    new_path="$unix_path"
11896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11898    new_path="$unix_path"
11899  fi
11900
11901  if test "x$path" != "x$new_path"; then
11902    BOOT_JDK="$new_path"
11903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11905  fi
11906
11907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11909
11910  else
11911    # We're on a posix platform. Hooray! :)
11912    path="$BOOT_JDK"
11913
11914    if test ! -f "$path" && test ! -d "$path"; then
11915      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11916    fi
11917
11918    has_space=`$ECHO "$path" | $GREP " "`
11919    if test "x$has_space" != x; then
11920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11922      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11923    fi
11924  fi
11925
11926              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11927$as_echo_n "checking for Boot JDK... " >&6; }
11928              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11929$as_echo "$BOOT_JDK" >&6; }
11930              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11931$as_echo_n "checking Boot JDK version... " >&6; }
11932              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11933              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11934$as_echo "$BOOT_JDK_VERSION" >&6; }
11935            fi # end check jdk version
11936          fi # end check rt.jar
11937        fi # end check javac
11938      fi # end check java
11939    fi # end check boot jdk found
11940  fi
11941
11942
11943# Test: Is there a JDK installed in default, well-known locations?
11944
11945  if test "x$BOOT_JDK_FOUND" = xno; then
11946    # Now execute the test
11947
11948  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11949
11950  if test "x$BOOT_JDK_FOUND" = xno; then
11951    # Now execute the test
11952
11953  if test "x$ProgramW6432" != x; then
11954    VIRTUAL_DIR="$ProgramW6432/Java"
11955
11956  windows_path="$VIRTUAL_DIR"
11957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11958    unix_path=`$CYGPATH -u "$windows_path"`
11959    VIRTUAL_DIR="$unix_path"
11960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11962    VIRTUAL_DIR="$unix_path"
11963  fi
11964
11965
11966  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11967  BOOT_JDK_SUFFIX=""
11968  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11969  if test "x$ALL_JDKS_FOUND" != x; then
11970    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11971
11972  if test "x$BOOT_JDK_FOUND" = xno; then
11973    # Now execute the test
11974
11975        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11976        if test -d "$BOOT_JDK"; then
11977          BOOT_JDK_FOUND=maybe
11978          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11979$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11980        fi
11981
11982
11983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11985      # Do we have a bin/java?
11986      if test ! -x "$BOOT_JDK/bin/java"; then
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11989        BOOT_JDK_FOUND=no
11990      else
11991        # Do we have a bin/javac?
11992        if test ! -x "$BOOT_JDK/bin/javac"; then
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11997          BOOT_JDK_FOUND=no
11998        else
11999          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12000          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12003            BOOT_JDK_FOUND=no
12004          else
12005            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12006            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12007
12008            # Extra M4 quote needed to protect [] in grep expression.
12009            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12010            if test "x$FOUND_VERSION_78" = x; then
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12013              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12014$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12015              BOOT_JDK_FOUND=no
12016            else
12017              # We're done! :-)
12018              BOOT_JDK_FOUND=yes
12019
12020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12021
12022  # Input might be given as Windows format, start by converting to
12023  # unix format.
12024  path="$BOOT_JDK"
12025  new_path=`$CYGPATH -u "$path"`
12026
12027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12030  # "foo.exe" is OK but "foo" is an error.
12031  #
12032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12033  # It is also a way to make sure we got the proper file name for the real test later on.
12034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12035  if test "x$test_shortpath" = x; then
12036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12039  fi
12040
12041  # Call helper function which possibly converts this using DOS-style short mode.
12042  # If so, the updated path is stored in $new_path.
12043
12044  input_path="$new_path"
12045  # Check if we need to convert this using DOS-style short mode. If the path
12046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12047  # take no chances and rewrite it.
12048  # Note: m4 eats our [], so we need to use [ and ] instead.
12049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12050  if test "x$has_forbidden_chars" != x; then
12051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12055      # Going to short mode and back again did indeed matter. Since short mode is
12056      # case insensitive, let's make it lowercase to improve readability.
12057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12058      # Now convert it back to Unix-stile (cygpath)
12059      input_path=`$CYGPATH -u "$shortmode_path"`
12060      new_path="$input_path"
12061    fi
12062  fi
12063
12064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12065  if test "x$test_cygdrive_prefix" = x; then
12066    # As a simple fix, exclude /usr/bin since it's not a real path.
12067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12069      # a path prefixed by /cygdrive for fixpath to work.
12070      new_path="$CYGWIN_ROOT_PATH$input_path"
12071    fi
12072  fi
12073
12074
12075  if test "x$path" != "x$new_path"; then
12076    BOOT_JDK="$new_path"
12077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12079  fi
12080
12081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12082
12083  path="$BOOT_JDK"
12084  has_colon=`$ECHO $path | $GREP ^.:`
12085  new_path="$path"
12086  if test "x$has_colon" = x; then
12087    # Not in mixed or Windows style, start by that.
12088    new_path=`cmd //c echo $path`
12089  fi
12090
12091
12092  input_path="$new_path"
12093  # Check if we need to convert this using DOS-style short mode. If the path
12094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12095  # take no chances and rewrite it.
12096  # Note: m4 eats our [], so we need to use [ and ] instead.
12097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12098  if test "x$has_forbidden_chars" != x; then
12099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12101  fi
12102
12103
12104  windows_path="$new_path"
12105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12106    unix_path=`$CYGPATH -u "$windows_path"`
12107    new_path="$unix_path"
12108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12110    new_path="$unix_path"
12111  fi
12112
12113  if test "x$path" != "x$new_path"; then
12114    BOOT_JDK="$new_path"
12115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12117  fi
12118
12119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12121
12122  else
12123    # We're on a posix platform. Hooray! :)
12124    path="$BOOT_JDK"
12125
12126    if test ! -f "$path" && test ! -d "$path"; then
12127      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12128    fi
12129
12130    has_space=`$ECHO "$path" | $GREP " "`
12131    if test "x$has_space" != x; then
12132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12133$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12134      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12135    fi
12136  fi
12137
12138              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12139$as_echo_n "checking for Boot JDK... " >&6; }
12140              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12141$as_echo "$BOOT_JDK" >&6; }
12142              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12143$as_echo_n "checking Boot JDK version... " >&6; }
12144              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12146$as_echo "$BOOT_JDK_VERSION" >&6; }
12147            fi # end check jdk version
12148          fi # end check rt.jar
12149        fi # end check javac
12150      fi # end check java
12151    fi # end check boot jdk found
12152  fi
12153
12154    done
12155  fi
12156
12157  fi
12158
12159
12160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12162      # Do we have a bin/java?
12163      if test ! -x "$BOOT_JDK/bin/java"; then
12164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12166        BOOT_JDK_FOUND=no
12167      else
12168        # Do we have a bin/javac?
12169        if test ! -x "$BOOT_JDK/bin/javac"; then
12170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12174          BOOT_JDK_FOUND=no
12175        else
12176          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12177          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12180            BOOT_JDK_FOUND=no
12181          else
12182            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12183            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12184
12185            # Extra M4 quote needed to protect [] in grep expression.
12186            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12187            if test "x$FOUND_VERSION_78" = x; then
12188              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12190              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12191$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12192              BOOT_JDK_FOUND=no
12193            else
12194              # We're done! :-)
12195              BOOT_JDK_FOUND=yes
12196
12197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12198
12199  # Input might be given as Windows format, start by converting to
12200  # unix format.
12201  path="$BOOT_JDK"
12202  new_path=`$CYGPATH -u "$path"`
12203
12204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12207  # "foo.exe" is OK but "foo" is an error.
12208  #
12209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12210  # It is also a way to make sure we got the proper file name for the real test later on.
12211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12212  if test "x$test_shortpath" = x; then
12213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12214$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12215    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12216  fi
12217
12218  # Call helper function which possibly converts this using DOS-style short mode.
12219  # If so, the updated path is stored in $new_path.
12220
12221  input_path="$new_path"
12222  # Check if we need to convert this using DOS-style short mode. If the path
12223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12224  # take no chances and rewrite it.
12225  # Note: m4 eats our [], so we need to use [ and ] instead.
12226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12227  if test "x$has_forbidden_chars" != x; then
12228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12232      # Going to short mode and back again did indeed matter. Since short mode is
12233      # case insensitive, let's make it lowercase to improve readability.
12234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12235      # Now convert it back to Unix-stile (cygpath)
12236      input_path=`$CYGPATH -u "$shortmode_path"`
12237      new_path="$input_path"
12238    fi
12239  fi
12240
12241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12242  if test "x$test_cygdrive_prefix" = x; then
12243    # As a simple fix, exclude /usr/bin since it's not a real path.
12244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12246      # a path prefixed by /cygdrive for fixpath to work.
12247      new_path="$CYGWIN_ROOT_PATH$input_path"
12248    fi
12249  fi
12250
12251
12252  if test "x$path" != "x$new_path"; then
12253    BOOT_JDK="$new_path"
12254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12256  fi
12257
12258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12259
12260  path="$BOOT_JDK"
12261  has_colon=`$ECHO $path | $GREP ^.:`
12262  new_path="$path"
12263  if test "x$has_colon" = x; then
12264    # Not in mixed or Windows style, start by that.
12265    new_path=`cmd //c echo $path`
12266  fi
12267
12268
12269  input_path="$new_path"
12270  # Check if we need to convert this using DOS-style short mode. If the path
12271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12272  # take no chances and rewrite it.
12273  # Note: m4 eats our [], so we need to use [ and ] instead.
12274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12275  if test "x$has_forbidden_chars" != x; then
12276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12278  fi
12279
12280
12281  windows_path="$new_path"
12282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12283    unix_path=`$CYGPATH -u "$windows_path"`
12284    new_path="$unix_path"
12285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12287    new_path="$unix_path"
12288  fi
12289
12290  if test "x$path" != "x$new_path"; then
12291    BOOT_JDK="$new_path"
12292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12293$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12294  fi
12295
12296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12298
12299  else
12300    # We're on a posix platform. Hooray! :)
12301    path="$BOOT_JDK"
12302
12303    if test ! -f "$path" && test ! -d "$path"; then
12304      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12305    fi
12306
12307    has_space=`$ECHO "$path" | $GREP " "`
12308    if test "x$has_space" != x; then
12309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12311      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12312    fi
12313  fi
12314
12315              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12316$as_echo_n "checking for Boot JDK... " >&6; }
12317              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12318$as_echo "$BOOT_JDK" >&6; }
12319              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12320$as_echo_n "checking Boot JDK version... " >&6; }
12321              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12322              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12323$as_echo "$BOOT_JDK_VERSION" >&6; }
12324            fi # end check jdk version
12325          fi # end check rt.jar
12326        fi # end check javac
12327      fi # end check java
12328    fi # end check boot jdk found
12329  fi
12330
12331
12332  if test "x$BOOT_JDK_FOUND" = xno; then
12333    # Now execute the test
12334
12335  if test "x$PROGRAMW6432" != x; then
12336    VIRTUAL_DIR="$PROGRAMW6432/Java"
12337
12338  windows_path="$VIRTUAL_DIR"
12339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12340    unix_path=`$CYGPATH -u "$windows_path"`
12341    VIRTUAL_DIR="$unix_path"
12342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12344    VIRTUAL_DIR="$unix_path"
12345  fi
12346
12347
12348  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12349  BOOT_JDK_SUFFIX=""
12350  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12351  if test "x$ALL_JDKS_FOUND" != x; then
12352    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12353
12354  if test "x$BOOT_JDK_FOUND" = xno; then
12355    # Now execute the test
12356
12357        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12358        if test -d "$BOOT_JDK"; then
12359          BOOT_JDK_FOUND=maybe
12360          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12361$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12362        fi
12363
12364
12365    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12366    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12367      # Do we have a bin/java?
12368      if test ! -x "$BOOT_JDK/bin/java"; then
12369        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12371        BOOT_JDK_FOUND=no
12372      else
12373        # Do we have a bin/javac?
12374        if test ! -x "$BOOT_JDK/bin/javac"; then
12375          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12377          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12378$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12379          BOOT_JDK_FOUND=no
12380        else
12381          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12382          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12385            BOOT_JDK_FOUND=no
12386          else
12387            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12388            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12389
12390            # Extra M4 quote needed to protect [] in grep expression.
12391            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12392            if test "x$FOUND_VERSION_78" = x; then
12393              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12395              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12396$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12397              BOOT_JDK_FOUND=no
12398            else
12399              # We're done! :-)
12400              BOOT_JDK_FOUND=yes
12401
12402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12403
12404  # Input might be given as Windows format, start by converting to
12405  # unix format.
12406  path="$BOOT_JDK"
12407  new_path=`$CYGPATH -u "$path"`
12408
12409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12412  # "foo.exe" is OK but "foo" is an error.
12413  #
12414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12415  # It is also a way to make sure we got the proper file name for the real test later on.
12416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12417  if test "x$test_shortpath" = x; then
12418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12421  fi
12422
12423  # Call helper function which possibly converts this using DOS-style short mode.
12424  # If so, the updated path is stored in $new_path.
12425
12426  input_path="$new_path"
12427  # Check if we need to convert this using DOS-style short mode. If the path
12428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12429  # take no chances and rewrite it.
12430  # Note: m4 eats our [], so we need to use [ and ] instead.
12431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12432  if test "x$has_forbidden_chars" != x; then
12433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12437      # Going to short mode and back again did indeed matter. Since short mode is
12438      # case insensitive, let's make it lowercase to improve readability.
12439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12440      # Now convert it back to Unix-stile (cygpath)
12441      input_path=`$CYGPATH -u "$shortmode_path"`
12442      new_path="$input_path"
12443    fi
12444  fi
12445
12446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12447  if test "x$test_cygdrive_prefix" = x; then
12448    # As a simple fix, exclude /usr/bin since it's not a real path.
12449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12451      # a path prefixed by /cygdrive for fixpath to work.
12452      new_path="$CYGWIN_ROOT_PATH$input_path"
12453    fi
12454  fi
12455
12456
12457  if test "x$path" != "x$new_path"; then
12458    BOOT_JDK="$new_path"
12459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12461  fi
12462
12463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12464
12465  path="$BOOT_JDK"
12466  has_colon=`$ECHO $path | $GREP ^.:`
12467  new_path="$path"
12468  if test "x$has_colon" = x; then
12469    # Not in mixed or Windows style, start by that.
12470    new_path=`cmd //c echo $path`
12471  fi
12472
12473
12474  input_path="$new_path"
12475  # Check if we need to convert this using DOS-style short mode. If the path
12476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12477  # take no chances and rewrite it.
12478  # Note: m4 eats our [], so we need to use [ and ] instead.
12479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12480  if test "x$has_forbidden_chars" != x; then
12481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12483  fi
12484
12485
12486  windows_path="$new_path"
12487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12488    unix_path=`$CYGPATH -u "$windows_path"`
12489    new_path="$unix_path"
12490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12492    new_path="$unix_path"
12493  fi
12494
12495  if test "x$path" != "x$new_path"; then
12496    BOOT_JDK="$new_path"
12497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12499  fi
12500
12501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12503
12504  else
12505    # We're on a posix platform. Hooray! :)
12506    path="$BOOT_JDK"
12507
12508    if test ! -f "$path" && test ! -d "$path"; then
12509      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12510    fi
12511
12512    has_space=`$ECHO "$path" | $GREP " "`
12513    if test "x$has_space" != x; then
12514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12516      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12517    fi
12518  fi
12519
12520              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12521$as_echo_n "checking for Boot JDK... " >&6; }
12522              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12523$as_echo "$BOOT_JDK" >&6; }
12524              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12525$as_echo_n "checking Boot JDK version... " >&6; }
12526              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12527              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12528$as_echo "$BOOT_JDK_VERSION" >&6; }
12529            fi # end check jdk version
12530          fi # end check rt.jar
12531        fi # end check javac
12532      fi # end check java
12533    fi # end check boot jdk found
12534  fi
12535
12536    done
12537  fi
12538
12539  fi
12540
12541
12542    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12543    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12544      # Do we have a bin/java?
12545      if test ! -x "$BOOT_JDK/bin/java"; then
12546        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12548        BOOT_JDK_FOUND=no
12549      else
12550        # Do we have a bin/javac?
12551        if test ! -x "$BOOT_JDK/bin/javac"; then
12552          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12554          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12555$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12556          BOOT_JDK_FOUND=no
12557        else
12558          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12559          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12560            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12562            BOOT_JDK_FOUND=no
12563          else
12564            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12566
12567            # Extra M4 quote needed to protect [] in grep expression.
12568            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12569            if test "x$FOUND_VERSION_78" = x; then
12570              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12572              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12573$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12574              BOOT_JDK_FOUND=no
12575            else
12576              # We're done! :-)
12577              BOOT_JDK_FOUND=yes
12578
12579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12580
12581  # Input might be given as Windows format, start by converting to
12582  # unix format.
12583  path="$BOOT_JDK"
12584  new_path=`$CYGPATH -u "$path"`
12585
12586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12589  # "foo.exe" is OK but "foo" is an error.
12590  #
12591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12592  # It is also a way to make sure we got the proper file name for the real test later on.
12593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12594  if test "x$test_shortpath" = x; then
12595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12597    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12598  fi
12599
12600  # Call helper function which possibly converts this using DOS-style short mode.
12601  # If so, the updated path is stored in $new_path.
12602
12603  input_path="$new_path"
12604  # Check if we need to convert this using DOS-style short mode. If the path
12605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12606  # take no chances and rewrite it.
12607  # Note: m4 eats our [], so we need to use [ and ] instead.
12608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12609  if test "x$has_forbidden_chars" != x; then
12610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12614      # Going to short mode and back again did indeed matter. Since short mode is
12615      # case insensitive, let's make it lowercase to improve readability.
12616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12617      # Now convert it back to Unix-stile (cygpath)
12618      input_path=`$CYGPATH -u "$shortmode_path"`
12619      new_path="$input_path"
12620    fi
12621  fi
12622
12623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12624  if test "x$test_cygdrive_prefix" = x; then
12625    # As a simple fix, exclude /usr/bin since it's not a real path.
12626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12628      # a path prefixed by /cygdrive for fixpath to work.
12629      new_path="$CYGWIN_ROOT_PATH$input_path"
12630    fi
12631  fi
12632
12633
12634  if test "x$path" != "x$new_path"; then
12635    BOOT_JDK="$new_path"
12636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12638  fi
12639
12640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12641
12642  path="$BOOT_JDK"
12643  has_colon=`$ECHO $path | $GREP ^.:`
12644  new_path="$path"
12645  if test "x$has_colon" = x; then
12646    # Not in mixed or Windows style, start by that.
12647    new_path=`cmd //c echo $path`
12648  fi
12649
12650
12651  input_path="$new_path"
12652  # Check if we need to convert this using DOS-style short mode. If the path
12653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12654  # take no chances and rewrite it.
12655  # Note: m4 eats our [], so we need to use [ and ] instead.
12656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12657  if test "x$has_forbidden_chars" != x; then
12658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12660  fi
12661
12662
12663  windows_path="$new_path"
12664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12665    unix_path=`$CYGPATH -u "$windows_path"`
12666    new_path="$unix_path"
12667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12669    new_path="$unix_path"
12670  fi
12671
12672  if test "x$path" != "x$new_path"; then
12673    BOOT_JDK="$new_path"
12674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12676  fi
12677
12678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12680
12681  else
12682    # We're on a posix platform. Hooray! :)
12683    path="$BOOT_JDK"
12684
12685    if test ! -f "$path" && test ! -d "$path"; then
12686      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12687    fi
12688
12689    has_space=`$ECHO "$path" | $GREP " "`
12690    if test "x$has_space" != x; then
12691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12693      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12694    fi
12695  fi
12696
12697              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12698$as_echo_n "checking for Boot JDK... " >&6; }
12699              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12700$as_echo "$BOOT_JDK" >&6; }
12701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12702$as_echo_n "checking Boot JDK version... " >&6; }
12703              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12704              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12705$as_echo "$BOOT_JDK_VERSION" >&6; }
12706            fi # end check jdk version
12707          fi # end check rt.jar
12708        fi # end check javac
12709      fi # end check java
12710    fi # end check boot jdk found
12711  fi
12712
12713
12714  if test "x$BOOT_JDK_FOUND" = xno; then
12715    # Now execute the test
12716
12717  if test "x$PROGRAMFILES" != x; then
12718    VIRTUAL_DIR="$PROGRAMFILES/Java"
12719
12720  windows_path="$VIRTUAL_DIR"
12721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12722    unix_path=`$CYGPATH -u "$windows_path"`
12723    VIRTUAL_DIR="$unix_path"
12724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12726    VIRTUAL_DIR="$unix_path"
12727  fi
12728
12729
12730  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12731  BOOT_JDK_SUFFIX=""
12732  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12733  if test "x$ALL_JDKS_FOUND" != x; then
12734    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12735
12736  if test "x$BOOT_JDK_FOUND" = xno; then
12737    # Now execute the test
12738
12739        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12740        if test -d "$BOOT_JDK"; then
12741          BOOT_JDK_FOUND=maybe
12742          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12743$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12744        fi
12745
12746
12747    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12748    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12749      # Do we have a bin/java?
12750      if test ! -x "$BOOT_JDK/bin/java"; then
12751        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12753        BOOT_JDK_FOUND=no
12754      else
12755        # Do we have a bin/javac?
12756        if test ! -x "$BOOT_JDK/bin/javac"; then
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12759          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12760$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12761          BOOT_JDK_FOUND=no
12762        else
12763          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12764          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12765            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12767            BOOT_JDK_FOUND=no
12768          else
12769            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12771
12772            # Extra M4 quote needed to protect [] in grep expression.
12773            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12774            if test "x$FOUND_VERSION_78" = x; then
12775              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12777              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12778$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12779              BOOT_JDK_FOUND=no
12780            else
12781              # We're done! :-)
12782              BOOT_JDK_FOUND=yes
12783
12784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12785
12786  # Input might be given as Windows format, start by converting to
12787  # unix format.
12788  path="$BOOT_JDK"
12789  new_path=`$CYGPATH -u "$path"`
12790
12791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12794  # "foo.exe" is OK but "foo" is an error.
12795  #
12796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12797  # It is also a way to make sure we got the proper file name for the real test later on.
12798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12799  if test "x$test_shortpath" = x; then
12800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12801$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12802    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12803  fi
12804
12805  # Call helper function which possibly converts this using DOS-style short mode.
12806  # If so, the updated path is stored in $new_path.
12807
12808  input_path="$new_path"
12809  # Check if we need to convert this using DOS-style short mode. If the path
12810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12811  # take no chances and rewrite it.
12812  # Note: m4 eats our [], so we need to use [ and ] instead.
12813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12814  if test "x$has_forbidden_chars" != x; then
12815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12819      # Going to short mode and back again did indeed matter. Since short mode is
12820      # case insensitive, let's make it lowercase to improve readability.
12821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12822      # Now convert it back to Unix-stile (cygpath)
12823      input_path=`$CYGPATH -u "$shortmode_path"`
12824      new_path="$input_path"
12825    fi
12826  fi
12827
12828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12829  if test "x$test_cygdrive_prefix" = x; then
12830    # As a simple fix, exclude /usr/bin since it's not a real path.
12831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12833      # a path prefixed by /cygdrive for fixpath to work.
12834      new_path="$CYGWIN_ROOT_PATH$input_path"
12835    fi
12836  fi
12837
12838
12839  if test "x$path" != "x$new_path"; then
12840    BOOT_JDK="$new_path"
12841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12843  fi
12844
12845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12846
12847  path="$BOOT_JDK"
12848  has_colon=`$ECHO $path | $GREP ^.:`
12849  new_path="$path"
12850  if test "x$has_colon" = x; then
12851    # Not in mixed or Windows style, start by that.
12852    new_path=`cmd //c echo $path`
12853  fi
12854
12855
12856  input_path="$new_path"
12857  # Check if we need to convert this using DOS-style short mode. If the path
12858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12859  # take no chances and rewrite it.
12860  # Note: m4 eats our [], so we need to use [ and ] instead.
12861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12862  if test "x$has_forbidden_chars" != x; then
12863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12865  fi
12866
12867
12868  windows_path="$new_path"
12869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12870    unix_path=`$CYGPATH -u "$windows_path"`
12871    new_path="$unix_path"
12872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12874    new_path="$unix_path"
12875  fi
12876
12877  if test "x$path" != "x$new_path"; then
12878    BOOT_JDK="$new_path"
12879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12881  fi
12882
12883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12885
12886  else
12887    # We're on a posix platform. Hooray! :)
12888    path="$BOOT_JDK"
12889
12890    if test ! -f "$path" && test ! -d "$path"; then
12891      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12892    fi
12893
12894    has_space=`$ECHO "$path" | $GREP " "`
12895    if test "x$has_space" != x; then
12896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12898      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12899    fi
12900  fi
12901
12902              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12903$as_echo_n "checking for Boot JDK... " >&6; }
12904              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12905$as_echo "$BOOT_JDK" >&6; }
12906              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12907$as_echo_n "checking Boot JDK version... " >&6; }
12908              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12909              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12910$as_echo "$BOOT_JDK_VERSION" >&6; }
12911            fi # end check jdk version
12912          fi # end check rt.jar
12913        fi # end check javac
12914      fi # end check java
12915    fi # end check boot jdk found
12916  fi
12917
12918    done
12919  fi
12920
12921  fi
12922
12923
12924    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12925    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12926      # Do we have a bin/java?
12927      if test ! -x "$BOOT_JDK/bin/java"; then
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12930        BOOT_JDK_FOUND=no
12931      else
12932        # Do we have a bin/javac?
12933        if test ! -x "$BOOT_JDK/bin/javac"; then
12934          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12936          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12937$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12938          BOOT_JDK_FOUND=no
12939        else
12940          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12941          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12942            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12944            BOOT_JDK_FOUND=no
12945          else
12946            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12947            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12948
12949            # Extra M4 quote needed to protect [] in grep expression.
12950            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12951            if test "x$FOUND_VERSION_78" = x; then
12952              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12954              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12955$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12956              BOOT_JDK_FOUND=no
12957            else
12958              # We're done! :-)
12959              BOOT_JDK_FOUND=yes
12960
12961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12962
12963  # Input might be given as Windows format, start by converting to
12964  # unix format.
12965  path="$BOOT_JDK"
12966  new_path=`$CYGPATH -u "$path"`
12967
12968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12971  # "foo.exe" is OK but "foo" is an error.
12972  #
12973  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12974  # It is also a way to make sure we got the proper file name for the real test later on.
12975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12976  if test "x$test_shortpath" = x; then
12977    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12978$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12979    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12980  fi
12981
12982  # Call helper function which possibly converts this using DOS-style short mode.
12983  # If so, the updated path is stored in $new_path.
12984
12985  input_path="$new_path"
12986  # Check if we need to convert this using DOS-style short mode. If the path
12987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12988  # take no chances and rewrite it.
12989  # Note: m4 eats our [], so we need to use [ and ] instead.
12990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12991  if test "x$has_forbidden_chars" != x; then
12992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12996      # Going to short mode and back again did indeed matter. Since short mode is
12997      # case insensitive, let's make it lowercase to improve readability.
12998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12999      # Now convert it back to Unix-stile (cygpath)
13000      input_path=`$CYGPATH -u "$shortmode_path"`
13001      new_path="$input_path"
13002    fi
13003  fi
13004
13005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13006  if test "x$test_cygdrive_prefix" = x; then
13007    # As a simple fix, exclude /usr/bin since it's not a real path.
13008    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13010      # a path prefixed by /cygdrive for fixpath to work.
13011      new_path="$CYGWIN_ROOT_PATH$input_path"
13012    fi
13013  fi
13014
13015
13016  if test "x$path" != "x$new_path"; then
13017    BOOT_JDK="$new_path"
13018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13020  fi
13021
13022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13023
13024  path="$BOOT_JDK"
13025  has_colon=`$ECHO $path | $GREP ^.:`
13026  new_path="$path"
13027  if test "x$has_colon" = x; then
13028    # Not in mixed or Windows style, start by that.
13029    new_path=`cmd //c echo $path`
13030  fi
13031
13032
13033  input_path="$new_path"
13034  # Check if we need to convert this using DOS-style short mode. If the path
13035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13036  # take no chances and rewrite it.
13037  # Note: m4 eats our [], so we need to use [ and ] instead.
13038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13039  if test "x$has_forbidden_chars" != x; then
13040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13042  fi
13043
13044
13045  windows_path="$new_path"
13046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13047    unix_path=`$CYGPATH -u "$windows_path"`
13048    new_path="$unix_path"
13049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13051    new_path="$unix_path"
13052  fi
13053
13054  if test "x$path" != "x$new_path"; then
13055    BOOT_JDK="$new_path"
13056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13058  fi
13059
13060  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13061  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13062
13063  else
13064    # We're on a posix platform. Hooray! :)
13065    path="$BOOT_JDK"
13066
13067    if test ! -f "$path" && test ! -d "$path"; then
13068      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13069    fi
13070
13071    has_space=`$ECHO "$path" | $GREP " "`
13072    if test "x$has_space" != x; then
13073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13075      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13076    fi
13077  fi
13078
13079              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13080$as_echo_n "checking for Boot JDK... " >&6; }
13081              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13082$as_echo "$BOOT_JDK" >&6; }
13083              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13084$as_echo_n "checking Boot JDK version... " >&6; }
13085              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13086              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13087$as_echo "$BOOT_JDK_VERSION" >&6; }
13088            fi # end check jdk version
13089          fi # end check rt.jar
13090        fi # end check javac
13091      fi # end check java
13092    fi # end check boot jdk found
13093  fi
13094
13095
13096  if test "x$BOOT_JDK_FOUND" = xno; then
13097    # Now execute the test
13098
13099  if test "x$ProgramFiles" != x; then
13100    VIRTUAL_DIR="$ProgramFiles/Java"
13101
13102  windows_path="$VIRTUAL_DIR"
13103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13104    unix_path=`$CYGPATH -u "$windows_path"`
13105    VIRTUAL_DIR="$unix_path"
13106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13108    VIRTUAL_DIR="$unix_path"
13109  fi
13110
13111
13112  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13113  BOOT_JDK_SUFFIX=""
13114  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13115  if test "x$ALL_JDKS_FOUND" != x; then
13116    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13117
13118  if test "x$BOOT_JDK_FOUND" = xno; then
13119    # Now execute the test
13120
13121        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13122        if test -d "$BOOT_JDK"; then
13123          BOOT_JDK_FOUND=maybe
13124          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13125$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13126        fi
13127
13128
13129    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13130    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13131      # Do we have a bin/java?
13132      if test ! -x "$BOOT_JDK/bin/java"; then
13133        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13135        BOOT_JDK_FOUND=no
13136      else
13137        # Do we have a bin/javac?
13138        if test ! -x "$BOOT_JDK/bin/javac"; then
13139          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13141          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13142$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13143          BOOT_JDK_FOUND=no
13144        else
13145          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13146          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13147            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13149            BOOT_JDK_FOUND=no
13150          else
13151            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13153
13154            # Extra M4 quote needed to protect [] in grep expression.
13155            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13156            if test "x$FOUND_VERSION_78" = x; then
13157              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13159              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13160$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13161              BOOT_JDK_FOUND=no
13162            else
13163              # We're done! :-)
13164              BOOT_JDK_FOUND=yes
13165
13166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13167
13168  # Input might be given as Windows format, start by converting to
13169  # unix format.
13170  path="$BOOT_JDK"
13171  new_path=`$CYGPATH -u "$path"`
13172
13173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13176  # "foo.exe" is OK but "foo" is an error.
13177  #
13178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13179  # It is also a way to make sure we got the proper file name for the real test later on.
13180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13181  if test "x$test_shortpath" = x; then
13182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13183$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13184    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13185  fi
13186
13187  # Call helper function which possibly converts this using DOS-style short mode.
13188  # If so, the updated path is stored in $new_path.
13189
13190  input_path="$new_path"
13191  # Check if we need to convert this using DOS-style short mode. If the path
13192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13193  # take no chances and rewrite it.
13194  # Note: m4 eats our [], so we need to use [ and ] instead.
13195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13196  if test "x$has_forbidden_chars" != x; then
13197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13201      # Going to short mode and back again did indeed matter. Since short mode is
13202      # case insensitive, let's make it lowercase to improve readability.
13203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13204      # Now convert it back to Unix-stile (cygpath)
13205      input_path=`$CYGPATH -u "$shortmode_path"`
13206      new_path="$input_path"
13207    fi
13208  fi
13209
13210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13211  if test "x$test_cygdrive_prefix" = x; then
13212    # As a simple fix, exclude /usr/bin since it's not a real path.
13213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13215      # a path prefixed by /cygdrive for fixpath to work.
13216      new_path="$CYGWIN_ROOT_PATH$input_path"
13217    fi
13218  fi
13219
13220
13221  if test "x$path" != "x$new_path"; then
13222    BOOT_JDK="$new_path"
13223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13224$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13225  fi
13226
13227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13228
13229  path="$BOOT_JDK"
13230  has_colon=`$ECHO $path | $GREP ^.:`
13231  new_path="$path"
13232  if test "x$has_colon" = x; then
13233    # Not in mixed or Windows style, start by that.
13234    new_path=`cmd //c echo $path`
13235  fi
13236
13237
13238  input_path="$new_path"
13239  # Check if we need to convert this using DOS-style short mode. If the path
13240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13241  # take no chances and rewrite it.
13242  # Note: m4 eats our [], so we need to use [ and ] instead.
13243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13244  if test "x$has_forbidden_chars" != x; then
13245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13247  fi
13248
13249
13250  windows_path="$new_path"
13251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13252    unix_path=`$CYGPATH -u "$windows_path"`
13253    new_path="$unix_path"
13254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13256    new_path="$unix_path"
13257  fi
13258
13259  if test "x$path" != "x$new_path"; then
13260    BOOT_JDK="$new_path"
13261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13263  fi
13264
13265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13267
13268  else
13269    # We're on a posix platform. Hooray! :)
13270    path="$BOOT_JDK"
13271
13272    if test ! -f "$path" && test ! -d "$path"; then
13273      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13274    fi
13275
13276    has_space=`$ECHO "$path" | $GREP " "`
13277    if test "x$has_space" != x; then
13278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13280      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13281    fi
13282  fi
13283
13284              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13285$as_echo_n "checking for Boot JDK... " >&6; }
13286              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13287$as_echo "$BOOT_JDK" >&6; }
13288              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13289$as_echo_n "checking Boot JDK version... " >&6; }
13290              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13291              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13292$as_echo "$BOOT_JDK_VERSION" >&6; }
13293            fi # end check jdk version
13294          fi # end check rt.jar
13295        fi # end check javac
13296      fi # end check java
13297    fi # end check boot jdk found
13298  fi
13299
13300    done
13301  fi
13302
13303  fi
13304
13305
13306    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13307    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13308      # Do we have a bin/java?
13309      if test ! -x "$BOOT_JDK/bin/java"; then
13310        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13312        BOOT_JDK_FOUND=no
13313      else
13314        # Do we have a bin/javac?
13315        if test ! -x "$BOOT_JDK/bin/javac"; then
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13317$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13318          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13319$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13320          BOOT_JDK_FOUND=no
13321        else
13322          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13323          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13324            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13326            BOOT_JDK_FOUND=no
13327          else
13328            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13329            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13330
13331            # Extra M4 quote needed to protect [] in grep expression.
13332            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13333            if test "x$FOUND_VERSION_78" = x; then
13334              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13336              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13337$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13338              BOOT_JDK_FOUND=no
13339            else
13340              # We're done! :-)
13341              BOOT_JDK_FOUND=yes
13342
13343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13344
13345  # Input might be given as Windows format, start by converting to
13346  # unix format.
13347  path="$BOOT_JDK"
13348  new_path=`$CYGPATH -u "$path"`
13349
13350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13353  # "foo.exe" is OK but "foo" is an error.
13354  #
13355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13356  # It is also a way to make sure we got the proper file name for the real test later on.
13357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13358  if test "x$test_shortpath" = x; then
13359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13362  fi
13363
13364  # Call helper function which possibly converts this using DOS-style short mode.
13365  # If so, the updated path is stored in $new_path.
13366
13367  input_path="$new_path"
13368  # Check if we need to convert this using DOS-style short mode. If the path
13369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13370  # take no chances and rewrite it.
13371  # Note: m4 eats our [], so we need to use [ and ] instead.
13372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13373  if test "x$has_forbidden_chars" != x; then
13374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13378      # Going to short mode and back again did indeed matter. Since short mode is
13379      # case insensitive, let's make it lowercase to improve readability.
13380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13381      # Now convert it back to Unix-stile (cygpath)
13382      input_path=`$CYGPATH -u "$shortmode_path"`
13383      new_path="$input_path"
13384    fi
13385  fi
13386
13387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13388  if test "x$test_cygdrive_prefix" = x; then
13389    # As a simple fix, exclude /usr/bin since it's not a real path.
13390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13392      # a path prefixed by /cygdrive for fixpath to work.
13393      new_path="$CYGWIN_ROOT_PATH$input_path"
13394    fi
13395  fi
13396
13397
13398  if test "x$path" != "x$new_path"; then
13399    BOOT_JDK="$new_path"
13400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13402  fi
13403
13404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13405
13406  path="$BOOT_JDK"
13407  has_colon=`$ECHO $path | $GREP ^.:`
13408  new_path="$path"
13409  if test "x$has_colon" = x; then
13410    # Not in mixed or Windows style, start by that.
13411    new_path=`cmd //c echo $path`
13412  fi
13413
13414
13415  input_path="$new_path"
13416  # Check if we need to convert this using DOS-style short mode. If the path
13417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13418  # take no chances and rewrite it.
13419  # Note: m4 eats our [], so we need to use [ and ] instead.
13420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13421  if test "x$has_forbidden_chars" != x; then
13422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13424  fi
13425
13426
13427  windows_path="$new_path"
13428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13429    unix_path=`$CYGPATH -u "$windows_path"`
13430    new_path="$unix_path"
13431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13433    new_path="$unix_path"
13434  fi
13435
13436  if test "x$path" != "x$new_path"; then
13437    BOOT_JDK="$new_path"
13438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13440  fi
13441
13442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13444
13445  else
13446    # We're on a posix platform. Hooray! :)
13447    path="$BOOT_JDK"
13448
13449    if test ! -f "$path" && test ! -d "$path"; then
13450      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13451    fi
13452
13453    has_space=`$ECHO "$path" | $GREP " "`
13454    if test "x$has_space" != x; then
13455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13458    fi
13459  fi
13460
13461              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13462$as_echo_n "checking for Boot JDK... " >&6; }
13463              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13464$as_echo "$BOOT_JDK" >&6; }
13465              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13466$as_echo_n "checking Boot JDK version... " >&6; }
13467              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13468              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13469$as_echo "$BOOT_JDK_VERSION" >&6; }
13470            fi # end check jdk version
13471          fi # end check rt.jar
13472        fi # end check javac
13473      fi # end check java
13474    fi # end check boot jdk found
13475  fi
13476
13477
13478  if test "x$BOOT_JDK_FOUND" = xno; then
13479    # Now execute the test
13480
13481  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13482  BOOT_JDK_SUFFIX=""
13483  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13484  if test "x$ALL_JDKS_FOUND" != x; then
13485    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13486
13487  if test "x$BOOT_JDK_FOUND" = xno; then
13488    # Now execute the test
13489
13490        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13491        if test -d "$BOOT_JDK"; then
13492          BOOT_JDK_FOUND=maybe
13493          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13494$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13495        fi
13496
13497
13498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13500      # Do we have a bin/java?
13501      if test ! -x "$BOOT_JDK/bin/java"; then
13502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13504        BOOT_JDK_FOUND=no
13505      else
13506        # Do we have a bin/javac?
13507        if test ! -x "$BOOT_JDK/bin/javac"; then
13508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13512          BOOT_JDK_FOUND=no
13513        else
13514          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13515          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13516            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13518            BOOT_JDK_FOUND=no
13519          else
13520            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13522
13523            # Extra M4 quote needed to protect [] in grep expression.
13524            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13525            if test "x$FOUND_VERSION_78" = x; then
13526              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13528              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13529$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13530              BOOT_JDK_FOUND=no
13531            else
13532              # We're done! :-)
13533              BOOT_JDK_FOUND=yes
13534
13535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13536
13537  # Input might be given as Windows format, start by converting to
13538  # unix format.
13539  path="$BOOT_JDK"
13540  new_path=`$CYGPATH -u "$path"`
13541
13542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13545  # "foo.exe" is OK but "foo" is an error.
13546  #
13547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13548  # It is also a way to make sure we got the proper file name for the real test later on.
13549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13550  if test "x$test_shortpath" = x; then
13551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13553    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13554  fi
13555
13556  # Call helper function which possibly converts this using DOS-style short mode.
13557  # If so, the updated path is stored in $new_path.
13558
13559  input_path="$new_path"
13560  # Check if we need to convert this using DOS-style short mode. If the path
13561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13562  # take no chances and rewrite it.
13563  # Note: m4 eats our [], so we need to use [ and ] instead.
13564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13565  if test "x$has_forbidden_chars" != x; then
13566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13570      # Going to short mode and back again did indeed matter. Since short mode is
13571      # case insensitive, let's make it lowercase to improve readability.
13572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13573      # Now convert it back to Unix-stile (cygpath)
13574      input_path=`$CYGPATH -u "$shortmode_path"`
13575      new_path="$input_path"
13576    fi
13577  fi
13578
13579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13580  if test "x$test_cygdrive_prefix" = x; then
13581    # As a simple fix, exclude /usr/bin since it's not a real path.
13582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13584      # a path prefixed by /cygdrive for fixpath to work.
13585      new_path="$CYGWIN_ROOT_PATH$input_path"
13586    fi
13587  fi
13588
13589
13590  if test "x$path" != "x$new_path"; then
13591    BOOT_JDK="$new_path"
13592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13593$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13594  fi
13595
13596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13597
13598  path="$BOOT_JDK"
13599  has_colon=`$ECHO $path | $GREP ^.:`
13600  new_path="$path"
13601  if test "x$has_colon" = x; then
13602    # Not in mixed or Windows style, start by that.
13603    new_path=`cmd //c echo $path`
13604  fi
13605
13606
13607  input_path="$new_path"
13608  # Check if we need to convert this using DOS-style short mode. If the path
13609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13610  # take no chances and rewrite it.
13611  # Note: m4 eats our [], so we need to use [ and ] instead.
13612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13613  if test "x$has_forbidden_chars" != x; then
13614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13616  fi
13617
13618
13619  windows_path="$new_path"
13620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13621    unix_path=`$CYGPATH -u "$windows_path"`
13622    new_path="$unix_path"
13623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13625    new_path="$unix_path"
13626  fi
13627
13628  if test "x$path" != "x$new_path"; then
13629    BOOT_JDK="$new_path"
13630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13632  fi
13633
13634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13636
13637  else
13638    # We're on a posix platform. Hooray! :)
13639    path="$BOOT_JDK"
13640
13641    if test ! -f "$path" && test ! -d "$path"; then
13642      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13643    fi
13644
13645    has_space=`$ECHO "$path" | $GREP " "`
13646    if test "x$has_space" != x; then
13647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13648$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13649      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13650    fi
13651  fi
13652
13653              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13654$as_echo_n "checking for Boot JDK... " >&6; }
13655              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13656$as_echo "$BOOT_JDK" >&6; }
13657              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13658$as_echo_n "checking Boot JDK version... " >&6; }
13659              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13660              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13661$as_echo "$BOOT_JDK_VERSION" >&6; }
13662            fi # end check jdk version
13663          fi # end check rt.jar
13664        fi # end check javac
13665      fi # end check java
13666    fi # end check boot jdk found
13667  fi
13668
13669    done
13670  fi
13671
13672
13673    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13674    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13675      # Do we have a bin/java?
13676      if test ! -x "$BOOT_JDK/bin/java"; then
13677        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13679        BOOT_JDK_FOUND=no
13680      else
13681        # Do we have a bin/javac?
13682        if test ! -x "$BOOT_JDK/bin/javac"; then
13683          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13685          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13686$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13687          BOOT_JDK_FOUND=no
13688        else
13689          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13690          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13691            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13693            BOOT_JDK_FOUND=no
13694          else
13695            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13696            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13697
13698            # Extra M4 quote needed to protect [] in grep expression.
13699            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13700            if test "x$FOUND_VERSION_78" = x; then
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13703              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13704$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13705              BOOT_JDK_FOUND=no
13706            else
13707              # We're done! :-)
13708              BOOT_JDK_FOUND=yes
13709
13710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13711
13712  # Input might be given as Windows format, start by converting to
13713  # unix format.
13714  path="$BOOT_JDK"
13715  new_path=`$CYGPATH -u "$path"`
13716
13717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13720  # "foo.exe" is OK but "foo" is an error.
13721  #
13722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13723  # It is also a way to make sure we got the proper file name for the real test later on.
13724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13725  if test "x$test_shortpath" = x; then
13726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13728    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13729  fi
13730
13731  # Call helper function which possibly converts this using DOS-style short mode.
13732  # If so, the updated path is stored in $new_path.
13733
13734  input_path="$new_path"
13735  # Check if we need to convert this using DOS-style short mode. If the path
13736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13737  # take no chances and rewrite it.
13738  # Note: m4 eats our [], so we need to use [ and ] instead.
13739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13740  if test "x$has_forbidden_chars" != x; then
13741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13745      # Going to short mode and back again did indeed matter. Since short mode is
13746      # case insensitive, let's make it lowercase to improve readability.
13747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13748      # Now convert it back to Unix-stile (cygpath)
13749      input_path=`$CYGPATH -u "$shortmode_path"`
13750      new_path="$input_path"
13751    fi
13752  fi
13753
13754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13755  if test "x$test_cygdrive_prefix" = x; then
13756    # As a simple fix, exclude /usr/bin since it's not a real path.
13757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13759      # a path prefixed by /cygdrive for fixpath to work.
13760      new_path="$CYGWIN_ROOT_PATH$input_path"
13761    fi
13762  fi
13763
13764
13765  if test "x$path" != "x$new_path"; then
13766    BOOT_JDK="$new_path"
13767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13769  fi
13770
13771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13772
13773  path="$BOOT_JDK"
13774  has_colon=`$ECHO $path | $GREP ^.:`
13775  new_path="$path"
13776  if test "x$has_colon" = x; then
13777    # Not in mixed or Windows style, start by that.
13778    new_path=`cmd //c echo $path`
13779  fi
13780
13781
13782  input_path="$new_path"
13783  # Check if we need to convert this using DOS-style short mode. If the path
13784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13785  # take no chances and rewrite it.
13786  # Note: m4 eats our [], so we need to use [ and ] instead.
13787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13788  if test "x$has_forbidden_chars" != x; then
13789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13791  fi
13792
13793
13794  windows_path="$new_path"
13795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13796    unix_path=`$CYGPATH -u "$windows_path"`
13797    new_path="$unix_path"
13798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13800    new_path="$unix_path"
13801  fi
13802
13803  if test "x$path" != "x$new_path"; then
13804    BOOT_JDK="$new_path"
13805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13807  fi
13808
13809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13811
13812  else
13813    # We're on a posix platform. Hooray! :)
13814    path="$BOOT_JDK"
13815
13816    if test ! -f "$path" && test ! -d "$path"; then
13817      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13818    fi
13819
13820    has_space=`$ECHO "$path" | $GREP " "`
13821    if test "x$has_space" != x; then
13822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13824      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13825    fi
13826  fi
13827
13828              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13829$as_echo_n "checking for Boot JDK... " >&6; }
13830              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13831$as_echo "$BOOT_JDK" >&6; }
13832              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13833$as_echo_n "checking Boot JDK version... " >&6; }
13834              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13835              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13836$as_echo "$BOOT_JDK_VERSION" >&6; }
13837            fi # end check jdk version
13838          fi # end check rt.jar
13839        fi # end check javac
13840      fi # end check java
13841    fi # end check boot jdk found
13842  fi
13843
13844  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13845
13846  if test "x$BOOT_JDK_FOUND" = xno; then
13847    # Now execute the test
13848
13849  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13850  BOOT_JDK_SUFFIX="/Contents/Home"
13851  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13852  if test "x$ALL_JDKS_FOUND" != x; then
13853    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13854
13855  if test "x$BOOT_JDK_FOUND" = xno; then
13856    # Now execute the test
13857
13858        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13859        if test -d "$BOOT_JDK"; then
13860          BOOT_JDK_FOUND=maybe
13861          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13862$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13863        fi
13864
13865
13866    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13867    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13868      # Do we have a bin/java?
13869      if test ! -x "$BOOT_JDK/bin/java"; then
13870        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13872        BOOT_JDK_FOUND=no
13873      else
13874        # Do we have a bin/javac?
13875        if test ! -x "$BOOT_JDK/bin/javac"; then
13876          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13878          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13879$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13880          BOOT_JDK_FOUND=no
13881        else
13882          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13883          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13884            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13886            BOOT_JDK_FOUND=no
13887          else
13888            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13889            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13890
13891            # Extra M4 quote needed to protect [] in grep expression.
13892            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13893            if test "x$FOUND_VERSION_78" = x; then
13894              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13895$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13896              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13897$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13898              BOOT_JDK_FOUND=no
13899            else
13900              # We're done! :-)
13901              BOOT_JDK_FOUND=yes
13902
13903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13904
13905  # Input might be given as Windows format, start by converting to
13906  # unix format.
13907  path="$BOOT_JDK"
13908  new_path=`$CYGPATH -u "$path"`
13909
13910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13913  # "foo.exe" is OK but "foo" is an error.
13914  #
13915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13916  # It is also a way to make sure we got the proper file name for the real test later on.
13917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13918  if test "x$test_shortpath" = x; then
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13920$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13921    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13922  fi
13923
13924  # Call helper function which possibly converts this using DOS-style short mode.
13925  # If so, the updated path is stored in $new_path.
13926
13927  input_path="$new_path"
13928  # Check if we need to convert this using DOS-style short mode. If the path
13929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13930  # take no chances and rewrite it.
13931  # Note: m4 eats our [], so we need to use [ and ] instead.
13932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13933  if test "x$has_forbidden_chars" != x; then
13934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13938      # Going to short mode and back again did indeed matter. Since short mode is
13939      # case insensitive, let's make it lowercase to improve readability.
13940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13941      # Now convert it back to Unix-stile (cygpath)
13942      input_path=`$CYGPATH -u "$shortmode_path"`
13943      new_path="$input_path"
13944    fi
13945  fi
13946
13947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13948  if test "x$test_cygdrive_prefix" = x; then
13949    # As a simple fix, exclude /usr/bin since it's not a real path.
13950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13952      # a path prefixed by /cygdrive for fixpath to work.
13953      new_path="$CYGWIN_ROOT_PATH$input_path"
13954    fi
13955  fi
13956
13957
13958  if test "x$path" != "x$new_path"; then
13959    BOOT_JDK="$new_path"
13960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13962  fi
13963
13964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13965
13966  path="$BOOT_JDK"
13967  has_colon=`$ECHO $path | $GREP ^.:`
13968  new_path="$path"
13969  if test "x$has_colon" = x; then
13970    # Not in mixed or Windows style, start by that.
13971    new_path=`cmd //c echo $path`
13972  fi
13973
13974
13975  input_path="$new_path"
13976  # Check if we need to convert this using DOS-style short mode. If the path
13977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13978  # take no chances and rewrite it.
13979  # Note: m4 eats our [], so we need to use [ and ] instead.
13980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13981  if test "x$has_forbidden_chars" != x; then
13982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13984  fi
13985
13986
13987  windows_path="$new_path"
13988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13989    unix_path=`$CYGPATH -u "$windows_path"`
13990    new_path="$unix_path"
13991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13993    new_path="$unix_path"
13994  fi
13995
13996  if test "x$path" != "x$new_path"; then
13997    BOOT_JDK="$new_path"
13998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14000  fi
14001
14002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14004
14005  else
14006    # We're on a posix platform. Hooray! :)
14007    path="$BOOT_JDK"
14008
14009    if test ! -f "$path" && test ! -d "$path"; then
14010      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14011    fi
14012
14013    has_space=`$ECHO "$path" | $GREP " "`
14014    if test "x$has_space" != x; then
14015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14017      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14018    fi
14019  fi
14020
14021              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14022$as_echo_n "checking for Boot JDK... " >&6; }
14023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14024$as_echo "$BOOT_JDK" >&6; }
14025              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14026$as_echo_n "checking Boot JDK version... " >&6; }
14027              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14028              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14029$as_echo "$BOOT_JDK_VERSION" >&6; }
14030            fi # end check jdk version
14031          fi # end check rt.jar
14032        fi # end check javac
14033      fi # end check java
14034    fi # end check boot jdk found
14035  fi
14036
14037    done
14038  fi
14039
14040
14041    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14042    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14043      # Do we have a bin/java?
14044      if test ! -x "$BOOT_JDK/bin/java"; then
14045        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14047        BOOT_JDK_FOUND=no
14048      else
14049        # Do we have a bin/javac?
14050        if test ! -x "$BOOT_JDK/bin/javac"; then
14051          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14053          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14054$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14055          BOOT_JDK_FOUND=no
14056        else
14057          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14058          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14059            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14061            BOOT_JDK_FOUND=no
14062          else
14063            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14064            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14065
14066            # Extra M4 quote needed to protect [] in grep expression.
14067            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14068            if test "x$FOUND_VERSION_78" = x; then
14069              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14071              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14072$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14073              BOOT_JDK_FOUND=no
14074            else
14075              # We're done! :-)
14076              BOOT_JDK_FOUND=yes
14077
14078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14079
14080  # Input might be given as Windows format, start by converting to
14081  # unix format.
14082  path="$BOOT_JDK"
14083  new_path=`$CYGPATH -u "$path"`
14084
14085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14088  # "foo.exe" is OK but "foo" is an error.
14089  #
14090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14091  # It is also a way to make sure we got the proper file name for the real test later on.
14092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14093  if test "x$test_shortpath" = x; then
14094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14096    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14097  fi
14098
14099  # Call helper function which possibly converts this using DOS-style short mode.
14100  # If so, the updated path is stored in $new_path.
14101
14102  input_path="$new_path"
14103  # Check if we need to convert this using DOS-style short mode. If the path
14104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14105  # take no chances and rewrite it.
14106  # Note: m4 eats our [], so we need to use [ and ] instead.
14107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14108  if test "x$has_forbidden_chars" != x; then
14109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14113      # Going to short mode and back again did indeed matter. Since short mode is
14114      # case insensitive, let's make it lowercase to improve readability.
14115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14116      # Now convert it back to Unix-stile (cygpath)
14117      input_path=`$CYGPATH -u "$shortmode_path"`
14118      new_path="$input_path"
14119    fi
14120  fi
14121
14122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14123  if test "x$test_cygdrive_prefix" = x; then
14124    # As a simple fix, exclude /usr/bin since it's not a real path.
14125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14127      # a path prefixed by /cygdrive for fixpath to work.
14128      new_path="$CYGWIN_ROOT_PATH$input_path"
14129    fi
14130  fi
14131
14132
14133  if test "x$path" != "x$new_path"; then
14134    BOOT_JDK="$new_path"
14135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14137  fi
14138
14139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14140
14141  path="$BOOT_JDK"
14142  has_colon=`$ECHO $path | $GREP ^.:`
14143  new_path="$path"
14144  if test "x$has_colon" = x; then
14145    # Not in mixed or Windows style, start by that.
14146    new_path=`cmd //c echo $path`
14147  fi
14148
14149
14150  input_path="$new_path"
14151  # Check if we need to convert this using DOS-style short mode. If the path
14152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14153  # take no chances and rewrite it.
14154  # Note: m4 eats our [], so we need to use [ and ] instead.
14155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14156  if test "x$has_forbidden_chars" != x; then
14157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14159  fi
14160
14161
14162  windows_path="$new_path"
14163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14164    unix_path=`$CYGPATH -u "$windows_path"`
14165    new_path="$unix_path"
14166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14168    new_path="$unix_path"
14169  fi
14170
14171  if test "x$path" != "x$new_path"; then
14172    BOOT_JDK="$new_path"
14173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14174$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14175  fi
14176
14177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14179
14180  else
14181    # We're on a posix platform. Hooray! :)
14182    path="$BOOT_JDK"
14183
14184    if test ! -f "$path" && test ! -d "$path"; then
14185      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14186    fi
14187
14188    has_space=`$ECHO "$path" | $GREP " "`
14189    if test "x$has_space" != x; then
14190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14191$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14193    fi
14194  fi
14195
14196              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14197$as_echo_n "checking for Boot JDK... " >&6; }
14198              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14199$as_echo "$BOOT_JDK" >&6; }
14200              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14201$as_echo_n "checking Boot JDK version... " >&6; }
14202              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14203              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14204$as_echo "$BOOT_JDK_VERSION" >&6; }
14205            fi # end check jdk version
14206          fi # end check rt.jar
14207        fi # end check javac
14208      fi # end check java
14209    fi # end check boot jdk found
14210  fi
14211
14212
14213  if test "x$BOOT_JDK_FOUND" = xno; then
14214    # Now execute the test
14215
14216  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14217  BOOT_JDK_SUFFIX="/Contents/Home"
14218  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14219  if test "x$ALL_JDKS_FOUND" != x; then
14220    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14221
14222  if test "x$BOOT_JDK_FOUND" = xno; then
14223    # Now execute the test
14224
14225        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14226        if test -d "$BOOT_JDK"; then
14227          BOOT_JDK_FOUND=maybe
14228          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14229$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14230        fi
14231
14232
14233    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14234    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14235      # Do we have a bin/java?
14236      if test ! -x "$BOOT_JDK/bin/java"; then
14237        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14239        BOOT_JDK_FOUND=no
14240      else
14241        # Do we have a bin/javac?
14242        if test ! -x "$BOOT_JDK/bin/javac"; then
14243          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14245          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14246$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14247          BOOT_JDK_FOUND=no
14248        else
14249          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14250          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14251            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14253            BOOT_JDK_FOUND=no
14254          else
14255            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14257
14258            # Extra M4 quote needed to protect [] in grep expression.
14259            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14260            if test "x$FOUND_VERSION_78" = x; then
14261              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14263              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14264$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14265              BOOT_JDK_FOUND=no
14266            else
14267              # We're done! :-)
14268              BOOT_JDK_FOUND=yes
14269
14270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14271
14272  # Input might be given as Windows format, start by converting to
14273  # unix format.
14274  path="$BOOT_JDK"
14275  new_path=`$CYGPATH -u "$path"`
14276
14277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14280  # "foo.exe" is OK but "foo" is an error.
14281  #
14282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14283  # It is also a way to make sure we got the proper file name for the real test later on.
14284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14285  if test "x$test_shortpath" = x; then
14286    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14287$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14288    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14289  fi
14290
14291  # Call helper function which possibly converts this using DOS-style short mode.
14292  # If so, the updated path is stored in $new_path.
14293
14294  input_path="$new_path"
14295  # Check if we need to convert this using DOS-style short mode. If the path
14296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14297  # take no chances and rewrite it.
14298  # Note: m4 eats our [], so we need to use [ and ] instead.
14299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14300  if test "x$has_forbidden_chars" != x; then
14301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14305      # Going to short mode and back again did indeed matter. Since short mode is
14306      # case insensitive, let's make it lowercase to improve readability.
14307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14308      # Now convert it back to Unix-stile (cygpath)
14309      input_path=`$CYGPATH -u "$shortmode_path"`
14310      new_path="$input_path"
14311    fi
14312  fi
14313
14314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14315  if test "x$test_cygdrive_prefix" = x; then
14316    # As a simple fix, exclude /usr/bin since it's not a real path.
14317    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14319      # a path prefixed by /cygdrive for fixpath to work.
14320      new_path="$CYGWIN_ROOT_PATH$input_path"
14321    fi
14322  fi
14323
14324
14325  if test "x$path" != "x$new_path"; then
14326    BOOT_JDK="$new_path"
14327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14329  fi
14330
14331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14332
14333  path="$BOOT_JDK"
14334  has_colon=`$ECHO $path | $GREP ^.:`
14335  new_path="$path"
14336  if test "x$has_colon" = x; then
14337    # Not in mixed or Windows style, start by that.
14338    new_path=`cmd //c echo $path`
14339  fi
14340
14341
14342  input_path="$new_path"
14343  # Check if we need to convert this using DOS-style short mode. If the path
14344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14345  # take no chances and rewrite it.
14346  # Note: m4 eats our [], so we need to use [ and ] instead.
14347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14348  if test "x$has_forbidden_chars" != x; then
14349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14351  fi
14352
14353
14354  windows_path="$new_path"
14355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14356    unix_path=`$CYGPATH -u "$windows_path"`
14357    new_path="$unix_path"
14358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14360    new_path="$unix_path"
14361  fi
14362
14363  if test "x$path" != "x$new_path"; then
14364    BOOT_JDK="$new_path"
14365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14367  fi
14368
14369  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14370  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14371
14372  else
14373    # We're on a posix platform. Hooray! :)
14374    path="$BOOT_JDK"
14375
14376    if test ! -f "$path" && test ! -d "$path"; then
14377      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14378    fi
14379
14380    has_space=`$ECHO "$path" | $GREP " "`
14381    if test "x$has_space" != x; then
14382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14384      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14385    fi
14386  fi
14387
14388              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14389$as_echo_n "checking for Boot JDK... " >&6; }
14390              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14391$as_echo "$BOOT_JDK" >&6; }
14392              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14393$as_echo_n "checking Boot JDK version... " >&6; }
14394              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14395              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14396$as_echo "$BOOT_JDK_VERSION" >&6; }
14397            fi # end check jdk version
14398          fi # end check rt.jar
14399        fi # end check javac
14400      fi # end check java
14401    fi # end check boot jdk found
14402  fi
14403
14404    done
14405  fi
14406
14407
14408    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14409    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14410      # Do we have a bin/java?
14411      if test ! -x "$BOOT_JDK/bin/java"; then
14412        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14414        BOOT_JDK_FOUND=no
14415      else
14416        # Do we have a bin/javac?
14417        if test ! -x "$BOOT_JDK/bin/javac"; then
14418          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14420          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14421$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14422          BOOT_JDK_FOUND=no
14423        else
14424          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14425          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14426            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14428            BOOT_JDK_FOUND=no
14429          else
14430            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14431            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14432
14433            # Extra M4 quote needed to protect [] in grep expression.
14434            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14435            if test "x$FOUND_VERSION_78" = x; then
14436              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14438              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14439$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14440              BOOT_JDK_FOUND=no
14441            else
14442              # We're done! :-)
14443              BOOT_JDK_FOUND=yes
14444
14445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14446
14447  # Input might be given as Windows format, start by converting to
14448  # unix format.
14449  path="$BOOT_JDK"
14450  new_path=`$CYGPATH -u "$path"`
14451
14452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14455  # "foo.exe" is OK but "foo" is an error.
14456  #
14457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14458  # It is also a way to make sure we got the proper file name for the real test later on.
14459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14460  if test "x$test_shortpath" = x; then
14461    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14462$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14463    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14464  fi
14465
14466  # Call helper function which possibly converts this using DOS-style short mode.
14467  # If so, the updated path is stored in $new_path.
14468
14469  input_path="$new_path"
14470  # Check if we need to convert this using DOS-style short mode. If the path
14471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14472  # take no chances and rewrite it.
14473  # Note: m4 eats our [], so we need to use [ and ] instead.
14474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14475  if test "x$has_forbidden_chars" != x; then
14476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14480      # Going to short mode and back again did indeed matter. Since short mode is
14481      # case insensitive, let's make it lowercase to improve readability.
14482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14483      # Now convert it back to Unix-stile (cygpath)
14484      input_path=`$CYGPATH -u "$shortmode_path"`
14485      new_path="$input_path"
14486    fi
14487  fi
14488
14489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14490  if test "x$test_cygdrive_prefix" = x; then
14491    # As a simple fix, exclude /usr/bin since it's not a real path.
14492    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14494      # a path prefixed by /cygdrive for fixpath to work.
14495      new_path="$CYGWIN_ROOT_PATH$input_path"
14496    fi
14497  fi
14498
14499
14500  if test "x$path" != "x$new_path"; then
14501    BOOT_JDK="$new_path"
14502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14503$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14504  fi
14505
14506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14507
14508  path="$BOOT_JDK"
14509  has_colon=`$ECHO $path | $GREP ^.:`
14510  new_path="$path"
14511  if test "x$has_colon" = x; then
14512    # Not in mixed or Windows style, start by that.
14513    new_path=`cmd //c echo $path`
14514  fi
14515
14516
14517  input_path="$new_path"
14518  # Check if we need to convert this using DOS-style short mode. If the path
14519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14520  # take no chances and rewrite it.
14521  # Note: m4 eats our [], so we need to use [ and ] instead.
14522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14523  if test "x$has_forbidden_chars" != x; then
14524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14526  fi
14527
14528
14529  windows_path="$new_path"
14530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14531    unix_path=`$CYGPATH -u "$windows_path"`
14532    new_path="$unix_path"
14533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14535    new_path="$unix_path"
14536  fi
14537
14538  if test "x$path" != "x$new_path"; then
14539    BOOT_JDK="$new_path"
14540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14541$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14542  fi
14543
14544  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14545  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14546
14547  else
14548    # We're on a posix platform. Hooray! :)
14549    path="$BOOT_JDK"
14550
14551    if test ! -f "$path" && test ! -d "$path"; then
14552      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14553    fi
14554
14555    has_space=`$ECHO "$path" | $GREP " "`
14556    if test "x$has_space" != x; then
14557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14559      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14560    fi
14561  fi
14562
14563              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14564$as_echo_n "checking for Boot JDK... " >&6; }
14565              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14566$as_echo "$BOOT_JDK" >&6; }
14567              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14568$as_echo_n "checking Boot JDK version... " >&6; }
14569              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14570              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14571$as_echo "$BOOT_JDK_VERSION" >&6; }
14572            fi # end check jdk version
14573          fi # end check rt.jar
14574        fi # end check javac
14575      fi # end check java
14576    fi # end check boot jdk found
14577  fi
14578
14579  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14580
14581  if test "x$BOOT_JDK_FOUND" = xno; then
14582    # Now execute the test
14583
14584  BOOT_JDK_PREFIX="/usr/lib/jvm"
14585  BOOT_JDK_SUFFIX=""
14586  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14587  if test "x$ALL_JDKS_FOUND" != x; then
14588    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14589
14590  if test "x$BOOT_JDK_FOUND" = xno; then
14591    # Now execute the test
14592
14593        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14594        if test -d "$BOOT_JDK"; then
14595          BOOT_JDK_FOUND=maybe
14596          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14597$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14598        fi
14599
14600
14601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14603      # Do we have a bin/java?
14604      if test ! -x "$BOOT_JDK/bin/java"; then
14605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14607        BOOT_JDK_FOUND=no
14608      else
14609        # Do we have a bin/javac?
14610        if test ! -x "$BOOT_JDK/bin/javac"; then
14611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14615          BOOT_JDK_FOUND=no
14616        else
14617          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14618          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14619            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14621            BOOT_JDK_FOUND=no
14622          else
14623            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14624            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14625
14626            # Extra M4 quote needed to protect [] in grep expression.
14627            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14628            if test "x$FOUND_VERSION_78" = x; then
14629              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14631              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14632$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14633              BOOT_JDK_FOUND=no
14634            else
14635              # We're done! :-)
14636              BOOT_JDK_FOUND=yes
14637
14638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14639
14640  # Input might be given as Windows format, start by converting to
14641  # unix format.
14642  path="$BOOT_JDK"
14643  new_path=`$CYGPATH -u "$path"`
14644
14645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14648  # "foo.exe" is OK but "foo" is an error.
14649  #
14650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14651  # It is also a way to make sure we got the proper file name for the real test later on.
14652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14653  if test "x$test_shortpath" = x; then
14654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14656    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14657  fi
14658
14659  # Call helper function which possibly converts this using DOS-style short mode.
14660  # If so, the updated path is stored in $new_path.
14661
14662  input_path="$new_path"
14663  # Check if we need to convert this using DOS-style short mode. If the path
14664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14665  # take no chances and rewrite it.
14666  # Note: m4 eats our [], so we need to use [ and ] instead.
14667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14668  if test "x$has_forbidden_chars" != x; then
14669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14673      # Going to short mode and back again did indeed matter. Since short mode is
14674      # case insensitive, let's make it lowercase to improve readability.
14675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14676      # Now convert it back to Unix-stile (cygpath)
14677      input_path=`$CYGPATH -u "$shortmode_path"`
14678      new_path="$input_path"
14679    fi
14680  fi
14681
14682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14683  if test "x$test_cygdrive_prefix" = x; then
14684    # As a simple fix, exclude /usr/bin since it's not a real path.
14685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14687      # a path prefixed by /cygdrive for fixpath to work.
14688      new_path="$CYGWIN_ROOT_PATH$input_path"
14689    fi
14690  fi
14691
14692
14693  if test "x$path" != "x$new_path"; then
14694    BOOT_JDK="$new_path"
14695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14697  fi
14698
14699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14700
14701  path="$BOOT_JDK"
14702  has_colon=`$ECHO $path | $GREP ^.:`
14703  new_path="$path"
14704  if test "x$has_colon" = x; then
14705    # Not in mixed or Windows style, start by that.
14706    new_path=`cmd //c echo $path`
14707  fi
14708
14709
14710  input_path="$new_path"
14711  # Check if we need to convert this using DOS-style short mode. If the path
14712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14713  # take no chances and rewrite it.
14714  # Note: m4 eats our [], so we need to use [ and ] instead.
14715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14716  if test "x$has_forbidden_chars" != x; then
14717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14719  fi
14720
14721
14722  windows_path="$new_path"
14723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14724    unix_path=`$CYGPATH -u "$windows_path"`
14725    new_path="$unix_path"
14726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14728    new_path="$unix_path"
14729  fi
14730
14731  if test "x$path" != "x$new_path"; then
14732    BOOT_JDK="$new_path"
14733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14735  fi
14736
14737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14739
14740  else
14741    # We're on a posix platform. Hooray! :)
14742    path="$BOOT_JDK"
14743
14744    if test ! -f "$path" && test ! -d "$path"; then
14745      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14746    fi
14747
14748    has_space=`$ECHO "$path" | $GREP " "`
14749    if test "x$has_space" != x; then
14750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14751$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14752      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14753    fi
14754  fi
14755
14756              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14757$as_echo_n "checking for Boot JDK... " >&6; }
14758              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14759$as_echo "$BOOT_JDK" >&6; }
14760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14761$as_echo_n "checking Boot JDK version... " >&6; }
14762              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14763              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14764$as_echo "$BOOT_JDK_VERSION" >&6; }
14765            fi # end check jdk version
14766          fi # end check rt.jar
14767        fi # end check javac
14768      fi # end check java
14769    fi # end check boot jdk found
14770  fi
14771
14772    done
14773  fi
14774
14775
14776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14778      # Do we have a bin/java?
14779      if test ! -x "$BOOT_JDK/bin/java"; then
14780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14782        BOOT_JDK_FOUND=no
14783      else
14784        # Do we have a bin/javac?
14785        if test ! -x "$BOOT_JDK/bin/javac"; then
14786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14790          BOOT_JDK_FOUND=no
14791        else
14792          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14793          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14794            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14796            BOOT_JDK_FOUND=no
14797          else
14798            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14800
14801            # Extra M4 quote needed to protect [] in grep expression.
14802            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14803            if test "x$FOUND_VERSION_78" = x; then
14804              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14806              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14807$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14808              BOOT_JDK_FOUND=no
14809            else
14810              # We're done! :-)
14811              BOOT_JDK_FOUND=yes
14812
14813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14814
14815  # Input might be given as Windows format, start by converting to
14816  # unix format.
14817  path="$BOOT_JDK"
14818  new_path=`$CYGPATH -u "$path"`
14819
14820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14823  # "foo.exe" is OK but "foo" is an error.
14824  #
14825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14826  # It is also a way to make sure we got the proper file name for the real test later on.
14827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14828  if test "x$test_shortpath" = x; then
14829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14832  fi
14833
14834  # Call helper function which possibly converts this using DOS-style short mode.
14835  # If so, the updated path is stored in $new_path.
14836
14837  input_path="$new_path"
14838  # Check if we need to convert this using DOS-style short mode. If the path
14839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14840  # take no chances and rewrite it.
14841  # Note: m4 eats our [], so we need to use [ and ] instead.
14842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14843  if test "x$has_forbidden_chars" != x; then
14844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14848      # Going to short mode and back again did indeed matter. Since short mode is
14849      # case insensitive, let's make it lowercase to improve readability.
14850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14851      # Now convert it back to Unix-stile (cygpath)
14852      input_path=`$CYGPATH -u "$shortmode_path"`
14853      new_path="$input_path"
14854    fi
14855  fi
14856
14857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14858  if test "x$test_cygdrive_prefix" = x; then
14859    # As a simple fix, exclude /usr/bin since it's not a real path.
14860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14862      # a path prefixed by /cygdrive for fixpath to work.
14863      new_path="$CYGWIN_ROOT_PATH$input_path"
14864    fi
14865  fi
14866
14867
14868  if test "x$path" != "x$new_path"; then
14869    BOOT_JDK="$new_path"
14870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14872  fi
14873
14874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14875
14876  path="$BOOT_JDK"
14877  has_colon=`$ECHO $path | $GREP ^.:`
14878  new_path="$path"
14879  if test "x$has_colon" = x; then
14880    # Not in mixed or Windows style, start by that.
14881    new_path=`cmd //c echo $path`
14882  fi
14883
14884
14885  input_path="$new_path"
14886  # Check if we need to convert this using DOS-style short mode. If the path
14887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14888  # take no chances and rewrite it.
14889  # Note: m4 eats our [], so we need to use [ and ] instead.
14890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14891  if test "x$has_forbidden_chars" != x; then
14892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14894  fi
14895
14896
14897  windows_path="$new_path"
14898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14899    unix_path=`$CYGPATH -u "$windows_path"`
14900    new_path="$unix_path"
14901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14903    new_path="$unix_path"
14904  fi
14905
14906  if test "x$path" != "x$new_path"; then
14907    BOOT_JDK="$new_path"
14908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14910  fi
14911
14912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14914
14915  else
14916    # We're on a posix platform. Hooray! :)
14917    path="$BOOT_JDK"
14918
14919    if test ! -f "$path" && test ! -d "$path"; then
14920      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14921    fi
14922
14923    has_space=`$ECHO "$path" | $GREP " "`
14924    if test "x$has_space" != x; then
14925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14927      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14928    fi
14929  fi
14930
14931              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14932$as_echo_n "checking for Boot JDK... " >&6; }
14933              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14934$as_echo "$BOOT_JDK" >&6; }
14935              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14936$as_echo_n "checking Boot JDK version... " >&6; }
14937              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14938              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14939$as_echo "$BOOT_JDK_VERSION" >&6; }
14940            fi # end check jdk version
14941          fi # end check rt.jar
14942        fi # end check javac
14943      fi # end check java
14944    fi # end check boot jdk found
14945  fi
14946
14947  fi
14948
14949
14950    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14951    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14952      # Do we have a bin/java?
14953      if test ! -x "$BOOT_JDK/bin/java"; then
14954        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14956        BOOT_JDK_FOUND=no
14957      else
14958        # Do we have a bin/javac?
14959        if test ! -x "$BOOT_JDK/bin/javac"; then
14960          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14962          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14963$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14964          BOOT_JDK_FOUND=no
14965        else
14966          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14967          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14968            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14970            BOOT_JDK_FOUND=no
14971          else
14972            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14973            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14974
14975            # Extra M4 quote needed to protect [] in grep expression.
14976            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14977            if test "x$FOUND_VERSION_78" = x; then
14978              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14980              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14981$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14982              BOOT_JDK_FOUND=no
14983            else
14984              # We're done! :-)
14985              BOOT_JDK_FOUND=yes
14986
14987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14988
14989  # Input might be given as Windows format, start by converting to
14990  # unix format.
14991  path="$BOOT_JDK"
14992  new_path=`$CYGPATH -u "$path"`
14993
14994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14997  # "foo.exe" is OK but "foo" is an error.
14998  #
14999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15000  # It is also a way to make sure we got the proper file name for the real test later on.
15001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15002  if test "x$test_shortpath" = x; then
15003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15005    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15006  fi
15007
15008  # Call helper function which possibly converts this using DOS-style short mode.
15009  # If so, the updated path is stored in $new_path.
15010
15011  input_path="$new_path"
15012  # Check if we need to convert this using DOS-style short mode. If the path
15013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15014  # take no chances and rewrite it.
15015  # Note: m4 eats our [], so we need to use [ and ] instead.
15016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15017  if test "x$has_forbidden_chars" != x; then
15018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15022      # Going to short mode and back again did indeed matter. Since short mode is
15023      # case insensitive, let's make it lowercase to improve readability.
15024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15025      # Now convert it back to Unix-stile (cygpath)
15026      input_path=`$CYGPATH -u "$shortmode_path"`
15027      new_path="$input_path"
15028    fi
15029  fi
15030
15031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15032  if test "x$test_cygdrive_prefix" = x; then
15033    # As a simple fix, exclude /usr/bin since it's not a real path.
15034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15036      # a path prefixed by /cygdrive for fixpath to work.
15037      new_path="$CYGWIN_ROOT_PATH$input_path"
15038    fi
15039  fi
15040
15041
15042  if test "x$path" != "x$new_path"; then
15043    BOOT_JDK="$new_path"
15044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15045$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15046  fi
15047
15048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15049
15050  path="$BOOT_JDK"
15051  has_colon=`$ECHO $path | $GREP ^.:`
15052  new_path="$path"
15053  if test "x$has_colon" = x; then
15054    # Not in mixed or Windows style, start by that.
15055    new_path=`cmd //c echo $path`
15056  fi
15057
15058
15059  input_path="$new_path"
15060  # Check if we need to convert this using DOS-style short mode. If the path
15061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15062  # take no chances and rewrite it.
15063  # Note: m4 eats our [], so we need to use [ and ] instead.
15064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15065  if test "x$has_forbidden_chars" != x; then
15066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15068  fi
15069
15070
15071  windows_path="$new_path"
15072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15073    unix_path=`$CYGPATH -u "$windows_path"`
15074    new_path="$unix_path"
15075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15077    new_path="$unix_path"
15078  fi
15079
15080  if test "x$path" != "x$new_path"; then
15081    BOOT_JDK="$new_path"
15082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15084  fi
15085
15086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15088
15089  else
15090    # We're on a posix platform. Hooray! :)
15091    path="$BOOT_JDK"
15092
15093    if test ! -f "$path" && test ! -d "$path"; then
15094      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15095    fi
15096
15097    has_space=`$ECHO "$path" | $GREP " "`
15098    if test "x$has_space" != x; then
15099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15100$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15101      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15102    fi
15103  fi
15104
15105              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15106$as_echo_n "checking for Boot JDK... " >&6; }
15107              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15108$as_echo "$BOOT_JDK" >&6; }
15109              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15110$as_echo_n "checking Boot JDK version... " >&6; }
15111              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15112              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15113$as_echo "$BOOT_JDK_VERSION" >&6; }
15114            fi # end check jdk version
15115          fi # end check rt.jar
15116        fi # end check javac
15117      fi # end check java
15118    fi # end check boot jdk found
15119  fi
15120
15121
15122# If we haven't found anything yet, we've truly lost. Give up.
15123if test "x$BOOT_JDK_FOUND" = xno; then
15124
15125    # Print a helpful message on how to acquire the necessary build dependency.
15126    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15127    MISSING_DEPENDENCY=openjdk
15128    PKGHANDLER_COMMAND=
15129
15130    case $PKGHANDLER in
15131	apt-get)
15132                apt_help     $MISSING_DEPENDENCY ;;
15133    yum)
15134                yum_help     $MISSING_DEPENDENCY ;;
15135	port)
15136                port_help    $MISSING_DEPENDENCY ;;
15137	pkgutil)
15138                pkgutil_help $MISSING_DEPENDENCY ;;
15139	pkgadd)
15140                pkgadd_help  $MISSING_DEPENDENCY ;;
15141    * )
15142      break ;;
15143    esac
15144
15145    if test "x$PKGHANDLER_COMMAND" != x; then
15146        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15147    fi
15148
15149  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15150$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15151  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15152$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15153  as_fn_error $? "Cannot continue" "$LINENO" 5
15154fi
15155
15156# Setup proper paths for what we found
15157BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15158if test ! -f "$BOOT_RTJAR"; then
15159    # On MacOSX it is called classes.jar
15160    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15161    if test -f "$BOOT_RTJAR"; then
15162      # Remove the ..
15163      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15164    fi
15165fi
15166BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15167BOOT_JDK="$BOOT_JDK"
15168
15169
15170
15171
15172# Setup tools from the Boot JDK.
15173
15174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15175$as_echo_n "checking for java in Boot JDK... " >&6; }
15176  JAVA=$BOOT_JDK/bin/java
15177  if test ! -x $JAVA; then
15178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15179$as_echo "not found" >&6; }
15180      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15181$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15182      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15183  fi
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15185$as_echo "ok" >&6; }
15186
15187
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15189$as_echo_n "checking for javac in Boot JDK... " >&6; }
15190  JAVAC=$BOOT_JDK/bin/javac
15191  if test ! -x $JAVAC; then
15192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15193$as_echo "not found" >&6; }
15194      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15195$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15196      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15197  fi
15198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15199$as_echo "ok" >&6; }
15200
15201
15202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15203$as_echo_n "checking for javah in Boot JDK... " >&6; }
15204  JAVAH=$BOOT_JDK/bin/javah
15205  if test ! -x $JAVAH; then
15206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15207$as_echo "not found" >&6; }
15208      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15209$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15210      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15211  fi
15212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15213$as_echo "ok" >&6; }
15214
15215
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15217$as_echo_n "checking for javap in Boot JDK... " >&6; }
15218  JAVAP=$BOOT_JDK/bin/javap
15219  if test ! -x $JAVAP; then
15220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15221$as_echo "not found" >&6; }
15222      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15223$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15224      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15225  fi
15226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15227$as_echo "ok" >&6; }
15228
15229
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15231$as_echo_n "checking for jar in Boot JDK... " >&6; }
15232  JAR=$BOOT_JDK/bin/jar
15233  if test ! -x $JAR; then
15234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15235$as_echo "not found" >&6; }
15236      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15237$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15238      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15239  fi
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15241$as_echo "ok" >&6; }
15242
15243
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15245$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15246  RMIC=$BOOT_JDK/bin/rmic
15247  if test ! -x $RMIC; then
15248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15249$as_echo "not found" >&6; }
15250      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15251$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15252      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15253  fi
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15255$as_echo "ok" >&6; }
15256
15257
15258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15259$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15260  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15261  if test ! -x $NATIVE2ASCII; then
15262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15263$as_echo "not found" >&6; }
15264      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15265$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15266      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15267  fi
15268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15269$as_echo "ok" >&6; }
15270
15271
15272# Finally, set some other options...
15273
15274# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15275BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15276
15277
15278
15279
15280##############################################################################
15281#
15282# Specify options for anything that is run with the Boot JDK.
15283#
15284
15285# Check whether --with-boot-jdk-jvmargs was given.
15286if test "${with_boot_jdk_jvmargs+set}" = set; then :
15287  withval=$with_boot_jdk_jvmargs;
15288fi
15289
15290
15291if test "x$with_boot_jdk_jvmargs" = x; then
15292    # Not all JVM:s accept the same arguments on the command line.
15293    # OpenJDK specific increase in thread stack for JDK build,
15294    # well more specifically, when running javac.
15295    if test "x$BUILD_NUM_BITS" = x32; then
15296       STACK_SIZE=768
15297    else
15298       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15299       # since 64-bit pointers are pushed on the stach. Apparently, we need
15300       # to increase the stack space when javacing the JDK....
15301       STACK_SIZE=1536
15302    fi
15303
15304    # Minimum amount of heap memory.
15305
15306    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15307    # If so, then append -Xms64M to boot_jdk_jvmargs
15308    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15309    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15310    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15311        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15312    fi
15313
15314    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15315        # Why does macosx need more heap? Its the huge JDK batch.
15316
15317    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15318    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15319    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15320    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15321    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15322        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15323    fi
15324
15325    else
15326
15327    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15328    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15329    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15330    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15331    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15332        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15333    fi
15334
15335    fi
15336    # When is adding -client something that speeds up the JVM?
15337    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15338
15339    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15340    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15341    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15342    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15343    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15344        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15345    fi
15346
15347
15348    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15349    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15350    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15351    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15352    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15353        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15354    fi
15355
15356
15357    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15358    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15359    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15360    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15361    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15362        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15363    fi
15364
15365    # Disable special log output when a debug build is used as Boot JDK...
15366
15367    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15368    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15369    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15370    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15371    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15372        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15373    fi
15374
15375fi
15376
15377BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15378
15379
15380
15381###############################################################################
15382#
15383# Configure the sources to use. We can add or override individual directories.
15384#
15385###############################################################################
15386
15387
15388
15389# Where are the sources. Any of these can be overridden
15390# using --with-override-corba and the likes.
15391LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15392CORBA_TOPDIR="$SRC_ROOT/corba"
15393JAXP_TOPDIR="$SRC_ROOT/jaxp"
15394JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15395HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15396JDK_TOPDIR="$SRC_ROOT/jdk"
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406###############################################################################
15407#
15408# Pickup additional source for a component from outside of the source root
15409# or override source for a component.
15410#
15411
15412# Check whether --with-add-source-root was given.
15413if test "${with_add_source_root+set}" = set; then :
15414  withval=$with_add_source_root;
15415fi
15416
15417
15418
15419# Check whether --with-override-source-root was given.
15420if test "${with_override_source_root+set}" = set; then :
15421  withval=$with_override_source_root;
15422fi
15423
15424
15425
15426# Check whether --with-adds-and-overrides was given.
15427if test "${with_adds_and_overrides+set}" = set; then :
15428  withval=$with_adds_and_overrides;
15429fi
15430
15431
15432if test "x$with_adds_and_overrides" != x; then
15433    with_add_source_root="$with_adds_and_overrides/adds"
15434    with_override_source_root="$with_adds_and_overrides/overrides"
15435fi
15436
15437if test "x$with_add_source_root" != x; then
15438    if ! test -d $with_add_source_root; then
15439       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15440    fi
15441    CURDIR="$PWD"
15442    cd "$with_add_source_root"
15443    ADD_SRC_ROOT="`pwd`"
15444    cd "$CURDIR"
15445    # Verify that the addon source root does not have any root makefiles.
15446    # If it does, then it is usually an error, prevent this.
15447    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15448       test -f $with_add_source_root/langtools/make/Makefile; then
15449        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
15450    fi
15451    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15452       test -f $with_add_source_root/corba/make/Makefile; then
15453        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
15454    fi
15455    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15456       test -f $with_add_source_root/jaxp/make/Makefile; then
15457        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
15458    fi
15459    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15460       test -f $with_add_source_root/jaxws/make/Makefile; then
15461        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
15462    fi
15463    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15464       test -f $with_add_source_root/hotspot/make/Makefile; then
15465        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
15466    fi
15467    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15468       test -f $with_add_source_root/jdk/make/Makefile; then
15469        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
15470    fi
15471fi
15472
15473
15474if test "x$with_override_source_root" != x; then
15475    if ! test -d $with_override_source_root; then
15476       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15477    fi
15478    CURDIR="$PWD"
15479    cd "$with_override_source_root"
15480    OVERRIDE_SRC_ROOT="`pwd`"
15481    cd "$CURDIR"
15482    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15483       test -f $with_override_source_root/langtools/make/Makefile; then
15484        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
15485    fi
15486    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15487       test -f $with_override_source_root/corba/make/Makefile; then
15488        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
15489    fi
15490    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15491       test -f $with_override_source_root/jaxp/make/Makefile; then
15492        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
15493    fi
15494    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15495       test -f $with_override_source_root/jaxws/make/Makefile; then
15496        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
15497    fi
15498    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15499       test -f $with_override_source_root/hotspot/make/Makefile; then
15500        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
15501    fi
15502    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15503       test -f $with_override_source_root/jdk/make/Makefile; then
15504        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
15505    fi
15506fi
15507
15508
15509###############################################################################
15510#
15511# Override a repo completely, this is used for example when you have 3 small
15512# development sandboxes of the langtools sources and want to avoid having 3 full
15513# OpenJDK sources checked out on disk.
15514#
15515# Assuming that the 3 langtools sandboxes are located here:
15516# /home/fredrik/sandbox1/langtools
15517# /home/fredrik/sandbox2/langtools
15518# /home/fredrik/sandbox3/langtools
15519#
15520# From the source root you create build subdirs manually:
15521#     mkdir -p build1 build2 build3
15522# in each build directory run:
15523#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15524#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15525#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15526#
15527
15528
15529# Check whether --with-override-langtools was given.
15530if test "${with_override_langtools+set}" = set; then :
15531  withval=$with_override_langtools;
15532fi
15533
15534
15535
15536# Check whether --with-override-corba was given.
15537if test "${with_override_corba+set}" = set; then :
15538  withval=$with_override_corba;
15539fi
15540
15541
15542
15543# Check whether --with-override-jaxp was given.
15544if test "${with_override_jaxp+set}" = set; then :
15545  withval=$with_override_jaxp;
15546fi
15547
15548
15549
15550# Check whether --with-override-jaxws was given.
15551if test "${with_override_jaxws+set}" = set; then :
15552  withval=$with_override_jaxws;
15553fi
15554
15555
15556
15557# Check whether --with-override-hotspot was given.
15558if test "${with_override_hotspot+set}" = set; then :
15559  withval=$with_override_hotspot;
15560fi
15561
15562
15563
15564# Check whether --with-override-jdk was given.
15565if test "${with_override_jdk+set}" = set; then :
15566  withval=$with_override_jdk;
15567fi
15568
15569
15570if test "x$with_override_langtools" != x; then
15571    CURDIR="$PWD"
15572    cd "$with_override_langtools"
15573    LANGTOOLS_TOPDIR="`pwd`"
15574    cd "$CURDIR"
15575    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15576        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15577    fi
15578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15579$as_echo_n "checking if langtools should be overridden... " >&6; }
15580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15581$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15582fi
15583if test "x$with_override_corba" != x; then
15584    CURDIR="$PWD"
15585    cd "$with_override_corba"
15586    CORBA_TOPDIR="`pwd`"
15587    cd "$CURDIR"
15588    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15589        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15590    fi
15591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15592$as_echo_n "checking if corba should be overridden... " >&6; }
15593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15594$as_echo "yes with $CORBA_TOPDIR" >&6; }
15595fi
15596if test "x$with_override_jaxp" != x; then
15597    CURDIR="$PWD"
15598    cd "$with_override_jaxp"
15599    JAXP_TOPDIR="`pwd`"
15600    cd "$CURDIR"
15601    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15602        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15603    fi
15604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15605$as_echo_n "checking if jaxp should be overridden... " >&6; }
15606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15607$as_echo "yes with $JAXP_TOPDIR" >&6; }
15608fi
15609if test "x$with_override_jaxws" != x; then
15610    CURDIR="$PWD"
15611    cd "$with_override_jaxws"
15612    JAXWS_TOPDIR="`pwd`"
15613    cd "$CURDIR"
15614    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15615        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15616    fi
15617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15618$as_echo_n "checking if jaxws should be overridden... " >&6; }
15619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15620$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15621fi
15622if test "x$with_override_hotspot" != x; then
15623    CURDIR="$PWD"
15624    cd "$with_override_hotspot"
15625    HOTSPOT_TOPDIR="`pwd`"
15626    cd "$CURDIR"
15627    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15628       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15629        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15630    fi
15631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15632$as_echo_n "checking if hotspot should be overridden... " >&6; }
15633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15634$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15635fi
15636if test "x$with_override_jdk" != x; then
15637    CURDIR="$PWD"
15638    cd "$with_override_jdk"
15639    JDK_TOPDIR="`pwd`"
15640    cd "$CURDIR"
15641    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15642        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15643    fi
15644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15645$as_echo_n "checking if JDK should be overridden... " >&6; }
15646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15647$as_echo "yes with $JDK_TOPDIR" >&6; }
15648fi
15649
15650
15651
15652BUILD_OUTPUT="$OUTPUT_ROOT"
15653
15654
15655HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15656BUILD_HOTSPOT=true
15657
15658
15659
15660# Check whether --with-import-hotspot was given.
15661if test "${with_import_hotspot+set}" = set; then :
15662  withval=$with_import_hotspot;
15663fi
15664
15665if test "x$with_import_hotspot" != x; then
15666    CURDIR="$PWD"
15667    cd "$with_import_hotspot"
15668    HOTSPOT_DIST="`pwd`"
15669    cd "$CURDIR"
15670    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15671        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15672    fi
15673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15674$as_echo_n "checking if hotspot should be imported... " >&6; }
15675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15676$as_echo "yes from $HOTSPOT_DIST" >&6; }
15677    BUILD_HOTSPOT=false
15678fi
15679
15680JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15681
15682
15683###############################################################################
15684#
15685# Setup the toolchain (compilers etc), i.e. the tools that need to be
15686# cross-compilation aware.
15687#
15688###############################################################################
15689
15690
15691###############################################################################
15692#
15693# Configure the development tool paths and potential sysroot.
15694#
15695ac_ext=cpp
15696ac_cpp='$CXXCPP $CPPFLAGS'
15697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15700
15701
15702# The option used to specify the target .o,.a or .so file.
15703# When compiling, how to specify the to be created object file.
15704CC_OUT_OPTION='-o$(SPACE)'
15705# When linking, how to specify the to be created executable.
15706EXE_OUT_OPTION='-o$(SPACE)'
15707# When linking, how to specify the to be created dynamically linkable library.
15708LD_OUT_OPTION='-o$(SPACE)'
15709# When archiving, how to specify the to be create static archive for object files.
15710AR_OUT_OPTION='rcs$(SPACE)'
15711
15712
15713
15714
15715
15716# Locate the actual tools
15717
15718if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15719
15720  # Store path to cygwin link.exe to help excluding it when searching for
15721  # VS linker. This must be done before changing the PATH when looking for VS.
15722  # Extract the first word of "link", so it can be a program name with args.
15723set dummy link; ac_word=$2
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15725$as_echo_n "checking for $ac_word... " >&6; }
15726if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15727  $as_echo_n "(cached) " >&6
15728else
15729  case $CYGWIN_LINK in
15730  [\\/]* | ?:[\\/]*)
15731  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15732  ;;
15733  *)
15734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15735for as_dir in $PATH
15736do
15737  IFS=$as_save_IFS
15738  test -z "$as_dir" && as_dir=.
15739    for ac_exec_ext in '' $ac_executable_extensions; do
15740  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15741    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15743    break 2
15744  fi
15745done
15746  done
15747IFS=$as_save_IFS
15748
15749  ;;
15750esac
15751fi
15752CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15753if test -n "$CYGWIN_LINK"; then
15754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15755$as_echo "$CYGWIN_LINK" >&6; }
15756else
15757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15758$as_echo "no" >&6; }
15759fi
15760
15761
15762  if test "x$CYGWIN_LINK" != x; then
15763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15764$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15765    "$CYGWIN_LINK" --version > /dev/null
15766    if test $? -eq 0 ; then
15767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15768$as_echo "yes" >&6; }
15769    else
15770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15771$as_echo "no" >&6; }
15772      # This might be the VS linker. Don't exclude it later on.
15773      CYGWIN_LINK=""
15774    fi
15775  fi
15776
15777  # First-hand choice is to locate and run the vsvars bat file.
15778
15779  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15780    VCVARSFILE="vc/bin/vcvars32.bat"
15781  else
15782    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15783  fi
15784
15785  VS_ENV_CMD=""
15786  VS_ENV_ARGS=""
15787  if test "x$with_toolsdir" != x; then
15788
15789  if test "x$VS_ENV_CMD" = x; then
15790    VS100BASE="$with_toolsdir/../.."
15791    METHOD="--with-tools-dir"
15792
15793  windows_path="$VS100BASE"
15794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15795    unix_path=`$CYGPATH -u "$windows_path"`
15796    VS100BASE="$unix_path"
15797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15799    VS100BASE="$unix_path"
15800  fi
15801
15802    if test -d "$VS100BASE"; then
15803      if test -f "$VS100BASE/$VCVARSFILE"; then
15804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15805$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15806        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15807      else
15808        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15809$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15810        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15811$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15812      fi
15813    fi
15814  fi
15815
15816  fi
15817
15818  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15819    # Having specified an argument which is incorrect will produce an instant failure;
15820    # we should not go on looking
15821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15822$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15823    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15824$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15825    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15826  fi
15827
15828  if test "x$ProgramW6432" != x; then
15829
15830  if test "x$VS_ENV_CMD" = x; then
15831    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15832    METHOD="well-known name"
15833
15834  windows_path="$WIN_SDK_BASE"
15835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836    unix_path=`$CYGPATH -u "$windows_path"`
15837    WIN_SDK_BASE="$unix_path"
15838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15840    WIN_SDK_BASE="$unix_path"
15841  fi
15842
15843    if test -d "$WIN_SDK_BASE"; then
15844      # There have been cases of partial or broken SDK installations. A missing
15845      # lib dir is not going to work.
15846      if test ! -d "$WIN_SDK_BASE/../lib"; then
15847        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15848$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15849        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15850$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15851      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15853$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15854        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15855        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15856          VS_ENV_ARGS="/x86"
15857        else
15858          VS_ENV_ARGS="/x64"
15859        fi
15860      else
15861        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15862$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15863        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15864$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15865      fi
15866    fi
15867  fi
15868
15869  fi
15870  if test "x$PROGRAMW6432" != x; then
15871
15872  if test "x$VS_ENV_CMD" = x; then
15873    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15874    METHOD="well-known name"
15875
15876  windows_path="$WIN_SDK_BASE"
15877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15878    unix_path=`$CYGPATH -u "$windows_path"`
15879    WIN_SDK_BASE="$unix_path"
15880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15882    WIN_SDK_BASE="$unix_path"
15883  fi
15884
15885    if test -d "$WIN_SDK_BASE"; then
15886      # There have been cases of partial or broken SDK installations. A missing
15887      # lib dir is not going to work.
15888      if test ! -d "$WIN_SDK_BASE/../lib"; then
15889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15890$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15891        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15892$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15893      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15894        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15895$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15896        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15897        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15898          VS_ENV_ARGS="/x86"
15899        else
15900          VS_ENV_ARGS="/x64"
15901        fi
15902      else
15903        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15904$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15905        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15906$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15907      fi
15908    fi
15909  fi
15910
15911  fi
15912  if test "x$PROGRAMFILES" != x; then
15913
15914  if test "x$VS_ENV_CMD" = x; then
15915    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15916    METHOD="well-known name"
15917
15918  windows_path="$WIN_SDK_BASE"
15919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15920    unix_path=`$CYGPATH -u "$windows_path"`
15921    WIN_SDK_BASE="$unix_path"
15922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15924    WIN_SDK_BASE="$unix_path"
15925  fi
15926
15927    if test -d "$WIN_SDK_BASE"; then
15928      # There have been cases of partial or broken SDK installations. A missing
15929      # lib dir is not going to work.
15930      if test ! -d "$WIN_SDK_BASE/../lib"; then
15931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15932$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15933        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15934$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15935      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15937$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15938        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15939        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15940          VS_ENV_ARGS="/x86"
15941        else
15942          VS_ENV_ARGS="/x64"
15943        fi
15944      else
15945        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15946$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15947        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15948$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15949      fi
15950    fi
15951  fi
15952
15953  fi
15954
15955  if test "x$VS_ENV_CMD" = x; then
15956    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15957    METHOD="well-known name"
15958
15959  windows_path="$WIN_SDK_BASE"
15960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15961    unix_path=`$CYGPATH -u "$windows_path"`
15962    WIN_SDK_BASE="$unix_path"
15963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15965    WIN_SDK_BASE="$unix_path"
15966  fi
15967
15968    if test -d "$WIN_SDK_BASE"; then
15969      # There have been cases of partial or broken SDK installations. A missing
15970      # lib dir is not going to work.
15971      if test ! -d "$WIN_SDK_BASE/../lib"; then
15972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15973$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15974        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
15975$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
15976      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15978$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15979        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15980        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15981          VS_ENV_ARGS="/x86"
15982        else
15983          VS_ENV_ARGS="/x64"
15984        fi
15985      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15989$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15990      fi
15991    fi
15992  fi
15993
15994
15995  if test "x$VS_ENV_CMD" = x; then
15996    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15997    METHOD="well-known name"
15998
15999  windows_path="$WIN_SDK_BASE"
16000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16001    unix_path=`$CYGPATH -u "$windows_path"`
16002    WIN_SDK_BASE="$unix_path"
16003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16005    WIN_SDK_BASE="$unix_path"
16006  fi
16007
16008    if test -d "$WIN_SDK_BASE"; then
16009      # There have been cases of partial or broken SDK installations. A missing
16010      # lib dir is not going to work.
16011      if test ! -d "$WIN_SDK_BASE/../lib"; then
16012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16014        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16015$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16016      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16017        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16018$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16019        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16020        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16021          VS_ENV_ARGS="/x86"
16022        else
16023          VS_ENV_ARGS="/x64"
16024        fi
16025      else
16026        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16027$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16028        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16029$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16030      fi
16031    fi
16032  fi
16033
16034
16035  if test "x$VS100COMNTOOLS" != x; then
16036
16037  if test "x$VS_ENV_CMD" = x; then
16038    VS100BASE="$VS100COMNTOOLS/../.."
16039    METHOD="VS100COMNTOOLS variable"
16040
16041  windows_path="$VS100BASE"
16042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16043    unix_path=`$CYGPATH -u "$windows_path"`
16044    VS100BASE="$unix_path"
16045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16047    VS100BASE="$unix_path"
16048  fi
16049
16050    if test -d "$VS100BASE"; then
16051      if test -f "$VS100BASE/$VCVARSFILE"; then
16052        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16053$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16054        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16055      else
16056        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16057$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16058        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16059$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16060      fi
16061    fi
16062  fi
16063
16064  fi
16065  if test "x$PROGRAMFILES" != x; then
16066
16067  if test "x$VS_ENV_CMD" = x; then
16068    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16069    METHOD="well-known name"
16070
16071  windows_path="$VS100BASE"
16072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16073    unix_path=`$CYGPATH -u "$windows_path"`
16074    VS100BASE="$unix_path"
16075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16077    VS100BASE="$unix_path"
16078  fi
16079
16080    if test -d "$VS100BASE"; then
16081      if test -f "$VS100BASE/$VCVARSFILE"; then
16082        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16083$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16084        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16085      else
16086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16087$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16088        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16089$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16090      fi
16091    fi
16092  fi
16093
16094  fi
16095
16096  if test "x$VS_ENV_CMD" = x; then
16097    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16098    METHOD="well-known name"
16099
16100  windows_path="$VS100BASE"
16101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16102    unix_path=`$CYGPATH -u "$windows_path"`
16103    VS100BASE="$unix_path"
16104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16106    VS100BASE="$unix_path"
16107  fi
16108
16109    if test -d "$VS100BASE"; then
16110      if test -f "$VS100BASE/$VCVARSFILE"; then
16111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16112$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16113        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16114      else
16115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16116$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16118$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16119      fi
16120    fi
16121  fi
16122
16123
16124  if test "x$VS_ENV_CMD" = x; then
16125    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16126    METHOD="well-known name"
16127
16128  windows_path="$VS100BASE"
16129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16130    unix_path=`$CYGPATH -u "$windows_path"`
16131    VS100BASE="$unix_path"
16132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16134    VS100BASE="$unix_path"
16135  fi
16136
16137    if test -d "$VS100BASE"; then
16138      if test -f "$VS100BASE/$VCVARSFILE"; then
16139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16140$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16141        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16142      else
16143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16144$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16145        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16146$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16147      fi
16148    fi
16149  fi
16150
16151
16152  if test "x$VS_ENV_CMD" != x; then
16153    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16154
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156
16157  # First separate the path from the arguments. This will split at the first
16158  # space.
16159  complete="$VS_ENV_CMD"
16160  path="${complete%% *}"
16161  tmp="$complete EOL"
16162  arguments="${tmp#* }"
16163
16164  # Input might be given as Windows format, start by converting to
16165  # unix format.
16166  new_path=`$CYGPATH -u "$path"`
16167
16168  # Now try to locate executable using which
16169  new_path=`$WHICH "$new_path" 2> /dev/null`
16170  # bat and cmd files are not always considered executable in cygwin causing which
16171  # to not find them
16172  if test "x$new_path" = x \
16173           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16174           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16175    new_path=`$CYGPATH -u "$path"`
16176  fi
16177  if test "x$new_path" = x; then
16178    # Oops. Which didn't find the executable.
16179    # The splitting of arguments from the executable at a space might have been incorrect,
16180    # since paths with space are more likely in Windows. Give it another try with the whole
16181    # argument.
16182    path="$complete"
16183    arguments="EOL"
16184    new_path=`$CYGPATH -u "$path"`
16185    new_path=`$WHICH "$new_path" 2> /dev/null`
16186    # bat and cmd files are not always considered executable in cygwin causing which
16187    # to not find them
16188    if test "x$new_path" = x \
16189             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16190             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16191      new_path=`$CYGPATH -u "$path"`
16192    fi
16193    if test "x$new_path" = x; then
16194      # It's still not found. Now this is an unrecoverable error.
16195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16196$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16197      has_space=`$ECHO "$complete" | $GREP " "`
16198      if test "x$has_space" != x; then
16199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16201      fi
16202      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16203    fi
16204  fi
16205
16206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16209  # "foo.exe" is OK but "foo" is an error.
16210  #
16211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16212  # It is also a way to make sure we got the proper file name for the real test later on.
16213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16214  if test "x$test_shortpath" = x; then
16215    # Short path failed, file does not exist as specified.
16216    # Try adding .exe or .cmd
16217    if test -f "${new_path}.exe"; then
16218       input_to_shortpath="${new_path}.exe"
16219    elif test -f "${new_path}.cmd"; then
16220       input_to_shortpath="${new_path}.cmd"
16221    else
16222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16223$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16224      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16225$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16226      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16227    fi
16228  else
16229    input_to_shortpath="$new_path"
16230  fi
16231
16232  # Call helper function which possibly converts this using DOS-style short mode.
16233  # If so, the updated path is stored in $new_path.
16234  new_path="$input_to_shortpath"
16235
16236  input_path="$input_to_shortpath"
16237  # Check if we need to convert this using DOS-style short mode. If the path
16238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16239  # take no chances and rewrite it.
16240  # Note: m4 eats our [], so we need to use [ and ] instead.
16241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16242  if test "x$has_forbidden_chars" != x; then
16243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16247      # Going to short mode and back again did indeed matter. Since short mode is
16248      # case insensitive, let's make it lowercase to improve readability.
16249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16250      # Now convert it back to Unix-stile (cygpath)
16251      input_path=`$CYGPATH -u "$shortmode_path"`
16252      new_path="$input_path"
16253    fi
16254  fi
16255
16256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16257  if test "x$test_cygdrive_prefix" = x; then
16258    # As a simple fix, exclude /usr/bin since it's not a real path.
16259    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16261      # a path prefixed by /cygdrive for fixpath to work.
16262      new_path="$CYGWIN_ROOT_PATH$input_path"
16263    fi
16264  fi
16265
16266  # remove trailing .exe if any
16267  new_path="${new_path/%.exe/}"
16268
16269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16270
16271  # First separate the path from the arguments. This will split at the first
16272  # space.
16273  complete="$VS_ENV_CMD"
16274  path="${complete%% *}"
16275  tmp="$complete EOL"
16276  arguments="${tmp#* }"
16277
16278  # Input might be given as Windows format, start by converting to
16279  # unix format.
16280  new_path="$path"
16281
16282  windows_path="$new_path"
16283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16284    unix_path=`$CYGPATH -u "$windows_path"`
16285    new_path="$unix_path"
16286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16288    new_path="$unix_path"
16289  fi
16290
16291
16292  # Now try to locate executable using which
16293  new_path=`$WHICH "$new_path" 2> /dev/null`
16294
16295  if test "x$new_path" = x; then
16296    # Oops. Which didn't find the executable.
16297    # The splitting of arguments from the executable at a space might have been incorrect,
16298    # since paths with space are more likely in Windows. Give it another try with the whole
16299    # argument.
16300    path="$complete"
16301    arguments="EOL"
16302    new_path="$path"
16303
16304  windows_path="$new_path"
16305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16306    unix_path=`$CYGPATH -u "$windows_path"`
16307    new_path="$unix_path"
16308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16310    new_path="$unix_path"
16311  fi
16312
16313
16314    new_path=`$WHICH "$new_path" 2> /dev/null`
16315
16316    if test "x$new_path" = x; then
16317      # It's still not found. Now this is an unrecoverable error.
16318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16319$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16320      has_space=`$ECHO "$complete" | $GREP " "`
16321      if test "x$has_space" != x; then
16322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16324      fi
16325      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16326    fi
16327  fi
16328
16329  # Now new_path has a complete unix path to the binary
16330  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16331    # Keep paths in /bin as-is, but remove trailing .exe if any
16332    new_path="${new_path/%.exe/}"
16333    # Do not save /bin paths to all_fixpath_prefixes!
16334  else
16335    # Not in mixed or Windows style, start by that.
16336    new_path=`cmd //c echo $new_path`
16337
16338  input_path="$new_path"
16339  # Check if we need to convert this using DOS-style short mode. If the path
16340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16341  # take no chances and rewrite it.
16342  # Note: m4 eats our [], so we need to use [ and ] instead.
16343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16344  if test "x$has_forbidden_chars" != x; then
16345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16347  fi
16348
16349    # Output is in $new_path
16350
16351  windows_path="$new_path"
16352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16353    unix_path=`$CYGPATH -u "$windows_path"`
16354    new_path="$unix_path"
16355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16357    new_path="$unix_path"
16358  fi
16359
16360    # remove trailing .exe if any
16361    new_path="${new_path/%.exe/}"
16362
16363    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16364    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16365  fi
16366
16367  else
16368    # We're on a posix platform. Hooray! :)
16369    # First separate the path from the arguments. This will split at the first
16370    # space.
16371    complete="$VS_ENV_CMD"
16372    path="${complete%% *}"
16373    tmp="$complete EOL"
16374    arguments="${tmp#* }"
16375
16376    new_path=`$WHICH $path 2> /dev/null`
16377    if test "x$new_path" = x; then
16378      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16379      if test "x$is_absolute_path" != x; then
16380        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16381$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16382        new_path="$path"
16383      else
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16385$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16386        has_space=`$ECHO "$complete" | $GREP " "`
16387        if test "x$has_space" != x; then
16388          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16389$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16390        fi
16391        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16392      fi
16393    fi
16394  fi
16395
16396  # Now join together the path and the arguments once again
16397  if test "x$arguments" != xEOL; then
16398      new_complete="$new_path ${arguments% *}"
16399  else
16400      new_complete="$new_path"
16401  fi
16402
16403  if test "x$complete" != "x$new_complete"; then
16404    VS_ENV_CMD="$new_complete"
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16406$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16407  fi
16408
16409
16410    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16411    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16412$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16413    cd $OUTPUT_ROOT
16414    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16415    # to autoconf standards.
16416
16417    #----
16418
16419    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16420    # but calculate the difference in Cygwin environment before/after running it and then
16421    # apply the diff.
16422
16423    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16424      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16425      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16426      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16427    else
16428      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16429      _dosbash=`cmd //c echo \`which bash\``
16430    fi
16431
16432    # generate the set of exported vars before/after the vs10 setup
16433    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16434    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16435    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16436    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16437
16438    # Now execute the newly created bat file.
16439    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16440    cmd /c localdevenvtmp.bat | cat
16441
16442    # apply the diff (less some non-vs10 vars named by "!")
16443    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16444    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16445    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16446
16447    # cleanup
16448    $RM localdevenvtmp*
16449    #----
16450    cd $CURDIR
16451    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16453$as_echo "no" >&6; }
16454      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16455$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16456      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16457$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16458      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16459$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16460      as_fn_error $? "Cannot continue" "$LINENO" 5
16461    fi
16462
16463    # Now set all paths and other env variables. This will allow the rest of
16464    # the configure script to find and run the compiler in the proper way.
16465    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16466$as_echo "$as_me: Setting extracted environment variables" >&6;}
16467    . $OUTPUT_ROOT/localdevenv.sh
16468  else
16469    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16471$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16472  fi
16473
16474  # At this point, we should have corrent variables in the environment, or we can't continue.
16475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16476$as_echo_n "checking for Visual Studio variables... " >&6; }
16477
16478  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16479    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16481$as_echo "present but broken" >&6; }
16482      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16483    else
16484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16485$as_echo "ok" >&6; }
16486      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16487      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16488      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16489      VS_PATH="$PATH"
16490
16491
16492
16493    fi
16494  else
16495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16496$as_echo "not found" >&6; }
16497
16498    if test "x$VS_ENV_CMD" = x; then
16499      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16500$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16501      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16502$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16503    else
16504      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16505$as_echo "$as_me: Running the extraction script failed." >&6;}
16506    fi
16507    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16508$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16509    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16510$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16511    as_fn_error $? "Cannot continue" "$LINENO" 5
16512  fi
16513
16514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16515$as_echo_n "checking for msvcr100.dll... " >&6; }
16516
16517# Check whether --with-msvcr-dll was given.
16518if test "${with_msvcr_dll+set}" = set; then :
16519  withval=$with_msvcr_dll;
16520fi
16521
16522  if test "x$with_msvcr_dll" != x; then
16523    MSVCR_DLL="$with_msvcr_dll"
16524  else
16525    if test "x$VCINSTALLDIR" != x; then
16526      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16527        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16528      else
16529        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16530        if test "x$MSVCR_DLL" = x; then
16531          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16532        fi
16533      fi
16534      if test "x$MSVCR_DLL" != x; then
16535        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16536$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16537      else
16538        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16539$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16540      fi
16541    fi
16542    if test "x$MSVCR_DLL" = x; then
16543      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16544        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16545$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16546        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16547      fi
16548    fi
16549  fi
16550  if test "x$MSVCR_DLL" = x; then
16551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16552$as_echo "no" >&6; }
16553    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16554  fi
16555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16556$as_echo "$MSVCR_DLL" >&6; }
16557
16558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16559
16560  # Input might be given as Windows format, start by converting to
16561  # unix format.
16562  path="$MSVCR_DLL"
16563  new_path=`$CYGPATH -u "$path"`
16564
16565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16568  # "foo.exe" is OK but "foo" is an error.
16569  #
16570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16571  # It is also a way to make sure we got the proper file name for the real test later on.
16572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16573  if test "x$test_shortpath" = x; then
16574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16575$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16576    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16577  fi
16578
16579  # Call helper function which possibly converts this using DOS-style short mode.
16580  # If so, the updated path is stored in $new_path.
16581
16582  input_path="$new_path"
16583  # Check if we need to convert this using DOS-style short mode. If the path
16584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16585  # take no chances and rewrite it.
16586  # Note: m4 eats our [], so we need to use [ and ] instead.
16587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16588  if test "x$has_forbidden_chars" != x; then
16589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16593      # Going to short mode and back again did indeed matter. Since short mode is
16594      # case insensitive, let's make it lowercase to improve readability.
16595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16596      # Now convert it back to Unix-stile (cygpath)
16597      input_path=`$CYGPATH -u "$shortmode_path"`
16598      new_path="$input_path"
16599    fi
16600  fi
16601
16602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16603  if test "x$test_cygdrive_prefix" = x; then
16604    # As a simple fix, exclude /usr/bin since it's not a real path.
16605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16607      # a path prefixed by /cygdrive for fixpath to work.
16608      new_path="$CYGWIN_ROOT_PATH$input_path"
16609    fi
16610  fi
16611
16612
16613  if test "x$path" != "x$new_path"; then
16614    MSVCR_DLL="$new_path"
16615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16616$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16617  fi
16618
16619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16620
16621  path="$MSVCR_DLL"
16622  has_colon=`$ECHO $path | $GREP ^.:`
16623  new_path="$path"
16624  if test "x$has_colon" = x; then
16625    # Not in mixed or Windows style, start by that.
16626    new_path=`cmd //c echo $path`
16627  fi
16628
16629
16630  input_path="$new_path"
16631  # Check if we need to convert this using DOS-style short mode. If the path
16632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16633  # take no chances and rewrite it.
16634  # Note: m4 eats our [], so we need to use [ and ] instead.
16635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16636  if test "x$has_forbidden_chars" != x; then
16637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16639  fi
16640
16641
16642  windows_path="$new_path"
16643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16644    unix_path=`$CYGPATH -u "$windows_path"`
16645    new_path="$unix_path"
16646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16648    new_path="$unix_path"
16649  fi
16650
16651  if test "x$path" != "x$new_path"; then
16652    MSVCR_DLL="$new_path"
16653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16654$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16655  fi
16656
16657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16659
16660  else
16661    # We're on a posix platform. Hooray! :)
16662    path="$MSVCR_DLL"
16663
16664    if test ! -f "$path" && test ! -d "$path"; then
16665      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16666    fi
16667
16668    has_space=`$ECHO "$path" | $GREP " "`
16669    if test "x$has_space" != x; then
16670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16671$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16672      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16673    fi
16674  fi
16675
16676
16677fi
16678
16679
16680
16681# If --build AND --host is set, then the configure script will find any
16682# cross compilation tools in the PATH. Cross compilation tools
16683# follows the cross compilation standard where they are prefixed with ${host}.
16684# For example the binary i686-sun-solaris2.10-gcc
16685# will cross compile for i686-sun-solaris2.10
16686# If neither of build and host is not set, then build=host and the
16687# default compiler found in the path will be used.
16688# Setting only --host, does not seem to be really supported.
16689# Please set both --build and --host if you want to cross compile.
16690
16691if test "x$COMPILE_TYPE" = "xcross"; then
16692    # Now we to find a C/C++ compiler that can build executables for the build
16693    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16694    # once. Also, we need to do this before adding a tools dir to the path,
16695    # otherwise we might pick up cross-compilers which don't use standard naming.
16696    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16697    # to wait until they are properly discovered.
16698    for ac_prog in cl cc gcc
16699do
16700  # Extract the first word of "$ac_prog", so it can be a program name with args.
16701set dummy $ac_prog; ac_word=$2
16702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16703$as_echo_n "checking for $ac_word... " >&6; }
16704if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16705  $as_echo_n "(cached) " >&6
16706else
16707  case $BUILD_CC in
16708  [\\/]* | ?:[\\/]*)
16709  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16710  ;;
16711  *)
16712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16713for as_dir in $PATH
16714do
16715  IFS=$as_save_IFS
16716  test -z "$as_dir" && as_dir=.
16717    for ac_exec_ext in '' $ac_executable_extensions; do
16718  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16719    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16721    break 2
16722  fi
16723done
16724  done
16725IFS=$as_save_IFS
16726
16727  ;;
16728esac
16729fi
16730BUILD_CC=$ac_cv_path_BUILD_CC
16731if test -n "$BUILD_CC"; then
16732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16733$as_echo "$BUILD_CC" >&6; }
16734else
16735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16736$as_echo "no" >&6; }
16737fi
16738
16739
16740  test -n "$BUILD_CC" && break
16741done
16742
16743
16744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16745
16746  # First separate the path from the arguments. This will split at the first
16747  # space.
16748  complete="$BUILD_CC"
16749  path="${complete%% *}"
16750  tmp="$complete EOL"
16751  arguments="${tmp#* }"
16752
16753  # Input might be given as Windows format, start by converting to
16754  # unix format.
16755  new_path=`$CYGPATH -u "$path"`
16756
16757  # Now try to locate executable using which
16758  new_path=`$WHICH "$new_path" 2> /dev/null`
16759  # bat and cmd files are not always considered executable in cygwin causing which
16760  # to not find them
16761  if test "x$new_path" = x \
16762           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16763           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16764    new_path=`$CYGPATH -u "$path"`
16765  fi
16766  if test "x$new_path" = x; then
16767    # Oops. Which didn't find the executable.
16768    # The splitting of arguments from the executable at a space might have been incorrect,
16769    # since paths with space are more likely in Windows. Give it another try with the whole
16770    # argument.
16771    path="$complete"
16772    arguments="EOL"
16773    new_path=`$CYGPATH -u "$path"`
16774    new_path=`$WHICH "$new_path" 2> /dev/null`
16775    # bat and cmd files are not always considered executable in cygwin causing which
16776    # to not find them
16777    if test "x$new_path" = x \
16778             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16779             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16780      new_path=`$CYGPATH -u "$path"`
16781    fi
16782    if test "x$new_path" = x; then
16783      # It's still not found. Now this is an unrecoverable error.
16784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16785$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16786      has_space=`$ECHO "$complete" | $GREP " "`
16787      if test "x$has_space" != x; then
16788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16790      fi
16791      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16792    fi
16793  fi
16794
16795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16798  # "foo.exe" is OK but "foo" is an error.
16799  #
16800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16801  # It is also a way to make sure we got the proper file name for the real test later on.
16802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16803  if test "x$test_shortpath" = x; then
16804    # Short path failed, file does not exist as specified.
16805    # Try adding .exe or .cmd
16806    if test -f "${new_path}.exe"; then
16807       input_to_shortpath="${new_path}.exe"
16808    elif test -f "${new_path}.cmd"; then
16809       input_to_shortpath="${new_path}.cmd"
16810    else
16811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16812$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16815      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16816    fi
16817  else
16818    input_to_shortpath="$new_path"
16819  fi
16820
16821  # Call helper function which possibly converts this using DOS-style short mode.
16822  # If so, the updated path is stored in $new_path.
16823  new_path="$input_to_shortpath"
16824
16825  input_path="$input_to_shortpath"
16826  # Check if we need to convert this using DOS-style short mode. If the path
16827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16828  # take no chances and rewrite it.
16829  # Note: m4 eats our [], so we need to use [ and ] instead.
16830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16831  if test "x$has_forbidden_chars" != x; then
16832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16836      # Going to short mode and back again did indeed matter. Since short mode is
16837      # case insensitive, let's make it lowercase to improve readability.
16838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16839      # Now convert it back to Unix-stile (cygpath)
16840      input_path=`$CYGPATH -u "$shortmode_path"`
16841      new_path="$input_path"
16842    fi
16843  fi
16844
16845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16846  if test "x$test_cygdrive_prefix" = x; then
16847    # As a simple fix, exclude /usr/bin since it's not a real path.
16848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16850      # a path prefixed by /cygdrive for fixpath to work.
16851      new_path="$CYGWIN_ROOT_PATH$input_path"
16852    fi
16853  fi
16854
16855  # remove trailing .exe if any
16856  new_path="${new_path/%.exe/}"
16857
16858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16859
16860  # First separate the path from the arguments. This will split at the first
16861  # space.
16862  complete="$BUILD_CC"
16863  path="${complete%% *}"
16864  tmp="$complete EOL"
16865  arguments="${tmp#* }"
16866
16867  # Input might be given as Windows format, start by converting to
16868  # unix format.
16869  new_path="$path"
16870
16871  windows_path="$new_path"
16872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16873    unix_path=`$CYGPATH -u "$windows_path"`
16874    new_path="$unix_path"
16875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16877    new_path="$unix_path"
16878  fi
16879
16880
16881  # Now try to locate executable using which
16882  new_path=`$WHICH "$new_path" 2> /dev/null`
16883
16884  if test "x$new_path" = x; then
16885    # Oops. Which didn't find the executable.
16886    # The splitting of arguments from the executable at a space might have been incorrect,
16887    # since paths with space are more likely in Windows. Give it another try with the whole
16888    # argument.
16889    path="$complete"
16890    arguments="EOL"
16891    new_path="$path"
16892
16893  windows_path="$new_path"
16894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16895    unix_path=`$CYGPATH -u "$windows_path"`
16896    new_path="$unix_path"
16897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16899    new_path="$unix_path"
16900  fi
16901
16902
16903    new_path=`$WHICH "$new_path" 2> /dev/null`
16904
16905    if test "x$new_path" = x; then
16906      # It's still not found. Now this is an unrecoverable error.
16907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16908$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16909      has_space=`$ECHO "$complete" | $GREP " "`
16910      if test "x$has_space" != x; then
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16913      fi
16914      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16915    fi
16916  fi
16917
16918  # Now new_path has a complete unix path to the binary
16919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16920    # Keep paths in /bin as-is, but remove trailing .exe if any
16921    new_path="${new_path/%.exe/}"
16922    # Do not save /bin paths to all_fixpath_prefixes!
16923  else
16924    # Not in mixed or Windows style, start by that.
16925    new_path=`cmd //c echo $new_path`
16926
16927  input_path="$new_path"
16928  # Check if we need to convert this using DOS-style short mode. If the path
16929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16930  # take no chances and rewrite it.
16931  # Note: m4 eats our [], so we need to use [ and ] instead.
16932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16933  if test "x$has_forbidden_chars" != x; then
16934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16936  fi
16937
16938    # Output is in $new_path
16939
16940  windows_path="$new_path"
16941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16942    unix_path=`$CYGPATH -u "$windows_path"`
16943    new_path="$unix_path"
16944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16946    new_path="$unix_path"
16947  fi
16948
16949    # remove trailing .exe if any
16950    new_path="${new_path/%.exe/}"
16951
16952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16954  fi
16955
16956  else
16957    # We're on a posix platform. Hooray! :)
16958    # First separate the path from the arguments. This will split at the first
16959    # space.
16960    complete="$BUILD_CC"
16961    path="${complete%% *}"
16962    tmp="$complete EOL"
16963    arguments="${tmp#* }"
16964
16965    new_path=`$WHICH $path 2> /dev/null`
16966    if test "x$new_path" = x; then
16967      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16968      if test "x$is_absolute_path" != x; then
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16970$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16971        new_path="$path"
16972      else
16973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16974$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16975        has_space=`$ECHO "$complete" | $GREP " "`
16976        if test "x$has_space" != x; then
16977          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16978$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16979        fi
16980        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16981      fi
16982    fi
16983  fi
16984
16985  # Now join together the path and the arguments once again
16986  if test "x$arguments" != xEOL; then
16987      new_complete="$new_path ${arguments% *}"
16988  else
16989      new_complete="$new_path"
16990  fi
16991
16992  if test "x$complete" != "x$new_complete"; then
16993    BUILD_CC="$new_complete"
16994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16995$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16996  fi
16997
16998    for ac_prog in cl CC g++
16999do
17000  # Extract the first word of "$ac_prog", so it can be a program name with args.
17001set dummy $ac_prog; ac_word=$2
17002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17003$as_echo_n "checking for $ac_word... " >&6; }
17004if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17005  $as_echo_n "(cached) " >&6
17006else
17007  case $BUILD_CXX in
17008  [\\/]* | ?:[\\/]*)
17009  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17010  ;;
17011  *)
17012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17013for as_dir in $PATH
17014do
17015  IFS=$as_save_IFS
17016  test -z "$as_dir" && as_dir=.
17017    for ac_exec_ext in '' $ac_executable_extensions; do
17018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17019    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17021    break 2
17022  fi
17023done
17024  done
17025IFS=$as_save_IFS
17026
17027  ;;
17028esac
17029fi
17030BUILD_CXX=$ac_cv_path_BUILD_CXX
17031if test -n "$BUILD_CXX"; then
17032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17033$as_echo "$BUILD_CXX" >&6; }
17034else
17035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17036$as_echo "no" >&6; }
17037fi
17038
17039
17040  test -n "$BUILD_CXX" && break
17041done
17042
17043
17044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17045
17046  # First separate the path from the arguments. This will split at the first
17047  # space.
17048  complete="$BUILD_CXX"
17049  path="${complete%% *}"
17050  tmp="$complete EOL"
17051  arguments="${tmp#* }"
17052
17053  # Input might be given as Windows format, start by converting to
17054  # unix format.
17055  new_path=`$CYGPATH -u "$path"`
17056
17057  # Now try to locate executable using which
17058  new_path=`$WHICH "$new_path" 2> /dev/null`
17059  # bat and cmd files are not always considered executable in cygwin causing which
17060  # to not find them
17061  if test "x$new_path" = x \
17062           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17063           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17064    new_path=`$CYGPATH -u "$path"`
17065  fi
17066  if test "x$new_path" = x; then
17067    # Oops. Which didn't find the executable.
17068    # The splitting of arguments from the executable at a space might have been incorrect,
17069    # since paths with space are more likely in Windows. Give it another try with the whole
17070    # argument.
17071    path="$complete"
17072    arguments="EOL"
17073    new_path=`$CYGPATH -u "$path"`
17074    new_path=`$WHICH "$new_path" 2> /dev/null`
17075    # bat and cmd files are not always considered executable in cygwin causing which
17076    # to not find them
17077    if test "x$new_path" = x \
17078             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17079             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17080      new_path=`$CYGPATH -u "$path"`
17081    fi
17082    if test "x$new_path" = x; then
17083      # It's still not found. Now this is an unrecoverable error.
17084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17085$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17086      has_space=`$ECHO "$complete" | $GREP " "`
17087      if test "x$has_space" != x; then
17088        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17089$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17090      fi
17091      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17092    fi
17093  fi
17094
17095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17098  # "foo.exe" is OK but "foo" is an error.
17099  #
17100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17101  # It is also a way to make sure we got the proper file name for the real test later on.
17102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17103  if test "x$test_shortpath" = x; then
17104    # Short path failed, file does not exist as specified.
17105    # Try adding .exe or .cmd
17106    if test -f "${new_path}.exe"; then
17107       input_to_shortpath="${new_path}.exe"
17108    elif test -f "${new_path}.cmd"; then
17109       input_to_shortpath="${new_path}.cmd"
17110    else
17111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17112$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17113      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17114$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17115      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17116    fi
17117  else
17118    input_to_shortpath="$new_path"
17119  fi
17120
17121  # Call helper function which possibly converts this using DOS-style short mode.
17122  # If so, the updated path is stored in $new_path.
17123  new_path="$input_to_shortpath"
17124
17125  input_path="$input_to_shortpath"
17126  # Check if we need to convert this using DOS-style short mode. If the path
17127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17128  # take no chances and rewrite it.
17129  # Note: m4 eats our [], so we need to use [ and ] instead.
17130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17131  if test "x$has_forbidden_chars" != x; then
17132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17133    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17134    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17135    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17136      # Going to short mode and back again did indeed matter. Since short mode is
17137      # case insensitive, let's make it lowercase to improve readability.
17138      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17139      # Now convert it back to Unix-stile (cygpath)
17140      input_path=`$CYGPATH -u "$shortmode_path"`
17141      new_path="$input_path"
17142    fi
17143  fi
17144
17145  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17146  if test "x$test_cygdrive_prefix" = x; then
17147    # As a simple fix, exclude /usr/bin since it's not a real path.
17148    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17149      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17150      # a path prefixed by /cygdrive for fixpath to work.
17151      new_path="$CYGWIN_ROOT_PATH$input_path"
17152    fi
17153  fi
17154
17155  # remove trailing .exe if any
17156  new_path="${new_path/%.exe/}"
17157
17158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; 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="$path"
17170
17171  windows_path="$new_path"
17172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17173    unix_path=`$CYGPATH -u "$windows_path"`
17174    new_path="$unix_path"
17175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17177    new_path="$unix_path"
17178  fi
17179
17180
17181  # Now try to locate executable using which
17182  new_path=`$WHICH "$new_path" 2> /dev/null`
17183
17184  if test "x$new_path" = x; then
17185    # Oops. Which didn't find the executable.
17186    # The splitting of arguments from the executable at a space might have been incorrect,
17187    # since paths with space are more likely in Windows. Give it another try with the whole
17188    # argument.
17189    path="$complete"
17190    arguments="EOL"
17191    new_path="$path"
17192
17193  windows_path="$new_path"
17194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17195    unix_path=`$CYGPATH -u "$windows_path"`
17196    new_path="$unix_path"
17197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17199    new_path="$unix_path"
17200  fi
17201
17202
17203    new_path=`$WHICH "$new_path" 2> /dev/null`
17204
17205    if test "x$new_path" = x; then
17206      # It's still not found. Now this is an unrecoverable error.
17207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17208$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17209      has_space=`$ECHO "$complete" | $GREP " "`
17210      if test "x$has_space" != x; then
17211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17213      fi
17214      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17215    fi
17216  fi
17217
17218  # Now new_path has a complete unix path to the binary
17219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17220    # Keep paths in /bin as-is, but remove trailing .exe if any
17221    new_path="${new_path/%.exe/}"
17222    # Do not save /bin paths to all_fixpath_prefixes!
17223  else
17224    # Not in mixed or Windows style, start by that.
17225    new_path=`cmd //c echo $new_path`
17226
17227  input_path="$new_path"
17228  # Check if we need to convert this using DOS-style short mode. If the path
17229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17230  # take no chances and rewrite it.
17231  # Note: m4 eats our [], so we need to use [ and ] instead.
17232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17233  if test "x$has_forbidden_chars" != x; then
17234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17236  fi
17237
17238    # Output is in $new_path
17239
17240  windows_path="$new_path"
17241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17242    unix_path=`$CYGPATH -u "$windows_path"`
17243    new_path="$unix_path"
17244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17246    new_path="$unix_path"
17247  fi
17248
17249    # remove trailing .exe if any
17250    new_path="${new_path/%.exe/}"
17251
17252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17254  fi
17255
17256  else
17257    # We're on a posix platform. Hooray! :)
17258    # First separate the path from the arguments. This will split at the first
17259    # space.
17260    complete="$BUILD_CXX"
17261    path="${complete%% *}"
17262    tmp="$complete EOL"
17263    arguments="${tmp#* }"
17264
17265    new_path=`$WHICH $path 2> /dev/null`
17266    if test "x$new_path" = x; then
17267      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17268      if test "x$is_absolute_path" != x; then
17269        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17270$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17271        new_path="$path"
17272      else
17273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17274$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17275        has_space=`$ECHO "$complete" | $GREP " "`
17276        if test "x$has_space" != x; then
17277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17279        fi
17280        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17281      fi
17282    fi
17283  fi
17284
17285  # Now join together the path and the arguments once again
17286  if test "x$arguments" != xEOL; then
17287      new_complete="$new_path ${arguments% *}"
17288  else
17289      new_complete="$new_path"
17290  fi
17291
17292  if test "x$complete" != "x$new_complete"; then
17293    BUILD_CXX="$new_complete"
17294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17295$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17296  fi
17297
17298    # Extract the first word of "ld", so it can be a program name with args.
17299set dummy ld; ac_word=$2
17300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17301$as_echo_n "checking for $ac_word... " >&6; }
17302if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17303  $as_echo_n "(cached) " >&6
17304else
17305  case $BUILD_LD in
17306  [\\/]* | ?:[\\/]*)
17307  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17308  ;;
17309  *)
17310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17311for as_dir in $PATH
17312do
17313  IFS=$as_save_IFS
17314  test -z "$as_dir" && as_dir=.
17315    for ac_exec_ext in '' $ac_executable_extensions; do
17316  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17317    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17319    break 2
17320  fi
17321done
17322  done
17323IFS=$as_save_IFS
17324
17325  ;;
17326esac
17327fi
17328BUILD_LD=$ac_cv_path_BUILD_LD
17329if test -n "$BUILD_LD"; then
17330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17331$as_echo "$BUILD_LD" >&6; }
17332else
17333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17334$as_echo "no" >&6; }
17335fi
17336
17337
17338
17339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340
17341  # First separate the path from the arguments. This will split at the first
17342  # space.
17343  complete="$BUILD_LD"
17344  path="${complete%% *}"
17345  tmp="$complete EOL"
17346  arguments="${tmp#* }"
17347
17348  # Input might be given as Windows format, start by converting to
17349  # unix format.
17350  new_path=`$CYGPATH -u "$path"`
17351
17352  # Now try to locate executable using which
17353  new_path=`$WHICH "$new_path" 2> /dev/null`
17354  # bat and cmd files are not always considered executable in cygwin causing which
17355  # to not find them
17356  if test "x$new_path" = x \
17357           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17358           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17359    new_path=`$CYGPATH -u "$path"`
17360  fi
17361  if test "x$new_path" = x; then
17362    # Oops. Which didn't find the executable.
17363    # The splitting of arguments from the executable at a space might have been incorrect,
17364    # since paths with space are more likely in Windows. Give it another try with the whole
17365    # argument.
17366    path="$complete"
17367    arguments="EOL"
17368    new_path=`$CYGPATH -u "$path"`
17369    new_path=`$WHICH "$new_path" 2> /dev/null`
17370    # bat and cmd files are not always considered executable in cygwin causing which
17371    # to not find them
17372    if test "x$new_path" = x \
17373             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17374             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17375      new_path=`$CYGPATH -u "$path"`
17376    fi
17377    if test "x$new_path" = x; then
17378      # It's still not found. Now this is an unrecoverable error.
17379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17380$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17381      has_space=`$ECHO "$complete" | $GREP " "`
17382      if test "x$has_space" != x; then
17383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17385      fi
17386      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17387    fi
17388  fi
17389
17390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17393  # "foo.exe" is OK but "foo" is an error.
17394  #
17395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17396  # It is also a way to make sure we got the proper file name for the real test later on.
17397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17398  if test "x$test_shortpath" = x; then
17399    # Short path failed, file does not exist as specified.
17400    # Try adding .exe or .cmd
17401    if test -f "${new_path}.exe"; then
17402       input_to_shortpath="${new_path}.exe"
17403    elif test -f "${new_path}.cmd"; then
17404       input_to_shortpath="${new_path}.cmd"
17405    else
17406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17407$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17410      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17411    fi
17412  else
17413    input_to_shortpath="$new_path"
17414  fi
17415
17416  # Call helper function which possibly converts this using DOS-style short mode.
17417  # If so, the updated path is stored in $new_path.
17418  new_path="$input_to_shortpath"
17419
17420  input_path="$input_to_shortpath"
17421  # Check if we need to convert this using DOS-style short mode. If the path
17422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17423  # take no chances and rewrite it.
17424  # Note: m4 eats our [], so we need to use [ and ] instead.
17425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17426  if test "x$has_forbidden_chars" != x; then
17427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17431      # Going to short mode and back again did indeed matter. Since short mode is
17432      # case insensitive, let's make it lowercase to improve readability.
17433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17434      # Now convert it back to Unix-stile (cygpath)
17435      input_path=`$CYGPATH -u "$shortmode_path"`
17436      new_path="$input_path"
17437    fi
17438  fi
17439
17440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17441  if test "x$test_cygdrive_prefix" = x; then
17442    # As a simple fix, exclude /usr/bin since it's not a real path.
17443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17445      # a path prefixed by /cygdrive for fixpath to work.
17446      new_path="$CYGWIN_ROOT_PATH$input_path"
17447    fi
17448  fi
17449
17450  # remove trailing .exe if any
17451  new_path="${new_path/%.exe/}"
17452
17453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17454
17455  # First separate the path from the arguments. This will split at the first
17456  # space.
17457  complete="$BUILD_LD"
17458  path="${complete%% *}"
17459  tmp="$complete EOL"
17460  arguments="${tmp#* }"
17461
17462  # Input might be given as Windows format, start by converting to
17463  # unix format.
17464  new_path="$path"
17465
17466  windows_path="$new_path"
17467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17468    unix_path=`$CYGPATH -u "$windows_path"`
17469    new_path="$unix_path"
17470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17472    new_path="$unix_path"
17473  fi
17474
17475
17476  # Now try to locate executable using which
17477  new_path=`$WHICH "$new_path" 2> /dev/null`
17478
17479  if test "x$new_path" = x; then
17480    # Oops. Which didn't find the executable.
17481    # The splitting of arguments from the executable at a space might have been incorrect,
17482    # since paths with space are more likely in Windows. Give it another try with the whole
17483    # argument.
17484    path="$complete"
17485    arguments="EOL"
17486    new_path="$path"
17487
17488  windows_path="$new_path"
17489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17490    unix_path=`$CYGPATH -u "$windows_path"`
17491    new_path="$unix_path"
17492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17494    new_path="$unix_path"
17495  fi
17496
17497
17498    new_path=`$WHICH "$new_path" 2> /dev/null`
17499
17500    if test "x$new_path" = x; then
17501      # It's still not found. Now this is an unrecoverable error.
17502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17503$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17504      has_space=`$ECHO "$complete" | $GREP " "`
17505      if test "x$has_space" != x; then
17506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17508      fi
17509      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17510    fi
17511  fi
17512
17513  # Now new_path has a complete unix path to the binary
17514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17515    # Keep paths in /bin as-is, but remove trailing .exe if any
17516    new_path="${new_path/%.exe/}"
17517    # Do not save /bin paths to all_fixpath_prefixes!
17518  else
17519    # Not in mixed or Windows style, start by that.
17520    new_path=`cmd //c echo $new_path`
17521
17522  input_path="$new_path"
17523  # Check if we need to convert this using DOS-style short mode. If the path
17524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17525  # take no chances and rewrite it.
17526  # Note: m4 eats our [], so we need to use [ and ] instead.
17527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17528  if test "x$has_forbidden_chars" != x; then
17529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17531  fi
17532
17533    # Output is in $new_path
17534
17535  windows_path="$new_path"
17536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17537    unix_path=`$CYGPATH -u "$windows_path"`
17538    new_path="$unix_path"
17539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17541    new_path="$unix_path"
17542  fi
17543
17544    # remove trailing .exe if any
17545    new_path="${new_path/%.exe/}"
17546
17547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17549  fi
17550
17551  else
17552    # We're on a posix platform. Hooray! :)
17553    # First separate the path from the arguments. This will split at the first
17554    # space.
17555    complete="$BUILD_LD"
17556    path="${complete%% *}"
17557    tmp="$complete EOL"
17558    arguments="${tmp#* }"
17559
17560    new_path=`$WHICH $path 2> /dev/null`
17561    if test "x$new_path" = x; then
17562      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17563      if test "x$is_absolute_path" != x; then
17564        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17565$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17566        new_path="$path"
17567      else
17568        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17569$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17570        has_space=`$ECHO "$complete" | $GREP " "`
17571        if test "x$has_space" != x; then
17572          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17574        fi
17575        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17576      fi
17577    fi
17578  fi
17579
17580  # Now join together the path and the arguments once again
17581  if test "x$arguments" != xEOL; then
17582      new_complete="$new_path ${arguments% *}"
17583  else
17584      new_complete="$new_path"
17585  fi
17586
17587  if test "x$complete" != "x$new_complete"; then
17588    BUILD_LD="$new_complete"
17589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17590$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17591  fi
17592
17593fi
17594
17595
17596
17597
17598# If a devkit is found on the builddeps server, then prepend its path to the
17599# PATH variable. If there are cross compilers available in the devkit, these
17600# will be found by AC_PROG_CC et al.
17601DEVKIT=
17602
17603
17604    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17605        # Source the builddeps file again, to make sure it uses the latest variables!
17606        . $builddepsfile
17607        # Look for a target and build machine specific resource!
17608        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17609        if test "x$resource" = x; then
17610            # Ok, lets instead look for a target specific resource
17611            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17612        fi
17613        if test "x$resource" = x; then
17614            # Ok, lets instead look for a build specific resource
17615            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17616        fi
17617        if test "x$resource" = x; then
17618            # Ok, lets instead look for a generic resource
17619            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17620            resource=${builddep_devkit}
17621        fi
17622        if test "x$resource" != x; then
17623            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17624$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17625	    # If the resource in the builddeps.conf file is an existing directory,
17626	    # for example /java/linux/cups
17627	    if test -d ${resource}; then
17628	       depdir=${resource}
17629	    else
17630
17631# devkit is for example mymodule
17632# $resource is for example libs/general/libmymod_1_2_3.zip
17633# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17634# $with_builddeps_dir is for example /localhome/builddeps
17635# depdir is the name of the variable into which we store the depdir, eg MYMOD
17636# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17637# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17638    filename=`basename $resource`
17639    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17640    filebase=${filename%%.*}
17641    extension=${filename#*.}
17642    installdir=$with_builddeps_dir/$filebase
17643    if test ! -f $installdir/$filename.unpacked; then
17644        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17645$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17646        if test ! -d $installdir; then
17647            mkdir -p $installdir
17648        fi
17649        if test ! -d $installdir; then
17650            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17651        fi
17652        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17653        touch $tmpfile
17654        if test ! -f $tmpfile; then
17655            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17656        fi
17657
17658    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17659    # $tmpfile is the local file name for the downloaded file.
17660    VALID_TOOL=no
17661    if test "x$BDEPS_FTP" = xwget; then
17662       VALID_TOOL=yes
17663       wget -O $tmpfile $with_builddeps_server/$resource
17664    fi
17665    if test "x$BDEPS_FTP" = xlftp; then
17666       VALID_TOOL=yes
17667       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17668    fi
17669    if test "x$BDEPS_FTP" = xftp; then
17670        VALID_TOOL=yes
17671        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17672        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17673        FTPUSERPWD=${FTPSERVER%%@*}
17674        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17675            FTPUSER=${userpwd%%:*}
17676            FTPPWD=${userpwd#*@}
17677            FTPSERVER=${FTPSERVER#*@}
17678        else
17679            FTPUSER=ftp
17680            FTPPWD=ftp
17681        fi
17682        # the "pass" command does not work on some
17683        # ftp clients (read ftp.exe) but if it works,
17684        # passive mode is better!
17685        (\
17686            echo "user $FTPUSER $FTPPWD"        ;\
17687            echo "pass"                         ;\
17688            echo "bin"                          ;\
17689            echo "get $FTPPATH $tmpfile"              ;\
17690        ) | ftp -in $FTPSERVER
17691    fi
17692    if test "x$VALID_TOOL" != xyes; then
17693       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17694    fi
17695
17696        mv $tmpfile $installdir/$filename
17697        if test ! -s $installdir/$filename; then
17698            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17699        fi
17700        case "$extension" in
17701            zip)  echo "Unzipping $installdir/$filename..."
17702               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17703            ;;
17704            tar.gz) echo "Untaring $installdir/$filename..."
17705               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17706            ;;
17707            tgz) echo "Untaring $installdir/$filename..."
17708               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17709            ;;
17710            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17711            ;;
17712        esac
17713    fi
17714    if test -f $installdir/$filename.unpacked; then
17715        depdir=$installdir
17716    fi
17717
17718	    fi
17719            # Source the builddeps file again, because in the previous command, the depdir
17720            # was updated to point at the current build dependency install directory.
17721            . $builddepsfile
17722            # Now extract variables from the builddeps.conf files.
17723            theroot=${builddep_devkit_ROOT}
17724            thecflags=${builddep_devkit_CFLAGS}
17725            thelibs=${builddep_devkit_LIBS}
17726            if test "x$depdir" = x; then
17727                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17728            fi
17729            DEVKIT=$depdir
17730            if test "x$theroot" != x; then
17731               DEVKIT="$theroot"
17732            fi
17733            if test "x$thecflags" != x; then
17734               DEVKIT_CFLAGS="$thecflags"
17735            fi
17736            if test "x$thelibs" != x; then
17737               DEVKIT_LIBS="$thelibs"
17738            fi
17739            # Found devkit
17740                     PATH="$DEVKIT/bin:$PATH"
17741                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17742                     if test "x$x_includes" = "xNONE"; then
17743                         x_includes="$SYS_ROOT/usr/include/X11"
17744                     fi
17745                     if test "x$x_libraries" = "xNONE"; then
17746                         x_libraries="$SYS_ROOT/usr/lib"
17747                     fi
17748
17749
17750        fi
17751
17752    fi
17753
17754
17755if test "x$SYS_ROOT" != "x/" ; then
17756    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17757    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17758    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17759    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17760    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17761    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17762fi
17763
17764# Store the CFLAGS etal passed to the configure script.
17765ORG_CFLAGS="$CFLAGS"
17766ORG_CXXFLAGS="$CXXFLAGS"
17767ORG_OBJCFLAGS="$OBJCFLAGS"
17768
17769# autoconf magic only relies on PATH, so update it if tools dir is specified
17770OLD_PATH="$PATH"
17771if test "x$TOOLS_DIR" != x; then
17772  PATH=$TOOLS_DIR:$PATH
17773fi
17774
17775
17776### Locate C compiler (CC)
17777
17778# gcc is almost always present, but on Windows we
17779# prefer cl.exe and on Solaris we prefer CC.
17780# Thus test for them in this order.
17781if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17782  # Do not probe for cc on MacOSX.
17783  COMPILER_CHECK_LIST="cl gcc"
17784else
17785  COMPILER_CHECK_LIST="cl cc gcc"
17786fi
17787
17788
17789  COMPILER_NAME=C
17790
17791  CC=
17792  # If TOOLS_DIR is set, check for all compiler names in there first
17793  # before checking the rest of the PATH.
17794  if test -n "$TOOLS_DIR"; then
17795    PATH_save="$PATH"
17796    PATH="$TOOLS_DIR"
17797    for ac_prog in $COMPILER_CHECK_LIST
17798do
17799  # Extract the first word of "$ac_prog", so it can be a program name with args.
17800set dummy $ac_prog; ac_word=$2
17801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17802$as_echo_n "checking for $ac_word... " >&6; }
17803if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
17804  $as_echo_n "(cached) " >&6
17805else
17806  case $TOOLS_DIR_CC in
17807  [\\/]* | ?:[\\/]*)
17808  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
17809  ;;
17810  *)
17811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17812for as_dir in $PATH
17813do
17814  IFS=$as_save_IFS
17815  test -z "$as_dir" && as_dir=.
17816    for ac_exec_ext in '' $ac_executable_extensions; do
17817  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17818    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
17819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17820    break 2
17821  fi
17822done
17823  done
17824IFS=$as_save_IFS
17825
17826  ;;
17827esac
17828fi
17829TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
17830if test -n "$TOOLS_DIR_CC"; then
17831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
17832$as_echo "$TOOLS_DIR_CC" >&6; }
17833else
17834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17835$as_echo "no" >&6; }
17836fi
17837
17838
17839  test -n "$TOOLS_DIR_CC" && break
17840done
17841
17842    CC=$TOOLS_DIR_CC
17843    PATH="$PATH_save"
17844  fi
17845
17846  # AC_PATH_PROGS can't be run multiple times with the same variable,
17847  # so create a new name for this run.
17848  if test "x$CC" = x; then
17849    for ac_prog in $COMPILER_CHECK_LIST
17850do
17851  # Extract the first word of "$ac_prog", so it can be a program name with args.
17852set dummy $ac_prog; ac_word=$2
17853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17854$as_echo_n "checking for $ac_word... " >&6; }
17855if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17856  $as_echo_n "(cached) " >&6
17857else
17858  case $POTENTIAL_CC in
17859  [\\/]* | ?:[\\/]*)
17860  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17861  ;;
17862  *)
17863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17864for as_dir in $PATH
17865do
17866  IFS=$as_save_IFS
17867  test -z "$as_dir" && as_dir=.
17868    for ac_exec_ext in '' $ac_executable_extensions; do
17869  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17870    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17872    break 2
17873  fi
17874done
17875  done
17876IFS=$as_save_IFS
17877
17878  ;;
17879esac
17880fi
17881POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17882if test -n "$POTENTIAL_CC"; then
17883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17884$as_echo "$POTENTIAL_CC" >&6; }
17885else
17886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17887$as_echo "no" >&6; }
17888fi
17889
17890
17891  test -n "$POTENTIAL_CC" && break
17892done
17893
17894    CC=$POTENTIAL_CC
17895  fi
17896
17897  if test "x$CC" = x; then
17898
17899    # Print a helpful message on how to acquire the necessary build dependency.
17900    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17901    MISSING_DEPENDENCY=devkit
17902    PKGHANDLER_COMMAND=
17903
17904    case $PKGHANDLER in
17905	apt-get)
17906                apt_help     $MISSING_DEPENDENCY ;;
17907    yum)
17908                yum_help     $MISSING_DEPENDENCY ;;
17909	port)
17910                port_help    $MISSING_DEPENDENCY ;;
17911	pkgutil)
17912                pkgutil_help $MISSING_DEPENDENCY ;;
17913	pkgadd)
17914                pkgadd_help  $MISSING_DEPENDENCY ;;
17915    * )
17916      break ;;
17917    esac
17918
17919    if test "x$PKGHANDLER_COMMAND" != x; then
17920        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17921    fi
17922
17923      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17924  fi
17925
17926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17927
17928  # First separate the path from the arguments. This will split at the first
17929  # space.
17930  complete="$CC"
17931  path="${complete%% *}"
17932  tmp="$complete EOL"
17933  arguments="${tmp#* }"
17934
17935  # Input might be given as Windows format, start by converting to
17936  # unix format.
17937  new_path=`$CYGPATH -u "$path"`
17938
17939  # Now try to locate executable using which
17940  new_path=`$WHICH "$new_path" 2> /dev/null`
17941  # bat and cmd files are not always considered executable in cygwin causing which
17942  # to not find them
17943  if test "x$new_path" = x \
17944           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17945           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17946    new_path=`$CYGPATH -u "$path"`
17947  fi
17948  if test "x$new_path" = x; then
17949    # Oops. Which didn't find the executable.
17950    # The splitting of arguments from the executable at a space might have been incorrect,
17951    # since paths with space are more likely in Windows. Give it another try with the whole
17952    # argument.
17953    path="$complete"
17954    arguments="EOL"
17955    new_path=`$CYGPATH -u "$path"`
17956    new_path=`$WHICH "$new_path" 2> /dev/null`
17957    # bat and cmd files are not always considered executable in cygwin causing which
17958    # to not find them
17959    if test "x$new_path" = x \
17960             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17961             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17962      new_path=`$CYGPATH -u "$path"`
17963    fi
17964    if test "x$new_path" = x; then
17965      # It's still not found. Now this is an unrecoverable error.
17966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17967$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17968      has_space=`$ECHO "$complete" | $GREP " "`
17969      if test "x$has_space" != x; then
17970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17972      fi
17973      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17974    fi
17975  fi
17976
17977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17980  # "foo.exe" is OK but "foo" is an error.
17981  #
17982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17983  # It is also a way to make sure we got the proper file name for the real test later on.
17984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17985  if test "x$test_shortpath" = x; then
17986    # Short path failed, file does not exist as specified.
17987    # Try adding .exe or .cmd
17988    if test -f "${new_path}.exe"; then
17989       input_to_shortpath="${new_path}.exe"
17990    elif test -f "${new_path}.cmd"; then
17991       input_to_shortpath="${new_path}.cmd"
17992    else
17993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17994$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17995      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17996$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17997      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17998    fi
17999  else
18000    input_to_shortpath="$new_path"
18001  fi
18002
18003  # Call helper function which possibly converts this using DOS-style short mode.
18004  # If so, the updated path is stored in $new_path.
18005  new_path="$input_to_shortpath"
18006
18007  input_path="$input_to_shortpath"
18008  # Check if we need to convert this using DOS-style short mode. If the path
18009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18010  # take no chances and rewrite it.
18011  # Note: m4 eats our [], so we need to use [ and ] instead.
18012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18013  if test "x$has_forbidden_chars" != x; then
18014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18018      # Going to short mode and back again did indeed matter. Since short mode is
18019      # case insensitive, let's make it lowercase to improve readability.
18020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18021      # Now convert it back to Unix-stile (cygpath)
18022      input_path=`$CYGPATH -u "$shortmode_path"`
18023      new_path="$input_path"
18024    fi
18025  fi
18026
18027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18028  if test "x$test_cygdrive_prefix" = x; then
18029    # As a simple fix, exclude /usr/bin since it's not a real path.
18030    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18032      # a path prefixed by /cygdrive for fixpath to work.
18033      new_path="$CYGWIN_ROOT_PATH$input_path"
18034    fi
18035  fi
18036
18037  # remove trailing .exe if any
18038  new_path="${new_path/%.exe/}"
18039
18040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18041
18042  # First separate the path from the arguments. This will split at the first
18043  # space.
18044  complete="$CC"
18045  path="${complete%% *}"
18046  tmp="$complete EOL"
18047  arguments="${tmp#* }"
18048
18049  # Input might be given as Windows format, start by converting to
18050  # unix format.
18051  new_path="$path"
18052
18053  windows_path="$new_path"
18054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18055    unix_path=`$CYGPATH -u "$windows_path"`
18056    new_path="$unix_path"
18057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18059    new_path="$unix_path"
18060  fi
18061
18062
18063  # Now try to locate executable using which
18064  new_path=`$WHICH "$new_path" 2> /dev/null`
18065
18066  if test "x$new_path" = x; then
18067    # Oops. Which didn't find the executable.
18068    # The splitting of arguments from the executable at a space might have been incorrect,
18069    # since paths with space are more likely in Windows. Give it another try with the whole
18070    # argument.
18071    path="$complete"
18072    arguments="EOL"
18073    new_path="$path"
18074
18075  windows_path="$new_path"
18076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18077    unix_path=`$CYGPATH -u "$windows_path"`
18078    new_path="$unix_path"
18079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18081    new_path="$unix_path"
18082  fi
18083
18084
18085    new_path=`$WHICH "$new_path" 2> /dev/null`
18086
18087    if test "x$new_path" = x; then
18088      # It's still not found. Now this is an unrecoverable error.
18089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18090$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18091      has_space=`$ECHO "$complete" | $GREP " "`
18092      if test "x$has_space" != x; then
18093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18095      fi
18096      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18097    fi
18098  fi
18099
18100  # Now new_path has a complete unix path to the binary
18101  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18102    # Keep paths in /bin as-is, but remove trailing .exe if any
18103    new_path="${new_path/%.exe/}"
18104    # Do not save /bin paths to all_fixpath_prefixes!
18105  else
18106    # Not in mixed or Windows style, start by that.
18107    new_path=`cmd //c echo $new_path`
18108
18109  input_path="$new_path"
18110  # Check if we need to convert this using DOS-style short mode. If the path
18111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18112  # take no chances and rewrite it.
18113  # Note: m4 eats our [], so we need to use [ and ] instead.
18114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18115  if test "x$has_forbidden_chars" != x; then
18116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18118  fi
18119
18120    # Output is in $new_path
18121
18122  windows_path="$new_path"
18123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18124    unix_path=`$CYGPATH -u "$windows_path"`
18125    new_path="$unix_path"
18126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18128    new_path="$unix_path"
18129  fi
18130
18131    # remove trailing .exe if any
18132    new_path="${new_path/%.exe/}"
18133
18134    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18135    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18136  fi
18137
18138  else
18139    # We're on a posix platform. Hooray! :)
18140    # First separate the path from the arguments. This will split at the first
18141    # space.
18142    complete="$CC"
18143    path="${complete%% *}"
18144    tmp="$complete EOL"
18145    arguments="${tmp#* }"
18146
18147    new_path=`$WHICH $path 2> /dev/null`
18148    if test "x$new_path" = x; then
18149      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18150      if test "x$is_absolute_path" != x; then
18151        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
18152$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
18153        new_path="$path"
18154      else
18155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18156$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18157        has_space=`$ECHO "$complete" | $GREP " "`
18158        if test "x$has_space" != x; then
18159          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18161        fi
18162        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18163      fi
18164    fi
18165  fi
18166
18167  # Now join together the path and the arguments once again
18168  if test "x$arguments" != xEOL; then
18169      new_complete="$new_path ${arguments% *}"
18170  else
18171      new_complete="$new_path"
18172  fi
18173
18174  if test "x$complete" != "x$new_complete"; then
18175    CC="$new_complete"
18176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18177$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18178  fi
18179
18180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18181$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18182  TEST_COMPILER="$CC"
18183
18184    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18185        # Follow a chain of symbolic links. Use readlink
18186        # where it exists, else fall back to horribly
18187        # complicated shell code.
18188        if test "x$READLINK_TESTED" != yes; then
18189            # On MacOSX there is a readlink tool with a different
18190            # purpose than the GNU readlink tool. Check the found readlink.
18191            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18192            if test "x$ISGNU" = x; then
18193                 # A readlink that we do not know how to use.
18194                 # Are there other non-GNU readlinks out there?
18195                 READLINK_TESTED=yes
18196                 READLINK=
18197            fi
18198        fi
18199
18200        if test "x$READLINK" != x; then
18201            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18202        else
18203            # Save the current directory for restoring afterwards
18204            STARTDIR=$PWD
18205            COUNTER=0
18206            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18207            sym_link_file=`$BASENAME $TEST_COMPILER`
18208            # Use the system pwd and not the shell builtin to resolve directory symlinks
18209            cd $sym_link_dir
18210            cd `$THEPWDCMD`
18211            sym_link_dir=`$THEPWDCMD`
18212            # Resolve file symlinks
18213            while test $COUNTER -lt 20; do
18214                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18215                if test "x$ISLINK" == x; then
18216                    # This is not a symbolic link! We are done!
18217                    break
18218                fi
18219                # Again resolve directory symlinks since the target of the just found
18220                # link could be in a different directory
18221                cd `$DIRNAME $ISLINK`
18222                sym_link_dir=`$THEPWDCMD`
18223                sym_link_file=`$BASENAME $ISLINK`
18224                let COUNTER=COUNTER+1
18225            done
18226            cd $STARTDIR
18227            TEST_COMPILER=$sym_link_dir/$sym_link_file
18228        fi
18229    fi
18230
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18232$as_echo "$TEST_COMPILER" >&6; }
18233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18234$as_echo_n "checking if CC is disguised ccache... " >&6; }
18235
18236  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18237  if test "x$COMPILER_BASENAME" = "xccache"; then
18238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18239$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18240    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18241    # We want to control ccache invocation ourselves, so ignore this cc and try
18242    # searching again.
18243
18244    # Remove the path to the fake ccache cc from the PATH
18245    RETRY_COMPILER_SAVED_PATH="$PATH"
18246    COMPILER_DIRNAME=`$DIRNAME $CC`
18247    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18248
18249    # Try again looking for our compiler
18250    if test -n "$ac_tool_prefix"; then
18251  for ac_prog in $COMPILER_CHECK_LIST
18252  do
18253    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18254set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18256$as_echo_n "checking for $ac_word... " >&6; }
18257if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18258  $as_echo_n "(cached) " >&6
18259else
18260  if test -n "$PROPER_COMPILER_CC"; then
18261  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18262else
18263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18264for as_dir in $PATH
18265do
18266  IFS=$as_save_IFS
18267  test -z "$as_dir" && as_dir=.
18268    for ac_exec_ext in '' $ac_executable_extensions; do
18269  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18270    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18272    break 2
18273  fi
18274done
18275  done
18276IFS=$as_save_IFS
18277
18278fi
18279fi
18280PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18281if test -n "$PROPER_COMPILER_CC"; then
18282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18283$as_echo "$PROPER_COMPILER_CC" >&6; }
18284else
18285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18286$as_echo "no" >&6; }
18287fi
18288
18289
18290    test -n "$PROPER_COMPILER_CC" && break
18291  done
18292fi
18293if test -z "$PROPER_COMPILER_CC"; then
18294  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18295  for ac_prog in $COMPILER_CHECK_LIST
18296do
18297  # Extract the first word of "$ac_prog", so it can be a program name with args.
18298set dummy $ac_prog; ac_word=$2
18299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18300$as_echo_n "checking for $ac_word... " >&6; }
18301if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18302  $as_echo_n "(cached) " >&6
18303else
18304  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18305  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18306else
18307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18308for as_dir in $PATH
18309do
18310  IFS=$as_save_IFS
18311  test -z "$as_dir" && as_dir=.
18312    for ac_exec_ext in '' $ac_executable_extensions; do
18313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18314    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18316    break 2
18317  fi
18318done
18319  done
18320IFS=$as_save_IFS
18321
18322fi
18323fi
18324ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18325if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18327$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18328else
18329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18330$as_echo "no" >&6; }
18331fi
18332
18333
18334  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18335done
18336
18337  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18338    PROPER_COMPILER_CC=""
18339  else
18340    case $cross_compiling:$ac_tool_warned in
18341yes:)
18342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18344ac_tool_warned=yes ;;
18345esac
18346    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18347  fi
18348fi
18349
18350
18351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18352
18353  # First separate the path from the arguments. This will split at the first
18354  # space.
18355  complete="$PROPER_COMPILER_CC"
18356  path="${complete%% *}"
18357  tmp="$complete EOL"
18358  arguments="${tmp#* }"
18359
18360  # Input might be given as Windows format, start by converting to
18361  # unix format.
18362  new_path=`$CYGPATH -u "$path"`
18363
18364  # Now try to locate executable using which
18365  new_path=`$WHICH "$new_path" 2> /dev/null`
18366  # bat and cmd files are not always considered executable in cygwin causing which
18367  # to not find them
18368  if test "x$new_path" = x \
18369           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18370           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18371    new_path=`$CYGPATH -u "$path"`
18372  fi
18373  if test "x$new_path" = x; then
18374    # Oops. Which didn't find the executable.
18375    # The splitting of arguments from the executable at a space might have been incorrect,
18376    # since paths with space are more likely in Windows. Give it another try with the whole
18377    # argument.
18378    path="$complete"
18379    arguments="EOL"
18380    new_path=`$CYGPATH -u "$path"`
18381    new_path=`$WHICH "$new_path" 2> /dev/null`
18382    # bat and cmd files are not always considered executable in cygwin causing which
18383    # to not find them
18384    if test "x$new_path" = x \
18385             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18386             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18387      new_path=`$CYGPATH -u "$path"`
18388    fi
18389    if test "x$new_path" = x; then
18390      # It's still not found. Now this is an unrecoverable error.
18391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18392$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18393      has_space=`$ECHO "$complete" | $GREP " "`
18394      if test "x$has_space" != x; then
18395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18397      fi
18398      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18399    fi
18400  fi
18401
18402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18405  # "foo.exe" is OK but "foo" is an error.
18406  #
18407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18408  # It is also a way to make sure we got the proper file name for the real test later on.
18409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18410  if test "x$test_shortpath" = x; then
18411    # Short path failed, file does not exist as specified.
18412    # Try adding .exe or .cmd
18413    if test -f "${new_path}.exe"; then
18414       input_to_shortpath="${new_path}.exe"
18415    elif test -f "${new_path}.cmd"; then
18416       input_to_shortpath="${new_path}.cmd"
18417    else
18418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18419$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18420      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18421$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18422      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18423    fi
18424  else
18425    input_to_shortpath="$new_path"
18426  fi
18427
18428  # Call helper function which possibly converts this using DOS-style short mode.
18429  # If so, the updated path is stored in $new_path.
18430  new_path="$input_to_shortpath"
18431
18432  input_path="$input_to_shortpath"
18433  # Check if we need to convert this using DOS-style short mode. If the path
18434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18435  # take no chances and rewrite it.
18436  # Note: m4 eats our [], so we need to use [ and ] instead.
18437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18438  if test "x$has_forbidden_chars" != x; then
18439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18443      # Going to short mode and back again did indeed matter. Since short mode is
18444      # case insensitive, let's make it lowercase to improve readability.
18445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18446      # Now convert it back to Unix-stile (cygpath)
18447      input_path=`$CYGPATH -u "$shortmode_path"`
18448      new_path="$input_path"
18449    fi
18450  fi
18451
18452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18453  if test "x$test_cygdrive_prefix" = x; then
18454    # As a simple fix, exclude /usr/bin since it's not a real path.
18455    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18457      # a path prefixed by /cygdrive for fixpath to work.
18458      new_path="$CYGWIN_ROOT_PATH$input_path"
18459    fi
18460  fi
18461
18462  # remove trailing .exe if any
18463  new_path="${new_path/%.exe/}"
18464
18465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18466
18467  # First separate the path from the arguments. This will split at the first
18468  # space.
18469  complete="$PROPER_COMPILER_CC"
18470  path="${complete%% *}"
18471  tmp="$complete EOL"
18472  arguments="${tmp#* }"
18473
18474  # Input might be given as Windows format, start by converting to
18475  # unix format.
18476  new_path="$path"
18477
18478  windows_path="$new_path"
18479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18480    unix_path=`$CYGPATH -u "$windows_path"`
18481    new_path="$unix_path"
18482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18484    new_path="$unix_path"
18485  fi
18486
18487
18488  # Now try to locate executable using which
18489  new_path=`$WHICH "$new_path" 2> /dev/null`
18490
18491  if test "x$new_path" = x; then
18492    # Oops. Which didn't find the executable.
18493    # The splitting of arguments from the executable at a space might have been incorrect,
18494    # since paths with space are more likely in Windows. Give it another try with the whole
18495    # argument.
18496    path="$complete"
18497    arguments="EOL"
18498    new_path="$path"
18499
18500  windows_path="$new_path"
18501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18502    unix_path=`$CYGPATH -u "$windows_path"`
18503    new_path="$unix_path"
18504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18506    new_path="$unix_path"
18507  fi
18508
18509
18510    new_path=`$WHICH "$new_path" 2> /dev/null`
18511
18512    if test "x$new_path" = x; then
18513      # It's still not found. Now this is an unrecoverable error.
18514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18515$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18516      has_space=`$ECHO "$complete" | $GREP " "`
18517      if test "x$has_space" != x; then
18518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18520      fi
18521      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18522    fi
18523  fi
18524
18525  # Now new_path has a complete unix path to the binary
18526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18527    # Keep paths in /bin as-is, but remove trailing .exe if any
18528    new_path="${new_path/%.exe/}"
18529    # Do not save /bin paths to all_fixpath_prefixes!
18530  else
18531    # Not in mixed or Windows style, start by that.
18532    new_path=`cmd //c echo $new_path`
18533
18534  input_path="$new_path"
18535  # Check if we need to convert this using DOS-style short mode. If the path
18536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18537  # take no chances and rewrite it.
18538  # Note: m4 eats our [], so we need to use [ and ] instead.
18539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18540  if test "x$has_forbidden_chars" != x; then
18541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18543  fi
18544
18545    # Output is in $new_path
18546
18547  windows_path="$new_path"
18548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18549    unix_path=`$CYGPATH -u "$windows_path"`
18550    new_path="$unix_path"
18551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18553    new_path="$unix_path"
18554  fi
18555
18556    # remove trailing .exe if any
18557    new_path="${new_path/%.exe/}"
18558
18559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18561  fi
18562
18563  else
18564    # We're on a posix platform. Hooray! :)
18565    # First separate the path from the arguments. This will split at the first
18566    # space.
18567    complete="$PROPER_COMPILER_CC"
18568    path="${complete%% *}"
18569    tmp="$complete EOL"
18570    arguments="${tmp#* }"
18571
18572    new_path=`$WHICH $path 2> /dev/null`
18573    if test "x$new_path" = x; then
18574      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18575      if test "x$is_absolute_path" != x; then
18576        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18577$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18578        new_path="$path"
18579      else
18580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18581$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18582        has_space=`$ECHO "$complete" | $GREP " "`
18583        if test "x$has_space" != x; then
18584          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18585$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18586        fi
18587        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18588      fi
18589    fi
18590  fi
18591
18592  # Now join together the path and the arguments once again
18593  if test "x$arguments" != xEOL; then
18594      new_complete="$new_path ${arguments% *}"
18595  else
18596      new_complete="$new_path"
18597  fi
18598
18599  if test "x$complete" != "x$new_complete"; then
18600    PROPER_COMPILER_CC="$new_complete"
18601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18602$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18603  fi
18604
18605    PATH="$RETRY_COMPILER_SAVED_PATH"
18606
18607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18608$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18609
18610    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18611        # Follow a chain of symbolic links. Use readlink
18612        # where it exists, else fall back to horribly
18613        # complicated shell code.
18614        if test "x$READLINK_TESTED" != yes; then
18615            # On MacOSX there is a readlink tool with a different
18616            # purpose than the GNU readlink tool. Check the found readlink.
18617            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18618            if test "x$ISGNU" = x; then
18619                 # A readlink that we do not know how to use.
18620                 # Are there other non-GNU readlinks out there?
18621                 READLINK_TESTED=yes
18622                 READLINK=
18623            fi
18624        fi
18625
18626        if test "x$READLINK" != x; then
18627            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18628        else
18629            # Save the current directory for restoring afterwards
18630            STARTDIR=$PWD
18631            COUNTER=0
18632            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18633            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18634            # Use the system pwd and not the shell builtin to resolve directory symlinks
18635            cd $sym_link_dir
18636            cd `$THEPWDCMD`
18637            sym_link_dir=`$THEPWDCMD`
18638            # Resolve file symlinks
18639            while test $COUNTER -lt 20; do
18640                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18641                if test "x$ISLINK" == x; then
18642                    # This is not a symbolic link! We are done!
18643                    break
18644                fi
18645                # Again resolve directory symlinks since the target of the just found
18646                # link could be in a different directory
18647                cd `$DIRNAME $ISLINK`
18648                sym_link_dir=`$THEPWDCMD`
18649                sym_link_file=`$BASENAME $ISLINK`
18650                let COUNTER=COUNTER+1
18651            done
18652            cd $STARTDIR
18653            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18654        fi
18655    fi
18656
18657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18658$as_echo "$PROPER_COMPILER_CC" >&6; }
18659    CC="$PROPER_COMPILER_CC"
18660  else
18661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18662$as_echo "no, keeping CC" >&6; }
18663    CC="$TEST_COMPILER"
18664  fi
18665
18666  COMPILER=$CC
18667  COMPILER_NAME=$COMPILER_NAME
18668
18669  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18670    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18671    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18672    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18673    if test $? -ne 0; then
18674      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18675
18676      { $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
18677$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18678      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18679$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18680      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18681    else
18682      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18683      COMPILER_VENDOR="Sun Studio"
18684    fi
18685  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18686    # First line typically looks something like:
18687    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18688    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18689    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18690    COMPILER_VENDOR="Microsoft CL.EXE"
18691    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18692    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18693      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18694        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18695      fi
18696    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18697      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18698        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18699      fi
18700    fi
18701  else
18702    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18703    # Check that this is likely to be GCC.
18704    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18705    if test $? -ne 0; then
18706      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18707$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18708      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18709$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18710      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18711    fi
18712
18713    # First line typically looks something like:
18714    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18715    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18716    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18717  fi
18718  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18719  CC_VERSION="$COMPILER_VERSION"
18720  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18721  CC_VENDOR="$COMPILER_VENDOR"
18722
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18724$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18725
18726
18727# Now that we have resolved CC ourself, let autoconf have it's go at it
18728ac_ext=c
18729ac_cpp='$CPP $CPPFLAGS'
18730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18732ac_compiler_gnu=$ac_cv_c_compiler_gnu
18733if test -n "$ac_tool_prefix"; then
18734  for ac_prog in $CC
18735  do
18736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18739$as_echo_n "checking for $ac_word... " >&6; }
18740if test "${ac_cv_prog_CC+set}" = set; then :
18741  $as_echo_n "(cached) " >&6
18742else
18743  if test -n "$CC"; then
18744  ac_cv_prog_CC="$CC" # Let the user override the test.
18745else
18746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18747for as_dir in $PATH
18748do
18749  IFS=$as_save_IFS
18750  test -z "$as_dir" && as_dir=.
18751    for ac_exec_ext in '' $ac_executable_extensions; do
18752  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18753    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18755    break 2
18756  fi
18757done
18758  done
18759IFS=$as_save_IFS
18760
18761fi
18762fi
18763CC=$ac_cv_prog_CC
18764if test -n "$CC"; then
18765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18766$as_echo "$CC" >&6; }
18767else
18768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18769$as_echo "no" >&6; }
18770fi
18771
18772
18773    test -n "$CC" && break
18774  done
18775fi
18776if test -z "$CC"; then
18777  ac_ct_CC=$CC
18778  for ac_prog in $CC
18779do
18780  # Extract the first word of "$ac_prog", so it can be a program name with args.
18781set dummy $ac_prog; ac_word=$2
18782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18783$as_echo_n "checking for $ac_word... " >&6; }
18784if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18785  $as_echo_n "(cached) " >&6
18786else
18787  if test -n "$ac_ct_CC"; then
18788  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18789else
18790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18791for as_dir in $PATH
18792do
18793  IFS=$as_save_IFS
18794  test -z "$as_dir" && as_dir=.
18795    for ac_exec_ext in '' $ac_executable_extensions; do
18796  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18797    ac_cv_prog_ac_ct_CC="$ac_prog"
18798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18799    break 2
18800  fi
18801done
18802  done
18803IFS=$as_save_IFS
18804
18805fi
18806fi
18807ac_ct_CC=$ac_cv_prog_ac_ct_CC
18808if test -n "$ac_ct_CC"; then
18809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18810$as_echo "$ac_ct_CC" >&6; }
18811else
18812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18813$as_echo "no" >&6; }
18814fi
18815
18816
18817  test -n "$ac_ct_CC" && break
18818done
18819
18820  if test "x$ac_ct_CC" = x; then
18821    CC=""
18822  else
18823    case $cross_compiling:$ac_tool_warned in
18824yes:)
18825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18827ac_tool_warned=yes ;;
18828esac
18829    CC=$ac_ct_CC
18830  fi
18831fi
18832
18833
18834test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18836as_fn_error $? "no acceptable C compiler found in \$PATH
18837See \`config.log' for more details" "$LINENO" 5 ; }
18838
18839# Provide some information about the compiler.
18840$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18841set X $ac_compile
18842ac_compiler=$2
18843for ac_option in --version -v -V -qversion; do
18844  { { ac_try="$ac_compiler $ac_option >&5"
18845case "(($ac_try" in
18846  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18847  *) ac_try_echo=$ac_try;;
18848esac
18849eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18850$as_echo "$ac_try_echo"; } >&5
18851  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18852  ac_status=$?
18853  if test -s conftest.err; then
18854    sed '10a\
18855... rest of stderr output deleted ...
18856         10q' conftest.err >conftest.er1
18857    cat conftest.er1 >&5
18858  fi
18859  rm -f conftest.er1 conftest.err
18860  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18861  test $ac_status = 0; }
18862done
18863
18864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18865/* end confdefs.h.  */
18866
18867int
18868main ()
18869{
18870
18871  ;
18872  return 0;
18873}
18874_ACEOF
18875ac_clean_files_save=$ac_clean_files
18876ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18877# Try to create an executable without -o first, disregard a.out.
18878# It will help us diagnose broken compilers, and finding out an intuition
18879# of exeext.
18880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18881$as_echo_n "checking whether the C compiler works... " >&6; }
18882ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18883
18884# The possible output files:
18885ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18886
18887ac_rmfiles=
18888for ac_file in $ac_files
18889do
18890  case $ac_file in
18891    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18892    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18893  esac
18894done
18895rm -f $ac_rmfiles
18896
18897if { { ac_try="$ac_link_default"
18898case "(($ac_try" in
18899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18900  *) ac_try_echo=$ac_try;;
18901esac
18902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18903$as_echo "$ac_try_echo"; } >&5
18904  (eval "$ac_link_default") 2>&5
18905  ac_status=$?
18906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18907  test $ac_status = 0; }; then :
18908  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18909# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18910# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18911# so that the user can short-circuit this test for compilers unknown to
18912# Autoconf.
18913for ac_file in $ac_files ''
18914do
18915  test -f "$ac_file" || continue
18916  case $ac_file in
18917    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18918	;;
18919    [ab].out )
18920	# We found the default executable, but exeext='' is most
18921	# certainly right.
18922	break;;
18923    *.* )
18924	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18925	then :; else
18926	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18927	fi
18928	# We set ac_cv_exeext here because the later test for it is not
18929	# safe: cross compilers may not add the suffix if given an `-o'
18930	# argument, so we may need to know it at that point already.
18931	# Even if this section looks crufty: it has the advantage of
18932	# actually working.
18933	break;;
18934    * )
18935	break;;
18936  esac
18937done
18938test "$ac_cv_exeext" = no && ac_cv_exeext=
18939
18940else
18941  ac_file=''
18942fi
18943if test -z "$ac_file"; then :
18944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18945$as_echo "no" >&6; }
18946$as_echo "$as_me: failed program was:" >&5
18947sed 's/^/| /' conftest.$ac_ext >&5
18948
18949{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18951as_fn_error 77 "C compiler cannot create executables
18952See \`config.log' for more details" "$LINENO" 5 ; }
18953else
18954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18955$as_echo "yes" >&6; }
18956fi
18957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18958$as_echo_n "checking for C compiler default output file name... " >&6; }
18959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18960$as_echo "$ac_file" >&6; }
18961ac_exeext=$ac_cv_exeext
18962
18963rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18964ac_clean_files=$ac_clean_files_save
18965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18966$as_echo_n "checking for suffix of executables... " >&6; }
18967if { { ac_try="$ac_link"
18968case "(($ac_try" in
18969  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18970  *) ac_try_echo=$ac_try;;
18971esac
18972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18973$as_echo "$ac_try_echo"; } >&5
18974  (eval "$ac_link") 2>&5
18975  ac_status=$?
18976  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18977  test $ac_status = 0; }; then :
18978  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18979# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18980# work properly (i.e., refer to `conftest.exe'), while it won't with
18981# `rm'.
18982for ac_file in conftest.exe conftest conftest.*; do
18983  test -f "$ac_file" || continue
18984  case $ac_file in
18985    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18986    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18987	  break;;
18988    * ) break;;
18989  esac
18990done
18991else
18992  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18994as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18995See \`config.log' for more details" "$LINENO" 5 ; }
18996fi
18997rm -f conftest conftest$ac_cv_exeext
18998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18999$as_echo "$ac_cv_exeext" >&6; }
19000
19001rm -f conftest.$ac_ext
19002EXEEXT=$ac_cv_exeext
19003ac_exeext=$EXEEXT
19004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19005/* end confdefs.h.  */
19006#include <stdio.h>
19007int
19008main ()
19009{
19010FILE *f = fopen ("conftest.out", "w");
19011 return ferror (f) || fclose (f) != 0;
19012
19013  ;
19014  return 0;
19015}
19016_ACEOF
19017ac_clean_files="$ac_clean_files conftest.out"
19018# Check that the compiler produces executables we can run.  If not, either
19019# the compiler is broken, or we cross compile.
19020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19021$as_echo_n "checking whether we are cross compiling... " >&6; }
19022if test "$cross_compiling" != yes; then
19023  { { ac_try="$ac_link"
19024case "(($ac_try" in
19025  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19026  *) ac_try_echo=$ac_try;;
19027esac
19028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19029$as_echo "$ac_try_echo"; } >&5
19030  (eval "$ac_link") 2>&5
19031  ac_status=$?
19032  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19033  test $ac_status = 0; }
19034  if { ac_try='./conftest$ac_cv_exeext'
19035  { { case "(($ac_try" in
19036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19037  *) ac_try_echo=$ac_try;;
19038esac
19039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19040$as_echo "$ac_try_echo"; } >&5
19041  (eval "$ac_try") 2>&5
19042  ac_status=$?
19043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19044  test $ac_status = 0; }; }; then
19045    cross_compiling=no
19046  else
19047    if test "$cross_compiling" = maybe; then
19048	cross_compiling=yes
19049    else
19050	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19052as_fn_error $? "cannot run C compiled programs.
19053If you meant to cross compile, use \`--host'.
19054See \`config.log' for more details" "$LINENO" 5 ; }
19055    fi
19056  fi
19057fi
19058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19059$as_echo "$cross_compiling" >&6; }
19060
19061rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19062ac_clean_files=$ac_clean_files_save
19063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19064$as_echo_n "checking for suffix of object files... " >&6; }
19065if test "${ac_cv_objext+set}" = set; then :
19066  $as_echo_n "(cached) " >&6
19067else
19068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19069/* end confdefs.h.  */
19070
19071int
19072main ()
19073{
19074
19075  ;
19076  return 0;
19077}
19078_ACEOF
19079rm -f conftest.o conftest.obj
19080if { { ac_try="$ac_compile"
19081case "(($ac_try" in
19082  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19083  *) ac_try_echo=$ac_try;;
19084esac
19085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19086$as_echo "$ac_try_echo"; } >&5
19087  (eval "$ac_compile") 2>&5
19088  ac_status=$?
19089  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19090  test $ac_status = 0; }; then :
19091  for ac_file in conftest.o conftest.obj conftest.*; do
19092  test -f "$ac_file" || continue;
19093  case $ac_file in
19094    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19095    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19096       break;;
19097  esac
19098done
19099else
19100  $as_echo "$as_me: failed program was:" >&5
19101sed 's/^/| /' conftest.$ac_ext >&5
19102
19103{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19105as_fn_error $? "cannot compute suffix of object files: cannot compile
19106See \`config.log' for more details" "$LINENO" 5 ; }
19107fi
19108rm -f conftest.$ac_cv_objext conftest.$ac_ext
19109fi
19110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19111$as_echo "$ac_cv_objext" >&6; }
19112OBJEXT=$ac_cv_objext
19113ac_objext=$OBJEXT
19114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19115$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19116if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19117  $as_echo_n "(cached) " >&6
19118else
19119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19120/* end confdefs.h.  */
19121
19122int
19123main ()
19124{
19125#ifndef __GNUC__
19126       choke me
19127#endif
19128
19129  ;
19130  return 0;
19131}
19132_ACEOF
19133if ac_fn_c_try_compile "$LINENO"; then :
19134  ac_compiler_gnu=yes
19135else
19136  ac_compiler_gnu=no
19137fi
19138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19139ac_cv_c_compiler_gnu=$ac_compiler_gnu
19140
19141fi
19142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19143$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19144if test $ac_compiler_gnu = yes; then
19145  GCC=yes
19146else
19147  GCC=
19148fi
19149ac_test_CFLAGS=${CFLAGS+set}
19150ac_save_CFLAGS=$CFLAGS
19151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19152$as_echo_n "checking whether $CC accepts -g... " >&6; }
19153if test "${ac_cv_prog_cc_g+set}" = set; then :
19154  $as_echo_n "(cached) " >&6
19155else
19156  ac_save_c_werror_flag=$ac_c_werror_flag
19157   ac_c_werror_flag=yes
19158   ac_cv_prog_cc_g=no
19159   CFLAGS="-g"
19160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19161/* end confdefs.h.  */
19162
19163int
19164main ()
19165{
19166
19167  ;
19168  return 0;
19169}
19170_ACEOF
19171if ac_fn_c_try_compile "$LINENO"; then :
19172  ac_cv_prog_cc_g=yes
19173else
19174  CFLAGS=""
19175      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19176/* end confdefs.h.  */
19177
19178int
19179main ()
19180{
19181
19182  ;
19183  return 0;
19184}
19185_ACEOF
19186if ac_fn_c_try_compile "$LINENO"; then :
19187
19188else
19189  ac_c_werror_flag=$ac_save_c_werror_flag
19190	 CFLAGS="-g"
19191	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19192/* end confdefs.h.  */
19193
19194int
19195main ()
19196{
19197
19198  ;
19199  return 0;
19200}
19201_ACEOF
19202if ac_fn_c_try_compile "$LINENO"; then :
19203  ac_cv_prog_cc_g=yes
19204fi
19205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19206fi
19207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19208fi
19209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19210   ac_c_werror_flag=$ac_save_c_werror_flag
19211fi
19212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19213$as_echo "$ac_cv_prog_cc_g" >&6; }
19214if test "$ac_test_CFLAGS" = set; then
19215  CFLAGS=$ac_save_CFLAGS
19216elif test $ac_cv_prog_cc_g = yes; then
19217  if test "$GCC" = yes; then
19218    CFLAGS="-g -O2"
19219  else
19220    CFLAGS="-g"
19221  fi
19222else
19223  if test "$GCC" = yes; then
19224    CFLAGS="-O2"
19225  else
19226    CFLAGS=
19227  fi
19228fi
19229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19230$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19231if test "${ac_cv_prog_cc_c89+set}" = set; then :
19232  $as_echo_n "(cached) " >&6
19233else
19234  ac_cv_prog_cc_c89=no
19235ac_save_CC=$CC
19236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19237/* end confdefs.h.  */
19238#include <stdarg.h>
19239#include <stdio.h>
19240#include <sys/types.h>
19241#include <sys/stat.h>
19242/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19243struct buf { int x; };
19244FILE * (*rcsopen) (struct buf *, struct stat *, int);
19245static char *e (p, i)
19246     char **p;
19247     int i;
19248{
19249  return p[i];
19250}
19251static char *f (char * (*g) (char **, int), char **p, ...)
19252{
19253  char *s;
19254  va_list v;
19255  va_start (v,p);
19256  s = g (p, va_arg (v,int));
19257  va_end (v);
19258  return s;
19259}
19260
19261/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19262   function prototypes and stuff, but not '\xHH' hex character constants.
19263   These don't provoke an error unfortunately, instead are silently treated
19264   as 'x'.  The following induces an error, until -std is added to get
19265   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19266   array size at least.  It's necessary to write '\x00'==0 to get something
19267   that's true only with -std.  */
19268int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19269
19270/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19271   inside strings and character constants.  */
19272#define FOO(x) 'x'
19273int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19274
19275int test (int i, double x);
19276struct s1 {int (*f) (int a);};
19277struct s2 {int (*f) (double a);};
19278int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19279int argc;
19280char **argv;
19281int
19282main ()
19283{
19284return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19285  ;
19286  return 0;
19287}
19288_ACEOF
19289for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19290	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19291do
19292  CC="$ac_save_CC $ac_arg"
19293  if ac_fn_c_try_compile "$LINENO"; then :
19294  ac_cv_prog_cc_c89=$ac_arg
19295fi
19296rm -f core conftest.err conftest.$ac_objext
19297  test "x$ac_cv_prog_cc_c89" != "xno" && break
19298done
19299rm -f conftest.$ac_ext
19300CC=$ac_save_CC
19301
19302fi
19303# AC_CACHE_VAL
19304case "x$ac_cv_prog_cc_c89" in
19305  x)
19306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19307$as_echo "none needed" >&6; } ;;
19308  xno)
19309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19310$as_echo "unsupported" >&6; } ;;
19311  *)
19312    CC="$CC $ac_cv_prog_cc_c89"
19313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19314$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19315esac
19316if test "x$ac_cv_prog_cc_c89" != xno; then :
19317
19318fi
19319
19320ac_ext=cpp
19321ac_cpp='$CXXCPP $CPPFLAGS'
19322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19325
19326
19327### Locate C++ compiler (CXX)
19328
19329if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19330  # Do not probe for CC on MacOSX.
19331  COMPILER_CHECK_LIST="cl g++"
19332else
19333  COMPILER_CHECK_LIST="cl CC g++"
19334fi
19335
19336  COMPILER_NAME=C++
19337
19338  CXX=
19339  # If TOOLS_DIR is set, check for all compiler names in there first
19340  # before checking the rest of the PATH.
19341  if test -n "$TOOLS_DIR"; then
19342    PATH_save="$PATH"
19343    PATH="$TOOLS_DIR"
19344    for ac_prog in $COMPILER_CHECK_LIST
19345do
19346  # Extract the first word of "$ac_prog", so it can be a program name with args.
19347set dummy $ac_prog; ac_word=$2
19348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19349$as_echo_n "checking for $ac_word... " >&6; }
19350if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19351  $as_echo_n "(cached) " >&6
19352else
19353  case $TOOLS_DIR_CXX in
19354  [\\/]* | ?:[\\/]*)
19355  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19356  ;;
19357  *)
19358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19359for as_dir in $PATH
19360do
19361  IFS=$as_save_IFS
19362  test -z "$as_dir" && as_dir=.
19363    for ac_exec_ext in '' $ac_executable_extensions; do
19364  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19365    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19367    break 2
19368  fi
19369done
19370  done
19371IFS=$as_save_IFS
19372
19373  ;;
19374esac
19375fi
19376TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19377if test -n "$TOOLS_DIR_CXX"; then
19378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19379$as_echo "$TOOLS_DIR_CXX" >&6; }
19380else
19381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19382$as_echo "no" >&6; }
19383fi
19384
19385
19386  test -n "$TOOLS_DIR_CXX" && break
19387done
19388
19389    CXX=$TOOLS_DIR_CXX
19390    PATH="$PATH_save"
19391  fi
19392
19393  # AC_PATH_PROGS can't be run multiple times with the same variable,
19394  # so create a new name for this run.
19395  if test "x$CXX" = x; then
19396    for ac_prog in $COMPILER_CHECK_LIST
19397do
19398  # Extract the first word of "$ac_prog", so it can be a program name with args.
19399set dummy $ac_prog; ac_word=$2
19400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19401$as_echo_n "checking for $ac_word... " >&6; }
19402if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19403  $as_echo_n "(cached) " >&6
19404else
19405  case $POTENTIAL_CXX in
19406  [\\/]* | ?:[\\/]*)
19407  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19408  ;;
19409  *)
19410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19411for as_dir in $PATH
19412do
19413  IFS=$as_save_IFS
19414  test -z "$as_dir" && as_dir=.
19415    for ac_exec_ext in '' $ac_executable_extensions; do
19416  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19417    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19419    break 2
19420  fi
19421done
19422  done
19423IFS=$as_save_IFS
19424
19425  ;;
19426esac
19427fi
19428POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19429if test -n "$POTENTIAL_CXX"; then
19430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19431$as_echo "$POTENTIAL_CXX" >&6; }
19432else
19433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19434$as_echo "no" >&6; }
19435fi
19436
19437
19438  test -n "$POTENTIAL_CXX" && break
19439done
19440
19441    CXX=$POTENTIAL_CXX
19442  fi
19443
19444  if test "x$CXX" = x; then
19445
19446    # Print a helpful message on how to acquire the necessary build dependency.
19447    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19448    MISSING_DEPENDENCY=devkit
19449    PKGHANDLER_COMMAND=
19450
19451    case $PKGHANDLER in
19452	apt-get)
19453                apt_help     $MISSING_DEPENDENCY ;;
19454    yum)
19455                yum_help     $MISSING_DEPENDENCY ;;
19456	port)
19457                port_help    $MISSING_DEPENDENCY ;;
19458	pkgutil)
19459                pkgutil_help $MISSING_DEPENDENCY ;;
19460	pkgadd)
19461                pkgadd_help  $MISSING_DEPENDENCY ;;
19462    * )
19463      break ;;
19464    esac
19465
19466    if test "x$PKGHANDLER_COMMAND" != x; then
19467        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19468    fi
19469
19470      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19471  fi
19472
19473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19474
19475  # First separate the path from the arguments. This will split at the first
19476  # space.
19477  complete="$CXX"
19478  path="${complete%% *}"
19479  tmp="$complete EOL"
19480  arguments="${tmp#* }"
19481
19482  # Input might be given as Windows format, start by converting to
19483  # unix format.
19484  new_path=`$CYGPATH -u "$path"`
19485
19486  # Now try to locate executable using which
19487  new_path=`$WHICH "$new_path" 2> /dev/null`
19488  # bat and cmd files are not always considered executable in cygwin causing which
19489  # to not find them
19490  if test "x$new_path" = x \
19491           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19492           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19493    new_path=`$CYGPATH -u "$path"`
19494  fi
19495  if test "x$new_path" = x; then
19496    # Oops. Which didn't find the executable.
19497    # The splitting of arguments from the executable at a space might have been incorrect,
19498    # since paths with space are more likely in Windows. Give it another try with the whole
19499    # argument.
19500    path="$complete"
19501    arguments="EOL"
19502    new_path=`$CYGPATH -u "$path"`
19503    new_path=`$WHICH "$new_path" 2> /dev/null`
19504    # bat and cmd files are not always considered executable in cygwin causing which
19505    # to not find them
19506    if test "x$new_path" = x \
19507             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19508             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19509      new_path=`$CYGPATH -u "$path"`
19510    fi
19511    if test "x$new_path" = x; then
19512      # It's still not found. Now this is an unrecoverable error.
19513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19514$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19515      has_space=`$ECHO "$complete" | $GREP " "`
19516      if test "x$has_space" != x; then
19517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19519      fi
19520      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19521    fi
19522  fi
19523
19524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19527  # "foo.exe" is OK but "foo" is an error.
19528  #
19529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19530  # It is also a way to make sure we got the proper file name for the real test later on.
19531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19532  if test "x$test_shortpath" = x; then
19533    # Short path failed, file does not exist as specified.
19534    # Try adding .exe or .cmd
19535    if test -f "${new_path}.exe"; then
19536       input_to_shortpath="${new_path}.exe"
19537    elif test -f "${new_path}.cmd"; then
19538       input_to_shortpath="${new_path}.cmd"
19539    else
19540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19541$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19542      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19543$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19544      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19545    fi
19546  else
19547    input_to_shortpath="$new_path"
19548  fi
19549
19550  # Call helper function which possibly converts this using DOS-style short mode.
19551  # If so, the updated path is stored in $new_path.
19552  new_path="$input_to_shortpath"
19553
19554  input_path="$input_to_shortpath"
19555  # Check if we need to convert this using DOS-style short mode. If the path
19556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19557  # take no chances and rewrite it.
19558  # Note: m4 eats our [], so we need to use [ and ] instead.
19559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19560  if test "x$has_forbidden_chars" != x; then
19561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19565      # Going to short mode and back again did indeed matter. Since short mode is
19566      # case insensitive, let's make it lowercase to improve readability.
19567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19568      # Now convert it back to Unix-stile (cygpath)
19569      input_path=`$CYGPATH -u "$shortmode_path"`
19570      new_path="$input_path"
19571    fi
19572  fi
19573
19574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19575  if test "x$test_cygdrive_prefix" = x; then
19576    # As a simple fix, exclude /usr/bin since it's not a real path.
19577    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19579      # a path prefixed by /cygdrive for fixpath to work.
19580      new_path="$CYGWIN_ROOT_PATH$input_path"
19581    fi
19582  fi
19583
19584  # remove trailing .exe if any
19585  new_path="${new_path/%.exe/}"
19586
19587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19588
19589  # First separate the path from the arguments. This will split at the first
19590  # space.
19591  complete="$CXX"
19592  path="${complete%% *}"
19593  tmp="$complete EOL"
19594  arguments="${tmp#* }"
19595
19596  # Input might be given as Windows format, start by converting to
19597  # unix format.
19598  new_path="$path"
19599
19600  windows_path="$new_path"
19601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19602    unix_path=`$CYGPATH -u "$windows_path"`
19603    new_path="$unix_path"
19604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19606    new_path="$unix_path"
19607  fi
19608
19609
19610  # Now try to locate executable using which
19611  new_path=`$WHICH "$new_path" 2> /dev/null`
19612
19613  if test "x$new_path" = x; then
19614    # Oops. Which didn't find the executable.
19615    # The splitting of arguments from the executable at a space might have been incorrect,
19616    # since paths with space are more likely in Windows. Give it another try with the whole
19617    # argument.
19618    path="$complete"
19619    arguments="EOL"
19620    new_path="$path"
19621
19622  windows_path="$new_path"
19623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19624    unix_path=`$CYGPATH -u "$windows_path"`
19625    new_path="$unix_path"
19626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19628    new_path="$unix_path"
19629  fi
19630
19631
19632    new_path=`$WHICH "$new_path" 2> /dev/null`
19633
19634    if test "x$new_path" = x; then
19635      # It's still not found. Now this is an unrecoverable error.
19636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19637$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19638      has_space=`$ECHO "$complete" | $GREP " "`
19639      if test "x$has_space" != x; then
19640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19642      fi
19643      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19644    fi
19645  fi
19646
19647  # Now new_path has a complete unix path to the binary
19648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19649    # Keep paths in /bin as-is, but remove trailing .exe if any
19650    new_path="${new_path/%.exe/}"
19651    # Do not save /bin paths to all_fixpath_prefixes!
19652  else
19653    # Not in mixed or Windows style, start by that.
19654    new_path=`cmd //c echo $new_path`
19655
19656  input_path="$new_path"
19657  # Check if we need to convert this using DOS-style short mode. If the path
19658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19659  # take no chances and rewrite it.
19660  # Note: m4 eats our [], so we need to use [ and ] instead.
19661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19662  if test "x$has_forbidden_chars" != x; then
19663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19665  fi
19666
19667    # Output is in $new_path
19668
19669  windows_path="$new_path"
19670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19671    unix_path=`$CYGPATH -u "$windows_path"`
19672    new_path="$unix_path"
19673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19675    new_path="$unix_path"
19676  fi
19677
19678    # remove trailing .exe if any
19679    new_path="${new_path/%.exe/}"
19680
19681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19683  fi
19684
19685  else
19686    # We're on a posix platform. Hooray! :)
19687    # First separate the path from the arguments. This will split at the first
19688    # space.
19689    complete="$CXX"
19690    path="${complete%% *}"
19691    tmp="$complete EOL"
19692    arguments="${tmp#* }"
19693
19694    new_path=`$WHICH $path 2> /dev/null`
19695    if test "x$new_path" = x; then
19696      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19697      if test "x$is_absolute_path" != x; then
19698        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19699$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19700        new_path="$path"
19701      else
19702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19703$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19704        has_space=`$ECHO "$complete" | $GREP " "`
19705        if test "x$has_space" != x; then
19706          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19707$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19708        fi
19709        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19710      fi
19711    fi
19712  fi
19713
19714  # Now join together the path and the arguments once again
19715  if test "x$arguments" != xEOL; then
19716      new_complete="$new_path ${arguments% *}"
19717  else
19718      new_complete="$new_path"
19719  fi
19720
19721  if test "x$complete" != "x$new_complete"; then
19722    CXX="$new_complete"
19723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19724$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19725  fi
19726
19727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19728$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19729  TEST_COMPILER="$CXX"
19730
19731    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19732        # Follow a chain of symbolic links. Use readlink
19733        # where it exists, else fall back to horribly
19734        # complicated shell code.
19735        if test "x$READLINK_TESTED" != yes; then
19736            # On MacOSX there is a readlink tool with a different
19737            # purpose than the GNU readlink tool. Check the found readlink.
19738            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19739            if test "x$ISGNU" = x; then
19740                 # A readlink that we do not know how to use.
19741                 # Are there other non-GNU readlinks out there?
19742                 READLINK_TESTED=yes
19743                 READLINK=
19744            fi
19745        fi
19746
19747        if test "x$READLINK" != x; then
19748            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19749        else
19750            # Save the current directory for restoring afterwards
19751            STARTDIR=$PWD
19752            COUNTER=0
19753            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19754            sym_link_file=`$BASENAME $TEST_COMPILER`
19755            # Use the system pwd and not the shell builtin to resolve directory symlinks
19756            cd $sym_link_dir
19757            cd `$THEPWDCMD`
19758            sym_link_dir=`$THEPWDCMD`
19759            # Resolve file symlinks
19760            while test $COUNTER -lt 20; do
19761                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19762                if test "x$ISLINK" == x; then
19763                    # This is not a symbolic link! We are done!
19764                    break
19765                fi
19766                # Again resolve directory symlinks since the target of the just found
19767                # link could be in a different directory
19768                cd `$DIRNAME $ISLINK`
19769                sym_link_dir=`$THEPWDCMD`
19770                sym_link_file=`$BASENAME $ISLINK`
19771                let COUNTER=COUNTER+1
19772            done
19773            cd $STARTDIR
19774            TEST_COMPILER=$sym_link_dir/$sym_link_file
19775        fi
19776    fi
19777
19778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19779$as_echo "$TEST_COMPILER" >&6; }
19780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19781$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19782
19783  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19784  if test "x$COMPILER_BASENAME" = "xccache"; then
19785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19786$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19787    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19788    # We want to control ccache invocation ourselves, so ignore this cc and try
19789    # searching again.
19790
19791    # Remove the path to the fake ccache cc from the PATH
19792    RETRY_COMPILER_SAVED_PATH="$PATH"
19793    COMPILER_DIRNAME=`$DIRNAME $CXX`
19794    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19795
19796    # Try again looking for our compiler
19797    if test -n "$ac_tool_prefix"; then
19798  for ac_prog in $COMPILER_CHECK_LIST
19799  do
19800    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19801set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19803$as_echo_n "checking for $ac_word... " >&6; }
19804if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19805  $as_echo_n "(cached) " >&6
19806else
19807  if test -n "$PROPER_COMPILER_CXX"; then
19808  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19809else
19810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19811for as_dir in $PATH
19812do
19813  IFS=$as_save_IFS
19814  test -z "$as_dir" && as_dir=.
19815    for ac_exec_ext in '' $ac_executable_extensions; do
19816  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19817    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19819    break 2
19820  fi
19821done
19822  done
19823IFS=$as_save_IFS
19824
19825fi
19826fi
19827PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19828if test -n "$PROPER_COMPILER_CXX"; then
19829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19830$as_echo "$PROPER_COMPILER_CXX" >&6; }
19831else
19832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19833$as_echo "no" >&6; }
19834fi
19835
19836
19837    test -n "$PROPER_COMPILER_CXX" && break
19838  done
19839fi
19840if test -z "$PROPER_COMPILER_CXX"; then
19841  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19842  for ac_prog in $COMPILER_CHECK_LIST
19843do
19844  # Extract the first word of "$ac_prog", so it can be a program name with args.
19845set dummy $ac_prog; ac_word=$2
19846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19847$as_echo_n "checking for $ac_word... " >&6; }
19848if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19849  $as_echo_n "(cached) " >&6
19850else
19851  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19852  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19853else
19854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19855for as_dir in $PATH
19856do
19857  IFS=$as_save_IFS
19858  test -z "$as_dir" && as_dir=.
19859    for ac_exec_ext in '' $ac_executable_extensions; do
19860  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19861    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19863    break 2
19864  fi
19865done
19866  done
19867IFS=$as_save_IFS
19868
19869fi
19870fi
19871ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19872if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19874$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19875else
19876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19877$as_echo "no" >&6; }
19878fi
19879
19880
19881  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19882done
19883
19884  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19885    PROPER_COMPILER_CXX=""
19886  else
19887    case $cross_compiling:$ac_tool_warned in
19888yes:)
19889{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19890$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19891ac_tool_warned=yes ;;
19892esac
19893    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19894  fi
19895fi
19896
19897
19898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19899
19900  # First separate the path from the arguments. This will split at the first
19901  # space.
19902  complete="$PROPER_COMPILER_CXX"
19903  path="${complete%% *}"
19904  tmp="$complete EOL"
19905  arguments="${tmp#* }"
19906
19907  # Input might be given as Windows format, start by converting to
19908  # unix format.
19909  new_path=`$CYGPATH -u "$path"`
19910
19911  # Now try to locate executable using which
19912  new_path=`$WHICH "$new_path" 2> /dev/null`
19913  # bat and cmd files are not always considered executable in cygwin causing which
19914  # to not find them
19915  if test "x$new_path" = x \
19916           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19917           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19918    new_path=`$CYGPATH -u "$path"`
19919  fi
19920  if test "x$new_path" = x; then
19921    # Oops. Which didn't find the executable.
19922    # The splitting of arguments from the executable at a space might have been incorrect,
19923    # since paths with space are more likely in Windows. Give it another try with the whole
19924    # argument.
19925    path="$complete"
19926    arguments="EOL"
19927    new_path=`$CYGPATH -u "$path"`
19928    new_path=`$WHICH "$new_path" 2> /dev/null`
19929    # bat and cmd files are not always considered executable in cygwin causing which
19930    # to not find them
19931    if test "x$new_path" = x \
19932             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19933             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19934      new_path=`$CYGPATH -u "$path"`
19935    fi
19936    if test "x$new_path" = x; then
19937      # It's still not found. Now this is an unrecoverable error.
19938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19939$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19940      has_space=`$ECHO "$complete" | $GREP " "`
19941      if test "x$has_space" != x; then
19942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19944      fi
19945      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19946    fi
19947  fi
19948
19949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19952  # "foo.exe" is OK but "foo" is an error.
19953  #
19954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19955  # It is also a way to make sure we got the proper file name for the real test later on.
19956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19957  if test "x$test_shortpath" = x; then
19958    # Short path failed, file does not exist as specified.
19959    # Try adding .exe or .cmd
19960    if test -f "${new_path}.exe"; then
19961       input_to_shortpath="${new_path}.exe"
19962    elif test -f "${new_path}.cmd"; then
19963       input_to_shortpath="${new_path}.cmd"
19964    else
19965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19966$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19969      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19970    fi
19971  else
19972    input_to_shortpath="$new_path"
19973  fi
19974
19975  # Call helper function which possibly converts this using DOS-style short mode.
19976  # If so, the updated path is stored in $new_path.
19977  new_path="$input_to_shortpath"
19978
19979  input_path="$input_to_shortpath"
19980  # Check if we need to convert this using DOS-style short mode. If the path
19981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19982  # take no chances and rewrite it.
19983  # Note: m4 eats our [], so we need to use [ and ] instead.
19984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19985  if test "x$has_forbidden_chars" != x; then
19986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19990      # Going to short mode and back again did indeed matter. Since short mode is
19991      # case insensitive, let's make it lowercase to improve readability.
19992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19993      # Now convert it back to Unix-stile (cygpath)
19994      input_path=`$CYGPATH -u "$shortmode_path"`
19995      new_path="$input_path"
19996    fi
19997  fi
19998
19999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20000  if test "x$test_cygdrive_prefix" = x; then
20001    # As a simple fix, exclude /usr/bin since it's not a real path.
20002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20004      # a path prefixed by /cygdrive for fixpath to work.
20005      new_path="$CYGWIN_ROOT_PATH$input_path"
20006    fi
20007  fi
20008
20009  # remove trailing .exe if any
20010  new_path="${new_path/%.exe/}"
20011
20012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20013
20014  # First separate the path from the arguments. This will split at the first
20015  # space.
20016  complete="$PROPER_COMPILER_CXX"
20017  path="${complete%% *}"
20018  tmp="$complete EOL"
20019  arguments="${tmp#* }"
20020
20021  # Input might be given as Windows format, start by converting to
20022  # unix format.
20023  new_path="$path"
20024
20025  windows_path="$new_path"
20026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20027    unix_path=`$CYGPATH -u "$windows_path"`
20028    new_path="$unix_path"
20029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20031    new_path="$unix_path"
20032  fi
20033
20034
20035  # Now try to locate executable using which
20036  new_path=`$WHICH "$new_path" 2> /dev/null`
20037
20038  if test "x$new_path" = x; then
20039    # Oops. Which didn't find the executable.
20040    # The splitting of arguments from the executable at a space might have been incorrect,
20041    # since paths with space are more likely in Windows. Give it another try with the whole
20042    # argument.
20043    path="$complete"
20044    arguments="EOL"
20045    new_path="$path"
20046
20047  windows_path="$new_path"
20048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20049    unix_path=`$CYGPATH -u "$windows_path"`
20050    new_path="$unix_path"
20051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20053    new_path="$unix_path"
20054  fi
20055
20056
20057    new_path=`$WHICH "$new_path" 2> /dev/null`
20058
20059    if test "x$new_path" = x; then
20060      # It's still not found. Now this is an unrecoverable error.
20061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20062$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20063      has_space=`$ECHO "$complete" | $GREP " "`
20064      if test "x$has_space" != x; then
20065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20067      fi
20068      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20069    fi
20070  fi
20071
20072  # Now new_path has a complete unix path to the binary
20073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20074    # Keep paths in /bin as-is, but remove trailing .exe if any
20075    new_path="${new_path/%.exe/}"
20076    # Do not save /bin paths to all_fixpath_prefixes!
20077  else
20078    # Not in mixed or Windows style, start by that.
20079    new_path=`cmd //c echo $new_path`
20080
20081  input_path="$new_path"
20082  # Check if we need to convert this using DOS-style short mode. If the path
20083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20084  # take no chances and rewrite it.
20085  # Note: m4 eats our [], so we need to use [ and ] instead.
20086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20087  if test "x$has_forbidden_chars" != x; then
20088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20090  fi
20091
20092    # Output is in $new_path
20093
20094  windows_path="$new_path"
20095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20096    unix_path=`$CYGPATH -u "$windows_path"`
20097    new_path="$unix_path"
20098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20100    new_path="$unix_path"
20101  fi
20102
20103    # remove trailing .exe if any
20104    new_path="${new_path/%.exe/}"
20105
20106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20108  fi
20109
20110  else
20111    # We're on a posix platform. Hooray! :)
20112    # First separate the path from the arguments. This will split at the first
20113    # space.
20114    complete="$PROPER_COMPILER_CXX"
20115    path="${complete%% *}"
20116    tmp="$complete EOL"
20117    arguments="${tmp#* }"
20118
20119    new_path=`$WHICH $path 2> /dev/null`
20120    if test "x$new_path" = x; then
20121      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20122      if test "x$is_absolute_path" != x; then
20123        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
20124$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
20125        new_path="$path"
20126      else
20127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20128$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20129        has_space=`$ECHO "$complete" | $GREP " "`
20130        if test "x$has_space" != x; then
20131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20133        fi
20134        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20135      fi
20136    fi
20137  fi
20138
20139  # Now join together the path and the arguments once again
20140  if test "x$arguments" != xEOL; then
20141      new_complete="$new_path ${arguments% *}"
20142  else
20143      new_complete="$new_path"
20144  fi
20145
20146  if test "x$complete" != "x$new_complete"; then
20147    PROPER_COMPILER_CXX="$new_complete"
20148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20149$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20150  fi
20151
20152    PATH="$RETRY_COMPILER_SAVED_PATH"
20153
20154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20155$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20156
20157    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20158        # Follow a chain of symbolic links. Use readlink
20159        # where it exists, else fall back to horribly
20160        # complicated shell code.
20161        if test "x$READLINK_TESTED" != yes; then
20162            # On MacOSX there is a readlink tool with a different
20163            # purpose than the GNU readlink tool. Check the found readlink.
20164            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20165            if test "x$ISGNU" = x; then
20166                 # A readlink that we do not know how to use.
20167                 # Are there other non-GNU readlinks out there?
20168                 READLINK_TESTED=yes
20169                 READLINK=
20170            fi
20171        fi
20172
20173        if test "x$READLINK" != x; then
20174            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20175        else
20176            # Save the current directory for restoring afterwards
20177            STARTDIR=$PWD
20178            COUNTER=0
20179            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20180            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20181            # Use the system pwd and not the shell builtin to resolve directory symlinks
20182            cd $sym_link_dir
20183            cd `$THEPWDCMD`
20184            sym_link_dir=`$THEPWDCMD`
20185            # Resolve file symlinks
20186            while test $COUNTER -lt 20; do
20187                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20188                if test "x$ISLINK" == x; then
20189                    # This is not a symbolic link! We are done!
20190                    break
20191                fi
20192                # Again resolve directory symlinks since the target of the just found
20193                # link could be in a different directory
20194                cd `$DIRNAME $ISLINK`
20195                sym_link_dir=`$THEPWDCMD`
20196                sym_link_file=`$BASENAME $ISLINK`
20197                let COUNTER=COUNTER+1
20198            done
20199            cd $STARTDIR
20200            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20201        fi
20202    fi
20203
20204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20205$as_echo "$PROPER_COMPILER_CXX" >&6; }
20206    CXX="$PROPER_COMPILER_CXX"
20207  else
20208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20209$as_echo "no, keeping CXX" >&6; }
20210    CXX="$TEST_COMPILER"
20211  fi
20212
20213  COMPILER=$CXX
20214  COMPILER_NAME=$COMPILER_NAME
20215
20216  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20217    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20218    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20219    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20220    if test $? -ne 0; then
20221      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20222
20223      { $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
20224$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20225      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20226$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20227      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20228    else
20229      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20230      COMPILER_VENDOR="Sun Studio"
20231    fi
20232  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20233    # First line typically looks something like:
20234    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20235    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20236    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20237    COMPILER_VENDOR="Microsoft CL.EXE"
20238    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20239    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20240      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20241        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20242      fi
20243    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20244      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20245        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20246      fi
20247    fi
20248  else
20249    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20250    # Check that this is likely to be GCC.
20251    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20252    if test $? -ne 0; then
20253      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20254$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20255      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20256$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20257      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20258    fi
20259
20260    # First line typically looks something like:
20261    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20262    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20263    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20264  fi
20265  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20266  CXX_VERSION="$COMPILER_VERSION"
20267  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20268  CXX_VENDOR="$COMPILER_VENDOR"
20269
20270  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20271$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20272
20273
20274# Now that we have resolved CXX ourself, let autoconf have it's go at it
20275ac_ext=cpp
20276ac_cpp='$CXXCPP $CPPFLAGS'
20277ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20278ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20279ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20280if test -z "$CXX"; then
20281  if test -n "$CCC"; then
20282    CXX=$CCC
20283  else
20284    if test -n "$ac_tool_prefix"; then
20285  for ac_prog in $CXX
20286  do
20287    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20290$as_echo_n "checking for $ac_word... " >&6; }
20291if test "${ac_cv_prog_CXX+set}" = set; then :
20292  $as_echo_n "(cached) " >&6
20293else
20294  if test -n "$CXX"; then
20295  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20296else
20297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20298for as_dir in $PATH
20299do
20300  IFS=$as_save_IFS
20301  test -z "$as_dir" && as_dir=.
20302    for ac_exec_ext in '' $ac_executable_extensions; do
20303  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20304    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20306    break 2
20307  fi
20308done
20309  done
20310IFS=$as_save_IFS
20311
20312fi
20313fi
20314CXX=$ac_cv_prog_CXX
20315if test -n "$CXX"; then
20316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20317$as_echo "$CXX" >&6; }
20318else
20319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20320$as_echo "no" >&6; }
20321fi
20322
20323
20324    test -n "$CXX" && break
20325  done
20326fi
20327if test -z "$CXX"; then
20328  ac_ct_CXX=$CXX
20329  for ac_prog in $CXX
20330do
20331  # Extract the first word of "$ac_prog", so it can be a program name with args.
20332set dummy $ac_prog; ac_word=$2
20333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20334$as_echo_n "checking for $ac_word... " >&6; }
20335if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20336  $as_echo_n "(cached) " >&6
20337else
20338  if test -n "$ac_ct_CXX"; then
20339  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20340else
20341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20342for as_dir in $PATH
20343do
20344  IFS=$as_save_IFS
20345  test -z "$as_dir" && as_dir=.
20346    for ac_exec_ext in '' $ac_executable_extensions; do
20347  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20348    ac_cv_prog_ac_ct_CXX="$ac_prog"
20349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20350    break 2
20351  fi
20352done
20353  done
20354IFS=$as_save_IFS
20355
20356fi
20357fi
20358ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20359if test -n "$ac_ct_CXX"; then
20360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20361$as_echo "$ac_ct_CXX" >&6; }
20362else
20363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20364$as_echo "no" >&6; }
20365fi
20366
20367
20368  test -n "$ac_ct_CXX" && break
20369done
20370
20371  if test "x$ac_ct_CXX" = x; then
20372    CXX="g++"
20373  else
20374    case $cross_compiling:$ac_tool_warned in
20375yes:)
20376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20378ac_tool_warned=yes ;;
20379esac
20380    CXX=$ac_ct_CXX
20381  fi
20382fi
20383
20384  fi
20385fi
20386# Provide some information about the compiler.
20387$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20388set X $ac_compile
20389ac_compiler=$2
20390for ac_option in --version -v -V -qversion; do
20391  { { ac_try="$ac_compiler $ac_option >&5"
20392case "(($ac_try" in
20393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20394  *) ac_try_echo=$ac_try;;
20395esac
20396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20397$as_echo "$ac_try_echo"; } >&5
20398  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20399  ac_status=$?
20400  if test -s conftest.err; then
20401    sed '10a\
20402... rest of stderr output deleted ...
20403         10q' conftest.err >conftest.er1
20404    cat conftest.er1 >&5
20405  fi
20406  rm -f conftest.er1 conftest.err
20407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20408  test $ac_status = 0; }
20409done
20410
20411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20412$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20413if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20414  $as_echo_n "(cached) " >&6
20415else
20416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20417/* end confdefs.h.  */
20418
20419int
20420main ()
20421{
20422#ifndef __GNUC__
20423       choke me
20424#endif
20425
20426  ;
20427  return 0;
20428}
20429_ACEOF
20430if ac_fn_cxx_try_compile "$LINENO"; then :
20431  ac_compiler_gnu=yes
20432else
20433  ac_compiler_gnu=no
20434fi
20435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20436ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20437
20438fi
20439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20440$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20441if test $ac_compiler_gnu = yes; then
20442  GXX=yes
20443else
20444  GXX=
20445fi
20446ac_test_CXXFLAGS=${CXXFLAGS+set}
20447ac_save_CXXFLAGS=$CXXFLAGS
20448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20449$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20450if test "${ac_cv_prog_cxx_g+set}" = set; then :
20451  $as_echo_n "(cached) " >&6
20452else
20453  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20454   ac_cxx_werror_flag=yes
20455   ac_cv_prog_cxx_g=no
20456   CXXFLAGS="-g"
20457   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20458/* end confdefs.h.  */
20459
20460int
20461main ()
20462{
20463
20464  ;
20465  return 0;
20466}
20467_ACEOF
20468if ac_fn_cxx_try_compile "$LINENO"; then :
20469  ac_cv_prog_cxx_g=yes
20470else
20471  CXXFLAGS=""
20472      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20473/* end confdefs.h.  */
20474
20475int
20476main ()
20477{
20478
20479  ;
20480  return 0;
20481}
20482_ACEOF
20483if ac_fn_cxx_try_compile "$LINENO"; then :
20484
20485else
20486  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20487	 CXXFLAGS="-g"
20488	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20489/* end confdefs.h.  */
20490
20491int
20492main ()
20493{
20494
20495  ;
20496  return 0;
20497}
20498_ACEOF
20499if ac_fn_cxx_try_compile "$LINENO"; then :
20500  ac_cv_prog_cxx_g=yes
20501fi
20502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20503fi
20504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20505fi
20506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20507   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20508fi
20509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20510$as_echo "$ac_cv_prog_cxx_g" >&6; }
20511if test "$ac_test_CXXFLAGS" = set; then
20512  CXXFLAGS=$ac_save_CXXFLAGS
20513elif test $ac_cv_prog_cxx_g = yes; then
20514  if test "$GXX" = yes; then
20515    CXXFLAGS="-g -O2"
20516  else
20517    CXXFLAGS="-g"
20518  fi
20519else
20520  if test "$GXX" = yes; then
20521    CXXFLAGS="-O2"
20522  else
20523    CXXFLAGS=
20524  fi
20525fi
20526ac_ext=cpp
20527ac_cpp='$CXXCPP $CPPFLAGS'
20528ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20529ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20530ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20531
20532
20533### Locate other tools
20534
20535if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20536    ac_ext=m
20537ac_cpp='$OBJCPP $CPPFLAGS'
20538ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20539ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20540ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20541if test -n "$ac_tool_prefix"; then
20542  for ac_prog in gcc objcc objc cc CC
20543  do
20544    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20545set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20547$as_echo_n "checking for $ac_word... " >&6; }
20548if test "${ac_cv_prog_OBJC+set}" = set; then :
20549  $as_echo_n "(cached) " >&6
20550else
20551  if test -n "$OBJC"; then
20552  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20553else
20554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20555for as_dir in $PATH
20556do
20557  IFS=$as_save_IFS
20558  test -z "$as_dir" && as_dir=.
20559    for ac_exec_ext in '' $ac_executable_extensions; do
20560  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20561    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20563    break 2
20564  fi
20565done
20566  done
20567IFS=$as_save_IFS
20568
20569fi
20570fi
20571OBJC=$ac_cv_prog_OBJC
20572if test -n "$OBJC"; then
20573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20574$as_echo "$OBJC" >&6; }
20575else
20576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20577$as_echo "no" >&6; }
20578fi
20579
20580
20581    test -n "$OBJC" && break
20582  done
20583fi
20584if test -z "$OBJC"; then
20585  ac_ct_OBJC=$OBJC
20586  for ac_prog in gcc objcc objc cc CC
20587do
20588  # Extract the first word of "$ac_prog", so it can be a program name with args.
20589set dummy $ac_prog; ac_word=$2
20590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20591$as_echo_n "checking for $ac_word... " >&6; }
20592if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20593  $as_echo_n "(cached) " >&6
20594else
20595  if test -n "$ac_ct_OBJC"; then
20596  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20597else
20598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20599for as_dir in $PATH
20600do
20601  IFS=$as_save_IFS
20602  test -z "$as_dir" && as_dir=.
20603    for ac_exec_ext in '' $ac_executable_extensions; do
20604  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20605    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20607    break 2
20608  fi
20609done
20610  done
20611IFS=$as_save_IFS
20612
20613fi
20614fi
20615ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20616if test -n "$ac_ct_OBJC"; then
20617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20618$as_echo "$ac_ct_OBJC" >&6; }
20619else
20620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20621$as_echo "no" >&6; }
20622fi
20623
20624
20625  test -n "$ac_ct_OBJC" && break
20626done
20627
20628  if test "x$ac_ct_OBJC" = x; then
20629    OBJC="gcc"
20630  else
20631    case $cross_compiling:$ac_tool_warned in
20632yes:)
20633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20635ac_tool_warned=yes ;;
20636esac
20637    OBJC=$ac_ct_OBJC
20638  fi
20639fi
20640
20641# Provide some information about the compiler.
20642$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20643set X $ac_compile
20644ac_compiler=$2
20645for ac_option in --version -v -V -qversion; do
20646  { { ac_try="$ac_compiler $ac_option >&5"
20647case "(($ac_try" in
20648  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20649  *) ac_try_echo=$ac_try;;
20650esac
20651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20652$as_echo "$ac_try_echo"; } >&5
20653  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20654  ac_status=$?
20655  if test -s conftest.err; then
20656    sed '10a\
20657... rest of stderr output deleted ...
20658         10q' conftest.err >conftest.er1
20659    cat conftest.er1 >&5
20660  fi
20661  rm -f conftest.er1 conftest.err
20662  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20663  test $ac_status = 0; }
20664done
20665
20666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20667$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20668if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20669  $as_echo_n "(cached) " >&6
20670else
20671  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20672/* end confdefs.h.  */
20673
20674int
20675main ()
20676{
20677#ifndef __GNUC__
20678       choke me
20679#endif
20680
20681  ;
20682  return 0;
20683}
20684_ACEOF
20685if ac_fn_objc_try_compile "$LINENO"; then :
20686  ac_compiler_gnu=yes
20687else
20688  ac_compiler_gnu=no
20689fi
20690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20691ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20692
20693fi
20694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20695$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20696if test $ac_compiler_gnu = yes; then
20697  GOBJC=yes
20698else
20699  GOBJC=
20700fi
20701ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20702ac_save_OBJCFLAGS=$OBJCFLAGS
20703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20704$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20705if test "${ac_cv_prog_objc_g+set}" = set; then :
20706  $as_echo_n "(cached) " >&6
20707else
20708  ac_save_objc_werror_flag=$ac_objc_werror_flag
20709   ac_objc_werror_flag=yes
20710   ac_cv_prog_objc_g=no
20711   OBJCFLAGS="-g"
20712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20713/* end confdefs.h.  */
20714
20715int
20716main ()
20717{
20718
20719  ;
20720  return 0;
20721}
20722_ACEOF
20723if ac_fn_objc_try_compile "$LINENO"; then :
20724  ac_cv_prog_objc_g=yes
20725else
20726  OBJCFLAGS=""
20727      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20728/* end confdefs.h.  */
20729
20730int
20731main ()
20732{
20733
20734  ;
20735  return 0;
20736}
20737_ACEOF
20738if ac_fn_objc_try_compile "$LINENO"; then :
20739
20740else
20741  ac_objc_werror_flag=$ac_save_objc_werror_flag
20742	 OBJCFLAGS="-g"
20743	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20744/* end confdefs.h.  */
20745
20746int
20747main ()
20748{
20749
20750  ;
20751  return 0;
20752}
20753_ACEOF
20754if ac_fn_objc_try_compile "$LINENO"; then :
20755  ac_cv_prog_objc_g=yes
20756fi
20757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20758fi
20759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20760fi
20761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20762   ac_objc_werror_flag=$ac_save_objc_werror_flag
20763fi
20764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20765$as_echo "$ac_cv_prog_objc_g" >&6; }
20766if test "$ac_test_OBJCFLAGS" = set; then
20767  OBJCFLAGS=$ac_save_OBJCFLAGS
20768elif test $ac_cv_prog_objc_g = yes; then
20769  if test "$GOBJC" = yes; then
20770    OBJCFLAGS="-g -O2"
20771  else
20772    OBJCFLAGS="-g"
20773  fi
20774else
20775  if test "$GOBJC" = yes; then
20776    OBJCFLAGS="-O2"
20777  else
20778    OBJCFLAGS=
20779  fi
20780fi
20781ac_ext=cpp
20782ac_cpp='$CXXCPP $CPPFLAGS'
20783ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20784ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20785ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20786
20787
20788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20789
20790  # First separate the path from the arguments. This will split at the first
20791  # space.
20792  complete="$OBJC"
20793  path="${complete%% *}"
20794  tmp="$complete EOL"
20795  arguments="${tmp#* }"
20796
20797  # Input might be given as Windows format, start by converting to
20798  # unix format.
20799  new_path=`$CYGPATH -u "$path"`
20800
20801  # Now try to locate executable using which
20802  new_path=`$WHICH "$new_path" 2> /dev/null`
20803  # bat and cmd files are not always considered executable in cygwin causing which
20804  # to not find them
20805  if test "x$new_path" = x \
20806           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20807           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20808    new_path=`$CYGPATH -u "$path"`
20809  fi
20810  if test "x$new_path" = x; then
20811    # Oops. Which didn't find the executable.
20812    # The splitting of arguments from the executable at a space might have been incorrect,
20813    # since paths with space are more likely in Windows. Give it another try with the whole
20814    # argument.
20815    path="$complete"
20816    arguments="EOL"
20817    new_path=`$CYGPATH -u "$path"`
20818    new_path=`$WHICH "$new_path" 2> /dev/null`
20819    # bat and cmd files are not always considered executable in cygwin causing which
20820    # to not find them
20821    if test "x$new_path" = x \
20822             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20823             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20824      new_path=`$CYGPATH -u "$path"`
20825    fi
20826    if test "x$new_path" = x; then
20827      # It's still not found. Now this is an unrecoverable error.
20828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20829$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20830      has_space=`$ECHO "$complete" | $GREP " "`
20831      if test "x$has_space" != x; then
20832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20834      fi
20835      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20836    fi
20837  fi
20838
20839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20842  # "foo.exe" is OK but "foo" is an error.
20843  #
20844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20845  # It is also a way to make sure we got the proper file name for the real test later on.
20846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20847  if test "x$test_shortpath" = x; then
20848    # Short path failed, file does not exist as specified.
20849    # Try adding .exe or .cmd
20850    if test -f "${new_path}.exe"; then
20851       input_to_shortpath="${new_path}.exe"
20852    elif test -f "${new_path}.cmd"; then
20853       input_to_shortpath="${new_path}.cmd"
20854    else
20855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20856$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20859      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20860    fi
20861  else
20862    input_to_shortpath="$new_path"
20863  fi
20864
20865  # Call helper function which possibly converts this using DOS-style short mode.
20866  # If so, the updated path is stored in $new_path.
20867  new_path="$input_to_shortpath"
20868
20869  input_path="$input_to_shortpath"
20870  # Check if we need to convert this using DOS-style short mode. If the path
20871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20872  # take no chances and rewrite it.
20873  # Note: m4 eats our [], so we need to use [ and ] instead.
20874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20875  if test "x$has_forbidden_chars" != x; then
20876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20880      # Going to short mode and back again did indeed matter. Since short mode is
20881      # case insensitive, let's make it lowercase to improve readability.
20882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20883      # Now convert it back to Unix-stile (cygpath)
20884      input_path=`$CYGPATH -u "$shortmode_path"`
20885      new_path="$input_path"
20886    fi
20887  fi
20888
20889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20890  if test "x$test_cygdrive_prefix" = x; then
20891    # As a simple fix, exclude /usr/bin since it's not a real path.
20892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20894      # a path prefixed by /cygdrive for fixpath to work.
20895      new_path="$CYGWIN_ROOT_PATH$input_path"
20896    fi
20897  fi
20898
20899  # remove trailing .exe if any
20900  new_path="${new_path/%.exe/}"
20901
20902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20903
20904  # First separate the path from the arguments. This will split at the first
20905  # space.
20906  complete="$OBJC"
20907  path="${complete%% *}"
20908  tmp="$complete EOL"
20909  arguments="${tmp#* }"
20910
20911  # Input might be given as Windows format, start by converting to
20912  # unix format.
20913  new_path="$path"
20914
20915  windows_path="$new_path"
20916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20917    unix_path=`$CYGPATH -u "$windows_path"`
20918    new_path="$unix_path"
20919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20921    new_path="$unix_path"
20922  fi
20923
20924
20925  # Now try to locate executable using which
20926  new_path=`$WHICH "$new_path" 2> /dev/null`
20927
20928  if test "x$new_path" = x; then
20929    # Oops. Which didn't find the executable.
20930    # The splitting of arguments from the executable at a space might have been incorrect,
20931    # since paths with space are more likely in Windows. Give it another try with the whole
20932    # argument.
20933    path="$complete"
20934    arguments="EOL"
20935    new_path="$path"
20936
20937  windows_path="$new_path"
20938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20939    unix_path=`$CYGPATH -u "$windows_path"`
20940    new_path="$unix_path"
20941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20943    new_path="$unix_path"
20944  fi
20945
20946
20947    new_path=`$WHICH "$new_path" 2> /dev/null`
20948
20949    if test "x$new_path" = x; then
20950      # It's still not found. Now this is an unrecoverable error.
20951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20952$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20953      has_space=`$ECHO "$complete" | $GREP " "`
20954      if test "x$has_space" != x; then
20955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20957      fi
20958      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20959    fi
20960  fi
20961
20962  # Now new_path has a complete unix path to the binary
20963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20964    # Keep paths in /bin as-is, but remove trailing .exe if any
20965    new_path="${new_path/%.exe/}"
20966    # Do not save /bin paths to all_fixpath_prefixes!
20967  else
20968    # Not in mixed or Windows style, start by that.
20969    new_path=`cmd //c echo $new_path`
20970
20971  input_path="$new_path"
20972  # Check if we need to convert this using DOS-style short mode. If the path
20973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20974  # take no chances and rewrite it.
20975  # Note: m4 eats our [], so we need to use [ and ] instead.
20976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20977  if test "x$has_forbidden_chars" != x; then
20978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20980  fi
20981
20982    # Output is in $new_path
20983
20984  windows_path="$new_path"
20985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20986    unix_path=`$CYGPATH -u "$windows_path"`
20987    new_path="$unix_path"
20988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20990    new_path="$unix_path"
20991  fi
20992
20993    # remove trailing .exe if any
20994    new_path="${new_path/%.exe/}"
20995
20996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20998  fi
20999
21000  else
21001    # We're on a posix platform. Hooray! :)
21002    # First separate the path from the arguments. This will split at the first
21003    # space.
21004    complete="$OBJC"
21005    path="${complete%% *}"
21006    tmp="$complete EOL"
21007    arguments="${tmp#* }"
21008
21009    new_path=`$WHICH $path 2> /dev/null`
21010    if test "x$new_path" = x; then
21011      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21012      if test "x$is_absolute_path" != x; then
21013        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
21014$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
21015        new_path="$path"
21016      else
21017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21018$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21019        has_space=`$ECHO "$complete" | $GREP " "`
21020        if test "x$has_space" != x; then
21021          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21022$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21023        fi
21024        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21025      fi
21026    fi
21027  fi
21028
21029  # Now join together the path and the arguments once again
21030  if test "x$arguments" != xEOL; then
21031      new_complete="$new_path ${arguments% *}"
21032  else
21033      new_complete="$new_path"
21034  fi
21035
21036  if test "x$complete" != "x$new_complete"; then
21037    OBJC="$new_complete"
21038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21039$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21040  fi
21041
21042else
21043    OBJC=
21044fi
21045
21046# Restore the flags to the user specified values.
21047# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21048CFLAGS="$ORG_CFLAGS"
21049CXXFLAGS="$ORG_CXXFLAGS"
21050OBJCFLAGS="$ORG_OBJCFLAGS"
21051
21052LD="$CC"
21053LDEXE="$CC"
21054LDCXX="$CXX"
21055LDEXECXX="$CXX"
21056
21057# LDEXE is the linker to use, when creating executables.
21058
21059# Linking C++ libraries.
21060
21061# Linking C++ executables.
21062
21063
21064if test "x$OPENJDK_TARGET_OS" != xwindows; then
21065    if test -n "$ac_tool_prefix"; then
21066  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21067set dummy ${ac_tool_prefix}ar; ac_word=$2
21068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21069$as_echo_n "checking for $ac_word... " >&6; }
21070if test "${ac_cv_prog_AR+set}" = set; then :
21071  $as_echo_n "(cached) " >&6
21072else
21073  if test -n "$AR"; then
21074  ac_cv_prog_AR="$AR" # Let the user override the test.
21075else
21076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21077for as_dir in $PATH
21078do
21079  IFS=$as_save_IFS
21080  test -z "$as_dir" && as_dir=.
21081    for ac_exec_ext in '' $ac_executable_extensions; do
21082  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21083    ac_cv_prog_AR="${ac_tool_prefix}ar"
21084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21085    break 2
21086  fi
21087done
21088  done
21089IFS=$as_save_IFS
21090
21091fi
21092fi
21093AR=$ac_cv_prog_AR
21094if test -n "$AR"; then
21095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21096$as_echo "$AR" >&6; }
21097else
21098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21099$as_echo "no" >&6; }
21100fi
21101
21102
21103fi
21104if test -z "$ac_cv_prog_AR"; then
21105  ac_ct_AR=$AR
21106  # Extract the first word of "ar", so it can be a program name with args.
21107set dummy ar; ac_word=$2
21108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21109$as_echo_n "checking for $ac_word... " >&6; }
21110if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21111  $as_echo_n "(cached) " >&6
21112else
21113  if test -n "$ac_ct_AR"; then
21114  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21115else
21116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21117for as_dir in $PATH
21118do
21119  IFS=$as_save_IFS
21120  test -z "$as_dir" && as_dir=.
21121    for ac_exec_ext in '' $ac_executable_extensions; do
21122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21123    ac_cv_prog_ac_ct_AR="ar"
21124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21125    break 2
21126  fi
21127done
21128  done
21129IFS=$as_save_IFS
21130
21131fi
21132fi
21133ac_ct_AR=$ac_cv_prog_ac_ct_AR
21134if test -n "$ac_ct_AR"; then
21135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21136$as_echo "$ac_ct_AR" >&6; }
21137else
21138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21139$as_echo "no" >&6; }
21140fi
21141
21142  if test "x$ac_ct_AR" = x; then
21143    AR=""
21144  else
21145    case $cross_compiling:$ac_tool_warned in
21146yes:)
21147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21149ac_tool_warned=yes ;;
21150esac
21151    AR=$ac_ct_AR
21152  fi
21153else
21154  AR="$ac_cv_prog_AR"
21155fi
21156
21157
21158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21159
21160  # First separate the path from the arguments. This will split at the first
21161  # space.
21162  complete="$AR"
21163  path="${complete%% *}"
21164  tmp="$complete EOL"
21165  arguments="${tmp#* }"
21166
21167  # Input might be given as Windows format, start by converting to
21168  # unix format.
21169  new_path=`$CYGPATH -u "$path"`
21170
21171  # Now try to locate executable using which
21172  new_path=`$WHICH "$new_path" 2> /dev/null`
21173  # bat and cmd files are not always considered executable in cygwin causing which
21174  # to not find them
21175  if test "x$new_path" = x \
21176           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21177           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21178    new_path=`$CYGPATH -u "$path"`
21179  fi
21180  if test "x$new_path" = x; then
21181    # Oops. Which didn't find the executable.
21182    # The splitting of arguments from the executable at a space might have been incorrect,
21183    # since paths with space are more likely in Windows. Give it another try with the whole
21184    # argument.
21185    path="$complete"
21186    arguments="EOL"
21187    new_path=`$CYGPATH -u "$path"`
21188    new_path=`$WHICH "$new_path" 2> /dev/null`
21189    # bat and cmd files are not always considered executable in cygwin causing which
21190    # to not find them
21191    if test "x$new_path" = x \
21192             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21193             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21194      new_path=`$CYGPATH -u "$path"`
21195    fi
21196    if test "x$new_path" = x; then
21197      # It's still not found. Now this is an unrecoverable error.
21198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21199$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21200      has_space=`$ECHO "$complete" | $GREP " "`
21201      if test "x$has_space" != x; then
21202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21204      fi
21205      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21206    fi
21207  fi
21208
21209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21212  # "foo.exe" is OK but "foo" is an error.
21213  #
21214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21215  # It is also a way to make sure we got the proper file name for the real test later on.
21216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21217  if test "x$test_shortpath" = x; then
21218    # Short path failed, file does not exist as specified.
21219    # Try adding .exe or .cmd
21220    if test -f "${new_path}.exe"; then
21221       input_to_shortpath="${new_path}.exe"
21222    elif test -f "${new_path}.cmd"; then
21223       input_to_shortpath="${new_path}.cmd"
21224    else
21225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21226$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21227      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21228$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21229      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21230    fi
21231  else
21232    input_to_shortpath="$new_path"
21233  fi
21234
21235  # Call helper function which possibly converts this using DOS-style short mode.
21236  # If so, the updated path is stored in $new_path.
21237  new_path="$input_to_shortpath"
21238
21239  input_path="$input_to_shortpath"
21240  # Check if we need to convert this using DOS-style short mode. If the path
21241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21242  # take no chances and rewrite it.
21243  # Note: m4 eats our [], so we need to use [ and ] instead.
21244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21245  if test "x$has_forbidden_chars" != x; then
21246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21250      # Going to short mode and back again did indeed matter. Since short mode is
21251      # case insensitive, let's make it lowercase to improve readability.
21252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21253      # Now convert it back to Unix-stile (cygpath)
21254      input_path=`$CYGPATH -u "$shortmode_path"`
21255      new_path="$input_path"
21256    fi
21257  fi
21258
21259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21260  if test "x$test_cygdrive_prefix" = x; then
21261    # As a simple fix, exclude /usr/bin since it's not a real path.
21262    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21264      # a path prefixed by /cygdrive for fixpath to work.
21265      new_path="$CYGWIN_ROOT_PATH$input_path"
21266    fi
21267  fi
21268
21269  # remove trailing .exe if any
21270  new_path="${new_path/%.exe/}"
21271
21272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21273
21274  # First separate the path from the arguments. This will split at the first
21275  # space.
21276  complete="$AR"
21277  path="${complete%% *}"
21278  tmp="$complete EOL"
21279  arguments="${tmp#* }"
21280
21281  # Input might be given as Windows format, start by converting to
21282  # unix format.
21283  new_path="$path"
21284
21285  windows_path="$new_path"
21286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21287    unix_path=`$CYGPATH -u "$windows_path"`
21288    new_path="$unix_path"
21289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21291    new_path="$unix_path"
21292  fi
21293
21294
21295  # Now try to locate executable using which
21296  new_path=`$WHICH "$new_path" 2> /dev/null`
21297
21298  if test "x$new_path" = x; then
21299    # Oops. Which didn't find the executable.
21300    # The splitting of arguments from the executable at a space might have been incorrect,
21301    # since paths with space are more likely in Windows. Give it another try with the whole
21302    # argument.
21303    path="$complete"
21304    arguments="EOL"
21305    new_path="$path"
21306
21307  windows_path="$new_path"
21308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21309    unix_path=`$CYGPATH -u "$windows_path"`
21310    new_path="$unix_path"
21311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21313    new_path="$unix_path"
21314  fi
21315
21316
21317    new_path=`$WHICH "$new_path" 2> /dev/null`
21318
21319    if test "x$new_path" = x; then
21320      # It's still not found. Now this is an unrecoverable error.
21321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21322$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21323      has_space=`$ECHO "$complete" | $GREP " "`
21324      if test "x$has_space" != x; then
21325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21327      fi
21328      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21329    fi
21330  fi
21331
21332  # Now new_path has a complete unix path to the binary
21333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21334    # Keep paths in /bin as-is, but remove trailing .exe if any
21335    new_path="${new_path/%.exe/}"
21336    # Do not save /bin paths to all_fixpath_prefixes!
21337  else
21338    # Not in mixed or Windows style, start by that.
21339    new_path=`cmd //c echo $new_path`
21340
21341  input_path="$new_path"
21342  # Check if we need to convert this using DOS-style short mode. If the path
21343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21344  # take no chances and rewrite it.
21345  # Note: m4 eats our [], so we need to use [ and ] instead.
21346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21347  if test "x$has_forbidden_chars" != x; then
21348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21350  fi
21351
21352    # Output is in $new_path
21353
21354  windows_path="$new_path"
21355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21356    unix_path=`$CYGPATH -u "$windows_path"`
21357    new_path="$unix_path"
21358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21360    new_path="$unix_path"
21361  fi
21362
21363    # remove trailing .exe if any
21364    new_path="${new_path/%.exe/}"
21365
21366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21368  fi
21369
21370  else
21371    # We're on a posix platform. Hooray! :)
21372    # First separate the path from the arguments. This will split at the first
21373    # space.
21374    complete="$AR"
21375    path="${complete%% *}"
21376    tmp="$complete EOL"
21377    arguments="${tmp#* }"
21378
21379    new_path=`$WHICH $path 2> /dev/null`
21380    if test "x$new_path" = x; then
21381      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21382      if test "x$is_absolute_path" != x; then
21383        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21384$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21385        new_path="$path"
21386      else
21387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21388$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21389        has_space=`$ECHO "$complete" | $GREP " "`
21390        if test "x$has_space" != x; then
21391          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21392$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21393        fi
21394        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21395      fi
21396    fi
21397  fi
21398
21399  # Now join together the path and the arguments once again
21400  if test "x$arguments" != xEOL; then
21401      new_complete="$new_path ${arguments% *}"
21402  else
21403      new_complete="$new_path"
21404  fi
21405
21406  if test "x$complete" != "x$new_complete"; then
21407    AR="$new_complete"
21408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21409$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21410  fi
21411
21412fi
21413if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21414    ARFLAGS="-r"
21415else
21416    ARFLAGS=""
21417fi
21418
21419
21420# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21421HOTSPOT_CXX="$CXX"
21422HOTSPOT_LD="$LD"
21423
21424
21425
21426COMPILER_NAME=gcc
21427COMPILER_TYPE=CC
21428if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21429
21430    # For now, assume that we are always compiling using cl.exe.
21431    CC_OUT_OPTION=-Fo
21432    EXE_OUT_OPTION=-out:
21433    LD_OUT_OPTION=-out:
21434    AR_OUT_OPTION=-out:
21435    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21436    # program for something completely different.
21437    # Extract the first word of "link", so it can be a program name with args.
21438set dummy link; ac_word=$2
21439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21440$as_echo_n "checking for $ac_word... " >&6; }
21441if test "${ac_cv_prog_WINLD+set}" = set; then :
21442  $as_echo_n "(cached) " >&6
21443else
21444  if test -n "$WINLD"; then
21445  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21446else
21447  ac_prog_rejected=no
21448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21449for as_dir in $PATH
21450do
21451  IFS=$as_save_IFS
21452  test -z "$as_dir" && as_dir=.
21453    for ac_exec_ext in '' $ac_executable_extensions; do
21454  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21455    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21456       ac_prog_rejected=yes
21457       continue
21458     fi
21459    ac_cv_prog_WINLD="link"
21460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21461    break 2
21462  fi
21463done
21464  done
21465IFS=$as_save_IFS
21466
21467if test $ac_prog_rejected = yes; then
21468  # We found a bogon in the path, so make sure we never use it.
21469  set dummy $ac_cv_prog_WINLD
21470  shift
21471  if test $# != 0; then
21472    # We chose a different compiler from the bogus one.
21473    # However, it has the same basename, so the bogon will be chosen
21474    # first if we set WINLD to just the basename; use the full file name.
21475    shift
21476    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21477  fi
21478fi
21479fi
21480fi
21481WINLD=$ac_cv_prog_WINLD
21482if test -n "$WINLD"; then
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21484$as_echo "$WINLD" >&6; }
21485else
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21487$as_echo "no" >&6; }
21488fi
21489
21490
21491    # Since we must ignore the first found link, WINLD will contain
21492    # the full path to the link.exe program.
21493
21494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21495
21496  # First separate the path from the arguments. This will split at the first
21497  # space.
21498  complete="$WINLD"
21499  path="${complete%% *}"
21500  tmp="$complete EOL"
21501  arguments="${tmp#* }"
21502
21503  # Input might be given as Windows format, start by converting to
21504  # unix format.
21505  new_path=`$CYGPATH -u "$path"`
21506
21507  # Now try to locate executable using which
21508  new_path=`$WHICH "$new_path" 2> /dev/null`
21509  # bat and cmd files are not always considered executable in cygwin causing which
21510  # to not find them
21511  if test "x$new_path" = x \
21512           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21513           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21514    new_path=`$CYGPATH -u "$path"`
21515  fi
21516  if test "x$new_path" = x; then
21517    # Oops. Which didn't find the executable.
21518    # The splitting of arguments from the executable at a space might have been incorrect,
21519    # since paths with space are more likely in Windows. Give it another try with the whole
21520    # argument.
21521    path="$complete"
21522    arguments="EOL"
21523    new_path=`$CYGPATH -u "$path"`
21524    new_path=`$WHICH "$new_path" 2> /dev/null`
21525    # bat and cmd files are not always considered executable in cygwin causing which
21526    # to not find them
21527    if test "x$new_path" = x \
21528             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21529             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21530      new_path=`$CYGPATH -u "$path"`
21531    fi
21532    if test "x$new_path" = x; then
21533      # It's still not found. Now this is an unrecoverable error.
21534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21535$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21536      has_space=`$ECHO "$complete" | $GREP " "`
21537      if test "x$has_space" != x; then
21538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21540      fi
21541      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21542    fi
21543  fi
21544
21545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21548  # "foo.exe" is OK but "foo" is an error.
21549  #
21550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21551  # It is also a way to make sure we got the proper file name for the real test later on.
21552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21553  if test "x$test_shortpath" = x; then
21554    # Short path failed, file does not exist as specified.
21555    # Try adding .exe or .cmd
21556    if test -f "${new_path}.exe"; then
21557       input_to_shortpath="${new_path}.exe"
21558    elif test -f "${new_path}.cmd"; then
21559       input_to_shortpath="${new_path}.cmd"
21560    else
21561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21562$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21565      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21566    fi
21567  else
21568    input_to_shortpath="$new_path"
21569  fi
21570
21571  # Call helper function which possibly converts this using DOS-style short mode.
21572  # If so, the updated path is stored in $new_path.
21573  new_path="$input_to_shortpath"
21574
21575  input_path="$input_to_shortpath"
21576  # Check if we need to convert this using DOS-style short mode. If the path
21577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21578  # take no chances and rewrite it.
21579  # Note: m4 eats our [], so we need to use [ and ] instead.
21580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21581  if test "x$has_forbidden_chars" != x; then
21582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21586      # Going to short mode and back again did indeed matter. Since short mode is
21587      # case insensitive, let's make it lowercase to improve readability.
21588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21589      # Now convert it back to Unix-stile (cygpath)
21590      input_path=`$CYGPATH -u "$shortmode_path"`
21591      new_path="$input_path"
21592    fi
21593  fi
21594
21595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21596  if test "x$test_cygdrive_prefix" = x; then
21597    # As a simple fix, exclude /usr/bin since it's not a real path.
21598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21600      # a path prefixed by /cygdrive for fixpath to work.
21601      new_path="$CYGWIN_ROOT_PATH$input_path"
21602    fi
21603  fi
21604
21605  # remove trailing .exe if any
21606  new_path="${new_path/%.exe/}"
21607
21608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21609
21610  # First separate the path from the arguments. This will split at the first
21611  # space.
21612  complete="$WINLD"
21613  path="${complete%% *}"
21614  tmp="$complete EOL"
21615  arguments="${tmp#* }"
21616
21617  # Input might be given as Windows format, start by converting to
21618  # unix format.
21619  new_path="$path"
21620
21621  windows_path="$new_path"
21622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21623    unix_path=`$CYGPATH -u "$windows_path"`
21624    new_path="$unix_path"
21625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21627    new_path="$unix_path"
21628  fi
21629
21630
21631  # Now try to locate executable using which
21632  new_path=`$WHICH "$new_path" 2> /dev/null`
21633
21634  if test "x$new_path" = x; then
21635    # Oops. Which didn't find the executable.
21636    # The splitting of arguments from the executable at a space might have been incorrect,
21637    # since paths with space are more likely in Windows. Give it another try with the whole
21638    # argument.
21639    path="$complete"
21640    arguments="EOL"
21641    new_path="$path"
21642
21643  windows_path="$new_path"
21644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21645    unix_path=`$CYGPATH -u "$windows_path"`
21646    new_path="$unix_path"
21647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21649    new_path="$unix_path"
21650  fi
21651
21652
21653    new_path=`$WHICH "$new_path" 2> /dev/null`
21654
21655    if test "x$new_path" = x; then
21656      # It's still not found. Now this is an unrecoverable error.
21657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21658$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21659      has_space=`$ECHO "$complete" | $GREP " "`
21660      if test "x$has_space" != x; then
21661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21663      fi
21664      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21665    fi
21666  fi
21667
21668  # Now new_path has a complete unix path to the binary
21669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21670    # Keep paths in /bin as-is, but remove trailing .exe if any
21671    new_path="${new_path/%.exe/}"
21672    # Do not save /bin paths to all_fixpath_prefixes!
21673  else
21674    # Not in mixed or Windows style, start by that.
21675    new_path=`cmd //c echo $new_path`
21676
21677  input_path="$new_path"
21678  # Check if we need to convert this using DOS-style short mode. If the path
21679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21680  # take no chances and rewrite it.
21681  # Note: m4 eats our [], so we need to use [ and ] instead.
21682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21683  if test "x$has_forbidden_chars" != x; then
21684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21686  fi
21687
21688    # Output is in $new_path
21689
21690  windows_path="$new_path"
21691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21692    unix_path=`$CYGPATH -u "$windows_path"`
21693    new_path="$unix_path"
21694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21696    new_path="$unix_path"
21697  fi
21698
21699    # remove trailing .exe if any
21700    new_path="${new_path/%.exe/}"
21701
21702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21704  fi
21705
21706  else
21707    # We're on a posix platform. Hooray! :)
21708    # First separate the path from the arguments. This will split at the first
21709    # space.
21710    complete="$WINLD"
21711    path="${complete%% *}"
21712    tmp="$complete EOL"
21713    arguments="${tmp#* }"
21714
21715    new_path=`$WHICH $path 2> /dev/null`
21716    if test "x$new_path" = x; then
21717      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21718      if test "x$is_absolute_path" != x; then
21719        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21720$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21721        new_path="$path"
21722      else
21723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21724$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21725        has_space=`$ECHO "$complete" | $GREP " "`
21726        if test "x$has_space" != x; then
21727          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21728$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21729        fi
21730        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21731      fi
21732    fi
21733  fi
21734
21735  # Now join together the path and the arguments once again
21736  if test "x$arguments" != xEOL; then
21737      new_complete="$new_path ${arguments% *}"
21738  else
21739      new_complete="$new_path"
21740  fi
21741
21742  if test "x$complete" != "x$new_complete"; then
21743    WINLD="$new_complete"
21744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21745$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21746  fi
21747
21748    printf "Windows linker was found at $WINLD\n"
21749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21750$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21751    "$WINLD" --version > /dev/null
21752    if test $? -eq 0 ; then
21753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21754$as_echo "no" >&6; }
21755      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21756    else
21757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21758$as_echo "yes" >&6; }
21759    fi
21760    LD="$WINLD"
21761    LDEXE="$WINLD"
21762    LDCXX="$WINLD"
21763    LDEXECXX="$WINLD"
21764
21765    # Extract the first word of "mt", so it can be a program name with args.
21766set dummy mt; ac_word=$2
21767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21768$as_echo_n "checking for $ac_word... " >&6; }
21769if test "${ac_cv_prog_MT+set}" = set; then :
21770  $as_echo_n "(cached) " >&6
21771else
21772  if test -n "$MT"; then
21773  ac_cv_prog_MT="$MT" # Let the user override the test.
21774else
21775  ac_prog_rejected=no
21776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21777for as_dir in $PATH
21778do
21779  IFS=$as_save_IFS
21780  test -z "$as_dir" && as_dir=.
21781    for ac_exec_ext in '' $ac_executable_extensions; do
21782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21783    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21784       ac_prog_rejected=yes
21785       continue
21786     fi
21787    ac_cv_prog_MT="mt"
21788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21789    break 2
21790  fi
21791done
21792  done
21793IFS=$as_save_IFS
21794
21795if test $ac_prog_rejected = yes; then
21796  # We found a bogon in the path, so make sure we never use it.
21797  set dummy $ac_cv_prog_MT
21798  shift
21799  if test $# != 0; then
21800    # We chose a different compiler from the bogus one.
21801    # However, it has the same basename, so the bogon will be chosen
21802    # first if we set MT to just the basename; use the full file name.
21803    shift
21804    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21805  fi
21806fi
21807fi
21808fi
21809MT=$ac_cv_prog_MT
21810if test -n "$MT"; then
21811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21812$as_echo "$MT" >&6; }
21813else
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21815$as_echo "no" >&6; }
21816fi
21817
21818
21819
21820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21821
21822  # First separate the path from the arguments. This will split at the first
21823  # space.
21824  complete="$MT"
21825  path="${complete%% *}"
21826  tmp="$complete EOL"
21827  arguments="${tmp#* }"
21828
21829  # Input might be given as Windows format, start by converting to
21830  # unix format.
21831  new_path=`$CYGPATH -u "$path"`
21832
21833  # Now try to locate executable using which
21834  new_path=`$WHICH "$new_path" 2> /dev/null`
21835  # bat and cmd files are not always considered executable in cygwin causing which
21836  # to not find them
21837  if test "x$new_path" = x \
21838           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21839           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21840    new_path=`$CYGPATH -u "$path"`
21841  fi
21842  if test "x$new_path" = x; then
21843    # Oops. Which didn't find the executable.
21844    # The splitting of arguments from the executable at a space might have been incorrect,
21845    # since paths with space are more likely in Windows. Give it another try with the whole
21846    # argument.
21847    path="$complete"
21848    arguments="EOL"
21849    new_path=`$CYGPATH -u "$path"`
21850    new_path=`$WHICH "$new_path" 2> /dev/null`
21851    # bat and cmd files are not always considered executable in cygwin causing which
21852    # to not find them
21853    if test "x$new_path" = x \
21854             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21855             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21856      new_path=`$CYGPATH -u "$path"`
21857    fi
21858    if test "x$new_path" = x; then
21859      # It's still not found. Now this is an unrecoverable error.
21860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21861$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21862      has_space=`$ECHO "$complete" | $GREP " "`
21863      if test "x$has_space" != x; then
21864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21866      fi
21867      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21868    fi
21869  fi
21870
21871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21874  # "foo.exe" is OK but "foo" is an error.
21875  #
21876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21877  # It is also a way to make sure we got the proper file name for the real test later on.
21878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21879  if test "x$test_shortpath" = x; then
21880    # Short path failed, file does not exist as specified.
21881    # Try adding .exe or .cmd
21882    if test -f "${new_path}.exe"; then
21883       input_to_shortpath="${new_path}.exe"
21884    elif test -f "${new_path}.cmd"; then
21885       input_to_shortpath="${new_path}.cmd"
21886    else
21887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21888$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21891      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21892    fi
21893  else
21894    input_to_shortpath="$new_path"
21895  fi
21896
21897  # Call helper function which possibly converts this using DOS-style short mode.
21898  # If so, the updated path is stored in $new_path.
21899  new_path="$input_to_shortpath"
21900
21901  input_path="$input_to_shortpath"
21902  # Check if we need to convert this using DOS-style short mode. If the path
21903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21904  # take no chances and rewrite it.
21905  # Note: m4 eats our [], so we need to use [ and ] instead.
21906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21907  if test "x$has_forbidden_chars" != x; then
21908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21912      # Going to short mode and back again did indeed matter. Since short mode is
21913      # case insensitive, let's make it lowercase to improve readability.
21914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21915      # Now convert it back to Unix-stile (cygpath)
21916      input_path=`$CYGPATH -u "$shortmode_path"`
21917      new_path="$input_path"
21918    fi
21919  fi
21920
21921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21922  if test "x$test_cygdrive_prefix" = x; then
21923    # As a simple fix, exclude /usr/bin since it's not a real path.
21924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21926      # a path prefixed by /cygdrive for fixpath to work.
21927      new_path="$CYGWIN_ROOT_PATH$input_path"
21928    fi
21929  fi
21930
21931  # remove trailing .exe if any
21932  new_path="${new_path/%.exe/}"
21933
21934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21935
21936  # First separate the path from the arguments. This will split at the first
21937  # space.
21938  complete="$MT"
21939  path="${complete%% *}"
21940  tmp="$complete EOL"
21941  arguments="${tmp#* }"
21942
21943  # Input might be given as Windows format, start by converting to
21944  # unix format.
21945  new_path="$path"
21946
21947  windows_path="$new_path"
21948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21949    unix_path=`$CYGPATH -u "$windows_path"`
21950    new_path="$unix_path"
21951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21953    new_path="$unix_path"
21954  fi
21955
21956
21957  # Now try to locate executable using which
21958  new_path=`$WHICH "$new_path" 2> /dev/null`
21959
21960  if test "x$new_path" = x; then
21961    # Oops. Which didn't find the executable.
21962    # The splitting of arguments from the executable at a space might have been incorrect,
21963    # since paths with space are more likely in Windows. Give it another try with the whole
21964    # argument.
21965    path="$complete"
21966    arguments="EOL"
21967    new_path="$path"
21968
21969  windows_path="$new_path"
21970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21971    unix_path=`$CYGPATH -u "$windows_path"`
21972    new_path="$unix_path"
21973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21975    new_path="$unix_path"
21976  fi
21977
21978
21979    new_path=`$WHICH "$new_path" 2> /dev/null`
21980
21981    if test "x$new_path" = x; then
21982      # It's still not found. Now this is an unrecoverable error.
21983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21984$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21985      has_space=`$ECHO "$complete" | $GREP " "`
21986      if test "x$has_space" != x; then
21987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21989      fi
21990      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21991    fi
21992  fi
21993
21994  # Now new_path has a complete unix path to the binary
21995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21996    # Keep paths in /bin as-is, but remove trailing .exe if any
21997    new_path="${new_path/%.exe/}"
21998    # Do not save /bin paths to all_fixpath_prefixes!
21999  else
22000    # Not in mixed or Windows style, start by that.
22001    new_path=`cmd //c echo $new_path`
22002
22003  input_path="$new_path"
22004  # Check if we need to convert this using DOS-style short mode. If the path
22005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22006  # take no chances and rewrite it.
22007  # Note: m4 eats our [], so we need to use [ and ] instead.
22008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22009  if test "x$has_forbidden_chars" != x; then
22010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22012  fi
22013
22014    # Output is in $new_path
22015
22016  windows_path="$new_path"
22017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22018    unix_path=`$CYGPATH -u "$windows_path"`
22019    new_path="$unix_path"
22020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22022    new_path="$unix_path"
22023  fi
22024
22025    # remove trailing .exe if any
22026    new_path="${new_path/%.exe/}"
22027
22028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22030  fi
22031
22032  else
22033    # We're on a posix platform. Hooray! :)
22034    # First separate the path from the arguments. This will split at the first
22035    # space.
22036    complete="$MT"
22037    path="${complete%% *}"
22038    tmp="$complete EOL"
22039    arguments="${tmp#* }"
22040
22041    new_path=`$WHICH $path 2> /dev/null`
22042    if test "x$new_path" = x; then
22043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22044      if test "x$is_absolute_path" != x; then
22045        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
22046$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
22047        new_path="$path"
22048      else
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22050$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22051        has_space=`$ECHO "$complete" | $GREP " "`
22052        if test "x$has_space" != x; then
22053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22055        fi
22056        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22057      fi
22058    fi
22059  fi
22060
22061  # Now join together the path and the arguments once again
22062  if test "x$arguments" != xEOL; then
22063      new_complete="$new_path ${arguments% *}"
22064  else
22065      new_complete="$new_path"
22066  fi
22067
22068  if test "x$complete" != "x$new_complete"; then
22069    MT="$new_complete"
22070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22071$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22072  fi
22073
22074    # The resource compiler
22075    # Extract the first word of "rc", so it can be a program name with args.
22076set dummy rc; ac_word=$2
22077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22078$as_echo_n "checking for $ac_word... " >&6; }
22079if test "${ac_cv_prog_RC+set}" = set; then :
22080  $as_echo_n "(cached) " >&6
22081else
22082  if test -n "$RC"; then
22083  ac_cv_prog_RC="$RC" # Let the user override the test.
22084else
22085  ac_prog_rejected=no
22086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22087for as_dir in $PATH
22088do
22089  IFS=$as_save_IFS
22090  test -z "$as_dir" && as_dir=.
22091    for ac_exec_ext in '' $ac_executable_extensions; do
22092  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22093    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22094       ac_prog_rejected=yes
22095       continue
22096     fi
22097    ac_cv_prog_RC="rc"
22098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22099    break 2
22100  fi
22101done
22102  done
22103IFS=$as_save_IFS
22104
22105if test $ac_prog_rejected = yes; then
22106  # We found a bogon in the path, so make sure we never use it.
22107  set dummy $ac_cv_prog_RC
22108  shift
22109  if test $# != 0; then
22110    # We chose a different compiler from the bogus one.
22111    # However, it has the same basename, so the bogon will be chosen
22112    # first if we set RC to just the basename; use the full file name.
22113    shift
22114    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22115  fi
22116fi
22117fi
22118fi
22119RC=$ac_cv_prog_RC
22120if test -n "$RC"; then
22121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22122$as_echo "$RC" >&6; }
22123else
22124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22125$as_echo "no" >&6; }
22126fi
22127
22128
22129
22130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22131
22132  # First separate the path from the arguments. This will split at the first
22133  # space.
22134  complete="$RC"
22135  path="${complete%% *}"
22136  tmp="$complete EOL"
22137  arguments="${tmp#* }"
22138
22139  # Input might be given as Windows format, start by converting to
22140  # unix format.
22141  new_path=`$CYGPATH -u "$path"`
22142
22143  # Now try to locate executable using which
22144  new_path=`$WHICH "$new_path" 2> /dev/null`
22145  # bat and cmd files are not always considered executable in cygwin causing which
22146  # to not find them
22147  if test "x$new_path" = x \
22148           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22149           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22150    new_path=`$CYGPATH -u "$path"`
22151  fi
22152  if test "x$new_path" = x; then
22153    # Oops. Which didn't find the executable.
22154    # The splitting of arguments from the executable at a space might have been incorrect,
22155    # since paths with space are more likely in Windows. Give it another try with the whole
22156    # argument.
22157    path="$complete"
22158    arguments="EOL"
22159    new_path=`$CYGPATH -u "$path"`
22160    new_path=`$WHICH "$new_path" 2> /dev/null`
22161    # bat and cmd files are not always considered executable in cygwin causing which
22162    # to not find them
22163    if test "x$new_path" = x \
22164             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22165             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22166      new_path=`$CYGPATH -u "$path"`
22167    fi
22168    if test "x$new_path" = x; then
22169      # It's still not found. Now this is an unrecoverable error.
22170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22171$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22172      has_space=`$ECHO "$complete" | $GREP " "`
22173      if test "x$has_space" != x; then
22174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22176      fi
22177      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22178    fi
22179  fi
22180
22181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22184  # "foo.exe" is OK but "foo" is an error.
22185  #
22186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22187  # It is also a way to make sure we got the proper file name for the real test later on.
22188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22189  if test "x$test_shortpath" = x; then
22190    # Short path failed, file does not exist as specified.
22191    # Try adding .exe or .cmd
22192    if test -f "${new_path}.exe"; then
22193       input_to_shortpath="${new_path}.exe"
22194    elif test -f "${new_path}.cmd"; then
22195       input_to_shortpath="${new_path}.cmd"
22196    else
22197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22198$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22199      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22200$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22201      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22202    fi
22203  else
22204    input_to_shortpath="$new_path"
22205  fi
22206
22207  # Call helper function which possibly converts this using DOS-style short mode.
22208  # If so, the updated path is stored in $new_path.
22209  new_path="$input_to_shortpath"
22210
22211  input_path="$input_to_shortpath"
22212  # Check if we need to convert this using DOS-style short mode. If the path
22213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22214  # take no chances and rewrite it.
22215  # Note: m4 eats our [], so we need to use [ and ] instead.
22216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22217  if test "x$has_forbidden_chars" != x; then
22218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22222      # Going to short mode and back again did indeed matter. Since short mode is
22223      # case insensitive, let's make it lowercase to improve readability.
22224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22225      # Now convert it back to Unix-stile (cygpath)
22226      input_path=`$CYGPATH -u "$shortmode_path"`
22227      new_path="$input_path"
22228    fi
22229  fi
22230
22231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22232  if test "x$test_cygdrive_prefix" = x; then
22233    # As a simple fix, exclude /usr/bin since it's not a real path.
22234    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22236      # a path prefixed by /cygdrive for fixpath to work.
22237      new_path="$CYGWIN_ROOT_PATH$input_path"
22238    fi
22239  fi
22240
22241  # remove trailing .exe if any
22242  new_path="${new_path/%.exe/}"
22243
22244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22245
22246  # First separate the path from the arguments. This will split at the first
22247  # space.
22248  complete="$RC"
22249  path="${complete%% *}"
22250  tmp="$complete EOL"
22251  arguments="${tmp#* }"
22252
22253  # Input might be given as Windows format, start by converting to
22254  # unix format.
22255  new_path="$path"
22256
22257  windows_path="$new_path"
22258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22259    unix_path=`$CYGPATH -u "$windows_path"`
22260    new_path="$unix_path"
22261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22263    new_path="$unix_path"
22264  fi
22265
22266
22267  # Now try to locate executable using which
22268  new_path=`$WHICH "$new_path" 2> /dev/null`
22269
22270  if test "x$new_path" = x; then
22271    # Oops. Which didn't find the executable.
22272    # The splitting of arguments from the executable at a space might have been incorrect,
22273    # since paths with space are more likely in Windows. Give it another try with the whole
22274    # argument.
22275    path="$complete"
22276    arguments="EOL"
22277    new_path="$path"
22278
22279  windows_path="$new_path"
22280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22281    unix_path=`$CYGPATH -u "$windows_path"`
22282    new_path="$unix_path"
22283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22285    new_path="$unix_path"
22286  fi
22287
22288
22289    new_path=`$WHICH "$new_path" 2> /dev/null`
22290
22291    if test "x$new_path" = x; then
22292      # It's still not found. Now this is an unrecoverable error.
22293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22294$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22295      has_space=`$ECHO "$complete" | $GREP " "`
22296      if test "x$has_space" != x; then
22297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22299      fi
22300      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22301    fi
22302  fi
22303
22304  # Now new_path has a complete unix path to the binary
22305  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22306    # Keep paths in /bin as-is, but remove trailing .exe if any
22307    new_path="${new_path/%.exe/}"
22308    # Do not save /bin paths to all_fixpath_prefixes!
22309  else
22310    # Not in mixed or Windows style, start by that.
22311    new_path=`cmd //c echo $new_path`
22312
22313  input_path="$new_path"
22314  # Check if we need to convert this using DOS-style short mode. If the path
22315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22316  # take no chances and rewrite it.
22317  # Note: m4 eats our [], so we need to use [ and ] instead.
22318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22319  if test "x$has_forbidden_chars" != x; then
22320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22322  fi
22323
22324    # Output is in $new_path
22325
22326  windows_path="$new_path"
22327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22328    unix_path=`$CYGPATH -u "$windows_path"`
22329    new_path="$unix_path"
22330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22332    new_path="$unix_path"
22333  fi
22334
22335    # remove trailing .exe if any
22336    new_path="${new_path/%.exe/}"
22337
22338    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22339    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22340  fi
22341
22342  else
22343    # We're on a posix platform. Hooray! :)
22344    # First separate the path from the arguments. This will split at the first
22345    # space.
22346    complete="$RC"
22347    path="${complete%% *}"
22348    tmp="$complete EOL"
22349    arguments="${tmp#* }"
22350
22351    new_path=`$WHICH $path 2> /dev/null`
22352    if test "x$new_path" = x; then
22353      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22354      if test "x$is_absolute_path" != x; then
22355        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22356$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22357        new_path="$path"
22358      else
22359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22360$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22361        has_space=`$ECHO "$complete" | $GREP " "`
22362        if test "x$has_space" != x; then
22363          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22364$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22365        fi
22366        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22367      fi
22368    fi
22369  fi
22370
22371  # Now join together the path and the arguments once again
22372  if test "x$arguments" != xEOL; then
22373      new_complete="$new_path ${arguments% *}"
22374  else
22375      new_complete="$new_path"
22376  fi
22377
22378  if test "x$complete" != "x$new_complete"; then
22379    RC="$new_complete"
22380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22381$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22382  fi
22383
22384
22385    # For hotspot, we need these in Windows mixed path,
22386    # so rewrite them all. Need added .exe suffix.
22387    HOTSPOT_CXX="$CXX.exe"
22388    HOTSPOT_LD="$LD.exe"
22389    HOTSPOT_MT="$MT.exe"
22390    HOTSPOT_RC="$RC.exe"
22391
22392  unix_path="$HOTSPOT_CXX"
22393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22394    windows_path=`$CYGPATH -m "$unix_path"`
22395    HOTSPOT_CXX="$windows_path"
22396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22397    windows_path=`cmd //c echo $unix_path`
22398    HOTSPOT_CXX="$windows_path"
22399  fi
22400
22401
22402  unix_path="$HOTSPOT_LD"
22403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22404    windows_path=`$CYGPATH -m "$unix_path"`
22405    HOTSPOT_LD="$windows_path"
22406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22407    windows_path=`cmd //c echo $unix_path`
22408    HOTSPOT_LD="$windows_path"
22409  fi
22410
22411
22412  unix_path="$HOTSPOT_MT"
22413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22414    windows_path=`$CYGPATH -m "$unix_path"`
22415    HOTSPOT_MT="$windows_path"
22416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22417    windows_path=`cmd //c echo $unix_path`
22418    HOTSPOT_MT="$windows_path"
22419  fi
22420
22421
22422  unix_path="$HOTSPOT_RC"
22423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22424    windows_path=`$CYGPATH -m "$unix_path"`
22425    HOTSPOT_RC="$windows_path"
22426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22427    windows_path=`cmd //c echo $unix_path`
22428    HOTSPOT_RC="$windows_path"
22429  fi
22430
22431
22432
22433
22434    RC_FLAGS="-nologo -l 0x409 -r"
22435    if test "x$VARIANT" = xOPT; then :
22436
22437        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22438
22439fi
22440    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22441    if test "x$JDK_UPDATE_VERSION" = x; then :
22442
22443        JDK_UPDATE_VERSION_NOTNULL=0
22444
22445fi
22446    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22447    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22448    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22449    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22450    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22451    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22452    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22453
22454    # lib.exe is used to create static libraries.
22455    # Extract the first word of "lib", so it can be a program name with args.
22456set dummy lib; ac_word=$2
22457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22458$as_echo_n "checking for $ac_word... " >&6; }
22459if test "${ac_cv_prog_WINAR+set}" = set; then :
22460  $as_echo_n "(cached) " >&6
22461else
22462  if test -n "$WINAR"; then
22463  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22464else
22465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22466for as_dir in $PATH
22467do
22468  IFS=$as_save_IFS
22469  test -z "$as_dir" && as_dir=.
22470    for ac_exec_ext in '' $ac_executable_extensions; do
22471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22472    ac_cv_prog_WINAR="lib"
22473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22474    break 2
22475  fi
22476done
22477  done
22478IFS=$as_save_IFS
22479
22480fi
22481fi
22482WINAR=$ac_cv_prog_WINAR
22483if test -n "$WINAR"; then
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22485$as_echo "$WINAR" >&6; }
22486else
22487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22488$as_echo "no" >&6; }
22489fi
22490
22491
22492
22493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22494
22495  # First separate the path from the arguments. This will split at the first
22496  # space.
22497  complete="$WINAR"
22498  path="${complete%% *}"
22499  tmp="$complete EOL"
22500  arguments="${tmp#* }"
22501
22502  # Input might be given as Windows format, start by converting to
22503  # unix format.
22504  new_path=`$CYGPATH -u "$path"`
22505
22506  # Now try to locate executable using which
22507  new_path=`$WHICH "$new_path" 2> /dev/null`
22508  # bat and cmd files are not always considered executable in cygwin causing which
22509  # to not find them
22510  if test "x$new_path" = x \
22511           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22512           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22513    new_path=`$CYGPATH -u "$path"`
22514  fi
22515  if test "x$new_path" = x; then
22516    # Oops. Which didn't find the executable.
22517    # The splitting of arguments from the executable at a space might have been incorrect,
22518    # since paths with space are more likely in Windows. Give it another try with the whole
22519    # argument.
22520    path="$complete"
22521    arguments="EOL"
22522    new_path=`$CYGPATH -u "$path"`
22523    new_path=`$WHICH "$new_path" 2> /dev/null`
22524    # bat and cmd files are not always considered executable in cygwin causing which
22525    # to not find them
22526    if test "x$new_path" = x \
22527             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22528             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22529      new_path=`$CYGPATH -u "$path"`
22530    fi
22531    if test "x$new_path" = x; then
22532      # It's still not found. Now this is an unrecoverable error.
22533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22534$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22535      has_space=`$ECHO "$complete" | $GREP " "`
22536      if test "x$has_space" != x; then
22537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22539      fi
22540      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22541    fi
22542  fi
22543
22544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22547  # "foo.exe" is OK but "foo" is an error.
22548  #
22549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22550  # It is also a way to make sure we got the proper file name for the real test later on.
22551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22552  if test "x$test_shortpath" = x; then
22553    # Short path failed, file does not exist as specified.
22554    # Try adding .exe or .cmd
22555    if test -f "${new_path}.exe"; then
22556       input_to_shortpath="${new_path}.exe"
22557    elif test -f "${new_path}.cmd"; then
22558       input_to_shortpath="${new_path}.cmd"
22559    else
22560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22561$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22562      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22563$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22564      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22565    fi
22566  else
22567    input_to_shortpath="$new_path"
22568  fi
22569
22570  # Call helper function which possibly converts this using DOS-style short mode.
22571  # If so, the updated path is stored in $new_path.
22572  new_path="$input_to_shortpath"
22573
22574  input_path="$input_to_shortpath"
22575  # Check if we need to convert this using DOS-style short mode. If the path
22576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22577  # take no chances and rewrite it.
22578  # Note: m4 eats our [], so we need to use [ and ] instead.
22579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22580  if test "x$has_forbidden_chars" != x; then
22581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22585      # Going to short mode and back again did indeed matter. Since short mode is
22586      # case insensitive, let's make it lowercase to improve readability.
22587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22588      # Now convert it back to Unix-stile (cygpath)
22589      input_path=`$CYGPATH -u "$shortmode_path"`
22590      new_path="$input_path"
22591    fi
22592  fi
22593
22594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22595  if test "x$test_cygdrive_prefix" = x; then
22596    # As a simple fix, exclude /usr/bin since it's not a real path.
22597    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22599      # a path prefixed by /cygdrive for fixpath to work.
22600      new_path="$CYGWIN_ROOT_PATH$input_path"
22601    fi
22602  fi
22603
22604  # remove trailing .exe if any
22605  new_path="${new_path/%.exe/}"
22606
22607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22608
22609  # First separate the path from the arguments. This will split at the first
22610  # space.
22611  complete="$WINAR"
22612  path="${complete%% *}"
22613  tmp="$complete EOL"
22614  arguments="${tmp#* }"
22615
22616  # Input might be given as Windows format, start by converting to
22617  # unix format.
22618  new_path="$path"
22619
22620  windows_path="$new_path"
22621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22622    unix_path=`$CYGPATH -u "$windows_path"`
22623    new_path="$unix_path"
22624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22626    new_path="$unix_path"
22627  fi
22628
22629
22630  # Now try to locate executable using which
22631  new_path=`$WHICH "$new_path" 2> /dev/null`
22632
22633  if test "x$new_path" = x; then
22634    # Oops. Which didn't find the executable.
22635    # The splitting of arguments from the executable at a space might have been incorrect,
22636    # since paths with space are more likely in Windows. Give it another try with the whole
22637    # argument.
22638    path="$complete"
22639    arguments="EOL"
22640    new_path="$path"
22641
22642  windows_path="$new_path"
22643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22644    unix_path=`$CYGPATH -u "$windows_path"`
22645    new_path="$unix_path"
22646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22648    new_path="$unix_path"
22649  fi
22650
22651
22652    new_path=`$WHICH "$new_path" 2> /dev/null`
22653
22654    if test "x$new_path" = x; then
22655      # It's still not found. Now this is an unrecoverable error.
22656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22657$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22658      has_space=`$ECHO "$complete" | $GREP " "`
22659      if test "x$has_space" != x; then
22660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22662      fi
22663      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22664    fi
22665  fi
22666
22667  # Now new_path has a complete unix path to the binary
22668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22669    # Keep paths in /bin as-is, but remove trailing .exe if any
22670    new_path="${new_path/%.exe/}"
22671    # Do not save /bin paths to all_fixpath_prefixes!
22672  else
22673    # Not in mixed or Windows style, start by that.
22674    new_path=`cmd //c echo $new_path`
22675
22676  input_path="$new_path"
22677  # Check if we need to convert this using DOS-style short mode. If the path
22678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22679  # take no chances and rewrite it.
22680  # Note: m4 eats our [], so we need to use [ and ] instead.
22681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22682  if test "x$has_forbidden_chars" != x; then
22683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22685  fi
22686
22687    # Output is in $new_path
22688
22689  windows_path="$new_path"
22690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22691    unix_path=`$CYGPATH -u "$windows_path"`
22692    new_path="$unix_path"
22693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22695    new_path="$unix_path"
22696  fi
22697
22698    # remove trailing .exe if any
22699    new_path="${new_path/%.exe/}"
22700
22701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22703  fi
22704
22705  else
22706    # We're on a posix platform. Hooray! :)
22707    # First separate the path from the arguments. This will split at the first
22708    # space.
22709    complete="$WINAR"
22710    path="${complete%% *}"
22711    tmp="$complete EOL"
22712    arguments="${tmp#* }"
22713
22714    new_path=`$WHICH $path 2> /dev/null`
22715    if test "x$new_path" = x; then
22716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22717      if test "x$is_absolute_path" != x; then
22718        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22719$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22720        new_path="$path"
22721      else
22722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22723$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22724        has_space=`$ECHO "$complete" | $GREP " "`
22725        if test "x$has_space" != x; then
22726          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22727$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22728        fi
22729        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22730      fi
22731    fi
22732  fi
22733
22734  # Now join together the path and the arguments once again
22735  if test "x$arguments" != xEOL; then
22736      new_complete="$new_path ${arguments% *}"
22737  else
22738      new_complete="$new_path"
22739  fi
22740
22741  if test "x$complete" != "x$new_complete"; then
22742    WINAR="$new_complete"
22743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22744$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22745  fi
22746
22747    AR="$WINAR"
22748    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22749
22750    # Extract the first word of "dumpbin", so it can be a program name with args.
22751set dummy dumpbin; ac_word=$2
22752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22753$as_echo_n "checking for $ac_word... " >&6; }
22754if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22755  $as_echo_n "(cached) " >&6
22756else
22757  if test -n "$DUMPBIN"; then
22758  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22759else
22760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22761for as_dir in $PATH
22762do
22763  IFS=$as_save_IFS
22764  test -z "$as_dir" && as_dir=.
22765    for ac_exec_ext in '' $ac_executable_extensions; do
22766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22767    ac_cv_prog_DUMPBIN="dumpbin"
22768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22769    break 2
22770  fi
22771done
22772  done
22773IFS=$as_save_IFS
22774
22775fi
22776fi
22777DUMPBIN=$ac_cv_prog_DUMPBIN
22778if test -n "$DUMPBIN"; then
22779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22780$as_echo "$DUMPBIN" >&6; }
22781else
22782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22783$as_echo "no" >&6; }
22784fi
22785
22786
22787
22788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22789
22790  # First separate the path from the arguments. This will split at the first
22791  # space.
22792  complete="$DUMPBIN"
22793  path="${complete%% *}"
22794  tmp="$complete EOL"
22795  arguments="${tmp#* }"
22796
22797  # Input might be given as Windows format, start by converting to
22798  # unix format.
22799  new_path=`$CYGPATH -u "$path"`
22800
22801  # Now try to locate executable using which
22802  new_path=`$WHICH "$new_path" 2> /dev/null`
22803  # bat and cmd files are not always considered executable in cygwin causing which
22804  # to not find them
22805  if test "x$new_path" = x \
22806           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22807           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22808    new_path=`$CYGPATH -u "$path"`
22809  fi
22810  if test "x$new_path" = x; then
22811    # Oops. Which didn't find the executable.
22812    # The splitting of arguments from the executable at a space might have been incorrect,
22813    # since paths with space are more likely in Windows. Give it another try with the whole
22814    # argument.
22815    path="$complete"
22816    arguments="EOL"
22817    new_path=`$CYGPATH -u "$path"`
22818    new_path=`$WHICH "$new_path" 2> /dev/null`
22819    # bat and cmd files are not always considered executable in cygwin causing which
22820    # to not find them
22821    if test "x$new_path" = x \
22822             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22823             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22824      new_path=`$CYGPATH -u "$path"`
22825    fi
22826    if test "x$new_path" = x; then
22827      # It's still not found. Now this is an unrecoverable error.
22828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22829$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22830      has_space=`$ECHO "$complete" | $GREP " "`
22831      if test "x$has_space" != x; then
22832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22834      fi
22835      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22836    fi
22837  fi
22838
22839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22842  # "foo.exe" is OK but "foo" is an error.
22843  #
22844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22845  # It is also a way to make sure we got the proper file name for the real test later on.
22846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22847  if test "x$test_shortpath" = x; then
22848    # Short path failed, file does not exist as specified.
22849    # Try adding .exe or .cmd
22850    if test -f "${new_path}.exe"; then
22851       input_to_shortpath="${new_path}.exe"
22852    elif test -f "${new_path}.cmd"; then
22853       input_to_shortpath="${new_path}.cmd"
22854    else
22855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22856$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22859      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22860    fi
22861  else
22862    input_to_shortpath="$new_path"
22863  fi
22864
22865  # Call helper function which possibly converts this using DOS-style short mode.
22866  # If so, the updated path is stored in $new_path.
22867  new_path="$input_to_shortpath"
22868
22869  input_path="$input_to_shortpath"
22870  # Check if we need to convert this using DOS-style short mode. If the path
22871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22872  # take no chances and rewrite it.
22873  # Note: m4 eats our [], so we need to use [ and ] instead.
22874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22875  if test "x$has_forbidden_chars" != x; then
22876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22880      # Going to short mode and back again did indeed matter. Since short mode is
22881      # case insensitive, let's make it lowercase to improve readability.
22882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22883      # Now convert it back to Unix-stile (cygpath)
22884      input_path=`$CYGPATH -u "$shortmode_path"`
22885      new_path="$input_path"
22886    fi
22887  fi
22888
22889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22890  if test "x$test_cygdrive_prefix" = x; then
22891    # As a simple fix, exclude /usr/bin since it's not a real path.
22892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22894      # a path prefixed by /cygdrive for fixpath to work.
22895      new_path="$CYGWIN_ROOT_PATH$input_path"
22896    fi
22897  fi
22898
22899  # remove trailing .exe if any
22900  new_path="${new_path/%.exe/}"
22901
22902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22903
22904  # First separate the path from the arguments. This will split at the first
22905  # space.
22906  complete="$DUMPBIN"
22907  path="${complete%% *}"
22908  tmp="$complete EOL"
22909  arguments="${tmp#* }"
22910
22911  # Input might be given as Windows format, start by converting to
22912  # unix format.
22913  new_path="$path"
22914
22915  windows_path="$new_path"
22916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22917    unix_path=`$CYGPATH -u "$windows_path"`
22918    new_path="$unix_path"
22919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22921    new_path="$unix_path"
22922  fi
22923
22924
22925  # Now try to locate executable using which
22926  new_path=`$WHICH "$new_path" 2> /dev/null`
22927
22928  if test "x$new_path" = x; then
22929    # Oops. Which didn't find the executable.
22930    # The splitting of arguments from the executable at a space might have been incorrect,
22931    # since paths with space are more likely in Windows. Give it another try with the whole
22932    # argument.
22933    path="$complete"
22934    arguments="EOL"
22935    new_path="$path"
22936
22937  windows_path="$new_path"
22938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22939    unix_path=`$CYGPATH -u "$windows_path"`
22940    new_path="$unix_path"
22941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22943    new_path="$unix_path"
22944  fi
22945
22946
22947    new_path=`$WHICH "$new_path" 2> /dev/null`
22948
22949    if test "x$new_path" = x; then
22950      # It's still not found. Now this is an unrecoverable error.
22951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22952$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22953      has_space=`$ECHO "$complete" | $GREP " "`
22954      if test "x$has_space" != x; then
22955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22957      fi
22958      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22959    fi
22960  fi
22961
22962  # Now new_path has a complete unix path to the binary
22963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22964    # Keep paths in /bin as-is, but remove trailing .exe if any
22965    new_path="${new_path/%.exe/}"
22966    # Do not save /bin paths to all_fixpath_prefixes!
22967  else
22968    # Not in mixed or Windows style, start by that.
22969    new_path=`cmd //c echo $new_path`
22970
22971  input_path="$new_path"
22972  # Check if we need to convert this using DOS-style short mode. If the path
22973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22974  # take no chances and rewrite it.
22975  # Note: m4 eats our [], so we need to use [ and ] instead.
22976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22977  if test "x$has_forbidden_chars" != x; then
22978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22980  fi
22981
22982    # Output is in $new_path
22983
22984  windows_path="$new_path"
22985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22986    unix_path=`$CYGPATH -u "$windows_path"`
22987    new_path="$unix_path"
22988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22990    new_path="$unix_path"
22991  fi
22992
22993    # remove trailing .exe if any
22994    new_path="${new_path/%.exe/}"
22995
22996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22998  fi
22999
23000  else
23001    # We're on a posix platform. Hooray! :)
23002    # First separate the path from the arguments. This will split at the first
23003    # space.
23004    complete="$DUMPBIN"
23005    path="${complete%% *}"
23006    tmp="$complete EOL"
23007    arguments="${tmp#* }"
23008
23009    new_path=`$WHICH $path 2> /dev/null`
23010    if test "x$new_path" = x; then
23011      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23012      if test "x$is_absolute_path" != x; then
23013        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
23014$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
23015        new_path="$path"
23016      else
23017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23018$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23019        has_space=`$ECHO "$complete" | $GREP " "`
23020        if test "x$has_space" != x; then
23021          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23022$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23023        fi
23024        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23025      fi
23026    fi
23027  fi
23028
23029  # Now join together the path and the arguments once again
23030  if test "x$arguments" != xEOL; then
23031      new_complete="$new_path ${arguments% *}"
23032  else
23033      new_complete="$new_path"
23034  fi
23035
23036  if test "x$complete" != "x$new_complete"; then
23037    DUMPBIN="$new_complete"
23038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23039$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23040  fi
23041
23042
23043    COMPILER_TYPE=CL
23044    CCXXFLAGS="$CCXXFLAGS -nologo"
23045
23046fi
23047
23048
23049
23050ac_ext=c
23051ac_cpp='$CPP $CPPFLAGS'
23052ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23053ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23054ac_compiler_gnu=$ac_cv_c_compiler_gnu
23055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23056$as_echo_n "checking how to run the C preprocessor... " >&6; }
23057# On Suns, sometimes $CPP names a directory.
23058if test -n "$CPP" && test -d "$CPP"; then
23059  CPP=
23060fi
23061if test -z "$CPP"; then
23062  if test "${ac_cv_prog_CPP+set}" = set; then :
23063  $as_echo_n "(cached) " >&6
23064else
23065      # Double quotes because CPP needs to be expanded
23066    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23067    do
23068      ac_preproc_ok=false
23069for ac_c_preproc_warn_flag in '' yes
23070do
23071  # Use a header file that comes with gcc, so configuring glibc
23072  # with a fresh cross-compiler works.
23073  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23074  # <limits.h> exists even on freestanding compilers.
23075  # On the NeXT, cc -E runs the code through the compiler's parser,
23076  # not just through cpp. "Syntax error" is here to catch this case.
23077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23078/* end confdefs.h.  */
23079#ifdef __STDC__
23080# include <limits.h>
23081#else
23082# include <assert.h>
23083#endif
23084		     Syntax error
23085_ACEOF
23086if ac_fn_c_try_cpp "$LINENO"; then :
23087
23088else
23089  # Broken: fails on valid input.
23090continue
23091fi
23092rm -f conftest.err conftest.i conftest.$ac_ext
23093
23094  # OK, works on sane cases.  Now check whether nonexistent headers
23095  # can be detected and how.
23096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23097/* end confdefs.h.  */
23098#include <ac_nonexistent.h>
23099_ACEOF
23100if ac_fn_c_try_cpp "$LINENO"; then :
23101  # Broken: success on invalid input.
23102continue
23103else
23104  # Passes both tests.
23105ac_preproc_ok=:
23106break
23107fi
23108rm -f conftest.err conftest.i conftest.$ac_ext
23109
23110done
23111# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23112rm -f conftest.i conftest.err conftest.$ac_ext
23113if $ac_preproc_ok; then :
23114  break
23115fi
23116
23117    done
23118    ac_cv_prog_CPP=$CPP
23119
23120fi
23121  CPP=$ac_cv_prog_CPP
23122else
23123  ac_cv_prog_CPP=$CPP
23124fi
23125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23126$as_echo "$CPP" >&6; }
23127ac_preproc_ok=false
23128for ac_c_preproc_warn_flag in '' yes
23129do
23130  # Use a header file that comes with gcc, so configuring glibc
23131  # with a fresh cross-compiler works.
23132  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23133  # <limits.h> exists even on freestanding compilers.
23134  # On the NeXT, cc -E runs the code through the compiler's parser,
23135  # not just through cpp. "Syntax error" is here to catch this case.
23136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23137/* end confdefs.h.  */
23138#ifdef __STDC__
23139# include <limits.h>
23140#else
23141# include <assert.h>
23142#endif
23143		     Syntax error
23144_ACEOF
23145if ac_fn_c_try_cpp "$LINENO"; then :
23146
23147else
23148  # Broken: fails on valid input.
23149continue
23150fi
23151rm -f conftest.err conftest.i conftest.$ac_ext
23152
23153  # OK, works on sane cases.  Now check whether nonexistent headers
23154  # can be detected and how.
23155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23156/* end confdefs.h.  */
23157#include <ac_nonexistent.h>
23158_ACEOF
23159if ac_fn_c_try_cpp "$LINENO"; then :
23160  # Broken: success on invalid input.
23161continue
23162else
23163  # Passes both tests.
23164ac_preproc_ok=:
23165break
23166fi
23167rm -f conftest.err conftest.i conftest.$ac_ext
23168
23169done
23170# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23171rm -f conftest.i conftest.err conftest.$ac_ext
23172if $ac_preproc_ok; then :
23173
23174else
23175  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23177as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23178See \`config.log' for more details" "$LINENO" 5 ; }
23179fi
23180
23181ac_ext=cpp
23182ac_cpp='$CXXCPP $CPPFLAGS'
23183ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23184ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23185ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23186
23187
23188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23189
23190  # First separate the path from the arguments. This will split at the first
23191  # space.
23192  complete="$CPP"
23193  path="${complete%% *}"
23194  tmp="$complete EOL"
23195  arguments="${tmp#* }"
23196
23197  # Input might be given as Windows format, start by converting to
23198  # unix format.
23199  new_path=`$CYGPATH -u "$path"`
23200
23201  # Now try to locate executable using which
23202  new_path=`$WHICH "$new_path" 2> /dev/null`
23203  # bat and cmd files are not always considered executable in cygwin causing which
23204  # to not find them
23205  if test "x$new_path" = x \
23206           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23207           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23208    new_path=`$CYGPATH -u "$path"`
23209  fi
23210  if test "x$new_path" = x; then
23211    # Oops. Which didn't find the executable.
23212    # The splitting of arguments from the executable at a space might have been incorrect,
23213    # since paths with space are more likely in Windows. Give it another try with the whole
23214    # argument.
23215    path="$complete"
23216    arguments="EOL"
23217    new_path=`$CYGPATH -u "$path"`
23218    new_path=`$WHICH "$new_path" 2> /dev/null`
23219    # bat and cmd files are not always considered executable in cygwin causing which
23220    # to not find them
23221    if test "x$new_path" = x \
23222             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23223             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23224      new_path=`$CYGPATH -u "$path"`
23225    fi
23226    if test "x$new_path" = x; then
23227      # It's still not found. Now this is an unrecoverable error.
23228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23229$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23230      has_space=`$ECHO "$complete" | $GREP " "`
23231      if test "x$has_space" != x; then
23232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23234      fi
23235      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23236    fi
23237  fi
23238
23239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23242  # "foo.exe" is OK but "foo" is an error.
23243  #
23244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23245  # It is also a way to make sure we got the proper file name for the real test later on.
23246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23247  if test "x$test_shortpath" = x; then
23248    # Short path failed, file does not exist as specified.
23249    # Try adding .exe or .cmd
23250    if test -f "${new_path}.exe"; then
23251       input_to_shortpath="${new_path}.exe"
23252    elif test -f "${new_path}.cmd"; then
23253       input_to_shortpath="${new_path}.cmd"
23254    else
23255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23256$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23259      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23260    fi
23261  else
23262    input_to_shortpath="$new_path"
23263  fi
23264
23265  # Call helper function which possibly converts this using DOS-style short mode.
23266  # If so, the updated path is stored in $new_path.
23267  new_path="$input_to_shortpath"
23268
23269  input_path="$input_to_shortpath"
23270  # Check if we need to convert this using DOS-style short mode. If the path
23271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23272  # take no chances and rewrite it.
23273  # Note: m4 eats our [], so we need to use [ and ] instead.
23274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23275  if test "x$has_forbidden_chars" != x; then
23276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23280      # Going to short mode and back again did indeed matter. Since short mode is
23281      # case insensitive, let's make it lowercase to improve readability.
23282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23283      # Now convert it back to Unix-stile (cygpath)
23284      input_path=`$CYGPATH -u "$shortmode_path"`
23285      new_path="$input_path"
23286    fi
23287  fi
23288
23289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23290  if test "x$test_cygdrive_prefix" = x; then
23291    # As a simple fix, exclude /usr/bin since it's not a real path.
23292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23294      # a path prefixed by /cygdrive for fixpath to work.
23295      new_path="$CYGWIN_ROOT_PATH$input_path"
23296    fi
23297  fi
23298
23299  # remove trailing .exe if any
23300  new_path="${new_path/%.exe/}"
23301
23302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23303
23304  # First separate the path from the arguments. This will split at the first
23305  # space.
23306  complete="$CPP"
23307  path="${complete%% *}"
23308  tmp="$complete EOL"
23309  arguments="${tmp#* }"
23310
23311  # Input might be given as Windows format, start by converting to
23312  # unix format.
23313  new_path="$path"
23314
23315  windows_path="$new_path"
23316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23317    unix_path=`$CYGPATH -u "$windows_path"`
23318    new_path="$unix_path"
23319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23321    new_path="$unix_path"
23322  fi
23323
23324
23325  # Now try to locate executable using which
23326  new_path=`$WHICH "$new_path" 2> /dev/null`
23327
23328  if test "x$new_path" = x; then
23329    # Oops. Which didn't find the executable.
23330    # The splitting of arguments from the executable at a space might have been incorrect,
23331    # since paths with space are more likely in Windows. Give it another try with the whole
23332    # argument.
23333    path="$complete"
23334    arguments="EOL"
23335    new_path="$path"
23336
23337  windows_path="$new_path"
23338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23339    unix_path=`$CYGPATH -u "$windows_path"`
23340    new_path="$unix_path"
23341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23343    new_path="$unix_path"
23344  fi
23345
23346
23347    new_path=`$WHICH "$new_path" 2> /dev/null`
23348
23349    if test "x$new_path" = x; then
23350      # It's still not found. Now this is an unrecoverable error.
23351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23352$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23353      has_space=`$ECHO "$complete" | $GREP " "`
23354      if test "x$has_space" != x; then
23355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23357      fi
23358      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23359    fi
23360  fi
23361
23362  # Now new_path has a complete unix path to the binary
23363  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23364    # Keep paths in /bin as-is, but remove trailing .exe if any
23365    new_path="${new_path/%.exe/}"
23366    # Do not save /bin paths to all_fixpath_prefixes!
23367  else
23368    # Not in mixed or Windows style, start by that.
23369    new_path=`cmd //c echo $new_path`
23370
23371  input_path="$new_path"
23372  # Check if we need to convert this using DOS-style short mode. If the path
23373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23374  # take no chances and rewrite it.
23375  # Note: m4 eats our [], so we need to use [ and ] instead.
23376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23377  if test "x$has_forbidden_chars" != x; then
23378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23380  fi
23381
23382    # Output is in $new_path
23383
23384  windows_path="$new_path"
23385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23386    unix_path=`$CYGPATH -u "$windows_path"`
23387    new_path="$unix_path"
23388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23390    new_path="$unix_path"
23391  fi
23392
23393    # remove trailing .exe if any
23394    new_path="${new_path/%.exe/}"
23395
23396    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23397    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23398  fi
23399
23400  else
23401    # We're on a posix platform. Hooray! :)
23402    # First separate the path from the arguments. This will split at the first
23403    # space.
23404    complete="$CPP"
23405    path="${complete%% *}"
23406    tmp="$complete EOL"
23407    arguments="${tmp#* }"
23408
23409    new_path=`$WHICH $path 2> /dev/null`
23410    if test "x$new_path" = x; then
23411      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23412      if test "x$is_absolute_path" != x; then
23413        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23414$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23415        new_path="$path"
23416      else
23417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23418$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23419        has_space=`$ECHO "$complete" | $GREP " "`
23420        if test "x$has_space" != x; then
23421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23423        fi
23424        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23425      fi
23426    fi
23427  fi
23428
23429  # Now join together the path and the arguments once again
23430  if test "x$arguments" != xEOL; then
23431      new_complete="$new_path ${arguments% *}"
23432  else
23433      new_complete="$new_path"
23434  fi
23435
23436  if test "x$complete" != "x$new_complete"; then
23437    CPP="$new_complete"
23438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23439$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23440  fi
23441
23442
23443ac_ext=cpp
23444ac_cpp='$CXXCPP $CPPFLAGS'
23445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23449$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23450if test -z "$CXXCPP"; then
23451  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23452  $as_echo_n "(cached) " >&6
23453else
23454      # Double quotes because CXXCPP needs to be expanded
23455    for CXXCPP in "$CXX -E" "/lib/cpp"
23456    do
23457      ac_preproc_ok=false
23458for ac_cxx_preproc_warn_flag in '' yes
23459do
23460  # Use a header file that comes with gcc, so configuring glibc
23461  # with a fresh cross-compiler works.
23462  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23463  # <limits.h> exists even on freestanding compilers.
23464  # On the NeXT, cc -E runs the code through the compiler's parser,
23465  # not just through cpp. "Syntax error" is here to catch this case.
23466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23467/* end confdefs.h.  */
23468#ifdef __STDC__
23469# include <limits.h>
23470#else
23471# include <assert.h>
23472#endif
23473		     Syntax error
23474_ACEOF
23475if ac_fn_cxx_try_cpp "$LINENO"; then :
23476
23477else
23478  # Broken: fails on valid input.
23479continue
23480fi
23481rm -f conftest.err conftest.i conftest.$ac_ext
23482
23483  # OK, works on sane cases.  Now check whether nonexistent headers
23484  # can be detected and how.
23485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23486/* end confdefs.h.  */
23487#include <ac_nonexistent.h>
23488_ACEOF
23489if ac_fn_cxx_try_cpp "$LINENO"; then :
23490  # Broken: success on invalid input.
23491continue
23492else
23493  # Passes both tests.
23494ac_preproc_ok=:
23495break
23496fi
23497rm -f conftest.err conftest.i conftest.$ac_ext
23498
23499done
23500# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23501rm -f conftest.i conftest.err conftest.$ac_ext
23502if $ac_preproc_ok; then :
23503  break
23504fi
23505
23506    done
23507    ac_cv_prog_CXXCPP=$CXXCPP
23508
23509fi
23510  CXXCPP=$ac_cv_prog_CXXCPP
23511else
23512  ac_cv_prog_CXXCPP=$CXXCPP
23513fi
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23515$as_echo "$CXXCPP" >&6; }
23516ac_preproc_ok=false
23517for ac_cxx_preproc_warn_flag in '' yes
23518do
23519  # Use a header file that comes with gcc, so configuring glibc
23520  # with a fresh cross-compiler works.
23521  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23522  # <limits.h> exists even on freestanding compilers.
23523  # On the NeXT, cc -E runs the code through the compiler's parser,
23524  # not just through cpp. "Syntax error" is here to catch this case.
23525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23526/* end confdefs.h.  */
23527#ifdef __STDC__
23528# include <limits.h>
23529#else
23530# include <assert.h>
23531#endif
23532		     Syntax error
23533_ACEOF
23534if ac_fn_cxx_try_cpp "$LINENO"; then :
23535
23536else
23537  # Broken: fails on valid input.
23538continue
23539fi
23540rm -f conftest.err conftest.i conftest.$ac_ext
23541
23542  # OK, works on sane cases.  Now check whether nonexistent headers
23543  # can be detected and how.
23544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23545/* end confdefs.h.  */
23546#include <ac_nonexistent.h>
23547_ACEOF
23548if ac_fn_cxx_try_cpp "$LINENO"; then :
23549  # Broken: success on invalid input.
23550continue
23551else
23552  # Passes both tests.
23553ac_preproc_ok=:
23554break
23555fi
23556rm -f conftest.err conftest.i conftest.$ac_ext
23557
23558done
23559# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23560rm -f conftest.i conftest.err conftest.$ac_ext
23561if $ac_preproc_ok; then :
23562
23563else
23564  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23566as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23567See \`config.log' for more details" "$LINENO" 5 ; }
23568fi
23569
23570ac_ext=cpp
23571ac_cpp='$CXXCPP $CPPFLAGS'
23572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23575
23576
23577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23578
23579  # First separate the path from the arguments. This will split at the first
23580  # space.
23581  complete="$CXXCPP"
23582  path="${complete%% *}"
23583  tmp="$complete EOL"
23584  arguments="${tmp#* }"
23585
23586  # Input might be given as Windows format, start by converting to
23587  # unix format.
23588  new_path=`$CYGPATH -u "$path"`
23589
23590  # Now try to locate executable using which
23591  new_path=`$WHICH "$new_path" 2> /dev/null`
23592  # bat and cmd files are not always considered executable in cygwin causing which
23593  # to not find them
23594  if test "x$new_path" = x \
23595           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23596           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23597    new_path=`$CYGPATH -u "$path"`
23598  fi
23599  if test "x$new_path" = x; then
23600    # Oops. Which didn't find the executable.
23601    # The splitting of arguments from the executable at a space might have been incorrect,
23602    # since paths with space are more likely in Windows. Give it another try with the whole
23603    # argument.
23604    path="$complete"
23605    arguments="EOL"
23606    new_path=`$CYGPATH -u "$path"`
23607    new_path=`$WHICH "$new_path" 2> /dev/null`
23608    # bat and cmd files are not always considered executable in cygwin causing which
23609    # to not find them
23610    if test "x$new_path" = x \
23611             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23612             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23613      new_path=`$CYGPATH -u "$path"`
23614    fi
23615    if test "x$new_path" = x; then
23616      # It's still not found. Now this is an unrecoverable error.
23617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23618$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23619      has_space=`$ECHO "$complete" | $GREP " "`
23620      if test "x$has_space" != x; then
23621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23623      fi
23624      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23625    fi
23626  fi
23627
23628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23631  # "foo.exe" is OK but "foo" is an error.
23632  #
23633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23634  # It is also a way to make sure we got the proper file name for the real test later on.
23635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23636  if test "x$test_shortpath" = x; then
23637    # Short path failed, file does not exist as specified.
23638    # Try adding .exe or .cmd
23639    if test -f "${new_path}.exe"; then
23640       input_to_shortpath="${new_path}.exe"
23641    elif test -f "${new_path}.cmd"; then
23642       input_to_shortpath="${new_path}.cmd"
23643    else
23644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23645$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23646      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23647$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23648      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23649    fi
23650  else
23651    input_to_shortpath="$new_path"
23652  fi
23653
23654  # Call helper function which possibly converts this using DOS-style short mode.
23655  # If so, the updated path is stored in $new_path.
23656  new_path="$input_to_shortpath"
23657
23658  input_path="$input_to_shortpath"
23659  # Check if we need to convert this using DOS-style short mode. If the path
23660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23661  # take no chances and rewrite it.
23662  # Note: m4 eats our [], so we need to use [ and ] instead.
23663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23664  if test "x$has_forbidden_chars" != x; then
23665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23669      # Going to short mode and back again did indeed matter. Since short mode is
23670      # case insensitive, let's make it lowercase to improve readability.
23671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23672      # Now convert it back to Unix-stile (cygpath)
23673      input_path=`$CYGPATH -u "$shortmode_path"`
23674      new_path="$input_path"
23675    fi
23676  fi
23677
23678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23679  if test "x$test_cygdrive_prefix" = x; then
23680    # As a simple fix, exclude /usr/bin since it's not a real path.
23681    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23683      # a path prefixed by /cygdrive for fixpath to work.
23684      new_path="$CYGWIN_ROOT_PATH$input_path"
23685    fi
23686  fi
23687
23688  # remove trailing .exe if any
23689  new_path="${new_path/%.exe/}"
23690
23691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23692
23693  # First separate the path from the arguments. This will split at the first
23694  # space.
23695  complete="$CXXCPP"
23696  path="${complete%% *}"
23697  tmp="$complete EOL"
23698  arguments="${tmp#* }"
23699
23700  # Input might be given as Windows format, start by converting to
23701  # unix format.
23702  new_path="$path"
23703
23704  windows_path="$new_path"
23705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23706    unix_path=`$CYGPATH -u "$windows_path"`
23707    new_path="$unix_path"
23708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23710    new_path="$unix_path"
23711  fi
23712
23713
23714  # Now try to locate executable using which
23715  new_path=`$WHICH "$new_path" 2> /dev/null`
23716
23717  if test "x$new_path" = x; then
23718    # Oops. Which didn't find the executable.
23719    # The splitting of arguments from the executable at a space might have been incorrect,
23720    # since paths with space are more likely in Windows. Give it another try with the whole
23721    # argument.
23722    path="$complete"
23723    arguments="EOL"
23724    new_path="$path"
23725
23726  windows_path="$new_path"
23727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23728    unix_path=`$CYGPATH -u "$windows_path"`
23729    new_path="$unix_path"
23730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23732    new_path="$unix_path"
23733  fi
23734
23735
23736    new_path=`$WHICH "$new_path" 2> /dev/null`
23737
23738    if test "x$new_path" = x; then
23739      # It's still not found. Now this is an unrecoverable error.
23740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23741$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23742      has_space=`$ECHO "$complete" | $GREP " "`
23743      if test "x$has_space" != x; then
23744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23746      fi
23747      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23748    fi
23749  fi
23750
23751  # Now new_path has a complete unix path to the binary
23752  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23753    # Keep paths in /bin as-is, but remove trailing .exe if any
23754    new_path="${new_path/%.exe/}"
23755    # Do not save /bin paths to all_fixpath_prefixes!
23756  else
23757    # Not in mixed or Windows style, start by that.
23758    new_path=`cmd //c echo $new_path`
23759
23760  input_path="$new_path"
23761  # Check if we need to convert this using DOS-style short mode. If the path
23762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23763  # take no chances and rewrite it.
23764  # Note: m4 eats our [], so we need to use [ and ] instead.
23765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23766  if test "x$has_forbidden_chars" != x; then
23767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23769  fi
23770
23771    # Output is in $new_path
23772
23773  windows_path="$new_path"
23774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23775    unix_path=`$CYGPATH -u "$windows_path"`
23776    new_path="$unix_path"
23777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23779    new_path="$unix_path"
23780  fi
23781
23782    # remove trailing .exe if any
23783    new_path="${new_path/%.exe/}"
23784
23785    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23786    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23787  fi
23788
23789  else
23790    # We're on a posix platform. Hooray! :)
23791    # First separate the path from the arguments. This will split at the first
23792    # space.
23793    complete="$CXXCPP"
23794    path="${complete%% *}"
23795    tmp="$complete EOL"
23796    arguments="${tmp#* }"
23797
23798    new_path=`$WHICH $path 2> /dev/null`
23799    if test "x$new_path" = x; then
23800      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23801      if test "x$is_absolute_path" != x; then
23802        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23803$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23804        new_path="$path"
23805      else
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23807$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23808        has_space=`$ECHO "$complete" | $GREP " "`
23809        if test "x$has_space" != x; then
23810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23812        fi
23813        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23814      fi
23815    fi
23816  fi
23817
23818  # Now join together the path and the arguments once again
23819  if test "x$arguments" != xEOL; then
23820      new_complete="$new_path ${arguments% *}"
23821  else
23822      new_complete="$new_path"
23823  fi
23824
23825  if test "x$complete" != "x$new_complete"; then
23826    CXXCPP="$new_complete"
23827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23828$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23829  fi
23830
23831
23832if test "x$COMPILE_TYPE" != "xcross"; then
23833    # If we are not cross compiling, use the same compilers for
23834    # building the build platform executables. The cross-compilation
23835    # case needed to be done earlier, but this can only be done after
23836    # the native tools have been localized.
23837    BUILD_CC="$CC"
23838    BUILD_CXX="$CXX"
23839    BUILD_LD="$LD"
23840fi
23841
23842# for solaris we really need solaris tools, and not gnu equivalent
23843#   these seems to normally reside in /usr/ccs/bin so add that to path before
23844#   starting to probe
23845#
23846#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23847#         so that it can be overriden --with-tools-dir
23848if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23849    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23850fi
23851
23852# Find the right assembler.
23853if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23854    # Extract the first word of "as", so it can be a program name with args.
23855set dummy as; ac_word=$2
23856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23857$as_echo_n "checking for $ac_word... " >&6; }
23858if test "${ac_cv_path_AS+set}" = set; then :
23859  $as_echo_n "(cached) " >&6
23860else
23861  case $AS in
23862  [\\/]* | ?:[\\/]*)
23863  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23864  ;;
23865  *)
23866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23867for as_dir in $PATH
23868do
23869  IFS=$as_save_IFS
23870  test -z "$as_dir" && as_dir=.
23871    for ac_exec_ext in '' $ac_executable_extensions; do
23872  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23873    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23875    break 2
23876  fi
23877done
23878  done
23879IFS=$as_save_IFS
23880
23881  ;;
23882esac
23883fi
23884AS=$ac_cv_path_AS
23885if test -n "$AS"; then
23886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23887$as_echo "$AS" >&6; }
23888else
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23890$as_echo "no" >&6; }
23891fi
23892
23893
23894
23895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23896
23897  # First separate the path from the arguments. This will split at the first
23898  # space.
23899  complete="$AS"
23900  path="${complete%% *}"
23901  tmp="$complete EOL"
23902  arguments="${tmp#* }"
23903
23904  # Input might be given as Windows format, start by converting to
23905  # unix format.
23906  new_path=`$CYGPATH -u "$path"`
23907
23908  # Now try to locate executable using which
23909  new_path=`$WHICH "$new_path" 2> /dev/null`
23910  # bat and cmd files are not always considered executable in cygwin causing which
23911  # to not find them
23912  if test "x$new_path" = x \
23913           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23914           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23915    new_path=`$CYGPATH -u "$path"`
23916  fi
23917  if test "x$new_path" = x; then
23918    # Oops. Which didn't find the executable.
23919    # The splitting of arguments from the executable at a space might have been incorrect,
23920    # since paths with space are more likely in Windows. Give it another try with the whole
23921    # argument.
23922    path="$complete"
23923    arguments="EOL"
23924    new_path=`$CYGPATH -u "$path"`
23925    new_path=`$WHICH "$new_path" 2> /dev/null`
23926    # bat and cmd files are not always considered executable in cygwin causing which
23927    # to not find them
23928    if test "x$new_path" = x \
23929             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23930             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23931      new_path=`$CYGPATH -u "$path"`
23932    fi
23933    if test "x$new_path" = x; then
23934      # It's still not found. Now this is an unrecoverable error.
23935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23936$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23937      has_space=`$ECHO "$complete" | $GREP " "`
23938      if test "x$has_space" != x; then
23939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23941      fi
23942      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23943    fi
23944  fi
23945
23946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23949  # "foo.exe" is OK but "foo" is an error.
23950  #
23951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23952  # It is also a way to make sure we got the proper file name for the real test later on.
23953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23954  if test "x$test_shortpath" = x; then
23955    # Short path failed, file does not exist as specified.
23956    # Try adding .exe or .cmd
23957    if test -f "${new_path}.exe"; then
23958       input_to_shortpath="${new_path}.exe"
23959    elif test -f "${new_path}.cmd"; then
23960       input_to_shortpath="${new_path}.cmd"
23961    else
23962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23963$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23964      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23965$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23966      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23967    fi
23968  else
23969    input_to_shortpath="$new_path"
23970  fi
23971
23972  # Call helper function which possibly converts this using DOS-style short mode.
23973  # If so, the updated path is stored in $new_path.
23974  new_path="$input_to_shortpath"
23975
23976  input_path="$input_to_shortpath"
23977  # Check if we need to convert this using DOS-style short mode. If the path
23978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23979  # take no chances and rewrite it.
23980  # Note: m4 eats our [], so we need to use [ and ] instead.
23981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23982  if test "x$has_forbidden_chars" != x; then
23983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23987      # Going to short mode and back again did indeed matter. Since short mode is
23988      # case insensitive, let's make it lowercase to improve readability.
23989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23990      # Now convert it back to Unix-stile (cygpath)
23991      input_path=`$CYGPATH -u "$shortmode_path"`
23992      new_path="$input_path"
23993    fi
23994  fi
23995
23996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23997  if test "x$test_cygdrive_prefix" = x; then
23998    # As a simple fix, exclude /usr/bin since it's not a real path.
23999    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24001      # a path prefixed by /cygdrive for fixpath to work.
24002      new_path="$CYGWIN_ROOT_PATH$input_path"
24003    fi
24004  fi
24005
24006  # remove trailing .exe if any
24007  new_path="${new_path/%.exe/}"
24008
24009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24010
24011  # First separate the path from the arguments. This will split at the first
24012  # space.
24013  complete="$AS"
24014  path="${complete%% *}"
24015  tmp="$complete EOL"
24016  arguments="${tmp#* }"
24017
24018  # Input might be given as Windows format, start by converting to
24019  # unix format.
24020  new_path="$path"
24021
24022  windows_path="$new_path"
24023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24024    unix_path=`$CYGPATH -u "$windows_path"`
24025    new_path="$unix_path"
24026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24028    new_path="$unix_path"
24029  fi
24030
24031
24032  # Now try to locate executable using which
24033  new_path=`$WHICH "$new_path" 2> /dev/null`
24034
24035  if test "x$new_path" = x; then
24036    # Oops. Which didn't find the executable.
24037    # The splitting of arguments from the executable at a space might have been incorrect,
24038    # since paths with space are more likely in Windows. Give it another try with the whole
24039    # argument.
24040    path="$complete"
24041    arguments="EOL"
24042    new_path="$path"
24043
24044  windows_path="$new_path"
24045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24046    unix_path=`$CYGPATH -u "$windows_path"`
24047    new_path="$unix_path"
24048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24050    new_path="$unix_path"
24051  fi
24052
24053
24054    new_path=`$WHICH "$new_path" 2> /dev/null`
24055
24056    if test "x$new_path" = x; then
24057      # It's still not found. Now this is an unrecoverable error.
24058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24059$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24060      has_space=`$ECHO "$complete" | $GREP " "`
24061      if test "x$has_space" != x; then
24062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24064      fi
24065      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24066    fi
24067  fi
24068
24069  # Now new_path has a complete unix path to the binary
24070  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24071    # Keep paths in /bin as-is, but remove trailing .exe if any
24072    new_path="${new_path/%.exe/}"
24073    # Do not save /bin paths to all_fixpath_prefixes!
24074  else
24075    # Not in mixed or Windows style, start by that.
24076    new_path=`cmd //c echo $new_path`
24077
24078  input_path="$new_path"
24079  # Check if we need to convert this using DOS-style short mode. If the path
24080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24081  # take no chances and rewrite it.
24082  # Note: m4 eats our [], so we need to use [ and ] instead.
24083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24084  if test "x$has_forbidden_chars" != x; then
24085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24087  fi
24088
24089    # Output is in $new_path
24090
24091  windows_path="$new_path"
24092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24093    unix_path=`$CYGPATH -u "$windows_path"`
24094    new_path="$unix_path"
24095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24097    new_path="$unix_path"
24098  fi
24099
24100    # remove trailing .exe if any
24101    new_path="${new_path/%.exe/}"
24102
24103    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24104    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24105  fi
24106
24107  else
24108    # We're on a posix platform. Hooray! :)
24109    # First separate the path from the arguments. This will split at the first
24110    # space.
24111    complete="$AS"
24112    path="${complete%% *}"
24113    tmp="$complete EOL"
24114    arguments="${tmp#* }"
24115
24116    new_path=`$WHICH $path 2> /dev/null`
24117    if test "x$new_path" = x; then
24118      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24119      if test "x$is_absolute_path" != x; then
24120        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
24121$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
24122        new_path="$path"
24123      else
24124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24125$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24126        has_space=`$ECHO "$complete" | $GREP " "`
24127        if test "x$has_space" != x; then
24128          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24129$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24130        fi
24131        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24132      fi
24133    fi
24134  fi
24135
24136  # Now join together the path and the arguments once again
24137  if test "x$arguments" != xEOL; then
24138      new_complete="$new_path ${arguments% *}"
24139  else
24140      new_complete="$new_path"
24141  fi
24142
24143  if test "x$complete" != "x$new_complete"; then
24144    AS="$new_complete"
24145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24146$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24147  fi
24148
24149else
24150    AS="$CC -c"
24151fi
24152
24153
24154if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24155    for ac_prog in gnm nm
24156do
24157  # Extract the first word of "$ac_prog", so it can be a program name with args.
24158set dummy $ac_prog; ac_word=$2
24159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24160$as_echo_n "checking for $ac_word... " >&6; }
24161if test "${ac_cv_path_NM+set}" = set; then :
24162  $as_echo_n "(cached) " >&6
24163else
24164  case $NM in
24165  [\\/]* | ?:[\\/]*)
24166  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24167  ;;
24168  *)
24169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24170for as_dir in $PATH
24171do
24172  IFS=$as_save_IFS
24173  test -z "$as_dir" && as_dir=.
24174    for ac_exec_ext in '' $ac_executable_extensions; do
24175  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24176    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24178    break 2
24179  fi
24180done
24181  done
24182IFS=$as_save_IFS
24183
24184  ;;
24185esac
24186fi
24187NM=$ac_cv_path_NM
24188if test -n "$NM"; then
24189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24190$as_echo "$NM" >&6; }
24191else
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24193$as_echo "no" >&6; }
24194fi
24195
24196
24197  test -n "$NM" && break
24198done
24199
24200
24201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24202
24203  # First separate the path from the arguments. This will split at the first
24204  # space.
24205  complete="$NM"
24206  path="${complete%% *}"
24207  tmp="$complete EOL"
24208  arguments="${tmp#* }"
24209
24210  # Input might be given as Windows format, start by converting to
24211  # unix format.
24212  new_path=`$CYGPATH -u "$path"`
24213
24214  # Now try to locate executable using which
24215  new_path=`$WHICH "$new_path" 2> /dev/null`
24216  # bat and cmd files are not always considered executable in cygwin causing which
24217  # to not find them
24218  if test "x$new_path" = x \
24219           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24220           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24221    new_path=`$CYGPATH -u "$path"`
24222  fi
24223  if test "x$new_path" = x; then
24224    # Oops. Which didn't find the executable.
24225    # The splitting of arguments from the executable at a space might have been incorrect,
24226    # since paths with space are more likely in Windows. Give it another try with the whole
24227    # argument.
24228    path="$complete"
24229    arguments="EOL"
24230    new_path=`$CYGPATH -u "$path"`
24231    new_path=`$WHICH "$new_path" 2> /dev/null`
24232    # bat and cmd files are not always considered executable in cygwin causing which
24233    # to not find them
24234    if test "x$new_path" = x \
24235             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24236             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24237      new_path=`$CYGPATH -u "$path"`
24238    fi
24239    if test "x$new_path" = x; then
24240      # It's still not found. Now this is an unrecoverable error.
24241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24242$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24243      has_space=`$ECHO "$complete" | $GREP " "`
24244      if test "x$has_space" != x; then
24245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24247      fi
24248      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24249    fi
24250  fi
24251
24252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24255  # "foo.exe" is OK but "foo" is an error.
24256  #
24257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24258  # It is also a way to make sure we got the proper file name for the real test later on.
24259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24260  if test "x$test_shortpath" = x; then
24261    # Short path failed, file does not exist as specified.
24262    # Try adding .exe or .cmd
24263    if test -f "${new_path}.exe"; then
24264       input_to_shortpath="${new_path}.exe"
24265    elif test -f "${new_path}.cmd"; then
24266       input_to_shortpath="${new_path}.cmd"
24267    else
24268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24269$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24272      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24273    fi
24274  else
24275    input_to_shortpath="$new_path"
24276  fi
24277
24278  # Call helper function which possibly converts this using DOS-style short mode.
24279  # If so, the updated path is stored in $new_path.
24280  new_path="$input_to_shortpath"
24281
24282  input_path="$input_to_shortpath"
24283  # Check if we need to convert this using DOS-style short mode. If the path
24284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24285  # take no chances and rewrite it.
24286  # Note: m4 eats our [], so we need to use [ and ] instead.
24287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24288  if test "x$has_forbidden_chars" != x; then
24289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24293      # Going to short mode and back again did indeed matter. Since short mode is
24294      # case insensitive, let's make it lowercase to improve readability.
24295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24296      # Now convert it back to Unix-stile (cygpath)
24297      input_path=`$CYGPATH -u "$shortmode_path"`
24298      new_path="$input_path"
24299    fi
24300  fi
24301
24302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24303  if test "x$test_cygdrive_prefix" = x; then
24304    # As a simple fix, exclude /usr/bin since it's not a real path.
24305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24307      # a path prefixed by /cygdrive for fixpath to work.
24308      new_path="$CYGWIN_ROOT_PATH$input_path"
24309    fi
24310  fi
24311
24312  # remove trailing .exe if any
24313  new_path="${new_path/%.exe/}"
24314
24315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24316
24317  # First separate the path from the arguments. This will split at the first
24318  # space.
24319  complete="$NM"
24320  path="${complete%% *}"
24321  tmp="$complete EOL"
24322  arguments="${tmp#* }"
24323
24324  # Input might be given as Windows format, start by converting to
24325  # unix format.
24326  new_path="$path"
24327
24328  windows_path="$new_path"
24329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24330    unix_path=`$CYGPATH -u "$windows_path"`
24331    new_path="$unix_path"
24332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24334    new_path="$unix_path"
24335  fi
24336
24337
24338  # Now try to locate executable using which
24339  new_path=`$WHICH "$new_path" 2> /dev/null`
24340
24341  if test "x$new_path" = x; then
24342    # Oops. Which didn't find the executable.
24343    # The splitting of arguments from the executable at a space might have been incorrect,
24344    # since paths with space are more likely in Windows. Give it another try with the whole
24345    # argument.
24346    path="$complete"
24347    arguments="EOL"
24348    new_path="$path"
24349
24350  windows_path="$new_path"
24351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24352    unix_path=`$CYGPATH -u "$windows_path"`
24353    new_path="$unix_path"
24354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24356    new_path="$unix_path"
24357  fi
24358
24359
24360    new_path=`$WHICH "$new_path" 2> /dev/null`
24361
24362    if test "x$new_path" = x; then
24363      # It's still not found. Now this is an unrecoverable error.
24364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24365$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24366      has_space=`$ECHO "$complete" | $GREP " "`
24367      if test "x$has_space" != x; then
24368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24370      fi
24371      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24372    fi
24373  fi
24374
24375  # Now new_path has a complete unix path to the binary
24376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24377    # Keep paths in /bin as-is, but remove trailing .exe if any
24378    new_path="${new_path/%.exe/}"
24379    # Do not save /bin paths to all_fixpath_prefixes!
24380  else
24381    # Not in mixed or Windows style, start by that.
24382    new_path=`cmd //c echo $new_path`
24383
24384  input_path="$new_path"
24385  # Check if we need to convert this using DOS-style short mode. If the path
24386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24387  # take no chances and rewrite it.
24388  # Note: m4 eats our [], so we need to use [ and ] instead.
24389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24390  if test "x$has_forbidden_chars" != x; then
24391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24393  fi
24394
24395    # Output is in $new_path
24396
24397  windows_path="$new_path"
24398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24399    unix_path=`$CYGPATH -u "$windows_path"`
24400    new_path="$unix_path"
24401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24403    new_path="$unix_path"
24404  fi
24405
24406    # remove trailing .exe if any
24407    new_path="${new_path/%.exe/}"
24408
24409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24411  fi
24412
24413  else
24414    # We're on a posix platform. Hooray! :)
24415    # First separate the path from the arguments. This will split at the first
24416    # space.
24417    complete="$NM"
24418    path="${complete%% *}"
24419    tmp="$complete EOL"
24420    arguments="${tmp#* }"
24421
24422    new_path=`$WHICH $path 2> /dev/null`
24423    if test "x$new_path" = x; then
24424      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24425      if test "x$is_absolute_path" != x; then
24426        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24427$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24428        new_path="$path"
24429      else
24430        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24431$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24432        has_space=`$ECHO "$complete" | $GREP " "`
24433        if test "x$has_space" != x; then
24434          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24435$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24436        fi
24437        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24438      fi
24439    fi
24440  fi
24441
24442  # Now join together the path and the arguments once again
24443  if test "x$arguments" != xEOL; then
24444      new_complete="$new_path ${arguments% *}"
24445  else
24446      new_complete="$new_path"
24447  fi
24448
24449  if test "x$complete" != "x$new_complete"; then
24450    NM="$new_complete"
24451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24452$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24453  fi
24454
24455    # Extract the first word of "strip", so it can be a program name with args.
24456set dummy strip; ac_word=$2
24457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24458$as_echo_n "checking for $ac_word... " >&6; }
24459if test "${ac_cv_path_STRIP+set}" = set; then :
24460  $as_echo_n "(cached) " >&6
24461else
24462  case $STRIP in
24463  [\\/]* | ?:[\\/]*)
24464  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24465  ;;
24466  *)
24467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24468for as_dir in $PATH
24469do
24470  IFS=$as_save_IFS
24471  test -z "$as_dir" && as_dir=.
24472    for ac_exec_ext in '' $ac_executable_extensions; do
24473  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24474    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24476    break 2
24477  fi
24478done
24479  done
24480IFS=$as_save_IFS
24481
24482  ;;
24483esac
24484fi
24485STRIP=$ac_cv_path_STRIP
24486if test -n "$STRIP"; then
24487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24488$as_echo "$STRIP" >&6; }
24489else
24490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24491$as_echo "no" >&6; }
24492fi
24493
24494
24495
24496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24497
24498  # First separate the path from the arguments. This will split at the first
24499  # space.
24500  complete="$STRIP"
24501  path="${complete%% *}"
24502  tmp="$complete EOL"
24503  arguments="${tmp#* }"
24504
24505  # Input might be given as Windows format, start by converting to
24506  # unix format.
24507  new_path=`$CYGPATH -u "$path"`
24508
24509  # Now try to locate executable using which
24510  new_path=`$WHICH "$new_path" 2> /dev/null`
24511  # bat and cmd files are not always considered executable in cygwin causing which
24512  # to not find them
24513  if test "x$new_path" = x \
24514           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24515           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24516    new_path=`$CYGPATH -u "$path"`
24517  fi
24518  if test "x$new_path" = x; then
24519    # Oops. Which didn't find the executable.
24520    # The splitting of arguments from the executable at a space might have been incorrect,
24521    # since paths with space are more likely in Windows. Give it another try with the whole
24522    # argument.
24523    path="$complete"
24524    arguments="EOL"
24525    new_path=`$CYGPATH -u "$path"`
24526    new_path=`$WHICH "$new_path" 2> /dev/null`
24527    # bat and cmd files are not always considered executable in cygwin causing which
24528    # to not find them
24529    if test "x$new_path" = x \
24530             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24531             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24532      new_path=`$CYGPATH -u "$path"`
24533    fi
24534    if test "x$new_path" = x; then
24535      # It's still not found. Now this is an unrecoverable error.
24536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24537$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24538      has_space=`$ECHO "$complete" | $GREP " "`
24539      if test "x$has_space" != x; then
24540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24542      fi
24543      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24544    fi
24545  fi
24546
24547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24550  # "foo.exe" is OK but "foo" is an error.
24551  #
24552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24553  # It is also a way to make sure we got the proper file name for the real test later on.
24554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24555  if test "x$test_shortpath" = x; then
24556    # Short path failed, file does not exist as specified.
24557    # Try adding .exe or .cmd
24558    if test -f "${new_path}.exe"; then
24559       input_to_shortpath="${new_path}.exe"
24560    elif test -f "${new_path}.cmd"; then
24561       input_to_shortpath="${new_path}.cmd"
24562    else
24563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24564$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24565      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24566$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24567      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24568    fi
24569  else
24570    input_to_shortpath="$new_path"
24571  fi
24572
24573  # Call helper function which possibly converts this using DOS-style short mode.
24574  # If so, the updated path is stored in $new_path.
24575  new_path="$input_to_shortpath"
24576
24577  input_path="$input_to_shortpath"
24578  # Check if we need to convert this using DOS-style short mode. If the path
24579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24580  # take no chances and rewrite it.
24581  # Note: m4 eats our [], so we need to use [ and ] instead.
24582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24583  if test "x$has_forbidden_chars" != x; then
24584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24588      # Going to short mode and back again did indeed matter. Since short mode is
24589      # case insensitive, let's make it lowercase to improve readability.
24590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24591      # Now convert it back to Unix-stile (cygpath)
24592      input_path=`$CYGPATH -u "$shortmode_path"`
24593      new_path="$input_path"
24594    fi
24595  fi
24596
24597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24598  if test "x$test_cygdrive_prefix" = x; then
24599    # As a simple fix, exclude /usr/bin since it's not a real path.
24600    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24602      # a path prefixed by /cygdrive for fixpath to work.
24603      new_path="$CYGWIN_ROOT_PATH$input_path"
24604    fi
24605  fi
24606
24607  # remove trailing .exe if any
24608  new_path="${new_path/%.exe/}"
24609
24610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24611
24612  # First separate the path from the arguments. This will split at the first
24613  # space.
24614  complete="$STRIP"
24615  path="${complete%% *}"
24616  tmp="$complete EOL"
24617  arguments="${tmp#* }"
24618
24619  # Input might be given as Windows format, start by converting to
24620  # unix format.
24621  new_path="$path"
24622
24623  windows_path="$new_path"
24624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24625    unix_path=`$CYGPATH -u "$windows_path"`
24626    new_path="$unix_path"
24627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24629    new_path="$unix_path"
24630  fi
24631
24632
24633  # Now try to locate executable using which
24634  new_path=`$WHICH "$new_path" 2> /dev/null`
24635
24636  if test "x$new_path" = x; then
24637    # Oops. Which didn't find the executable.
24638    # The splitting of arguments from the executable at a space might have been incorrect,
24639    # since paths with space are more likely in Windows. Give it another try with the whole
24640    # argument.
24641    path="$complete"
24642    arguments="EOL"
24643    new_path="$path"
24644
24645  windows_path="$new_path"
24646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24647    unix_path=`$CYGPATH -u "$windows_path"`
24648    new_path="$unix_path"
24649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24651    new_path="$unix_path"
24652  fi
24653
24654
24655    new_path=`$WHICH "$new_path" 2> /dev/null`
24656
24657    if test "x$new_path" = x; then
24658      # It's still not found. Now this is an unrecoverable error.
24659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24660$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24661      has_space=`$ECHO "$complete" | $GREP " "`
24662      if test "x$has_space" != x; then
24663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24665      fi
24666      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24667    fi
24668  fi
24669
24670  # Now new_path has a complete unix path to the binary
24671  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24672    # Keep paths in /bin as-is, but remove trailing .exe if any
24673    new_path="${new_path/%.exe/}"
24674    # Do not save /bin paths to all_fixpath_prefixes!
24675  else
24676    # Not in mixed or Windows style, start by that.
24677    new_path=`cmd //c echo $new_path`
24678
24679  input_path="$new_path"
24680  # Check if we need to convert this using DOS-style short mode. If the path
24681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24682  # take no chances and rewrite it.
24683  # Note: m4 eats our [], so we need to use [ and ] instead.
24684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24685  if test "x$has_forbidden_chars" != x; then
24686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24688  fi
24689
24690    # Output is in $new_path
24691
24692  windows_path="$new_path"
24693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24694    unix_path=`$CYGPATH -u "$windows_path"`
24695    new_path="$unix_path"
24696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24698    new_path="$unix_path"
24699  fi
24700
24701    # remove trailing .exe if any
24702    new_path="${new_path/%.exe/}"
24703
24704    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24705    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24706  fi
24707
24708  else
24709    # We're on a posix platform. Hooray! :)
24710    # First separate the path from the arguments. This will split at the first
24711    # space.
24712    complete="$STRIP"
24713    path="${complete%% *}"
24714    tmp="$complete EOL"
24715    arguments="${tmp#* }"
24716
24717    new_path=`$WHICH $path 2> /dev/null`
24718    if test "x$new_path" = x; then
24719      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24720      if test "x$is_absolute_path" != x; then
24721        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24722$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24723        new_path="$path"
24724      else
24725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24726$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24727        has_space=`$ECHO "$complete" | $GREP " "`
24728        if test "x$has_space" != x; then
24729          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24731        fi
24732        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24733      fi
24734    fi
24735  fi
24736
24737  # Now join together the path and the arguments once again
24738  if test "x$arguments" != xEOL; then
24739      new_complete="$new_path ${arguments% *}"
24740  else
24741      new_complete="$new_path"
24742  fi
24743
24744  if test "x$complete" != "x$new_complete"; then
24745    STRIP="$new_complete"
24746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24747$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24748  fi
24749
24750    # Extract the first word of "mcs", so it can be a program name with args.
24751set dummy mcs; ac_word=$2
24752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24753$as_echo_n "checking for $ac_word... " >&6; }
24754if test "${ac_cv_path_MCS+set}" = set; then :
24755  $as_echo_n "(cached) " >&6
24756else
24757  case $MCS in
24758  [\\/]* | ?:[\\/]*)
24759  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24760  ;;
24761  *)
24762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24763for as_dir in $PATH
24764do
24765  IFS=$as_save_IFS
24766  test -z "$as_dir" && as_dir=.
24767    for ac_exec_ext in '' $ac_executable_extensions; do
24768  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24769    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24771    break 2
24772  fi
24773done
24774  done
24775IFS=$as_save_IFS
24776
24777  ;;
24778esac
24779fi
24780MCS=$ac_cv_path_MCS
24781if test -n "$MCS"; then
24782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24783$as_echo "$MCS" >&6; }
24784else
24785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24786$as_echo "no" >&6; }
24787fi
24788
24789
24790
24791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24792
24793  # First separate the path from the arguments. This will split at the first
24794  # space.
24795  complete="$MCS"
24796  path="${complete%% *}"
24797  tmp="$complete EOL"
24798  arguments="${tmp#* }"
24799
24800  # Input might be given as Windows format, start by converting to
24801  # unix format.
24802  new_path=`$CYGPATH -u "$path"`
24803
24804  # Now try to locate executable using which
24805  new_path=`$WHICH "$new_path" 2> /dev/null`
24806  # bat and cmd files are not always considered executable in cygwin causing which
24807  # to not find them
24808  if test "x$new_path" = x \
24809           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24810           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24811    new_path=`$CYGPATH -u "$path"`
24812  fi
24813  if test "x$new_path" = x; then
24814    # Oops. Which didn't find the executable.
24815    # The splitting of arguments from the executable at a space might have been incorrect,
24816    # since paths with space are more likely in Windows. Give it another try with the whole
24817    # argument.
24818    path="$complete"
24819    arguments="EOL"
24820    new_path=`$CYGPATH -u "$path"`
24821    new_path=`$WHICH "$new_path" 2> /dev/null`
24822    # bat and cmd files are not always considered executable in cygwin causing which
24823    # to not find them
24824    if test "x$new_path" = x \
24825             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24826             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24827      new_path=`$CYGPATH -u "$path"`
24828    fi
24829    if test "x$new_path" = x; then
24830      # It's still not found. Now this is an unrecoverable error.
24831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24832$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24833      has_space=`$ECHO "$complete" | $GREP " "`
24834      if test "x$has_space" != x; then
24835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24837      fi
24838      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24839    fi
24840  fi
24841
24842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24845  # "foo.exe" is OK but "foo" is an error.
24846  #
24847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24848  # It is also a way to make sure we got the proper file name for the real test later on.
24849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24850  if test "x$test_shortpath" = x; then
24851    # Short path failed, file does not exist as specified.
24852    # Try adding .exe or .cmd
24853    if test -f "${new_path}.exe"; then
24854       input_to_shortpath="${new_path}.exe"
24855    elif test -f "${new_path}.cmd"; then
24856       input_to_shortpath="${new_path}.cmd"
24857    else
24858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24859$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24860      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24861$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24862      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24863    fi
24864  else
24865    input_to_shortpath="$new_path"
24866  fi
24867
24868  # Call helper function which possibly converts this using DOS-style short mode.
24869  # If so, the updated path is stored in $new_path.
24870  new_path="$input_to_shortpath"
24871
24872  input_path="$input_to_shortpath"
24873  # Check if we need to convert this using DOS-style short mode. If the path
24874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24875  # take no chances and rewrite it.
24876  # Note: m4 eats our [], so we need to use [ and ] instead.
24877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24878  if test "x$has_forbidden_chars" != x; then
24879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24883      # Going to short mode and back again did indeed matter. Since short mode is
24884      # case insensitive, let's make it lowercase to improve readability.
24885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24886      # Now convert it back to Unix-stile (cygpath)
24887      input_path=`$CYGPATH -u "$shortmode_path"`
24888      new_path="$input_path"
24889    fi
24890  fi
24891
24892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24893  if test "x$test_cygdrive_prefix" = x; then
24894    # As a simple fix, exclude /usr/bin since it's not a real path.
24895    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24897      # a path prefixed by /cygdrive for fixpath to work.
24898      new_path="$CYGWIN_ROOT_PATH$input_path"
24899    fi
24900  fi
24901
24902  # remove trailing .exe if any
24903  new_path="${new_path/%.exe/}"
24904
24905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24906
24907  # First separate the path from the arguments. This will split at the first
24908  # space.
24909  complete="$MCS"
24910  path="${complete%% *}"
24911  tmp="$complete EOL"
24912  arguments="${tmp#* }"
24913
24914  # Input might be given as Windows format, start by converting to
24915  # unix format.
24916  new_path="$path"
24917
24918  windows_path="$new_path"
24919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24920    unix_path=`$CYGPATH -u "$windows_path"`
24921    new_path="$unix_path"
24922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24924    new_path="$unix_path"
24925  fi
24926
24927
24928  # Now try to locate executable using which
24929  new_path=`$WHICH "$new_path" 2> /dev/null`
24930
24931  if test "x$new_path" = x; then
24932    # Oops. Which didn't find the executable.
24933    # The splitting of arguments from the executable at a space might have been incorrect,
24934    # since paths with space are more likely in Windows. Give it another try with the whole
24935    # argument.
24936    path="$complete"
24937    arguments="EOL"
24938    new_path="$path"
24939
24940  windows_path="$new_path"
24941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24942    unix_path=`$CYGPATH -u "$windows_path"`
24943    new_path="$unix_path"
24944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24946    new_path="$unix_path"
24947  fi
24948
24949
24950    new_path=`$WHICH "$new_path" 2> /dev/null`
24951
24952    if test "x$new_path" = x; then
24953      # It's still not found. Now this is an unrecoverable error.
24954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24955$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24956      has_space=`$ECHO "$complete" | $GREP " "`
24957      if test "x$has_space" != x; then
24958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24960      fi
24961      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24962    fi
24963  fi
24964
24965  # Now new_path has a complete unix path to the binary
24966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24967    # Keep paths in /bin as-is, but remove trailing .exe if any
24968    new_path="${new_path/%.exe/}"
24969    # Do not save /bin paths to all_fixpath_prefixes!
24970  else
24971    # Not in mixed or Windows style, start by that.
24972    new_path=`cmd //c echo $new_path`
24973
24974  input_path="$new_path"
24975  # Check if we need to convert this using DOS-style short mode. If the path
24976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24977  # take no chances and rewrite it.
24978  # Note: m4 eats our [], so we need to use [ and ] instead.
24979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24980  if test "x$has_forbidden_chars" != x; then
24981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24983  fi
24984
24985    # Output is in $new_path
24986
24987  windows_path="$new_path"
24988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24989    unix_path=`$CYGPATH -u "$windows_path"`
24990    new_path="$unix_path"
24991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24993    new_path="$unix_path"
24994  fi
24995
24996    # remove trailing .exe if any
24997    new_path="${new_path/%.exe/}"
24998
24999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25001  fi
25002
25003  else
25004    # We're on a posix platform. Hooray! :)
25005    # First separate the path from the arguments. This will split at the first
25006    # space.
25007    complete="$MCS"
25008    path="${complete%% *}"
25009    tmp="$complete EOL"
25010    arguments="${tmp#* }"
25011
25012    new_path=`$WHICH $path 2> /dev/null`
25013    if test "x$new_path" = x; then
25014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25015      if test "x$is_absolute_path" != x; then
25016        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
25017$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
25018        new_path="$path"
25019      else
25020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25021$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25022        has_space=`$ECHO "$complete" | $GREP " "`
25023        if test "x$has_space" != x; then
25024          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25025$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25026        fi
25027        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25028      fi
25029    fi
25030  fi
25031
25032  # Now join together the path and the arguments once again
25033  if test "x$arguments" != xEOL; then
25034      new_complete="$new_path ${arguments% *}"
25035  else
25036      new_complete="$new_path"
25037  fi
25038
25039  if test "x$complete" != "x$new_complete"; then
25040    MCS="$new_complete"
25041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25042$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25043  fi
25044
25045elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25046    if test -n "$ac_tool_prefix"; then
25047  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25048set dummy ${ac_tool_prefix}nm; ac_word=$2
25049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25050$as_echo_n "checking for $ac_word... " >&6; }
25051if test "${ac_cv_prog_NM+set}" = set; then :
25052  $as_echo_n "(cached) " >&6
25053else
25054  if test -n "$NM"; then
25055  ac_cv_prog_NM="$NM" # Let the user override the test.
25056else
25057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25058for as_dir in $PATH
25059do
25060  IFS=$as_save_IFS
25061  test -z "$as_dir" && as_dir=.
25062    for ac_exec_ext in '' $ac_executable_extensions; do
25063  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25064    ac_cv_prog_NM="${ac_tool_prefix}nm"
25065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25066    break 2
25067  fi
25068done
25069  done
25070IFS=$as_save_IFS
25071
25072fi
25073fi
25074NM=$ac_cv_prog_NM
25075if test -n "$NM"; then
25076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25077$as_echo "$NM" >&6; }
25078else
25079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25080$as_echo "no" >&6; }
25081fi
25082
25083
25084fi
25085if test -z "$ac_cv_prog_NM"; then
25086  ac_ct_NM=$NM
25087  # Extract the first word of "nm", so it can be a program name with args.
25088set dummy nm; ac_word=$2
25089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25090$as_echo_n "checking for $ac_word... " >&6; }
25091if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25092  $as_echo_n "(cached) " >&6
25093else
25094  if test -n "$ac_ct_NM"; then
25095  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25096else
25097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25098for as_dir in $PATH
25099do
25100  IFS=$as_save_IFS
25101  test -z "$as_dir" && as_dir=.
25102    for ac_exec_ext in '' $ac_executable_extensions; do
25103  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25104    ac_cv_prog_ac_ct_NM="nm"
25105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25106    break 2
25107  fi
25108done
25109  done
25110IFS=$as_save_IFS
25111
25112fi
25113fi
25114ac_ct_NM=$ac_cv_prog_ac_ct_NM
25115if test -n "$ac_ct_NM"; then
25116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25117$as_echo "$ac_ct_NM" >&6; }
25118else
25119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25120$as_echo "no" >&6; }
25121fi
25122
25123  if test "x$ac_ct_NM" = x; then
25124    NM=""
25125  else
25126    case $cross_compiling:$ac_tool_warned in
25127yes:)
25128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25130ac_tool_warned=yes ;;
25131esac
25132    NM=$ac_ct_NM
25133  fi
25134else
25135  NM="$ac_cv_prog_NM"
25136fi
25137
25138
25139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25140
25141  # First separate the path from the arguments. This will split at the first
25142  # space.
25143  complete="$NM"
25144  path="${complete%% *}"
25145  tmp="$complete EOL"
25146  arguments="${tmp#* }"
25147
25148  # Input might be given as Windows format, start by converting to
25149  # unix format.
25150  new_path=`$CYGPATH -u "$path"`
25151
25152  # Now try to locate executable using which
25153  new_path=`$WHICH "$new_path" 2> /dev/null`
25154  # bat and cmd files are not always considered executable in cygwin causing which
25155  # to not find them
25156  if test "x$new_path" = x \
25157           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25158           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25159    new_path=`$CYGPATH -u "$path"`
25160  fi
25161  if test "x$new_path" = x; then
25162    # Oops. Which didn't find the executable.
25163    # The splitting of arguments from the executable at a space might have been incorrect,
25164    # since paths with space are more likely in Windows. Give it another try with the whole
25165    # argument.
25166    path="$complete"
25167    arguments="EOL"
25168    new_path=`$CYGPATH -u "$path"`
25169    new_path=`$WHICH "$new_path" 2> /dev/null`
25170    # bat and cmd files are not always considered executable in cygwin causing which
25171    # to not find them
25172    if test "x$new_path" = x \
25173             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25174             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25175      new_path=`$CYGPATH -u "$path"`
25176    fi
25177    if test "x$new_path" = x; then
25178      # It's still not found. Now this is an unrecoverable error.
25179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25180$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25181      has_space=`$ECHO "$complete" | $GREP " "`
25182      if test "x$has_space" != x; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25185      fi
25186      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25187    fi
25188  fi
25189
25190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25193  # "foo.exe" is OK but "foo" is an error.
25194  #
25195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25196  # It is also a way to make sure we got the proper file name for the real test later on.
25197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25198  if test "x$test_shortpath" = x; then
25199    # Short path failed, file does not exist as specified.
25200    # Try adding .exe or .cmd
25201    if test -f "${new_path}.exe"; then
25202       input_to_shortpath="${new_path}.exe"
25203    elif test -f "${new_path}.cmd"; then
25204       input_to_shortpath="${new_path}.cmd"
25205    else
25206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25207$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25209$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25210      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25211    fi
25212  else
25213    input_to_shortpath="$new_path"
25214  fi
25215
25216  # Call helper function which possibly converts this using DOS-style short mode.
25217  # If so, the updated path is stored in $new_path.
25218  new_path="$input_to_shortpath"
25219
25220  input_path="$input_to_shortpath"
25221  # Check if we need to convert this using DOS-style short mode. If the path
25222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25223  # take no chances and rewrite it.
25224  # Note: m4 eats our [], so we need to use [ and ] instead.
25225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25226  if test "x$has_forbidden_chars" != x; then
25227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25231      # Going to short mode and back again did indeed matter. Since short mode is
25232      # case insensitive, let's make it lowercase to improve readability.
25233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25234      # Now convert it back to Unix-stile (cygpath)
25235      input_path=`$CYGPATH -u "$shortmode_path"`
25236      new_path="$input_path"
25237    fi
25238  fi
25239
25240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25241  if test "x$test_cygdrive_prefix" = x; then
25242    # As a simple fix, exclude /usr/bin since it's not a real path.
25243    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25245      # a path prefixed by /cygdrive for fixpath to work.
25246      new_path="$CYGWIN_ROOT_PATH$input_path"
25247    fi
25248  fi
25249
25250  # remove trailing .exe if any
25251  new_path="${new_path/%.exe/}"
25252
25253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25254
25255  # First separate the path from the arguments. This will split at the first
25256  # space.
25257  complete="$NM"
25258  path="${complete%% *}"
25259  tmp="$complete EOL"
25260  arguments="${tmp#* }"
25261
25262  # Input might be given as Windows format, start by converting to
25263  # unix format.
25264  new_path="$path"
25265
25266  windows_path="$new_path"
25267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25268    unix_path=`$CYGPATH -u "$windows_path"`
25269    new_path="$unix_path"
25270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25272    new_path="$unix_path"
25273  fi
25274
25275
25276  # Now try to locate executable using which
25277  new_path=`$WHICH "$new_path" 2> /dev/null`
25278
25279  if test "x$new_path" = x; then
25280    # Oops. Which didn't find the executable.
25281    # The splitting of arguments from the executable at a space might have been incorrect,
25282    # since paths with space are more likely in Windows. Give it another try with the whole
25283    # argument.
25284    path="$complete"
25285    arguments="EOL"
25286    new_path="$path"
25287
25288  windows_path="$new_path"
25289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25290    unix_path=`$CYGPATH -u "$windows_path"`
25291    new_path="$unix_path"
25292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25294    new_path="$unix_path"
25295  fi
25296
25297
25298    new_path=`$WHICH "$new_path" 2> /dev/null`
25299
25300    if test "x$new_path" = x; then
25301      # It's still not found. Now this is an unrecoverable error.
25302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25303$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25304      has_space=`$ECHO "$complete" | $GREP " "`
25305      if test "x$has_space" != x; then
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25308      fi
25309      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25310    fi
25311  fi
25312
25313  # Now new_path has a complete unix path to the binary
25314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25315    # Keep paths in /bin as-is, but remove trailing .exe if any
25316    new_path="${new_path/%.exe/}"
25317    # Do not save /bin paths to all_fixpath_prefixes!
25318  else
25319    # Not in mixed or Windows style, start by that.
25320    new_path=`cmd //c echo $new_path`
25321
25322  input_path="$new_path"
25323  # Check if we need to convert this using DOS-style short mode. If the path
25324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25325  # take no chances and rewrite it.
25326  # Note: m4 eats our [], so we need to use [ and ] instead.
25327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25328  if test "x$has_forbidden_chars" != x; then
25329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25331  fi
25332
25333    # Output is in $new_path
25334
25335  windows_path="$new_path"
25336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25337    unix_path=`$CYGPATH -u "$windows_path"`
25338    new_path="$unix_path"
25339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25341    new_path="$unix_path"
25342  fi
25343
25344    # remove trailing .exe if any
25345    new_path="${new_path/%.exe/}"
25346
25347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25349  fi
25350
25351  else
25352    # We're on a posix platform. Hooray! :)
25353    # First separate the path from the arguments. This will split at the first
25354    # space.
25355    complete="$NM"
25356    path="${complete%% *}"
25357    tmp="$complete EOL"
25358    arguments="${tmp#* }"
25359
25360    new_path=`$WHICH $path 2> /dev/null`
25361    if test "x$new_path" = x; then
25362      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25363      if test "x$is_absolute_path" != x; then
25364        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25365$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25366        new_path="$path"
25367      else
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25369$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25370        has_space=`$ECHO "$complete" | $GREP " "`
25371        if test "x$has_space" != x; then
25372          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25373$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25374        fi
25375        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25376      fi
25377    fi
25378  fi
25379
25380  # Now join together the path and the arguments once again
25381  if test "x$arguments" != xEOL; then
25382      new_complete="$new_path ${arguments% *}"
25383  else
25384      new_complete="$new_path"
25385  fi
25386
25387  if test "x$complete" != "x$new_complete"; then
25388    NM="$new_complete"
25389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25390$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25391  fi
25392
25393    if test -n "$ac_tool_prefix"; then
25394  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25395set dummy ${ac_tool_prefix}strip; ac_word=$2
25396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25397$as_echo_n "checking for $ac_word... " >&6; }
25398if test "${ac_cv_prog_STRIP+set}" = set; then :
25399  $as_echo_n "(cached) " >&6
25400else
25401  if test -n "$STRIP"; then
25402  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25403else
25404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25405for as_dir in $PATH
25406do
25407  IFS=$as_save_IFS
25408  test -z "$as_dir" && as_dir=.
25409    for ac_exec_ext in '' $ac_executable_extensions; do
25410  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25411    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25413    break 2
25414  fi
25415done
25416  done
25417IFS=$as_save_IFS
25418
25419fi
25420fi
25421STRIP=$ac_cv_prog_STRIP
25422if test -n "$STRIP"; then
25423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25424$as_echo "$STRIP" >&6; }
25425else
25426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25427$as_echo "no" >&6; }
25428fi
25429
25430
25431fi
25432if test -z "$ac_cv_prog_STRIP"; then
25433  ac_ct_STRIP=$STRIP
25434  # Extract the first word of "strip", so it can be a program name with args.
25435set dummy strip; ac_word=$2
25436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25437$as_echo_n "checking for $ac_word... " >&6; }
25438if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25439  $as_echo_n "(cached) " >&6
25440else
25441  if test -n "$ac_ct_STRIP"; then
25442  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25443else
25444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25445for as_dir in $PATH
25446do
25447  IFS=$as_save_IFS
25448  test -z "$as_dir" && as_dir=.
25449    for ac_exec_ext in '' $ac_executable_extensions; do
25450  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25451    ac_cv_prog_ac_ct_STRIP="strip"
25452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25453    break 2
25454  fi
25455done
25456  done
25457IFS=$as_save_IFS
25458
25459fi
25460fi
25461ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25462if test -n "$ac_ct_STRIP"; then
25463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25464$as_echo "$ac_ct_STRIP" >&6; }
25465else
25466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25467$as_echo "no" >&6; }
25468fi
25469
25470  if test "x$ac_ct_STRIP" = x; then
25471    STRIP=""
25472  else
25473    case $cross_compiling:$ac_tool_warned in
25474yes:)
25475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25477ac_tool_warned=yes ;;
25478esac
25479    STRIP=$ac_ct_STRIP
25480  fi
25481else
25482  STRIP="$ac_cv_prog_STRIP"
25483fi
25484
25485
25486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487
25488  # First separate the path from the arguments. This will split at the first
25489  # space.
25490  complete="$STRIP"
25491  path="${complete%% *}"
25492  tmp="$complete EOL"
25493  arguments="${tmp#* }"
25494
25495  # Input might be given as Windows format, start by converting to
25496  # unix format.
25497  new_path=`$CYGPATH -u "$path"`
25498
25499  # Now try to locate executable using which
25500  new_path=`$WHICH "$new_path" 2> /dev/null`
25501  # bat and cmd files are not always considered executable in cygwin causing which
25502  # to not find them
25503  if test "x$new_path" = x \
25504           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25505           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25506    new_path=`$CYGPATH -u "$path"`
25507  fi
25508  if test "x$new_path" = x; then
25509    # Oops. Which didn't find the executable.
25510    # The splitting of arguments from the executable at a space might have been incorrect,
25511    # since paths with space are more likely in Windows. Give it another try with the whole
25512    # argument.
25513    path="$complete"
25514    arguments="EOL"
25515    new_path=`$CYGPATH -u "$path"`
25516    new_path=`$WHICH "$new_path" 2> /dev/null`
25517    # bat and cmd files are not always considered executable in cygwin causing which
25518    # to not find them
25519    if test "x$new_path" = x \
25520             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25521             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25522      new_path=`$CYGPATH -u "$path"`
25523    fi
25524    if test "x$new_path" = x; then
25525      # It's still not found. Now this is an unrecoverable error.
25526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25527$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25528      has_space=`$ECHO "$complete" | $GREP " "`
25529      if test "x$has_space" != x; then
25530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25532      fi
25533      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25534    fi
25535  fi
25536
25537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25540  # "foo.exe" is OK but "foo" is an error.
25541  #
25542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25543  # It is also a way to make sure we got the proper file name for the real test later on.
25544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25545  if test "x$test_shortpath" = x; then
25546    # Short path failed, file does not exist as specified.
25547    # Try adding .exe or .cmd
25548    if test -f "${new_path}.exe"; then
25549       input_to_shortpath="${new_path}.exe"
25550    elif test -f "${new_path}.cmd"; then
25551       input_to_shortpath="${new_path}.cmd"
25552    else
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25554$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25555      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25556$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25557      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25558    fi
25559  else
25560    input_to_shortpath="$new_path"
25561  fi
25562
25563  # Call helper function which possibly converts this using DOS-style short mode.
25564  # If so, the updated path is stored in $new_path.
25565  new_path="$input_to_shortpath"
25566
25567  input_path="$input_to_shortpath"
25568  # Check if we need to convert this using DOS-style short mode. If the path
25569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25570  # take no chances and rewrite it.
25571  # Note: m4 eats our [], so we need to use [ and ] instead.
25572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25573  if test "x$has_forbidden_chars" != x; then
25574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25578      # Going to short mode and back again did indeed matter. Since short mode is
25579      # case insensitive, let's make it lowercase to improve readability.
25580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25581      # Now convert it back to Unix-stile (cygpath)
25582      input_path=`$CYGPATH -u "$shortmode_path"`
25583      new_path="$input_path"
25584    fi
25585  fi
25586
25587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25588  if test "x$test_cygdrive_prefix" = x; then
25589    # As a simple fix, exclude /usr/bin since it's not a real path.
25590    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25592      # a path prefixed by /cygdrive for fixpath to work.
25593      new_path="$CYGWIN_ROOT_PATH$input_path"
25594    fi
25595  fi
25596
25597  # remove trailing .exe if any
25598  new_path="${new_path/%.exe/}"
25599
25600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25601
25602  # First separate the path from the arguments. This will split at the first
25603  # space.
25604  complete="$STRIP"
25605  path="${complete%% *}"
25606  tmp="$complete EOL"
25607  arguments="${tmp#* }"
25608
25609  # Input might be given as Windows format, start by converting to
25610  # unix format.
25611  new_path="$path"
25612
25613  windows_path="$new_path"
25614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25615    unix_path=`$CYGPATH -u "$windows_path"`
25616    new_path="$unix_path"
25617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25619    new_path="$unix_path"
25620  fi
25621
25622
25623  # Now try to locate executable using which
25624  new_path=`$WHICH "$new_path" 2> /dev/null`
25625
25626  if test "x$new_path" = x; then
25627    # Oops. Which didn't find the executable.
25628    # The splitting of arguments from the executable at a space might have been incorrect,
25629    # since paths with space are more likely in Windows. Give it another try with the whole
25630    # argument.
25631    path="$complete"
25632    arguments="EOL"
25633    new_path="$path"
25634
25635  windows_path="$new_path"
25636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25637    unix_path=`$CYGPATH -u "$windows_path"`
25638    new_path="$unix_path"
25639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25641    new_path="$unix_path"
25642  fi
25643
25644
25645    new_path=`$WHICH "$new_path" 2> /dev/null`
25646
25647    if test "x$new_path" = x; then
25648      # It's still not found. Now this is an unrecoverable error.
25649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25650$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25651      has_space=`$ECHO "$complete" | $GREP " "`
25652      if test "x$has_space" != x; then
25653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25655      fi
25656      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25657    fi
25658  fi
25659
25660  # Now new_path has a complete unix path to the binary
25661  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25662    # Keep paths in /bin as-is, but remove trailing .exe if any
25663    new_path="${new_path/%.exe/}"
25664    # Do not save /bin paths to all_fixpath_prefixes!
25665  else
25666    # Not in mixed or Windows style, start by that.
25667    new_path=`cmd //c echo $new_path`
25668
25669  input_path="$new_path"
25670  # Check if we need to convert this using DOS-style short mode. If the path
25671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25672  # take no chances and rewrite it.
25673  # Note: m4 eats our [], so we need to use [ and ] instead.
25674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25675  if test "x$has_forbidden_chars" != x; then
25676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25678  fi
25679
25680    # Output is in $new_path
25681
25682  windows_path="$new_path"
25683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25684    unix_path=`$CYGPATH -u "$windows_path"`
25685    new_path="$unix_path"
25686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25688    new_path="$unix_path"
25689  fi
25690
25691    # remove trailing .exe if any
25692    new_path="${new_path/%.exe/}"
25693
25694    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25695    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25696  fi
25697
25698  else
25699    # We're on a posix platform. Hooray! :)
25700    # First separate the path from the arguments. This will split at the first
25701    # space.
25702    complete="$STRIP"
25703    path="${complete%% *}"
25704    tmp="$complete EOL"
25705    arguments="${tmp#* }"
25706
25707    new_path=`$WHICH $path 2> /dev/null`
25708    if test "x$new_path" = x; then
25709      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25710      if test "x$is_absolute_path" != x; then
25711        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25712$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25713        new_path="$path"
25714      else
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25716$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25717        has_space=`$ECHO "$complete" | $GREP " "`
25718        if test "x$has_space" != x; then
25719          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25720$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25721        fi
25722        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25723      fi
25724    fi
25725  fi
25726
25727  # Now join together the path and the arguments once again
25728  if test "x$arguments" != xEOL; then
25729      new_complete="$new_path ${arguments% *}"
25730  else
25731      new_complete="$new_path"
25732  fi
25733
25734  if test "x$complete" != "x$new_complete"; then
25735    STRIP="$new_complete"
25736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25737$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25738  fi
25739
25740fi
25741
25742# objcopy is used for moving debug symbols to separate files when
25743# full debug symbols are enabled.
25744if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25745    if test -n "$ac_tool_prefix"; then
25746  for ac_prog in gobjcopy objcopy
25747  do
25748    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25749set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25751$as_echo_n "checking for $ac_word... " >&6; }
25752if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25753  $as_echo_n "(cached) " >&6
25754else
25755  if test -n "$OBJCOPY"; then
25756  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25757else
25758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25759for as_dir in $PATH
25760do
25761  IFS=$as_save_IFS
25762  test -z "$as_dir" && as_dir=.
25763    for ac_exec_ext in '' $ac_executable_extensions; do
25764  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25765    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25767    break 2
25768  fi
25769done
25770  done
25771IFS=$as_save_IFS
25772
25773fi
25774fi
25775OBJCOPY=$ac_cv_prog_OBJCOPY
25776if test -n "$OBJCOPY"; then
25777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25778$as_echo "$OBJCOPY" >&6; }
25779else
25780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25781$as_echo "no" >&6; }
25782fi
25783
25784
25785    test -n "$OBJCOPY" && break
25786  done
25787fi
25788if test -z "$OBJCOPY"; then
25789  ac_ct_OBJCOPY=$OBJCOPY
25790  for ac_prog in gobjcopy objcopy
25791do
25792  # Extract the first word of "$ac_prog", so it can be a program name with args.
25793set dummy $ac_prog; ac_word=$2
25794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25795$as_echo_n "checking for $ac_word... " >&6; }
25796if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25797  $as_echo_n "(cached) " >&6
25798else
25799  if test -n "$ac_ct_OBJCOPY"; then
25800  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25801else
25802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25803for as_dir in $PATH
25804do
25805  IFS=$as_save_IFS
25806  test -z "$as_dir" && as_dir=.
25807    for ac_exec_ext in '' $ac_executable_extensions; do
25808  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25809    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25811    break 2
25812  fi
25813done
25814  done
25815IFS=$as_save_IFS
25816
25817fi
25818fi
25819ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25820if test -n "$ac_ct_OBJCOPY"; then
25821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25822$as_echo "$ac_ct_OBJCOPY" >&6; }
25823else
25824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25825$as_echo "no" >&6; }
25826fi
25827
25828
25829  test -n "$ac_ct_OBJCOPY" && break
25830done
25831
25832  if test "x$ac_ct_OBJCOPY" = x; then
25833    OBJCOPY=""
25834  else
25835    case $cross_compiling:$ac_tool_warned in
25836yes:)
25837{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25838$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25839ac_tool_warned=yes ;;
25840esac
25841    OBJCOPY=$ac_ct_OBJCOPY
25842  fi
25843fi
25844
25845    # Only call fixup if objcopy was found.
25846    if test -n "$OBJCOPY"; then
25847
25848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25849
25850  # First separate the path from the arguments. This will split at the first
25851  # space.
25852  complete="$OBJCOPY"
25853  path="${complete%% *}"
25854  tmp="$complete EOL"
25855  arguments="${tmp#* }"
25856
25857  # Input might be given as Windows format, start by converting to
25858  # unix format.
25859  new_path=`$CYGPATH -u "$path"`
25860
25861  # Now try to locate executable using which
25862  new_path=`$WHICH "$new_path" 2> /dev/null`
25863  # bat and cmd files are not always considered executable in cygwin causing which
25864  # to not find them
25865  if test "x$new_path" = x \
25866           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25867           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25868    new_path=`$CYGPATH -u "$path"`
25869  fi
25870  if test "x$new_path" = x; then
25871    # Oops. Which didn't find the executable.
25872    # The splitting of arguments from the executable at a space might have been incorrect,
25873    # since paths with space are more likely in Windows. Give it another try with the whole
25874    # argument.
25875    path="$complete"
25876    arguments="EOL"
25877    new_path=`$CYGPATH -u "$path"`
25878    new_path=`$WHICH "$new_path" 2> /dev/null`
25879    # bat and cmd files are not always considered executable in cygwin causing which
25880    # to not find them
25881    if test "x$new_path" = x \
25882             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25883             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25884      new_path=`$CYGPATH -u "$path"`
25885    fi
25886    if test "x$new_path" = x; then
25887      # It's still not found. Now this is an unrecoverable error.
25888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25889$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25890      has_space=`$ECHO "$complete" | $GREP " "`
25891      if test "x$has_space" != x; then
25892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25894      fi
25895      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25896    fi
25897  fi
25898
25899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25902  # "foo.exe" is OK but "foo" is an error.
25903  #
25904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25905  # It is also a way to make sure we got the proper file name for the real test later on.
25906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25907  if test "x$test_shortpath" = x; then
25908    # Short path failed, file does not exist as specified.
25909    # Try adding .exe or .cmd
25910    if test -f "${new_path}.exe"; then
25911       input_to_shortpath="${new_path}.exe"
25912    elif test -f "${new_path}.cmd"; then
25913       input_to_shortpath="${new_path}.cmd"
25914    else
25915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25916$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25919      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25920    fi
25921  else
25922    input_to_shortpath="$new_path"
25923  fi
25924
25925  # Call helper function which possibly converts this using DOS-style short mode.
25926  # If so, the updated path is stored in $new_path.
25927  new_path="$input_to_shortpath"
25928
25929  input_path="$input_to_shortpath"
25930  # Check if we need to convert this using DOS-style short mode. If the path
25931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25932  # take no chances and rewrite it.
25933  # Note: m4 eats our [], so we need to use [ and ] instead.
25934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25935  if test "x$has_forbidden_chars" != x; then
25936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25940      # Going to short mode and back again did indeed matter. Since short mode is
25941      # case insensitive, let's make it lowercase to improve readability.
25942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25943      # Now convert it back to Unix-stile (cygpath)
25944      input_path=`$CYGPATH -u "$shortmode_path"`
25945      new_path="$input_path"
25946    fi
25947  fi
25948
25949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25950  if test "x$test_cygdrive_prefix" = x; then
25951    # As a simple fix, exclude /usr/bin since it's not a real path.
25952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25954      # a path prefixed by /cygdrive for fixpath to work.
25955      new_path="$CYGWIN_ROOT_PATH$input_path"
25956    fi
25957  fi
25958
25959  # remove trailing .exe if any
25960  new_path="${new_path/%.exe/}"
25961
25962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25963
25964  # First separate the path from the arguments. This will split at the first
25965  # space.
25966  complete="$OBJCOPY"
25967  path="${complete%% *}"
25968  tmp="$complete EOL"
25969  arguments="${tmp#* }"
25970
25971  # Input might be given as Windows format, start by converting to
25972  # unix format.
25973  new_path="$path"
25974
25975  windows_path="$new_path"
25976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25977    unix_path=`$CYGPATH -u "$windows_path"`
25978    new_path="$unix_path"
25979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25981    new_path="$unix_path"
25982  fi
25983
25984
25985  # Now try to locate executable using which
25986  new_path=`$WHICH "$new_path" 2> /dev/null`
25987
25988  if test "x$new_path" = x; then
25989    # Oops. Which didn't find the executable.
25990    # The splitting of arguments from the executable at a space might have been incorrect,
25991    # since paths with space are more likely in Windows. Give it another try with the whole
25992    # argument.
25993    path="$complete"
25994    arguments="EOL"
25995    new_path="$path"
25996
25997  windows_path="$new_path"
25998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25999    unix_path=`$CYGPATH -u "$windows_path"`
26000    new_path="$unix_path"
26001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26003    new_path="$unix_path"
26004  fi
26005
26006
26007    new_path=`$WHICH "$new_path" 2> /dev/null`
26008
26009    if test "x$new_path" = x; then
26010      # It's still not found. Now this is an unrecoverable error.
26011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26012$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26013      has_space=`$ECHO "$complete" | $GREP " "`
26014      if test "x$has_space" != x; then
26015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26017      fi
26018      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26019    fi
26020  fi
26021
26022  # Now new_path has a complete unix path to the binary
26023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26024    # Keep paths in /bin as-is, but remove trailing .exe if any
26025    new_path="${new_path/%.exe/}"
26026    # Do not save /bin paths to all_fixpath_prefixes!
26027  else
26028    # Not in mixed or Windows style, start by that.
26029    new_path=`cmd //c echo $new_path`
26030
26031  input_path="$new_path"
26032  # Check if we need to convert this using DOS-style short mode. If the path
26033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26034  # take no chances and rewrite it.
26035  # Note: m4 eats our [], so we need to use [ and ] instead.
26036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26037  if test "x$has_forbidden_chars" != x; then
26038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26040  fi
26041
26042    # Output is in $new_path
26043
26044  windows_path="$new_path"
26045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26046    unix_path=`$CYGPATH -u "$windows_path"`
26047    new_path="$unix_path"
26048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26050    new_path="$unix_path"
26051  fi
26052
26053    # remove trailing .exe if any
26054    new_path="${new_path/%.exe/}"
26055
26056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26058  fi
26059
26060  else
26061    # We're on a posix platform. Hooray! :)
26062    # First separate the path from the arguments. This will split at the first
26063    # space.
26064    complete="$OBJCOPY"
26065    path="${complete%% *}"
26066    tmp="$complete EOL"
26067    arguments="${tmp#* }"
26068
26069    new_path=`$WHICH $path 2> /dev/null`
26070    if test "x$new_path" = x; then
26071      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26072      if test "x$is_absolute_path" != x; then
26073        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
26074$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
26075        new_path="$path"
26076      else
26077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26078$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26079        has_space=`$ECHO "$complete" | $GREP " "`
26080        if test "x$has_space" != x; then
26081          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26083        fi
26084        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26085      fi
26086    fi
26087  fi
26088
26089  # Now join together the path and the arguments once again
26090  if test "x$arguments" != xEOL; then
26091      new_complete="$new_path ${arguments% *}"
26092  else
26093      new_complete="$new_path"
26094  fi
26095
26096  if test "x$complete" != "x$new_complete"; then
26097    OBJCOPY="$new_complete"
26098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26099$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26100  fi
26101
26102    fi
26103fi
26104
26105if test -n "$ac_tool_prefix"; then
26106  for ac_prog in gobjdump objdump
26107  do
26108    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26109set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26111$as_echo_n "checking for $ac_word... " >&6; }
26112if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26113  $as_echo_n "(cached) " >&6
26114else
26115  if test -n "$OBJDUMP"; then
26116  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26117else
26118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26119for as_dir in $PATH
26120do
26121  IFS=$as_save_IFS
26122  test -z "$as_dir" && as_dir=.
26123    for ac_exec_ext in '' $ac_executable_extensions; do
26124  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26125    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26127    break 2
26128  fi
26129done
26130  done
26131IFS=$as_save_IFS
26132
26133fi
26134fi
26135OBJDUMP=$ac_cv_prog_OBJDUMP
26136if test -n "$OBJDUMP"; then
26137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26138$as_echo "$OBJDUMP" >&6; }
26139else
26140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26141$as_echo "no" >&6; }
26142fi
26143
26144
26145    test -n "$OBJDUMP" && break
26146  done
26147fi
26148if test -z "$OBJDUMP"; then
26149  ac_ct_OBJDUMP=$OBJDUMP
26150  for ac_prog in gobjdump objdump
26151do
26152  # Extract the first word of "$ac_prog", so it can be a program name with args.
26153set dummy $ac_prog; ac_word=$2
26154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26155$as_echo_n "checking for $ac_word... " >&6; }
26156if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26157  $as_echo_n "(cached) " >&6
26158else
26159  if test -n "$ac_ct_OBJDUMP"; then
26160  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26161else
26162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26163for as_dir in $PATH
26164do
26165  IFS=$as_save_IFS
26166  test -z "$as_dir" && as_dir=.
26167    for ac_exec_ext in '' $ac_executable_extensions; do
26168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26169    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26171    break 2
26172  fi
26173done
26174  done
26175IFS=$as_save_IFS
26176
26177fi
26178fi
26179ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26180if test -n "$ac_ct_OBJDUMP"; then
26181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26182$as_echo "$ac_ct_OBJDUMP" >&6; }
26183else
26184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26185$as_echo "no" >&6; }
26186fi
26187
26188
26189  test -n "$ac_ct_OBJDUMP" && break
26190done
26191
26192  if test "x$ac_ct_OBJDUMP" = x; then
26193    OBJDUMP=""
26194  else
26195    case $cross_compiling:$ac_tool_warned in
26196yes:)
26197{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26198$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26199ac_tool_warned=yes ;;
26200esac
26201    OBJDUMP=$ac_ct_OBJDUMP
26202  fi
26203fi
26204
26205if test "x$OBJDUMP" != x; then
26206  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26207
26208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26209
26210  # First separate the path from the arguments. This will split at the first
26211  # space.
26212  complete="$OBJDUMP"
26213  path="${complete%% *}"
26214  tmp="$complete EOL"
26215  arguments="${tmp#* }"
26216
26217  # Input might be given as Windows format, start by converting to
26218  # unix format.
26219  new_path=`$CYGPATH -u "$path"`
26220
26221  # Now try to locate executable using which
26222  new_path=`$WHICH "$new_path" 2> /dev/null`
26223  # bat and cmd files are not always considered executable in cygwin causing which
26224  # to not find them
26225  if test "x$new_path" = x \
26226           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26227           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26228    new_path=`$CYGPATH -u "$path"`
26229  fi
26230  if test "x$new_path" = x; then
26231    # Oops. Which didn't find the executable.
26232    # The splitting of arguments from the executable at a space might have been incorrect,
26233    # since paths with space are more likely in Windows. Give it another try with the whole
26234    # argument.
26235    path="$complete"
26236    arguments="EOL"
26237    new_path=`$CYGPATH -u "$path"`
26238    new_path=`$WHICH "$new_path" 2> /dev/null`
26239    # bat and cmd files are not always considered executable in cygwin causing which
26240    # to not find them
26241    if test "x$new_path" = x \
26242             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26243             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26244      new_path=`$CYGPATH -u "$path"`
26245    fi
26246    if test "x$new_path" = x; then
26247      # It's still not found. Now this is an unrecoverable error.
26248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26249$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26250      has_space=`$ECHO "$complete" | $GREP " "`
26251      if test "x$has_space" != x; then
26252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26254      fi
26255      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26256    fi
26257  fi
26258
26259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26262  # "foo.exe" is OK but "foo" is an error.
26263  #
26264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26265  # It is also a way to make sure we got the proper file name for the real test later on.
26266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26267  if test "x$test_shortpath" = x; then
26268    # Short path failed, file does not exist as specified.
26269    # Try adding .exe or .cmd
26270    if test -f "${new_path}.exe"; then
26271       input_to_shortpath="${new_path}.exe"
26272    elif test -f "${new_path}.cmd"; then
26273       input_to_shortpath="${new_path}.cmd"
26274    else
26275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26276$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26279      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26280    fi
26281  else
26282    input_to_shortpath="$new_path"
26283  fi
26284
26285  # Call helper function which possibly converts this using DOS-style short mode.
26286  # If so, the updated path is stored in $new_path.
26287  new_path="$input_to_shortpath"
26288
26289  input_path="$input_to_shortpath"
26290  # Check if we need to convert this using DOS-style short mode. If the path
26291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26292  # take no chances and rewrite it.
26293  # Note: m4 eats our [], so we need to use [ and ] instead.
26294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26295  if test "x$has_forbidden_chars" != x; then
26296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26300      # Going to short mode and back again did indeed matter. Since short mode is
26301      # case insensitive, let's make it lowercase to improve readability.
26302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26303      # Now convert it back to Unix-stile (cygpath)
26304      input_path=`$CYGPATH -u "$shortmode_path"`
26305      new_path="$input_path"
26306    fi
26307  fi
26308
26309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26310  if test "x$test_cygdrive_prefix" = x; then
26311    # As a simple fix, exclude /usr/bin since it's not a real path.
26312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26314      # a path prefixed by /cygdrive for fixpath to work.
26315      new_path="$CYGWIN_ROOT_PATH$input_path"
26316    fi
26317  fi
26318
26319  # remove trailing .exe if any
26320  new_path="${new_path/%.exe/}"
26321
26322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26323
26324  # First separate the path from the arguments. This will split at the first
26325  # space.
26326  complete="$OBJDUMP"
26327  path="${complete%% *}"
26328  tmp="$complete EOL"
26329  arguments="${tmp#* }"
26330
26331  # Input might be given as Windows format, start by converting to
26332  # unix format.
26333  new_path="$path"
26334
26335  windows_path="$new_path"
26336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26337    unix_path=`$CYGPATH -u "$windows_path"`
26338    new_path="$unix_path"
26339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26341    new_path="$unix_path"
26342  fi
26343
26344
26345  # Now try to locate executable using which
26346  new_path=`$WHICH "$new_path" 2> /dev/null`
26347
26348  if test "x$new_path" = x; then
26349    # Oops. Which didn't find the executable.
26350    # The splitting of arguments from the executable at a space might have been incorrect,
26351    # since paths with space are more likely in Windows. Give it another try with the whole
26352    # argument.
26353    path="$complete"
26354    arguments="EOL"
26355    new_path="$path"
26356
26357  windows_path="$new_path"
26358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26359    unix_path=`$CYGPATH -u "$windows_path"`
26360    new_path="$unix_path"
26361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26363    new_path="$unix_path"
26364  fi
26365
26366
26367    new_path=`$WHICH "$new_path" 2> /dev/null`
26368
26369    if test "x$new_path" = x; then
26370      # It's still not found. Now this is an unrecoverable error.
26371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26372$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26373      has_space=`$ECHO "$complete" | $GREP " "`
26374      if test "x$has_space" != x; then
26375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26377      fi
26378      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26379    fi
26380  fi
26381
26382  # Now new_path has a complete unix path to the binary
26383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26384    # Keep paths in /bin as-is, but remove trailing .exe if any
26385    new_path="${new_path/%.exe/}"
26386    # Do not save /bin paths to all_fixpath_prefixes!
26387  else
26388    # Not in mixed or Windows style, start by that.
26389    new_path=`cmd //c echo $new_path`
26390
26391  input_path="$new_path"
26392  # Check if we need to convert this using DOS-style short mode. If the path
26393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26394  # take no chances and rewrite it.
26395  # Note: m4 eats our [], so we need to use [ and ] instead.
26396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26397  if test "x$has_forbidden_chars" != x; then
26398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26400  fi
26401
26402    # Output is in $new_path
26403
26404  windows_path="$new_path"
26405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26406    unix_path=`$CYGPATH -u "$windows_path"`
26407    new_path="$unix_path"
26408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26410    new_path="$unix_path"
26411  fi
26412
26413    # remove trailing .exe if any
26414    new_path="${new_path/%.exe/}"
26415
26416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26418  fi
26419
26420  else
26421    # We're on a posix platform. Hooray! :)
26422    # First separate the path from the arguments. This will split at the first
26423    # space.
26424    complete="$OBJDUMP"
26425    path="${complete%% *}"
26426    tmp="$complete EOL"
26427    arguments="${tmp#* }"
26428
26429    new_path=`$WHICH $path 2> /dev/null`
26430    if test "x$new_path" = x; then
26431      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26432      if test "x$is_absolute_path" != x; then
26433        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26434$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26435        new_path="$path"
26436      else
26437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26438$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26439        has_space=`$ECHO "$complete" | $GREP " "`
26440        if test "x$has_space" != x; then
26441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26443        fi
26444        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26445      fi
26446    fi
26447  fi
26448
26449  # Now join together the path and the arguments once again
26450  if test "x$arguments" != xEOL; then
26451      new_complete="$new_path ${arguments% *}"
26452  else
26453      new_complete="$new_path"
26454  fi
26455
26456  if test "x$complete" != "x$new_complete"; then
26457    OBJDUMP="$new_complete"
26458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26459$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26460  fi
26461
26462fi
26463
26464if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26465   # Extract the first word of "lipo", so it can be a program name with args.
26466set dummy lipo; ac_word=$2
26467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26468$as_echo_n "checking for $ac_word... " >&6; }
26469if test "${ac_cv_path_LIPO+set}" = set; then :
26470  $as_echo_n "(cached) " >&6
26471else
26472  case $LIPO in
26473  [\\/]* | ?:[\\/]*)
26474  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26475  ;;
26476  *)
26477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26478for as_dir in $PATH
26479do
26480  IFS=$as_save_IFS
26481  test -z "$as_dir" && as_dir=.
26482    for ac_exec_ext in '' $ac_executable_extensions; do
26483  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26484    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26486    break 2
26487  fi
26488done
26489  done
26490IFS=$as_save_IFS
26491
26492  ;;
26493esac
26494fi
26495LIPO=$ac_cv_path_LIPO
26496if test -n "$LIPO"; then
26497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26498$as_echo "$LIPO" >&6; }
26499else
26500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26501$as_echo "no" >&6; }
26502fi
26503
26504
26505
26506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26507
26508  # First separate the path from the arguments. This will split at the first
26509  # space.
26510  complete="$LIPO"
26511  path="${complete%% *}"
26512  tmp="$complete EOL"
26513  arguments="${tmp#* }"
26514
26515  # Input might be given as Windows format, start by converting to
26516  # unix format.
26517  new_path=`$CYGPATH -u "$path"`
26518
26519  # Now try to locate executable using which
26520  new_path=`$WHICH "$new_path" 2> /dev/null`
26521  # bat and cmd files are not always considered executable in cygwin causing which
26522  # to not find them
26523  if test "x$new_path" = x \
26524           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26525           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26526    new_path=`$CYGPATH -u "$path"`
26527  fi
26528  if test "x$new_path" = x; then
26529    # Oops. Which didn't find the executable.
26530    # The splitting of arguments from the executable at a space might have been incorrect,
26531    # since paths with space are more likely in Windows. Give it another try with the whole
26532    # argument.
26533    path="$complete"
26534    arguments="EOL"
26535    new_path=`$CYGPATH -u "$path"`
26536    new_path=`$WHICH "$new_path" 2> /dev/null`
26537    # bat and cmd files are not always considered executable in cygwin causing which
26538    # to not find them
26539    if test "x$new_path" = x \
26540             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26541             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26542      new_path=`$CYGPATH -u "$path"`
26543    fi
26544    if test "x$new_path" = x; then
26545      # It's still not found. Now this is an unrecoverable error.
26546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26547$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26548      has_space=`$ECHO "$complete" | $GREP " "`
26549      if test "x$has_space" != x; then
26550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26552      fi
26553      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26554    fi
26555  fi
26556
26557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26560  # "foo.exe" is OK but "foo" is an error.
26561  #
26562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26563  # It is also a way to make sure we got the proper file name for the real test later on.
26564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26565  if test "x$test_shortpath" = x; then
26566    # Short path failed, file does not exist as specified.
26567    # Try adding .exe or .cmd
26568    if test -f "${new_path}.exe"; then
26569       input_to_shortpath="${new_path}.exe"
26570    elif test -f "${new_path}.cmd"; then
26571       input_to_shortpath="${new_path}.cmd"
26572    else
26573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26574$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26577      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26578    fi
26579  else
26580    input_to_shortpath="$new_path"
26581  fi
26582
26583  # Call helper function which possibly converts this using DOS-style short mode.
26584  # If so, the updated path is stored in $new_path.
26585  new_path="$input_to_shortpath"
26586
26587  input_path="$input_to_shortpath"
26588  # Check if we need to convert this using DOS-style short mode. If the path
26589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26590  # take no chances and rewrite it.
26591  # Note: m4 eats our [], so we need to use [ and ] instead.
26592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26593  if test "x$has_forbidden_chars" != x; then
26594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26598      # Going to short mode and back again did indeed matter. Since short mode is
26599      # case insensitive, let's make it lowercase to improve readability.
26600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26601      # Now convert it back to Unix-stile (cygpath)
26602      input_path=`$CYGPATH -u "$shortmode_path"`
26603      new_path="$input_path"
26604    fi
26605  fi
26606
26607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26608  if test "x$test_cygdrive_prefix" = x; then
26609    # As a simple fix, exclude /usr/bin since it's not a real path.
26610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26612      # a path prefixed by /cygdrive for fixpath to work.
26613      new_path="$CYGWIN_ROOT_PATH$input_path"
26614    fi
26615  fi
26616
26617  # remove trailing .exe if any
26618  new_path="${new_path/%.exe/}"
26619
26620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26621
26622  # First separate the path from the arguments. This will split at the first
26623  # space.
26624  complete="$LIPO"
26625  path="${complete%% *}"
26626  tmp="$complete EOL"
26627  arguments="${tmp#* }"
26628
26629  # Input might be given as Windows format, start by converting to
26630  # unix format.
26631  new_path="$path"
26632
26633  windows_path="$new_path"
26634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26635    unix_path=`$CYGPATH -u "$windows_path"`
26636    new_path="$unix_path"
26637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26639    new_path="$unix_path"
26640  fi
26641
26642
26643  # Now try to locate executable using which
26644  new_path=`$WHICH "$new_path" 2> /dev/null`
26645
26646  if test "x$new_path" = x; then
26647    # Oops. Which didn't find the executable.
26648    # The splitting of arguments from the executable at a space might have been incorrect,
26649    # since paths with space are more likely in Windows. Give it another try with the whole
26650    # argument.
26651    path="$complete"
26652    arguments="EOL"
26653    new_path="$path"
26654
26655  windows_path="$new_path"
26656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26657    unix_path=`$CYGPATH -u "$windows_path"`
26658    new_path="$unix_path"
26659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26661    new_path="$unix_path"
26662  fi
26663
26664
26665    new_path=`$WHICH "$new_path" 2> /dev/null`
26666
26667    if test "x$new_path" = x; then
26668      # It's still not found. Now this is an unrecoverable error.
26669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26670$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26671      has_space=`$ECHO "$complete" | $GREP " "`
26672      if test "x$has_space" != x; then
26673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26675      fi
26676      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26677    fi
26678  fi
26679
26680  # Now new_path has a complete unix path to the binary
26681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26682    # Keep paths in /bin as-is, but remove trailing .exe if any
26683    new_path="${new_path/%.exe/}"
26684    # Do not save /bin paths to all_fixpath_prefixes!
26685  else
26686    # Not in mixed or Windows style, start by that.
26687    new_path=`cmd //c echo $new_path`
26688
26689  input_path="$new_path"
26690  # Check if we need to convert this using DOS-style short mode. If the path
26691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26692  # take no chances and rewrite it.
26693  # Note: m4 eats our [], so we need to use [ and ] instead.
26694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26695  if test "x$has_forbidden_chars" != x; then
26696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26698  fi
26699
26700    # Output is in $new_path
26701
26702  windows_path="$new_path"
26703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26704    unix_path=`$CYGPATH -u "$windows_path"`
26705    new_path="$unix_path"
26706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26708    new_path="$unix_path"
26709  fi
26710
26711    # remove trailing .exe if any
26712    new_path="${new_path/%.exe/}"
26713
26714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26716  fi
26717
26718  else
26719    # We're on a posix platform. Hooray! :)
26720    # First separate the path from the arguments. This will split at the first
26721    # space.
26722    complete="$LIPO"
26723    path="${complete%% *}"
26724    tmp="$complete EOL"
26725    arguments="${tmp#* }"
26726
26727    new_path=`$WHICH $path 2> /dev/null`
26728    if test "x$new_path" = x; then
26729      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26730      if test "x$is_absolute_path" != x; then
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
26732$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
26733        new_path="$path"
26734      else
26735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26736$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26737        has_space=`$ECHO "$complete" | $GREP " "`
26738        if test "x$has_space" != x; then
26739          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26740$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26741        fi
26742        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26743      fi
26744    fi
26745  fi
26746
26747  # Now join together the path and the arguments once again
26748  if test "x$arguments" != xEOL; then
26749      new_complete="$new_path ${arguments% *}"
26750  else
26751      new_complete="$new_path"
26752  fi
26753
26754  if test "x$complete" != "x$new_complete"; then
26755    LIPO="$new_complete"
26756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26757$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26758  fi
26759
26760fi
26761
26762# Restore old path without tools dir
26763PATH="$OLD_PATH"
26764
26765
26766# FIXME: Currently we must test this after paths but before flags. Fix!
26767
26768# And we can test some aspects on the target using configure macros.
26769
26770
26771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26772$as_echo_n "checking for ANSI C header files... " >&6; }
26773if test "${ac_cv_header_stdc+set}" = set; then :
26774  $as_echo_n "(cached) " >&6
26775else
26776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26777/* end confdefs.h.  */
26778#include <stdlib.h>
26779#include <stdarg.h>
26780#include <string.h>
26781#include <float.h>
26782
26783int
26784main ()
26785{
26786
26787  ;
26788  return 0;
26789}
26790_ACEOF
26791if ac_fn_cxx_try_compile "$LINENO"; then :
26792  ac_cv_header_stdc=yes
26793else
26794  ac_cv_header_stdc=no
26795fi
26796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26797
26798if test $ac_cv_header_stdc = yes; then
26799  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26801/* end confdefs.h.  */
26802#include <string.h>
26803
26804_ACEOF
26805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26806  $EGREP "memchr" >/dev/null 2>&1; then :
26807
26808else
26809  ac_cv_header_stdc=no
26810fi
26811rm -f conftest*
26812
26813fi
26814
26815if test $ac_cv_header_stdc = yes; then
26816  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26818/* end confdefs.h.  */
26819#include <stdlib.h>
26820
26821_ACEOF
26822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26823  $EGREP "free" >/dev/null 2>&1; then :
26824
26825else
26826  ac_cv_header_stdc=no
26827fi
26828rm -f conftest*
26829
26830fi
26831
26832if test $ac_cv_header_stdc = yes; then
26833  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26834  if test "$cross_compiling" = yes; then :
26835  :
26836else
26837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26838/* end confdefs.h.  */
26839#include <ctype.h>
26840#include <stdlib.h>
26841#if ((' ' & 0x0FF) == 0x020)
26842# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26843# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26844#else
26845# define ISLOWER(c) \
26846		   (('a' <= (c) && (c) <= 'i') \
26847		     || ('j' <= (c) && (c) <= 'r') \
26848		     || ('s' <= (c) && (c) <= 'z'))
26849# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26850#endif
26851
26852#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26853int
26854main ()
26855{
26856  int i;
26857  for (i = 0; i < 256; i++)
26858    if (XOR (islower (i), ISLOWER (i))
26859	|| toupper (i) != TOUPPER (i))
26860      return 2;
26861  return 0;
26862}
26863_ACEOF
26864if ac_fn_cxx_try_run "$LINENO"; then :
26865
26866else
26867  ac_cv_header_stdc=no
26868fi
26869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26870  conftest.$ac_objext conftest.beam conftest.$ac_ext
26871fi
26872
26873fi
26874fi
26875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26876$as_echo "$ac_cv_header_stdc" >&6; }
26877if test $ac_cv_header_stdc = yes; then
26878
26879$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26880
26881fi
26882
26883# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26884for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26885		  inttypes.h stdint.h unistd.h
26886do :
26887  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26888ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26889"
26890if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26891  cat >>confdefs.h <<_ACEOF
26892#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26893_ACEOF
26894
26895fi
26896
26897done
26898
26899
26900
26901###############################################################################
26902#
26903# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26904# (The JVM can use 32 or 64 bit Java pointers but that decision
26905# is made at runtime.)
26906#
26907if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26908  # Always specify -m flags on Solaris
26909
26910  # keep track of c/cxx flags that we added outselves...
26911  #   to prevent emitting warning...
26912  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26913  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26914  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26915
26916  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26917  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26918  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26919
26920  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26921  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26922  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26923
26924elif test "x$COMPILE_TYPE" = xreduced; then
26925  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26926    # Specify -m if running reduced on other Posix platforms
26927
26928  # keep track of c/cxx flags that we added outselves...
26929  #   to prevent emitting warning...
26930  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26931  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26932  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26933
26934  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26935  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26936  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26937
26938  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26939  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26940  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26941
26942  fi
26943fi
26944
26945# Make compilation sanity check
26946for ac_header in stdio.h
26947do :
26948  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26949if test "x$ac_cv_header_stdio_h" = x""yes; then :
26950  cat >>confdefs.h <<_ACEOF
26951#define HAVE_STDIO_H 1
26952_ACEOF
26953
26954else
26955
26956  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26957$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26958  if test "x$COMPILE_TYPE" = xreduced; then
26959    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26960$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26961  elif test "x$COMPILE_TYPE" = xcross; then
26962    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26963$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26964  fi
26965  as_fn_error $? "Cannot continue." "$LINENO" 5
26966
26967fi
26968
26969done
26970
26971
26972# The cast to long int works around a bug in the HP C Compiler
26973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26975# This bug is HP SR number 8606223364.
26976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26977$as_echo_n "checking size of int *... " >&6; }
26978if test "${ac_cv_sizeof_int_p+set}" = set; then :
26979  $as_echo_n "(cached) " >&6
26980else
26981  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26982
26983else
26984  if test "$ac_cv_type_int_p" = yes; then
26985     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26987as_fn_error 77 "cannot compute sizeof (int *)
26988See \`config.log' for more details" "$LINENO" 5 ; }
26989   else
26990     ac_cv_sizeof_int_p=0
26991   fi
26992fi
26993
26994fi
26995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26996$as_echo "$ac_cv_sizeof_int_p" >&6; }
26997
26998
26999
27000cat >>confdefs.h <<_ACEOF
27001#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27002_ACEOF
27003
27004
27005
27006if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27007  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27008  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27009fi
27010
27011if test "x$SIZEOF_INT_P" = x; then
27012    # The test failed, lets stick to the assumed value.
27013    { $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
27014$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27015else
27016    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27017
27018    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27019        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
27020    fi
27021fi
27022
27023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27024$as_echo_n "checking for target address size... " >&6; }
27025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27026$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27027
27028
27029###############################################################################
27030#
27031# Is the target little of big endian?
27032#
27033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27034$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27035if test "${ac_cv_c_bigendian+set}" = set; then :
27036  $as_echo_n "(cached) " >&6
27037else
27038  ac_cv_c_bigendian=unknown
27039    # See if we're dealing with a universal compiler.
27040    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27041/* end confdefs.h.  */
27042#ifndef __APPLE_CC__
27043	       not a universal capable compiler
27044	     #endif
27045	     typedef int dummy;
27046
27047_ACEOF
27048if ac_fn_cxx_try_compile "$LINENO"; then :
27049
27050	# Check for potential -arch flags.  It is not universal unless
27051	# there are at least two -arch flags with different values.
27052	ac_arch=
27053	ac_prev=
27054	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27055	 if test -n "$ac_prev"; then
27056	   case $ac_word in
27057	     i?86 | x86_64 | ppc | ppc64)
27058	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27059		 ac_arch=$ac_word
27060	       else
27061		 ac_cv_c_bigendian=universal
27062		 break
27063	       fi
27064	       ;;
27065	   esac
27066	   ac_prev=
27067	 elif test "x$ac_word" = "x-arch"; then
27068	   ac_prev=arch
27069	 fi
27070       done
27071fi
27072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27073    if test $ac_cv_c_bigendian = unknown; then
27074      # See if sys/param.h defines the BYTE_ORDER macro.
27075      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27076/* end confdefs.h.  */
27077#include <sys/types.h>
27078	     #include <sys/param.h>
27079
27080int
27081main ()
27082{
27083#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27084		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27085		     && LITTLE_ENDIAN)
27086	      bogus endian macros
27087	     #endif
27088
27089  ;
27090  return 0;
27091}
27092_ACEOF
27093if ac_fn_cxx_try_compile "$LINENO"; then :
27094  # It does; now see whether it defined to BIG_ENDIAN or not.
27095	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27096/* end confdefs.h.  */
27097#include <sys/types.h>
27098		#include <sys/param.h>
27099
27100int
27101main ()
27102{
27103#if BYTE_ORDER != BIG_ENDIAN
27104		 not big endian
27105		#endif
27106
27107  ;
27108  return 0;
27109}
27110_ACEOF
27111if ac_fn_cxx_try_compile "$LINENO"; then :
27112  ac_cv_c_bigendian=yes
27113else
27114  ac_cv_c_bigendian=no
27115fi
27116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27117fi
27118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27119    fi
27120    if test $ac_cv_c_bigendian = unknown; then
27121      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27122      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27123/* end confdefs.h.  */
27124#include <limits.h>
27125
27126int
27127main ()
27128{
27129#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27130	      bogus endian macros
27131	     #endif
27132
27133  ;
27134  return 0;
27135}
27136_ACEOF
27137if ac_fn_cxx_try_compile "$LINENO"; then :
27138  # It does; now see whether it defined to _BIG_ENDIAN or not.
27139	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27140/* end confdefs.h.  */
27141#include <limits.h>
27142
27143int
27144main ()
27145{
27146#ifndef _BIG_ENDIAN
27147		 not big endian
27148		#endif
27149
27150  ;
27151  return 0;
27152}
27153_ACEOF
27154if ac_fn_cxx_try_compile "$LINENO"; then :
27155  ac_cv_c_bigendian=yes
27156else
27157  ac_cv_c_bigendian=no
27158fi
27159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27160fi
27161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27162    fi
27163    if test $ac_cv_c_bigendian = unknown; then
27164      # Compile a test program.
27165      if test "$cross_compiling" = yes; then :
27166  # Try to guess by grepping values from an object file.
27167	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27168/* end confdefs.h.  */
27169short int ascii_mm[] =
27170		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27171		short int ascii_ii[] =
27172		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27173		int use_ascii (int i) {
27174		  return ascii_mm[i] + ascii_ii[i];
27175		}
27176		short int ebcdic_ii[] =
27177		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27178		short int ebcdic_mm[] =
27179		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27180		int use_ebcdic (int i) {
27181		  return ebcdic_mm[i] + ebcdic_ii[i];
27182		}
27183		extern int foo;
27184
27185int
27186main ()
27187{
27188return use_ascii (foo) == use_ebcdic (foo);
27189  ;
27190  return 0;
27191}
27192_ACEOF
27193if ac_fn_cxx_try_compile "$LINENO"; then :
27194  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27195	      ac_cv_c_bigendian=yes
27196	    fi
27197	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27198	      if test "$ac_cv_c_bigendian" = unknown; then
27199		ac_cv_c_bigendian=no
27200	      else
27201		# finding both strings is unlikely to happen, but who knows?
27202		ac_cv_c_bigendian=unknown
27203	      fi
27204	    fi
27205fi
27206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27207else
27208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27209/* end confdefs.h.  */
27210$ac_includes_default
27211int
27212main ()
27213{
27214
27215	     /* Are we little or big endian?  From Harbison&Steele.  */
27216	     union
27217	     {
27218	       long int l;
27219	       char c[sizeof (long int)];
27220	     } u;
27221	     u.l = 1;
27222	     return u.c[sizeof (long int) - 1] == 1;
27223
27224  ;
27225  return 0;
27226}
27227_ACEOF
27228if ac_fn_cxx_try_run "$LINENO"; then :
27229  ac_cv_c_bigendian=no
27230else
27231  ac_cv_c_bigendian=yes
27232fi
27233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27234  conftest.$ac_objext conftest.beam conftest.$ac_ext
27235fi
27236
27237    fi
27238fi
27239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27240$as_echo "$ac_cv_c_bigendian" >&6; }
27241 case $ac_cv_c_bigendian in #(
27242   yes)
27243     ENDIAN="big";; #(
27244   no)
27245     ENDIAN="little" ;; #(
27246   universal)
27247     ENDIAN="universal_endianness"
27248     ;; #(
27249   *)
27250     ENDIAN="unknown" ;;
27251 esac
27252
27253
27254if test "x$ENDIAN" = xuniversal_endianness; then
27255    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27256fi
27257if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27258    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
27259fi
27260
27261
27262# Configure flags for the tools
27263
27264
27265###############################################################################
27266#
27267# How to compile shared libraries.
27268#
27269
27270if test "x$GCC" = xyes; then
27271    COMPILER_NAME=gcc
27272    PICFLAG="-fPIC"
27273    LIBRARY_PREFIX=lib
27274    SHARED_LIBRARY='lib$1.so'
27275    STATIC_LIBRARY='lib$1.a'
27276    SHARED_LIBRARY_FLAGS="-shared"
27277    SHARED_LIBRARY_SUFFIX='.so'
27278    STATIC_LIBRARY_SUFFIX='.a'
27279    OBJ_SUFFIX='.o'
27280    EXE_SUFFIX=''
27281    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27282    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27283    C_FLAG_REORDER=''
27284    CXX_FLAG_REORDER=''
27285    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27286    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27287    LD="$CC"
27288    LDEXE="$CC"
27289    LDCXX="$CXX"
27290    LDEXECXX="$CXX"
27291    POST_STRIP_CMD="$STRIP -g"
27292
27293    # Linking is different on MacOSX
27294    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27295        # Might change in the future to clang.
27296        COMPILER_NAME=gcc
27297        SHARED_LIBRARY='lib$1.dylib'
27298        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27299        SHARED_LIBRARY_SUFFIX='.dylib'
27300        EXE_SUFFIX=''
27301        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27302        SET_SHARED_LIBRARY_MAPFILE=''
27303        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27304        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27305        POST_STRIP_CMD="$STRIP -S"
27306    fi
27307else
27308    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27309        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27310        COMPILER_NAME=ossc
27311        PICFLAG="-KPIC"
27312        LIBRARY_PREFIX=lib
27313        SHARED_LIBRARY='lib$1.so'
27314        STATIC_LIBRARY='lib$1.a'
27315        SHARED_LIBRARY_FLAGS="-G"
27316        SHARED_LIBRARY_SUFFIX='.so'
27317        STATIC_LIBRARY_SUFFIX='.a'
27318        OBJ_SUFFIX='.o'
27319        EXE_SUFFIX=''
27320        SET_SHARED_LIBRARY_NAME=''
27321        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27322	C_FLAG_REORDER='-xF'
27323	CXX_FLAG_REORDER='-xF'
27324        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27325        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27326        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27327        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27328        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27329        POST_STRIP_CMD="$STRIP -x"
27330        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27331    fi
27332    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27333        # If it is not gcc, then assume it is the MS Visual Studio compiler
27334        COMPILER_NAME=cl
27335        PICFLAG=""
27336        LIBRARY_PREFIX=
27337        SHARED_LIBRARY='$1.dll'
27338        STATIC_LIBRARY='$1.lib'
27339        SHARED_LIBRARY_FLAGS="-LD"
27340        SHARED_LIBRARY_SUFFIX='.dll'
27341        STATIC_LIBRARY_SUFFIX='.lib'
27342        OBJ_SUFFIX='.obj'
27343        EXE_SUFFIX='.exe'
27344        SET_SHARED_LIBRARY_NAME=''
27345        SET_SHARED_LIBRARY_MAPFILE=''
27346        SET_SHARED_LIBRARY_ORIGIN=''
27347        SET_EXECUTABLE_ORIGIN=''
27348    fi
27349fi
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368# The (cross) compiler is now configured, we can now test capabilities
27369# of the target platform.
27370
27371
27372
27373###############################################################################
27374#
27375# Setup the opt flags for different compilers
27376# and different operating systems.
27377#
27378
27379#
27380# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27381#
27382if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27383    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27384    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27385    CFLAGS="$CFLAGS -mstackrealign"
27386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27387$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27389/* end confdefs.h.  */
27390int main() { return 0; }
27391_ACEOF
27392if ac_fn_cxx_try_link "$LINENO"; then :
27393
27394		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27395$as_echo "yes" >&6; }
27396
27397else
27398
27399		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27400$as_echo "no" >&6; }
27401	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27402
27403fi
27404rm -f core conftest.err conftest.$ac_objext \
27405    conftest$ac_exeext conftest.$ac_ext
27406fi
27407
27408C_FLAG_DEPS="-MMD -MF"
27409CXX_FLAG_DEPS="-MMD -MF"
27410
27411case $COMPILER_TYPE in
27412  CC )
27413    D_FLAG="-g"
27414    case $COMPILER_NAME in
27415      gcc )
27416      	case $OPENJDK_TARGET_OS in
27417	  macosx )
27418	    # On MacOSX we optimize for size, something
27419	    # we should do for all platforms?
27420	    C_O_FLAG_HI="-Os"
27421	    C_O_FLAG_NORM="-Os"
27422	    C_O_FLAG_NONE=""
27423	    ;;
27424	  *)
27425	    C_O_FLAG_HI="-O3"
27426	    C_O_FLAG_NORM="-O2"
27427	    C_O_FLAG_NONE="-O0"
27428	    CFLAGS_DEBUG_SYMBOLS="-g"
27429	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27430	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27431	       CFLAGS_DEBUG_SYMBOLS="-g1"
27432	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27433	    fi
27434	    ;;
27435	esac
27436        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27437        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27438        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27439        ;;
27440      ossc )
27441        #
27442        # Forte has different names for this with their C++ compiler...
27443        #
27444        C_FLAG_DEPS="-xMMD -xMF"
27445        CXX_FLAG_DEPS="-xMMD -xMF"
27446
27447        # Extra options used with HIGHEST
27448        #
27449        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27450        #          done with care, there are some assumptions below that need to
27451        #          be understood about the use of pointers, and IEEE behavior.
27452        #
27453        # Use non-standard floating point mode (not IEEE 754)
27454        CC_HIGHEST="$CC_HIGHEST -fns"
27455        # Do some simplification of floating point arithmetic (not IEEE 754)
27456        CC_HIGHEST="$CC_HIGHEST -fsimple"
27457        # Use single precision floating point with 'float'
27458        CC_HIGHEST="$CC_HIGHEST -fsingle"
27459        # Assume memory references via basic pointer types do not alias
27460        #   (Source with excessing pointer casting and data access with mixed
27461        #    pointer types are not recommended)
27462        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27463        # Use intrinsic or inline versions for math/std functions
27464        #   (If you expect perfect errno behavior, do not use this)
27465        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27466        # Loop data dependency optimizations (need -xO3 or higher)
27467        CC_HIGHEST="$CC_HIGHEST -xdepend"
27468        # Pointer parameters to functions do not overlap
27469        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27470        #    If you pass in multiple pointers to the same data, do not use this)
27471        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27472        # Inline some library routines
27473        #   (If you expect perfect errno behavior, do not use this)
27474        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27475        # Use optimized math routines
27476        #   (If you expect perfect errno behavior, do not use this)
27477        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27478        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27479
27480        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27481          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27482          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27483        fi
27484
27485        case $OPENJDK_TARGET_CPU_ARCH in
27486          x86)
27487            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27488            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27489            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27490            C_O_FLAG_NONE="-xregs=no%frameptr"
27491            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27492            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27493            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27494            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27495            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27496               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27497               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27498            fi
27499            ;;
27500          sparc)
27501            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27502            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27503            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27504            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27505            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27506            C_O_FLAG_NONE=""
27507            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27508            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27509            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27510            CXX_O_FLAG_NONE=""
27511            ;;
27512        esac
27513
27514    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27515    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27516    esac
27517    ;;
27518  CL )
27519    D_FLAG=
27520    C_O_FLAG_HIGHEST="-O2"
27521    C_O_FLAG_HI="-O1"
27522    C_O_FLAG_NORM="-O1"
27523    C_O_FLAG_NONE="-Od"
27524    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27525    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27526    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27527    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27528    ;;
27529esac
27530
27531if test -z "$C_O_FLAG_HIGHEST"; then
27532   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27533fi
27534
27535if test -z "$CXX_O_FLAG_HIGHEST"; then
27536   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27537fi
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27553   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27554$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27555fi
27556
27557if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27558   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27559$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27560fi
27561
27562if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27563   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27564$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27565fi
27566
27567
27568# Check whether --with-extra-cflags was given.
27569if test "${with_extra_cflags+set}" = set; then :
27570  withval=$with_extra_cflags;
27571fi
27572
27573
27574
27575# Check whether --with-extra-cxxflags was given.
27576if test "${with_extra_cxxflags+set}" = set; then :
27577  withval=$with_extra_cxxflags;
27578fi
27579
27580
27581
27582# Check whether --with-extra-ldflags was given.
27583if test "${with_extra_ldflags+set}" = set; then :
27584  withval=$with_extra_ldflags;
27585fi
27586
27587
27588CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27589CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27590LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27591
27592# Hotspot needs these set in their legacy form
27593LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27594LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27595LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27596
27597
27598
27599
27600
27601###############################################################################
27602#
27603# Now setup the CFLAGS and LDFLAGS for the JDK build.
27604# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27605#
27606case $COMPILER_NAME in
27607      gcc )
27608      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27609                          -pipe \
27610                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27611	  case $OPENJDK_TARGET_CPU_ARCH in
27612	  arm )
27613            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27614	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27615	  ;;
27616	  ppc )
27617            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27618	  ;;
27619	  * )
27620	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27621	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27622          ;;
27623	  esac
27624          ;;
27625      ossc )
27626          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27627          case $OPENJDK_TARGET_CPU_ARCH in
27628          x86 )
27629            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27630       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27631          ;;
27632          esac
27633
27634      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27635      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27636
27637          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27638          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27639          ;;
27640      cl )
27641          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
27642               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
27643	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
27644	       -DWIN32 -DIAL"
27645          case $OPENJDK_TARGET_CPU in
27646              x86 )
27647                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
27648                  ;;
27649              x86_64 )
27650                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
27651                  ;;
27652          esac
27653          ;;
27654esac
27655
27656###############################################################################
27657
27658CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
27659
27660# The package path is used only on macosx?
27661PACKAGE_PATH=/opt/local
27662
27663
27664if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
27665    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
27666    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
27667    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
27668    #   Note: -Dmacro         is the same as    #define macro 1
27669    #         -Dmacro=	    is the same as    #define macro
27670    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27671        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
27672    else
27673        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
27674    fi
27675else
27676    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
27677fi
27678if test "x$OPENJDK_TARGET_OS" = xlinux; then
27679    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
27680fi
27681if test "x$OPENJDK_TARGET_OS" = xwindows; then
27682    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
27683fi
27684if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27685    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
27686fi
27687if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27688    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
27689fi
27690if test "x$OPENJDK_TARGET_OS" = xbsd; then
27691    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
27692fi
27693if test "x$DEBUG_LEVEL" = xrelease; then
27694    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
27695    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27696        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
27697    fi
27698else
27699    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
27700fi
27701
27702CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
27703CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
27704
27705CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
27706        -I${JDK_OUTPUTDIR}/include \
27707        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
27708        -I${JDK_TOPDIR}/src/share/javavm/export \
27709        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
27710        -I${JDK_TOPDIR}/src/share/native/common \
27711        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
27712
27713# The shared libraries are compiled using the picflag.
27714CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
27715CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
27716
27717# Executable flags
27718CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
27719CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
27720
27721# Now this is odd. The JDK native libraries have to link against libjvm.so
27722# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
27723# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
27724# is identical for client and server? Yes. Which is picked at runtime (client or server)?
27725# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
27726# libraries will link to whatever is in memory. Yuck.
27727#
27728# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
27729if test "x$COMPILER_NAME" = xcl; then
27730    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
27731    if test "x$OPENJDK_TARGET_CPU" = xx86; then
27732        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
27733    fi
27734    # TODO: make -debug optional "--disable-full-debug-symbols"
27735    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
27736    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
27737    LDFLAGS_JDKLIB_SUFFIX=""
27738    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
27739        LDFLAGS_STACK_SIZE=1048576
27740    else
27741        LDFLAGS_STACK_SIZE=327680
27742    fi
27743    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
27744else
27745    if test "x$COMPILER_NAME" = xgcc; then
27746        # If this is a --hash-style=gnu system, use --hash-style=both, why?
27747        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27748        if test -n "$HAS_GNU_HASH"; then
27749            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27750        fi
27751        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27752          # And since we now know that the linker is gnu, then add -z defs, to forbid
27753          # undefined symbols in object files.
27754          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27755          if test "x$DEBUG_LEVEL" = "xrelease"; then
27756              # When building release libraries, tell the linker optimize them.
27757              # Should this be supplied to the OSS linker as well?
27758              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27759          fi
27760        fi
27761    fi
27762    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27763                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27764
27765    # On some platforms (mac) the linker warns about non existing -L dirs.
27766    # Add server first if available. Linking aginst client does not always produce the same results.
27767    # Only add client dir if client is being built. Default to server for other variants.
27768    if test "x$JVM_VARIANT_SERVER" = xtrue; then
27769        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27770    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
27771        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
27772    else
27773        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27774    fi
27775
27776    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27777    if test "x$COMPILER_NAME" = xossc; then
27778        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27779    fi
27780
27781    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27782    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27783        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27784    fi
27785fi
27786
27787# Adjust flags according to debug level.
27788case $DEBUG_LEVEL in
27789      fastdebug )
27790              CFLAGS="$CFLAGS $D_FLAG"
27791              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27792              ;;
27793      slowdebug )
27794              CFLAGS="$CFLAGS $D_FLAG"
27795	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27796	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27797	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27798	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27799              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27800              ;;
27801esac
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817# Setup debug symbols (need objcopy from the toolchain for that)
27818
27819#
27820# ENABLE_DEBUG_SYMBOLS
27821# This must be done after the toolchain is setup, since we're looking at objcopy.
27822#
27823# Check whether --enable-debug-symbols was given.
27824if test "${enable_debug_symbols+set}" = set; then :
27825  enableval=$enable_debug_symbols;
27826fi
27827
27828
27829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27830$as_echo_n "checking if we should generate debug symbols... " >&6; }
27831
27832if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
27833   # explicit enabling of enable-debug-symbols and can't find objcopy
27834   #   this is an error
27835   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27836fi
27837
27838if test "x$enable_debug_symbols" = "xyes"; then
27839  ENABLE_DEBUG_SYMBOLS=true
27840elif test "x$enable_debug_symbols" = "xno"; then
27841  ENABLE_DEBUG_SYMBOLS=false
27842else
27843  # default on macosx is false
27844  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27845    ENABLE_DEBUG_SYMBOLS=false
27846  # Default is on if objcopy is found, otherwise off
27847  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27848    ENABLE_DEBUG_SYMBOLS=true
27849  else
27850    ENABLE_DEBUG_SYMBOLS=false
27851  fi
27852fi
27853
27854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27855$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27856
27857#
27858# ZIP_DEBUGINFO_FILES
27859#
27860# Check whether --enable-zip-debug-info was given.
27861if test "${enable_zip_debug_info+set}" = set; then :
27862  enableval=$enable_zip_debug_info;
27863fi
27864
27865
27866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27867$as_echo_n "checking if we should zip debug-info files... " >&6; }
27868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
27869$as_echo "${enable_zip_debug_info}" >&6; }
27870
27871if test "x${enable_zip_debug_info}" = "xno"; then
27872   ZIP_DEBUGINFO_FILES=false
27873else
27874   ZIP_DEBUGINFO_FILES=true
27875fi
27876
27877
27878
27879
27880
27881
27882
27883###############################################################################
27884#
27885# Check dependencies for external and internal libraries.
27886#
27887###############################################################################
27888
27889
27890
27891###############################################################################
27892#
27893# OS specific settings that we never will need to probe.
27894#
27895if test "x$OPENJDK_TARGET_OS" = xlinux; then
27896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27897$as_echo_n "checking what is not needed on Linux?... " >&6; }
27898    PULSE_NOT_NEEDED=yes
27899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27900$as_echo "pulse" >&6; }
27901fi
27902
27903if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27905$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27906    ALSA_NOT_NEEDED=yes
27907    PULSE_NOT_NEEDED=yes
27908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27909$as_echo "alsa pulse" >&6; }
27910fi
27911
27912if test "x$OPENJDK_TARGET_OS" = xwindows; then
27913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27914$as_echo_n "checking what is not needed on Windows?... " >&6; }
27915    CUPS_NOT_NEEDED=yes
27916    ALSA_NOT_NEEDED=yes
27917    PULSE_NOT_NEEDED=yes
27918    X11_NOT_NEEDED=yes
27919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27920$as_echo "alsa cups pulse x11" >&6; }
27921fi
27922
27923if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27925$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27926    ALSA_NOT_NEEDED=yes
27927    PULSE_NOT_NEEDED=yes
27928    X11_NOT_NEEDED=yes
27929    FREETYPE2_NOT_NEEDED=yes
27930    # If the java runtime framework is disabled, then we need X11.
27931    # This will be adjusted below.
27932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27933$as_echo "alsa pulse x11" >&6; }
27934fi
27935
27936if test "x$OPENJDK_TARGET_OS" = xbsd; then
27937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27938$as_echo_n "checking what is not needed on bsd?... " >&6; }
27939    ALSA_NOT_NEEDED=yes
27940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27941$as_echo "alsa" >&6; }
27942fi
27943
27944if test "x$OPENJDK" = "xfalse"; then
27945    FREETYPE2_NOT_NEEDED=yes
27946fi
27947
27948if test "x$SUPPORT_HEADFUL" = xno; then
27949    X11_NOT_NEEDED=yes
27950fi
27951
27952###############################################################################
27953#
27954# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27955# that uses this API.
27956#
27957# Check whether --enable-macosx-runtime-support was given.
27958if test "${enable_macosx_runtime_support+set}" = set; then :
27959  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27960else
27961  MACOSX_RUNTIME_SUPPORT="no"
27962fi
27963
27964
27965USE_MACOSX_RUNTIME_SUPPORT=no
27966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27967$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27968if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27969    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27970        MACOSX_RUNTIME_SUPPORT=yes
27971        USE_MACOSX_RUNTIME_SUPPORT=yes
27972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27973$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27974    else
27975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27976$as_echo "yes, but explicitly disabled." >&6; }
27977    fi
27978else
27979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27980$as_echo "no" >&6; }
27981fi
27982
27983if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27985$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27986    X11_NOT_NEEDED=
27987    FREETYPE2_NOT_NEEDED=
27988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27989$as_echo "alsa pulse" >&6; }
27990fi
27991
27992
27993
27994
27995###############################################################################
27996#
27997# Check for X Windows
27998#
27999
28000# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28001# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28002# --x-libraries for the sysroot, if that seems to be correct.
28003if test "x$SYS_ROOT" != "x/"; then
28004  if test "x$x_includes" = xNONE; then
28005    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28006      x_includes="$SYS_ROOT/usr/X11R6/include"
28007    fi
28008  fi
28009  if test "x$x_libraries" = xNONE; then
28010    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28011      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28012    fi
28013  fi
28014fi
28015
28016# Now let autoconf do it's magic
28017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28018$as_echo_n "checking for X... " >&6; }
28019
28020
28021# Check whether --with-x was given.
28022if test "${with_x+set}" = set; then :
28023  withval=$with_x;
28024fi
28025
28026# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28027if test "x$with_x" = xno; then
28028  # The user explicitly disabled X.
28029  have_x=disabled
28030else
28031  case $x_includes,$x_libraries in #(
28032    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28033    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28034  $as_echo_n "(cached) " >&6
28035else
28036  # One or both of the vars are not set, and there is no cached value.
28037ac_x_includes=no ac_x_libraries=no
28038rm -f -r conftest.dir
28039if mkdir conftest.dir; then
28040  cd conftest.dir
28041  cat >Imakefile <<'_ACEOF'
28042incroot:
28043	@echo incroot='${INCROOT}'
28044usrlibdir:
28045	@echo usrlibdir='${USRLIBDIR}'
28046libdir:
28047	@echo libdir='${LIBDIR}'
28048_ACEOF
28049  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28050    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28051    for ac_var in incroot usrlibdir libdir; do
28052      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28053    done
28054    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28055    for ac_extension in a so sl dylib la dll; do
28056      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28057	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28058	ac_im_usrlibdir=$ac_im_libdir; break
28059      fi
28060    done
28061    # Screen out bogus values from the imake configuration.  They are
28062    # bogus both because they are the default anyway, and because
28063    # using them would break gcc on systems where it needs fixed includes.
28064    case $ac_im_incroot in
28065	/usr/include) ac_x_includes= ;;
28066	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28067    esac
28068    case $ac_im_usrlibdir in
28069	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28070	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28071    esac
28072  fi
28073  cd ..
28074  rm -f -r conftest.dir
28075fi
28076
28077# Standard set of common directories for X headers.
28078# Check X11 before X11Rn because it is often a symlink to the current release.
28079ac_x_header_dirs='
28080/usr/X11/include
28081/usr/X11R7/include
28082/usr/X11R6/include
28083/usr/X11R5/include
28084/usr/X11R4/include
28085
28086/usr/include/X11
28087/usr/include/X11R7
28088/usr/include/X11R6
28089/usr/include/X11R5
28090/usr/include/X11R4
28091
28092/usr/local/X11/include
28093/usr/local/X11R7/include
28094/usr/local/X11R6/include
28095/usr/local/X11R5/include
28096/usr/local/X11R4/include
28097
28098/usr/local/include/X11
28099/usr/local/include/X11R7
28100/usr/local/include/X11R6
28101/usr/local/include/X11R5
28102/usr/local/include/X11R4
28103
28104/usr/X386/include
28105/usr/x386/include
28106/usr/XFree86/include/X11
28107
28108/usr/include
28109/usr/local/include
28110/usr/unsupported/include
28111/usr/athena/include
28112/usr/local/x11r5/include
28113/usr/lpp/Xamples/include
28114
28115/usr/openwin/include
28116/usr/openwin/share/include'
28117
28118if test "$ac_x_includes" = no; then
28119  # Guess where to find include files, by looking for Xlib.h.
28120  # First, try using that file with no special directory specified.
28121  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28122/* end confdefs.h.  */
28123#include <X11/Xlib.h>
28124_ACEOF
28125if ac_fn_cxx_try_cpp "$LINENO"; then :
28126  # We can compile using X headers with no special include directory.
28127ac_x_includes=
28128else
28129  for ac_dir in $ac_x_header_dirs; do
28130  if test -r "$ac_dir/X11/Xlib.h"; then
28131    ac_x_includes=$ac_dir
28132    break
28133  fi
28134done
28135fi
28136rm -f conftest.err conftest.i conftest.$ac_ext
28137fi # $ac_x_includes = no
28138
28139if test "$ac_x_libraries" = no; then
28140  # Check for the libraries.
28141  # See if we find them without any special options.
28142  # Don't add to $LIBS permanently.
28143  ac_save_LIBS=$LIBS
28144  LIBS="-lX11 $LIBS"
28145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28146/* end confdefs.h.  */
28147#include <X11/Xlib.h>
28148int
28149main ()
28150{
28151XrmInitialize ()
28152  ;
28153  return 0;
28154}
28155_ACEOF
28156if ac_fn_cxx_try_link "$LINENO"; then :
28157  LIBS=$ac_save_LIBS
28158# We can link X programs with no special library path.
28159ac_x_libraries=
28160else
28161  LIBS=$ac_save_LIBS
28162for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28163do
28164  # Don't even attempt the hair of trying to link an X program!
28165  for ac_extension in a so sl dylib la dll; do
28166    if test -r "$ac_dir/libX11.$ac_extension"; then
28167      ac_x_libraries=$ac_dir
28168      break 2
28169    fi
28170  done
28171done
28172fi
28173rm -f core conftest.err conftest.$ac_objext \
28174    conftest$ac_exeext conftest.$ac_ext
28175fi # $ac_x_libraries = no
28176
28177case $ac_x_includes,$ac_x_libraries in #(
28178  no,* | *,no | *\'*)
28179    # Didn't find X, or a directory has "'" in its name.
28180    ac_cv_have_x="have_x=no";; #(
28181  *)
28182    # Record where we found X for the cache.
28183    ac_cv_have_x="have_x=yes\
28184	ac_x_includes='$ac_x_includes'\
28185	ac_x_libraries='$ac_x_libraries'"
28186esac
28187fi
28188;; #(
28189    *) have_x=yes;;
28190  esac
28191  eval "$ac_cv_have_x"
28192fi # $with_x != no
28193
28194if test "$have_x" != yes; then
28195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28196$as_echo "$have_x" >&6; }
28197  no_x=yes
28198else
28199  # If each of the values was on the command line, it overrides each guess.
28200  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28201  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28202  # Update the cache value to reflect the command line values.
28203  ac_cv_have_x="have_x=yes\
28204	ac_x_includes='$x_includes'\
28205	ac_x_libraries='$x_libraries'"
28206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28207$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28208fi
28209
28210if test "$no_x" = yes; then
28211  # Not all programs may use this symbol, but it does not hurt to define it.
28212
28213$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28214
28215  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28216else
28217  if test -n "$x_includes"; then
28218    X_CFLAGS="$X_CFLAGS -I$x_includes"
28219  fi
28220
28221  # It would also be nice to do this for all -L options, not just this one.
28222  if test -n "$x_libraries"; then
28223    X_LIBS="$X_LIBS -L$x_libraries"
28224    # For Solaris; some versions of Sun CC require a space after -R and
28225    # others require no space.  Words are not sufficient . . . .
28226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28227$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28228    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28229    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28230    ac_cxx_werror_flag=yes
28231    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28232/* end confdefs.h.  */
28233
28234int
28235main ()
28236{
28237
28238  ;
28239  return 0;
28240}
28241_ACEOF
28242if ac_fn_cxx_try_link "$LINENO"; then :
28243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28244$as_echo "no" >&6; }
28245       X_LIBS="$X_LIBS -R$x_libraries"
28246else
28247  LIBS="$ac_xsave_LIBS -R $x_libraries"
28248       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28249/* end confdefs.h.  */
28250
28251int
28252main ()
28253{
28254
28255  ;
28256  return 0;
28257}
28258_ACEOF
28259if ac_fn_cxx_try_link "$LINENO"; then :
28260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28261$as_echo "yes" >&6; }
28262	  X_LIBS="$X_LIBS -R $x_libraries"
28263else
28264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28265$as_echo "neither works" >&6; }
28266fi
28267rm -f core conftest.err conftest.$ac_objext \
28268    conftest$ac_exeext conftest.$ac_ext
28269fi
28270rm -f core conftest.err conftest.$ac_objext \
28271    conftest$ac_exeext conftest.$ac_ext
28272    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28273    LIBS=$ac_xsave_LIBS
28274  fi
28275
28276  # Check for system-dependent libraries X programs must link with.
28277  # Do this before checking for the system-independent R6 libraries
28278  # (-lICE), since we may need -lsocket or whatever for X linking.
28279
28280  if test "$ISC" = yes; then
28281    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28282  else
28283    # Martyn Johnson says this is needed for Ultrix, if the X
28284    # libraries were built with DECnet support.  And Karl Berry says
28285    # the Alpha needs dnet_stub (dnet does not exist).
28286    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28287    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28288/* end confdefs.h.  */
28289
28290/* Override any GCC internal prototype to avoid an error.
28291   Use char because int might match the return type of a GCC
28292   builtin and then its argument prototype would still apply.  */
28293#ifdef __cplusplus
28294extern "C"
28295#endif
28296char XOpenDisplay ();
28297int
28298main ()
28299{
28300return XOpenDisplay ();
28301  ;
28302  return 0;
28303}
28304_ACEOF
28305if ac_fn_cxx_try_link "$LINENO"; then :
28306
28307else
28308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28309$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28310if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28311  $as_echo_n "(cached) " >&6
28312else
28313  ac_check_lib_save_LIBS=$LIBS
28314LIBS="-ldnet  $LIBS"
28315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28316/* end confdefs.h.  */
28317
28318/* Override any GCC internal prototype to avoid an error.
28319   Use char because int might match the return type of a GCC
28320   builtin and then its argument prototype would still apply.  */
28321#ifdef __cplusplus
28322extern "C"
28323#endif
28324char dnet_ntoa ();
28325int
28326main ()
28327{
28328return dnet_ntoa ();
28329  ;
28330  return 0;
28331}
28332_ACEOF
28333if ac_fn_cxx_try_link "$LINENO"; then :
28334  ac_cv_lib_dnet_dnet_ntoa=yes
28335else
28336  ac_cv_lib_dnet_dnet_ntoa=no
28337fi
28338rm -f core conftest.err conftest.$ac_objext \
28339    conftest$ac_exeext conftest.$ac_ext
28340LIBS=$ac_check_lib_save_LIBS
28341fi
28342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28343$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28344if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28345  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28346fi
28347
28348    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28349      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28350$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28351if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28352  $as_echo_n "(cached) " >&6
28353else
28354  ac_check_lib_save_LIBS=$LIBS
28355LIBS="-ldnet_stub  $LIBS"
28356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28357/* end confdefs.h.  */
28358
28359/* Override any GCC internal prototype to avoid an error.
28360   Use char because int might match the return type of a GCC
28361   builtin and then its argument prototype would still apply.  */
28362#ifdef __cplusplus
28363extern "C"
28364#endif
28365char dnet_ntoa ();
28366int
28367main ()
28368{
28369return dnet_ntoa ();
28370  ;
28371  return 0;
28372}
28373_ACEOF
28374if ac_fn_cxx_try_link "$LINENO"; then :
28375  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28376else
28377  ac_cv_lib_dnet_stub_dnet_ntoa=no
28378fi
28379rm -f core conftest.err conftest.$ac_objext \
28380    conftest$ac_exeext conftest.$ac_ext
28381LIBS=$ac_check_lib_save_LIBS
28382fi
28383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28384$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28385if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28386  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28387fi
28388
28389    fi
28390fi
28391rm -f core conftest.err conftest.$ac_objext \
28392    conftest$ac_exeext conftest.$ac_ext
28393    LIBS="$ac_xsave_LIBS"
28394
28395    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28396    # to get the SysV transport functions.
28397    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28398    # needs -lnsl.
28399    # The nsl library prevents programs from opening the X display
28400    # on Irix 5.2, according to T.E. Dickey.
28401    # The functions gethostbyname, getservbyname, and inet_addr are
28402    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28403    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28404if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28405
28406fi
28407
28408    if test $ac_cv_func_gethostbyname = no; then
28409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28410$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28411if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28412  $as_echo_n "(cached) " >&6
28413else
28414  ac_check_lib_save_LIBS=$LIBS
28415LIBS="-lnsl  $LIBS"
28416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28417/* end confdefs.h.  */
28418
28419/* Override any GCC internal prototype to avoid an error.
28420   Use char because int might match the return type of a GCC
28421   builtin and then its argument prototype would still apply.  */
28422#ifdef __cplusplus
28423extern "C"
28424#endif
28425char gethostbyname ();
28426int
28427main ()
28428{
28429return gethostbyname ();
28430  ;
28431  return 0;
28432}
28433_ACEOF
28434if ac_fn_cxx_try_link "$LINENO"; then :
28435  ac_cv_lib_nsl_gethostbyname=yes
28436else
28437  ac_cv_lib_nsl_gethostbyname=no
28438fi
28439rm -f core conftest.err conftest.$ac_objext \
28440    conftest$ac_exeext conftest.$ac_ext
28441LIBS=$ac_check_lib_save_LIBS
28442fi
28443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28444$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28445if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28446  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28447fi
28448
28449      if test $ac_cv_lib_nsl_gethostbyname = no; then
28450	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28451$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28452if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28453  $as_echo_n "(cached) " >&6
28454else
28455  ac_check_lib_save_LIBS=$LIBS
28456LIBS="-lbsd  $LIBS"
28457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28458/* end confdefs.h.  */
28459
28460/* Override any GCC internal prototype to avoid an error.
28461   Use char because int might match the return type of a GCC
28462   builtin and then its argument prototype would still apply.  */
28463#ifdef __cplusplus
28464extern "C"
28465#endif
28466char gethostbyname ();
28467int
28468main ()
28469{
28470return gethostbyname ();
28471  ;
28472  return 0;
28473}
28474_ACEOF
28475if ac_fn_cxx_try_link "$LINENO"; then :
28476  ac_cv_lib_bsd_gethostbyname=yes
28477else
28478  ac_cv_lib_bsd_gethostbyname=no
28479fi
28480rm -f core conftest.err conftest.$ac_objext \
28481    conftest$ac_exeext conftest.$ac_ext
28482LIBS=$ac_check_lib_save_LIBS
28483fi
28484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28485$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28486if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28487  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28488fi
28489
28490      fi
28491    fi
28492
28493    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28494    # socket/setsockopt and other routines are undefined under SCO ODT
28495    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28496    # on later versions), says Simon Leinen: it contains gethostby*
28497    # variants that don't use the name server (or something).  -lsocket
28498    # must be given before -lnsl if both are needed.  We assume that
28499    # if connect needs -lnsl, so does gethostbyname.
28500    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28501if test "x$ac_cv_func_connect" = x""yes; then :
28502
28503fi
28504
28505    if test $ac_cv_func_connect = no; then
28506      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28507$as_echo_n "checking for connect in -lsocket... " >&6; }
28508if test "${ac_cv_lib_socket_connect+set}" = set; then :
28509  $as_echo_n "(cached) " >&6
28510else
28511  ac_check_lib_save_LIBS=$LIBS
28512LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28514/* end confdefs.h.  */
28515
28516/* Override any GCC internal prototype to avoid an error.
28517   Use char because int might match the return type of a GCC
28518   builtin and then its argument prototype would still apply.  */
28519#ifdef __cplusplus
28520extern "C"
28521#endif
28522char connect ();
28523int
28524main ()
28525{
28526return connect ();
28527  ;
28528  return 0;
28529}
28530_ACEOF
28531if ac_fn_cxx_try_link "$LINENO"; then :
28532  ac_cv_lib_socket_connect=yes
28533else
28534  ac_cv_lib_socket_connect=no
28535fi
28536rm -f core conftest.err conftest.$ac_objext \
28537    conftest$ac_exeext conftest.$ac_ext
28538LIBS=$ac_check_lib_save_LIBS
28539fi
28540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28541$as_echo "$ac_cv_lib_socket_connect" >&6; }
28542if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28543  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28544fi
28545
28546    fi
28547
28548    # Guillermo Gomez says -lposix is necessary on A/UX.
28549    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28550if test "x$ac_cv_func_remove" = x""yes; then :
28551
28552fi
28553
28554    if test $ac_cv_func_remove = no; then
28555      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28556$as_echo_n "checking for remove in -lposix... " >&6; }
28557if test "${ac_cv_lib_posix_remove+set}" = set; then :
28558  $as_echo_n "(cached) " >&6
28559else
28560  ac_check_lib_save_LIBS=$LIBS
28561LIBS="-lposix  $LIBS"
28562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28563/* end confdefs.h.  */
28564
28565/* Override any GCC internal prototype to avoid an error.
28566   Use char because int might match the return type of a GCC
28567   builtin and then its argument prototype would still apply.  */
28568#ifdef __cplusplus
28569extern "C"
28570#endif
28571char remove ();
28572int
28573main ()
28574{
28575return remove ();
28576  ;
28577  return 0;
28578}
28579_ACEOF
28580if ac_fn_cxx_try_link "$LINENO"; then :
28581  ac_cv_lib_posix_remove=yes
28582else
28583  ac_cv_lib_posix_remove=no
28584fi
28585rm -f core conftest.err conftest.$ac_objext \
28586    conftest$ac_exeext conftest.$ac_ext
28587LIBS=$ac_check_lib_save_LIBS
28588fi
28589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28590$as_echo "$ac_cv_lib_posix_remove" >&6; }
28591if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28592  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28593fi
28594
28595    fi
28596
28597    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28598    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28599if test "x$ac_cv_func_shmat" = x""yes; then :
28600
28601fi
28602
28603    if test $ac_cv_func_shmat = no; then
28604      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28605$as_echo_n "checking for shmat in -lipc... " >&6; }
28606if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28607  $as_echo_n "(cached) " >&6
28608else
28609  ac_check_lib_save_LIBS=$LIBS
28610LIBS="-lipc  $LIBS"
28611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28612/* end confdefs.h.  */
28613
28614/* Override any GCC internal prototype to avoid an error.
28615   Use char because int might match the return type of a GCC
28616   builtin and then its argument prototype would still apply.  */
28617#ifdef __cplusplus
28618extern "C"
28619#endif
28620char shmat ();
28621int
28622main ()
28623{
28624return shmat ();
28625  ;
28626  return 0;
28627}
28628_ACEOF
28629if ac_fn_cxx_try_link "$LINENO"; then :
28630  ac_cv_lib_ipc_shmat=yes
28631else
28632  ac_cv_lib_ipc_shmat=no
28633fi
28634rm -f core conftest.err conftest.$ac_objext \
28635    conftest$ac_exeext conftest.$ac_ext
28636LIBS=$ac_check_lib_save_LIBS
28637fi
28638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
28639$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
28640if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
28641  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
28642fi
28643
28644    fi
28645  fi
28646
28647  # Check for libraries that X11R6 Xt/Xaw programs need.
28648  ac_save_LDFLAGS=$LDFLAGS
28649  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
28650  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
28651  # check for ICE first), but we must link in the order -lSM -lICE or
28652  # we get undefined symbols.  So assume we have SM if we have ICE.
28653  # These have to be linked with before -lX11, unlike the other
28654  # libraries we check for below, so use a different variable.
28655  # John Interrante, Karl Berry
28656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
28657$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
28658if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
28659  $as_echo_n "(cached) " >&6
28660else
28661  ac_check_lib_save_LIBS=$LIBS
28662LIBS="-lICE $X_EXTRA_LIBS $LIBS"
28663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28664/* end confdefs.h.  */
28665
28666/* Override any GCC internal prototype to avoid an error.
28667   Use char because int might match the return type of a GCC
28668   builtin and then its argument prototype would still apply.  */
28669#ifdef __cplusplus
28670extern "C"
28671#endif
28672char IceConnectionNumber ();
28673int
28674main ()
28675{
28676return IceConnectionNumber ();
28677  ;
28678  return 0;
28679}
28680_ACEOF
28681if ac_fn_cxx_try_link "$LINENO"; then :
28682  ac_cv_lib_ICE_IceConnectionNumber=yes
28683else
28684  ac_cv_lib_ICE_IceConnectionNumber=no
28685fi
28686rm -f core conftest.err conftest.$ac_objext \
28687    conftest$ac_exeext conftest.$ac_ext
28688LIBS=$ac_check_lib_save_LIBS
28689fi
28690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
28691$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
28692if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
28693  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
28694fi
28695
28696  LDFLAGS=$ac_save_LDFLAGS
28697
28698fi
28699
28700
28701if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
28702
28703    # Print a helpful message on how to acquire the necessary build dependency.
28704    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28705    MISSING_DEPENDENCY=x11
28706    PKGHANDLER_COMMAND=
28707
28708    case $PKGHANDLER in
28709	apt-get)
28710                apt_help     $MISSING_DEPENDENCY ;;
28711    yum)
28712                yum_help     $MISSING_DEPENDENCY ;;
28713	port)
28714                port_help    $MISSING_DEPENDENCY ;;
28715	pkgutil)
28716                pkgutil_help $MISSING_DEPENDENCY ;;
28717	pkgadd)
28718                pkgadd_help  $MISSING_DEPENDENCY ;;
28719    * )
28720      break ;;
28721    esac
28722
28723    if test "x$PKGHANDLER_COMMAND" != x; then
28724        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28725    fi
28726
28727    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
28728fi
28729
28730# Some of the old makefiles require a setting of OPENWIN_HOME
28731# Since the X11R6 directory has disappeared on later Linuxes,
28732# we need to probe for it.
28733if test "x$OPENJDK_TARGET_OS" = xlinux; then
28734    if test -d "$SYS_ROOT/usr/X11R6"; then
28735        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
28736    fi
28737    if test -d "$SYS_ROOT/usr/include/X11"; then
28738        OPENWIN_HOME="$SYS_ROOT/usr"
28739    fi
28740fi
28741if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28742    OPENWIN_HOME="/usr/openwin"
28743fi
28744
28745
28746
28747#
28748# Weird Sol10 something check...TODO change to try compile
28749#
28750if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
28751  if test "`uname -r`" = "5.10"; then
28752     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28753     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28754     fi
28755  fi
28756fi
28757
28758ac_ext=c
28759ac_cpp='$CPP $CPPFLAGS'
28760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28762ac_compiler_gnu=$ac_cv_c_compiler_gnu
28763
28764OLD_CFLAGS="$CFLAGS"
28765CFLAGS="$CFLAGS $X_CFLAGS"
28766
28767# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28768for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28769do :
28770  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28771ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28772                   # include <X11/Xutil.h>
28773
28774"
28775if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28776  cat >>confdefs.h <<_ACEOF
28777#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28778_ACEOF
28779 X11_A_OK=yes
28780else
28781  X11_A_OK=no
28782fi
28783
28784done
28785
28786
28787CFLAGS="$OLD_CFLAGS"
28788ac_ext=cpp
28789ac_cpp='$CXXCPP $CPPFLAGS'
28790ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28791ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28792ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28793
28794
28795if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28796
28797    # Print a helpful message on how to acquire the necessary build dependency.
28798    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28799    MISSING_DEPENDENCY=x11
28800    PKGHANDLER_COMMAND=
28801
28802    case $PKGHANDLER in
28803	apt-get)
28804                apt_help     $MISSING_DEPENDENCY ;;
28805    yum)
28806                yum_help     $MISSING_DEPENDENCY ;;
28807	port)
28808                port_help    $MISSING_DEPENDENCY ;;
28809	pkgutil)
28810                pkgutil_help $MISSING_DEPENDENCY ;;
28811	pkgadd)
28812                pkgadd_help  $MISSING_DEPENDENCY ;;
28813    * )
28814      break ;;
28815    esac
28816
28817    if test "x$PKGHANDLER_COMMAND" != x; then
28818        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28819    fi
28820
28821    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28822fi
28823
28824
28825
28826
28827
28828
28829###############################################################################
28830#
28831# The common unix printing system cups is used to print from java.
28832#
28833
28834# Check whether --with-cups was given.
28835if test "${with_cups+set}" = set; then :
28836  withval=$with_cups;
28837fi
28838
28839
28840# Check whether --with-cups-include was given.
28841if test "${with_cups_include+set}" = set; then :
28842  withval=$with_cups_include;
28843fi
28844
28845
28846if test "x$CUPS_NOT_NEEDED" = xyes; then
28847	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28848		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28849$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28850	fi
28851	CUPS_CFLAGS=
28852else
28853	CUPS_FOUND=no
28854
28855	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28856	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28857	fi
28858
28859	if test "x${with_cups}" != x; then
28860	    CUPS_CFLAGS="-I${with_cups}/include"
28861	    CUPS_FOUND=yes
28862	fi
28863	if test "x${with_cups_include}" != x; then
28864	    CUPS_CFLAGS="-I${with_cups_include}"
28865	    CUPS_FOUND=yes
28866	fi
28867	if test "x$CUPS_FOUND" = xno; then
28868
28869
28870    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28871        # Source the builddeps file again, to make sure it uses the latest variables!
28872        . $builddepsfile
28873        # Look for a target and build machine specific resource!
28874        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28875        if test "x$resource" = x; then
28876            # Ok, lets instead look for a target specific resource
28877            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28878        fi
28879        if test "x$resource" = x; then
28880            # Ok, lets instead look for a build specific resource
28881            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28882        fi
28883        if test "x$resource" = x; then
28884            # Ok, lets instead look for a generic resource
28885            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28886            resource=${builddep_cups}
28887        fi
28888        if test "x$resource" != x; then
28889            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28890$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28891	    # If the resource in the builddeps.conf file is an existing directory,
28892	    # for example /java/linux/cups
28893	    if test -d ${resource}; then
28894	       depdir=${resource}
28895	    else
28896
28897# cups is for example mymodule
28898# $resource is for example libs/general/libmymod_1_2_3.zip
28899# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28900# $with_builddeps_dir is for example /localhome/builddeps
28901# depdir is the name of the variable into which we store the depdir, eg MYMOD
28902# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28903# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28904    filename=`basename $resource`
28905    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28906    filebase=${filename%%.*}
28907    extension=${filename#*.}
28908    installdir=$with_builddeps_dir/$filebase
28909    if test ! -f $installdir/$filename.unpacked; then
28910        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28911$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28912        if test ! -d $installdir; then
28913            mkdir -p $installdir
28914        fi
28915        if test ! -d $installdir; then
28916            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28917        fi
28918        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28919        touch $tmpfile
28920        if test ! -f $tmpfile; then
28921            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28922        fi
28923
28924    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28925    # $tmpfile is the local file name for the downloaded file.
28926    VALID_TOOL=no
28927    if test "x$BDEPS_FTP" = xwget; then
28928       VALID_TOOL=yes
28929       wget -O $tmpfile $with_builddeps_server/$resource
28930    fi
28931    if test "x$BDEPS_FTP" = xlftp; then
28932       VALID_TOOL=yes
28933       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28934    fi
28935    if test "x$BDEPS_FTP" = xftp; then
28936        VALID_TOOL=yes
28937        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28938        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28939        FTPUSERPWD=${FTPSERVER%%@*}
28940        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28941            FTPUSER=${userpwd%%:*}
28942            FTPPWD=${userpwd#*@}
28943            FTPSERVER=${FTPSERVER#*@}
28944        else
28945            FTPUSER=ftp
28946            FTPPWD=ftp
28947        fi
28948        # the "pass" command does not work on some
28949        # ftp clients (read ftp.exe) but if it works,
28950        # passive mode is better!
28951        (\
28952            echo "user $FTPUSER $FTPPWD"        ;\
28953            echo "pass"                         ;\
28954            echo "bin"                          ;\
28955            echo "get $FTPPATH $tmpfile"              ;\
28956        ) | ftp -in $FTPSERVER
28957    fi
28958    if test "x$VALID_TOOL" != xyes; then
28959       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28960    fi
28961
28962        mv $tmpfile $installdir/$filename
28963        if test ! -s $installdir/$filename; then
28964            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28965        fi
28966        case "$extension" in
28967            zip)  echo "Unzipping $installdir/$filename..."
28968               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28969            ;;
28970            tar.gz) echo "Untaring $installdir/$filename..."
28971               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28972            ;;
28973            tgz) echo "Untaring $installdir/$filename..."
28974               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28975            ;;
28976            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28977            ;;
28978        esac
28979    fi
28980    if test -f $installdir/$filename.unpacked; then
28981        depdir=$installdir
28982    fi
28983
28984	    fi
28985            # Source the builddeps file again, because in the previous command, the depdir
28986            # was updated to point at the current build dependency install directory.
28987            . $builddepsfile
28988            # Now extract variables from the builddeps.conf files.
28989            theroot=${builddep_cups_ROOT}
28990            thecflags=${builddep_cups_CFLAGS}
28991            thelibs=${builddep_cups_LIBS}
28992            if test "x$depdir" = x; then
28993                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28994            fi
28995            CUPS=$depdir
28996            if test "x$theroot" != x; then
28997               CUPS="$theroot"
28998            fi
28999            if test "x$thecflags" != x; then
29000               CUPS_CFLAGS="$thecflags"
29001            fi
29002            if test "x$thelibs" != x; then
29003               CUPS_LIBS="$thelibs"
29004            fi
29005            CUPS_FOUND=yes
29006
29007        fi
29008
29009    fi
29010
29011	fi
29012	if test "x$CUPS_FOUND" = xno; then
29013	    # Are the cups headers installed in the default /usr/include location?
29014	    for ac_header in cups/cups.h cups/ppd.h
29015do :
29016  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29017ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29018if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29019  cat >>confdefs.h <<_ACEOF
29020#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29021_ACEOF
29022 CUPS_FOUND=yes
29023	                      CUPS_CFLAGS=
29024	                      DEFAULT_CUPS=yes
29025fi
29026
29027done
29028
29029	fi
29030	if test "x$CUPS_FOUND" = xno; then
29031	    # Getting nervous now? Lets poke around for standard Solaris third-party
29032	    # package installation locations.
29033	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29034$as_echo_n "checking for cups headers... " >&6; }
29035	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29036	       # An SFW package seems to be installed!
29037	       CUPS_FOUND=yes
29038	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29039	    elif test -s /opt/csw/include/cups/cups.h; then
29040	       # A CSW package seems to be installed!
29041	       CUPS_FOUND=yes
29042	       CUPS_CFLAGS="-I/opt/csw/include"
29043	    fi
29044	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29045$as_echo "$CUPS_FOUND" >&6; }
29046	fi
29047	if test "x$CUPS_FOUND" = xno; then
29048
29049    # Print a helpful message on how to acquire the necessary build dependency.
29050    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29051    MISSING_DEPENDENCY=cups
29052    PKGHANDLER_COMMAND=
29053
29054    case $PKGHANDLER in
29055	apt-get)
29056                apt_help     $MISSING_DEPENDENCY ;;
29057    yum)
29058                yum_help     $MISSING_DEPENDENCY ;;
29059	port)
29060                port_help    $MISSING_DEPENDENCY ;;
29061	pkgutil)
29062                pkgutil_help $MISSING_DEPENDENCY ;;
29063	pkgadd)
29064                pkgadd_help  $MISSING_DEPENDENCY ;;
29065    * )
29066      break ;;
29067    esac
29068
29069    if test "x$PKGHANDLER_COMMAND" != x; then
29070        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29071    fi
29072
29073	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29074	fi
29075fi
29076
29077
29078
29079
29080
29081
29082###############################################################################
29083#
29084# The ubiquitous freetype2 library is used to render fonts.
29085#
29086
29087# Check whether --with-freetype was given.
29088if test "${with_freetype+set}" = set; then :
29089  withval=$with_freetype;
29090fi
29091
29092
29093# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29094USING_SYSTEM_FT_LIB=false
29095
29096if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29097	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29098		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29099$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29100	fi
29101	FREETYPE2_CFLAGS=
29102	FREETYPE2_LIBS=
29103        FREETYPE2_LIB_PATH=
29104else
29105	FREETYPE2_FOUND=no
29106
29107	if test "x$with_freetype" != x; then
29108
29109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29110
29111  # Input might be given as Windows format, start by converting to
29112  # unix format.
29113  path="$with_freetype"
29114  new_path=`$CYGPATH -u "$path"`
29115
29116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29119  # "foo.exe" is OK but "foo" is an error.
29120  #
29121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29122  # It is also a way to make sure we got the proper file name for the real test later on.
29123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29124  if test "x$test_shortpath" = x; then
29125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29126$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29127    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29128  fi
29129
29130  # Call helper function which possibly converts this using DOS-style short mode.
29131  # If so, the updated path is stored in $new_path.
29132
29133  input_path="$new_path"
29134  # Check if we need to convert this using DOS-style short mode. If the path
29135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29136  # take no chances and rewrite it.
29137  # Note: m4 eats our [], so we need to use [ and ] instead.
29138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29139  if test "x$has_forbidden_chars" != x; then
29140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29144      # Going to short mode and back again did indeed matter. Since short mode is
29145      # case insensitive, let's make it lowercase to improve readability.
29146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29147      # Now convert it back to Unix-stile (cygpath)
29148      input_path=`$CYGPATH -u "$shortmode_path"`
29149      new_path="$input_path"
29150    fi
29151  fi
29152
29153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29154  if test "x$test_cygdrive_prefix" = x; then
29155    # As a simple fix, exclude /usr/bin since it's not a real path.
29156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29158      # a path prefixed by /cygdrive for fixpath to work.
29159      new_path="$CYGWIN_ROOT_PATH$input_path"
29160    fi
29161  fi
29162
29163
29164  if test "x$path" != "x$new_path"; then
29165    with_freetype="$new_path"
29166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29167$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29168  fi
29169
29170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29171
29172  path="$with_freetype"
29173  has_colon=`$ECHO $path | $GREP ^.:`
29174  new_path="$path"
29175  if test "x$has_colon" = x; then
29176    # Not in mixed or Windows style, start by that.
29177    new_path=`cmd //c echo $path`
29178  fi
29179
29180
29181  input_path="$new_path"
29182  # Check if we need to convert this using DOS-style short mode. If the path
29183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29184  # take no chances and rewrite it.
29185  # Note: m4 eats our [], so we need to use [ and ] instead.
29186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29187  if test "x$has_forbidden_chars" != x; then
29188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29190  fi
29191
29192
29193  windows_path="$new_path"
29194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29195    unix_path=`$CYGPATH -u "$windows_path"`
29196    new_path="$unix_path"
29197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29199    new_path="$unix_path"
29200  fi
29201
29202  if test "x$path" != "x$new_path"; then
29203    with_freetype="$new_path"
29204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29205$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29206  fi
29207
29208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29210
29211  else
29212    # We're on a posix platform. Hooray! :)
29213    path="$with_freetype"
29214
29215    if test ! -f "$path" && test ! -d "$path"; then
29216      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29217    fi
29218
29219    has_space=`$ECHO "$path" | $GREP " "`
29220    if test "x$has_space" != x; then
29221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29222$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29224    fi
29225  fi
29226
29227	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29228            FREETYPE2_LIB_PATH="$with_freetype/lib"
29229            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29230                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29231                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29232            fi
29233            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29234                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29235            fi
29236	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29237            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29238                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29239            fi
29240 	    FREETYPE2_FOUND=yes
29241   	    if test "x$FREETYPE2_FOUND" = xyes; then
29242	        # Verify that the directories exist
29243                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29244		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29245		fi
29246	        # List the contents of the lib.
29247		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29248                if test "x$FREETYPELIB" = x; then
29249		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29250		fi
29251	        # Check one h-file
29252                if ! test -s "$with_freetype/include/ft2build.h"; then
29253		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29254		fi
29255            fi
29256        fi
29257	if test "x$FREETYPE2_FOUND" = xno; then
29258
29259
29260    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29261        # Source the builddeps file again, to make sure it uses the latest variables!
29262        . $builddepsfile
29263        # Look for a target and build machine specific resource!
29264        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29265        if test "x$resource" = x; then
29266            # Ok, lets instead look for a target specific resource
29267            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29268        fi
29269        if test "x$resource" = x; then
29270            # Ok, lets instead look for a build specific resource
29271            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29272        fi
29273        if test "x$resource" = x; then
29274            # Ok, lets instead look for a generic resource
29275            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29276            resource=${builddep_freetype2}
29277        fi
29278        if test "x$resource" != x; then
29279            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29280$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29281	    # If the resource in the builddeps.conf file is an existing directory,
29282	    # for example /java/linux/cups
29283	    if test -d ${resource}; then
29284	       depdir=${resource}
29285	    else
29286
29287# freetype2 is for example mymodule
29288# $resource is for example libs/general/libmymod_1_2_3.zip
29289# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29290# $with_builddeps_dir is for example /localhome/builddeps
29291# depdir is the name of the variable into which we store the depdir, eg MYMOD
29292# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29293# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29294    filename=`basename $resource`
29295    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29296    filebase=${filename%%.*}
29297    extension=${filename#*.}
29298    installdir=$with_builddeps_dir/$filebase
29299    if test ! -f $installdir/$filename.unpacked; then
29300        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29301$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29302        if test ! -d $installdir; then
29303            mkdir -p $installdir
29304        fi
29305        if test ! -d $installdir; then
29306            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29307        fi
29308        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29309        touch $tmpfile
29310        if test ! -f $tmpfile; then
29311            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29312        fi
29313
29314    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29315    # $tmpfile is the local file name for the downloaded file.
29316    VALID_TOOL=no
29317    if test "x$BDEPS_FTP" = xwget; then
29318       VALID_TOOL=yes
29319       wget -O $tmpfile $with_builddeps_server/$resource
29320    fi
29321    if test "x$BDEPS_FTP" = xlftp; then
29322       VALID_TOOL=yes
29323       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29324    fi
29325    if test "x$BDEPS_FTP" = xftp; then
29326        VALID_TOOL=yes
29327        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29328        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29329        FTPUSERPWD=${FTPSERVER%%@*}
29330        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29331            FTPUSER=${userpwd%%:*}
29332            FTPPWD=${userpwd#*@}
29333            FTPSERVER=${FTPSERVER#*@}
29334        else
29335            FTPUSER=ftp
29336            FTPPWD=ftp
29337        fi
29338        # the "pass" command does not work on some
29339        # ftp clients (read ftp.exe) but if it works,
29340        # passive mode is better!
29341        (\
29342            echo "user $FTPUSER $FTPPWD"        ;\
29343            echo "pass"                         ;\
29344            echo "bin"                          ;\
29345            echo "get $FTPPATH $tmpfile"              ;\
29346        ) | ftp -in $FTPSERVER
29347    fi
29348    if test "x$VALID_TOOL" != xyes; then
29349       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29350    fi
29351
29352        mv $tmpfile $installdir/$filename
29353        if test ! -s $installdir/$filename; then
29354            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29355        fi
29356        case "$extension" in
29357            zip)  echo "Unzipping $installdir/$filename..."
29358               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29359            ;;
29360            tar.gz) echo "Untaring $installdir/$filename..."
29361               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29362            ;;
29363            tgz) echo "Untaring $installdir/$filename..."
29364               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29365            ;;
29366            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29367            ;;
29368        esac
29369    fi
29370    if test -f $installdir/$filename.unpacked; then
29371        depdir=$installdir
29372    fi
29373
29374	    fi
29375            # Source the builddeps file again, because in the previous command, the depdir
29376            # was updated to point at the current build dependency install directory.
29377            . $builddepsfile
29378            # Now extract variables from the builddeps.conf files.
29379            theroot=${builddep_freetype2_ROOT}
29380            thecflags=${builddep_freetype2_CFLAGS}
29381            thelibs=${builddep_freetype2_LIBS}
29382            if test "x$depdir" = x; then
29383                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29384            fi
29385            FREETYPE2=$depdir
29386            if test "x$theroot" != x; then
29387               FREETYPE2="$theroot"
29388            fi
29389            if test "x$thecflags" != x; then
29390               FREETYPE2_CFLAGS="$thecflags"
29391            fi
29392            if test "x$thelibs" != x; then
29393               FREETYPE2_LIBS="$thelibs"
29394            fi
29395            FREETYPE2_FOUND=yes
29396            else FREETYPE2_FOUND=no
29397
29398        fi
29399        else FREETYPE2_FOUND=no
29400
29401    fi
29402
29403            USING_SYSTEM_FT_LIB=true
29404	fi
29405	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29406            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29407
29408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29409
29410  # Input might be given as Windows format, start by converting to
29411  # unix format.
29412  path="$FREETYPELOCATION"
29413  new_path=`$CYGPATH -u "$path"`
29414
29415  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29416  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29417  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29418  # "foo.exe" is OK but "foo" is an error.
29419  #
29420  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29421  # It is also a way to make sure we got the proper file name for the real test later on.
29422  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29423  if test "x$test_shortpath" = x; then
29424    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29425$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29426    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29427  fi
29428
29429  # Call helper function which possibly converts this using DOS-style short mode.
29430  # If so, the updated path is stored in $new_path.
29431
29432  input_path="$new_path"
29433  # Check if we need to convert this using DOS-style short mode. If the path
29434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29435  # take no chances and rewrite it.
29436  # Note: m4 eats our [], so we need to use [ and ] instead.
29437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29438  if test "x$has_forbidden_chars" != x; then
29439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29440    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29441    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29442    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29443      # Going to short mode and back again did indeed matter. Since short mode is
29444      # case insensitive, let's make it lowercase to improve readability.
29445      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29446      # Now convert it back to Unix-stile (cygpath)
29447      input_path=`$CYGPATH -u "$shortmode_path"`
29448      new_path="$input_path"
29449    fi
29450  fi
29451
29452  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29453  if test "x$test_cygdrive_prefix" = x; then
29454    # As a simple fix, exclude /usr/bin since it's not a real path.
29455    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29456      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29457      # a path prefixed by /cygdrive for fixpath to work.
29458      new_path="$CYGWIN_ROOT_PATH$input_path"
29459    fi
29460  fi
29461
29462
29463  if test "x$path" != "x$new_path"; then
29464    FREETYPELOCATION="$new_path"
29465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29466$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29467  fi
29468
29469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29470
29471  path="$FREETYPELOCATION"
29472  has_colon=`$ECHO $path | $GREP ^.:`
29473  new_path="$path"
29474  if test "x$has_colon" = x; then
29475    # Not in mixed or Windows style, start by that.
29476    new_path=`cmd //c echo $path`
29477  fi
29478
29479
29480  input_path="$new_path"
29481  # Check if we need to convert this using DOS-style short mode. If the path
29482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29483  # take no chances and rewrite it.
29484  # Note: m4 eats our [], so we need to use [ and ] instead.
29485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29486  if test "x$has_forbidden_chars" != x; then
29487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29489  fi
29490
29491
29492  windows_path="$new_path"
29493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29494    unix_path=`$CYGPATH -u "$windows_path"`
29495    new_path="$unix_path"
29496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29498    new_path="$unix_path"
29499  fi
29500
29501  if test "x$path" != "x$new_path"; then
29502    FREETYPELOCATION="$new_path"
29503    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29504$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29505  fi
29506
29507  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29508  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29509
29510  else
29511    # We're on a posix platform. Hooray! :)
29512    path="$FREETYPELOCATION"
29513
29514    if test ! -f "$path" && test ! -d "$path"; then
29515      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29516    fi
29517
29518    has_space=`$ECHO "$path" | $GREP " "`
29519    if test "x$has_space" != x; then
29520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29521$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29522      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29523    fi
29524  fi
29525
29526	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29527$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29528	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29529	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29530	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29531 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29532                if ! test -s "$FREETYPE2_LIBS"; then
29533		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29534		fi
29535                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29536		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29537		fi
29538                USING_SYSTEM_FT_LIB=true
29539                FREETYPE2_FOUND=yes
29540	    fi
29541	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29542$as_echo "$FREETYPE2_FOUND" >&6; }
29543        fi
29544	if test "x$FREETYPE2_FOUND" = xno; then
29545
29546pkg_failed=no
29547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29548$as_echo_n "checking for FREETYPE2... " >&6; }
29549
29550if test -n "$FREETYPE2_CFLAGS"; then
29551    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29552 elif test -n "$PKG_CONFIG"; then
29553    if test -n "$PKG_CONFIG" && \
29554    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29555  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29556  ac_status=$?
29557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29558  test $ac_status = 0; }; then
29559  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29560else
29561  pkg_failed=yes
29562fi
29563 else
29564    pkg_failed=untried
29565fi
29566if test -n "$FREETYPE2_LIBS"; then
29567    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29568 elif test -n "$PKG_CONFIG"; then
29569    if test -n "$PKG_CONFIG" && \
29570    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29571  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29572  ac_status=$?
29573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29574  test $ac_status = 0; }; then
29575  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29576else
29577  pkg_failed=yes
29578fi
29579 else
29580    pkg_failed=untried
29581fi
29582
29583
29584
29585if test $pkg_failed = yes; then
29586
29587if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29588        _pkg_short_errors_supported=yes
29589else
29590        _pkg_short_errors_supported=no
29591fi
29592        if test $_pkg_short_errors_supported = yes; then
29593	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29594        else
29595	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29596        fi
29597	# Put the nasty error message in config.log where it belongs
29598	echo "$FREETYPE2_PKG_ERRORS" >&5
29599
29600	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29601$as_echo "no" >&6; }
29602                FREETYPE2_FOUND=no
29603elif test $pkg_failed = untried; then
29604	FREETYPE2_FOUND=no
29605else
29606	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29607	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29609$as_echo "yes" >&6; }
29610	FREETYPE2_FOUND=yes
29611fi
29612            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29613            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29614            USING_SYSTEM_FT_LIB=true
29615            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29616            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29617              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29618            fi
29619	fi
29620	if test "x$FREETYPE2_FOUND" = xno; then
29621	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29622$as_echo_n "checking for freetype in some standard locations... " >&6; }
29623
29624	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29625	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29626	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29627	    fi
29628	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29629	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29630	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29631	    fi
29632
29633	    PREV_CXXCFLAGS="$CXXFLAGS"
29634	    PREV_LDFLAGS="$LDFLAGS"
29635	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29636	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
29637	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29638/* end confdefs.h.  */
29639#include<ft2build.h>
29640	                    #include FT_FREETYPE_H
29641	                   int main() { return 0; }
29642
29643_ACEOF
29644if ac_fn_cxx_try_link "$LINENO"; then :
29645
29646	                      # Yes, the default cflags and libs did the trick.
29647	                      FREETYPE2_FOUND=yes
29648	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
29649	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
29650
29651else
29652
29653	                      FREETYPE2_FOUND=no
29654
29655fi
29656rm -f core conftest.err conftest.$ac_objext \
29657    conftest$ac_exeext conftest.$ac_ext
29658            CXXCFLAGS="$PREV_CXXFLAGS"
29659	    LDFLAGS="$PREV_LDFLAGS"
29660	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29661$as_echo "$FREETYPE2_FOUND" >&6; }
29662            USING_SYSTEM_FT_LIB=true
29663	fi
29664	if test "x$FREETYPE2_FOUND" = xno; then
29665
29666    # Print a helpful message on how to acquire the necessary build dependency.
29667    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
29668    MISSING_DEPENDENCY=freetype2
29669    PKGHANDLER_COMMAND=
29670
29671    case $PKGHANDLER in
29672	apt-get)
29673                apt_help     $MISSING_DEPENDENCY ;;
29674    yum)
29675                yum_help     $MISSING_DEPENDENCY ;;
29676	port)
29677                port_help    $MISSING_DEPENDENCY ;;
29678	pkgutil)
29679                pkgutil_help $MISSING_DEPENDENCY ;;
29680	pkgadd)
29681                pkgadd_help  $MISSING_DEPENDENCY ;;
29682    * )
29683      break ;;
29684    esac
29685
29686    if test "x$PKGHANDLER_COMMAND" != x; then
29687        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29688    fi
29689
29690		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29691	fi
29692
29693        if test "x$OPENJDK_TARGET_OS" != xwindows; then
29694            # AC_CHECK_LIB does not support use of cl.exe
29695            PREV_LDFLAGS="$LDFLAGS"
29696            LDFLAGS="$FREETYPE2_LIBS"
29697            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
29698$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
29699if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
29700  $as_echo_n "(cached) " >&6
29701else
29702  ac_check_lib_save_LIBS=$LIBS
29703LIBS="-lfreetype  $LIBS"
29704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29705/* end confdefs.h.  */
29706
29707/* Override any GCC internal prototype to avoid an error.
29708   Use char because int might match the return type of a GCC
29709   builtin and then its argument prototype would still apply.  */
29710#ifdef __cplusplus
29711extern "C"
29712#endif
29713char FT_Init_FreeType ();
29714int
29715main ()
29716{
29717return FT_Init_FreeType ();
29718  ;
29719  return 0;
29720}
29721_ACEOF
29722if ac_fn_cxx_try_link "$LINENO"; then :
29723  ac_cv_lib_freetype_FT_Init_FreeType=yes
29724else
29725  ac_cv_lib_freetype_FT_Init_FreeType=no
29726fi
29727rm -f core conftest.err conftest.$ac_objext \
29728    conftest$ac_exeext conftest.$ac_ext
29729LIBS=$ac_check_lib_save_LIBS
29730fi
29731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
29732$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
29733if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
29734  FREETYPE2_FOUND=true
29735else
29736  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29737fi
29738
29739            LDFLAGS="$PREV_LDFLAGS"
29740        fi
29741fi
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751###############################################################################
29752#
29753# Check for alsa headers and libraries. Used on Linux/GNU systems.
29754#
29755
29756# Check whether --with-alsa was given.
29757if test "${with_alsa+set}" = set; then :
29758  withval=$with_alsa;
29759fi
29760
29761
29762# Check whether --with-alsa-include was given.
29763if test "${with_alsa_include+set}" = set; then :
29764  withval=$with_alsa_include;
29765fi
29766
29767
29768# Check whether --with-alsa-lib was given.
29769if test "${with_alsa_lib+set}" = set; then :
29770  withval=$with_alsa_lib;
29771fi
29772
29773
29774if test "x$ALSA_NOT_NEEDED" = xyes; then
29775	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29776		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29777$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29778	fi
29779	ALSA_CFLAGS=
29780	ALSA_LIBS=
29781else
29782	ALSA_FOUND=no
29783
29784	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29785	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29786	fi
29787
29788	if test "x${with_alsa}" != x; then
29789	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29790	    ALSA_CFLAGS="-I${with_alsa}/include"
29791	    ALSA_FOUND=yes
29792	fi
29793	if test "x${with_alsa_include}" != x; then
29794	    ALSA_CFLAGS="-I${with_alsa_include}"
29795	    ALSA_FOUND=yes
29796	fi
29797	if test "x${with_alsa_lib}" != x; then
29798	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29799	    ALSA_FOUND=yes
29800	fi
29801	if test "x$ALSA_FOUND" = xno; then
29802
29803
29804    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29805        # Source the builddeps file again, to make sure it uses the latest variables!
29806        . $builddepsfile
29807        # Look for a target and build machine specific resource!
29808        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29809        if test "x$resource" = x; then
29810            # Ok, lets instead look for a target specific resource
29811            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29812        fi
29813        if test "x$resource" = x; then
29814            # Ok, lets instead look for a build specific resource
29815            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29816        fi
29817        if test "x$resource" = x; then
29818            # Ok, lets instead look for a generic resource
29819            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29820            resource=${builddep_alsa}
29821        fi
29822        if test "x$resource" != x; then
29823            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29824$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29825	    # If the resource in the builddeps.conf file is an existing directory,
29826	    # for example /java/linux/cups
29827	    if test -d ${resource}; then
29828	       depdir=${resource}
29829	    else
29830
29831# alsa is for example mymodule
29832# $resource is for example libs/general/libmymod_1_2_3.zip
29833# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29834# $with_builddeps_dir is for example /localhome/builddeps
29835# depdir is the name of the variable into which we store the depdir, eg MYMOD
29836# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29837# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29838    filename=`basename $resource`
29839    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29840    filebase=${filename%%.*}
29841    extension=${filename#*.}
29842    installdir=$with_builddeps_dir/$filebase
29843    if test ! -f $installdir/$filename.unpacked; then
29844        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29845$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29846        if test ! -d $installdir; then
29847            mkdir -p $installdir
29848        fi
29849        if test ! -d $installdir; then
29850            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29851        fi
29852        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29853        touch $tmpfile
29854        if test ! -f $tmpfile; then
29855            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29856        fi
29857
29858    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29859    # $tmpfile is the local file name for the downloaded file.
29860    VALID_TOOL=no
29861    if test "x$BDEPS_FTP" = xwget; then
29862       VALID_TOOL=yes
29863       wget -O $tmpfile $with_builddeps_server/$resource
29864    fi
29865    if test "x$BDEPS_FTP" = xlftp; then
29866       VALID_TOOL=yes
29867       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29868    fi
29869    if test "x$BDEPS_FTP" = xftp; then
29870        VALID_TOOL=yes
29871        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29872        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29873        FTPUSERPWD=${FTPSERVER%%@*}
29874        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29875            FTPUSER=${userpwd%%:*}
29876            FTPPWD=${userpwd#*@}
29877            FTPSERVER=${FTPSERVER#*@}
29878        else
29879            FTPUSER=ftp
29880            FTPPWD=ftp
29881        fi
29882        # the "pass" command does not work on some
29883        # ftp clients (read ftp.exe) but if it works,
29884        # passive mode is better!
29885        (\
29886            echo "user $FTPUSER $FTPPWD"        ;\
29887            echo "pass"                         ;\
29888            echo "bin"                          ;\
29889            echo "get $FTPPATH $tmpfile"              ;\
29890        ) | ftp -in $FTPSERVER
29891    fi
29892    if test "x$VALID_TOOL" != xyes; then
29893       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29894    fi
29895
29896        mv $tmpfile $installdir/$filename
29897        if test ! -s $installdir/$filename; then
29898            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29899        fi
29900        case "$extension" in
29901            zip)  echo "Unzipping $installdir/$filename..."
29902               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29903            ;;
29904            tar.gz) echo "Untaring $installdir/$filename..."
29905               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29906            ;;
29907            tgz) echo "Untaring $installdir/$filename..."
29908               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29909            ;;
29910            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29911            ;;
29912        esac
29913    fi
29914    if test -f $installdir/$filename.unpacked; then
29915        depdir=$installdir
29916    fi
29917
29918	    fi
29919            # Source the builddeps file again, because in the previous command, the depdir
29920            # was updated to point at the current build dependency install directory.
29921            . $builddepsfile
29922            # Now extract variables from the builddeps.conf files.
29923            theroot=${builddep_alsa_ROOT}
29924            thecflags=${builddep_alsa_CFLAGS}
29925            thelibs=${builddep_alsa_LIBS}
29926            if test "x$depdir" = x; then
29927                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29928            fi
29929            ALSA=$depdir
29930            if test "x$theroot" != x; then
29931               ALSA="$theroot"
29932            fi
29933            if test "x$thecflags" != x; then
29934               ALSA_CFLAGS="$thecflags"
29935            fi
29936            if test "x$thelibs" != x; then
29937               ALSA_LIBS="$thelibs"
29938            fi
29939            ALSA_FOUND=yes
29940            else ALSA_FOUND=no
29941
29942        fi
29943        else ALSA_FOUND=no
29944
29945    fi
29946
29947	fi
29948	if test "x$ALSA_FOUND" = xno; then
29949
29950pkg_failed=no
29951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29952$as_echo_n "checking for ALSA... " >&6; }
29953
29954if test -n "$ALSA_CFLAGS"; then
29955    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29956 elif test -n "$PKG_CONFIG"; then
29957    if test -n "$PKG_CONFIG" && \
29958    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29959  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29960  ac_status=$?
29961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29962  test $ac_status = 0; }; then
29963  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29964else
29965  pkg_failed=yes
29966fi
29967 else
29968    pkg_failed=untried
29969fi
29970if test -n "$ALSA_LIBS"; then
29971    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29972 elif test -n "$PKG_CONFIG"; then
29973    if test -n "$PKG_CONFIG" && \
29974    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29975  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29976  ac_status=$?
29977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29978  test $ac_status = 0; }; then
29979  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29980else
29981  pkg_failed=yes
29982fi
29983 else
29984    pkg_failed=untried
29985fi
29986
29987
29988
29989if test $pkg_failed = yes; then
29990
29991if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29992        _pkg_short_errors_supported=yes
29993else
29994        _pkg_short_errors_supported=no
29995fi
29996        if test $_pkg_short_errors_supported = yes; then
29997	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29998        else
29999	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30000        fi
30001	# Put the nasty error message in config.log where it belongs
30002	echo "$ALSA_PKG_ERRORS" >&5
30003
30004	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30005$as_echo "no" >&6; }
30006                ALSA_FOUND=no
30007elif test $pkg_failed = untried; then
30008	ALSA_FOUND=no
30009else
30010	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30011	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30013$as_echo "yes" >&6; }
30014	ALSA_FOUND=yes
30015fi
30016	fi
30017	if test "x$ALSA_FOUND" = xno; then
30018	    for ac_header in alsa/asoundlib.h
30019do :
30020  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30021if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30022  cat >>confdefs.h <<_ACEOF
30023#define HAVE_ALSA_ASOUNDLIB_H 1
30024_ACEOF
30025 ALSA_FOUND=yes
30026	                      ALSA_CFLAGS=-Iignoreme
30027	                      ALSA_LIBS=-lasound
30028	                      DEFAULT_ALSA=yes
30029else
30030  ALSA_FOUND=no
30031fi
30032
30033done
30034
30035	fi
30036	if test "x$ALSA_FOUND" = xno; then
30037
30038    # Print a helpful message on how to acquire the necessary build dependency.
30039    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30040    MISSING_DEPENDENCY=alsa
30041    PKGHANDLER_COMMAND=
30042
30043    case $PKGHANDLER in
30044	apt-get)
30045                apt_help     $MISSING_DEPENDENCY ;;
30046    yum)
30047                yum_help     $MISSING_DEPENDENCY ;;
30048	port)
30049                port_help    $MISSING_DEPENDENCY ;;
30050	pkgutil)
30051                pkgutil_help $MISSING_DEPENDENCY ;;
30052	pkgadd)
30053                pkgadd_help  $MISSING_DEPENDENCY ;;
30054    * )
30055      break ;;
30056    esac
30057
30058    if test "x$PKGHANDLER_COMMAND" != x; then
30059        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30060    fi
30061
30062	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30063	fi
30064fi
30065
30066
30067
30068
30069
30070
30071
30072###############################################################################
30073#
30074# Check for the jpeg library
30075#
30076
30077USE_EXTERNAL_LIBJPEG=true
30078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30079$as_echo_n "checking for main in -ljpeg... " >&6; }
30080if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30081  $as_echo_n "(cached) " >&6
30082else
30083  ac_check_lib_save_LIBS=$LIBS
30084LIBS="-ljpeg  $LIBS"
30085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30086/* end confdefs.h.  */
30087
30088
30089int
30090main ()
30091{
30092return main ();
30093  ;
30094  return 0;
30095}
30096_ACEOF
30097if ac_fn_cxx_try_link "$LINENO"; then :
30098  ac_cv_lib_jpeg_main=yes
30099else
30100  ac_cv_lib_jpeg_main=no
30101fi
30102rm -f core conftest.err conftest.$ac_objext \
30103    conftest$ac_exeext conftest.$ac_ext
30104LIBS=$ac_check_lib_save_LIBS
30105fi
30106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30107$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30108if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30109  cat >>confdefs.h <<_ACEOF
30110#define HAVE_LIBJPEG 1
30111_ACEOF
30112
30113  LIBS="-ljpeg $LIBS"
30114
30115else
30116   USE_EXTERNAL_LIBJPEG=false
30117               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30118$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30119
30120fi
30121
30122
30123
30124###############################################################################
30125#
30126# Check for the gif library
30127#
30128
30129USE_EXTERNAL_LIBJPEG=true
30130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30131$as_echo_n "checking for main in -lgif... " >&6; }
30132if test "${ac_cv_lib_gif_main+set}" = set; then :
30133  $as_echo_n "(cached) " >&6
30134else
30135  ac_check_lib_save_LIBS=$LIBS
30136LIBS="-lgif  $LIBS"
30137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30138/* end confdefs.h.  */
30139
30140
30141int
30142main ()
30143{
30144return main ();
30145  ;
30146  return 0;
30147}
30148_ACEOF
30149if ac_fn_cxx_try_link "$LINENO"; then :
30150  ac_cv_lib_gif_main=yes
30151else
30152  ac_cv_lib_gif_main=no
30153fi
30154rm -f core conftest.err conftest.$ac_objext \
30155    conftest$ac_exeext conftest.$ac_ext
30156LIBS=$ac_check_lib_save_LIBS
30157fi
30158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30159$as_echo "$ac_cv_lib_gif_main" >&6; }
30160if test "x$ac_cv_lib_gif_main" = x""yes; then :
30161  cat >>confdefs.h <<_ACEOF
30162#define HAVE_LIBGIF 1
30163_ACEOF
30164
30165  LIBS="-lgif $LIBS"
30166
30167else
30168   USE_EXTERNAL_LIBGIF=false
30169               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30170$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30171
30172fi
30173
30174
30175
30176###############################################################################
30177#
30178# Check for the zlib library
30179#
30180
30181
30182# Check whether --with-zlib was given.
30183if test "${with_zlib+set}" = set; then :
30184  withval=$with_zlib;
30185fi
30186
30187
30188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30189$as_echo_n "checking for compress in -lz... " >&6; }
30190if test "${ac_cv_lib_z_compress+set}" = set; then :
30191  $as_echo_n "(cached) " >&6
30192else
30193  ac_check_lib_save_LIBS=$LIBS
30194LIBS="-lz  $LIBS"
30195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30196/* end confdefs.h.  */
30197
30198/* Override any GCC internal prototype to avoid an error.
30199   Use char because int might match the return type of a GCC
30200   builtin and then its argument prototype would still apply.  */
30201#ifdef __cplusplus
30202extern "C"
30203#endif
30204char compress ();
30205int
30206main ()
30207{
30208return compress ();
30209  ;
30210  return 0;
30211}
30212_ACEOF
30213if ac_fn_cxx_try_link "$LINENO"; then :
30214  ac_cv_lib_z_compress=yes
30215else
30216  ac_cv_lib_z_compress=no
30217fi
30218rm -f core conftest.err conftest.$ac_objext \
30219    conftest$ac_exeext conftest.$ac_ext
30220LIBS=$ac_check_lib_save_LIBS
30221fi
30222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30223$as_echo "$ac_cv_lib_z_compress" >&6; }
30224if test "x$ac_cv_lib_z_compress" = x""yes; then :
30225   ZLIB_FOUND=yes
30226else
30227   ZLIB_FOUND=no
30228fi
30229
30230
30231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30232$as_echo_n "checking for which zlib to use... " >&6; }
30233
30234DEFAULT_ZLIB=bundled
30235if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30236#
30237# On macosx default is system...on others default is
30238#
30239    DEFAULT_ZLIB=system
30240fi
30241
30242if test "x${ZLIB_FOUND}" != "xyes"; then
30243#
30244# If we don't find any system...set default to bundled
30245#
30246    DEFAULT_ZLIB=bundled
30247fi
30248
30249#
30250# If user didn't specify, use DEFAULT_ZLIB
30251#
30252if test "x${with_zlib}" = "x"; then
30253    with_zlib=${DEFAULT_ZLIB}
30254fi
30255
30256if test "x${with_zlib}" = "xbundled"; then
30257    USE_EXTERNAL_LIBZ=false
30258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30259$as_echo "bundled" >&6; }
30260elif test "x${with_zlib}" = "xsystem"; then
30261    if test "x${ZLIB_FOUND}" = "xyes"; then
30262        USE_EXTERNAL_LIBZ=true
30263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30264$as_echo "system" >&6; }
30265    else
30266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30267$as_echo "system not found" >&6; }
30268        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30269    fi
30270else
30271    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30272fi
30273
30274
30275
30276###############################################################################
30277LIBZIP_CAN_USE_MMAP=true
30278
30279
30280
30281###############################################################################
30282#
30283# Check if altzone exists in time.h
30284#
30285
30286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30287/* end confdefs.h.  */
30288#include <time.h>
30289int
30290main ()
30291{
30292return (int)altzone;
30293  ;
30294  return 0;
30295}
30296_ACEOF
30297if ac_fn_cxx_try_link "$LINENO"; then :
30298  has_altzone=yes
30299else
30300  has_altzone=no
30301fi
30302rm -f core conftest.err conftest.$ac_objext \
30303    conftest$ac_exeext conftest.$ac_ext
30304if test "x$has_altzone" = xyes; then
30305
30306$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30307
30308fi
30309
30310###############################################################################
30311#
30312# Check the maths library
30313#
30314
30315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30316$as_echo_n "checking for cos in -lm... " >&6; }
30317if test "${ac_cv_lib_m_cos+set}" = set; then :
30318  $as_echo_n "(cached) " >&6
30319else
30320  ac_check_lib_save_LIBS=$LIBS
30321LIBS="-lm  $LIBS"
30322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30323/* end confdefs.h.  */
30324
30325/* Override any GCC internal prototype to avoid an error.
30326   Use char because int might match the return type of a GCC
30327   builtin and then its argument prototype would still apply.  */
30328#ifdef __cplusplus
30329extern "C"
30330#endif
30331char cos ();
30332int
30333main ()
30334{
30335return cos ();
30336  ;
30337  return 0;
30338}
30339_ACEOF
30340if ac_fn_cxx_try_link "$LINENO"; then :
30341  ac_cv_lib_m_cos=yes
30342else
30343  ac_cv_lib_m_cos=no
30344fi
30345rm -f core conftest.err conftest.$ac_objext \
30346    conftest$ac_exeext conftest.$ac_ext
30347LIBS=$ac_check_lib_save_LIBS
30348fi
30349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30350$as_echo "$ac_cv_lib_m_cos" >&6; }
30351if test "x$ac_cv_lib_m_cos" = x""yes; then :
30352  cat >>confdefs.h <<_ACEOF
30353#define HAVE_LIBM 1
30354_ACEOF
30355
30356  LIBS="-lm $LIBS"
30357
30358else
30359
30360                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30361$as_echo "$as_me: Maths library was not found" >&6;}
30362
30363fi
30364
30365
30366
30367###############################################################################
30368#
30369# Check for libdl.so
30370
30371save_LIBS="$LIBS"
30372LIBS=""
30373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30374$as_echo_n "checking for dlopen in -ldl... " >&6; }
30375if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30376  $as_echo_n "(cached) " >&6
30377else
30378  ac_check_lib_save_LIBS=$LIBS
30379LIBS="-ldl  $LIBS"
30380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30381/* end confdefs.h.  */
30382
30383/* Override any GCC internal prototype to avoid an error.
30384   Use char because int might match the return type of a GCC
30385   builtin and then its argument prototype would still apply.  */
30386#ifdef __cplusplus
30387extern "C"
30388#endif
30389char dlopen ();
30390int
30391main ()
30392{
30393return dlopen ();
30394  ;
30395  return 0;
30396}
30397_ACEOF
30398if ac_fn_cxx_try_link "$LINENO"; then :
30399  ac_cv_lib_dl_dlopen=yes
30400else
30401  ac_cv_lib_dl_dlopen=no
30402fi
30403rm -f core conftest.err conftest.$ac_objext \
30404    conftest$ac_exeext conftest.$ac_ext
30405LIBS=$ac_check_lib_save_LIBS
30406fi
30407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30408$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30409if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30410  cat >>confdefs.h <<_ACEOF
30411#define HAVE_LIBDL 1
30412_ACEOF
30413
30414  LIBS="-ldl $LIBS"
30415
30416fi
30417
30418LIBDL="$LIBS"
30419
30420LIBS="$save_LIBS"
30421
30422
30423
30424###############################################################################
30425#
30426# statically link libstdc++ before C++ ABI is stablized on Linux unless
30427# dynamic build is configured on command line.
30428#
30429
30430# Check whether --with-stdc++lib was given.
30431if test "${with_stdc__lib+set}" = set; then :
30432  withval=$with_stdc__lib;
30433    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30434        && test "x$with_stdc__lib" != xdefault; then
30435      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30436    fi
30437
30438else
30439  with_stdc__lib=default
30440
30441fi
30442
30443
30444if test "x$OPENJDK_TARGET_OS" = xlinux; then
30445    # Test if -lstdc++ works.
30446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30447$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30448    ac_ext=cpp
30449ac_cpp='$CXXCPP $CPPFLAGS'
30450ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30451ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30452ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30453
30454    OLD_CXXFLAGS="$CXXFLAGS"
30455    CXXFLAGS="$CXXFLAGS -lstdc++"
30456    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30457/* end confdefs.h.  */
30458
30459int
30460main ()
30461{
30462return 0;
30463  ;
30464  return 0;
30465}
30466_ACEOF
30467if ac_fn_cxx_try_link "$LINENO"; then :
30468  has_dynamic_libstdcxx=yes
30469else
30470  has_dynamic_libstdcxx=no
30471fi
30472rm -f core conftest.err conftest.$ac_objext \
30473    conftest$ac_exeext conftest.$ac_ext
30474    CXXFLAGS="$OLD_CXXFLAGS"
30475    ac_ext=cpp
30476ac_cpp='$CXXCPP $CPPFLAGS'
30477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30480
30481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30482$as_echo "$has_dynamic_libstdcxx" >&6; }
30483
30484    # Test if stdc++ can be linked statically.
30485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30486$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30487    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30488    ac_ext=cpp
30489ac_cpp='$CXXCPP $CPPFLAGS'
30490ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30491ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30492ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30493
30494    OLD_LIBS="$LIBS"
30495    OLD_CXX="$CXX"
30496    LIBS="$STATIC_STDCXX_FLAGS"
30497    CXX="$CC"
30498    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30499/* end confdefs.h.  */
30500
30501int
30502main ()
30503{
30504return 0;
30505  ;
30506  return 0;
30507}
30508_ACEOF
30509if ac_fn_cxx_try_link "$LINENO"; then :
30510  has_static_libstdcxx=yes
30511else
30512  has_static_libstdcxx=no
30513fi
30514rm -f core conftest.err conftest.$ac_objext \
30515    conftest$ac_exeext conftest.$ac_ext
30516    LIBS="$OLD_LIBS"
30517    CXX="$OLD_CXX"
30518    ac_ext=cpp
30519ac_cpp='$CXXCPP $CPPFLAGS'
30520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30523
30524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30525$as_echo "$has_static_libstdcxx" >&6; }
30526
30527    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30528        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30529    fi
30530
30531    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30532        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30533    fi
30534
30535    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30536        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30537    fi
30538
30539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30540$as_echo_n "checking how to link with libstdc++... " >&6; }
30541    # If dynamic was requested, it's available since it would fail above otherwise.
30542    # If dynamic wasn't requested, go with static unless it isn't available.
30543    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30544        LIBCXX="$LIBCXX -lstdc++"
30545        LDCXX="$CXX"
30546        STATIC_CXX_SETTING="STATIC_CXX=false"
30547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30548$as_echo "dynamic" >&6; }
30549    else
30550        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30551        LDCXX="$CC"
30552        STATIC_CXX_SETTING="STATIC_CXX=true"
30553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30554$as_echo "static" >&6; }
30555    fi
30556fi
30557
30558
30559# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30560if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30561    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30562fi
30563
30564# TODO better (platform agnostic) test
30565if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30566    LIBCXX="-lstdc++"
30567fi
30568
30569
30570
30571
30572
30573# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30574
30575# When using cygwin or msys, we need a wrapper binary that renames
30576# /cygdrive/c/ arguments into c:/ arguments and peeks into
30577# @files and rewrites these too! This wrapper binary is
30578# called fixpath.
30579FIXPATH=
30580if test "x$OPENJDK_BUILD_OS" = xwindows; then
30581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30582$as_echo_n "checking if fixpath can be created... " >&6; }
30583    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30584    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30585    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30586      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30587      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30588      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30589      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30590    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30591      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30592      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30593
30594      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30595      # @ was chosen as separator to minimize risk of other tools messing around with it
30596      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30597      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30598
30599      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30600    fi
30601    rm -f $OUTPUT_ROOT/fixpath*
30602    cd $OUTPUT_ROOT
30603    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30604    cd $CURDIR
30605
30606    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30608$as_echo "no" >&6; }
30609        cat $OUTPUT_ROOT/fixpath1.log
30610        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30611    fi
30612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30613$as_echo "yes" >&6; }
30614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30615$as_echo_n "checking if fixpath.exe works... " >&6; }
30616    cd $OUTPUT_ROOT
30617    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30618    cd $CURDIR
30619    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30621$as_echo "no" >&6; }
30622        cat $OUTPUT_ROOT/fixpath2.log
30623        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30624    fi
30625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30626$as_echo "yes" >&6; }
30627    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30628fi
30629
30630
30631
30632
30633###############################################################################
30634#
30635# We need to do some final tweaking, when everything else is done.
30636#
30637###############################################################################
30638
30639
30640HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
30641
30642
30643# The name of the Service Agent jar.
30644SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
30645if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30646    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
30647fi
30648
30649
30650
30651
30652###############################################################################
30653#
30654# Configure parts of the build that only affect the build performance,
30655# not the result.
30656#
30657###############################################################################
30658
30659
30660# How many cores do we have on this build system?
30661
30662# Check whether --with-num-cores was given.
30663if test "${with_num_cores+set}" = set; then :
30664  withval=$with_num_cores;
30665fi
30666
30667if test "x$with_num_cores" = x; then
30668    # The number of cores were not specified, try to probe them.
30669
30670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
30671$as_echo_n "checking for number of cores... " >&6; }
30672    NUM_CORES=1
30673    FOUND_CORES=no
30674
30675    if test -f /proc/cpuinfo; then
30676        # Looks like a Linux (or cygwin) system
30677        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
30678        FOUND_CORES=yes
30679    elif test -x /usr/sbin/psrinfo; then
30680        # Looks like a Solaris system
30681        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
30682        FOUND_CORES=yes
30683    elif test -x /usr/sbin/system_profiler; then
30684        # Looks like a MacOSX system
30685        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
30686        FOUND_CORES=yes
30687    elif test -n "$NUMBER_OF_PROCESSORS"; then
30688        # On windows, look in the env
30689        NUM_CORES=$NUMBER_OF_PROCESSORS
30690        FOUND_CORES=yes
30691    fi
30692
30693    # For c/c++ code we run twice as many concurrent build
30694    # jobs than we have cores, otherwise we will stall on io.
30695    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30696
30697    if test "x$FOUND_CORES" = xyes; then
30698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
30699$as_echo "$NUM_CORES" >&6; }
30700    else
30701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
30702$as_echo "could not detect number of cores, defaulting to 1" >&6; }
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
30704$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
30705    fi
30706
30707
30708else
30709    NUM_CORES=$with_num_cores
30710    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30711fi
30712
30713
30714
30715
30716# How much memory do we have on this build system?
30717
30718# Check whether --with-memory-size was given.
30719if test "${with_memory_size+set}" = set; then :
30720  withval=$with_memory_size;
30721fi
30722
30723if test "x$with_memory_size" = x; then
30724    # The memory size was not specified, try to probe it.
30725
30726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
30727$as_echo_n "checking for memory size... " >&6; }
30728    # Default to 1024 MB
30729    MEMORY_SIZE=1024
30730    FOUND_MEM=no
30731
30732    if test -f /proc/meminfo; then
30733        # Looks like a Linux (or cygwin) system
30734        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
30735        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
30736        FOUND_MEM=yes
30737    elif test -x /usr/sbin/prtconf; then
30738        # Looks like a Solaris system
30739        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
30740        FOUND_MEM=yes
30741    elif test -x /usr/sbin/system_profiler; then
30742        # Looks like a MacOSX system
30743        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
30744        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
30745        FOUND_MEM=yes
30746    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
30747        # Windows, but without cygwin
30748        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
30749        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
30750        FOUND_MEM=yes
30751    fi
30752
30753    if test "x$FOUND_MEM" = xyes; then
30754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30755$as_echo "$MEMORY_SIZE MB" >&6; }
30756    else
30757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30758$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30760$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30761    fi
30762
30763else
30764    MEMORY_SIZE=$with_memory_size
30765fi
30766
30767
30768
30769# Setup smart javac (after cores and memory have been setup)
30770
30771
30772# Check whether --with-sjavac-server-java was given.
30773if test "${with_sjavac_server_java+set}" = set; then :
30774  withval=$with_sjavac_server_java;
30775fi
30776
30777
30778if test "x$with_sjavac_server_java" != x; then
30779    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30780    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30781    if test "x$FOUND_VERSION" = x; then
30782        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30783    fi
30784else
30785    SJAVAC_SERVER_JAVA=""
30786    # Hotspot specific options.
30787
30788    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30789    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30790    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30791    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30792    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30793        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30794    fi
30795
30796    # JRockit specific options.
30797
30798    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30799    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30800    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30801    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30802    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30803        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30804    fi
30805
30806    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30807fi
30808
30809
30810
30811# Check whether --with-sjavac-server-cores was given.
30812if test "${with_sjavac_server_cores+set}" = set; then :
30813  withval=$with_sjavac_server_cores;
30814fi
30815
30816if test "x$with_sjavac_server_cores" != x; then
30817    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30818else
30819    if test "$NUM_CORES" -gt 16; then
30820        # We set this arbitrary limit because we want to limit the heap
30821        # size of the javac server.
30822        # In the future we will make the javac compilers in the server
30823        # share more and more state, thus enabling us to use more and
30824        # more concurrent threads in the server.
30825        SJAVAC_SERVER_CORES="16"
30826    else
30827        SJAVAC_SERVER_CORES="$NUM_CORES"
30828    fi
30829
30830    if test "$MEMORY_SIZE" -gt "17000"; then
30831        MAX_HEAP_MEM=10000
30832
30833    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30834    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30835    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30836    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30837    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30838        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30839    fi
30840
30841
30842    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30843    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30844    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30845    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30846    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30847        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30848    fi
30849
30850    elif test "$MEMORY_SIZE" -gt "10000"; then
30851        MAX_HEAP_MEM=6000
30852
30853    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30854    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30855    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30856    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30857    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30858        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30859    fi
30860
30861
30862    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30863    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30864    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30865    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30866    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30867        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30868    fi
30869
30870    elif test "$MEMORY_SIZE" -gt "5000"; then
30871        MAX_HEAP_MEM=3000
30872
30873    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30874    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30875    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30876    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30877    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30878        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30879    fi
30880
30881
30882    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30883    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30884    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30885    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30886    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30887        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30888    fi
30889
30890    elif test "$MEMORY_SIZE" -gt "3800"; then
30891        MAX_HEAP_MEM=2500
30892
30893    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30894    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30895    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30896    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30897    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30898        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30899    fi
30900
30901    elif test "$MEMORY_SIZE" -gt "1900"; then
30902        MAX_HEAP_MEM=1200
30903
30904    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30905    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30906    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30907    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30908    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30909        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30910    fi
30911
30912    elif test "$MEMORY_SIZE" -gt "1000"; then
30913        MAX_HEAP_MEM=900
30914
30915    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30916    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30917    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30918    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30919    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30920        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30921    fi
30922
30923    else
30924        MAX_HEAP_MEM=512
30925
30926    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30927    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30928    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30929    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30930    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30931        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30932    fi
30933
30934    fi
30935
30936
30937    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30938    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30939    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30940    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30941    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30942        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30943    fi
30944
30945
30946    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30947    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30948    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30949    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30950    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30951        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30952    fi
30953
30954
30955    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30956    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30957    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30958    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30959    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30960        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30961    fi
30962
30963
30964    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30965    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30967$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30968        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30970$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30971    fi
30972fi
30973
30974
30975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30976$as_echo_n "checking whether to use sjavac... " >&6; }
30977# Check whether --enable-sjavac was given.
30978if test "${enable_sjavac+set}" = set; then :
30979  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30980else
30981  ENABLE_SJAVAC='no'
30982fi
30983
30984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30985$as_echo "$ENABLE_SJAVAC" >&6; }
30986
30987
30988if test "x$ENABLE_SJAVAC" = xyes; then
30989    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30990else
30991    SJAVAC_SERVER_DIR=
30992fi
30993
30994
30995
30996
30997# Can the C/C++ compiler use precompiled headers?
30998
30999
31000###############################################################################
31001#
31002# Can the C/C++ compiler use precompiled headers?
31003#
31004# Check whether --enable-precompiled-headers was given.
31005if test "${enable_precompiled_headers+set}" = set; then :
31006  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31007else
31008  ENABLE_PRECOMPH=yes
31009fi
31010
31011
31012USE_PRECOMPILED_HEADER=1
31013if test "x$ENABLE_PRECOMPH" = xno; then
31014    USE_PRECOMPILED_HEADER=0
31015fi
31016
31017if test "x$ENABLE_PRECOMPH" = xyes; then
31018    # Check that the compiler actually supports precomp headers.
31019    if test "x$GCC" = xyes; then
31020         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31021$as_echo_n "checking that precompiled headers work... " >&6; }
31022         echo "int alfa();" > conftest.h
31023         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31024         if test ! -f conftest.hpp.gch; then
31025             USE_PRECOMPILED_HEADER=0
31026             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31027$as_echo "no" >&6; }
31028         else
31029             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31030$as_echo "yes" >&6; }
31031         fi
31032         rm -f conftest.h conftest.hpp.gch
31033    fi
31034fi
31035
31036
31037
31038
31039# Setup use of ccache, if available
31040
31041    # Check whether --enable-ccache was given.
31042if test "${enable_ccache+set}" = set; then :
31043  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31044else
31045  ENABLE_CCACHE=yes
31046fi
31047
31048    if test "x$ENABLE_CCACHE" = xyes; then
31049        # Extract the first word of "ccache", so it can be a program name with args.
31050set dummy ccache; ac_word=$2
31051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31052$as_echo_n "checking for $ac_word... " >&6; }
31053if test "${ac_cv_path_CCACHE+set}" = set; then :
31054  $as_echo_n "(cached) " >&6
31055else
31056  case $CCACHE in
31057  [\\/]* | ?:[\\/]*)
31058  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31059  ;;
31060  *)
31061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31062for as_dir in $PATH
31063do
31064  IFS=$as_save_IFS
31065  test -z "$as_dir" && as_dir=.
31066    for ac_exec_ext in '' $ac_executable_extensions; do
31067  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31068    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31070    break 2
31071  fi
31072done
31073  done
31074IFS=$as_save_IFS
31075
31076  ;;
31077esac
31078fi
31079CCACHE=$ac_cv_path_CCACHE
31080if test -n "$CCACHE"; then
31081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31082$as_echo "$CCACHE" >&6; }
31083else
31084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31085$as_echo "no" >&6; }
31086fi
31087
31088
31089    else
31090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31091$as_echo_n "checking for ccache... " >&6; }
31092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31093$as_echo "explicitly disabled" >&6; }
31094        CCACHE=
31095    fi
31096
31097
31098
31099# Check whether --with-ccache-dir was given.
31100if test "${with_ccache_dir+set}" = set; then :
31101  withval=$with_ccache_dir;
31102fi
31103
31104
31105    if test "x$with_ccache_dir" != x; then
31106        # When using a non home ccache directory, assume the use is to share ccache files
31107        # with other users. Thus change the umask.
31108        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31109    fi
31110    CCACHE_FOUND=""
31111    if test "x$CCACHE" != x; then
31112
31113    if test "x$CCACHE" != x; then
31114        CCACHE_FOUND="true"
31115        # Only use ccache if it is 3.1.4 or later, which supports
31116        # precompiled headers.
31117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31118$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31119        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31120        if test "x$HAS_GOOD_CCACHE" = x; then
31121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31122$as_echo "no, disabling ccache" >&6; }
31123            CCACHE=
31124        else
31125            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31126$as_echo "yes" >&6; }
31127            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31128$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31129            PUSHED_FLAGS="$CXXFLAGS"
31130            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31131            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31132/* end confdefs.h.  */
31133
31134int
31135main ()
31136{
31137
31138  ;
31139  return 0;
31140}
31141_ACEOF
31142if ac_fn_cxx_try_compile "$LINENO"; then :
31143  CC_KNOWS_CCACHE_TRICK=yes
31144else
31145  CC_KNOWS_CCACHE_TRICK=no
31146fi
31147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31148            CXXFLAGS="$PUSHED_FLAGS"
31149            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31150                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31151$as_echo "yes" >&6; }
31152            else
31153                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31154$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31155                CCACHE=
31156            fi
31157        fi
31158    fi
31159
31160    if test "x$CCACHE" != x; then
31161        CCACHE_SLOPPINESS=time_macros
31162        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31163        CCACHE_FLAGS=-fpch-preprocess
31164
31165        if test "x$SET_CCACHE_DIR" != x; then
31166            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31167	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31168        fi
31169    fi
31170
31171    fi
31172
31173
31174###############################################################################
31175#
31176# And now the finish...
31177#
31178###############################################################################
31179
31180# Check for some common pitfalls
31181
31182
31183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31184$as_echo_n "checking if build directory is on local disk... " >&6; }
31185
31186	# df -l lists only local disks; if the given directory is not found then
31187	# a non-zero exit code is given
31188  if test "x$DF" = x; then
31189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31190      # msys does not have df; use Windows "net use" instead.
31191      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31192      if test "x$IS_NETWORK_DISK" = x; then
31193        OUTPUT_DIR_IS_LOCAL="yes"
31194      else
31195        OUTPUT_DIR_IS_LOCAL="no"
31196      fi
31197    else
31198      # No df here, say it's local
31199      OUTPUT_DIR_IS_LOCAL="yes"
31200    fi
31201  else
31202    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31203      OUTPUT_DIR_IS_LOCAL="yes"
31204    else
31205      OUTPUT_DIR_IS_LOCAL="no"
31206    fi
31207  fi
31208
31209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31210$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31211
31212# Check if the user has any old-style ALT_ variables set.
31213FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31214
31215# Before generating output files, test if they exist. If they do, this is a reconfigure.
31216# Since we can't properly handle the dependencies for this, warn the user about the situation
31217if test -e $OUTPUT_ROOT/spec.gmk; then
31218  IS_RECONFIGURE=yes
31219else
31220  IS_RECONFIGURE=no
31221fi
31222
31223if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31224  HIDE_PERFORMANCE_HINTS=yes
31225else
31226  HIDE_PERFORMANCE_HINTS=no
31227  # Hide it the next time around...
31228  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31229fi
31230
31231
31232
31233# At the end, call the custom hook. (Dummy macro if no custom sources available)
31234
31235
31236# We're messing a bit with internal autoconf variables to put the config.status
31237# in the output directory instead of the current directory.
31238CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31239# Create the actual output files. Now the main work of configure is done.
31240cat >confcache <<\_ACEOF
31241# This file is a shell script that caches the results of configure
31242# tests run on this system so they can be shared between configure
31243# scripts and configure runs, see configure's option --config-cache.
31244# It is not useful on other systems.  If it contains results you don't
31245# want to keep, you may remove or edit it.
31246#
31247# config.status only pays attention to the cache file if you give it
31248# the --recheck option to rerun configure.
31249#
31250# `ac_cv_env_foo' variables (set or unset) will be overridden when
31251# loading this file, other *unset* `ac_cv_foo' will be assigned the
31252# following values.
31253
31254_ACEOF
31255
31256# The following way of writing the cache mishandles newlines in values,
31257# but we know of no workaround that is simple, portable, and efficient.
31258# So, we kill variables containing newlines.
31259# Ultrix sh set writes to stderr and can't be redirected directly,
31260# and sets the high bit in the cache file unless we assign to the vars.
31261(
31262  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31263    eval ac_val=\$$ac_var
31264    case $ac_val in #(
31265    *${as_nl}*)
31266      case $ac_var in #(
31267      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31268$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31269      esac
31270      case $ac_var in #(
31271      _ | IFS | as_nl) ;; #(
31272      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31273      *) { eval $ac_var=; unset $ac_var;} ;;
31274      esac ;;
31275    esac
31276  done
31277
31278  (set) 2>&1 |
31279    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31280    *${as_nl}ac_space=\ *)
31281      # `set' does not quote correctly, so add quotes: double-quote
31282      # substitution turns \\\\ into \\, and sed turns \\ into \.
31283      sed -n \
31284	"s/'/'\\\\''/g;
31285	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31286      ;; #(
31287    *)
31288      # `set' quotes correctly as required by POSIX, so do not add quotes.
31289      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31290      ;;
31291    esac |
31292    sort
31293) |
31294  sed '
31295     /^ac_cv_env_/b end
31296     t clear
31297     :clear
31298     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31299     t end
31300     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31301     :end' >>confcache
31302if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31303  if test -w "$cache_file"; then
31304    test "x$cache_file" != "x/dev/null" &&
31305      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31306$as_echo "$as_me: updating cache $cache_file" >&6;}
31307    cat confcache >$cache_file
31308  else
31309    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31310$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31311  fi
31312fi
31313rm -f confcache
31314
31315test "x$prefix" = xNONE && prefix=$ac_default_prefix
31316# Let make expand exec_prefix.
31317test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31318
31319DEFS=-DHAVE_CONFIG_H
31320
31321ac_libobjs=
31322ac_ltlibobjs=
31323U=
31324for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31325  # 1. Remove the extension, and $U if already installed.
31326  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31327  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31328  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31329  #    will be set to the directory where LIBOBJS objects are built.
31330  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31331  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31332done
31333LIBOBJS=$ac_libobjs
31334
31335LTLIBOBJS=$ac_ltlibobjs
31336
31337
31338
31339: ${CONFIG_STATUS=./config.status}
31340ac_write_fail=0
31341ac_clean_files_save=$ac_clean_files
31342ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31343{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31344$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31345as_write_fail=0
31346cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31347#! $SHELL
31348# Generated by $as_me.
31349# Run this file to recreate the current configuration.
31350# Compiler output produced by configure, useful for debugging
31351# configure, is in config.log if it exists.
31352
31353debug=false
31354ac_cs_recheck=false
31355ac_cs_silent=false
31356
31357SHELL=\${CONFIG_SHELL-$SHELL}
31358export SHELL
31359_ASEOF
31360cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31361## -------------------- ##
31362## M4sh Initialization. ##
31363## -------------------- ##
31364
31365# Be more Bourne compatible
31366DUALCASE=1; export DUALCASE # for MKS sh
31367if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31368  emulate sh
31369  NULLCMD=:
31370  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31371  # is contrary to our usage.  Disable this feature.
31372  alias -g '${1+"$@"}'='"$@"'
31373  setopt NO_GLOB_SUBST
31374else
31375  case `(set -o) 2>/dev/null` in #(
31376  *posix*) :
31377    set -o posix ;; #(
31378  *) :
31379     ;;
31380esac
31381fi
31382
31383
31384as_nl='
31385'
31386export as_nl
31387# Printing a long string crashes Solaris 7 /usr/bin/printf.
31388as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31389as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31390as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31391# Prefer a ksh shell builtin over an external printf program on Solaris,
31392# but without wasting forks for bash or zsh.
31393if test -z "$BASH_VERSION$ZSH_VERSION" \
31394    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31395  as_echo='print -r --'
31396  as_echo_n='print -rn --'
31397elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31398  as_echo='printf %s\n'
31399  as_echo_n='printf %s'
31400else
31401  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31402    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31403    as_echo_n='/usr/ucb/echo -n'
31404  else
31405    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31406    as_echo_n_body='eval
31407      arg=$1;
31408      case $arg in #(
31409      *"$as_nl"*)
31410	expr "X$arg" : "X\\(.*\\)$as_nl";
31411	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31412      esac;
31413      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31414    '
31415    export as_echo_n_body
31416    as_echo_n='sh -c $as_echo_n_body as_echo'
31417  fi
31418  export as_echo_body
31419  as_echo='sh -c $as_echo_body as_echo'
31420fi
31421
31422# The user is always right.
31423if test "${PATH_SEPARATOR+set}" != set; then
31424  PATH_SEPARATOR=:
31425  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31426    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31427      PATH_SEPARATOR=';'
31428  }
31429fi
31430
31431
31432# IFS
31433# We need space, tab and new line, in precisely that order.  Quoting is
31434# there to prevent editors from complaining about space-tab.
31435# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31436# splitting by setting IFS to empty value.)
31437IFS=" ""	$as_nl"
31438
31439# Find who we are.  Look in the path if we contain no directory separator.
31440case $0 in #((
31441  *[\\/]* ) as_myself=$0 ;;
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    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31448  done
31449IFS=$as_save_IFS
31450
31451     ;;
31452esac
31453# We did not find ourselves, most probably we were run as `sh COMMAND'
31454# in which case we are not to be found in the path.
31455if test "x$as_myself" = x; then
31456  as_myself=$0
31457fi
31458if test ! -f "$as_myself"; then
31459  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31460  exit 1
31461fi
31462
31463# Unset variables that we do not need and which cause bugs (e.g. in
31464# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31465# suppresses any "Segmentation fault" message there.  '((' could
31466# trigger a bug in pdksh 5.2.14.
31467for as_var in BASH_ENV ENV MAIL MAILPATH
31468do eval test x\${$as_var+set} = xset \
31469  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31470done
31471PS1='$ '
31472PS2='> '
31473PS4='+ '
31474
31475# NLS nuisances.
31476LC_ALL=C
31477export LC_ALL
31478LANGUAGE=C
31479export LANGUAGE
31480
31481# CDPATH.
31482(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31483
31484
31485# as_fn_error STATUS ERROR [LINENO LOG_FD]
31486# ----------------------------------------
31487# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31488# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31489# script with STATUS, using 1 if that was 0.
31490as_fn_error ()
31491{
31492  as_status=$1; test $as_status -eq 0 && as_status=1
31493  if test "$4"; then
31494    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31495    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31496  fi
31497  $as_echo "$as_me: error: $2" >&2
31498  as_fn_exit $as_status
31499} # as_fn_error
31500
31501
31502# as_fn_set_status STATUS
31503# -----------------------
31504# Set $? to STATUS, without forking.
31505as_fn_set_status ()
31506{
31507  return $1
31508} # as_fn_set_status
31509
31510# as_fn_exit STATUS
31511# -----------------
31512# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31513as_fn_exit ()
31514{
31515  set +e
31516  as_fn_set_status $1
31517  exit $1
31518} # as_fn_exit
31519
31520# as_fn_unset VAR
31521# ---------------
31522# Portably unset VAR.
31523as_fn_unset ()
31524{
31525  { eval $1=; unset $1;}
31526}
31527as_unset=as_fn_unset
31528# as_fn_append VAR VALUE
31529# ----------------------
31530# Append the text in VALUE to the end of the definition contained in VAR. Take
31531# advantage of any shell optimizations that allow amortized linear growth over
31532# repeated appends, instead of the typical quadratic growth present in naive
31533# implementations.
31534if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31535  eval 'as_fn_append ()
31536  {
31537    eval $1+=\$2
31538  }'
31539else
31540  as_fn_append ()
31541  {
31542    eval $1=\$$1\$2
31543  }
31544fi # as_fn_append
31545
31546# as_fn_arith ARG...
31547# ------------------
31548# Perform arithmetic evaluation on the ARGs, and store the result in the
31549# global $as_val. Take advantage of shells that can avoid forks. The arguments
31550# must be portable across $(()) and expr.
31551if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31552  eval 'as_fn_arith ()
31553  {
31554    as_val=$(( $* ))
31555  }'
31556else
31557  as_fn_arith ()
31558  {
31559    as_val=`expr "$@" || test $? -eq 1`
31560  }
31561fi # as_fn_arith
31562
31563
31564if expr a : '\(a\)' >/dev/null 2>&1 &&
31565   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31566  as_expr=expr
31567else
31568  as_expr=false
31569fi
31570
31571if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31572  as_basename=basename
31573else
31574  as_basename=false
31575fi
31576
31577if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31578  as_dirname=dirname
31579else
31580  as_dirname=false
31581fi
31582
31583as_me=`$as_basename -- "$0" ||
31584$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31585	 X"$0" : 'X\(//\)$' \| \
31586	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31587$as_echo X/"$0" |
31588    sed '/^.*\/\([^/][^/]*\)\/*$/{
31589	    s//\1/
31590	    q
31591	  }
31592	  /^X\/\(\/\/\)$/{
31593	    s//\1/
31594	    q
31595	  }
31596	  /^X\/\(\/\).*/{
31597	    s//\1/
31598	    q
31599	  }
31600	  s/.*/./; q'`
31601
31602# Avoid depending upon Character Ranges.
31603as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31604as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31605as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31606as_cr_digits='0123456789'
31607as_cr_alnum=$as_cr_Letters$as_cr_digits
31608
31609ECHO_C= ECHO_N= ECHO_T=
31610case `echo -n x` in #(((((
31611-n*)
31612  case `echo 'xy\c'` in
31613  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31614  xy)  ECHO_C='\c';;
31615  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31616       ECHO_T='	';;
31617  esac;;
31618*)
31619  ECHO_N='-n';;
31620esac
31621
31622rm -f conf$$ conf$$.exe conf$$.file
31623if test -d conf$$.dir; then
31624  rm -f conf$$.dir/conf$$.file
31625else
31626  rm -f conf$$.dir
31627  mkdir conf$$.dir 2>/dev/null
31628fi
31629if (echo >conf$$.file) 2>/dev/null; then
31630  if ln -s conf$$.file conf$$ 2>/dev/null; then
31631    as_ln_s='ln -s'
31632    # ... but there are two gotchas:
31633    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31634    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31635    # In both cases, we have to default to `cp -p'.
31636    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31637      as_ln_s='cp -p'
31638  elif ln conf$$.file conf$$ 2>/dev/null; then
31639    as_ln_s=ln
31640  else
31641    as_ln_s='cp -p'
31642  fi
31643else
31644  as_ln_s='cp -p'
31645fi
31646rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31647rmdir conf$$.dir 2>/dev/null
31648
31649
31650# as_fn_mkdir_p
31651# -------------
31652# Create "$as_dir" as a directory, including parents if necessary.
31653as_fn_mkdir_p ()
31654{
31655
31656  case $as_dir in #(
31657  -*) as_dir=./$as_dir;;
31658  esac
31659  test -d "$as_dir" || eval $as_mkdir_p || {
31660    as_dirs=
31661    while :; do
31662      case $as_dir in #(
31663      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31664      *) as_qdir=$as_dir;;
31665      esac
31666      as_dirs="'$as_qdir' $as_dirs"
31667      as_dir=`$as_dirname -- "$as_dir" ||
31668$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31669	 X"$as_dir" : 'X\(//\)[^/]' \| \
31670	 X"$as_dir" : 'X\(//\)$' \| \
31671	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31672$as_echo X"$as_dir" |
31673    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31674	    s//\1/
31675	    q
31676	  }
31677	  /^X\(\/\/\)[^/].*/{
31678	    s//\1/
31679	    q
31680	  }
31681	  /^X\(\/\/\)$/{
31682	    s//\1/
31683	    q
31684	  }
31685	  /^X\(\/\).*/{
31686	    s//\1/
31687	    q
31688	  }
31689	  s/.*/./; q'`
31690      test -d "$as_dir" && break
31691    done
31692    test -z "$as_dirs" || eval "mkdir $as_dirs"
31693  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31694
31695
31696} # as_fn_mkdir_p
31697if mkdir -p . 2>/dev/null; then
31698  as_mkdir_p='mkdir -p "$as_dir"'
31699else
31700  test -d ./-p && rmdir ./-p
31701  as_mkdir_p=false
31702fi
31703
31704if test -x / >/dev/null 2>&1; then
31705  as_test_x='test -x'
31706else
31707  if ls -dL / >/dev/null 2>&1; then
31708    as_ls_L_option=L
31709  else
31710    as_ls_L_option=
31711  fi
31712  as_test_x='
31713    eval sh -c '\''
31714      if test -d "$1"; then
31715	test -d "$1/.";
31716      else
31717	case $1 in #(
31718	-*)set "./$1";;
31719	esac;
31720	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31721	???[sx]*):;;*)false;;esac;fi
31722    '\'' sh
31723  '
31724fi
31725as_executable_p=$as_test_x
31726
31727# Sed expression to map a string onto a valid CPP name.
31728as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31729
31730# Sed expression to map a string onto a valid variable name.
31731as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31732
31733
31734exec 6>&1
31735## ----------------------------------- ##
31736## Main body of $CONFIG_STATUS script. ##
31737## ----------------------------------- ##
31738_ASEOF
31739test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31740
31741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31742# Save the log message, to keep $0 and so on meaningful, and to
31743# report actual input values of CONFIG_FILES etc. instead of their
31744# values after options handling.
31745ac_log="
31746This file was extended by OpenJDK $as_me jdk8, which was
31747generated by GNU Autoconf 2.67.  Invocation command line was
31748
31749  CONFIG_FILES    = $CONFIG_FILES
31750  CONFIG_HEADERS  = $CONFIG_HEADERS
31751  CONFIG_LINKS    = $CONFIG_LINKS
31752  CONFIG_COMMANDS = $CONFIG_COMMANDS
31753  $ $0 $@
31754
31755on `(hostname || uname -n) 2>/dev/null | sed 1q`
31756"
31757
31758_ACEOF
31759
31760case $ac_config_files in *"
31761"*) set x $ac_config_files; shift; ac_config_files=$*;;
31762esac
31763
31764case $ac_config_headers in *"
31765"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31766esac
31767
31768
31769cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31770# Files that config.status was made for.
31771config_files="$ac_config_files"
31772config_headers="$ac_config_headers"
31773
31774_ACEOF
31775
31776cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31777ac_cs_usage="\
31778\`$as_me' instantiates files and other configuration actions
31779from templates according to the current configuration.  Unless the files
31780and actions are specified as TAGs, all are instantiated by default.
31781
31782Usage: $0 [OPTION]... [TAG]...
31783
31784  -h, --help       print this help, then exit
31785  -V, --version    print version number and configuration settings, then exit
31786      --config     print configuration, then exit
31787  -q, --quiet, --silent
31788                   do not print progress messages
31789  -d, --debug      don't remove temporary files
31790      --recheck    update $as_me by reconfiguring in the same conditions
31791      --file=FILE[:TEMPLATE]
31792                   instantiate the configuration file FILE
31793      --header=FILE[:TEMPLATE]
31794                   instantiate the configuration header FILE
31795
31796Configuration files:
31797$config_files
31798
31799Configuration headers:
31800$config_headers
31801
31802Report bugs to <build-dev@openjdk.java.net>.
31803OpenJDK home page: <http://openjdk.java.net>."
31804
31805_ACEOF
31806cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31807ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31808ac_cs_version="\\
31809OpenJDK config.status jdk8
31810configured by $0, generated by GNU Autoconf 2.67,
31811  with options \\"\$ac_cs_config\\"
31812
31813Copyright (C) 2010 Free Software Foundation, Inc.
31814This config.status script is free software; the Free Software Foundation
31815gives unlimited permission to copy, distribute and modify it."
31816
31817ac_pwd='$ac_pwd'
31818srcdir='$srcdir'
31819AWK='$AWK'
31820test -n "\$AWK" || AWK=awk
31821_ACEOF
31822
31823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31824# The default lists apply if the user does not specify any file.
31825ac_need_defaults=:
31826while test $# != 0
31827do
31828  case $1 in
31829  --*=?*)
31830    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31831    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31832    ac_shift=:
31833    ;;
31834  --*=)
31835    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31836    ac_optarg=
31837    ac_shift=:
31838    ;;
31839  *)
31840    ac_option=$1
31841    ac_optarg=$2
31842    ac_shift=shift
31843    ;;
31844  esac
31845
31846  case $ac_option in
31847  # Handling of the options.
31848  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31849    ac_cs_recheck=: ;;
31850  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31851    $as_echo "$ac_cs_version"; exit ;;
31852  --config | --confi | --conf | --con | --co | --c )
31853    $as_echo "$ac_cs_config"; exit ;;
31854  --debug | --debu | --deb | --de | --d | -d )
31855    debug=: ;;
31856  --file | --fil | --fi | --f )
31857    $ac_shift
31858    case $ac_optarg in
31859    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31860    '') as_fn_error $? "missing file argument" ;;
31861    esac
31862    as_fn_append CONFIG_FILES " '$ac_optarg'"
31863    ac_need_defaults=false;;
31864  --header | --heade | --head | --hea )
31865    $ac_shift
31866    case $ac_optarg in
31867    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31868    esac
31869    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31870    ac_need_defaults=false;;
31871  --he | --h)
31872    # Conflict between --help and --header
31873    as_fn_error $? "ambiguous option: \`$1'
31874Try \`$0 --help' for more information.";;
31875  --help | --hel | -h )
31876    $as_echo "$ac_cs_usage"; exit ;;
31877  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31878  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31879    ac_cs_silent=: ;;
31880
31881  # This is an error.
31882  -*) as_fn_error $? "unrecognized option: \`$1'
31883Try \`$0 --help' for more information." ;;
31884
31885  *) as_fn_append ac_config_targets " $1"
31886     ac_need_defaults=false ;;
31887
31888  esac
31889  shift
31890done
31891
31892ac_configure_extra_args=
31893
31894if $ac_cs_silent; then
31895  exec 6>/dev/null
31896  ac_configure_extra_args="$ac_configure_extra_args --silent"
31897fi
31898
31899_ACEOF
31900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31901if \$ac_cs_recheck; then
31902  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31903  shift
31904  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31905  CONFIG_SHELL='$SHELL'
31906  export CONFIG_SHELL
31907  exec "\$@"
31908fi
31909
31910_ACEOF
31911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31912exec 5>>config.log
31913{
31914  echo
31915  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31916## Running $as_me. ##
31917_ASBOX
31918  $as_echo "$ac_log"
31919} >&5
31920
31921_ACEOF
31922cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31923_ACEOF
31924
31925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31926
31927# Handling of arguments.
31928for ac_config_target in $ac_config_targets
31929do
31930  case $ac_config_target in
31931    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31932    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31933    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31934    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31935    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31936    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31937    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31938
31939  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31940  esac
31941done
31942
31943
31944# If the user did not use the arguments to specify the items to instantiate,
31945# then the envvar interface is used.  Set only those that are not.
31946# We use the long form for the default assignment because of an extremely
31947# bizarre bug on SunOS 4.1.3.
31948if $ac_need_defaults; then
31949  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31950  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31951fi
31952
31953# Have a temporary directory for convenience.  Make it in the build tree
31954# simply because there is no reason against having it here, and in addition,
31955# creating and moving files from /tmp can sometimes cause problems.
31956# Hook for its removal unless debugging.
31957# Note that there is a small window in which the directory will not be cleaned:
31958# after its creation but before its name has been assigned to `$tmp'.
31959$debug ||
31960{
31961  tmp=
31962  trap 'exit_status=$?
31963  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31964' 0
31965  trap 'as_fn_exit 1' 1 2 13 15
31966}
31967# Create a (secure) tmp directory for tmp files.
31968
31969{
31970  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31971  test -n "$tmp" && test -d "$tmp"
31972}  ||
31973{
31974  tmp=./conf$$-$RANDOM
31975  (umask 077 && mkdir "$tmp")
31976} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31977
31978# Set up the scripts for CONFIG_FILES section.
31979# No need to generate them if there are no CONFIG_FILES.
31980# This happens for instance with `./config.status config.h'.
31981if test -n "$CONFIG_FILES"; then
31982
31983
31984ac_cr=`echo X | tr X '\015'`
31985# On cygwin, bash can eat \r inside `` if the user requested igncr.
31986# But we know of no other shell where ac_cr would be empty at this
31987# point, so we can use a bashism as a fallback.
31988if test "x$ac_cr" = x; then
31989  eval ac_cr=\$\'\\r\'
31990fi
31991ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31992if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31993  ac_cs_awk_cr='\\r'
31994else
31995  ac_cs_awk_cr=$ac_cr
31996fi
31997
31998echo 'BEGIN {' >"$tmp/subs1.awk" &&
31999_ACEOF
32000
32001
32002{
32003  echo "cat >conf$$subs.awk <<_ACEOF" &&
32004  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32005  echo "_ACEOF"
32006} >conf$$subs.sh ||
32007  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32008ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32009ac_delim='%!_!# '
32010for ac_last_try in false false false false false :; do
32011  . ./conf$$subs.sh ||
32012    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32013
32014  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32015  if test $ac_delim_n = $ac_delim_num; then
32016    break
32017  elif $ac_last_try; then
32018    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32019  else
32020    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32021  fi
32022done
32023rm -f conf$$subs.sh
32024
32025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32026cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32027_ACEOF
32028sed -n '
32029h
32030s/^/S["/; s/!.*/"]=/
32031p
32032g
32033s/^[^!]*!//
32034:repl
32035t repl
32036s/'"$ac_delim"'$//
32037t delim
32038:nl
32039h
32040s/\(.\{148\}\)..*/\1/
32041t more1
32042s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32043p
32044n
32045b repl
32046:more1
32047s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32048p
32049g
32050s/.\{148\}//
32051t nl
32052:delim
32053h
32054s/\(.\{148\}\)..*/\1/
32055t more2
32056s/["\\]/\\&/g; s/^/"/; s/$/"/
32057p
32058b
32059:more2
32060s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32061p
32062g
32063s/.\{148\}//
32064t delim
32065' <conf$$subs.awk | sed '
32066/^[^""]/{
32067  N
32068  s/\n//
32069}
32070' >>$CONFIG_STATUS || ac_write_fail=1
32071rm -f conf$$subs.awk
32072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32073_ACAWK
32074cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32075  for (key in S) S_is_set[key] = 1
32076  FS = ""
32077
32078}
32079{
32080  line = $ 0
32081  nfields = split(line, field, "@")
32082  substed = 0
32083  len = length(field[1])
32084  for (i = 2; i < nfields; i++) {
32085    key = field[i]
32086    keylen = length(key)
32087    if (S_is_set[key]) {
32088      value = S[key]
32089      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32090      len += length(value) + length(field[++i])
32091      substed = 1
32092    } else
32093      len += 1 + keylen
32094  }
32095
32096  print line
32097}
32098
32099_ACAWK
32100_ACEOF
32101cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32102if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32103  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32104else
32105  cat
32106fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32107  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32108_ACEOF
32109
32110# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32111# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32112# trailing colons and then remove the whole line if VPATH becomes empty
32113# (actually we leave an empty line to preserve line numbers).
32114if test "x$srcdir" = x.; then
32115  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32116h
32117s///
32118s/^/:/
32119s/[	 ]*$/:/
32120s/:\$(srcdir):/:/g
32121s/:\${srcdir}:/:/g
32122s/:@srcdir@:/:/g
32123s/^:*//
32124s/:*$//
32125x
32126s/\(=[	 ]*\).*/\1/
32127G
32128s/\n//
32129s/^[^=]*=[	 ]*$//
32130}'
32131fi
32132
32133cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32134fi # test -n "$CONFIG_FILES"
32135
32136# Set up the scripts for CONFIG_HEADERS section.
32137# No need to generate them if there are no CONFIG_HEADERS.
32138# This happens for instance with `./config.status Makefile'.
32139if test -n "$CONFIG_HEADERS"; then
32140cat >"$tmp/defines.awk" <<\_ACAWK ||
32141BEGIN {
32142_ACEOF
32143
32144# Transform confdefs.h into an awk script `defines.awk', embedded as
32145# here-document in config.status, that substitutes the proper values into
32146# config.h.in to produce config.h.
32147
32148# Create a delimiter string that does not exist in confdefs.h, to ease
32149# handling of long lines.
32150ac_delim='%!_!# '
32151for ac_last_try in false false :; do
32152  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32153  if test -z "$ac_t"; then
32154    break
32155  elif $ac_last_try; then
32156    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32157  else
32158    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32159  fi
32160done
32161
32162# For the awk script, D is an array of macro values keyed by name,
32163# likewise P contains macro parameters if any.  Preserve backslash
32164# newline sequences.
32165
32166ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32167sed -n '
32168s/.\{148\}/&'"$ac_delim"'/g
32169t rset
32170:rset
32171s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32172t def
32173d
32174:def
32175s/\\$//
32176t bsnl
32177s/["\\]/\\&/g
32178s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32179D["\1"]=" \3"/p
32180s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32181d
32182:bsnl
32183s/["\\]/\\&/g
32184s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32185D["\1"]=" \3\\\\\\n"\\/p
32186t cont
32187s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32188t cont
32189d
32190:cont
32191n
32192s/.\{148\}/&'"$ac_delim"'/g
32193t clear
32194:clear
32195s/\\$//
32196t bsnlc
32197s/["\\]/\\&/g; s/^/"/; s/$/"/p
32198d
32199:bsnlc
32200s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32201b cont
32202' <confdefs.h | sed '
32203s/'"$ac_delim"'/"\\\
32204"/g' >>$CONFIG_STATUS || ac_write_fail=1
32205
32206cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32207  for (key in D) D_is_set[key] = 1
32208  FS = ""
32209}
32210/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32211  line = \$ 0
32212  split(line, arg, " ")
32213  if (arg[1] == "#") {
32214    defundef = arg[2]
32215    mac1 = arg[3]
32216  } else {
32217    defundef = substr(arg[1], 2)
32218    mac1 = arg[2]
32219  }
32220  split(mac1, mac2, "(") #)
32221  macro = mac2[1]
32222  prefix = substr(line, 1, index(line, defundef) - 1)
32223  if (D_is_set[macro]) {
32224    # Preserve the white space surrounding the "#".
32225    print prefix "define", macro P[macro] D[macro]
32226    next
32227  } else {
32228    # Replace #undef with comments.  This is necessary, for example,
32229    # in the case of _POSIX_SOURCE, which is predefined and required
32230    # on some systems where configure will not decide to define it.
32231    if (defundef == "undef") {
32232      print "/*", prefix defundef, macro, "*/"
32233      next
32234    }
32235  }
32236}
32237{ print }
32238_ACAWK
32239_ACEOF
32240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32241  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32242fi # test -n "$CONFIG_HEADERS"
32243
32244
32245eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32246shift
32247for ac_tag
32248do
32249  case $ac_tag in
32250  :[FHLC]) ac_mode=$ac_tag; continue;;
32251  esac
32252  case $ac_mode$ac_tag in
32253  :[FHL]*:*);;
32254  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32255  :[FH]-) ac_tag=-:-;;
32256  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32257  esac
32258  ac_save_IFS=$IFS
32259  IFS=:
32260  set x $ac_tag
32261  IFS=$ac_save_IFS
32262  shift
32263  ac_file=$1
32264  shift
32265
32266  case $ac_mode in
32267  :L) ac_source=$1;;
32268  :[FH])
32269    ac_file_inputs=
32270    for ac_f
32271    do
32272      case $ac_f in
32273      -) ac_f="$tmp/stdin";;
32274      *) # Look for the file first in the build tree, then in the source tree
32275	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32276	 # because $ac_f cannot contain `:'.
32277	 test -f "$ac_f" ||
32278	   case $ac_f in
32279	   [\\/$]*) false;;
32280	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32281	   esac ||
32282	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32283      esac
32284      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32285      as_fn_append ac_file_inputs " '$ac_f'"
32286    done
32287
32288    # Let's still pretend it is `configure' which instantiates (i.e., don't
32289    # use $as_me), people would be surprised to read:
32290    #    /* config.h.  Generated by config.status.  */
32291    configure_input='Generated from '`
32292	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32293	`' by configure.'
32294    if test x"$ac_file" != x-; then
32295      configure_input="$ac_file.  $configure_input"
32296      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32297$as_echo "$as_me: creating $ac_file" >&6;}
32298    fi
32299    # Neutralize special characters interpreted by sed in replacement strings.
32300    case $configure_input in #(
32301    *\&* | *\|* | *\\* )
32302       ac_sed_conf_input=`$as_echo "$configure_input" |
32303       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32304    *) ac_sed_conf_input=$configure_input;;
32305    esac
32306
32307    case $ac_tag in
32308    *:-:* | *:-) cat >"$tmp/stdin" \
32309      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32310    esac
32311    ;;
32312  esac
32313
32314  ac_dir=`$as_dirname -- "$ac_file" ||
32315$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32316	 X"$ac_file" : 'X\(//\)[^/]' \| \
32317	 X"$ac_file" : 'X\(//\)$' \| \
32318	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32319$as_echo X"$ac_file" |
32320    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32321	    s//\1/
32322	    q
32323	  }
32324	  /^X\(\/\/\)[^/].*/{
32325	    s//\1/
32326	    q
32327	  }
32328	  /^X\(\/\/\)$/{
32329	    s//\1/
32330	    q
32331	  }
32332	  /^X\(\/\).*/{
32333	    s//\1/
32334	    q
32335	  }
32336	  s/.*/./; q'`
32337  as_dir="$ac_dir"; as_fn_mkdir_p
32338  ac_builddir=.
32339
32340case "$ac_dir" in
32341.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32342*)
32343  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32344  # A ".." for each directory in $ac_dir_suffix.
32345  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32346  case $ac_top_builddir_sub in
32347  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32348  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32349  esac ;;
32350esac
32351ac_abs_top_builddir=$ac_pwd
32352ac_abs_builddir=$ac_pwd$ac_dir_suffix
32353# for backward compatibility:
32354ac_top_builddir=$ac_top_build_prefix
32355
32356case $srcdir in
32357  .)  # We are building in place.
32358    ac_srcdir=.
32359    ac_top_srcdir=$ac_top_builddir_sub
32360    ac_abs_top_srcdir=$ac_pwd ;;
32361  [\\/]* | ?:[\\/]* )  # Absolute name.
32362    ac_srcdir=$srcdir$ac_dir_suffix;
32363    ac_top_srcdir=$srcdir
32364    ac_abs_top_srcdir=$srcdir ;;
32365  *) # Relative name.
32366    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32367    ac_top_srcdir=$ac_top_build_prefix$srcdir
32368    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32369esac
32370ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32371
32372
32373  case $ac_mode in
32374  :F)
32375  #
32376  # CONFIG_FILE
32377  #
32378
32379_ACEOF
32380
32381cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32382# If the template does not know about datarootdir, expand it.
32383# FIXME: This hack should be removed a few years after 2.60.
32384ac_datarootdir_hack=; ac_datarootdir_seen=
32385ac_sed_dataroot='
32386/datarootdir/ {
32387  p
32388  q
32389}
32390/@datadir@/p
32391/@docdir@/p
32392/@infodir@/p
32393/@localedir@/p
32394/@mandir@/p'
32395case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32396*datarootdir*) ac_datarootdir_seen=yes;;
32397*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32398  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32399$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32400_ACEOF
32401cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32402  ac_datarootdir_hack='
32403  s&@datadir@&$datadir&g
32404  s&@docdir@&$docdir&g
32405  s&@infodir@&$infodir&g
32406  s&@localedir@&$localedir&g
32407  s&@mandir@&$mandir&g
32408  s&\\\${datarootdir}&$datarootdir&g' ;;
32409esac
32410_ACEOF
32411
32412# Neutralize VPATH when `$srcdir' = `.'.
32413# Shell code in configure.ac might set extrasub.
32414# FIXME: do we really want to maintain this feature?
32415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32416ac_sed_extra="$ac_vpsub
32417$extrasub
32418_ACEOF
32419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32420:t
32421/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32422s|@configure_input@|$ac_sed_conf_input|;t t
32423s&@top_builddir@&$ac_top_builddir_sub&;t t
32424s&@top_build_prefix@&$ac_top_build_prefix&;t t
32425s&@srcdir@&$ac_srcdir&;t t
32426s&@abs_srcdir@&$ac_abs_srcdir&;t t
32427s&@top_srcdir@&$ac_top_srcdir&;t t
32428s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32429s&@builddir@&$ac_builddir&;t t
32430s&@abs_builddir@&$ac_abs_builddir&;t t
32431s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32432$ac_datarootdir_hack
32433"
32434eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32435  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32436
32437test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32438  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32439  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32440  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32441which seems to be undefined.  Please make sure it is defined" >&5
32442$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32443which seems to be undefined.  Please make sure it is defined" >&2;}
32444
32445  rm -f "$tmp/stdin"
32446  case $ac_file in
32447  -) cat "$tmp/out" && rm -f "$tmp/out";;
32448  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32449  esac \
32450  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32451 ;;
32452  :H)
32453  #
32454  # CONFIG_HEADER
32455  #
32456  if test x"$ac_file" != x-; then
32457    {
32458      $as_echo "/* $configure_input  */" \
32459      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32460    } >"$tmp/config.h" \
32461      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32462    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32463      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32464$as_echo "$as_me: $ac_file is unchanged" >&6;}
32465    else
32466      rm -f "$ac_file"
32467      mv "$tmp/config.h" "$ac_file" \
32468	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32469    fi
32470  else
32471    $as_echo "/* $configure_input  */" \
32472      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32473      || as_fn_error $? "could not create -" "$LINENO" 5
32474  fi
32475 ;;
32476
32477
32478  esac
32479
32480done # for ac_tag
32481
32482
32483as_fn_exit 0
32484_ACEOF
32485ac_clean_files=$ac_clean_files_save
32486
32487test $ac_write_fail = 0 ||
32488  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32489
32490
32491# configure is writing to config.log, and then calls config.status.
32492# config.status does its own redirection, appending to config.log.
32493# Unfortunately, on DOS this fails, as config.log is still kept open
32494# by configure, so config.status won't be able to write to it; its
32495# output is simply discarded.  So we exec the FD to /dev/null,
32496# effectively closing config.log, so it can be properly (re)opened and
32497# appended to by config.status.  When coming back to configure, we
32498# need to make the FD available again.
32499if test "$no_create" != yes; then
32500  ac_cs_success=:
32501  ac_config_status_args=
32502  test "$silent" = yes &&
32503    ac_config_status_args="$ac_config_status_args --quiet"
32504  exec 5>/dev/null
32505  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32506  exec 5>>config.log
32507  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32508  # would make configure fail if this is the last instruction.
32509  $ac_cs_success || as_fn_exit 1
32510fi
32511if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32512  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32513$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32514fi
32515
32516
32517# Make the compare script executable
32518$CHMOD +x $OUTPUT_ROOT/compare.sh
32519
32520# Finally output some useful information to the user
32521
32522# Finally output some useful information to the user
32523
32524if test "x$CCACHE_FOUND" != x; then
32525	if  test "x$HAS_GOOD_CCACHE" = x; then
32526		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32527		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32528	else
32529		CCACHE_STATUS="installed and in use"
32530	fi
32531else
32532	if test "x$GCC" = xyes; then
32533		CCACHE_STATUS="not installed (consider installing)"
32534		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32535	else
32536		CCACHE_STATUS="not available for your system"
32537	fi
32538fi
32539
32540printf "\n"
32541printf "====================================================\n"
32542printf "A new configuration has been successfully created in\n"
32543printf "$OUTPUT_ROOT\n"
32544if test "x$CONFIGURE_COMMAND_LINE" != x; then
32545	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32546else
32547	printf "using default settings.\n"
32548fi
32549
32550printf "\n"
32551printf "Configuration summary:\n"
32552printf "* Debug level:    $DEBUG_LEVEL\n"
32553printf "* JDK variant:    $JDK_VARIANT\n"
32554printf "* JVM variants:   $with_jvm_variants\n"
32555printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32556
32557printf "\n"
32558printf "Tools summary:\n"
32559if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32560  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32561fi
32562printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32563printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32564printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32565
32566printf "\n"
32567printf "Build performance summary:\n"
32568printf "* Cores to use:   $NUM_CORES\n"
32569printf "* Memory limit:   $MEMORY_SIZE MB\n"
32570printf "* ccache status:  $CCACHE_STATUS\n"
32571printf "\n"
32572
32573if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32574	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32575	printf "$CCACHE_HELP_MSG\n"
32576
32577    # Print a helpful message on how to acquire the necessary build dependency.
32578    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32579    MISSING_DEPENDENCY=ccache
32580    PKGHANDLER_COMMAND=
32581
32582    case $PKGHANDLER in
32583	apt-get)
32584                apt_help     $MISSING_DEPENDENCY ;;
32585    yum)
32586                yum_help     $MISSING_DEPENDENCY ;;
32587	port)
32588                port_help    $MISSING_DEPENDENCY ;;
32589	pkgutil)
32590                pkgutil_help $MISSING_DEPENDENCY ;;
32591	pkgadd)
32592                pkgadd_help  $MISSING_DEPENDENCY ;;
32593    * )
32594      break ;;
32595    esac
32596
32597    if test "x$PKGHANDLER_COMMAND" != x; then
32598        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32599    fi
32600
32601	printf "$HELP_MSG\n"
32602	printf "\n"
32603fi
32604
32605if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32606	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32607	printf "will result in longer build times.\n"
32608	printf "\n"
32609fi
32610
32611if test "x$FOUND_ALT_VARIABLES" != "x"; then
32612	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32613	printf "These are not respected, and will be ignored. It is recommended\n"
32614	printf "that you clean your environment. The following variables are set:\n"
32615	printf "$FOUND_ALT_VARIABLES\n"
32616	printf "\n"
32617fi
32618
32619if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32620	printf "WARNING: Your build output directory is not on a local disk.\n"
32621	printf "This will severely degrade build performance!\n"
32622	printf "It is recommended that you create an output directory on a local disk,\n"
32623	printf "and run the configure script again from that directory.\n"
32624	printf "\n"
32625fi
32626
32627if test "x$IS_RECONFIGURE" = "xyes"; then
32628	printf "WARNING: The result of this configuration has overridden an older\n"
32629	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
32630	printf "proper build. Failure to do so might result in strange build problems.\n"
32631	printf "\n"
32632fi
32633
32634